1 #ifndef ALIJETPARTICLESREADERKINE_H
2 #define ALIJETPARTICLESREADERKINE_H
6 //_______________________________________________________________________
7 /////////////////////////////////////////////////////////////////////////
9 // class AliJetParticlesReaderKine
11 // Reader for Kinematics
13 // loizides@ikf.uni-frankfurt.de
15 /////////////////////////////////////////////////////////////////////////
17 #include <Riostream.h>
19 #include <TParticle.h>
20 #include "AliJetParticlesReader.h"
23 class AliJetParticlesReaderKine: public AliJetParticlesReader
26 AliJetParticlesReaderKine();
27 AliJetParticlesReaderKine(TString&);
28 AliJetParticlesReaderKine(TObjArray*, const Char_t *filename="galice.root");
29 virtual ~AliJetParticlesReaderKine();
32 void SetNeutral(Bool_t b){fNeutral=b;}
33 void SetCharged(Bool_t b){fCharged=b;}
34 void SetEM(Bool_t b){fEM=b;}
35 void SetUseTracks(Bool_t b){fUseTracks=b;}
39 Int_t OpenFile(Int_t n);
40 Bool_t IsAcceptedParticle(TParticle *p) const;
42 TString fFileName; //file name of galice
43 AliRunLoader* fRunLoader; //!pointer to loader
45 Bool_t fNeutral; //neutral cut
46 Bool_t fCharged; //charged cut
47 Bool_t fEM; //em (e+,e-,gamma) cut
48 Bool_t fUseTracks; // use ntracks instead of nprimaries
49 ClassDef(AliJetParticlesReaderKine,1)
52 inline Bool_t AliJetParticlesReaderKine::IsAcceptedParticle(TParticle *p) const
56 Int_t pcode=p->GetPdgCode();
57 if ((pcode==11)||(pcode==-11)||(pcode==22)) {
58 if(!fEM) return kFALSE;
60 TParticlePDG *pdg=p->GetPDG();
61 Float_t ch=pdg->Charge();
62 if((!fCharged)&&(ch)) return kFALSE;
63 if((!fNeutral)&&(!ch)) return kFALSE;
67 if((eta<fEtaMin)||(eta>fEtaMax)) return kFALSE;
70 if((phi<fPhiMin)||(phi>fPhiMax)) return kFALSE;
73 if((pt<fPtMin)||(pt>fPtMax)) return kFALSE;