29 #include "THnSparse.h" 32 #include "AliAnalysisTask.h" 33 #include "AliAnalysisManager.h" 34 #include "AliESDEvent.h" 35 #include "AliESDInputHandler.h" 36 #include "AliMCEventHandler.h" 37 #include "AliMCEvent.h" 38 #include "AliMCParticle.h" 39 #include "AliCentrality.h" 40 #include "AliESDVZERO.h" 41 #include "AliESDpid.h" 43 #include "AliVParticle.h" 44 #include "AliESDtrack.h" 45 #include "AliESDtrackCuts.h" 46 #include "AliKFVertex.h" 48 #include "AliGenCocktailEventHeader.h" 49 #include "AliAODMCParticle.h" 50 #include "AliAODMCHeader.h" 51 #include "AliEventplane.h" 53 #include "AliAODEvent.h" 54 #include "AliAODInputHandler.h" 55 #include "AliESDEvent.h" 56 #include "AliESDInputHandler.h" 57 #include "AliInputEventHandler.h" 68 fV0ReaderName("V0ReaderV1"),
74 fOutputContainer(NULL),
75 fClusterCandidates(NULL),
78 fClusterCutArray(NULL),
79 fCaloPhotonCuts(NULL),
80 fHistoClusGammaPt(NULL),
81 fHistoClusGammaE(NULL),
83 fHistoNEventsWOWeight(NULL),
84 fHistoNGoodESDTracks(NULL),
87 fHistoNGammaCandidates(NULL),
88 fHistoNGammaCandidatesBasic(NULL),
89 fHistoNGoodESDTracksVsNGammaCandidates(NULL),
90 fHistoSPDClusterTrackletBackground(NULL),
91 fHistoNV0Tracks(NULL),
92 fHistoNV0Trigger(NULL),
93 fHistoNV0TriggerTracks(NULL),
94 fProfileEtaShift(NULL),
95 fProfileJetJetXSection(NULL),
96 fHistoJetJetNTrials(NULL),
107 fEventPlaneAngle(-100),
112 fDoLightOutput(kFALSE),
116 fNCurrentClusterBasic(0)
125 fV0ReaderName(
"V0ReaderV1"),
126 fCorrTaskSetting(
""),
132 fClusterCandidates(NULL),
133 fEventCutArray(NULL),
135 fClusterCutArray(NULL),
136 fCaloPhotonCuts(NULL),
137 fHistoClusGammaPt(NULL),
138 fHistoClusGammaE(NULL),
140 fHistoNEventsWOWeight(NULL),
141 fHistoNGoodESDTracks(NULL),
144 fHistoNGammaCandidates(NULL),
145 fHistoNGammaCandidatesBasic(NULL),
146 fHistoNGoodESDTracksVsNGammaCandidates(NULL),
147 fHistoSPDClusterTrackletBackground(NULL),
148 fHistoNV0Tracks(NULL),
149 fHistoNV0Trigger(NULL),
150 fHistoNV0TriggerTracks(NULL),
151 fProfileEtaShift(NULL),
152 fProfileJetJetXSection(NULL),
153 fHistoJetJetNTrials(NULL),
155 fTreeTriggInfo(NULL),
164 fEventPlaneAngle(-100),
169 fDoLightOutput(kFALSE),
173 fNCurrentClusterBasic(0)
176 DefineOutput(1, TList::Class());
191 if(!
fV0Reader){printf(
"Error: No V0 Reader");
return;}
197 Int_t nBinsQAPt = 175;
199 Int_t nBinsClusterPt = 500;
205 for(
Int_t i=0; i<nBinsPt+1;i++){
206 arrPtBinning[i] = ((maxPt-minPt)/nBinsPt)*i;
208 for(
Int_t i=0; i<nBinsClusterPt+1;i++){
209 arrClusPtBinning[i] = ((maxClusterPt-minClusterPt)/nBinsClusterPt)*i;
211 for(
Int_t i=0; i<nBinsQAPt+1;i++){
212 if(i<60) arrQAPtBinning[i] = 0.05*i;
213 else if(i<130) arrQAPtBinning[i] = 3.+0.1*(i-60);
214 else if(i<170) arrQAPtBinning[i] = 10.+0.25*(i-130);
215 else if(i<175) arrQAPtBinning[i] = 20.+1.0*(i-170);
216 else arrQAPtBinning[i] = maxQAPt;
271 fCutFolder[iCut]->SetName(Form(
"Cut Number %s_%s", cutstringEvent.Data(), cutstringCalo.Data()));
275 fESDList[iCut]->SetName(Form(
"%s_%s ESD histograms", cutstringEvent.Data(), cutstringCalo.Data()));
279 fHistoNEvents[iCut] =
new TH1F(
"NEvents",
"NEvents", 14, -0.5, 13.5);
281 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(2,
"Centrality");
282 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(3,
"Miss. MC or inc. ev.");
284 TString TriggerNames =
"Not Trigger: ";
286 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(4,TriggerNames.Data());
291 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(6,
"Cont. Vertex");
292 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(7,
"SPD Pile-Up");
295 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(10,
"EMCAL problems");
296 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(11,
"rejectedForJetJetMC");
297 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(12,
"SPD hits vs tracklet");
298 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(13,
"Out-of-Bunch pileup Past-Future");
299 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(14,
"Pileup V0M-TPCout Tracks");
308 TString TriggerNames =
"Not Trigger: ";
343 fHistoCent[iCut] =
new TH1F(
"Centrality",
"Centrality; Centrality [%]", 100, 0, 100);
346 fHistoVertexZ[iCut] =
new TH1F(
"VertexZ",
"VertexZ", 200, -10, 10);
389 fHistoNV0Tracks[iCut] =
new TH1F(
"V0 Multiplicity",
"V0 Multiplicity", 40000, 0, 40000);
391 fHistoNV0Tracks[iCut] =
new TH1F(
"V0 Multiplicity",
"V0 Multiplicity", 2500, 0, 2500);
393 fHistoNV0Tracks[iCut] =
new TH1F(
"V0 Multiplicity",
"V0 Multiplicity", 1500, 0, 1500);
398 fHistoNV0Trigger[iCut] =
new TH1F(
"V0 Trigger",
"V0 Trigger", 40000, 0, 40000);
400 fHistoNV0Trigger[iCut] =
new TH1F(
"V0 Trigger",
"V0 Trigger", 2500, 0, 2500);
402 fHistoNV0Trigger[iCut] =
new TH1F(
"V0 Trigger",
"V0 Trigger", 1500, 0, 1500);
418 fProfileEtaShift[iCut] =
new TProfile(
"Eta Shift",
"Eta Shift", 1, -0.5, 0.5);
438 fHistoClusGammaPt[iCut] =
new TH1F(
"ClusGamma_Pt",
"ClusGamma_Pt", nBinsClusterPt, arrClusPtBinning);
441 fHistoClusGammaE[iCut] =
new TH1F(
"ClusGamma_E",
"ClusGamma_E", nBinsClusterPt, arrClusPtBinning);
452 fTreeList[iCut]->SetName(Form(
"%s_%s TriggerQA tree", cutstringEvent.Data(), cutstringCalo.Data()));
479 for(
Int_t iMatcherTask = 0; iMatcherTask < 3; iMatcherTask++){
518 printf(
" Gamma Conversion Task %s :: Eta Shift Manually Set to %f \n\n",
538 if(
fInputEvent->IsIncompleteDAQ()==kTRUE) eventQuality = 2;
539 if(eventQuality == 2 || eventQuality == 3){
549 AliEventplane *EventPlane =
fInputEvent->GetEventplane();
558 Bool_t isRunningEMCALrelAna = kFALSE;
567 if((xsection==-1.) || (ntrials==-1.)) AliFatal(Form(
"ERROR: GetXSectionAndNTrials returned invalid xsection/ntrials, periodName from V0Reader: '%s'",
fV0Reader->
GetPeriodName().Data()));
588 if(eventNotAccepted){
592 if (eventNotAccepted==3 &&
fIsMC>0){
599 if(eventQuality != 0){
605 if (triggered == kTRUE) {
661 if (triggered==kFALSE)
continue;
679 TClonesArray * arrClustersProcess = NULL;
685 if(!arrClustersProcess)
686 AliFatal(Form(
"%sClustersBranch was not found in AliAnalysisTaskGammaTriggerQA! Check the correction framework settings!",
fCorrTaskSetting.Data()));
687 nclus = arrClustersProcess->GetEntries();
690 if(nclus == 0)
return;
699 InputEvent()->GetPrimaryVertex()->GetXYZ(vertex);
702 for(Long_t i = 0; i < nclus; i++){
703 AliVCluster* clus = NULL;
705 if(arrClustersProcess)
706 clus =
new AliESDCaloCluster(*(AliESDCaloCluster*)arrClustersProcess->At(i));
708 clus =
new AliESDCaloCluster(*(AliESDCaloCluster*)
fInputEvent->GetCaloCluster(i));
709 }
else if(
fInputEvent->IsA()==AliAODEvent::Class()){
710 if(arrClustersProcess)
711 clus =
new AliAODCaloCluster(*(AliAODCaloCluster*)arrClustersProcess->At(i));
713 clus =
new AliAODCaloCluster(*(AliAODCaloCluster*)
fInputEvent->GetCaloCluster(i));
725 TLorentzVector clusterVector;
726 clus->GetMomentum(clusterVector,vertex);
728 TLorentzVector* tmpvec =
new TLorentzVector();
729 tmpvec->SetPxPyPzE(clusterVector.Px(),clusterVector.Py(),clusterVector.Pz(),clusterVector.E());
733 if(!PhotonCandidate){
delete clus;
delete tmpvec;
continue;}
TH1F ** fHistoNEventsWOWeight
array of histos with event information
TList ** fTreeList
array of histos with ntrials for jetjet
void SetCaloClusterRef(Long_t ref)
TH1F ** fHistoClusGammaPt
TH1F ** fHistoNV0Trigger
array of histos with V0 counts
TH1F ** fHistoJetJetNTrials
array of profiles with xsection for jetjet
Double_t fEventPlaneAngle
Int_t GetNumberOfPrimaryTracks()
TH1F ** fHistoVertexZ
array of histos with centrality slices
Int_t fNCurrentClusterBasic
TH1F ** fHistoCent
array of histos with number of good tracks (2010 Standard track cuts)
Class handling all kinds of selection cuts for Gamma Calo analysis.
TH1F ** fHistoNGoodESDTracks
array of histos with event information without event weights
TH1F ** fHistoNEvents
array of histos with cluster, E
virtual void UserCreateOutputObjects()
AliAnalysisTaskGammaTriggerQA()
TH2F ** fHistoNV0TriggerTracks
array of histos with V0 trigger
AliConversionPhotonCuts * GetConversionCuts()
TH1F ** fHistoClusGammaE
array of histos with cluster, pt
TH2F ** fHistoSPDClusterTrackletBackground
array of histos with number of good tracks vs gamma candidates
Class handling all kinds of selection cuts for Gamma Conversion analysis.
TProfile ** fProfileJetJetXSection
array of profiles with eta shift
void SetLeadingCellID(Int_t index)
TProfile ** fProfileEtaShift
array of histos with V0 trigger vs tracks
Bool_t Data(TH1F *h, Double_t *rangefit, Bool_t writefit, Double_t &sgn, Double_t &errsgn, Double_t &bkg, Double_t &errbkg, Double_t &sgnf, Double_t &errsgnf, Double_t &sigmafit, Int_t &status)
TList * GetCaloTrackMatcherHistograms()
Float_t fCent
Array of lists with tree.
TH1F ** fHistoNGammaCandidatesBasic
array of histos with number of gamma candidates per event
TH2F ** fHistoNGoodESDTracksVsNGammaCandidates
array of histos with number of gamma candidates per event for basic cluster cut
virtual void Terminate(const Option_t *)
Class handling all kinds of selection cuts for Gamma Conversion analysis.
AliConvEventCuts * GetEventCuts()
virtual ~AliAnalysisTaskGammaTriggerQA()
TList * fClusterCandidates
virtual void UserExec(Option_t *)
TH1F ** fHistoNV0Tracks
array of histos with SPD tracklets vs SPD clusters for background rejection
AliV0ReaderV1 * fV0Reader
TList * fEventCutArray
current list of cluster candidates
TH1F ** fHistoNGammaCandidates
array of histos with vertex z distribution for selected events