]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG/CaloTrackCorrBase/AliAnaCaloTrackCorrMaker.h
Add histogram counting events with tracks or EMCal clusters in different bunch crossings
[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 TH1I;
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   TList * GetListOfAnalysisContainers() { return fAnalysisContainer ; }
38   TList * GetListOfAnalysisCuts();
39   TList * GetOutputContainer() ;
40   
41   TList * FillAndGetAODBranchList();
42   
43   Int_t   GetAnaDebug()           const { return fAnaDebug    ; }
44   void    SetAnaDebug(Int_t d)          { fAnaDebug = d       ; }
45         
46   Bool_t  AreHistogramsMade()     const { return fMakeHisto   ; }
47   void    SwitchOnHistogramsMaker()     { fMakeHisto = kTRUE  ; }
48   void    SwitchOffHistogramsMaker()    { fMakeHisto = kFALSE ; }
49  
50   Bool_t  AreAODsMade()           const { return fMakeAOD     ; }
51   void    SwitchOnAODsMaker()           { fMakeAOD = kTRUE    ; }
52   void    SwitchOffAODsMaker()          { fMakeAOD = kFALSE   ; }
53         
54
55   AliCaloTrackReader  * GetReader()                                   { if(!fReader) fReader = new AliCaloTrackReader ();
56                                                                         return fReader    ; }
57   void                  SetReader(AliCaloTrackReader * reader)        { fReader = reader  ; }
58         
59   AliCalorimeterUtils * GetCaloUtils()                                { if(!fCaloUtils) fCaloUtils = new AliCalorimeterUtils(); 
60                                                                         return fCaloUtils      ; }
61   void                  SetCaloUtils(AliCalorimeterUtils * caloutils) { fCaloUtils = caloutils ; }
62         
63   void                  SetScaleFactor(Double_t scale)                { fScaleFactor = scale   ; } 
64
65   
66   // Main general methods
67   
68   void    Init();
69   
70   void    InitParameters();
71   
72   void    Print(const Option_t * opt) const;
73   
74   void    ProcessEvent(const Int_t iEntry, const char * currentFileName) ;
75   
76   void    Terminate(TList * outputList);
77
78   
79  private:
80   
81   //General Data members
82   
83   AliCaloTrackReader  *  fReader ;    //  Pointer to reader 
84   AliCalorimeterUtils *  fCaloUtils ; //  Pointer to CalorimeterUtils
85   
86   TList *  fOutputContainer ;   //! Output histograms container
87   TList *  fAnalysisContainer ; //  List with analysis pointers
88   Bool_t   fMakeHisto ;         //  If true makes final analysis with histograms as output
89   Bool_t   fMakeAOD ;           //  If true makes analysis generating AODs
90   Int_t    fAnaDebug;           //  Debugging info.
91   TList *  fCuts ;                  //! List with analysis cuts
92   Double_t fScaleFactor ;       //  Scaling factor needed for normalization
93
94   // Control histograms
95   TH1I *   fhNEvents;           //! Number of events counter histogram
96   TH1I *   fhNPileUpEvents;     //! N events pasing pile up cut
97   TH1F *   fhZVertex;           //! Vertex of accepted event
98   TH1I *   fhPileUpClusterMult; //! N clusters with high time
99   TH1I *   fhPileUpClusterMultAndSPDPileUp; //! N clusters with high time in events tagged as pile-up by SPD
100   TH2I *   fh2PileUpClusterMult; //! N clusters with high time vs N clusterd with small time
101   TH2I *   fh2PileUpClusterMultAndSPDPileUp; //! N clusters with high time vs N clusterd with small time in events tagged as pile-up by SPD
102   TH1I *   fhTrackMult;         //! Number of tracks per event histogram
103   TH1F *   fhCentrality;        //! Histogram with centrality bins
104   TH1F *   fhEventPlaneAngle;   //! Histogram with Event plane angle
105   TH1I *   fhNMergedFiles;      //! Number of files merged
106   TH1F *   fhScaleFactor;       //! Factor to scale histograms
107   TH1I *   fhEMCalBCEvent;      //! N events depending on the existance of a cluster in a given bunch crossing
108   TH1I *   fhEMCalBCEventCut;   //! N events depending on the existance of a cluster above acceptance and E cut in a given bunch crossing
109   TH1I *   fhTrackBCEvent;      //! N events depending on the existance of a track in a given bunch crossing
110   TH1I *   fhTrackBCEventCut;   //! N events depending on the existance of a track above acceptance and pt cut in a given bunch crossing
111
112   AliAnaCaloTrackCorrMaker & operator = (const AliAnaCaloTrackCorrMaker & ) ; // cpy assignment
113   
114   ClassDef(AliAnaCaloTrackCorrMaker,14)
115 } ;
116  
117
118 #endif //ALIANACALOTRACKCORRMAKER_H
119
120
121