1 // This class is creatig TH2D histogramms for Nch - Nch , Nch - Pt , Pt - Pt
2 // dirtributions for given ETA windows and some supplementary data for Long Range Correlation (LRC) analysis .
3 // Class is designid to work with AliAnalysisTaskLRC
5 // Author : Andrey Ivanov , St.Peterburg State University
6 // Email: Andrey.Ivanov@cern.ch
8 /* See cxx source for full Copyright notice */
11 #ifndef ALILRCPROCESS_H
12 #define ALILRCPROCESS_H
18 #include "AliLRCBase.h"
19 #include "THnSparse.h"
26 //class TClonesArray;//TArrayF;
40 enum sparse_data_structure
59 en_sparse_Nf_plus_Nb_minus,
60 en_sparse_Nb_plus_Nf_minus,*/
69 en_arr_labels_NN_Nevents = 0,
72 en_arr_labels_NN_N2_f,
73 en_arr_labels_NN_Nf_Nb,
74 en_arr_labels_NN_N2_b,
76 en_arr_labels_PtN_Nevents,
78 en_arr_labels_PtN_PtB,
79 en_arr_labels_PtN_N2_f,
80 en_arr_labels_PtN_Ptb_Nf,
82 en_arr_labels_PtPt_Nevents,
83 en_arr_labels_PtPt_PtF,
84 en_arr_labels_PtPt_PtB,
85 en_arr_labels_PtPt_Pt2_f,
86 en_arr_labels_PtPt_Ptf_Ptb,
93 class AliLRCProcess: public AliLRCBase
99 AliLRCProcess(Double_t _StartForwardETA,Double_t _EndForwardETA,Double_t _StartBakwardETA,Double_t _EndBakwardETA ); // Constructor with window setup makes ready-to-run processor
101 Bool_t InitDataMembers(); //Is to be called in CreateOutputObjects method
104 virtual ~AliLRCProcess();
107 virtual void SetForwardWindow(Double_t StartETA,Double_t EndETA); //Sets Forward ETA window
108 virtual void SetBackwardWindow(Double_t StartETA,Double_t EndETA); // Sets Backward window
109 virtual void SetETAWindows(Double_t _StartForwardETA,Double_t _EndForwardETA,Double_t _StartBakwardETA,Double_t _EndBakwardETA); // Sets both forward and backward windows
110 virtual void SetForwardWindowPhi(Double_t StartForwardPhi,Double_t EndForwardPhi){fStartForwardPhi=StartForwardPhi;fEndForwardPhi=EndForwardPhi;}
111 virtual void SetBackwardWindowPhi(Double_t StartBackwardPhi,Double_t EndBackwardPhi){fStartBackwardPhi=StartBackwardPhi;fEndBackwardPhi=EndBackwardPhi;}
113 virtual void SetDoubleSidedBackwardWindowPhi( Bool_t isDoubleSided ) { fDoubleSidedBackwardPhiWindow = isDoubleSided; }// Number of phi division, for rotating sectors
115 virtual void SetEventCentrality(Double_t centrality){ fEventCentrality = centrality;}
116 virtual void SetEventPlane(Double_t ) {}
119 //virtual void SetNumberOfPhiSectors(Int_t nSectors){ fNumberOfSectors = nSectors; }//fNeedToRotateSector = kTRUE; }
122 virtual void SetHistPtRange(Double_t LoPt,Double_t HiPt,Int_t PtBins); // Sets range for Pt histos axis
123 virtual void SetHistPtRangeForwardWindowRebinFactor( Int_t ptHistXaxisRebinFactor );
124 virtual void SetHistMultRange(Int_t whichWindow, Int_t LoMult,Int_t HiMult,Int_t MultBins=0); // Sets range for Nch histos axis
125 virtual void SetHistMultRangeHor(Int_t LoMult,Int_t HiMult,Int_t MultBins=0); // Sets range for Nch histos axis
126 virtual void SetHistMultRangeVert(Int_t LoMult,Int_t HiMult,Int_t MultBins=0); // Sets range for Nch histos axis
127 virtual void SetOutputSlotNumber(Int_t SlotNumber); // Sets number of output slot for LRCProcessor
130 virtual void GetETAWindows(Double_t &_StartForwardETA,Double_t &_EndForwardETA,Double_t &_StartBakwardETA,Double_t &_EndBakwardETA);
131 virtual void GetPhiWindows(Double_t &_StartForwardPhi,Double_t &_EndForwardPhi,Double_t &_StartBakwardPhi,Double_t &_EndBakwardPhi);
132 virtual TList* CreateOutput() const ; // Creates output object
133 virtual TString GetShortDef() const ; // Returns fShortDef value
134 virtual Int_t GetOutputSlotNumber() const; // Returns number of output slot for LRCProcessor
136 // Track by track event import
137 virtual void StartEvent(); // Open new Event for track by track event import
138 virtual void AddTrackPtEta(Double_t Pt, Double_t Eta , Double_t Phi, Short_t Charge = 100, Int_t particleType = -1 ); // Imports track to the event
139 virtual void AddTrackForward(Double_t Pt, Double_t Eta , Double_t Phi, Short_t Charge, Int_t particleType ); // Imports track to the event directly to Forward window
140 virtual void AddTrackBackward(Double_t Pt, Double_t Eta , Double_t Phi, Short_t Charge, Int_t particleType ); // Imports track to the event directly to Backward window
141 virtual void AddTrackPtEtaMixing( Int_t winFB, Double_t Pt, Double_t Eta ,Double_t Phi, Short_t Charge, Int_t particleType = -1 );
142 virtual void FinishEvent(Bool_t kDontCount = kFALSE); // Close opened event
144 //virtual void SetPidToFill( ) { fWhichParticleToProcess = particleType; } // which particle type in this processor is considered
145 //virtual void SetPidFillCondition( LRCparticleType particleType, LRCpidFillCondition fillCond )
146 // { fPidFillCondition = fillCond;
147 // fWhichParticleToProcess = particleType; } // how to fill bckwd and fwd hists by pid
148 //virtual LRCparticleType GetPidToFill() { return fWhichParticleToProcess; }
149 //virtual void SetPidForward( LRCparticleType particleType );// { fPidForward = particleType; } // which pid for fwd
150 //virtual void SetPidBackward( LRCparticleType particleType );// { fPidBackward = particleType; } // which pid for fwd
151 virtual void SetParticleType( char* strForwardOrBackward, char* strPid );
152 virtual void Terminate() {} //was done for yield study
154 virtual void SetUseSparse( Bool_t flag ) { fUseSparse = flag; }
155 virtual void SetUseAccumulatingHist( Bool_t flag ) { fUseAccumulatingHist = flag; }
156 inline Bool_t IsPhiInRange( Double_t phi, Double_t phiBoundMin, Double_t phiBoundMax );
158 void SetCorrespondanceWithAliROOTpid();
159 void ZeroPidArrays();
164 virtual void SetShortDef(); // Sets fShortDef according to window paramiters
166 //Data Init and checks
167 //Bool_t StateCheck(); // Check if data is OK
168 Bool_t fIsEventOpend; // Indicates opened event
169 Bool_t fIsOnline; // Are data objects created
170 Bool_t fDisplayInitOnDemandWarning; // Switch warning when InitDataInDemand is called;
171 //Bool_t InitDataOnDemand(); // Create data objects
174 Bool_t fUseSparse; //flag to use THnSparse
175 Bool_t fUseAccumulatingHist; //flag to accumulate some values
178 Int_t fEventCount; //Number of processed events
180 // Windows paramiters -----------------------------------
182 Double_t fStartForwardETA; // Forward windos lover rapidity
183 Double_t fEndForwardETA; // Forward window higer rapidity
184 Double_t fStartForwardPhi; // Forward phi angle interval
185 Double_t fEndForwardPhi; // Forward phi angle interval
188 Double_t fStartBackwardETA; // Backward window lover rapidity
189 Double_t fEndBackwardETA; // Backward window higer rapidity
191 Double_t fStartBackwardPhi; // Backward window phi angle interval
192 Double_t fEndBackwardPhi; // Backward window phi angle interval
194 Bool_t fDoubleSidedBackwardPhiWindow; // Flag, if true - we look at phi sector and it's opposite one
197 Double_t fHiPt; // Max Pt for histos
198 Double_t fLoPt; // Min Pt for histos
199 Int_t fHiMultHor; // Min multiplicity for histos (horizontal)
200 Int_t fLowMultHor; // Max multiplicity for histos (horizontal)
202 Int_t fHiMultVert; // Min multiplicity for histos (vertical)
203 Int_t fLowMultVert; // Max multiplicity for histos (vertical)
206 Int_t fMultBinsHor; // N bins for multiplicity (horizontal)
207 Int_t fMultBinsVert; // N bins for multiplicity (vertical)
208 Int_t fPtBins; // N bins for Pt
209 Int_t fPtHistXaxisRebinFactor; // rebinning of Xaxis on PtN and PtPt histos
212 // Track by track import values
213 Double_t fSumPtFw; // Summary Pt forward
214 Double_t fSumPtBw; // Summary Pt backward
215 Double_t fSumPtBw2; // Summary Pt^2 backward
216 Int_t fNchFw; // Number of tracks Forward
217 //Int_t fNchFwPtPt; // Number of tracks Forward for PtPt accept conditions
218 Int_t fNchBw; // Number of tracks Backward
220 Int_t fNchFwPlus; // Number of plus charged tracks Forward
221 Int_t fNchBwPlus; // Number of plus charged tracks Backward
222 Int_t fNchFwMinus; // Number of minus charged tracks Forward
223 Int_t fNchBwMinus; // Number of minus charged tracks Backward
227 Int_t fCorrespondanceWithAliROOTpid[kSparsePIDtotal];
229 Double_t fSumPtFwPID[kSparsePIDtotal]; // Summary Pt forward
230 Double_t fSumPtBwPID[kSparsePIDtotal]; // Summary Pt backward
231 Double_t fSumEtFwPID[kSparsePIDtotal]; // Summary Pt forward
232 Double_t fSumEtBwPID[kSparsePIDtotal]; // Summary Pt backward
233 //Double_t fSumPtBw2; // Summary Pt^2 backward
234 Int_t fNchFwPID[kSparsePIDtotal]; // Number of tracks Forward
235 Int_t fNchBwPID[kSparsePIDtotal]; // Number of tracks Backward
237 Int_t fNchFwPlusPID[kSparsePIDtotal]; // Number of plus charged tracks Forward
238 Int_t fNchBwPlusPID[kSparsePIDtotal]; // Number of plus charged tracks Backward
239 Int_t fNchFwMinusPID[kSparsePIDtotal]; // Number of minus charged tracks Forward
240 Int_t fNchBwMinusPID[kSparsePIDtotal]; // Number of minus charged tracks Backward
244 TList* fOutList; //! List of output data
246 TString fShortDef; // Short desctiption
247 Int_t fOutputSlot; // Output slot number for this Processor
249 // Total spectras (debugging for TAG selection)
250 TH1F *fHistPt; //! Overal Pt spectrum
251 TH1F *fHistEta; //! Overal Eta spectrum
254 // Output histogramms -----------------------------------
255 THnSparseD *fHistClouds; //! all LRC Clouds
257 TH2D* fHistNN; //! N-N 2D Profile
258 TH2D* fHistPtN; //! Pt-N 2D Profile
259 TH2D* fHistPtPt; //! Pt-Pt 2D Profile
260 TProfile* fProfNberr; //! Nbackward error Profile PtN
261 TProfile* fProfNberrPtPt; //! Nbackward error Profile PtPt
262 TProfile* fProfdPtB; //! Used to store (in first bin) summary of PtB and its std diviation
263 TProfile* fProfTestLRC; //! Diognostic LRC Pt - N correlation
265 // Supp. info for windows
266 TH1D *fHistSparseDimensionLabeling; //correspondance of THnSparse enums to what we are filling in each dimension
267 TH1D *fHistSparsePIDblocksLabeling;
269 TH1D* fHistPtForward; //! Pt spectrum in Forward windows
270 TH1D* fHistEtaForward; //! Eta spectrum in Forward windows
271 TH1D* fHistNchForward; //! Nch spectrum in Forward windows
272 TH1D* fHistNchForwardPtPt; //! Nch spectrum in Forward windows for PtPt accept conditions
273 TH1D* fHistPhiForward; //! Phi spectrum in Forward windows
274 TH1D *fHistTracksChargeForward; //! Charge of accepted tracks in Forward windows
276 //net charge in Fwd window
277 TH1D *fHistPtPlusForward; //! pt distr for + in Fwd window
278 TH1D *fHistPtMinusForward; //! pt distr for - in Fwd window
279 TH1D *fHistNetChargeVsPtForward; //! Net charge vs pt of accepted tracks in Fwd window
283 TH1D* fHistPtBackward; //! Pt spectrum in Backward windows
284 TH1D* fHistEtaBackward; //! Eta spectrum in Backward windows
285 TH1D* fHistNchBackward; //! Nch spectrum in Backward windows
286 TH1D* fHistPhiBackward; //! Phi spectrum in Backward windows
287 TH1D *fHistTracksChargeBackward; //! Charge of accepted tracks in Backward windows
289 //net charge in Bckwd window
290 TH1D *fHistPtPlusBackward; //! pt distr for + in Bckwd window
291 TH1D *fHistPtMinusBackward; //! pt distr for - in Bckwd window
292 TH1D *fHistNetChargeVsPtBackward; //! Net charge vs pt of accepted tracks in Bckwd window
294 // TH1D *fHistChargePlusVsPtTmp; //! Net charge vs pt of accepted tracks +
295 // TH1D *fHistChargeMinusVsPtTmp; //! Net charge vs pt of accepted tracks -
296 // TH2D *fHist2DNetChargeVsPt; //! Net charge vs pt of accepted tracks 2D
297 // TH2D *fHist2DNetChargeVsPtCorrectedOnEventMean; //! Net charge vs pt of accepted tracks 2D shifted by mean
298 // TH2D *fHist2DNetChargeVsPtCorrectedOnEventMeanNormOnNch; //! Net charge vs pt of accepted tracks 2D norm on nCh
301 TH1D *fArrAccumulatedValues; //! accumulated values for observables
302 //TH1D *fHistArrayLabeling; //correspondance of THnSparse enums to what we are filling in each dimension
305 AliLRCProcess(const AliLRCProcess&); // not implemented
306 AliLRCProcess& operator=(const AliLRCProcess&); // not implemented
308 //Int_t fWhichParticleToFill; //! LRC processor sense only this type of particles
309 //Int_t fNumberOfSectors; //! Number of phi division, for rotating sectors
310 //Bool_t fNeedToRotateSector; //! Flag for rotating sectors
312 Double_t fEventCentrality; // for filling hist nF-centrality (for PbPb)
313 TH2D* fHistNfCentrality; //! Nf-Centrality plot
315 TH1D* fHistTestPIDForward; //! PID in Forward windows
316 TH1D* fHistTestPIDBackward; //! PID in Backward windows
318 TH2D* fHistDifferenceNf; //! nB-nF as func of nF
319 TH2D* fHistDifferenceNb; //! nF-nB as func of nB
321 int fPidForward; //! LRC processor sense only this type of particles (-1 by default)
322 int fPidBackward; //! LRC processor sense only this type of particles (-1 by default)
325 //LRCparticleType fWhichParticleToProcess; // ! LRC processor sense only this type of particles (-1 by default)
326 //LRCpidFillCondition fPidFillCondition;
328 ClassDef(AliLRCProcess, 3);