AliPhysics  master (3d17d9d)
AliAnalysisTaskClusterQA.h
Go to the documentation of this file.
1 #ifndef AliAnalysisClusterQA_cxx
2 #define AliAnalysisClusterQA_cxx
3 
4 #include "AliAnalysisTaskSE.h"
5 #include "AliConversionPhotonBase.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"
14 #include "AliConversionPhotonCuts.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 SetMesonCuts ( AliConversionMesonCuts* mesonCuts,
50  // Bool_t IsHeavyIon ) {
51  // fMesonCuts=mesonCuts ;
52  // fIsHeavyIon = IsHeavyIon ;
53  // }
54  void FillType ( Double_t fillTree,
55  Bool_t fillHistorams) {
56  ffillTree = fillTree ;
57  ffillHistograms = fillHistorams ;
58  }
59  void SetIsMC ( Int_t isMC ) { fIsMC = isMC ; }
60  void SetDoAdditionalHistos ( Bool_t val ) { fSaveAdditionalHistos = val ; }
61  void SetSaveEventProperties ( Bool_t val ) { fSaveEventProperties = val ; }
62  void SetSaveClusterCells ( Bool_t val ) { fSaveCells = val ; }
63  void SetSaveSurroundingCells ( Bool_t val ) { fSaveSurroundingCells = val ; }
64  void SetSaveSurroundingTracks ( Bool_t val ) { fSaveTracks = val ; }
65  void SetMaxConeRadius ( Float_t val ) { fConeRadius = val ; }
66  void SetMinTrackPt ( Float_t val ) { fMinTrackPt = val ; }
67  void SetMinClusterEnergy ( Float_t val ) { fMinClusterEnergy = val ; }
68  void SetMinMaxNLMCut ( Int_t valmin, Int_t valmax ) { fMinNLMCut = valmin ;
69  fMaxNLMCut = valmax ; }
70  void SetSaveMCInformation ( Bool_t val ) { fSaveMCInformation = val ; }
71  void SetEventwiseClusterOutput ( Bool_t val ) { fSaveEventsInVector = val ; }
72  // Function to set correction task setting
73  void SetCorrectionTaskSetting(TString setting) {fCorrTaskSetting = setting;}
74  Int_t FindLargestCellInCluster(AliVCluster* cluster, AliVEvent* event);
75  void GetRowAndColumnFromAbsCellID(Int_t cellIndex, Int_t& row, Int_t& column);
76  Int_t MakePhotonCandidates(AliVCluster* clus, AliVCaloCells* cells, Long_t indexCluster);
77  void ProcessTracksAndMatching(AliVCluster* clus, Long_t indexCluster);
78  Int_t GetMCClusterFlag(AliVCluster* clus, AliVCaloCells* cells);
79  Float_t GetCentrality(AliVEvent *event);
80  // Int_t GetNumberOfLocalMaxima(AliVCluster* cluster, AliVEvent * event);
81  // Int_t GetNumberOfLocalMaxima(AliVCluster* cluster, AliVEvent * event, Int_t *absCellIdList, Float_t* maxEList);
82  private:
83 
84  AliAnalysisTaskClusterQA ( const AliAnalysisTaskClusterQA& ); // Prevent copy-construction
85  AliAnalysisTaskClusterQA &operator=( const AliAnalysisTaskClusterQA& ); // Prevent assignment
86 
87  ULong64_t GetUniqueEventID ( AliVHeader *header);
88  void ProcessQATreeCluster ( AliVEvent *event, AliVCluster* cluster, Long_t indexCluster);
89  void ProcessQA ( AliAODConversionPhoton *gamma );
90  void RelabelAODPhotonCandidates ( Bool_t mode );
91  void ProcessTrueQAESD ( AliAODConversionPhoton *TruePhotonCandidate,
92  AliESDtrack *elec,
93  AliESDtrack *posi );
94  void ProcessTrueQAAOD ( AliAODConversionPhoton *TruePhotonCandidate,
95  AliAODTrack *elec,
96  AliAODTrack *posi );
97  Int_t ProcessTrueClusterCandidates(AliAODConversionPhoton *TrueClusterCandidate, AliVCluster* cluster,
98  AliAODConversionPhoton *TrueSubClusterCandidate1,
99  AliAODConversionPhoton *TrueSubClusterCandidate2);
100  Int_t ProcessTrueClusterCandidatesAOD(AliAODConversionPhoton *TrueClusterCandidate, AliVCluster* cluster,
101  AliAODConversionPhoton *TrueSubClusterCandidate1,
102  AliAODConversionPhoton *TrueSubClusterCandidate2);
103  UInt_t IsTruePhotonESD ( AliAODConversionPhoton *TruePhotonCandidate );
104  UInt_t IsTruePhotonAOD ( AliAODConversionPhoton *TruePhotonCandidate );
105  void CountTracks ();
106  void SetLogBinningXTH2 ( TH2* histoRebin );
107  void ResetBuffer();
108  void ResetBufferVectors();
109 
110  protected:
111  AliV0ReaderV1* fV0Reader; //
113  TClonesArray* fReaderGammas; // Array with conversion photons selected by V0Reader Cut
114  AliPIDResponse* fPIDResponse;
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  // AliConversionMesonCuts* fMesonCuts; // MesonCutObject
122  AliVEvent* fInputEvent; //
123  AliMCEvent* fMCEvent; //
124  Double_t fWeightJetJetMC; // weight for Jet-Jet MC
125  AliEMCALGeometry* fGeomEMCAL; // pointer to EMCAL geometry
133 
134  // 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
159  // Int_t fBuffer_ClusterNLM; //!<! array buffer
166 
172 
173  // Int_t* fBuffer_ClusterNLM_ID; //!<! array buffer
174  // Float_t* fBuffer_ClusterNLM_E; //!<! array buffer
179 
194 
201 
202 
203 
204  // vector buffers for storing eventwise information
205 
206  std::vector<Float_t> fVBuffer_Cluster_E;
207  std::vector<Float_t> fVBuffer_Cluster_Eta;
208  std::vector<Float_t> fVBuffer_Cluster_Phi;
209  std::vector<Bool_t> fVBuffer_Cluster_isEMCal;
210  std::vector<Int_t> fVTrueNeutralPionDaughterIndex;
211 
212 
213  ClassDef(AliAnalysisTaskClusterQA, 15);
214 };
215 
216 const Int_t kMaxActiveCells = 18000;
217 const Int_t kMaxNTracks = 4000;
218 
219 #endif
Int_t fBuffer_Surrounding_NTracks
! array buffer
Bool_t * fBuffer_Surrounding_Tracks_V0Flag
! array buffer
double Double_t
Definition: External.C:58
Float_t fBuffer_ClusterPhi
! array buffer
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
AliPIDResponse * fPIDResponse
PID response.
Bool_t fSaveEventProperties
save general event properties (centrality etc.)
std::vector< Float_t > fVBuffer_Cluster_Eta
! vector buffer
Float_t fConeRadius
save arrays of all cells in event
Int_t fBuffer_ClusterSupMod
! array buffer
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
Bool_t fBuffer_ClusterIsEMCAL
! array buffer
Float_t fBuffer_EventWeight
! array buffer
Float_t * fBuffer_Surrounding_Tracks_nSigdEdxE
! array buffer
Float_t fBuffer_Event_Vertex_X
! array buffer
Int_t fBuffer_LeadingCell_ID
! array buffer
std::vector< Float_t > fVBuffer_Cluster_E
! vector buffer
Float_t fBuffer_Event_Multiplicity
! array buffer
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
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
Float_t fBuffer_Cluster_MC_EFracFirstLabel
! 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.
Float_t fBuffer_Cluster_MC_EFracLeadingPi0
! array buffer
Bool_t fSaveSurroundingCells
save arrays of all cells in event
void SetEventwiseClusterOutput(Bool_t val)
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
std::vector< Bool_t > fVBuffer_Cluster_isEMCal
! vector buffer
Float_t fBuffer_Cluster_MC_LeadingPi0_E
! array buffer
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
std::vector< Int_t > fVTrueNeutralPionDaughterIndex
! vector buffer store the MC stack ID of mother pi0 for true information
Float_t fBuffer_Cluster_MC_LeadingPi0_Pt
! array buffer
Bool_t fSaveCells
save arrays of cluster cells
Float_t * fBuffer_Surrounding_Tracks_P
! array buffer
Definition: External.C:220
Float_t * fBuffer_Surrounding_Cells_RelativePhi
! array buffer
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)
Int_t fBuffer_MC_Cluster_Flag
! array buffer
Bool_t fSaveEventsInVector
save cluster information in event vectors information
Float_t * fBuffer_Surrounding_Cells_RelativeEta
! array buffer
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 > fVBuffer_Cluster_Phi
! vector buffer
std::vector< Float_t > fExtractionPercentagePtBins
pT-bins associated with fExtractionPercentages
Float_t fMinTrackPt
save arrays of all cells in event