AliPhysics  9b6b435 (9b6b435)
AliAnalysisTaskClusterQA.h
Go to the documentation of this file.
1 #ifndef AliAnalysisClusterQA_cxx
2 #define AliAnalysisClusterQA_cxx
3 
4 #include "AliAnalysisTaskSE.h"
6 #include "TH1.h"
7 #include "TH2.h"
8 #include "TTreeStream.h"
9 #include "AliLog.h"
10 #include <vector>
11 #include "AliV0ReaderV1.h"
12 #include "AliCaloPhotonCuts.h"
13 #include "AliConvEventCuts.h"
15 #include "AliConversionMesonCuts.h"
16 #include "TList.h"
17 #include "AliMCEvent.h"
18 #include "TClonesArray.h"
19 
20 
21 using namespace std;
22 
23 
25 
26  public:
27 
29  AliAnalysisTaskClusterQA(const char *name);
30  virtual ~AliAnalysisTaskClusterQA();
31 
32  virtual void UserCreateOutputObjects ();
33  virtual Bool_t Notify ();
34  virtual void UserExec ( Option_t *option );
35  virtual void Terminate ( Option_t * );
36 
37  void SetV0Reader ( AliV0ReaderV1 *v0Reader ) { fV0Reader=v0Reader ; }
38  void SetV0ReaderName(TString name){fV0ReaderName=name; return;}
39  void SetEventCuts ( AliConvEventCuts* conversionCuts,
40  Bool_t IsHeavyIon ) {
41  fEventCuts=conversionCuts ;
42  fIsHeavyIon = IsHeavyIon ;
43  }
44  void SetClusterCutsEMC ( AliCaloPhotonCuts* clusterCuts,
45  Bool_t IsHeavyIon ) {
46  fClusterCutsEMC=clusterCuts ;
47  fIsHeavyIon = IsHeavyIon ;
48  }
49  void SetClusterCutsDMC ( AliCaloPhotonCuts* clusterCuts,
50  Bool_t IsHeavyIon ) {
51  fClusterCutsDMC=clusterCuts ;
52  fIsHeavyIon = IsHeavyIon ;
53  }
55  Bool_t IsHeavyIon ) {
56  fMesonCuts=mesonCuts ;
57  fIsHeavyIon = IsHeavyIon ;
58  }
59 
60  void FillType ( Double_t fillTree,
61  Bool_t fillHistorams) {
62  ffillTree = fillTree ;
63  ffillHistograms = fillHistorams ;
64  }
65  void SetIsMC ( Bool_t isMC ) { fIsMC = isMC ; }
66  void SetDoAdditionalHistos ( Bool_t val ) { fSaveAdditionalHistos = val ; }
67  void SetSaveEventProperties ( Bool_t val ) { fSaveEventProperties = val ; }
68  void SetSaveClusterCells ( Bool_t val ) { fSaveCells = val ; }
69  void SetSaveSurroundingCells ( Bool_t val ) { fSaveSurroundingCells = val ; }
70  void SetSaveSurroundingTracks ( Bool_t val ) { fSaveTracks = val ; }
71  void SetMaxConeRadius ( Float_t val ) { fConeRadius = val ; }
72  void SetMinTrackPt ( Float_t val ) { fMinTrackPt = val ; }
73  void SetMinClusterEnergy ( Float_t val ) { fMinClusterEnergy = val ; }
74  void SetMinMaxNLMCut ( Int_t valmin, Int_t valmax ) { fMinNLMCut = valmin ;
75  fMaxNLMCut = valmax ; }
76  void SetSaveMCInformation ( Bool_t val ) { fSaveMCInformation = val ; }
77  // Function to set correction task setting
78  void SetCorrectionTaskSetting(TString setting) {fCorrTaskSetting = setting;}
79  Int_t FindLargestCellInCluster(AliVCluster* cluster, AliVEvent* event);
80  void GetRowAndColumnFromAbsCellID(Int_t cellIndex, Int_t& row, Int_t& column);
81  Int_t MakePhotonCandidates(AliVCluster* clus, AliVCaloCells* cells, Long_t indexCluster);
82  void ProcessTracksAndMatching(AliVCluster* clus, Long_t indexCluster);
83  Int_t GetMCClusterFlag(AliVCluster* clus, AliVCaloCells* cells);
84  Float_t GetCentrality(AliVEvent *event);
85  void ResetBuffer();
86  private:
87 
88  AliAnalysisTaskClusterQA ( const AliAnalysisTaskClusterQA& ); // Prevent copy-construction
89  AliAnalysisTaskClusterQA &operator=( const AliAnalysisTaskClusterQA& ); // Prevent assignment
90 
91  ULong64_t GetUniqueEventID ( AliVHeader *header);
92  void ProcessQATreeCluster ( AliVEvent *event, AliVCluster* cluster, Long_t indexCluster);
93  void ProcessQA ( AliAODConversionPhoton *gamma );
94  void RelabelAODPhotonCandidates ( Bool_t mode );
95  void ProcessTrueQAESD ( AliAODConversionPhoton *TruePhotonCandidate,
96  AliESDtrack *elec,
97  AliESDtrack *posi );
98  void ProcessTrueQAAOD ( AliAODConversionPhoton *TruePhotonCandidate,
99  AliAODTrack *elec,
100  AliAODTrack *posi );
101  Int_t ProcessTrueClusterCandidates(AliAODConversionPhoton *TrueClusterCandidate, Float_t m02,
102  AliAODConversionPhoton *TrueSubClusterCandidate1,
103  AliAODConversionPhoton *TrueSubClusterCandidate2);
104  Int_t ProcessTrueClusterCandidatesAOD(AliAODConversionPhoton *TrueClusterCandidate, Float_t m02,
105  AliAODConversionPhoton *TrueSubClusterCandidate1,
106  AliAODConversionPhoton *TrueSubClusterCandidate2);
107  UInt_t IsTruePhotonESD ( AliAODConversionPhoton *TruePhotonCandidate );
108  UInt_t IsTruePhotonAOD ( AliAODConversionPhoton *TruePhotonCandidate );
109  void CountTracks ();
110  void SetLogBinningXTH2 ( TH2* histoRebin );
111 
112  protected:
116  AliConversionPhotonCuts* fConversionCuts; // Cuts used by the V0Reader
117  AliConvEventCuts* fEventCuts; // Cuts used by the V0Reader
118  AliCaloPhotonCuts* fClusterCutsEMC; // Cuts used by the V0Reader
119  AliCaloPhotonCuts* fClusterCutsDMC; // Cuts used by the V0Reader
120  AliConversionMesonCuts* fMesonCuts; // Cuts used by the V0Reader
123  AliVEvent* fInputEvent; //
124  AliMCEvent* fMCEvent; //
125  Double_t fWeightJetJetMC; // weight for Jet-Jet MC
126  AliEMCALGeometry* fGeomEMCAL; // pointer to EMCAL geometry
134 
135  // Save flags
145 
146  // Option flags
147  std::vector<Float_t> fExtractionPercentages;
148  std::vector<Float_t> fExtractionPercentagePtBins;
149 
150  // Buffers that will be added to the tree
151  ULong64_t fBuffer_EventID;
164 
170 
175 
188 
191 
204 
205  ClassDef(AliAnalysisTaskClusterQA, 8);
206 };
207 
208 const Int_t kMaxActiveCells = 18000;
209 const Int_t kMaxNTracks = 4000;
210 
211 #endif
212 
Int_t fBuffer_Surrounding_NTracks
! array buffer
double Double_t
Definition: External.C:58
Float_t fBuffer_ClusterPhi
! array buffer
Definition: External.C:236
Float_t fBuffer_Event_Vertex_Y
! array buffer
void SetV0Reader(AliV0ReaderV1 *v0Reader)
Bool_t fSaveMCInformation
save MC information
void SetSaveSurroundingTracks(Bool_t val)
const Int_t kMaxNTracks
Float_t fBuffer_ClusterE
! array buffer
Float_t * fBuffer_Cells_RelativeEta
! array buffer
Bool_t fSaveEventProperties
save general event properties (centrality etc.)
Float_t fConeRadius
save arrays of all cells in event
void FillType(Double_t fillTree, Bool_t fillHistorams)
Int_t fBuffer_Mother_MC_Label
! array buffer
Float_t * fBuffer_Surrounding_Tracks_R
! array buffer
Float_t fBuffer_Event_Vertex_Z
! array buffer
void SetClusterCutsDMC(AliCaloPhotonCuts *clusterCuts, Bool_t IsHeavyIon)
Bool_t fBuffer_ClusterIsEMCAL
! array buffer
Float_t fBuffer_Event_Vertex_X
! array buffer
Int_t fBuffer_LeadingCell_ID
! array buffer
Float_t fBuffer_Event_Multiplicity
! array buffer
void SetMesonCuts(AliConversionMesonCuts *mesonCuts, Bool_t IsHeavyIon)
Int_t * fBuffer_Surrounding_Cells_ID
! array buffer
Float_t * fBuffer_Surrounding_Cells_E
! array buffer
Float_t fBuffer_LeadingCell_Phi
! array buffer
int Int_t
Definition: External.C:63
Float_t * fBuffer_Surrounding_Cells_R
! array buffer
Class handling all kinds of selection cuts for Gamma Calo analysis.
Float_t * fBuffer_Cells_RelativePhi
! array buffer
Float_t * fBuffer_Surrounding_Tracks_RelativeEta
! array buffer
unsigned int UInt_t
Definition: External.C:33
float Float_t
Definition: External.C:68
Float_t * fBuffer_Surrounding_Tracks_Pt
! array buffer
Int_t fBuffer_Cluster_MC_Label
! array buffer
std::vector< Float_t > fExtractionPercentages
Percentages which will be extracted for a given pT bin.
Bool_t fSaveSurroundingCells
save arrays of all cells in event
Class handling all kinds of selection cuts for Gamma Conversion analysis.
Float_t fBuffer_ClusterM20
! array buffer
void SetClusterCutsEMC(AliCaloPhotonCuts *clusterCuts, Bool_t IsHeavyIon)
Bool_t fSaveAdditionalHistos
save MC information
Float_t fMinClusterEnergy
save arrays of all cells in event
Int_t mode
Definition: anaM.C:41
Int_t * fBuffer_Cells_ID
! array buffer
Int_t fMaxNLMCut
save MC information
Float_t fBuffer_ClusterM02
! array buffer
void SetMinMaxNLMCut(Int_t valmin, Int_t valmax)
Int_t fBuffer_Event_NumActiveCells
! array buffer
Float_t fBuffer_ClusterEta
! array buffer
AliConversionPhotonCuts * fConversionCuts
Bool_t isMC
Bool_t fSaveCells
save arrays of cluster cells
Float_t * fBuffer_Surrounding_Tracks_P
! array buffer
ULong64_t fBuffer_EventID
! array buffer
Definition: External.C:220
Float_t * fBuffer_Surrounding_Cells_RelativePhi
! array buffer
Class handling all kinds of selection cuts for Gamma Conversion analysis.
Int_t fBuffer_ClusterNumCells
! array buffer
void SetEventCuts(AliConvEventCuts *conversionCuts, Bool_t IsHeavyIon)
Float_t fBuffer_LeadingCell_Eta
! array buffer
const Int_t kMaxActiveCells
void SetSaveSurroundingCells(Bool_t val)
Class handling all kinds of selection cuts for Gamma Conversion analysis.
Int_t fBuffer_MC_Cluster_Flag
! array buffer
Float_t * fBuffer_Surrounding_Cells_RelativeEta
! array buffer
AliConversionMesonCuts * fMesonCuts
Float_t fBuffer_LeadingCell_E
! array buffer
const char Option_t
Definition: External.C:48
bool Bool_t
Definition: External.C:53
Float_t * fBuffer_Surrounding_Tracks_RelativePhi
! array buffer
Float_t * fBuffer_Cells_E
! array buffer
Int_t fMinNLMCut
save MC information
void SetCorrectionTaskSetting(TString setting)
Int_t fBuffer_Surrounding_NCells
! array buffer
Bool_t fSaveTracks
save arrays of all cells in event
std::vector< Float_t > fExtractionPercentagePtBins
pT-bins associated with fExtractionPercentages
Float_t fMinTrackPt
save arrays of all cells in event