]>
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 ; |
20 | ||
21 | //--- AliRoot system --- | |
22 | class AliCaloTrackReader ; | |
23 | class AliStack ; | |
24 | ||
25 | class AliMCAnalysisUtils : public TObject { | |
26 | ||
78219bac | 27 | public: |
28 | AliMCAnalysisUtils() ; // ctor | |
29 | virtual ~AliMCAnalysisUtils() ;//virtual dtor | |
30 | private: | |
31 | AliMCAnalysisUtils & operator = (const AliMCAnalysisUtils & ) ;//cpy assignment | |
32 | AliMCAnalysisUtils(const AliMCAnalysisUtils & mcu) ; // cpy ctor | |
d151d2ee | 33 | |
78219bac | 34 | public: |
d151d2ee | 35 | //"Mostly" photon parent types on line 1, |
36 | // | |
37 | //then "mostly" electron parent types on line 2, (e.g. electrons can | |
38 | //come from pi0 decay) | |
39 | //then charged particles on line 3, | |
40 | //followed by other and unknown on line 4 | |
41 | enum mcTypes {kMCPhoton, kMCPrompt, kMCFragmentation, kMCISR, kMCPi0Decay, kMCEtaDecay, kMCOtherDecay, kMCConversion, | |
42 | kMCElectron, kMCEFromCFromB, kMCEFromC, kMCEFromB, kMCZDecay, kMCWDecay, | |
eb3e1b50 | 43 | kMCMuon, kMCPion, kMCPi0, kMCKaon, kMCEta, kMCProton, kMCAntiProton, kMCNeutron, kMCAntiNeutron, |
898c9d44 | 44 | kMCOther, kMCUnknown, kMCBadLabel}; |
902aa95c | 45 | |
46 | //Check only the label of the most significant particle | |
48a0baf4 | 47 | Int_t CheckCommonAncestor(const Int_t index1, const Int_t index2, AliCaloTrackReader* reader, |
952615e5 | 48 | Int_t & ancPDG, Int_t & ancStatus, TLorentzVector & momentum) ; |
7cd4e982 | 49 | Int_t CheckOrigin(const Int_t label, AliCaloTrackReader * reader, const Int_t input) ; |
902aa95c | 50 | //Check the label of the most significant particle but do checks on the rest of the contributing labels |
51 | Int_t CheckOrigin(const Int_t *label, const Int_t nlabels, AliCaloTrackReader * reader, const Int_t input) ; | |
7cd4e982 | 52 | |
902aa95c | 53 | Int_t CheckOriginInStack(const Int_t *labels, const Int_t nlabels, AliStack * stack) ; |
54 | Int_t CheckOriginInAOD (const Int_t *labels, const Int_t nlabels, TClonesArray* mcparticles) ; | |
55 | ||
56 | void CheckOverlapped2GammaDecay(const Int_t *labels, const Int_t nlabels, const Int_t mesonIndex, AliStack * stack, Int_t & tag); | |
57 | void CheckOverlapped2GammaDecay(const Int_t *labels, const Int_t nlabels, const Int_t mesonIndex, TClonesArray* mcparticles, Int_t & tag); | |
58 | ||
8dacfd76 | 59 | TList * GetJets(AliCaloTrackReader * const reader) ; |
7cd4e982 | 60 | |
8dacfd76 | 61 | void SetTagBit(Int_t &tag, const UInt_t set) const { |
7cd4e982 | 62 | // Set bit of type set (mcTypes) in tag |
63 | tag |= (1<<set) ; | |
64 | } | |
65 | ||
66 | Bool_t CheckTagBit(const Int_t tag, const UInt_t test) const { | |
67 | // Check if in tag the bit test (mcTypes) is set. | |
68 | if (tag & (1<<test) ) return kTRUE ; | |
69 | else return kFALSE ; | |
f8006433 | 70 | } |
7cd4e982 | 71 | |
72 | void Print(const Option_t * opt)const; | |
73 | ||
74 | void SetDebug(Int_t deb) {fDebug=deb;} | |
75 | Int_t GetDebug() const {return fDebug;} | |
76 | ||
77 | void SetMCGenerator(TString mcgen) {fMCGenerator=mcgen;} | |
78 | TString GetMCGenerator() const {return fMCGenerator;} | |
79 | ||
80 | private: | |
81 | Int_t fCurrentEvent; // Current Event | |
f8006433 | 82 | Int_t fDebug; // Debug level |
7cd4e982 | 83 | TList * fJetsList; // List of jets |
84 | TString fMCGenerator; // MC geneator used to generate data in simulation | |
85 | ||
86 | ClassDef(AliMCAnalysisUtils,3) | |
87 | } ; | |
88 | ||
89 | ||
90 | #endif //ALIMCANALYSISUTILS_H | |
91 | ||
92 | ||
93 |