1 #ifndef ALIHBTANALYSIS_H
2 #define ALIHBTANALYSIS_H
3 //_________________________________________________________
4 ////////////////////////////////////////////////////////////////////////////
6 // class AliHBTAnalysis
8 // Central Object Of HBTAnalyser:
9 // This class performs main looping within HBT Analysis
10 // User must plug a reader of Type AliReader
11 // User plugs in coorelation and monitor functions
12 // as well as monitor functions
14 // HBT Analysis Tool, which is integral part of AliRoot,
15 // ALICE Off-Line framework:
17 // Piotr.Skowronski@cern.ch
18 // more info: http://aliweb.cern.ch/people/skowron/analyzer/index.html
20 ////////////////////////////////////////////////////////////////////////////
21 //_________________________________________________________
23 #include <AliAnalysis.h>
34 class AliHBTOnePairFctn;
35 class AliHBTTwoPairFctn;
37 class AliHBTMonOneParticleFctn;
38 class AliHBTMonTwoParticleFctn;
42 class AliHBTAnalysis: public AliAnalysis
46 AliHBTAnalysis(const AliHBTAnalysis& in);
47 AliHBTAnalysis& operator=(const AliHBTAnalysis& /*right*/);
48 virtual ~AliHBTAnalysis();
51 Int_t ProcessEvent(AliAOD* aodrec, AliAOD* aodsim = 0x0);
54 enum EProcessOption{kReconstructed,kSimulated,kSimulatedAndReconstructed};
55 void SetProcessOption(EProcessOption option){fProcessOption = option;}//Init must be called to make effect
57 void Process(Option_t* option = "TracksAndParticles");//Stand alone HBT analysis
59 void SetGlobalPairCut(AliAODPairCut* cut);
61 void AddTrackFunction(AliHBTOnePairFctn* f);
62 void AddParticleFunction(AliHBTOnePairFctn* f);
63 void AddParticleAndTrackFunction(AliHBTTwoPairFctn* f);
65 void AddParticleMonitorFunction(AliHBTMonOneParticleFctn* f); //z.ch.
66 void AddTrackMonitorFunction(AliHBTMonOneParticleFctn* f); //z.ch.
67 void AddParticleAndTrackMonitorFunction(AliHBTMonTwoParticleFctn* f);//z.ch.
69 void AddResolutionFunction(AliHBTTwoPairFctn* f){AddParticleAndTrackFunction(f);}
71 void SetReader(AliReader* r){fReader = r;}
73 void WriteFunctions();
74 void SetOutputFileName(const char* fname);
76 void SetBufferSize(Int_t buffsize){fBufferSize=buffsize;}
77 void SetOwner(Bool_t owner=kTRUE){fIsOwner=owner;}
78 Bool_t IsOwner() const {return fIsOwner;}
79 Bool_t IsNonIdentAnalysis();
80 void ResetFunctions();
81 void SetDisplayInfo(Int_t howoften){fDisplayMixingInfo = howoften;}//defines every each line info about mixing is displayed
83 void SetApparentVertex(Double_t x, Double_t y, Double_t z);//Sets apparent vertex
85 static void PressAnyKey();//small utility function that helps to make comfortable macros
90 /**********************************************/
91 /* E V E N T P R O C E S S I N G */
92 /**********************************************/
94 Int_t (AliHBTAnalysis::*fProcEvent)(AliAOD* aodrec, AliAOD* aodsim);//Pointer to the processing method
96 virtual Int_t ProcessSim(AliAOD* /*aodrec*/, AliAOD* aodsim);
97 virtual Int_t ProcessRec(AliAOD* aodrec, AliAOD* /*aodsim*/);
98 virtual Int_t ProcessRecAndSim(AliAOD* aodrec, AliAOD* aodsim);
100 virtual Int_t ProcessRecAndSimNonId(AliAOD* aodrec, AliAOD* aodsim);
101 virtual Int_t ProcessSimNonId(AliAOD* /*aodrec*/, AliAOD* aodsim);
102 virtual Int_t ProcessRecNonId(AliAOD* aodrec, AliAOD* /*aodsim*/);
107 void ProcessTracks();
108 void ProcessParticles();
109 void ProcessTracksAndParticles();
111 void ProcessTracksAndParticlesNonIdentAnal();
112 void ProcessParticlesNonIdentAnal();
113 void ProcessTracksNonIdentAnal();
115 Bool_t RunCoherencyCheck();
117 void FilterOut(AliAOD* outpart1, AliAOD* outpart2, AliAOD* inpart,
118 AliAOD* outtrack1, AliAOD* outtrack2, AliAOD* intrack)const;
119 void FilterOut(AliAOD* out1, AliAOD* out2, AliAOD* in)const;
120 void DeleteFunctions();
123 AliReader* fReader;//! Pointer to reader
125 UInt_t fNTrackFunctions; //! Number of Tracks functions
126 UInt_t fNParticleFunctions; //! Number of particles functions
127 UInt_t fNParticleAndTrackFunctions; //! Number of resolution functions
129 UInt_t fNTrackMonitorFunctions; //! Number of Track Monitor functions
130 UInt_t fNParticleMonitorFunctions; //! Number of Particles Monitor functions
131 UInt_t fNParticleAndTrackMonitorFunctions; //! Number of Resolution Monitor functions
133 AliHBTOnePairFctn** fTrackFunctions; //!array of pointers to functions that analyze rekonstructed tracks
134 AliHBTOnePairFctn** fParticleFunctions; //!array of pointers to functions that analyze generated particles
135 AliHBTTwoPairFctn** fParticleAndTrackFunctions; //!array of pointers to functions that analyze both
136 //reconstructed tracks and generated particles
137 //i.e. - resolution analyzers
138 AliHBTMonOneParticleFctn** fParticleMonitorFunctions; //! array of pointers to monitoring functions
139 AliHBTMonOneParticleFctn** fTrackMonitorFunctions; //! which are used for single particle analysis,
140 AliHBTMonTwoParticleFctn** fParticleAndTrackMonitorFunctions; //! cut monitoring, etc.
142 AliEventCut* fBkgEventCut;// We can narrow class of events used in
144 AliEventBuffer* fPartBuffer;//Sim Particles event buffer
145 AliEventBuffer* fTrackBuffer;//Rec Tracks event buffer
147 /**********************************************/
148 /* Control parameters */
149 /**********************************************/
151 Int_t fBufferSize; //defines the size of buffer for mixed events; -1==MIX All
152 Int_t fDisplayMixingInfo;//!defines every which particle mixing info is displayed
153 Bool_t fIsOwner;//!defines of all functions are supposed to be deleted while by the way of analysis defaulr false
155 EProcessOption fProcessOption;//Option that says waht analysis to do (Rec, Sim or SimAndRec)
156 Bool_t fNoCorrfctns;//Internal flag indicating that no cfs are set by the user (only monitor ones)
157 TString* fOutputFileName;//Fiele name where to dump results, if not specified reults are written to gDirectory
159 Double_t fVertexX;//X position of apparent vertex
160 Double_t fVertexY;//Y position of apparent vertex
161 Double_t fVertexZ;//Z position of apparent vertex
165 static const UInt_t fgkFctnArraySize;//!
166 static const UInt_t fgkDefaultMixingInfo;//!
167 static const Int_t fgkDefaultBufferSize;//!
169 ClassDef(AliHBTAnalysis,0)