]>
Commit | Line | Data |
---|---|---|
ef647350 | 1 | #ifndef ALIANALYSISETSELECTOR_H |
2 | #define ALIANALYSISETSELECTOR_H | |
4d376d01 | 3 | //_________________________________________________________________________ |
4 | // Utility Class for transverse energy studies | |
5 | // Selector Base class | |
6 | // - | |
7 | // | |
8 | //*-- Authors: Oystein Djuvsland (Bergen) | |
9 | //_________________________________________________________________________ | |
ef647350 | 10 | #include <Rtypes.h> |
f61cec2f | 11 | #include "AliAnalysisEtCommon.h" |
12 | #include "AliESDEvent.h" | |
ef647350 | 13 | |
ef647350 | 14 | class AliESDCaloCluster; |
f61cec2f | 15 | class AliVTrack; |
ef647350 | 16 | class TRefArray; |
17 | class AliAnalysisEtCuts; | |
f61cec2f | 18 | class TParticle; |
19 | class TParticlePDG; | |
20 | class AliStack; | |
21 | ||
22 | class AliAnalysisEtSelector : public AliAnalysisEtCommon | |
ef647350 | 23 | { |
24 | ||
25 | public: | |
26 | ||
27 | // Constructor takes cuts object | |
28 | AliAnalysisEtSelector(AliAnalysisEtCuts *cuts); | |
c31562f7 | 29 | AliAnalysisEtSelector(); |
ef647350 | 30 | |
31 | // Destructor | |
32 | virtual ~AliAnalysisEtSelector(); | |
33 | ||
34 | // Set the current event | |
95a76eaf | 35 | virtual void SetEvent(const AliESDEvent *event); |
f61cec2f | 36 | |
37 | // Init | |
38 | virtual void Init() {} | |
ef647350 | 39 | |
f61cec2f | 40 | // Init with event |
41 | virtual Int_t Init(const AliESDEvent *event) { fRunNumber = event->GetRunNumber(); return 0; } | |
ef647350 | 42 | |
43 | // Return CaloClusters for the detector | |
f61cec2f | 44 | virtual TRefArray* GetClusters() { return 0; } |
43dd5a38 | 45 | |
46 | virtual Float_t ShiftAngle(Float_t phi);//Always returns an angle in radians between -pi<phi<pi | |
f61cec2f | 47 | |
48 | // Return true if cluster has energy > cut | |
86e7d5db | 49 | virtual Bool_t PassMinEnergyCut(const AliESDCaloCluster &/*cluster*/) const { return true; } |
ef647350 | 50 | |
51 | // Return true if cluster has energy > cut | |
86e7d5db | 52 | virtual Bool_t PassMinEnergyCut(const TParticle &/*part*/) const { return true; } |
02d47689 | 53 | |
54 | virtual Bool_t PassMinEnergyCut(Double_t e) const; | |
ef647350 | 55 | |
56 | // Cut on distance to bad channel | |
86e7d5db | 57 | virtual Bool_t PassDistanceToBadChannelCut(const AliESDCaloCluster &/*cluster*/) const { return true; } |
ef647350 | 58 | |
59 | // Cut on track matching | |
86e7d5db | 60 | virtual Bool_t PassTrackMatchingCut(const AliESDCaloCluster &/*cluster*/) const { return true; } |
f61cec2f | 61 | |
62 | // Cut on neutral monte carlo particle | |
86e7d5db | 63 | virtual Bool_t IsNeutralMcParticle(Int_t pIdx, AliStack& s, const TParticlePDG& pdg) const; |
f61cec2f | 64 | |
65 | // Is it an EM E_T particle | |
02d47689 | 66 | virtual Bool_t IsEmEtParticle(const Int_t pdgCode) const; |
f61cec2f | 67 | |
68 | // Does the particle come from an EM E_T primary ? | |
02d47689 | 69 | virtual Bool_t PrimaryIsEmEtParticle(const Int_t pIdx, AliStack &stack) const; |
f61cec2f | 70 | |
71 | // Get the index of primary particle for the particle | |
02d47689 | 72 | Int_t GetPrimary(const Int_t partIdx, AliStack &stack) const; |
f61cec2f | 73 | |
74 | // Cut on geometrical acceptance | |
43dd5a38 | 75 | virtual Bool_t CutGeometricalAcceptance(const TParticle &/*part*/) { return true; } |
f61cec2f | 76 | |
77 | // Cut on geometrical acceptance | |
43dd5a38 | 78 | virtual Bool_t CutGeometricalAcceptance(const AliVTrack &/*part*/) { return true; } |
f61cec2f | 79 | |
31c813d5 | 80 | // Cut on geometrical acceptance |
43dd5a38 | 81 | virtual Bool_t CutGeometricalAcceptance(const AliESDCaloCluster &/*part*/) { return true; } |
31c813d5 | 82 | |
b2c10007 | 83 | // From secondary vertex? |
6844c491 | 84 | //virtual Bool_t FromSecondaryInteraction(const TParticle& part, AliStack& stack) const; |
85 | virtual Bool_t FromSecondaryInteraction(Int_t partID, AliStack& stack) const; | |
86 | ||
87 | Int_t GetMother(Int_t partID, AliStack& stack) const; | |
88 | Bool_t IsFromDetectorCover(Int_t partID, AliStack& stack) const; | |
89 | Int_t GetFirstMotherNotFromDetectorCover(Int_t partID, AliStack& stack) const; | |
f61cec2f | 90 | |
b439c315 | 91 | // Cluster is in correct detector |
92 | virtual Bool_t IsDetectorCluster(const AliESDCaloCluster &cluster) const = 0; | |
32503dac | 93 | |
94 | // Get correct cluster label - PHOS needs different method | |
95 | virtual UInt_t GetLabel(const AliESDCaloCluster *cluster, AliStack *stack){if(!stack){return 0;}else{return TMath::Abs(cluster->GetLabel());}} | |
b439c315 | 96 | |
177b9454 | 97 | AliAnalysisEtCuts * GetCuts() const { return fCuts; } |
ef647350 | 98 | protected: |
99 | ||
c40cbde5 | 100 | const AliVEvent *fEvent; //! Pointer to current event |
ef647350 | 101 | |
c40cbde5 | 102 | TRefArray *fClusterArray; //! Array of clusters |
4d376d01 | 103 | |
c40cbde5 | 104 | AliAnalysisEtCuts *fCuts; //! Pointer to the cuts object; DS: also in base class? |
b2c10007 | 105 | |
15d985fd | 106 | Bool_t SuspiciousDecayInChain(const UInt_t suspectMotherPdg, const UInt_t suspectDaughterPdg, const TParticle& part, AliStack& stack) const; |
b2c10007 | 107 | |
108 | Int_t fRunNumber; | |
f61cec2f | 109 | |
95a76eaf | 110 | Bool_t fInitialized; // matrix initialized |
02d47689 | 111 | |
ef647350 | 112 | private: |
113 | ||
c31562f7 | 114 | //AliAnalysisEtSelector(); // Prohibited |
ef647350 | 115 | AliAnalysisEtSelector(const AliAnalysisEtSelector& other);// Prohibited |
116 | AliAnalysisEtSelector& operator=(const AliAnalysisEtSelector& other);// Prohibited | |
117 | bool operator==(const AliAnalysisEtSelector& other) const;// Prohibited | |
118 | ||
119 | ClassDef(AliAnalysisEtSelector, 1); | |
120 | }; | |
121 | ||
122 | #endif // ALIANALYSISETSELECTOR_H |