]>
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; } |
ef647350 | 53 | |
54 | // Cut on distance to bad channel | |
86e7d5db | 55 | virtual Bool_t PassDistanceToBadChannelCut(const AliESDCaloCluster &/*cluster*/) const { return true; } |
ef647350 | 56 | |
57 | // Cut on track matching | |
86e7d5db | 58 | virtual Bool_t PassTrackMatchingCut(const AliESDCaloCluster &/*cluster*/) const { return true; } |
f61cec2f | 59 | |
60 | // Cut on neutral monte carlo particle | |
86e7d5db | 61 | virtual Bool_t IsNeutralMcParticle(Int_t pIdx, AliStack& s, const TParticlePDG& pdg) const; |
f61cec2f | 62 | |
63 | // Is it an EM E_T particle | |
64 | virtual Bool_t IsEmEtParticle(const Int_t pdgCode) const; | |
65 | ||
66 | // Does the particle come from an EM E_T primary ? | |
67 | virtual Bool_t PrimaryIsEmEtParticle(const Int_t pIdx, AliStack &stack) const; | |
68 | ||
69 | // Get the index of primary particle for the particle | |
70 | Int_t GetPrimary(const Int_t partIdx, AliStack &stack) const; | |
71 | ||
72 | // Cut on geometrical acceptance | |
43dd5a38 | 73 | virtual Bool_t CutGeometricalAcceptance(const TParticle &/*part*/) { return true; } |
f61cec2f | 74 | |
75 | // Cut on geometrical acceptance | |
43dd5a38 | 76 | virtual Bool_t CutGeometricalAcceptance(const AliVTrack &/*part*/) { return true; } |
f61cec2f | 77 | |
31c813d5 | 78 | // Cut on geometrical acceptance |
43dd5a38 | 79 | virtual Bool_t CutGeometricalAcceptance(const AliESDCaloCluster &/*part*/) { return true; } |
31c813d5 | 80 | |
b2c10007 | 81 | // From secondary vertex? |
6844c491 | 82 | //virtual Bool_t FromSecondaryInteraction(const TParticle& part, AliStack& stack) const; |
83 | virtual Bool_t FromSecondaryInteraction(Int_t partID, AliStack& stack) const; | |
84 | ||
85 | Int_t GetMother(Int_t partID, AliStack& stack) const; | |
86 | Bool_t IsFromDetectorCover(Int_t partID, AliStack& stack) const; | |
87 | Int_t GetFirstMotherNotFromDetectorCover(Int_t partID, AliStack& stack) const; | |
f61cec2f | 88 | |
b439c315 | 89 | // Cluster is in correct detector |
90 | virtual Bool_t IsDetectorCluster(const AliESDCaloCluster &cluster) const = 0; | |
32503dac | 91 | |
92 | // Get correct cluster label - PHOS needs different method | |
93 | virtual UInt_t GetLabel(const AliESDCaloCluster *cluster, AliStack *stack){if(!stack){return 0;}else{return TMath::Abs(cluster->GetLabel());}} | |
b439c315 | 94 | |
ef647350 | 95 | protected: |
96 | ||
97 | const AliVEvent *fEvent; // Pointer to current event | |
98 | ||
f61cec2f | 99 | TRefArray *fClusterArray; // Array of clusters |
4d376d01 | 100 | |
101 | AliAnalysisEtCuts *fCuts; // Pointer to the cuts object; DS: also in base class? | |
b2c10007 | 102 | |
15d985fd | 103 | Bool_t SuspiciousDecayInChain(const UInt_t suspectMotherPdg, const UInt_t suspectDaughterPdg, const TParticle& part, AliStack& stack) const; |
b2c10007 | 104 | |
105 | Int_t fRunNumber; | |
f61cec2f | 106 | |
95a76eaf | 107 | Bool_t fInitialized; // matrix initialized |
f61cec2f | 108 | |
ef647350 | 109 | private: |
110 | ||
c31562f7 | 111 | //AliAnalysisEtSelector(); // Prohibited |
ef647350 | 112 | AliAnalysisEtSelector(const AliAnalysisEtSelector& other);// Prohibited |
113 | AliAnalysisEtSelector& operator=(const AliAnalysisEtSelector& other);// Prohibited | |
114 | bool operator==(const AliAnalysisEtSelector& other) const;// Prohibited | |
115 | ||
116 | ClassDef(AliAnalysisEtSelector, 1); | |
117 | }; | |
118 | ||
119 | #endif // ALIANALYSISETSELECTOR_H |