]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG/CaloTrackCorrBase/AliAnaCaloTrackCorrMaker.h
simplify track pT retrieval
[u/mrichter/AliRoot.git] / PWG / CaloTrackCorrBase / AliAnaCaloTrackCorrMaker.h
1 #ifndef ALIANACALOTRACKCORRMAKER_H
2 #define ALIANACALOTRACKCORRMAKER_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice     */
5
6 //_____________________________________________________________________________
7 // Steering class for particle (gamma, hadron) identification and correlation 
8 // analysis. It is called by the task class AliAnalysisTaskCaloTrackCorrelation 
9 // and it connects the input (ESD/AOD/MonteCarlo) got with AliCaloTrackReader 
10 // (produces TClonesArrays of AODs (TParticles in MC case if requested)), with 
11 // the analysis classes that derive from AliAnaCaloTrackCorrBaseClass
12 //
13 // -- Author: Gustavo Conesa (INFN-LNF, LPSC-Grenoble)
14
15 // --- ROOT system ---
16 class TList; 
17 class TClonesArray;
18 #include<TObject.h>
19 class TH1F;
20
21 // --- Analysis system ---
22 #include "AliCaloTrackReader.h" 
23 #include "AliCalorimeterUtils.h"
24
25 class AliAnaCaloTrackCorrMaker : public TObject {
26
27  public: 
28   
29   AliAnaCaloTrackCorrMaker() ;          // default ctor
30   virtual ~AliAnaCaloTrackCorrMaker() ; // virtual dtor
31   AliAnaCaloTrackCorrMaker(const AliAnaCaloTrackCorrMaker & maker) ; // cpy ctor
32         
33   // Setters and Getters
34   
35   void    AddAnalysis(TObject* ana, Int_t n) ;
36
37   void    FillControlHistograms();
38   
39   void    FillTriggerControlHistograms();
40   
41   TList * GetListOfAnalysisContainers() { return fAnalysisContainer ; }
42   
43   TList * GetListOfAnalysisCuts();
44   
45   TList * GetOutputContainer() ;
46   
47   TList * FillAndGetAODBranchList();
48   
49   Int_t   GetAnaDebug()           const { return fAnaDebug    ; }
50   void    SetAnaDebug(Int_t d)          { fAnaDebug = d       ; }
51         
52   Bool_t  AreHistogramsMade()     const { return fMakeHisto   ; }
53   void    SwitchOnHistogramsMaker()     { fMakeHisto = kTRUE  ; }
54   void    SwitchOffHistogramsMaker()    { fMakeHisto = kFALSE ; }
55  
56   Bool_t  AreAODsMade()           const { return fMakeAOD     ; }
57   void    SwitchOnAODsMaker()           { fMakeAOD = kTRUE    ; }
58   void    SwitchOffAODsMaker()          { fMakeAOD = kFALSE   ; }
59         
60   void    SwitchOnDataControlHistograms()  { fFillDataControlHisto = kTRUE  ; }
61   void    SwitchOffDataControlHistograms() { fFillDataControlHisto = kFALSE ; }
62
63   
64   AliCaloTrackReader  * GetReader()                                   { if(!fReader) fReader = new AliCaloTrackReader ();
65                                                                         return fReader    ; }
66   void                  SetReader(AliCaloTrackReader * reader)        { fReader = reader  ; }
67         
68   AliCalorimeterUtils * GetCaloUtils()                                { if(!fCaloUtils) fCaloUtils = new AliCalorimeterUtils(); 
69                                                                         return fCaloUtils      ; }
70   void                  SetCaloUtils(AliCalorimeterUtils * caloutils) { fCaloUtils = caloutils ; }
71         
72   void                  SetScaleFactor(Double_t scale)                { fScaleFactor = scale   ; } 
73
74   
75   // Main general methods
76   
77   void    Init();
78   
79   void    InitParameters();
80   
81   void    Print(const Option_t * opt) const;
82   
83   void    ProcessEvent(Int_t iEntry, const char * currentFileName) ;
84   
85   void    Terminate(TList * outputList);
86   
87  private:
88   
89   //General Data members
90   
91   AliCaloTrackReader  *  fReader ;    //  Pointer to reader 
92   AliCalorimeterUtils *  fCaloUtils ; //  Pointer to CalorimeterUtils
93   
94   TList *  fOutputContainer ;   //! Output histograms container
95   TList *  fAnalysisContainer ; //  List with analysis pointers
96   Bool_t   fMakeHisto ;         //  If true makes final analysis with histograms as output
97   Bool_t   fMakeAOD ;           //  If true makes analysis generating AODs
98   Int_t    fAnaDebug;           //  Debugging info.
99   TList *  fCuts ;                  //! List with analysis cuts
100   Double_t fScaleFactor ;       //  Scaling factor needed for normalization
101   Bool_t   fFillDataControlHisto;//! Fill histograms only interesting with data
102   
103   // Control histograms
104   TH1F *   fhNEventsIn;         //! Number of input events counter histogram
105   TH1F *   fhNEvents;           //! Number of acepted events counter histogram
106   TH1F *   fhNExoticEvents;     //! Number of events triggered by exotic, counter histogram
107   TH1F *   fhNEventsNoTriggerFound; //! number of events where whaetever was done, no trigger is found
108   TH1F *   fhNPileUpEvents;     //! N events pasing pile up cut
109   TH1F *   fhNPileUpEventsTriggerBC0; //! N events pasing pile up cut
110   TH1F *   fhXVertex;           //! X Vertex distribution of accepted event
111   TH1F *   fhYVertex;           //! Y Vertex distribution of accepted event
112   TH1F *   fhZVertex;           //! Z Vertex distribution of accepted event
113   TH1F *   fhXVertexExotic;     //! X Vertex distribution of exotic event
114   TH1F *   fhYVertexExotic;     //! Y Vertex distribution of exotic event
115   TH1F *   fhZVertexExotic;     //! Z Vertex distribution of exotic event
116   
117   TH1F *   fhPileUpClusterMult; //! N clusters with high time
118   TH1F *   fhPileUpClusterMultAndSPDPileUp; //! N clusters with high time in events tagged as pile-up by SPD
119   TH1F *   fhTrackMult;         //! Number of tracks per event histogram
120   TH1F *   fhCentrality;        //! Histogram with centrality bins
121   TH1F *   fhEventPlaneAngle;   //! Histogram with Event plane angle
122   TH1F *   fhNMergedFiles;      //! Number of files merged
123   TH1F *   fhScaleFactor;       //! Factor to scale histograms
124   TH1F *   fhEMCalBCEvent;      //! N events depending on the existence of a cluster in a given bunch crossing
125   TH1F *   fhEMCalBCEventCut;   //! N events depending on the existence of a cluster above acceptance and E cut in a given bunch crossing
126   TH1F *   fhTrackBCEvent;      //! N events depending on the existence of a track in a given bunch crossing
127   TH1F *   fhTrackBCEventCut;   //! N events depending on the existence of a track above acceptance and pt cut in a given bunch crossing
128   TH1F *   fhPrimaryVertexBC;   //! Primary vertex BC
129   TH1F *   fhTimeStampFraction; //! event fraction depending on Time Stamp, only if activated on reader
130   TH1F *   fhNPileUpVertSPD;    //! number of pile-up vertices from SPD
131   TH1F *   fhNPileUpVertTracks; //! number of pile-up vertices from tracks
132   
133   TH1F *   fhClusterTriggerBC;                       //! number of events triggered, depending on BC of the cluster
134   TH1F *   fhClusterTriggerBCExotic;                 //! number of events triggered, depending on BC of the cluster
135   TH1F *   fhClusterTriggerBCBadCell;                //! number of events triggered, depending on BC of the cluster
136   TH1F *   fhClusterTriggerBCBadCellExotic;          //! number of events triggered, depending on BC of the cluster
137   TH1F *   fhClusterTriggerBCBadCluster;             //! number of events triggered, depending on BC of the cluster
138   TH1F *   fhClusterTriggerBCBadClusterExotic;       //! number of events triggered, depending on BC of the cluster
139   
140   TH1F *   fhClusterTriggerBCUnMatch;                //! number of events triggered, depending on BC of the cluster
141   TH1F *   fhClusterTriggerBCExoticUnMatch;          //! number of events triggered, depending on BC of the cluster
142   TH1F *   fhClusterTriggerBCBadCellUnMatch;         //! number of events triggered, depending on BC of the cluster
143   TH1F *   fhClusterTriggerBCBadCellExoticUnMatch;   //! number of events triggered, depending on BC of the cluster
144   TH1F *   fhClusterTriggerBCBadClusterUnMatch;      //! number of events triggered, depending on BC of the cluster
145   TH1F *   fhClusterTriggerBCBadClusterExoticUnMatch;//! number of events triggered, depending on BC of the cluster
146
147   TH1F *   fhClusterTriggerBCUnMatchReMatch[3];       //! number of events triggered, depending on BC of the cluster, not matched, open cuts and rematch
148   TH1F *   fhClusterTriggerBCExoticUnMatchReMatch[3]; //! number of events triggered by exotic, depending on BC of the clusterm not matched, open cuts and rematch
149
150   
151   TH2F *   fhClusterTriggerBCEventBC;                // correlate the found BC in the trigger and the event BC
152   TH2F *   fhClusterTriggerBCEventBCUnMatch;         // correlate the found BC in the trigger and the event BC, when there was no match with the trigger BC
153   TH2F *   fhClusterTriggerBCExoticEventBC;          // correlate the found BC in the exotic trigger and the event BC
154   TH2F *   fhClusterTriggerBCExoticEventBCUnMatch;   // correlate the found BC in the exotic trigger and the event BC, when there was no match with the trigger BC
155   
156   AliAnaCaloTrackCorrMaker & operator = (const AliAnaCaloTrackCorrMaker & ) ; // cpy assignment
157   
158   ClassDef(AliAnaCaloTrackCorrMaker,22)
159 } ;
160  
161
162 #endif //ALIANACALOTRACKCORRMAKER_H
163
164
165