1 //_________________________________________________________________________
2 // Utility Class for transverse energy studies
3 // Base class for ESD & MC analysis
4 // - reconstruction and MonteCarlo output
7 //*-- Authors: Oystein Djuvsland (Bergen), David Silvermyr (ORNL)
8 //_________________________________________________________________________
10 #include "AliAnalysisEt.h"
18 #include "AliAnalysisEtCuts.h"
19 #include "AliESDtrackCuts.h"
20 #include "AliESDCaloCluster.h"
21 #include "AliVEvent.h"
24 #include "AliCentrality.h"
25 #include "AliAnalysisEtSelector.h"
26 #include "AliAnalysisEtTrackMatchCorrections.h"
27 #include "AliAnalysisEtRecEffCorrection.h"
30 #include "AliPIDResponse.h"
31 #include "AliTPCPIDResponse.h"
32 #include "AliInputEventHandler.h"
33 #include "AliAnalysisManager.h"
36 ClassImp(AliAnalysisEt);
38 /* Auxiliary Histogram variables */
39 Int_t AliAnalysisEt::fgnumOfEtaBins = 16;
40 Float_t AliAnalysisEt::fgEtaAxis[17]={-0.78, -0.7, -0.58, -0.46, -0.34, -0.22, -0.12, -0.06, -0.0, 0.06, 0.12, 0.22, 0.34, 0.46, 0.58, 0.7, 0.78};
42 Int_t AliAnalysisEt::fgNumOfPtBins = 111;
43 Float_t AliAnalysisEt::fgPtAxis[117]=
44 {0.0,0.01,0.02,0.03,0.04, 0.05, 0.06,0.07,0.08,0.09, 0.10,0.11, .12,0.13, .14,0.15, .16,0.17, .18,0.19,
45 0.2, .22, .24, .26, .28, 0.30, 0.32, .34, .36, .38, 0.40, .42, .44, .46, .48,
46 0.5, .52, .54, .56, .58, 0.60, 0.62, .64, .66, .68, 0.70, .72, .74, .76, .78,
47 .80, .82, .84, .86, .88, 0.90, 0.92, .94, .96, .98, 1.00,1.05, 1.1,1.15, 1.2,
48 1.25, 1.3,1.35,1.40,1.45, 1.50, 1.55, 1.6,1.65, 1.7, 1.75, 1.8,1.85, 1.9,1.95,
49 2.0, 2.2, 2.4, 2.6, 2.8, 3.00, 3.20, 3.4, 3.6, 3.8, 4.00, 4.2, 4.4, 4.6, 4.8,
50 5.0, 5.5, 6.0, 6.5, 7.0, 7.50, 8.00, 8.5, 9.0, 9.5, 10.0,12.0,14.0,16.0,18.0,
51 20.0,25.0,30.0,35.0,40.0, 45.0, 50.0};
53 Int_t AliAnalysisEt::fgNumOfEBins = 78;
54 Float_t AliAnalysisEt::fgEAxis[79]={0., 0.05, 0.10, 0.15, 0.20, 0.25, 0.30, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95,
55 1.,1.5,2.,2.5,3.,3.5,4.,4.5,5.,5.5,6.,6.5,7.,7.5,8.,8.5,9.,9.5,10.,11.,
56 12.,13.,14.,15.,16.,17.,18.,19.,20.,21.,22.,23.,24.,25.,26.,27.,28.,29.,30.,31.,
57 32.,33.,34.,35.,36.,37.,38.,39.,40.,41.,42.,43.,44.,45.,46.,47.,48.,49.,50.};
59 Int_t AliAnalysisEt::fgNumOfRBins = 47;
60 Float_t AliAnalysisEt::fgRAxis[48]={-2.,-1.,0.,0.0005,0.001,0.0015,0.002,0.0025,0.003,0.0035,0.004,0.0045,0.005,0.0055,0.006,0.0065,0.007,0.0075,0.008,0.0085,0.009,0.0095,0.01,
61 0.011,0.012,0.013,0.014,0.015,0.016,0.017,0.018,0.019,0.020,0.022,0.024,0.026,0.028,0.03,0.032,0.034,0.036,0.038,0.04,0.042,0.044,0.046,0.048,0.05};
64 AliAnalysisEt::AliAnalysisEt() : AliAnalysisEtCommon()
77 ,fChargedMultiplicity(0)
78 ,fNeutralMultiplicity(0)
96 ,fAntiProtonRemovedEt(0)
98 ,fAntiNeutronRemovedEt(0)
101 ,fPiMinusRemovedEt(0)
106 ,fMuMinusRemovedEt(0)
127 ,fProtonRemovedMult(0)
128 ,fAntiProtonRemovedMult(0)
129 ,fNeutronRemovedMult(0)
130 ,fAntiNeutronRemovedMult(0)
132 ,fPiPlusRemovedMult(0)
133 ,fPiMinusRemovedMult(0)
134 ,fKPlusRemovedMult(0)
135 ,fKMinusRemovedMult(0)
138 ,fMuMinusRemovedMult(0)
139 ,fMuPlusRemovedMult(0)
140 ,fEMinusRemovedMult(0)
141 ,fEPlusRemovedMult(0)
142 ,fGammaRemovedMult(0)
148 ,fTrackPassedCut(kFALSE)
151 ,fSingleCellEnergyCut(0)
152 ,fChargedEnergyRemoved(0)
153 ,fNeutralEnergyRemoved(0)
154 ,fGammaEnergyAdded(0)
167 AliAnalysisEt::~AliAnalysisEt()
169 delete fTmCorrections;
170 delete fReCorrections;
172 fDepositTree->Clear();
173 delete fDepositTree; // optional TTree
175 if(fEventSummaryTree)
177 fEventSummaryTree->Clear();
178 delete fEventSummaryTree;
182 fAcceptedTree->Clear();
183 delete fAcceptedTree;
185 delete fHistEt; //Et spectrum
186 delete fHistNeutralMult; //Neutral multiplicity
187 delete fHistPhivsPtPos; //phi vs pT plot for positive tracks
188 delete fHistPhivsPtNeg; //phi vs pT Moplot for negative tracks
189 //delete fCentrality;//this code does not actually own AliCentrality so we don't have to worry about deleting it... we just borrow it...
195 void AliAnalysisEt::FillOutputList(TList *list)
196 { // histograms to be added to output
198 list->Add(fHistNeutralMult);
200 list->Add(fHistPhivsPtPos);
201 list->Add(fHistPhivsPtNeg);
204 if (fCuts->GetHistMakeTree()) {
206 list->Add(fEventSummaryTree);
208 if (fCuts->GetHistMakeTreeDeposit()) {
209 list->Add(fDepositTree);
215 AliAnalysisManager *man=AliAnalysisManager::GetAnalysisManager();
217 AliFatal("Analysis manager needed");
221 AliInputEventHandler *inputHandler=dynamic_cast<AliInputEventHandler*>(man->GetInputEventHandler());
223 AliFatal("Input handler needed");
227 //pid response object
228 fPIDResponse=inputHandler->GetPIDResponse();
229 if (!fPIDResponse) AliError("PIDResponse object was not created");
233 void AliAnalysisEt::Init()
234 {// clear variables, set up cuts and PDG info
235 AliAnalysisEtCommon::Init();
236 if(ReadCorrections("calocorrections.root") != 0)
238 // Shouldn't do this, why oh why are exceptions not allowed?
245 void AliAnalysisEt::CreateHistograms()
246 { // create histograms..
247 // histogram binning for E_T, p_T and Multiplicity: defaults for p+p
248 Int_t nbinsEt = 10000;
249 Double_t minEt = 0.0;
250 Double_t maxEt = 1000;
254 Int_t nbinsMult = 200;
255 Double_t minMult = -0.5; // offset -0.5 to have integer bins centered around 0
256 Double_t maxMult = nbinsMult + minMult; // 1 bin per integer value
258 // see if we should change histogram limits etc, and possibly create a tree
260 if (fCuts->GetHistMakeTree()) {
264 nbinsMult = fCuts->GetHistNbinsMult();
265 minMult = fCuts->GetHistMinMult();
266 maxMult = fCuts->GetHistMaxMult();
268 nbinsEt = fCuts->GetHistNbinsTotEt();
269 minEt = fCuts->GetHistMinTotEt();
270 maxEt = fCuts->GetHistMaxTotEt();
272 nbinsPt = fCuts->GetHistNbinsParticlePt();
273 minPt = fCuts->GetHistMinParticlePt();
274 maxPt = fCuts->GetHistMaxParticlePt();
277 TString histname = "fHistEt" + fHistogramNameSuffix;
278 fHistEt = new TH1F(histname.Data(), "Total E_{T} Distribution", nbinsEt, minEt, maxEt);
279 fHistEt->GetXaxis()->SetTitle("E_{T} (GeV/c^{2})");
280 fHistEt->GetYaxis()->SetTitle("dN/dE_{T} (c^{2}/GeV)");
282 histname = "fHistNeutralMult" + fHistogramNameSuffix;
283 fHistNeutralMult = new TH1F(histname.Data(), "Neutral Multiplicity", nbinsMult, minMult, maxMult);
284 fHistNeutralMult->GetXaxis()->SetTitle("N");
285 fHistNeutralMult->GetYaxis()->SetTitle("Multiplicity");
287 histname = "fHistPhivsPtPos" + fHistogramNameSuffix;
288 fHistPhivsPtPos = new TH2F(histname.Data(), "Phi vs pT of positively charged tracks hitting the calorimeter", 200, 0, 2*TMath::Pi(), nbinsPt, minPt, maxPt);
290 histname = "fHistPhivsPtNeg" + fHistogramNameSuffix;
291 fHistPhivsPtNeg = new TH2F(histname.Data(), "Phi vs pT of negatively charged tracks hitting the calorimeter", 200, 0, 2*TMath::Pi(), nbinsPt, minPt, maxPt);
293 histname = "fCutFlow" + fHistogramNameSuffix;
294 fCutFlow = new TH1I(histname, histname, 20, -0.5, 19.5);
297 TH2F* AliAnalysisEt::CreateEtaEHisto2D(TString name, TString title, TString ztitle)
298 { //creates a 2-d histogram in eta and E and adds it to the list of histograms to be saved
299 TString histoname = name + fHistogramNameSuffix;
301 TH2F *histo = new TH2F(histoname.Data(),title.Data(),fgNumOfEBins, fgEAxis, fgnumOfEtaBins, fgEtaAxis);
302 histo->SetYTitle("#eta");
303 histo->SetXTitle("E (GeV)");
304 histo->SetZTitle(ztitle.Data());
311 TH2F* AliAnalysisEt::CreateEtaPtHisto2D(TString name, TString title, TString ztitle)
312 { //creates a 2-d histogram in eta and phi and adds it to the list of histograms to be saved
313 TString histoname = name + fHistogramNameSuffix;
315 TH2F *histo = new TH2F(histoname.Data(),title.Data(),fgNumOfPtBins, fgPtAxis, fgnumOfEtaBins, fgEtaAxis);
316 histo->SetYTitle("#eta");
317 histo->SetXTitle("p_{T}");
318 histo->SetZTitle(ztitle.Data());
324 TH2F* AliAnalysisEt::CreateEtaEtHisto2D(TString name, TString title, TString ztitle)
325 { //creates a 2-d histogram in eta and phi and adds it to the list of histograms to be saved
326 TString histoname = name + fHistogramNameSuffix;
328 TH2F *histo = new TH2F(histoname.Data(),title.Data(),fgNumOfEBins, fgEAxis, fgnumOfEtaBins, fgEtaAxis);
329 histo->SetYTitle("#eta");
330 histo->SetXTitle("E_{T}");
331 histo->SetZTitle(ztitle.Data());
337 TH2F* AliAnalysisEt::CreateResEHisto2D(TString name, TString title, TString ztitle)
338 { //creates a 2-d histogram in eta and E and adds it to the list of histograms to be saved
339 TString histoname = name + fHistogramNameSuffix;
341 TH2F *histo = new TH2F(histoname.Data(),title.Data(),fgNumOfEBins, fgEAxis, fgNumOfRBins, fgRAxis);
342 histo->SetYTitle("R");
343 histo->SetXTitle("E (GeV)");
344 histo->SetZTitle(ztitle.Data());
351 TH2F* AliAnalysisEt::CreateResPtHisto2D(TString name, TString title, TString ztitle)
352 { //creates a 2-d histogram in eta and phi and adds it to the list of histograms to be saved
353 TString histoname = name + fHistogramNameSuffix;
355 TH2F *histo = new TH2F(histoname.Data(),title.Data(),fgNumOfPtBins, fgPtAxis, fgNumOfRBins, fgRAxis);
356 histo->SetYTitle("R");
357 histo->SetXTitle("p_{T}");
358 histo->SetZTitle(ztitle.Data());
364 THnSparseF* AliAnalysisEt::CreateClusterHistoSparse(TString name, TString title)
365 { //creates a 2D sparse histogram
366 TString histoname = name + fHistogramNameSuffix;
368 Int_t nBins[4] = {200,200,240,20};
369 Double_t min[4] = {0.,-1.,70.,0.5};
370 Double_t max[4] = {50.,1.,190,20.5};
372 THnSparseF *histo = new THnSparseF(histoname.Data(),title.Data(),4,nBins,min, max);
373 histo->GetAxis(0)->SetTitle("E");
374 histo->GetAxis(1)->SetTitle("#eta_{cluster}");
375 histo->GetAxis(2)->SetTitle("#phi_{cluster}");
376 histo->GetAxis(3)->SetTitle("n_{cells}");
382 THnSparseF* AliAnalysisEt::CreateNeutralPartHistoSparse(TString name, TString title)
383 { //creates a sparse neutral particle histogram
384 TString histoname = name + fHistogramNameSuffix;
386 Int_t nBins[6] = {20,200,200,200,240,20};
387 Double_t min[6] = {-1.,0.,0.,-1.,70.,0.5};
388 Double_t max[6] = {1.,50.,50.,1.,190,20.5};
390 THnSparseF *histo = new THnSparseF(histoname.Data(),title.Data(),6,nBins,min, max);
391 histo->GetAxis(0)->SetTitle("#eta");
392 histo->GetAxis(1)->SetTitle("p_{T}");
393 histo->GetAxis(2)->SetTitle("E");
394 histo->GetAxis(3)->SetTitle("#eta_{cluster}");
395 histo->GetAxis(4)->SetTitle("#phi_{cluster}");
396 histo->GetAxis(5)->SetTitle("n_{cells}");
402 THnSparseF* AliAnalysisEt::CreateChargedPartHistoSparse(TString name, TString title)
403 { //creates a sparse charged particle histogram
404 TString histoname = name + fHistogramNameSuffix;
406 Int_t nBins[7] = {20,200,200,200,240,20,100};
407 Double_t min[7] = {-1.,0.,0.,-1.,70.,0.5,0.};
408 Double_t max[7] = {1.,50.,50.,1.,190,20.5,0.1};
410 THnSparseF *histo = new THnSparseF(histoname.Data(),title.Data(),7,nBins,min, max);
411 histo->GetAxis(0)->SetTitle("#eta");
412 histo->GetAxis(1)->SetTitle("p_{T}");
413 histo->GetAxis(2)->SetTitle("E");
414 histo->GetAxis(3)->SetTitle("#eta_{cluster}");
415 histo->GetAxis(4)->SetTitle("#phi_{cluster}");
416 histo->GetAxis(5)->SetTitle("n_{cells}");
417 histo->GetAxis(6)->SetTitle("R_{match}");
424 void AliAnalysisEt::CreateTrees()
426 TString treename = "fEventSummaryTree" + fHistogramNameSuffix;
427 if(fCuts->GetHistMakeTree())
430 fEventSummaryTree = new TTree(treename, treename);
431 fEventSummaryTree->Branch("fTotEt",&fTotEt,"fTotEt/D");
432 fEventSummaryTree->Branch("fTotEtAcc",&fTotEtAcc,"fTotEtAcc/D");
433 fEventSummaryTree->Branch("fTotNeutralEt",&fTotNeutralEt,"fTotNeutralEt/D");
434 fEventSummaryTree->Branch("fTotNeutralEtAcc",&fTotNeutralEtAcc,"fTotNeutralEtAcc/D");
435 fEventSummaryTree->Branch("fTotChargedEt",&fTotChargedEt,"fTotChargedEt/D");
436 fEventSummaryTree->Branch("fTotChargedEtAcc",&fTotChargedEtAcc,"fTotChargedEtAcc/D");
437 fEventSummaryTree->Branch("fMultiplicity",&fMultiplicity,"fMultiplicity/I");
438 fEventSummaryTree->Branch("fChargedMultiplicity",&fChargedMultiplicity,"fChargedMultiplicity/I");
439 fEventSummaryTree->Branch("fNeutralMultiplicity",&fNeutralMultiplicity,"fNeutralMultiplicity/I");
440 fEventSummaryTree->Branch("fCentClass",&fCentClass,"fCentClass/I");
441 fEventSummaryTree->Branch("fChargedEnergyRemoved", &fChargedEnergyRemoved, "fChargedEnergyRemoved/D");
442 fEventSummaryTree->Branch("fNeutralEnergyRemoved", &fNeutralEnergyRemoved, "fNeutralEnergyRemoved/D");
443 fEventSummaryTree->Branch("fGammaEnergyAdded", &fGammaEnergyAdded, "fGammaEnergyAdded/D");
446 fEventSummaryTree->Branch("fProtonEt",&fProtonEt,"fProtonEt/D");
447 fEventSummaryTree->Branch("fAntiProtonEt",&fAntiProtonEt,"fAntiProtonEt/D");
449 fEventSummaryTree->Branch("fNeutronEt",&fNeutronEt,"fNeutronEt/D");
450 fEventSummaryTree->Branch("fAntiNeutronEt",&fAntiNeutronEt,"fAntiNeutronEt/D");
452 fEventSummaryTree->Branch("fPi0Et",&fPi0Et,"fPi0Et/D");
453 fEventSummaryTree->Branch("fPiPlusEt",&fPiPlusEt,"fPiPlusEt/D");
454 fEventSummaryTree->Branch("fPiMinusEt",&fPiMinusEt,"fPiMinusEt/D");
456 fEventSummaryTree->Branch("fKPlusEt",&fKPlusEt,"fKPlusEt/D");
457 fEventSummaryTree->Branch("fKMinusEt",&fKMinusEt,"fKMinusEt/D");
458 fEventSummaryTree->Branch("fK0sEt",&fK0sEt,"fK0sEt/D");
459 fEventSummaryTree->Branch("fK0lEt",&fK0lEt,"fK0lEt/D");
461 fEventSummaryTree->Branch("fMuMinusEt",&fMuMinusEt,"fMuMinusEt/D");
462 fEventSummaryTree->Branch("fMuPlusEt",&fMuPlusEt,"fMuPlusEt/D");
464 fEventSummaryTree->Branch("fEMinusEt",&fEMinusEt,"fEMinusEt/D");
465 fEventSummaryTree->Branch("fEPlusEt",&fEPlusEt,"fEPlusEt/D");
467 fEventSummaryTree->Branch("fGammaEt", &fGammaEt, "fGammaEt/D");
469 fEventSummaryTree->Branch("fProtonRemovedEt",&fProtonRemovedEt,"fProtonRemovedEt/D");
470 fEventSummaryTree->Branch("fAntiProtonRemovedEt",&fAntiProtonRemovedEt,"fAntiProtonRemovedEt/D");
472 fEventSummaryTree->Branch("fNeutronRemovedEt",&fNeutronRemovedEt,"fNeutronRemovedEt/D");
473 fEventSummaryTree->Branch("fAntiNeutronRemovedEt",&fAntiNeutronRemovedEt,"fAntiNeutronRemovedEt/D");
475 fEventSummaryTree->Branch("fPi0RemovedEt",&fPi0RemovedEt,"fPi0RemovedEt/D");
476 fEventSummaryTree->Branch("fPiPlusRemovedEt",&fPiPlusRemovedEt,"fPiPlusRemovedEt/D");
477 fEventSummaryTree->Branch("fPiMinusRemovedEt",&fPiMinusRemovedEt,"fPiMinusRemovedEt/D");
479 fEventSummaryTree->Branch("fKPlusRemovedEt",&fKPlusRemovedEt,"fKPlusRemovedEt/D");
480 fEventSummaryTree->Branch("fKMinusRemovedEt",&fKMinusEt,"fKMinusRemovedEt/D");
481 fEventSummaryTree->Branch("fK0sRemovedEt",&fK0sEt,"fK0sRemovedEt/D");
482 fEventSummaryTree->Branch("fK0lRemovedEt",&fK0lRemovedEt,"fK0lRemovedEt/D");
484 fEventSummaryTree->Branch("fMuMinusRemovedEt",&fMuMinusRemovedEt,"fMuMinusRemovedEt/D");
485 fEventSummaryTree->Branch("fMuPlusRemovedEt",&fMuPlusRemovedEt,"fMuPlusRemovedEt/D");
487 fEventSummaryTree->Branch("fEMinusRemovedEt",&fEMinusRemovedEt,"fEMinusRemovedEt/D");
488 fEventSummaryTree->Branch("fEPlusRemovedEt",&fEPlusRemovedEt,"fEPlusRemovedEt/D");
490 fEventSummaryTree->Branch("fGammaRemovedEt", &fGammaRemovedEt, "fGammaEtRemoved/D");
492 fEventSummaryTree->Branch("fProtonMult",&fProtonMult,"fProtonMult/D");
493 fEventSummaryTree->Branch("fAntiProtonMult",&fAntiProtonMult,"fAntiProtonMult/D");
495 fEventSummaryTree->Branch("fNeutronMult",&fNeutronMult,"fNeutronMult/D");
496 fEventSummaryTree->Branch("fAntiNeutronMult",&fAntiNeutronMult,"fAntiNeutronMult/D");
498 fEventSummaryTree->Branch("fPi0Mult",&fPi0Mult,"fPi0Mult/D");
499 fEventSummaryTree->Branch("fPiPlusMult",&fPiPlusMult,"fPiPlusMult/D");
500 fEventSummaryTree->Branch("fPiMinusMult",&fPiMinusMult,"fPiMinusMult/D");
502 fEventSummaryTree->Branch("fKPlusMult",&fKPlusMult,"fKPlusMult/D");
503 fEventSummaryTree->Branch("fKMinusMult",&fKMinusMult,"fKMinusMult/D");
504 fEventSummaryTree->Branch("fK0sMult",&fK0sMult,"fK0sMult/D");
505 fEventSummaryTree->Branch("fK0lMult",&fK0lMult,"fK0lMult/D");
507 fEventSummaryTree->Branch("fMuMinusMult",&fMuMinusMult,"fMuMinusMult/D");
508 fEventSummaryTree->Branch("fMuPlusMult",&fMuPlusMult,"fMuPlusMult/D");
510 fEventSummaryTree->Branch("fEMinusMult",&fEMinusMult,"fEMinusMult/D");
511 fEventSummaryTree->Branch("fEPlusMult",&fEPlusMult,"fEPlusMult/D");
513 fEventSummaryTree->Branch("fGammaMult", &fGammaMult, "fGammaMult/D");
515 fEventSummaryTree->Branch("fProtonRemovedMult",&fProtonRemovedMult,"fProtonRemovedMult/D");
516 fEventSummaryTree->Branch("fAntiProtonRemovedMult",&fAntiProtonRemovedMult,"fAntiProtonRemovedMult/D");
518 fEventSummaryTree->Branch("fNeutronRemovedMult",&fNeutronRemovedMult,"fNeutronRemovedMult/D");
519 fEventSummaryTree->Branch("fAntiNeutronRemovedMult",&fAntiNeutronRemovedMult,"fAntiNeutronRemovedMult/D");
521 fEventSummaryTree->Branch("fPi0RemovedMult",&fPi0RemovedMult,"fPi0RemovedMult/D");
522 fEventSummaryTree->Branch("fPiPlusRemovedMult",&fPiPlusRemovedMult,"fPiPlusRemovedMult/D");
523 fEventSummaryTree->Branch("fPiMinusRemovedMult",&fPiMinusRemovedMult,"fPiMinusRemovedMult/D");
525 fEventSummaryTree->Branch("fKPlusRemovedMult",&fKPlusRemovedMult,"fKPlusRemovedMult/D");
526 fEventSummaryTree->Branch("fKMinusRemovedMult",&fKMinusMult,"fKMinusRemovedMult/D");
527 fEventSummaryTree->Branch("fK0sRemovedMult",&fK0sMult,"fK0sRemovedMult/D");
528 fEventSummaryTree->Branch("fK0lRemovedMult",&fK0lRemovedMult,"fK0lRemovedMult/D");
530 fEventSummaryTree->Branch("fMuMinusRemovedMult",&fMuMinusRemovedMult,"fMuMinusRemovedMult/D");
531 fEventSummaryTree->Branch("fMuPlusRemovedMult",&fMuPlusRemovedMult,"fMuPlusRemovedMult/D");
533 fEventSummaryTree->Branch("fEMinusRemovedMult",&fEMinusRemovedMult,"fEMinusRemovedMult/D");
534 fEventSummaryTree->Branch("fEPlusRemovedMult",&fEPlusRemovedMult,"fEPlusRemovedMult/D");
536 fEventSummaryTree->Branch("fGammaRemovedMult", &fGammaRemovedMult, "fGammaMultRemoved/D");
542 if(fCuts->GetHistMakeTreeDeposit())
544 treename = "fTreeDeposit" + fHistogramNameSuffix;
545 fDepositTree = new TTree(treename, treename);
547 fDepositTree->Branch("fEnergyDeposited", &fEnergyDeposited, "fEnergyDeposited/F");
548 fDepositTree->Branch("fMomentumTPC", &fMomentumTPC, "fMomentumTPC/F");
549 fDepositTree->Branch("fCharge", &fCharge, "fCharge/S");
550 fDepositTree->Branch("fParticlePid", &fParticlePid, "fParticlePid/S");
551 fDepositTree->Branch("fPidProb", &fPidProb, "fPidProb/F");
552 fDepositTree->Branch("fTrackPassedCut", &fTrackPassedCut, "fTrackPassedCut/B");
557 void AliAnalysisEt::FillHistograms()
558 { // fill histograms..
559 fHistEt->Fill(fTotEt);
561 fHistNeutralMult->Fill(fNeutralMultiplicity);
564 if (fCuts->GetHistMakeTree()) {
565 fEventSummaryTree->Fill();
570 if(fCuts->GetHistMakeTreeDeposit())
572 fDepositTree->Fill();
578 Int_t AliAnalysisEt::AnalyseEvent(AliVEvent *event)
579 { //this line is basically here to eliminate a compiler warning that event is not used. Making it a virtual function did not work with the plugin.
580 AliAnalysisEtCommon::AnalyseEvent(event);
581 //fSelector->SetEvent(event);
586 void AliAnalysisEt::ResetEventValues()
588 AliAnalysisEtCommon::ResetEventValues();
593 fTotNeutralEtAcc = 0;
594 fTotChargedEtAcc = 0;
596 fChargedMultiplicity = 0;
597 fNeutralMultiplicity = 0;
622 fProtonRemovedEt = 0;
623 fAntiProtonRemovedEt = 0;
625 fNeutronRemovedEt = 0;
626 fAntiNeutronRemovedEt = 0;
629 fPiPlusRemovedEt = 0;
630 fPiMinusRemovedEt = 0;
633 fKMinusRemovedEt = 0;
637 fMuMinusRemovedEt = 0;
638 fMuPlusRemovedEt = 0;
640 fEMinusRemovedEt = 0;
650 fAntiNeutronMult = 0;
669 fProtonRemovedMult = 0;
670 fAntiProtonRemovedMult = 0;
672 fNeutronRemovedMult = 0;
673 fAntiNeutronRemovedMult = 0;
676 fPiPlusRemovedMult = 0;
677 fPiMinusRemovedMult = 0;
679 fKPlusRemovedMult = 0;
680 fKMinusRemovedMult = 0;
684 fMuMinusRemovedMult = 0;
685 fMuPlusRemovedMult = 0;
687 fEMinusRemovedMult = 0;
688 fEPlusRemovedMult = 0;
690 fGammaRemovedMult = 0;
695 Int_t AliAnalysisEt::ReadCorrections(TString filename)
697 TFile *f = TFile::Open(filename, "READ");
700 TString det = "Phos";
701 if(fHistogramNameSuffix.Contains("Emcal"))
705 cout<<"Histo name suffix "<<fHistogramNameSuffix<<endl;
706 TString name = "TmCorrections" + det;
707 std::cout << name << std::endl;
708 fTmCorrections = dynamic_cast<AliAnalysisEtTrackMatchCorrections*>(f->Get(name));
711 cout<<"No corrections with name "<<name<<endl;
712 Printf("Could not load TM corrections");
715 name = "ReCorrections" + det;
716 fReCorrections = dynamic_cast<AliAnalysisEtRecEffCorrection*>(f->Get(name));
719 Printf("Could not load rec eff corrections");
727 Double_t AliAnalysisEt::CorrectForReconstructionEfficiency(const AliESDCaloCluster& cluster, Int_t cent)
730 cluster.GetPosition(pos);
732 Double_t corrEnergy = fReCorrections->CorrectedEnergy(cluster.E(), cent);
734 //std::cout << "Original energy: " << cluster.E() << ", corrected energy: " << corrEnergy << std::endl;
735 return TMath::Sin(cp.Theta())*corrEnergy;