PandaRoot
SortTool.h
Go to the documentation of this file.
1
// ******************************************************
2
// DecayTreeFitter Package
3
// We thank the original author Wouter Hulsbergen
4
// (BaBar, LHCb) for providing the sources.
5
// http://arxiv.org/abs/physics/0503191v1 (2005)
6
// Adaptation & Development for PANDA: Ralf Kliemt (2015)
7
// ******************************************************
8
//
9
// SortTool.h
10
// TreeFitter
11
//
12
// Created by Ralf Kliemt on 26/01/15.
13
// Copyright (c) 2015 Ralf Kliemt. All rights reserved.
14
//
15
16
#ifndef TREEFITTER_SORTTOOL_H
17
#define TREEFITTER_SORTTOOL_H 1
18
19
#include "
ParticleBase.h
"
20
#include "
RecoTrack.h
"
21
22
namespace
DecayTreeFitter
{
23
inline
bool
sortByType
(
const
ParticleBase
*lhs,
const
ParticleBase
*rhs)
24
{
25
int
lhstype = lhs->
type
();
26
int
rhstype = rhs->
type
();
27
bool
rc =
false
;
28
if
(lhstype == rhstype && lhstype ==
ParticleBase::kRecoTrack
)
29
rc = lhs->
particle
()->
Pt
() > rhs->
particle
()->
Pt
();
30
else
if
(lhs->
particle
()->
NDaughters
() > 0 && rhs->
particle
()->
NDaughters
() > 0)
31
rc = lhs->
nFinalChargedCandidates
() > rhs->
nFinalChargedCandidates
();
32
else
33
rc = lhstype < rhstype;
34
return
rc;
35
}
36
inline
bool
compTrkTransverseMomentum
(
const
RecoTrack
*lhs,
const
RecoTrack
*rhs)
37
{
38
return
lhs->
particle
()->
Pt
() > rhs->
particle
()->
Pt
();
39
}
40
}
// namespace DecayTreeFitter
41
#endif
ParticleBase.h
DecayTreeFitter::ParticleBase::particle
RhoCandidate * particle() const
Definition:
ParticleBase.h:49
DecayTreeFitter::ParticleBase::nFinalChargedCandidates
virtual int nFinalChargedCandidates() const
DecayTreeFitter::ParticleBase::kRecoTrack
Definition:
ParticleBase.h:26
RhoCandidate::Pt
Double_t Pt() const
Definition:
RhoCandidate.h:201
DecayTreeFitter::ParticleBase::type
virtual int type() const =0
DecayTreeFitter::compTrkTransverseMomentum
bool compTrkTransverseMomentum(const RecoTrack *lhs, const RecoTrack *rhs)
Definition:
SortTool.h:36
RhoCandidate::NDaughters
Int_t NDaughters() const
DecayTreeFitter::RecoTrack
Definition:
RecoTrack.h:29
DecayTreeFitter::sortByType
bool sortByType(const ParticleBase *lhs, const ParticleBase *rhs)
Definition:
SortTool.h:23
DecayTreeFitter::ParticleBase
Definition:
ParticleBase.h:24
DecayTreeFitter
Definition:
ChiSquare.h:13
RecoTrack.h
home
gitlab-runner
builds
LYZoAKaU
0
PandaRootGroup
PandaRoot
analysis
rho
DecayTreeFitter
SortTool.h
Generated on Fri Oct 21 2022 07:04:00 for PandaRoot by
1.8.13