FairRoot/PandaRoot
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
analysis
rho
RhoSelector
RhoMomentumParticleSelector.cxx
Go to the documentation of this file.
1
// //
3
// RhoMomentumParticleSelector //
4
// //
5
// Selector classes for particle selection //
6
// //
7
// Author List: //
8
// Marcel Kunze, RUB, Feb. 99 //
9
// Copyright (C) 1999-2001, Ruhr-University Bochum. //
10
// Ralf Kliemt, HIM/GSI Feb.2013 (Cleanup & Restructuring) //
11
// //
13
14
#include <math.h>
15
#include "TDatabasePDG.h"
16
17
#include "
RhoSelector/RhoMomentumParticleSelector.h
"
18
#include "
RhoBase/RhoCandidate.h
"
19
#include "
PndPidCandidate.h
"
20
21
22
23
ClassImp
(
RhoMomentumParticleSelector
)
24
25
TBuffer& operator>> ( TBuffer& buf,
RhoMomentumParticleSelector
*&obj )
26
{
27
obj = (
RhoMomentumParticleSelector
* ) buf.ReadObject ( RhoMomentumParticleSelector::Class() );
28
return
buf;
29
}
30
31
RhoMomentumParticleSelector::RhoMomentumParticleSelector
(
const
char
*
name
,
Double_t
cv,
Double_t
w,
const
char
* type ) :
32
RhoParticleSelectorBase
( name,type ), fCentralValue ( cv ), fWindow ( 0.5*w )
33
{}
34
35
Bool_t
RhoMomentumParticleSelector::Accept
(
RhoCandidate
*
b
)
36
{
37
if
( b == 0 ) {
return
kFALSE; }
38
SetTypeAndMass
( b );
39
return
(
fabs
( b->
P
()-
fCentralValue
) <
fWindow
);
40
}
41
42
Bool_t
RhoMomentumParticleSelector::Accept
(
PndPidCandidate
*
b
)
43
{
44
if
( b == 0 ) {
return
kFALSE; }
45
return
(
fabs
( b->
GetMomentum
().Mag()-
fCentralValue
) <
fWindow
);
46
}
47
48
49
RhoMomentumParticleSelector::Accept
virtual Bool_t Accept(RhoCandidate *b)
Definition:
RhoMomentumParticleSelector.cxx:35
b
TTree * b
Definition:
GammaSpectraAnalysis.C:24
RhoMomentumParticleSelector::RhoMomentumParticleSelector
RhoMomentumParticleSelector(const char *name="RhoMomentumParticleSelector", Double_t cv=0, Double_t w=DBL_MAX, const char *type=0)
Definition:
RhoMomentumParticleSelector.cxx:31
RhoCandidate.h
RhoMomentumParticleSelector.h
PndPidCandidate
Definition:
PndPidCandidate.h:30
RhoCandidate
Definition:
RhoCandidate.h:44
PndPidCandidate.h
Double_t
Double_t
Definition:
SimCompleteLinkDef.h:6
RhoParticleSelectorBase
Definition:
RhoParticleSelectorBase.h:27
RhoMomentumParticleSelector::fCentralValue
Double_t fCentralValue
Definition:
RhoMomentumParticleSelector.h:42
RhoMomentumParticleSelector::fWindow
Double_t fWindow
Definition:
RhoMomentumParticleSelector.h:42
fabs
friend F32vec4 fabs(const F32vec4 &a)
Definition:
P4_F32vec4.h:47
RhoParticleSelectorBase::SetTypeAndMass
void SetTypeAndMass(RhoCandidate *b)
Definition:
RhoParticleSelectorBase.cxx:143
name
TString name
Definition:
createRootGeoFile.C:82
RhoCandidate::P
Double_t P() const
Definition:
RhoCandidate.cxx:1629
ClassImp
ClassImp(PndAnaContFact)
Bool_t
Bool_t
Definition:
SimCompleteLinkDef.h:6
PndPidCandidate::GetMomentum
TVector3 GetMomentum() const
Definition:
PndPidCandidate.h:55
RhoMomentumParticleSelector
Definition:
RhoMomentumParticleSelector.h:28
Generated on Wed Apr 3 2019 08:44:05 for FairRoot/PandaRoot by
1.8.5