PandaRoot
SortTool.h
Go to the documentation of this file.
1
//****************************************************************************
2
//* This file is part of PandaRoot. *
3
//* *
4
//* PandaRoot is distributed under the terms of the *
5
//* GNU General Public License (GPL) version 3, *
6
//* copied verbatim in the file "LICENSE". *
7
//* *
8
//* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9
//* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10
//* The authors are listed in the file "AUTHORS". *
11
//****************************************************************************
12
13
// ******************************************************
14
// DecayTreeFitter Package
15
// We thank the original author Wouter Hulsbergen
16
// (BaBar, LHCb) for providing the sources.
17
// http://arxiv.org/abs/physics/0503191v1 (2005)
18
// Adaptation & Development for PANDA: Ralf Kliemt (2015)
19
// ******************************************************
20
//
21
// SortTool.h
22
// TreeFitter
23
//
24
// Created by Ralf Kliemt on 26/01/15.
25
// Copyright (c) 2015 Ralf Kliemt. All rights reserved.
26
//
27
28
#ifndef TREEFITTER_SORTTOOL_H
29
#define TREEFITTER_SORTTOOL_H 1
30
31
#include "
ParticleBase.h
"
32
#include "
RecoTrack.h
"
33
34
namespace
DecayTreeFitter
{
35
inline
bool
sortByType
(
const
ParticleBase
*lhs,
const
ParticleBase
*rhs)
36
{
37
int
lhstype = lhs->
type
();
38
int
rhstype = rhs->
type
();
39
bool
rc =
false
;
40
if
(lhstype == rhstype && lhstype ==
ParticleBase::kRecoTrack
)
41
rc = lhs->
particle
()->
Pt
() > rhs->
particle
()->
Pt
();
42
else
if
(lhs->
particle
()->
NDaughters
() > 0 && rhs->
particle
()->
NDaughters
() > 0)
43
rc = lhs->
nFinalChargedCandidates
() > rhs->
nFinalChargedCandidates
();
44
else
45
rc = lhstype < rhstype;
46
return
rc;
47
}
48
inline
bool
compTrkTransverseMomentum
(
const
RecoTrack
*lhs,
const
RecoTrack
*rhs)
49
{
50
return
lhs->
particle
()->
Pt
() > rhs->
particle
()->
Pt
();
51
}
52
}
// namespace DecayTreeFitter
53
#endif
ParticleBase.h
DecayTreeFitter::ParticleBase::particle
RhoCandidate * particle() const
Definition:
ParticleBase.h:61
DecayTreeFitter::ParticleBase::nFinalChargedCandidates
virtual int nFinalChargedCandidates() const
DecayTreeFitter::ParticleBase::kRecoTrack
Definition:
ParticleBase.h:38
RhoCandidate::Pt
Double_t Pt() const
Definition:
RhoCandidate.h:213
DecayTreeFitter::ParticleBase::type
virtual int type() const =0
DecayTreeFitter::compTrkTransverseMomentum
bool compTrkTransverseMomentum(const RecoTrack *lhs, const RecoTrack *rhs)
Definition:
SortTool.h:48
RhoCandidate::NDaughters
Int_t NDaughters() const
DecayTreeFitter::RecoTrack
Definition:
RecoTrack.h:41
DecayTreeFitter::sortByType
bool sortByType(const ParticleBase *lhs, const ParticleBase *rhs)
Definition:
SortTool.h:35
DecayTreeFitter::ParticleBase
Definition:
ParticleBase.h:36
DecayTreeFitter
Definition:
ChiSquare.h:25
RecoTrack.h
home
gitlab-runner
builds
Vxspf1vo
0
PandaRootGroup
PandaRoot
analysis
rho
DecayTreeFitter
SortTool.h
Generated on Fri Nov 29 2024 06:04:46 for PandaRoot by
1.8.13