]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG4/JCORRAN/AliJCORRANTask.h
Fixed compiler warnings (Jason)
[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, F.Krizek
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 #include "AliAODTrack.h"
28
29 #include "AliPhJTrackList.h"
30 #include "AliPhJMCTrackList.h"
31 #include "AliPhJPhotonList.h"
32 #include "AliPhJHeaderList.h"
33 #include "AliJCORRANSetup.h"
34
35 #include "AliJRunHeader.h"
36 #include "JConst.h"
37
38 //==============================================================
39
40 using namespace std;
41
42 class TH1D;
43 class TH2D;
44 class TNtuple;
45 class TList;
46 class TTree;
47
48 class AliMCEvent; 
49 class AliESDEvent; 
50 class AliAODEvent; 
51 class AliPHOSGeoUtils; 
52 class AliEMCALGeoUtils; 
53 class AliESDtrackCuts;
54
55 class AliJRunHeader;
56 class AliMCEvent;
57 class AliJCORRANSetup;
58 class AliAnalysisFilter;
59 class AliPhJHeaderList;
60 class AliPhJPhotonList;
61 class AliPhJMCTrackList;
62 class AliPhJTrackList;               
63
64
65
66 class AliJCORRANTask : public AliAnalysisTaskSE {
67
68 public:
69   AliJCORRANTask();
70   AliJCORRANTask(const char *name, TString inputformat);
71   AliJCORRANTask(const AliJCORRANTask& ap);   
72   AliJCORRANTask& operator = (const AliJCORRANTask& ap);
73   virtual ~AliJCORRANTask();
74   
75   // methods to fill from AliAnalysisTaskSE
76   virtual void UserCreateOutputObjects(); 
77   virtual void Init();  
78   virtual void LocalInit() { Init(); }
79   virtual void UserExec(Option_t *option);
80   virtual void Terminate(Option_t * opt = "");
81   
82   // methods to read data from ESD
83   void ReadESDTracks(const AliESDEvent* esd);
84   void ReadESDCaloClusters(const AliESDEvent* esd);
85   void ReadESDHeader(const AliESDEvent* esd);
86   // methods to read data from AOD
87   void ReadAODTracks(const AliAODEvent* aod);
88   void ReadAODCaloClusters(const AliAODEvent* aod);
89   void ReadAODHeader(const AliAODEvent* aod);
90   void ReadFilter();
91   void ReadMCTracks(AliMCEvent* fMC);
92   Int_t GetSuperModuleNumber(bool isemcal, Int_t absId);
93
94
95   //Setters to be used in AddAliJCORRANTask
96   void SetAliESDtrackCuts(AliESDtrackCuts* cuts){ fEsdTrackCuts=cuts;} 
97   void SetDownscaling(Int_t ds){ fDownscaling=ds;} 
98   void SetLowerCutOnLPMom(Double_t lcut){ fLowerCutOnLPMom=lcut;} 
99   void SetLowerCutOnLeadingCaloClusterE(Double_t lowE){ fLowerCutOnLeadingCaloClusterE=lowE;} //
100   void SetLowerCutOnCaloClusterE(Double_t lowE){ fLowerCutOnCaloClusterE=lowE;} //
101   void SetRealOrMC(Bool_t realormc){fIsRealOrMC=realormc;} //flags whether the input 
102                                                          //are ESDs from real  exp or MonteCarlo 
103   void SetOutputAODName(const char* aodname){ fAODName=aodname;}
104
105 private:
106
107   UInt_t ConvertTriggerMask(/*Long64_t alicetriggermask*/);//Converts alice trigger mask to JCorran trigger mask
108
109
110   bool IsSelectedAODTrack(AliAODTrack   *track); //check if the track fulfils quality cuts on AOD tracks
111
112   bool StoreDownscaledMinBiasEvent(); //functions for offline event selection 
113   bool ContainsESDHighPtTrack();
114   bool ContainsESDHighECaloClusters();
115
116
117   TString fInputFormat; // specify the input data format (ESD or AOD)
118
119   //To be set in from AddAliJCORRANTask macro  
120   AliESDtrackCuts* fEsdTrackCuts;     //standard track quality cuts
121   Int_t    fDownscaling;              // downscaling
122   Double_t fLowerCutOnLPMom;          // lower cut on leading particle momentum
123   Double_t fLowerCutOnLeadingCaloClusterE; // lower cut on leading calo cluster energy
124   Double_t fLowerCutOnCaloClusterE;   //minimal E of cluster to be stored
125   Bool_t   fIsRealOrMC;               //flags if the input are real (0) ESDs or MonteCarlo ESDs (1)
126   TString fAODName; //output name
127   
128   TString fActiveTriggers[kRangeTriggerTableAlice];//alice table mapping trigg. bit to trigg. name
129   TString fTriggerTableJCorran[kRangeTriggerTableJCorran];//JCorran trigger table TBit 0 =MinBias
130  
131  
132   //output objects
133   AliPhJTrackList*   fTrackList;    //list of charged track objects
134   AliPhJMCTrackList* fMCTrackList;  //list of charged track objects
135   AliPhJPhotonList*  fPhotonList;   //list of photons objects
136   AliPhJHeaderList*  fHeaderList;   //event details
137
138   AliJRunHeader*     fAliRunHeader; // run details
139  
140   AliPHOSGeoUtils  * fPHOSGeom;  //! phos geometry matrix 
141   AliEMCALGeoUtils * fEMCALGeom; //! emcal geometry matrix
142    
143   ClassDef(AliJCORRANTask, 2) // JCORRAN analysis task 
144 };
145 #endif // AliJCORRANTask_H