]>
Commit | Line | Data |
---|---|---|
7cd4e982 | 1 | #ifndef ALIMCANALYSISUTILS_H |
2 | #define ALIMCANALYSISUTILS_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | /* $Id: $ */ | |
6 | ||
7 | //_________________________________________________________________________ | |
8 | // Class for analysis utils for MC data | |
9 | // stored in stack or event header. | |
10 | // Contains: | |
11 | // - method to check the origin of a given track/cluster | |
12 | // - method to obtain the generated jets | |
13 | // | |
14 | //*-- Author: Gustavo Conesa (INFN-LNF) | |
15 | ||
16 | // --- ROOT system --- | |
c3ab95b2 | 17 | #include <TObject.h> |
18 | #include <TString.h> | |
7cd4e982 | 19 | class TList ; |
c4a7d28a | 20 | class TVector3; |
7cd4e982 | 21 | |
22 | //--- AliRoot system --- | |
23 | class AliCaloTrackReader ; | |
24 | class AliStack ; | |
25 | ||
26 | class AliMCAnalysisUtils : public TObject { | |
27 | ||
78219bac | 28 | public: |
29 | AliMCAnalysisUtils() ; // ctor | |
30 | virtual ~AliMCAnalysisUtils() ;//virtual dtor | |
c5693f62 | 31 | |
840124fe | 32 | //-------------------------------------- |
33 | //Enum with tag for origin of particles | |
34 | //-------------------------------------- | |
3c75ddf7 | 35 | |
36 | //"Mostly" photon parent types on line 1, | |
37 | // | |
38 | //then "mostly" electron parent types on line 2, (e.g. electrons can | |
39 | //come from pi0 decay) | |
40 | //then charged particles on line 3, | |
41 | //followed by other and unknown on line 4 | |
c5693f62 | 42 | enum mcTypes { kMCPhoton, kMCPrompt, kMCFragmentation, kMCISR, |
43 | kMCPi0Decay, kMCEtaDecay, kMCOtherDecay, kMCConversion, | |
44 | kMCElectron, kMCEFromCFromB, kMCEFromC, kMCEFromB, kMCZDecay, kMCWDecay, | |
45 | kMCMuon, kMCPion, kMCPi0, kMCKaon, kMCEta, kMCProton, | |
46 | kMCAntiProton, kMCNeutron, kMCAntiNeutron, | |
47 | kMCOther, kMCUnknown, kMCBadLabel } ; | |
3c75ddf7 | 48 | |
840124fe | 49 | //-------------------------------------- |
3c75ddf7 | 50 | // Methods to check origin of clusters |
840124fe | 51 | //-------------------------------------- |
3c75ddf7 | 52 | |
c5693f62 | 53 | Int_t CheckCommonAncestor(const Int_t index1, const Int_t index2, const AliCaloTrackReader* reader, |
3c75ddf7 | 54 | Int_t & ancPDG, Int_t & ancStatus, TLorentzVector & momentum, TVector3 & v) ; |
c5693f62 | 55 | Int_t CheckOrigin(const Int_t label, const AliCaloTrackReader * reader, const Int_t input) ; |
3c75ddf7 | 56 | //Check the label of the most significant particle but do checks on the rest of the contributing labels |
c5693f62 | 57 | Int_t CheckOrigin(const Int_t *label, const Int_t nlabels, const AliCaloTrackReader * reader, const Int_t input) ; |
3c75ddf7 | 58 | |
59 | Int_t CheckOriginInStack(const Int_t *labels, const Int_t nlabels, AliStack * stack) ; | |
c5693f62 | 60 | Int_t CheckOriginInAOD (const Int_t *labels, const Int_t nlabels, const TClonesArray* mcparticles) ; |
3c75ddf7 | 61 | |
62 | void CheckOverlapped2GammaDecay(const Int_t *labels, const Int_t nlabels, const Int_t mesonIndex, AliStack * stack, Int_t & tag); | |
c5693f62 | 63 | void CheckOverlapped2GammaDecay(const Int_t *labels, const Int_t nlabels, const Int_t mesonIndex, const TClonesArray* mcparticles, Int_t & tag); |
840124fe | 64 | |
65 | //Check or set the bits produced in the above methods | |
3c75ddf7 | 66 | void SetTagBit(Int_t &tag, const UInt_t set) const { |
67 | // Set bit of type set (mcTypes) in tag | |
68 | tag |= (1<<set) ; | |
69 | } | |
70 | ||
71 | Bool_t CheckTagBit(const Int_t tag, const UInt_t test) const { | |
72 | // Check if in tag the bit test (mcTypes) is set. | |
73 | if (tag & (1<<test) ) return kTRUE ; | |
74 | else return kFALSE ; | |
f8006433 | 75 | } |
3c75ddf7 | 76 | |
840124fe | 77 | //-------------------------------------- |
78 | // Other methods | |
79 | //-------------------------------------- | |
3c75ddf7 | 80 | |
840124fe | 81 | // Method to recover MC jets stored in generator |
c5693f62 | 82 | TList * GetJets(const AliCaloTrackReader * reader) ; |
3c75ddf7 | 83 | |
84 | void SetDebug(Int_t deb) { fDebug=deb ; } | |
85 | Int_t GetDebug() const { return fDebug ; } | |
86 | ||
87 | void SetMCGenerator(TString mcgen) { fMCGenerator = mcgen ; } | |
88 | TString GetMCGenerator() const { return fMCGenerator ; } | |
840124fe | 89 | |
90 | void Print(const Option_t * opt) const; | |
91 | ||
3c75ddf7 | 92 | private: |
93 | Int_t fCurrentEvent; // Current Event | |
94 | Int_t fDebug; // Debug level | |
95 | TList * fJetsList; // List of jets | |
96 | TString fMCGenerator; // MC geneator used to generate data in simulation | |
97 | ||
c5693f62 | 98 | AliMCAnalysisUtils & operator = (const AliMCAnalysisUtils & ) ; // cpy assignment |
99 | AliMCAnalysisUtils(const AliMCAnalysisUtils & mcu) ; // cpy ctor | |
100 | ||
3c75ddf7 | 101 | ClassDef(AliMCAnalysisUtils,3) |
7cd4e982 | 102 | |
3c75ddf7 | 103 | } ; |
7cd4e982 | 104 | |
105 | #endif //ALIMCANALYSISUTILS_H | |
106 | ||
107 | ||
108 |