]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG4/JCORRAN/AliJCORRANTask.h
add method to get centrality of the event for a given centrality class, use it in...
[u/mrichter/AliRoot.git] / PWG4 / JCORRAN / AliJCORRANTask.h
1 #ifndef ALIJCORRANTASK_H
2 #define ALIJCORRANTASK_H
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice     */
6 //______________________________________________________________________________
7 // Analysis task for high pt particle correlations 
8 // author: R.Diaz, J. Rak,  D.J. Kim
9 // ALICE Group University of Jyvaskyla 
10 // Finland 
11 //
12 // Fill the analysis containers for ESD or AOD
13 // Note: Adapted for AliAnalysisTaskSE
14 //////////////////////////////////////////////////////////////////////////////
15
16 #include <iostream>
17 #include <fstream>
18 #include <stdlib.h>
19 #include <stdio.h>
20 #include <iomanip>
21
22 //#include <TTree.h>
23 //#include <TList.h>
24 #include "AliAnalysisTaskSE.h"
25 //#include "AliAnalysisFilter.h"
26 //#include "AliMCEvent.h"
27
28 //#include "AliPhJTrackList.h"
29 //#include "AliPhJMCTrackList.h"
30 //#include "AliPhJPhotonList.h"
31 //#include "AliPhJHeaderList.h"
32
33 //#include "AliJRunHeader.h"
34 #include "JConst.h"
35
36 //==============================================================
37
38 using namespace std;
39
40 const int kMaxDimBuffer = 300;//max length of a line read to a buffe
41
42 class TH1D;
43 class TH2D;
44 class TNtuple;
45 class TList;
46 class TTree;
47 class TFormula;
48
49 class AliMCEvent; 
50 class AliESDEvent; 
51 class AliAODEvent; 
52 class AliAODTrack; 
53 class AliPHOSGeoUtils; 
54 class AliEMCALGeoUtils; 
55 class AliESDtrackCuts;
56
57 class AliJRunHeader;
58 class AliMCEvent;
59 class AliAnalysisFilter;
60 class AliPhJHeaderList;
61 class AliPhJPhotonList;
62 class AliPhJMCTrackList;
63 class AliPhJTrackList;               
64
65
66
67 class AliJCORRANTask : public AliAnalysisTaskSE {
68
69 public:
70   AliJCORRANTask();
71   AliJCORRANTask(const char *name, TString inputformat);
72   AliJCORRANTask(const AliJCORRANTask& ap);   
73   AliJCORRANTask& operator = (const AliJCORRANTask& ap);
74   virtual ~AliJCORRANTask();
75   
76   // methods to fill from AliAnalysisTaskSE
77   virtual void UserCreateOutputObjects(); 
78   virtual void Init();  
79   virtual void LocalInit() { Init(); }
80   virtual void UserExec(Option_t *option);
81   virtual void Terminate(Option_t * opt = "");
82   
83   void SetESDtrackCuts(AliESDtrackCuts* esdTrackCuts){ fEsdTrackCuts = esdTrackCuts;}
84   void SetDownScalingOfMB(Int_t downSc){ fDownscaling = downSc;} 
85   void SetLeadingPaticleMomCut(Double_t lowLPmom){ fLowerCutOnLPMom = lowLPmom;}
86   void SetLowerCutOnCaloClusterE(Double_t lowE){ fLowerCutOnCaloClusterE=lowE;}
87   void SetLowerCutOnLeadingCaloClusterE(Double_t lowCaloE){fLowerCutOnLeadingCaloClusterE=lowCaloE;} 
88   void SetRealOrMC(Bool_t realormc){fIsRealOrMC=realormc;} //flags whether the input 
89                                                          //are ESDs from real  exp or MonteCarlo 
90   void SetOutputAODName(const char* aodname){ fAODName=aodname;}
91
92   AliEMCALGeoUtils* GetEMCALGeoUtils (bool doDelete=kFALSE);
93
94 private:
95   // methods to read data from ESD
96   void ReadESDTracks(const AliESDEvent* esd);
97   void ReadESDCaloClusters(const AliESDEvent* esd);
98   void ReadESDHeader(const AliESDEvent* esd);
99   // methods to read data from AOD
100   void ReadAODTracks(const AliAODEvent* aod);
101   void ReadAODCaloClusters(const AliAODEvent* aod);
102   void ReadAODHeader(const AliAODEvent* aod);
103   void ReadFilter();
104   void ReadMCTracks(AliMCEvent* fMC);
105   Int_t GetSuperModuleNumber(bool isemcal, Int_t absId);
106
107  
108
109   UInt_t ConvertTriggerMask();//Converts alice trigger mask to JCorran trigger mask
110   //functions used for event selction:
111   bool StoreDownscaledMinBiasEvent(); 
112   bool ContainsESDHighPtTrack();
113   bool ContainsESDHighECaloClusters();
114   bool AcceptAODTrack(AliAODTrack* aodTrack);
115
116   // d a t a     m e m b e r s
117   TString fInputFormat; // specify the input data format (ESD or AOD)
118
119   AliESDtrackCuts* fEsdTrackCuts; //track selection cuts
120
121   Int_t fDownscaling; //downscaling of usual MB events
122
123   Double_t fLowerCutOnLPMom; // store all events where there is a particle with pT above this threshold
124
125   Double_t fLowerCutOnLeadingCaloClusterE;// store all events where there is a EMCAL clustre with E above this threshold
126   Double_t fLowerCutOnCaloClusterE;//store only clusters above this energy
127  
128   Bool_t  fIsRealOrMC; //flags if the input are real (0) ESDs or MonteCarlo ESDs (1)
129
130   TString fAODName; //output delta AOD name
131
132   TString fActiveTriggers[kRangeTriggerTableAlice];//alice table mapping trigger bit to trigger name
133
134   TString fTriggerTableJCorran[kRangeTriggerTableJCorran];//JCorran trigger table TBit 0 =MinBias
135  
136   TFormula *f1CutMaxDCAToVertexXYPtDep;  // pt-dep track-to-vertex cut in max absolute distance in xy-plane
137  
138   // jcorran output objects
139   AliPhJTrackList*    fTrackList;   // list of charged track objects
140   AliPhJMCTrackList*  fMCTrackList; // list of charged track objects
141   AliPhJPhotonList*   fPhotonList;  // list of photons objects
142   AliPhJHeaderList*   fHeaderList;  // event details
143   AliJRunHeader*      fAliRunHeader;//  run details (mg field, trigger mask,etc...)
144
145   AliPHOSGeoUtils  * fPHOSGeom; //phos geometry matrix 
146    
147   ClassDef(AliJCORRANTask, 2); 
148 };
149 #endif // AliJCORRANTask_H