]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HBTAN/AliHBTAnalysis.h
PairCut stuff moved from AliHBTAnalysis to AliAnalysis
[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
18// more info: http://alisoft.cern.ch/people/skowron/analyzer/index.html
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();
51 Int_t ProcessEvent(AliAOD* aodrec, AliAOD* aodsim = 0x0);
52 Int_t Finish();
53
090e46d6 54 enum EProcessOption{kReconstructed,kSimulated,kSimulatedAndReconstructed};
55 void SetProcessOption(EProcessOption option){fProcessOption = option;}//Init must be called to make effect
56
57 virtual void Process(Option_t* option = "TracksAndParticles");//Stand alone HBT analysis
1b446896 58
78d7c6d3 59 void SetGlobalPairCut(AliAODPairCut* cut);
1b446896 60
5c58441a 61 void AddTrackFunction(AliHBTOnePairFctn* f);
62 void AddParticleFunction(AliHBTOnePairFctn* f);
63 void AddParticleAndTrackFunction(AliHBTTwoPairFctn* f);
1b446896 64
5c58441a 65 void AddParticleMonitorFunction(AliHBTMonOneParticleFctn* f); //z.ch.
66 void AddTrackMonitorFunction(AliHBTMonOneParticleFctn* f); //z.ch.
67 void AddParticleAndTrackMonitorFunction(AliHBTMonTwoParticleFctn* f);//z.ch.
68
27b3fe5d 69 void AddResolutionFunction(AliHBTTwoPairFctn* f){AddParticleAndTrackFunction(f);}
1b446896 70
78d7c6d3 71 void SetReader(AliReader* r){fReader = r;}
1b446896 72
491d1b5d 73 void WriteFunctions();
8fba7c63 74 void SetOutputFileName(const char* fname);
75
7a2c8238 76 void SetBufferSize(Int_t buffsize){fBufferSize=buffsize;}
81b7b887 77 void SetOwner(Bool_t owner=kTRUE){fIsOwner=owner;}
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
83 static void PressAnyKey();//small utility function that helps to make comfortable macros
1b446896 84 protected:
85
86 Bool_t RunCoherencyCheck();
87
78d7c6d3 88 void FilterOut(AliAOD* outpart1, AliAOD* outpart2, AliAOD* inpart,
89 AliAOD* outtrack1, AliAOD* outtrack2, AliAOD* intrack)const;
90 void FilterOut(AliAOD* out1, AliAOD* out2, AliAOD* in)const;
81b7b887 91 void DeleteFunctions();
1b446896 92
e92ecbdf 93
94 /**********************************************/
95 /* E V E N T P R O C E S S I N G */
96 /**********************************************/
97 // NEW AOD schema
98 Int_t (AliHBTAnalysis::*fProcEvent)(AliAOD* aodrec, AliAOD* aodsim);//Pointer to the processing method
99
100 virtual Int_t ProcessSim(AliAOD* /*aodrec*/, AliAOD* aodsim);
101 virtual Int_t ProcessRec(AliAOD* aodrec, AliAOD* /*aodsim*/);
102 virtual Int_t ProcessRecAndSim(AliAOD* aodrec, AliAOD* aodsim);
103
104 virtual Int_t ProcessRecAndSimNonId(AliAOD* aodrec, AliAOD* aodsim);
090e46d6 105 virtual Int_t ProcessSimNonId(AliAOD* /*aodrec*/, AliAOD* aodsim);
106 virtual Int_t ProcessRecNonId(AliAOD* aodrec, AliAOD* /*aodsim*/);
e92ecbdf 107
108
109 // OLD legacy schema
110
1b446896 111 virtual void ProcessTracks();
112 virtual void ProcessParticles();
113 virtual void ProcessTracksAndParticles();
114
dc2c3f36 115 virtual void ProcessTracksAndParticlesNonIdentAnal();
116 virtual void ProcessParticlesNonIdentAnal();
117 virtual void ProcessTracksNonIdentAnal();
81b7b887 118
e92ecbdf 119
78d7c6d3 120 AliReader* fReader;//! Pointer to reader
1b446896 121
81b7b887 122 UInt_t fNTrackFunctions; //! Number of Tracks functions
123 UInt_t fNParticleFunctions; //! Number of particles functions
124 UInt_t fNParticleAndTrackFunctions; //! Number of resolution functions
125
126 UInt_t fNTrackMonitorFunctions; //! Number of Track Monitor functions
127 UInt_t fNParticleMonitorFunctions; //! Number of Particles Monitor functions
128 UInt_t fNParticleAndTrackMonitorFunctions; //! Number of Resolution Monitor functions
129
27b3fe5d 130 AliHBTOnePairFctn** fTrackFunctions; //!array of pointers to functions that analyze rekonstructed tracks
131 AliHBTOnePairFctn** fParticleFunctions; //!array of pointers to functions that analyze generated particles
dc2c3f36 132 AliHBTTwoPairFctn** fParticleAndTrackFunctions; //!array of pointers to functions that analyze both
1b446896 133 //reconstructed tracks and generated particles
134 //i.e. - resolution analyzers
81b7b887 135 AliHBTMonOneParticleFctn** fParticleMonitorFunctions; //! array of pointers to monitoring functions
136 AliHBTMonOneParticleFctn** fTrackMonitorFunctions; //! which are used for single particle analysis,
137 AliHBTMonTwoParticleFctn** fParticleAndTrackMonitorFunctions; //! cut monitoring, etc.
5c58441a 138
5c58441a 139
1b446896 140 /**********************************************/
141 /* Control parameters */
81b7b887 142 /**********************************************/
1b446896 143
7b6503d6 144 AliEventCut* fBkgEventCut;// We can narrow class of events used in
1b446896 145
7b6503d6 146 Int_t fBufferSize; //defines the size of buffer for mixed events; -1==MIX All
81b7b887 147 Int_t fDisplayMixingInfo;//!defines every which particle mixing info is displayed
148 Bool_t fIsOwner;//!defines of all functions are supposed to be deleted while by the way of analysis defaulr false
e92ecbdf 149
150 AliEventBuffer* fPartBuffer;//Sim Particles event buffer
151 AliEventBuffer* fTrackBuffer;//Rec Tracks event buffer
152
090e46d6 153 EProcessOption fProcessOption;//Option that says waht analysis to do (Rec, Sim or SimAndRec)
e92ecbdf 154 Bool_t fNoCorrfctns;//Internal flag indicating that no cfs are set by the user (only monitor ones)
8fba7c63 155 TString* fOutputFileName;//Fiele name where to dump results, if not specified reults are written to gDirectory
e92ecbdf 156
1b446896 157 private:
e92ecbdf 158
66d1d1a4 159
491d1b5d 160 static const UInt_t fgkFctnArraySize;//!
81b7b887 161 static const UInt_t fgkDefaultMixingInfo;//!
162 static const Int_t fgkDefaultBufferSize;//!
bfb09ece 163
1b446896 164 ClassDef(AliHBTAnalysis,0)
165 };
66d1d1a4 166
66d1d1a4 167
1b446896 168#endif