AliPhysics  608b256 (608b256)
AliAnalysisTaskEA.cxx
Go to the documentation of this file.
1 #ifndef ALIANALYSISTASKSE_H
2 
3 #include <Riostream.h>
4 #include <TROOT.h>
5 #include <TFile.h>
6 #include <TChain.h>
7 #include <TTree.h>
8 #include <TKey.h>
9 #include <TProfile.h>
10 #include <TProfile2D.h>
11 #include <TH1.h>
12 #include <TH1F.h>
13 #include <TF1.h>
14 #include <TH2F.h>
15 #include <TH1D.h>
16 #include <TH1I.h>
17 #include <TArrayF.h>
18 #include <TArrayD.h>
19 #include <THnSparse.h>
20 #include <TCanvas.h>
21 #include <TList.h>
22 #include <TClonesArray.h>
23 #include <TObject.h>
24 #include <TMath.h>
25 #include <TSystem.h>
26 #include <TInterpreter.h>
27 #include "AliAnalysisTask.h"
28 #include "AliCentrality.h"
29 #include "AliStack.h"
30 #include "AliESDEvent.h"
31 #include "AliESDInputHandler.h"
32 #include "AliAODEvent.h"
33 #include "AliAODHandler.h"
34 #include "AliAnalysisManager.h"
35 #include "AliAnalysisTaskSE.h"
37 #include "AliParticleContainer.h"
38 #include "AliInputEventHandler.h"
39 #include "AliEMCALGeometry.h"
40 #include "AliEMCALGeoParams.h"
41 #endif
42 
43 #include <time.h>
44 #include <TRandom3.h>
45 #include "AliGenEventHeader.h"
46 #include "AliGenPythiaEventHeader.h"
47 #include "AliGenHijingEventHeader.h"
48 #include "AliAODMCHeader.h"
49 #include "AliMCEvent.h"
50 #include "AliLog.h"
51 #include <AliEmcalJet.h>
52 #include <AliPicoTrack.h>
53 #include "AliVEventHandler.h"
54 #include "AliVParticle.h"
55 #include "AliAODMCParticle.h"
56 #include "AliAnalysisUtils.h"
57 #include "AliRhoParameter.h"
58 #include "TVector3.h"
59 #include "AliVVertex.h"
60 #include "AliExternalTrackParam.h"
61 
62 #include <stdio.h>
63 #include <stdlib.h>
64 #include <vector>
65 
66 #include "AliGenDPMjetEventHeader.h"
67 #include "AliJetContainer.h"
68 #include "AliAnalysisTaskEmcal.h"
70 #include "AliAnalysisTaskEA.h"
71 #include "AliHeader.h"
72 #include "AliRunLoader.h"
73 #include "AliVVZERO.h"
74 #include "AliAODZDC.h"
75 #include "AliVZDC.h"
76 #include "AliMultSelection.h"
77 
78 using namespace std;
79 
80 // ANALYSIS OF HIGH PT HADRON TRIGGER ASSOCIATED SPECTRUM OF RECOIL JETS IN P+PB
81 // Author Filip Krizek (7.Oct. 2015)
82 
83 ClassImp(AliAnalysisTaskEA)
84 //________________________________________________________________________________________
85 
88 fUseDefaultVertexCut(1),
89 fUsePileUpCut(1),
90 fMyTrackContainerName(""),
91 fMyParticleContainerName(""),
92 fMyJetContainerName(""),
93 fMyJetParticleContainerName(""),
94 fMyClusterContainerName(""),
95 fTrkContainerDetLevel(0x0),
96 fParticleContainerPartLevel(0x0),
97 fJetContainerDetLevel(0x0),
98 fJetContainerPartLevel(0x0),
99 fClusterContainerDetLevel(0x0),
100 fRhoTaskName(""),
101 fRhoTaskNameMC(""),
102 fCentralityTree(0x0),
103 fMultSelection(0x0),
104 fIsMinBiasTrig(1),
105 fIsEmcalTrig(0),
106 fCentralityV0A(-1),
107 fCentralityV0C(-1),
108 fCentralityCL1(-1),
109 fCentralityZNA(-1),
110 fCentralityZNC(-1),
111 fxVertex(-1),
112 fyVertex(-1),
113 fzVertex(-1),
114 fVertexer3d(1),
115 fNTracklets(-1),
116 fIsV0ATriggered(0),
117 fIsV0CTriggered(0),
118 fMultV0A(0.),
119 fMultV0C(0.),
120 fMultV0Anorm(0.),
121 fMultV0Cnorm(0.),
122 fMultV0AV0Cnorm(0.),
123 fZEM1Energy(0),
124 fZEM2Energy(0),
125 fTrackEtaWindow(0.9),
126 fMinTrackPt(0.150),
127 fMC(0),
128 fHelperClass(0), fInitializedLocal(0),
129 fHistEvtSelection(0x0),
130 fhVertexZ(0x0),
131 fhTrackPhiIncl(0x0), fhTrackEtaIncl(0x0),
132 fhJetPhiIncl(0x0), fhJetEtaIncl(0x0),
133 fhClusterPhiInclMB(0x0), fhClusterEtaInclMB(0x0),
134 fhClusterPhiInclGA(0x0), fhClusterEtaInclGA(0x0),
135 fhRhoIncl(0x0),
136 fhNormSumV0AV0CMB(0x0),
137 fhV0AvsV0C(0x0),
138 fhV0AvsSPD(0x0),
139 fhV0CvsSPD(0x0),
140 fZVertexCut(10.0),
141 fnHadronTTBins(0),
142 fnJetChTTBins(0),
143 fnClusterTTBins(0),
144 fFillTTree(0),
145 fSystem(AliAnalysisTaskEA::kpPb),
146 fFiducialCellCut(0x0),
147 fMeanV0A(1.),
148 fMeanV0C(1.)
149 {
150  //default constructor
151 
152  for(Int_t i=0; i<2; i++) fNClusters[i] = 0;
153  for(Int_t i=0; i<8; i++) fRingMultV0[i] = 0;
154 
155  for(Int_t i=0; i<5; i++){
156  fZNCtower[i] = 0;
157  fZPCtower[i] = 0;
158  fZNAtower[i] = 0;
159  fZPAtower[i] = 0;
160  fZNCtowerLG[i] = 0;
161  fZPCtowerLG[i] = 0;
162  fZNAtowerLG[i] = 0;
163  fZPAtowerLG[i] = 0;
164  }
165 
166  for(Int_t i=0; i<fkTTbins; i++){
167  fHadronTT[i] = 0;
168  fJetChTT[i] = 0;
169  fClusterTT[i] = 0;
170 
171  fhMultTTHinMB[i] = 0x0;
172  fhMultTTJinMB[i] = 0x0;
173  fhMultTTCinMB[i] = 0x0;
174  fhMultTTCinGA[i] = 0x0;
175  }
176 
177  for(Int_t i=0; i<fkTTbins;i++){
178  fHadronTTLowPt[i]=-1;
179  fHadronTTHighPt[i]=-1;
180  fJetChTTLowPt[i]=-1;
181  fJetChTTHighPt[i]=-1;
182  fClusterTTLowPt[i]=-1;
183  fClusterTTHighPt[i]=-1;
184 
185  fhV0AvsV0CTTH[i] = 0x0;
186  fhV0AvsV0CTTJ[i] = 0x0;
187  fhV0AvsV0CTTCinMB[i] = 0x0;
188  fhV0AvsV0CTTCinGA[i] = 0x0;
189  }
190 
191  for(Int_t iv=0; iv<fkVtx;iv++){
192  fhVertex[iv]=0x0;
193  for(Int_t i=0; i<fkTTbins;i++){
194  fhVertexTTH[iv][i]=0x0;
195  }
196  }
197 
198  for(Int_t ic=0; ic<fkCE;ic++){
199  fhCentralityMB[ic] = 0x0;
200  fhSignalMB[ic] = 0x0;
201 
202  for(Int_t i=0; i<fkTTbins;i++){
203  fhCentralityTTH[ic][i] = 0x0;
204  fhCentralityTTJ[ic][i] = 0x0;
205  fhCentralityTTCinMB[ic][i] = 0x0;
206  fhCentralityTTCinGA[ic][i] = 0x0;
207 
208  fhSignalTTH[ic][i] = 0x0;
209  fhSignalTTJ[ic][i] = 0x0;
210  fhSignalTTCinMB[ic][i] = 0x0;
211  fhSignalTTCinGA[ic][i] = 0x0;
212  }
213  }
214 
215  for(Int_t i=0; i<fkTTbins; i++){
216  fhNormSumV0AV0CTTH[i] = 0x0;
217  fhNormSumV0AV0CTTJ[i] = 0x0;
218  fhNormSumV0AV0CTTCinMB[i] = 0x0;
219  fhNormSumV0AV0CTTCinGA[i] = 0x0;
220  }
221 
222  fFiducialCellCut = new AliEMCALRecoUtils();
223 
224  sprintf(fTrigClass,"%s","");
225 }
226 
227 //________________________________________________________________________
229 AliAnalysisTaskEmcalJet(name,kTRUE),
230 fUseDefaultVertexCut(1),
231 fUsePileUpCut(1),
232 fMyTrackContainerName(""),
233 fMyParticleContainerName(""),
234 fMyJetContainerName(""),
235 fMyJetParticleContainerName(""),
236 fMyClusterContainerName(""),
237 fTrkContainerDetLevel(0x0),
238 fParticleContainerPartLevel(0x0),
239 fJetContainerDetLevel(0x0),
240 fJetContainerPartLevel(0x0),
241 fClusterContainerDetLevel(0x0),
242 fRhoTaskName(""),
243 fRhoTaskNameMC(""),
244 fCentralityTree(0x0),
245 fMultSelection(0x0),
246 fIsMinBiasTrig(1),
247 fIsEmcalTrig(0),
248 fCentralityV0A(-1),
249 fCentralityV0C(-1),
250 fCentralityCL1(-1),
251 fCentralityZNA(-1),
252 fCentralityZNC(-1),
253 fxVertex(-1),
254 fyVertex(-1),
255 fzVertex(-1),
256 fVertexer3d(1),
257 fNTracklets(-1),
258 fIsV0ATriggered(0),
259 fIsV0CTriggered(0),
260 fMultV0A(0.),
261 fMultV0C(0.),
262 fMultV0Anorm(0.),
263 fMultV0Cnorm(0.),
264 fMultV0AV0Cnorm(0.),
265 fZEM1Energy(0),
266 fZEM2Energy(0),
267 fTrackEtaWindow(0.9),
268 fMinTrackPt(0.150),
269 fMC(0),
270 fHelperClass(0), fInitializedLocal(0),
271 fHistEvtSelection(0x0),
272 fhVertexZ(0x0),
273 fhTrackPhiIncl(0x0), fhTrackEtaIncl(0x0),
274 fhJetPhiIncl(0x0), fhJetEtaIncl(0x0),
275 fhClusterPhiInclMB(0x0), fhClusterEtaInclMB(0x0),
276 fhClusterPhiInclGA(0x0), fhClusterEtaInclGA(0x0),
277 fhRhoIncl(0x0),
278 fhNormSumV0AV0CMB(0x0),
279 fhV0AvsV0C(0x0),
280 fhV0AvsSPD(0x0),
281 fhV0CvsSPD(0x0),
282 fZVertexCut(10.0),
283 fnHadronTTBins(0),
284 fnJetChTTBins(0),
285 fnClusterTTBins(0),
286 fFillTTree(0),
287 fSystem(AliAnalysisTaskEA::kpPb),
288 fFiducialCellCut(0x0),
289 fMeanV0A(1.),
290 fMeanV0C(1.)
291 {
292  //Constructor
293 
294  for(Int_t i=0; i<2; i++) fNClusters[i] = 0;
295  for(Int_t i=0; i<8; i++) fRingMultV0[i] = 0;
296 
297  for(Int_t i=0; i<5; i++){
298  fZNCtower[i] = 0;
299  fZPCtower[i] = 0;
300  fZNAtower[i] = 0;
301  fZPAtower[i] = 0;
302  fZNCtowerLG[i] = 0;
303  fZPCtowerLG[i] = 0;
304  fZNAtowerLG[i] = 0;
305  fZPAtowerLG[i] = 0;
306  }
307 
308  //arrays number of triggers
309  for(Int_t i=0; i<fkTTbins; i++){
310  fHadronTT[i] = 0;
311  fJetChTT[i] = 0;
312  fClusterTT[i] = 0;
313 
314  fhMultTTHinMB[i] = 0x0;
315  fhMultTTJinMB[i] = 0x0;
316  fhMultTTCinMB[i] = 0x0;
317  fhMultTTCinGA[i] = 0x0;
318  }
319 
320  for(Int_t i=0; i<fkTTbins;i++){
321  fHadronTTLowPt[i]=-1;
322  fHadronTTHighPt[i]=-1;
323  fJetChTTLowPt[i]=-1;
324  fJetChTTHighPt[i]=-1;
325  fClusterTTLowPt[i]=-1;
326  fClusterTTHighPt[i]=-1;
327 
328  fhV0AvsV0CTTH[i] = 0x0;
329  fhV0AvsV0CTTJ[i] = 0x0;
330  fhV0AvsV0CTTCinMB[i] = 0x0;
331  fhV0AvsV0CTTCinGA[i] = 0x0;
332 
333  }
334 
335  for(Int_t iv=0; iv<fkVtx;iv++){
336  fhVertex[iv]=0x0;
337  for(Int_t i=0; i<fkTTbins;i++){
338  fhVertexTTH[iv][i]=0x0;
339  }
340  }
341 
342  for(Int_t ic=0; ic<fkCE;ic++){
343  fhCentralityMB[ic] = 0x0;
344  fhSignalMB[ic] = 0x0;
345 
346  for(Int_t i=0; i<fkTTbins;i++){
347  fhCentralityTTH[ic][i] = 0x0;
348  fhCentralityTTJ[ic][i] = 0x0;
349  fhCentralityTTCinMB[ic][i] = 0x0;
350  fhCentralityTTCinGA[ic][i] = 0x0;
351 
352  fhSignalTTH[ic][i] = 0x0;
353  fhSignalTTJ[ic][i] = 0x0;
354  fhSignalTTCinMB[ic][i] = 0x0;
355  fhSignalTTCinGA[ic][i] = 0x0;
356  }
357  }
358 
359  for(Int_t i=0; i<fkTTbins; i++){
360  fhNormSumV0AV0CTTH[i] = 0x0;
361  fhNormSumV0AV0CTTJ[i] = 0x0;
362  fhNormSumV0AV0CTTCinMB[i] = 0x0;
363  fhNormSumV0AV0CTTCinGA[i] = 0x0;
364  }
365 
366 
367  sprintf(fTrigClass,"%s","");
368  //inclusive pT spectrum times the boost function
369 
371 
372  DefineOutput(1, TList::Class());
373 }
374 
381 //_____________________________________________________________________________________
383  Int_t system,
384  const char* jetarrayname,
385  const char* jetarraynameMC,
386  const char* trackarrayname,
387  const char* mcpariclearrayname,
388  const char* clusterarrayname,
389  const char* rhoname,
390  const char* mcrhoname,
391  Double_t jetRadius,
392  UInt_t trigger,
393  Int_t isMC,
394  Double_t trackEtaWindow,
395  Bool_t useVertexCut,
396  Bool_t usePileUpCut,
397  Double_t acut,
398  Double_t emcaltofcut,
399  const char* suffix
400 ){
401  // Get the pointer to the existing analysis manager via the static access method.
402  //==============================================================================
403 
404  Double_t jetEtaRange = TMath::Abs(trackEtaWindow - jetRadius);
405 
406 
407  // #### DEFINE MANAGER AND DATA CONTAINER NAMES
408  AliAnalysisManager *manager = AliAnalysisManager::GetAnalysisManager();
409  if(!manager){
410  ::Error("AliAnalysisTaskEA.cxx", "No analysis manager to connect to.");
411  return NULL;
412  }
413 
414  //__________________________________________________________________________________
415  // #### DEFINE MY ANALYSIS TASK
416 
417  TString myContName("");
418  myContName = Form("JetAnalysisR%02d", TMath::Nint(jetRadius*10));
419  myContName.Append(suffix);
420 
421 
422  AliAnalysisTaskEA *task = new AliAnalysisTaskEA(myContName.Data());
423 
424  if(isMC){ //for PYTHIA
425  task->SetIsPythia(kTRUE); //NECESSARY IN ORDER TO FILL XSEC AND TRIALS
426  task->SetMakeGeneralHistograms(kTRUE); //NECESSARY IN ORDER TO FILL XSEC AND TRIALS
427  }
428 
429  //inspired by AliAnalysisTaskEmcalQGTagging
430  //_____________________________________________
431  //TRACK/PARTICLE CONTAINTERS
432  AliTrackContainer *trackCont = 0x0; //detector level track container
433  AliParticleContainer *trackContTrue = 0x0; //mc particle container
434  AliClusterContainer *clusterCont = 0x0; //detector level track container
435 
436  trackCont = task->AddTrackContainer(trackarrayname); //detector level tracks
437  trackCont->SetMinPt(0.15);
438  trackCont->SetEtaLimits(-trackEtaWindow, trackEtaWindow);
439 
440  if(isMC){
441  trackContTrue = task->AddMCParticleContainer(mcpariclearrayname); //particle level MC particles
442  trackContTrue->SetClassName("AliAODMCParticle");
443  trackContTrue->SetMinPt(0.15);
444  trackContTrue->SetEtaLimits(-trackEtaWindow,trackEtaWindow);
445  }
446 
447  clusterCont = task->AddClusterContainer(clusterarrayname); //detector level tracks
448  clusterCont->SetMinPt(0.3);
449  clusterCont->SetExoticCut(1);
450  clusterCont->SetClusTimeCut(0, emcaltofcut);
451 
452  // clusterCont->SetEtaLimits(-trackEtaWindow, trackEtaWindow);
453 
454  //_____________________________________________
455  //JET CONTAINERS
456  AliJetContainer *jetContRec = 0x0; //jet container with detector level tracks
457  AliJetContainer *jetContTrue = 0x0; //jet container with mc particles
458 
459  jetContRec = task->AddJetContainer(jetarrayname,"TPC",jetRadius);
460 
461  if(jetContRec) { //DETECTOR LEVEL JET
462  jetContRec->ConnectParticleContainer(trackCont);
463  jetContRec->SetPercAreaCut(acut);
464  jetContRec->SetMinPt(0.150);
465  jetContRec->SetMaxTrackPt(1000);
467  jetContRec->SetJetEtaLimits(-jetEtaRange,jetEtaRange);
468  }
469 
470  if(isMC){
471  //AKT JETS PARTICLE LEVEL
472  jetContTrue = task->AddJetContainer(jetarraynameMC,"TPC",jetRadius);
473  if(jetContTrue){
474  jetContTrue->ConnectParticleContainer(trackContTrue);
475  jetContTrue->SetPercAreaCut(acut);
476  jetContTrue->SetMinPt(0.15);
477  jetContTrue->SetMaxTrackPt(1000);
479  jetContTrue->SetJetEtaLimits(-jetEtaRange,jetEtaRange);
480  }
481  }
482 
483  // #### Task configuration
484  task->SetMC(isMC);
485  task->SetUsePileUpCut(usePileUpCut);
486  task->SetUseDefaultVertexCut(useVertexCut);
487  task->SetAcceptanceWindows(trackEtaWindow);
488  task->SelectCollisionCandidates(trigger);
489  task->SetExternalRhoTaskName(rhoname);
490  task->SetExternalRhoTaskNameMC(mcrhoname);
491  task->SetTrackContainerName(trackarrayname);
492  task->SetSystem(system);
493 
494 
495  task->SetMCParticleContainerName(mcpariclearrayname);
496  task->SetClusterContainerName(clusterarrayname);
497  task->SetJetContainerName(jetarrayname);
498  task->SetMCJetContainerName(jetarraynameMC);
499  if(system!=AliAnalysisTaskEA::kpp){
500  task->SetUseNewCentralityEstimation(kTRUE); //CENTRALITY
501  }else{
502  task->SetUseNewCentralityEstimation(kFALSE); //CENTRALITY
503  }
504 
505  task->SetDebugLevel(0); //No debug messages 0
506 
507  // output container
508  AliAnalysisDataContainer *contHistos = manager->CreateContainer(myContName.Data(), TList::Class(), AliAnalysisManager::kOutputContainer, Form("%s:ChJetSpectra%s", AliAnalysisManager::GetCommonFileName(), myContName.Data()));
509 
510 
511  // #### ADD ANALYSIS TASK
512  manager->AddTask(task);
513  manager->ConnectInput(task, 0, manager->GetCommonInputContainer());
514  manager->ConnectOutput(task, 1, contHistos);
515 
516  return task;
517 }
518 //_____________________________________________________________________________________
520 
521  TString trigger = fInputEvent->GetFiredTriggerClasses();
522  bool passedGammaTrigger = kFALSE;
523 
524  if(trigger.Contains("EG1") || trigger.Contains("EG2") || trigger.Contains("DG1") || trigger.Contains("DG2")){
525  passedGammaTrigger = kTRUE;
526  }
527  return passedGammaTrigger;
528 
529 }
530 //_____________________________________________________________________________________
532 
533  TString trigger = fInputEvent->GetFiredTriggerClasses();
534  bool passedTrigger = kFALSE;
535  if(trigger.Contains("INT7")){
536  passedTrigger = kTRUE;
537  }
538  return passedTrigger;
539 
540 }
541 
542 //_____________________________________________________________________________________
544 
545  // Get rho from event using CMS approach
546  AliRhoParameter* rho = NULL;
547  TString rhoname = (!isMC) ? fRhoTaskName : fRhoTaskNameMC;
548  if(!rhoname.IsNull()){
549  rho = dynamic_cast<AliRhoParameter*>(InputEvent()->FindListObject(rhoname.Data()));
550  if (!rho) {
551  //AliWarningF(MSGWARNING("%s: Could not retrieve rho with name %s!"), GetName(), rhoname.Data());
552  return 0.;
553  }
554  }else{
555  //AliWarningF(MSGWARNING("No %s Rho task name provided"), (!isMC ? "DATA" : "MC"));
556  return 0.;
557  }
558 
559  return rho->GetVal();
560 }
561 //________________________________________________________________________
562 
564  //EVENT SELECTION RECONSTRUCTED DATA
565 
566 
567  if(!event) return kFALSE;
568 
569  //___________________________________________________
570  //TEST PILE UP
571  if(fUsePileUpCut){
572  if(!fHelperClass || fHelperClass->IsPileUpEvent(event)){
573  fHistEvtSelection->Fill(1.5); //count events rejected by pileup
574  return kFALSE;
575  }
576  }
577  //___________________________________________________
578  //VERTEX CUT
579 
581  if(!fHelperClass || !fHelperClass->IsVertexSelected2013pA(event)){ //??? USE THIS OR SOMETHING ELSE
582  fHistEvtSelection->Fill(2.5); //count events rejected by vertex cut
583  return kFALSE;
584  }
585  }else{
586  if(TMath::Abs(event->GetPrimaryVertex()->GetZ()) > fZVertexCut){
587  fHistEvtSelection->Fill(2.5); //count events rejected by vertex cut
588  return kFALSE;
589  }
590  }
591  //___________________________________________________
592  //AFTER VERTEX CUT
593  fhVertexZ->Fill(event->GetPrimaryVertex()->GetZ());
594 
595 
596  return kTRUE;
597 }
598 
599 //________________________________________________________________________
601  // Check if the track pt and eta range
602  if(!track) return kFALSE;
603 
604  if(isGen){ //particle level MC: select charged physical primary tracks
605  //Apply only for kine level or MC containers
606  if(!track->Charge()) return kFALSE;
607  if(fMC == kPartLevel){
608  if(!(static_cast<AliAODMCParticle*>(track))->IsPhysicalPrimary()) return kFALSE;
609  }
610  }
611  if(TMath::Abs(track->Eta()) < fTrackEtaWindow){ //APPLY TRACK ETA CUT
612  if(track->Pt() > fMinTrackPt){ //APPLY TRACK PT CUT
613  return kTRUE;
614  }
615  }
616  return kFALSE;
617 }
618 //________________________________________________________________________
620  // Initialization of jet containers done in AliAnalysisTaskEmcalJet::ExecOnce()
621  //Read arrays of jets and tracks
622  fInitializedLocal = kTRUE;
623 
624  // Initialize helper class (for vertex selection & pile up correction)
625  fHelperClass = new AliAnalysisUtils();
626  fHelperClass->SetCutOnZVertexSPD(kFALSE); // kFALSE: no cut; kTRUE: |zvtx-SPD - zvtx-TPC|<0.5cm
627 
628 
629  return;
630 }
631 
632 //________________________________________________________________________
634  //Distance o
635  Int_t max = 0;
636 
637  for(Int_t n=0; n<6; n++){
640  max = n;
641  }else{
642  break;
643  }
644  }
645 
646  return max;
647 }
648 
649 
650 //________________________________________________________________________
652 
653  //General QA.
654  if( cluster->GetNCells() < 1) return kFALSE;
655 
656  Int_t disToBad = cluster->GetDistanceToBadChannel();
657  if(-1<disToBad && disToBad<2) return kFALSE;
658 
659  Int_t disToBorder = GetMaxDistanceFromBorder(cluster);
660  if(-1<disToBorder && disToBorder<1) return kFALSE;
661 
662  Double_t lambda0 = cluster->GetM02(); //avoid merged clusters
663  if(lambda0 > 0.4) return kFALSE;
664 
665  return kTRUE;
666 }
667 
668 //________________________________________________________________________
670  // executed in each event
671  //called in AliAnalysisTaskEmcal::UserExec(Option_t *)
672  // Analyze the event and Fill histograms
673 
674  if(!InputEvent()){
675  AliError("??? Event pointer == 0 ???");
676  return kFALSE;
677  }
678 
679  //Execute only once: Get tracks, jets from arrays if not already given
681 
682 
683  //_________________________________________________________________
684  // EVENT SELECTION
685  fHistEvtSelection->Fill(0.5); //Count input event
686 
687  //Check Reconstructed event vertex and pileup
688  if(!IsEventInAcceptance(InputEvent())) return kFALSE; //post data is in UserExec
689 
690 
691  fIsMinBiasTrig = kFALSE; //Minimum bias event flag
692  if(PassedMinBiasTrigger()){
693  fIsMinBiasTrig = kTRUE;
694  fHistEvtSelection->Fill(3.5); //Count Accepted input event
695  }
696 
697  fIsEmcalTrig = kFALSE; //EMCAL triggered event flag
698  if(PassedGATrigger()){
699  fIsEmcalTrig = kTRUE;
700  fHistEvtSelection->Fill(4.5); //Count Accepted input event
701  }
702 
703 
704  if(!fIsEmcalTrig && !fIsMinBiasTrig) return kFALSE; //post data is in UserExec
705 
706 
707  // END EVENT SELECTION
708  //_________________________________________________________________
709  // EVENT PROPERTIES
710 
711  for(int ir=0; ir<8; ir++) fRingMultV0[ir]=0.;
712 
713  // ***** Trigger selection
714  TString triggerClass = InputEvent()->GetFiredTriggerClasses();
715  sprintf(fTrigClass,"%s",triggerClass.Data());
716 
717 
719  fMultSelection = (AliMultSelection*) InputEvent()->FindListObject("MultSelection");
720  if(fMultSelection){
721  fCentralityV0A = fMultSelection->GetMultiplicityPercentile("V0A");
722  fCentralityV0C = fMultSelection->GetMultiplicityPercentile("V0C");
723  fCentralityCL1 = fMultSelection->GetMultiplicityPercentile("CL1");
724  fCentralityZNA = fMultSelection->GetMultiplicityPercentile("ZNA");
725  fCentralityZNC = fMultSelection->GetMultiplicityPercentile("ZNC");
726  }else{
727  fCentralityV0A = -1;
728  fCentralityV0C = -1;
729  fCentralityCL1 = -1;
730  fCentralityZNA = -1;
731  fCentralityZNC = -1;
732  }
733  }
734 
735  const AliVVertex *vertex = InputEvent()->GetPrimaryVertexSPD();
736  if(vertex){
737  fxVertex = vertex->GetX();
738  fyVertex = vertex->GetY();
739  fzVertex = vertex->GetZ();
740  if(vertex->IsFromVertexer3D()) fVertexer3d = kTRUE;
741  else fVertexer3d = kFALSE;
742  }else{
743  fxVertex = 9999.;
744  fyVertex = 9999.;
745  fzVertex = 9999.;
746  fVertexer3d = kFALSE;
747  }
748 
749  const AliVMultiplicity *mult = InputEvent()->GetMultiplicity();
750  if(mult){
751  fNTracklets = mult->GetNumberOfTracklets();
752 
753  for(Int_t ilay=0; ilay<2; ilay++){
754  fNClusters[ilay] = mult->GetNumberOfITSClusters(ilay);
755  }
756  }else{
757  fNTracklets = -9999;
758  for(Int_t ilay=0; ilay<2; ilay++){
759  fNClusters[ilay] = -9999;
760  }
761  }
762 
763 
764 
765  AliVVZERO *vzeroAOD = InputEvent()->GetVZEROData();
766  if(vzeroAOD){
767  fMultV0A = vzeroAOD->GetMTotV0A();
768  fMultV0C = vzeroAOD->GetMTotV0C();
772 
773  fIsV0ATriggered = vzeroAOD->GetV0ADecision();
774  fIsV0CTriggered = vzeroAOD->GetV0CDecision();
775 
776  for(Int_t iRing = 0; iRing < 8; ++iRing){
777  for(Int_t i = 0; i < 8; ++i){
778  fRingMultV0[iRing] += vzeroAOD->GetMultiplicity(8*iRing+i);
779  }
780  }
781  }else{
782  fMultV0A = -1;
783  fMultV0C = -1;
784  fIsV0ATriggered = kFALSE;
785  fIsV0CTriggered = kFALSE;
786 
787  for(Int_t iRing = 0; iRing < 8; ++iRing){
788  for(Int_t i = 0; i < 8; ++i){
789  fRingMultV0[iRing] += 0;
790  }
791  }
792  }
793 
794 
795  AliAODZDC *aodZDC =dynamic_cast<AliAODZDC*> (InputEvent()->GetZDCData());
796  if(aodZDC){
797 
798  fZEM1Energy = (Float_t) (aodZDC->GetZEM1Energy());
799  fZEM2Energy = (Float_t) (aodZDC->GetZEM2Energy());
800 
801  const Double_t* towZNC = aodZDC->GetZNCTowerEnergy();
802  const Double_t* towZPC = aodZDC->GetZPCTowerEnergy();
803  const Double_t* towZNA = aodZDC->GetZNATowerEnergy();
804  const Double_t* towZPA = aodZDC->GetZPATowerEnergy();
805  //
806  const Double_t* towZNCLG = aodZDC->GetZNCTowerEnergyLR();
807  const Double_t* towZPCLG = aodZDC->GetZPCTowerEnergyLR();
808  const Double_t* towZNALG = aodZDC->GetZNATowerEnergyLR();
809  const Double_t* towZPALG = aodZDC->GetZPATowerEnergyLR();
810  //
811  for(Int_t it=0; it<5; it++){
812  fZNCtower[it] = (Float_t) (towZNC[it]);
813  fZPCtower[it] = (Float_t) (towZPC[it]);
814  fZNAtower[it] = (Float_t) (towZNA[it]);
815  fZPAtower[it] = (Float_t) (towZPA[it]);
816  fZNCtowerLG[it] = (Float_t) (towZNCLG[it]);
817  fZPCtowerLG[it] = (Float_t) (towZPCLG[it]);
818  fZNAtowerLG[it] = (Float_t) (towZNALG[it]);
819  fZPAtowerLG[it] = (Float_t) (towZPALG[it]);
820  }
821  }else{
822  fZEM1Energy = -1;
823  fZEM2Energy = -1;
824  for(Int_t it=0; it<5; it++){
825  fZNCtower[it] = -1;
826  fZPCtower[it] = -1;
827  fZNAtower[it] = -1;
828  fZPAtower[it] = -1;
829  fZNCtowerLG[it] = -1;
830  fZPCtowerLG[it] = -1;
831  fZNAtowerLG[it] = -1;
832  fZPAtowerLG[it] = -1;
833  }
834  }
835 
836 
837 
838 
839  Double_t rho = GetExternalRho(kDetLevel); //estimated backround pt density
840 
841  //_________________________________________________________________
842  // JET+TRACK CONTAINERS
843 
844  AliEmcalJet *jet = NULL; //jet pointer real jet
845  AliEmcalJet *jetMC = NULL; //jet pointer real jet
846  AliVParticle *track = NULL; //jet constituent
847 
848  //_________________________________________________________
849  //READ TRACK AND JET CONTAINERS
850  //Container operations http://alidoc.cern.ch/AliPhysics/master/READMEcontainers.html#emcalContainerIterateTechniques
851 
852  fTrkContainerDetLevel = static_cast<AliTrackContainer*> (GetTrackContainer(fMyTrackContainerName.Data())); //reconstructed particle container
853  fJetContainerDetLevel = static_cast<AliJetContainer*> (GetJetContainer(fMyJetContainerName.Data())); //AKT jet
854 
855 
856 
857  if(fMC){
858  fParticleContainerPartLevel = GetParticleContainer(fMyParticleContainerName.Data()); //reconstructed particle container
859  fJetContainerPartLevel = GetJetContainer(fMyJetParticleContainerName.Data()); //reconstructed particle container
860  }
861 
862  if(fIsMinBiasTrig){
863  fhVertex[0]->Fill(fxVertex);
864  fhVertex[1]->Fill(fyVertex);
865  fhVertex[2]->Fill(fzVertex);
866 
867  fhRhoIncl->Fill(rho);
868 
875  }
876 
877  fhSignalMB[fkV0A]->Fill(fMultV0A);
878  fhSignalMB[fkV0C]->Fill(fMultV0C);
879  fhSignalMB[fkSPD]->Fill(fNTracklets);
880  fhSignalMB[fkZNA]->Fill(fZNAtower[0]);
881  fhSignalMB[fkZNC]->Fill(fZNCtower[0]);
882 
883  fhV0AvsV0C->Fill(fMultV0C, fMultV0A);
886 
888  }
889 
890 
891 
892  //_________________________________________________________
893  //LOOP OVER EMCAL CLUSTERS
894  TLorentzVector ph;
895  for(Int_t i=0; i<fnClusterTTBins; i++){
896  fClusterTT[i] = 0;
897  }
898 
899  if(fMyClusterContainerName.Data()){
901 
902 
903  for(auto cluster: fClusterContainerDetLevel->accepted()){
904 
906 
907  if(!FinalClusterCuts(cluster)) continue;
908 
909  if(fIsMinBiasTrig){
910  //fill some histograms for detector level tracks
911  fhClusterPhiInclMB->Fill(ph.Pt(), ph.Phi());
912  fhClusterEtaInclMB->Fill(ph.Pt(), ph.Eta());
913  }else if(fIsEmcalTrig){
914  fhClusterPhiInclGA->Fill(ph.Pt(), ph.Phi());
915  fhClusterEtaInclGA->Fill(ph.Pt(), ph.Eta());
916  }
917 
918  for(Int_t igg=0; igg<fnClusterTTBins; igg++){
919  if(fClusterTTLowPt[igg] < ph.Pt() && ph.Pt() < fClusterTTHighPt[igg]){
920  fClusterTT[igg]++; // there was a high pt
921  }
922  }
923  }
924 
925  if(fIsMinBiasTrig){
926  for(Int_t igg=0; igg<fnClusterTTBins; igg++){
927 
928  fhMultTTCinMB[igg]->Fill(fClusterTT[igg]);
929 
930  if(!fClusterTT[igg]) continue;
931 
932  fhRhoTTCinMB[igg]->Fill(rho);
933 
940  }
941 
942  fhSignalTTCinMB[fkV0A][igg]->Fill(fMultV0A);
943  fhSignalTTCinMB[fkV0C][igg]->Fill(fMultV0C);
944  fhSignalTTCinMB[fkSPD][igg]->Fill(fNTracklets);
945  fhSignalTTCinMB[fkZNA][igg]->Fill(fZNAtower[0]);
946  fhSignalTTCinMB[fkZNC][igg]->Fill(fZNCtower[0]);
947 
948 
949  fhV0AvsV0CTTCinMB[igg]->Fill(fMultV0C, fMultV0A);
950 
952  }
953  }else if(fIsEmcalTrig){
954 
955  for(Int_t igg=0; igg<fnClusterTTBins; igg++){
956 
957  fhMultTTCinGA[igg]->Fill(fClusterTT[igg]);
958 
959  if(!fClusterTT[igg]) continue;
960 
961  fhRhoTTCinGA[igg]->Fill(rho);
962 
969  }
970 
971  fhSignalTTCinGA[fkV0A][igg]->Fill(fMultV0A);
972  fhSignalTTCinGA[fkV0C][igg]->Fill(fMultV0C);
973  fhSignalTTCinGA[fkSPD][igg]->Fill(fNTracklets);
974  fhSignalTTCinGA[fkZNA][igg]->Fill(fZNAtower[0]);
975  fhSignalTTCinGA[fkZNC][igg]->Fill(fZNCtower[0]);
976 
977  fhV0AvsV0CTTCinGA[igg]->Fill(fMultV0C, fMultV0A);
978 
980  }
981  }
982 
983  }
984 
985 
986 
987 
988 
989  //_________________________________________________________
990  //LOOP OVER TRACKS DETECTOR LEVEL + SEARCH FOR HIGH PT HADRON TRIGGER
991 
992  for(Int_t i=0; i<fnHadronTTBins; i++){
993  fHadronTT[i] = 0;
994  }
995 
996 
997  for(auto trackIterator : fTrkContainerDetLevel->accepted_momentum() ){
998  // trackIterator is a std::map of AliTLorentzVector and AliVTrack
999  track = trackIterator.second; // Get the full track
1000 
1001  if(IsTrackInAcceptance(track, kDetLevel)){
1002 
1003 
1004  if(fIsMinBiasTrig){
1005  //fill some histograms for detector level tracks
1006  fhTrackPhiIncl->Fill(track->Pt(), track->Phi());
1007  fhTrackEtaIncl->Fill(track->Pt(), track->Eta());
1008  }
1009 
1010  for(Int_t itt=0; itt<fnHadronTTBins; itt++){
1011  if(fHadronTTLowPt[itt] < track->Pt() && track->Pt() < fHadronTTHighPt[itt]){
1012  fHadronTT[itt]++; // there was a high pt
1013  }
1014  }
1015  }
1016  }
1017 
1018  if(fIsMinBiasTrig){
1019  for(Int_t itt=0; itt<fnHadronTTBins; itt++){
1020 
1021  fhMultTTHinMB[itt]->Fill(fHadronTT[itt]);
1022 
1023  if(!fHadronTT[itt]) continue;
1024  fhVertexTTH[0][itt]->Fill(fxVertex);
1025  fhVertexTTH[1][itt]->Fill(fyVertex);
1026  fhVertexTTH[2][itt]->Fill(fzVertex);
1027 
1028  fhRhoTTH[itt]->Fill(rho);
1029 
1031  fhCentralityTTH[fkV0A][itt]->Fill(fCentralityV0A);
1032  fhCentralityTTH[fkV0C][itt]->Fill(fCentralityV0C);
1033  fhCentralityTTH[fkSPD][itt]->Fill(fCentralityCL1);
1034  fhCentralityTTH[fkZNA][itt]->Fill(fCentralityZNA);
1035  fhCentralityTTH[fkZNC][itt]->Fill(fCentralityZNC);
1036  }
1037 
1038  fhSignalTTH[fkV0A][itt]->Fill(fMultV0A);
1039  fhSignalTTH[fkV0C][itt]->Fill(fMultV0C);
1040  fhSignalTTH[fkSPD][itt]->Fill(fNTracklets);
1041  fhSignalTTH[fkZNA][itt]->Fill(fZNAtower[0]);
1042  fhSignalTTH[fkZNC][itt]->Fill(fZNCtower[0]);
1043 
1044  fhV0AvsV0CTTH[itt]->Fill(fMultV0C, fMultV0A);
1045 
1046  fhNormSumV0AV0CTTH[itt]->Fill(fMultV0AV0Cnorm);
1047  }
1048  }
1049 
1050  //_________________________________________________________
1051  //LOOP OVER JETS DETECTOR LEVEL
1052 
1053  for(Int_t i=0; i<fnJetChTTBins; i++){
1054  fJetChTT[i] = 0;
1055  }
1056 
1057 
1058  Double_t jetPtcorr;
1059  for(auto jetIterator : fJetContainerDetLevel->accepted_momentum() ){
1060  // trackIterator is a std::map of AliTLorentzVector and AliVTrack
1061  jet = jetIterator.second; // Get the pointer to jet object
1062  if(!jet) continue;
1063 
1064  jetPtcorr = jet->Pt() - rho*jet->Area();
1065  if(fIsMinBiasTrig){
1066  //fill some histograms for detector level jets
1067  fhJetPhiIncl->Fill(jetPtcorr, jet->Phi());
1068  fhJetEtaIncl->Fill(jetPtcorr, jet->Eta());
1069  }
1070 
1071  for(Int_t ijj=0; ijj<fnJetChTTBins; ijj++){
1072  if(fJetChTTLowPt[ijj] < jetPtcorr && jetPtcorr < fJetChTTHighPt[ijj]){
1073  fJetChTT[ijj]++; // there was a high pt
1074  }
1075  }
1076 
1077  //loop over jet constituents
1078  //for(Int_t iq=0; iq < jet->GetNumberOfTracks(); iq++) {
1079  // track = (AliVParticle*) (jet->TrackAt(iq, fTrkContainerDetLevel->GetArray()));
1080  //here one can e.g. analyze jet shapes
1081 
1082  //}
1083 
1084 
1085  //you can also find the closest particle level jet to given detector level
1086  //the mateching betwe particle and detector level jets is done in Tagger task
1087  //if(fMC){
1088  // jetMC = jet->ClosestJet();
1089  //}
1090  }
1091 
1092  if(fIsMinBiasTrig){
1093  for(Int_t ijj=0; ijj<fnJetChTTBins; ijj++){
1094 
1095  fhMultTTJinMB[ijj]->Fill(fJetChTT[ijj]);
1096 
1097  if(!fJetChTT[ijj]) continue;
1098 
1099  fhRhoTTJ[ijj]->Fill(rho);
1100 
1102  fhCentralityTTJ[fkV0A][ijj]->Fill(fCentralityV0A);
1103  fhCentralityTTJ[fkV0C][ijj]->Fill(fCentralityV0C);
1104  fhCentralityTTJ[fkSPD][ijj]->Fill(fCentralityCL1);
1105  fhCentralityTTJ[fkZNA][ijj]->Fill(fCentralityZNA);
1106  fhCentralityTTJ[fkZNC][ijj]->Fill(fCentralityZNC);
1107  }
1108 
1109  fhSignalTTJ[fkV0A][ijj]->Fill(fMultV0A);
1110  fhSignalTTJ[fkV0C][ijj]->Fill(fMultV0C);
1111  fhSignalTTJ[fkSPD][ijj]->Fill(fNTracklets);
1112  fhSignalTTJ[fkZNA][ijj]->Fill(fZNAtower[0]);
1113  fhSignalTTJ[fkZNC][ijj]->Fill(fZNCtower[0]);
1114 
1115  fhV0AvsV0CTTJ[ijj]->Fill(fMultV0C, fMultV0A);
1116 
1117  fhNormSumV0AV0CTTJ[ijj]->Fill(fMultV0AV0Cnorm);
1118  }
1119  }
1120 
1121 
1122  //___________________________________________________________
1123 //
1124 // if(fMC){
1125 //
1126 // //_________________________________________________________
1127 // //LOOP OVER PARTICLE LEVEL
1128 //
1129 // for(auto trackIterator : fParticleContainerPartLevel->accepted_momentum() ){
1130 // // trackIterator is a std::map of AliTLorentzVector and AliVTrack
1131 // track = trackIterator.second; // Get the full track
1132 //
1133 // if(IsTrackInAcceptance(track, kPartLevel)){
1134 // //here fill some histograms for particle level particles
1135 //
1136 // }
1137 // }
1138 //
1139 // //_________________________________________________________
1140 // //LOOP OVER JETS PARTICLE LEVEL
1141 //
1142 //
1143 // Double_t rhoMC = GetExternalRho(kPartLevel); //estimated backround pt density
1144 //
1145 // for(auto jetIterator : fJetContainerPartLevel->accepted_momentum() ){
1146 // // trackIterator is a std::map of AliTLorentzVector and AliVTrack
1147 // jet = jetIterator.second; // Get the pointer to jet object
1148 //
1149 // //fill some histograms for detector level jets
1150 // fhJetPhiIncl->Fill(jet->Pt(), jet->Phi());
1151 // fhJetEtaIncl->Fill(jet->Pt(), jet->Eta());
1152 //
1153 // //loop over jet constituents at particle level
1154 // for(Int_t iq=0; iq < jet->GetNumberOfTracks(); iq++) {
1155 // track = (AliVParticle*) (jet->TrackAt(iq, fParticleContainerPartLevel->GetArray()));
1156 // //here one can e.g. analyze jet shapes
1157 //
1158 // }
1159 //
1160 // }
1161 //
1162 // }
1163 
1164  if(fFillTTree){
1165  fCentralityTree->Fill();
1166  }
1167 
1168 
1169  return kTRUE;
1170 }
1171 
1172 //________________________________________________________________________
1174  //Treminate
1175  PostData(1, fOutput);
1176 
1177  // Mandatory
1178  fOutput = dynamic_cast<AliEmcalList*> (GetOutputData(1)); // '1' refers to the output slot
1179  if(!fOutput) {
1180  printf("ERROR: Output list not available\n");
1181  return;
1182  }
1183 }
1184 
1185 //________________________________________________________________________
1187  // Destructor. Clean-up the output list, but not the histograms that are put inside
1188  // (the list is owner and will clean-up these histograms). Protect in PROOF case.
1189  if(fOutput && !AliAnalysisManager::GetAnalysisManager()->IsProofMode()) {
1190  delete fOutput;
1191  }
1192  delete fHelperClass;
1193 
1194 }
1195 //________________________________________________________________________
1197  // called once to create user defined output objects like histograms, plots etc.
1198  // and to put it on the output list.
1199  // Note: Saving to file with e.g. OpenFile(0) is must be before creating other objects.
1200  //fOutput TList defined in the mother class
1202 
1203  Bool_t oldStatus = TH1::AddDirectoryStatus();
1204  TH1::AddDirectory(kFALSE);
1205  TString name, object;
1206 
1207 
1208  //__________________________________________________________
1209  // Event statistics
1210  fHistEvtSelection = new TH1I("fHistEvtSelection", "event selection", 5, 0, 5);
1211  fHistEvtSelection->GetXaxis()->SetBinLabel(1,"events IN");
1212  fHistEvtSelection->GetXaxis()->SetBinLabel(2,"pile up (rejected)");
1213  fHistEvtSelection->GetXaxis()->SetBinLabel(3,"vertex cut (rejected)");
1214  fHistEvtSelection->GetXaxis()->SetBinLabel(4,"MB");
1215  fHistEvtSelection->GetXaxis()->SetBinLabel(5,"EMCAL");
1216 
1217 
1218  fOutput->Add(fHistEvtSelection);
1219 
1220 
1221  //_______________________________________________________________________
1222  //inclusive azimuthal and pseudorapidity histograms
1223 
1224  fhVertexZ = new TH1F("fhVertexZ","z vertex",40,-20,20);
1225  fOutput->Add(fhVertexZ);
1226 
1227  //-------------------------
1228 
1229  fhTrackEtaIncl = new TH2F("fhTrackEtaIncl","Eta dist inclusive track vs pT", 50,0, 100, 40,-0.9,0.9);
1230  fOutput->Add((TH2F*) fhTrackEtaIncl);
1231 
1232  fhTrackPhiIncl = new TH2F("fhTrackPhiIncl","Azim dist tracks vs pT", 50, 0, 100, 50,0,2*TMath::Pi());
1233  fOutput->Add((TH2F*) fhTrackPhiIncl);
1234 
1235  fhJetEtaIncl = new TH2F("fhJetEtaIncl","Eta dist inclusive jets vs pTjet", 150, -20, 130, 40,-0.9,0.9);
1236  fOutput->Add((TH2F*) fhJetEtaIncl);
1237 
1238  fhJetPhiIncl = new TH2F("fhJetPhiIncl","Azim dist jets vs pTjet", 60, -20, 100, 50,0,2*TMath::Pi());
1239  fOutput->Add((TH2F*) fhJetPhiIncl);
1240 
1241  fhClusterEtaInclMB = new TH2F("fhClusterEtaInclMB","Eta dist inclusive clusters vs pT", 100, 0, 100, 40,-0.9,0.9);
1242  fOutput->Add((TH2F*) fhClusterEtaInclMB);
1243 
1244  fhClusterPhiInclMB = new TH2F("fhClusterPhiInclMB","Azim dist clusters vs pT", 50, 0, 100, 50,0,2*TMath::Pi());
1245  fOutput->Add((TH2F*) fhClusterPhiInclMB);
1246 
1247  fhClusterEtaInclGA = new TH2F("fhClusterEtaInclGA","Eta dist inclusive clusters vs pT", 100, 0, 100, 40,-0.9,0.9);
1248  fOutput->Add((TH2F*) fhClusterEtaInclGA);
1249 
1250  fhClusterPhiInclGA = new TH2F("fhClusterPhiInclGA","Azim dist clusters vs pT", 50, 0, 100, 50,0,2*TMath::Pi());
1251  fOutput->Add((TH2F*) fhClusterPhiInclGA);
1252 
1253 
1254  //RHO
1255  fhRhoIncl = new TH1F("hRho","Rho",1000,0,100);
1256  fOutput->Add((TH1F*) fhRhoIncl);
1257 
1258  for(Int_t itt=0; itt<fnHadronTTBins;itt++){
1259  name = Form("%s_TTH%d_%d", fhRhoIncl->GetName(), fHadronTTLowPt[itt],fHadronTTHighPt[itt]);
1260  fhRhoTTH[itt] = (TH1F*) fhRhoIncl->Clone(name.Data());
1261  fOutput->Add((TH1F*) fhRhoTTH[itt]);
1262  }
1263  for(Int_t ijj=0; ijj<fnJetChTTBins; ijj++){
1264  name = Form("%s_TTJ%d_%d", fhRhoIncl->GetName(), fJetChTTLowPt[ijj],fJetChTTHighPt[ijj]);
1265  fhRhoTTJ[ijj] = (TH1F*) fhRhoIncl->Clone(name.Data());
1266  fOutput->Add((TH1F*) fhRhoTTJ[ijj]);
1267  }
1268  for(Int_t igg=0; igg<fnClusterTTBins; igg++){
1269  name = Form("%s_MB_TTC%d_%d", fhRhoIncl->GetName(), fClusterTTLowPt[igg],fClusterTTHighPt[igg]);
1270  fhRhoTTCinMB[igg] = (TH1F*) fhRhoIncl->Clone(name.Data());
1271  fOutput->Add((TH1F*) fhRhoTTCinMB[igg]);
1272  }
1273  for(Int_t igg=0; igg<fnClusterTTBins; igg++){
1274  name = Form("%s_GA_TTC%d_%d", fhRhoIncl->GetName(), fClusterTTLowPt[igg],fClusterTTHighPt[igg]);
1275  fhRhoTTCinGA[igg] = (TH1F*) fhRhoIncl->Clone(name.Data());
1276  fOutput->Add((TH1F*) fhRhoTTCinGA[igg]);
1277  }
1278 
1279 
1280 
1281  //VERTEX
1282  for(Int_t iv=0; iv<fkVtx;iv++){
1283  if(iv==0) fhVertex[iv] = new TH1D("hVertexX","VertexX",100,-1,1);
1284  else if(iv==1) fhVertex[iv] = new TH1D("hVertexY","VertexY",100,-1,1);
1285  else fhVertex[iv] = new TH1D("hVertexZ","VertexZ",400,-20,20);
1286  fOutput->Add((TH1D*) fhVertex[iv]);
1287  }
1288 
1289  for(Int_t iv=0; iv<fkVtx;iv++){
1290  for(Int_t itt=0; itt<fnHadronTTBins;itt++){
1291  name = Form("%s_TTH%d_%d", fhVertex[iv]->GetName(), fHadronTTLowPt[itt],fHadronTTHighPt[itt]);
1292  fhVertexTTH[iv][itt] = (TH1D*) fhVertex[iv]->Clone(name.Data());
1293  fOutput->Add((TH1D*) fhVertexTTH[iv][itt]);
1294  }
1295  }
1296 
1297 
1298  TString cest[fkCE] = {"V0A", "V0C", "SPD", "ZNA", "ZNC"}; //centrality estimators
1299 
1300  if(fSystem!=AliAnalysisTaskEA::kpp){ //not pp
1301  for(Int_t ic=0; ic<fkCE;ic++){
1302  name = Form("hCentrality_MB_%s",cest[ic].Data());
1303  fhCentralityMB[ic] = new TH1D(name.Data(), name.Data(),101,0,101);
1304  fOutput->Add((TH1D*) fhCentralityMB[ic]);
1305  }
1306 
1307  for(Int_t ic=0; ic<fkCE;ic++){
1308  for(Int_t itt=0; itt<fnHadronTTBins; itt++){
1309  name = Form("hCentrality_MB_%s_TTH%d_%d",cest[ic].Data(), fHadronTTLowPt[itt],fHadronTTHighPt[itt]);
1310  fhCentralityTTH[ic][itt] = new TH1D(name.Data(), name.Data(),101,0,101);
1311  fOutput->Add((TH1D*) fhCentralityTTH[ic][itt]);
1312  }
1313  }
1314 
1315  for(Int_t ic=0; ic<fkCE;ic++){
1316  for(Int_t ijj=0; ijj<fnJetChTTBins; ijj++){
1317  name = Form("hCentrality_MB_%s_TTJ%d_%d", cest[ic].Data(), fJetChTTLowPt[ijj],fJetChTTHighPt[ijj]);
1318  fhCentralityTTJ[ic][ijj] = new TH1D(name.Data(), name.Data(),101,0,101);
1319  fOutput->Add((TH1D*) fhCentralityTTJ[ic][ijj]);
1320  }
1321  }
1322 
1323  for(Int_t ic=0; ic<fkCE;ic++){
1324  for(Int_t ijj=0; ijj<fnClusterTTBins; ijj++){
1325  name = Form("hCentrality_MB_%s_TTC%d_%d", cest[ic].Data(), fClusterTTLowPt[ijj],fClusterTTHighPt[ijj]);
1326  fhCentralityTTCinMB[ic][ijj] = new TH1D(name.Data(), name.Data(),101,0,101);
1327  fOutput->Add((TH1D*) fhCentralityTTCinMB[ic][ijj]);
1328  }
1329  }
1330 
1331  for(Int_t ic=0; ic<fkCE;ic++){
1332  for(Int_t ijj=0; ijj<fnClusterTTBins; ijj++){
1333  name = Form("hCentrality_GA_%s_TTC%d_%d", cest[ic].Data(), fClusterTTLowPt[ijj],fClusterTTHighPt[ijj]);
1334  fhCentralityTTCinGA[ic][ijj] = new TH1D(name.Data(), name.Data(),101,0,101);
1335  fOutput->Add((TH1D*) fhCentralityTTCinGA[ic][ijj]);
1336  }
1337  }
1338  }//not pp
1339 
1340  TString signal[]={"multV0A", "multV0C", "nTracklets", "znatower0", "znctower0"};
1341  Float_t signalL[]={0,0,0,0,0};
1342  Float_t signalH[]={1000,1000,500,30000,30000};
1343  Int_t signalN[]={1000,1000,500,100,100};
1344 
1345  for(Int_t ic=0; ic<fkCE;ic++){
1346  name = Form("hSignal_MB_%s", cest[ic].Data());
1347  fhSignalMB[ic] = new TH1D(name.Data(), name.Data(), signalN[ic], signalL[ic], signalH[ic]);
1348  fOutput->Add((TH1D*) fhSignalMB[ic]);
1349  }
1350 
1351 
1352  for(Int_t ic=0; ic<fkCE;ic++){
1353  for(Int_t itt=0; itt<fnHadronTTBins; itt++){
1354  name = Form("hSignal_MB_%s_TTH%d_%d", cest[ic].Data(), fHadronTTLowPt[itt],fHadronTTHighPt[itt]);
1355  fhSignalTTH[ic][itt] = new TH1D(name.Data(),name.Data(),signalN[ic], signalL[ic], signalH[ic]);
1356  fOutput->Add((TH1D*) fhSignalTTH[ic][itt]);
1357  }
1358  }
1359 
1360  for(Int_t ic=0; ic<fkCE;ic++){
1361  for(Int_t ijj=0; ijj<fnJetChTTBins; ijj++){
1362  name = Form("hSignal_MB_%s_TTJ%d_%d", cest[ic].Data(), fJetChTTLowPt[ijj],fJetChTTHighPt[ijj]);
1363  fhSignalTTJ[ic][ijj] = new TH1D(name.Data(),name.Data(),signalN[ic], signalL[ic], signalH[ic]);
1364  fOutput->Add((TH1D*) fhSignalTTJ[ic][ijj]);
1365  }
1366  }
1367 
1368  for(Int_t ic=0; ic<fkCE;ic++){
1369  for(Int_t ijj=0; ijj<fnClusterTTBins; ijj++){
1370  name = Form("hSignal_MB_%s_TTC%d_%d", cest[ic].Data(), fClusterTTLowPt[ijj],fClusterTTHighPt[ijj]);
1371  fhSignalTTCinMB[ic][ijj] = new TH1D(name.Data(),name.Data(),signalN[ic], signalL[ic], signalH[ic]);
1372  fOutput->Add((TH1D*) fhSignalTTCinMB[ic][ijj]);
1373  }
1374  }
1375 
1376  for(Int_t ic=0; ic<fkCE;ic++){
1377  for(Int_t ijj=0; ijj<fnClusterTTBins; ijj++){
1378  name = Form("hSignal_GA_%s_TTC%d_%d", cest[ic].Data(), fClusterTTLowPt[ijj],fClusterTTHighPt[ijj]);
1379  fhSignalTTCinGA[ic][ijj] = new TH1D(name.Data(),name.Data(),signalN[ic], signalL[ic], signalH[ic]);
1380  fOutput->Add((TH1D*) fhSignalTTCinGA[ic][ijj]);
1381  }
1382  }
1383 
1384  //sum of (mult V0/mean V0A) + (mult VC/mean V0C)
1385  name = Form("fhNormSumV0AV0C_MB");
1386  fhNormSumV0AV0CMB = new TH1D(name.Data(),name.Data(),400, 0, 40);
1387  fOutput->Add((TH1D*) fhNormSumV0AV0CMB);
1388 
1389  for(Int_t itt=0; itt<fnHadronTTBins; itt++){
1390  name = Form("fhNormSumV0AV0C_MB_TTH%d_%d", fHadronTTLowPt[itt], fHadronTTHighPt[itt]);
1391  fhNormSumV0AV0CTTH[itt] = (TH1D*) fhNormSumV0AV0CMB->Clone(name.Data());
1392  fOutput->Add((TH1D*) fhNormSumV0AV0CTTH[itt]);
1393  }
1394 
1395  for(Int_t ijj=0; ijj<fnJetChTTBins; ijj++){
1396  name = Form("fhNormSumV0AV0_MB_TTJ%d_%d", fJetChTTLowPt[ijj],fJetChTTHighPt[ijj]);
1397  fhNormSumV0AV0CTTJ[ijj] = (TH1D*) fhNormSumV0AV0CMB->Clone(name.Data());
1398  fOutput->Add((TH1D*) fhNormSumV0AV0CTTJ[ijj]);
1399  }
1400 
1401  for(Int_t ijj=0; ijj<fnClusterTTBins; ijj++){
1402  name = Form("fhNormSumV0AV0C_MB_TTC%d_%d", fClusterTTLowPt[ijj],fClusterTTHighPt[ijj]);
1403  fhNormSumV0AV0CTTCinMB[ijj] = (TH1D*) fhNormSumV0AV0CMB->Clone(name.Data());
1404  fOutput->Add((TH1D*) fhNormSumV0AV0CTTCinMB[ijj]);
1405  }
1406 
1407  for(Int_t ijj=0; ijj<fnClusterTTBins; ijj++){
1408  name = Form("fhNormSumV0AV0C_GA_TTC%d_%d", fClusterTTLowPt[ijj],fClusterTTHighPt[ijj]);
1409  fhNormSumV0AV0CTTCinGA[ijj] = (TH1D*) fhNormSumV0AV0CMB->Clone(name.Data());
1410  fOutput->Add((TH1D*) fhNormSumV0AV0CTTCinGA[ijj]);
1411  }
1412 
1413 
1414 
1415  name = Form("fhV0AvsV0C_MB");
1416  fhV0AvsV0C = new TH2F(name.Data(),name.Data(),100,0,1000, 100,0,1000);
1417  fOutput->Add((TH2F*) fhV0AvsV0C);
1418 
1419  name = Form("fhV0AvsSPD_MB");
1420  fhV0AvsSPD = new TH2F(name.Data(),name.Data(),100,0,500, 100,0,500);
1421  fOutput->Add((TH2F*) fhV0AvsSPD);
1422 
1423  name = Form("fhV0CvsSPD_MB");
1424  fhV0CvsSPD = new TH2F(name.Data(),name.Data(),100,0,500, 100,0,500);
1425  fOutput->Add((TH2F*) fhV0CvsSPD);
1426 
1427 
1428  for(Int_t itt=0; itt<fnHadronTTBins; itt++){
1429  name = Form("fhV0AvsV0C_MB_TTH%d_%d", fHadronTTLowPt[itt],fHadronTTHighPt[itt]);
1430  fhV0AvsV0CTTH[itt] = (TH2F*) fhV0AvsV0C->Clone(name.Data());
1431  fhV0AvsV0CTTH[itt]->SetTitle(name.Data());
1432  fOutput->Add((TH2F*) fhV0AvsV0CTTH[itt]);
1433  }
1434  for(Int_t ijj=0; ijj<fnJetChTTBins; ijj++){
1435  name = Form("fhV0AvsV0C_MB_TTJ%d_%d", fJetChTTLowPt[ijj],fJetChTTHighPt[ijj]);
1436  fhV0AvsV0CTTJ[ijj] = (TH2F*) fhV0AvsV0C->Clone(name.Data());
1437  fhV0AvsV0CTTJ[ijj]->SetTitle(name.Data());
1438  fOutput->Add((TH2F*) fhV0AvsV0CTTJ[ijj]);
1439  }
1440  for(Int_t ijj=0; ijj<fnClusterTTBins; ijj++){
1441  name = Form("fhV0AvsV0C_MB_TTC%d_%d", fClusterTTLowPt[ijj],fClusterTTHighPt[ijj]);
1442  fhV0AvsV0CTTCinMB[ijj] = (TH2F*) fhV0AvsV0C->Clone(name.Data());
1443  fhV0AvsV0CTTCinMB[ijj]->SetTitle(name.Data());
1444  fOutput->Add((TH2F*) fhV0AvsV0CTTCinMB[ijj]);
1445  }
1446  for(Int_t ijj=0; ijj<fnClusterTTBins; ijj++){
1447  name = Form("fhV0AvsV0C_GA_TTC%d_%d", fClusterTTLowPt[ijj],fClusterTTHighPt[ijj]);
1448  fhV0AvsV0CTTCinGA[ijj] = (TH2F*) fhV0AvsV0C->Clone(name.Data());
1449  fhV0AvsV0CTTCinGA[ijj]->SetTitle(name.Data());
1450  fOutput->Add((TH2F*) fhV0AvsV0CTTCinGA[ijj]);
1451  }
1452 
1453 
1454  for(Int_t itt=0; itt<fnHadronTTBins; itt++){
1455  name = Form("hMultTTHinMB_TTH%d_%d", fHadronTTLowPt[itt],fHadronTTHighPt[itt]);
1456  fhMultTTHinMB[itt] = new TH1D(name.Data(),name.Data(),100,0,100);
1457  fOutput->Add((TH1D*) fhMultTTHinMB[itt]);
1458  }
1459 
1460  for(Int_t ijj=0; ijj<fnJetChTTBins; ijj++){
1461  name = Form("hMultTTJinMB_TTJ%d_%d", fJetChTTLowPt[ijj],fJetChTTHighPt[ijj]);
1462  fhMultTTJinMB[ijj] = new TH1D(name.Data(),name.Data(),100,0,100);
1463  fOutput->Add((TH1D*) fhMultTTJinMB[ijj]);
1464  }
1465 
1466  for(Int_t ijj=0; ijj<fnClusterTTBins; ijj++){
1467  name = Form("hMultTTCinMB_TTC%d_%d", fClusterTTLowPt[ijj],fClusterTTHighPt[ijj]);
1468  fhMultTTCinMB[ijj] = new TH1D(name.Data(),name.Data(),100,0,100);
1469  fOutput->Add((TH1D*) fhMultTTCinMB[ijj]);
1470  }
1471 
1472  for(Int_t ijj=0; ijj<fnClusterTTBins; ijj++){
1473  name = Form("hMultTTCinGA_TTC%d_%d", fClusterTTLowPt[ijj],fClusterTTHighPt[ijj]);
1474  fhMultTTCinGA[ijj] = new TH1D(name.Data(),name.Data(),100,0,100);
1475  fOutput->Add((TH1D*) fhMultTTCinGA[ijj]);
1476  }
1477 
1478 
1479 
1480  // OUTPUT TREE
1481  if(fFillTTree){
1482  fCentralityTree = new TTree("fCentralityTree", "Centrality vs. multiplicity tree");
1483  //
1484  fCentralityTree->Branch("trigClass",fTrigClass,"trigClass/C");
1485  fCentralityTree->Branch("xVertex", &fxVertex,"xVertex/D");
1486  fCentralityTree->Branch("yVertex", &fyVertex,"yVertex/D");
1487  fCentralityTree->Branch("zVertex", &fzVertex,"zVertex/D");
1488  fCentralityTree->Branch("vertexer3d", &fVertexer3d,"vertexer3d/O");
1489  fCentralityTree->Branch("nTracklets", &fNTracklets,"nTracklets/I");
1490  fCentralityTree->Branch("nClusters", fNClusters,"nClusters[2]/I");
1491  //
1492  fCentralityTree->Branch("isV0ATriggered", &fIsV0ATriggered,"isV0ATriggered/I");
1493  fCentralityTree->Branch("isV0CTriggered", &fIsV0CTriggered,"isV0CTriggered/I");
1494  fCentralityTree->Branch("multV0A", &fMultV0A,"multV0A/F");
1495  fCentralityTree->Branch("multV0C", &fMultV0C,"multV0C/F");
1496  fCentralityTree->Branch("ringmultV0", fRingMultV0,"ringmultV0[8]/F");
1497 
1498  fCentralityTree->Branch("znctower", fZNCtower, "znctower[5]/F");
1499  fCentralityTree->Branch("zpctower", fZPCtower, "zpctower[5]/F");
1500  fCentralityTree->Branch("znatower", fZNAtower, "znatower[5]/F");
1501  fCentralityTree->Branch("zpatower", fZPAtower, "zpatower[5]/F");
1502  fCentralityTree->Branch("znctowerLG", fZNCtowerLG, "znctowerLG[5]/F");
1503  fCentralityTree->Branch("zpctowerLG", fZPCtowerLG, "zpctowerLG[5]/F");
1504  fCentralityTree->Branch("znatowerLG", fZNAtowerLG, "znatowerLG[5]/F");
1505  fCentralityTree->Branch("zpatowerLG", fZPAtowerLG, "zpatowerLG[5]/F");
1506 
1507  //fCentralityTree->Branch("tdc", fTDCvalues, "tdc[32][4]/I");
1508  //fCentralityTree->Branch("tdcSum", &fTDCSum, "tdcSum/F");
1509  //fCentralityTree->Branch("tdcDiff", &fTDCDiff, "tdcDiff/F");
1510 
1512  fCentralityTree->Branch("centrV0Amult", &fCentralityV0A, "centrV0Amult/F");
1513  fCentralityTree->Branch("centrV0Cmult", &fCentralityV0C, "centrV0Cmult/F");
1514  fCentralityTree->Branch("centrSPDclu1", &fCentralityCL1, "centrSPDclu1/F");
1515  fCentralityTree->Branch("centrZNA", &fCentralityZNA, "centrZNA/F");
1516  fCentralityTree->Branch("centrZNC", &fCentralityZNC, "centrZNC/F");
1517  }
1518 
1519  for(Int_t itt=0; itt<fnHadronTTBins; itt++){
1520  name = Form("hadronTTbin_%d_%d",fHadronTTLowPt[itt],fHadronTTHighPt[itt]);
1521  object = name;
1522  object.Append("/I"); //Number of tracks in given bin
1523 
1524  fCentralityTree->Branch(name.Data(), &(fHadronTT[itt]), object.Data());
1525  }
1526 
1527  for(Int_t ijj=0; ijj<fnJetChTTBins; ijj++){
1528  name = Form("jetchTTbin_%d_%d",fJetChTTLowPt[ijj],fJetChTTHighPt[ijj]);
1529  object = name;
1530  object.Append("/I"); //Number of jets in given bin
1531 
1532  fCentralityTree->Branch(name.Data(), &(fJetChTT[ijj]), object.Data());
1533  }
1534 
1535  fOutput->Add(fCentralityTree);
1536  }
1537 
1538 
1539 
1540  // =========== Switch on Sumw2 for all histos ===========
1541  for(Int_t i=0; i<fOutput->GetEntries(); i++){
1542  TH1 *h1 = dynamic_cast<TH1*>(fOutput->At(i));
1543  if(h1){
1544  h1->Sumw2();
1545  continue;
1546  }
1547  THnSparse *hn = dynamic_cast<THnSparse*>(fOutput->At(i));
1548  if(hn){
1549  hn->Sumw2();
1550  }
1551  }
1552  TH1::AddDirectory(oldStatus);
1553 
1554 
1555  PostData(1, fOutput);
1556 }
1557 //________________________________________________________________________
1559  //
1560  // retrieve event objects
1561  //
1562  if(!AliAnalysisTaskEmcalJet::RetrieveEventObjects()) return kFALSE;
1563 
1564  return kTRUE;
1565 }
1566 //________________________________________________________________________
1568  // Run analysis code here, if needed. It will be executed before FillHistograms().
1569 
1570  if(!fCaloCells){
1571  if(fCaloCellsName.IsNull()){
1572  fCaloCells = InputEvent()->GetEMCALCells();
1573  }else{
1574  fCaloCells = dynamic_cast<AliVCaloCells*>(InputEvent()->FindListObject(fCaloCellsName));
1575  if(!fCaloCells) AliError(Form("%s: Could not retrieve cells %s!", GetName(), fCaloCellsName.Data()));
1576  }
1577  cout<<"load calo cells"<<endl;
1578  }
1579 
1580 
1581 
1582  return kTRUE;
1583 }
1584 
1585 //________________________________________________________________________
1586 
AliAnalysisUtils * fHelperClass
AliClusterContainer * fClusterContainerDetLevel
particle level jet container
TH1D * fhMultTTHinMB[fkTTbins]
V0A vs V0C biased with cluster TT in Gamma trigger.
Bool_t FillHistograms()
Function filling histograms.
Float_t fCentralityZNC
Centrality from ZNA.
Bool_t fVertexer3d
Z vertex from ITS.
TH2F * fhClusterEtaInclMB
minimum bias phi inclusive cluster
TH1F * fhRhoTTCinGA[fkTTbins]
in events MB with cluster TT
Double_t Area() const
Definition: AliEmcalJet.h:130
TH2F * fhTrackEtaIncl
minimum bias phi inclusive ch hadron
TH1D * fhNormSumV0AV0CTTCinMB[fkTTbins]
distributions of (mult V0/mean V0A) + (mult VC/mean V0C) with ch jet TT
Int_t fJetChTTHighPt[fkTTbins]
double Double_t
Definition: External.C:58
Bool_t CheckCellFiducialRegion(const AliEMCALGeometry *geom, const AliVCluster *cluster, AliVCaloCells *cells)
Definition: External.C:236
AliJetContainer * GetJetContainer(Int_t i=0) const
TH1D * fhNormSumV0AV0CMB
distributions of centrality estimators: mult V0, mult VC, tracklets, znatower0, znctower0 ...
void SetNumberOfCellsFromEMCALBorder(Int_t n)
Double_t Eta() const
Definition: AliEmcalJet.h:121
void SetMCParticleContainerName(const char *name)
Int_t fNClusters[2]
no. tracklets
Double_t Phi() const
Definition: AliEmcalJet.h:117
Float_t fZPCtowerLG[5]
ZNC 5 tower signals.
Float_t fCentralityV0C
Centrality from V0A.
Container with name, TClonesArray and cuts for particles.
void SetExternalRhoTaskNameMC(const char *name)
TString fMyParticleContainerName
Float_t fZNCtower[5]
ZEM2 Energy.
Bool_t fIsEmcalTrig
triggered by Min Bias Trig
TH2F * fhTrackPhiIncl
gc vertexZ inclusive
void SetExternalRhoTaskName(const char *name)
Float_t fMultV0Cnorm
mult. V0A normalized by mean V0A
TH2F * fhV0AvsV0CTTJ[fkTTbins]
V0A vs V0C biased with hadron TT.
TH1I * fHistEvtSelection
trigger if tracks/jets are loaded initiates calling ExecOnce
void SetUseNewCentralityEstimation(Bool_t b)
void SetMinPt(Double_t min)
void SetAcceptanceWindows(Double_t trackEta)
TH1F * fhVertexZ
gc event statistics
TH1D * fhCentralityTTH[fkCE][fkTTbins]
estimated centrality based on mult V0, mult VC, tracklets, znatower0, znctower0
Full acceptance, i.e. no acceptance cut applied – left to user.
Definition: AliEmcalJet.h:77
TH2F * fhV0AvsV0CTTH[fkTTbins]
V0C vs SPD in MB.
AliJetContainer * AddJetContainer(const char *n, TString defaultCutType, Float_t jetRadius=0.4)
void SetPercAreaCut(Float_t p)
TH1D * fhMultTTCinGA[fkTTbins]
multiplicity of cluster TT in MB event
Float_t fMultV0A
V0C decision.
TH2F * fhJetEtaIncl
minimum bias phi inclusive ch jet
void SetEtaLimits(Double_t min, Double_t max)
TH2F * fhV0AvsV0C
distributions of (mult V0/mean V0A) + (mult VC/mean V0C) with cluster TT in Gamma trigger ...
Float_t fMultV0Anorm
mult. V0C
Int_t fJetChTT[fkTTbins]
array which stores the number of triggers in given event
AliClusterContainer * AddClusterContainer(const char *n)
Create new cluster container and attach it to the task.
Some utilities for cluster and cell treatment.
Int_t fHadronTTHighPt[fkTTbins]
Container for particles within the EMCAL framework.
void SetIsPythia(Bool_t i)
Define production as pythia pt-hard production.
Float_t fZPAtower[5]
ZNA 5 tower signals.
Float_t fMultV0C
mult. V0A
AliParticleContainer * GetParticleContainer(Int_t i=0) const
Get particle container attached to this task.
void SetSystem(Int_t sys)
Int_t fClusterTTHighPt[fkTTbins]
Float_t fZPCtower[5]
ZNC 5 tower signals.
TH1D * fhSignalTTJ[fkCE][fkTTbins]
distributions of centrality estimators biased with hadron TT
const AliJetIterableMomentumContainer accepted_momentum() const
int Int_t
Definition: External.C:63
Int_t GetMaxDistanceFromBorder(AliVCluster *cluster)
TH1D * fhMultTTJinMB[fkTTbins]
multiplicity of hadron TT in MB event
Definition: External.C:204
Bool_t fFillTTree
array which stores the number of jets in given event
unsigned int UInt_t
Definition: External.C:33
Int_t fNTracklets
Is vertex from 3d vertexer?
float Float_t
Definition: External.C:68
AliEMCALGeometry * fGeom
!emcal geometry
TH1D * fhVertex[fkVtx]
in events GA with cluster TT
AliParticleContainer * fParticleContainerPartLevel
detector level track container
void SetUsePileUpCut(Bool_t val)
TH2F * fhClusterPhiInclGA
minimum bias eta inclusive
TH1D * fhNormSumV0AV0CTTJ[fkTTbins]
distributions of (mult V0/mean V0A) + (mult VC/mean V0C) with hadron TT
Float_t fCentralityV0A
triggered by EMCAL
TH1D * fhSignalTTCinGA[fkCE][fkTTbins]
distributions of centrality estimators biased with cluster TT in min bias
Double_t fxVertex
Centrality from ZNC.
Float_t fZPAtowerLG[5]
ZNA 5 tower signals.
AliClusterContainer * GetClusterContainer(Int_t i=0) const
Get cluster container attached to this task.
Definition: External.C:212
Int_t fIsV0CTriggered
VOA decision.
TH1D * fhNormSumV0AV0CTTCinGA[fkTTbins]
distributions of (mult V0/mean V0A) + (mult VC/mean V0C) with cluster TT in min bias ...
Int_t fHadronTT[fkTTbins]
TString fMyJetParticleContainerName
void SetClusterContainerName(const char *name)
Float_t fCentralityZNA
Centrality from Clusters in layer 1.
TH1F * fhRhoTTJ[fkTTbins]
in events MB with hadron TT
const AliClusterIterableContainer accepted() const
TH2F * fhV0AvsV0CTTCinGA[fkTTbins]
V0A vs V0C biased with cluster TT in min bias.
TH1D * fhSignalMB[fkCE]
estimated centrality in GA events biased with cluster TT
Bool_t fIsMinBiasTrig
fired trigger classes
TString fCaloCellsName
name of calo cell collection
void SetJetContainerName(const char *name)
char fTrigClass[1000]
object which handels centrality
Float_t fZNAtowerLG[5]
ZPC 5 tower signals.
Bool_t FinalClusterCuts(AliVCluster *cluster)
Float_t fZEM2Energy
ZEM1 Energy.
TH1D * fhCentralityMB[fkCE]
vertex distribution in events biased with hadron TT
Int_t fClusterTTLowPt[fkTTbins]
Double_t fTrackEtaWindow
ZPA 5 tower signals.
Float_t fZEM1Energy
V0 ring mult.
AliMCParticleContainer * AddMCParticleContainer(const char *n)
Create new container for MC particles and attach it to the task.
void SetClassName(const char *clname)
Double_t fZVertexCut
multiplicity of cluster TT in Gamma trigger event
void SetTrackContainerName(const char *name)
Bool_t RetrieveEventObjects()
Retrieve common objects from event.
TH2F * fhJetPhiIncl
minimum bias eta inclusive
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)
TH2F * fhClusterEtaInclGA
minimum bias phi inclusive cluster
TH1D * fhCentralityTTCinGA[fkCE][fkTTbins]
estimated centrality in MB events biased with cluster TT
TH1D * fhSignalTTH[fkCE][fkTTbins]
distributions of (mult V0/mean V0A) + (mult VC/mean V0C) in MB
AliVCaloCells * fCaloCells
!cells
void ConnectParticleContainer(AliParticleContainer *c)
Double_t Pt() const
Definition: AliEmcalJet.h:109
Enhanced TList-derived class that implements correct merging for pt_hard binned production.
Definition: AliEmcalList.h:25
Bool_t isMC
void SetMC(Int_t bMC)
AliEmcalList * fOutput
!output list
TH1F * fhRhoTTCinMB[fkTTbins]
in events MB with jet TT
void Terminate(Option_t *)
Double_t fyVertex
X vertex from ITS.
TH1D * fhVertexTTH[fkVtx][fkTTbins]
vertex distribution
AliEMCALRecoUtils * fFiducialCellCut
!
TH1F * fhRhoIncl
minimum bias eta inclusive
AliTrackContainer * AddTrackContainer(const char *n)
Create new track container and attach it to the task.
Int_t fClusterTT[fkTTbins]
array which stores the number of jets in given event
AliTrackContainer * GetTrackContainer(Int_t i=0) const
Int_t fJetChTTLowPt[fkTTbins]
void SetMakeGeneralHistograms(Bool_t g)
Enable general histograms.
Float_t fZNAtower[5]
ZPC 5 tower signals.
TH2F * fhClusterPhiInclMB
minimum bias eta inclusive
Bool_t GetMomentum(TLorentzVector &mom, const AliVCluster *vc, Double_t mass) const
Base task in the EMCAL jet framework.
Double_t fzVertex
Y vertex from ITS.
Represent a jet reconstructed using the EMCal jet framework.
Definition: AliEmcalJet.h:51
TH2F * fhV0CvsSPD
V0A vs SPD in MB.
AliJetContainer * fJetContainerPartLevel
detector level jet container
const AliTrackIterableMomentumContainer accepted_momentum() const
Float_t fCentralityCL1
Centrality from V0C.
AliJetContainer * fJetContainerDetLevel
particle level container with particles
Bool_t IsTrackInAcceptance(AliVParticle *track, Bool_t isGen=0)
const char Option_t
Definition: External.C:48
TH1D * fhCentralityTTJ[fkCE][fkTTbins]
estimated centrality in events biased with hadron TT
AliTrackContainer * fTrkContainerDetLevel
void UserCreateOutputObjects()
Main initialization function on the worker.
Bool_t Run()
Run function. This is the core function of the analysis and contains the user code. Therefore users have to implement this function.
void SetJetAcceptanceType(UInt_t type)
TH2F * fhV0AvsV0CTTCinMB[fkTTbins]
V0A vs V0C biased with ch jet TT.
bool Bool_t
Definition: External.C:53
Bool_t fInitializedLocal
Vertex selection helper.
TH1D * fhSignalTTCinMB[fkCE][fkTTbins]
distributions of centrality estimators biased with ch jet TT
void SetMaxTrackPt(Float_t b)
TString fRhoTaskName
detector level EMCAL cluster container
void SetClusTimeCut(Double_t min, Double_t max)
TH1D * fhMultTTCinMB[fkTTbins]
multiplicity of charged jet TT in MB event
void SetJetEtaLimits(Float_t min, Float_t max)
Int_t fHadronTTLowPt[fkTTbins]
Bool_t IsEventInAcceptance(AliVEvent *event)
static AliAnalysisTaskEA * AddTaskEA(Int_t system=AliAnalysisTaskEA::kpPb, const char *jetarrayname="Jet_AKTChargedR040_tracks_pT0150_pt_scheme", const char *jetarraynameMC="Jet_AKTChargedR040_mcparticles_pT0150_pt_scheme", const char *trackarrayname="tracks", const char *mcpariclearrayname="mcparticles", const char *clusterarrayname="caloClusters", const char *rhoname="", const char *mcrhoname="", Double_t jetRadius=0.4, UInt_t trigger=AliVEvent::kAny, Int_t isMC=0, Double_t trackEtaWindow=0.9, Bool_t useVertexCut=kTRUE, Bool_t usePileUpCut=kTRUE, Double_t acut=0.6, Double_t emcaltofcut=30e-9, const char *suffix="")
Container structure for EMCAL clusters.
TH1D * fhCentralityTTCinMB[fkCE][fkTTbins]
estimated centrality in events biased with ch jet TT
Int_t fIsV0ATriggered
no. clusters on SPD layers
Float_t fZNCtowerLG[5]
ZPA 5 tower signals.
void SetExoticCut(Bool_t e)
Container for jet within the EMCAL jet framework.
Definition: External.C:196
Double_t GetExternalRho(Bool_t isMC)
Float_t fRingMultV0[8]
mult. V0A+V0C normalized by means
TH1F * fhRhoTTH[fkTTbins]
minimum bias rho inclusive
void SetMCJetContainerName(const char *name)
Float_t fMultV0AV0Cnorm
mult. V0C normalized by mean V0C
AliMultSelection * fMultSelection
output tree
TH2F * fhV0AvsSPD
V0A vs V0C in MB.
void SetUseDefaultVertexCut(Bool_t val)
TH1D * fhNormSumV0AV0CTTH[fkTTbins]
distributions of centrality estimators biased with cluster TT in Gamma trigger