]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HBTAN/AliHBTAnalysis.h
Methods for Init and Read have been splitted for the 3 subdetectors. Recpoints proces...
[u/mrichter/AliRoot.git] / HBTAN / AliHBTAnalysis.h
CommitLineData
1b446896 1#ifndef ALIHBTANALYSIS_H
2#define ALIHBTANALYSIS_H
bfb09ece 3//_________________________________________________________
4////////////////////////////////////////////////////////////////////////////
5//
6// class AliHBTAnalysis
7//
8// Central Object Of HBTAnalyser:
9// This class performs main looping within HBT Analysis
78d7c6d3 10// User must plug a reader of Type AliReader
bfb09ece 11// User plugs in coorelation and monitor functions
12// as well as monitor functions
13//
14// HBT Analysis Tool, which is integral part of AliRoot,
15// ALICE Off-Line framework:
16//
17// Piotr.Skowronski@cern.ch
c7ffd78f 18// more info: http://aliweb.cern.ch/people/skowron/analyzer/index.html
bfb09ece 19//
20////////////////////////////////////////////////////////////////////////////
21//_________________________________________________________
1b446896 22
78d7c6d3 23#include <AliAnalysis.h>
1b446896 24
1b446896 25class AliHBTCut;
78d7c6d3 26//class AliHBTPair;
1b446896 27
28class AliHBTRun;
78d7c6d3 29class AliAOD;
30class AliReader;
e92ecbdf 31class AliEventBuffer;
7b6503d6 32class AliEventCut;
e92ecbdf 33
27b3fe5d 34class AliHBTOnePairFctn;
35class AliHBTTwoPairFctn;
1b446896 36
5c58441a 37class AliHBTMonOneParticleFctn;
38class AliHBTMonTwoParticleFctn;
1b446896 39
40class TList;
41
78d7c6d3 42class AliHBTAnalysis: public AliAnalysis
1b446896 43 {
44 public:
45 AliHBTAnalysis();
81b7b887 46 AliHBTAnalysis(const AliHBTAnalysis& in);
34914285 47 AliHBTAnalysis& operator=(const AliHBTAnalysis& /*right*/);
1b446896 48 virtual ~AliHBTAnalysis();
49
78d7c6d3 50 Int_t Init();
5994509d 51 Int_t ProcessEvent(AliAOD* aodrec, AliAOD* aodsim = 0x0);
52 Int_t Finish();
78d7c6d3 53
5994509d 54 enum EProcessOption{kReconstructed,kSimulated,kSimulatedAndReconstructed};
55 void SetProcessOption(EProcessOption option){fProcessOption = option;}//Init must be called to make effect
090e46d6 56
5994509d 57 void Process(Option_t* option = "TracksAndParticles");//Stand alone HBT analysis
1b446896 58
5994509d 59 void SetGlobalPairCut(AliAODPairCut* cut);
1b446896 60
5994509d 61 void AddTrackFunction(AliHBTOnePairFctn* f);
62 void AddParticleFunction(AliHBTOnePairFctn* f);
63 void AddParticleAndTrackFunction(AliHBTTwoPairFctn* f);
1b446896 64
5994509d 65 void AddParticleMonitorFunction(AliHBTMonOneParticleFctn* f); //z.ch.
66 void AddTrackMonitorFunction(AliHBTMonOneParticleFctn* f); //z.ch.
67 void AddParticleAndTrackMonitorFunction(AliHBTMonTwoParticleFctn* f);//z.ch.
5c58441a 68
5994509d 69 void AddResolutionFunction(AliHBTTwoPairFctn* f){AddParticleAndTrackFunction(f);}
1b446896 70
5994509d 71 void SetReader(AliReader* r){fReader = r;}
1b446896 72
5994509d 73 void WriteFunctions();
74 void SetOutputFileName(const char* fname);
8fba7c63 75
5994509d 76 void SetBufferSize(Int_t buffsize){fBufferSize=buffsize;}
77 void SetOwner(Bool_t owner=kTRUE){fIsOwner=owner;}
81b7b887 78 Bool_t IsOwner() const {return fIsOwner;}
dc2c3f36 79 Bool_t IsNonIdentAnalysis();
e4f2b1da 80 void ResetFunctions();
44e5b87b 81 void SetDisplayInfo(Int_t howoften){fDisplayMixingInfo = howoften;}//defines every each line info about mixing is displayed
9616170a 82
5994509d 83 void SetApparentVertex(Double_t x, Double_t y, Double_t z);//Sets apparent vertex
1b446896 84
5994509d 85 static void PressAnyKey();//small utility function that helps to make comfortable macros
62e1b4fe 86
1b446896 87
5994509d 88 protected:
1b446896 89
e92ecbdf 90 /**********************************************/
91 /* E V E N T P R O C E S S I N G */
92 /**********************************************/
93 // NEW AOD schema
94 Int_t (AliHBTAnalysis::*fProcEvent)(AliAOD* aodrec, AliAOD* aodsim);//Pointer to the processing method
95
369ae7dd 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);
e92ecbdf 99
369ae7dd 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*/);
e92ecbdf 103
104
105 // OLD legacy schema
106
5994509d 107 void ProcessTracks();
108 void ProcessParticles();
109 void ProcessTracksAndParticles();
1b446896 110
5994509d 111 void ProcessTracksAndParticlesNonIdentAnal();
112 void ProcessParticlesNonIdentAnal();
113 void ProcessTracksNonIdentAnal();
81b7b887 114
5994509d 115 Bool_t RunCoherencyCheck();
116
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();
121
e92ecbdf 122
78d7c6d3 123 AliReader* fReader;//! Pointer to reader
1b446896 124
81b7b887 125 UInt_t fNTrackFunctions; //! Number of Tracks functions
126 UInt_t fNParticleFunctions; //! Number of particles functions
127 UInt_t fNParticleAndTrackFunctions; //! Number of resolution functions
128
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
132
27b3fe5d 133 AliHBTOnePairFctn** fTrackFunctions; //!array of pointers to functions that analyze rekonstructed tracks
134 AliHBTOnePairFctn** fParticleFunctions; //!array of pointers to functions that analyze generated particles
dc2c3f36 135 AliHBTTwoPairFctn** fParticleAndTrackFunctions; //!array of pointers to functions that analyze both
1b446896 136 //reconstructed tracks and generated particles
137 //i.e. - resolution analyzers
81b7b887 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.
5c58441a 141
5994509d 142 AliEventCut* fBkgEventCut;// We can narrow class of events used in
143
144 AliEventBuffer* fPartBuffer;//Sim Particles event buffer
145 AliEventBuffer* fTrackBuffer;//Rec Tracks event buffer
5c58441a 146
1b446896 147 /**********************************************/
5994509d 148 /* Control parameters */
81b7b887 149 /**********************************************/
1b446896 150
5994509d 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
154
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
e92ecbdf 158
5994509d 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
e92ecbdf 162
1b446896 163 private:
66d1d1a4 164
491d1b5d 165 static const UInt_t fgkFctnArraySize;//!
81b7b887 166 static const UInt_t fgkDefaultMixingInfo;//!
167 static const Int_t fgkDefaultBufferSize;//!
bfb09ece 168
1b446896 169 ClassDef(AliHBTAnalysis,0)
170 };
1b446896 171#endif