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