19 #include <TClonesArray.h> 30 #include "AliGenCocktailEventHeader.h" 32 #include "AliAODEvent.h" 33 #include "AliAnalysisManager.h" 34 #include "AliCentrality.h" 35 #include "AliEMCALGeometry.h" 36 #include "AliESDEvent.h" 38 #include "AliEventplane.h" 39 #include "AliInputEventHandler.h" 41 #include "AliMCParticle.h" 42 #include "AliVCluster.h" 43 #include "AliVEventHandler.h" 44 #include "AliVParticle.h" 45 #include "AliAODTrack.h" 46 #include "AliVCaloTrigger.h" 47 #include "AliGenPythiaEventHeader.h" 48 #include "AliAODMCHeader.h" 49 #include "AliMCEvent.h" 50 #include "AliEMCALTriggerPatchInfo.h" 52 #include "AliMultSelection.h" 68 fGeneralHistograms(kFALSE),
70 fNeedEmcalGeom(kTRUE),
72 fCentralityEstimation(kNewCentrality),
76 fCaloTriggerPatchInfoName(),
80 fTriggerSelectionBitMap(0),
89 fMaxMinimumBiasPtHard(-1),
90 fAcceptedTriggerClasses(),
91 fRejectedTriggerClasses(),
92 fMCRejectFilter(kFALSE),
93 fPtHardAndJetPtFactor(0.),
94 fPtHardAndClusterPtFactor(0.),
95 fPtHardAndTrackPtFactor(0.),
96 fSwitchOffLHC15oFaultyBranches(kFALSE),
97 fEventSelectionAfterRun(kFALSE),
98 fSelectGeneratorName(),
99 fMinimumEventWeight(1e-6),
100 fMaximumEventWeight(1e6),
102 fLocalInitialized(kFALSE),
107 fTriggerPatchInfo(0),
115 fFiredTriggerBitMap(0),
116 fFiredTriggerClasses(),
149 fGeneralHistograms(kFALSE),
151 fNeedEmcalGeom(kTRUE),
153 fCentralityEstimation(kNewCentrality),
157 fCaloTriggerPatchInfoName(),
159 fParticleCollArray(),
161 fTriggerSelectionBitMap(0),
170 fMaxMinimumBiasPtHard(-1),
171 fAcceptedTriggerClasses(),
172 fRejectedTriggerClasses(),
173 fMCRejectFilter(kFALSE),
174 fPtHardAndJetPtFactor(0.),
175 fPtHardAndClusterPtFactor(0.),
176 fPtHardAndTrackPtFactor(0.),
177 fSwitchOffLHC15oFaultyBranches(kFALSE),
178 fEventSelectionAfterRun(kFALSE),
179 fSelectGeneratorName(),
180 fMinimumEventWeight(1e-6),
181 fMaximumEventWeight(1e6),
183 fLocalInitialized(kFALSE),
188 fTriggerPatchInfo(0),
196 fFiredTriggerBitMap(0),
197 fFiredTriggerClasses(),
257 AliWarningStream() <<
"The execution of this task is inhibited. Returning." << std::endl;
262 AliVEventHandler *evhand = mgr->GetInputEventHandler();
264 if (evhand->InheritsFrom(
"AliESDInputHandler")) {
272 AliError(
"Event handler not found!");
276 AliError(
"Analysis manager not found!");
295 h =
new TH1F(
"fHistEventsVsPtHard",
"fHistEventsVsPtHard", 1000, 0, 1000);
296 h->GetXaxis()->SetTitle(
"#it{p}_{T,hard} (GeV/#it{c})");
297 h->GetYaxis()->SetTitle(
"events");
301 h =
new TH1F(
"fHistTrialsVsPtHard",
"fHistTrialsVsPtHard", 1000, 0, 1000);
302 h->GetXaxis()->SetTitle(
"#it{p}_{T,hard} (GeV/#it{c})");
303 h->GetYaxis()->SetTitle(
"trials");
307 h =
new TProfile(
"fHistXsection",
"fHistXsection", 50, 0, 50);
308 h->GetXaxis()->SetTitle(
"#it{p}_{T,hard} bin");
309 h->GetYaxis()->SetTitle(
"total integrated cross section (mb)");
313 h =
new TH1F(
"fHistXsectionDistribution",
"fHistXsectionDistribution", 1000, &weight_bins[0]);
314 h->GetXaxis()->SetTitle(
"total integrated cross section (mb)");
315 h->GetYaxis()->SetTitle(
"events");
319 h =
new TH1F(
"fHistEventWeights",
"fHistEventWeights", 1000, &weight_bins[0]);
320 h->GetXaxis()->SetTitle(
"weight");
321 h->GetYaxis()->SetTitle(
"events");
325 h =
new TH2F(
"fHistEventWeightsVsPtHard",
"fHistEventWeightsVsPtHard", 1000, 0, 1000, 1000, &weight_bins[0]);
326 h->GetXaxis()->SetTitle(
"#it{p}_{T,hard} (GeV/#it{c})");
327 h->GetYaxis()->SetTitle(
"event weight");
331 h =
new TH1F(
"fHistEventsVsPtHardNoSel",
"fHistEventsVsPtHardNoSel", 1000, 0, 1000);
332 h->GetXaxis()->SetTitle(
"#it{p}_{T,hard} (GeV/#it{c})");
333 h->GetYaxis()->SetTitle(
"events");
337 h =
new TH1F(
"fHistTrialsVsPtHardNoSel",
"fHistTrialsVsPtHardNoSel", 1000, 0, 1000);
338 h->GetXaxis()->SetTitle(
"#it{p}_{T,hard} (GeV/#it{c})");
339 h->GetYaxis()->SetTitle(
"trials");
343 h =
new TProfile(
"fHistXsectionNoSel",
"fHistXsectionNoSel", 50, 0, 50);
344 h->GetXaxis()->SetTitle(
"#it{p}_{T,hard} bin");
345 h->GetYaxis()->SetTitle(
"total integrated cross section (mb)");
349 h =
new TH1F(
"fHistXsectionDistributionNoSel",
"fHistXsectionDistributionNoSel", 1000, &weight_bins[0]);
350 h->GetXaxis()->SetTitle(
"total integrated cross section (mb)");
351 h->GetYaxis()->SetTitle(
"events");
355 h =
new TH1F(
"fHistEventWeightsNoSel",
"fHistEventWeightsNoSel", 1000, &weight_bins[0]);
356 h->GetXaxis()->SetTitle(
"weight");
357 h->GetYaxis()->SetTitle(
"events");
361 h =
new TH2F(
"fHistEventWeightsVsPtHardNoSel",
"fHistEventWeightsVsPtHardNoSel", 1000, 0, 1000, 1000, &weight_bins[0]);
362 h->GetXaxis()->SetTitle(
"#it{p}_{T,hard} (GeV/#it{c})");
363 h->GetYaxis()->SetTitle(
"event weight");
367 h =
new TH1F(
"fHistTrialsExternalFile",
"fHistTrialsExternalFile", 50, 0, 50);
368 h->GetXaxis()->SetTitle(
"#it{p}_{T,hard} bin");
369 h->GetYaxis()->SetTitle(
"trials");
373 h =
new TH1F(
"fHistEventsExternalFile",
"fHistEventsExternalFile", 50, 0, 50);
374 h->GetXaxis()->SetTitle(
"#it{p}_{T,hard} bin");
375 h->GetYaxis()->SetTitle(
"total events");
379 h =
new TProfile(
"fHistXsectionExternalFile",
"fHistXsectionExternalFile", 50, 0, 50);
380 h->GetXaxis()->SetTitle(
"#it{p}_{T,hard} bin");
381 h->GetYaxis()->SetTitle(
"total integrated cross section (mb)");
386 h =
new TH1F(
"fHistZVertex",
"Z vertex position", 60, -30, 30);
387 h->GetXaxis()->SetTitle(
"V_{#it{z}}");
388 h->GetYaxis()->SetTitle(
"counts");
392 h =
new TH1F(
"fHistZVertexNoSel",
"Z vertex position (no event selection)", 60, -30, 30);
393 h->GetXaxis()->SetTitle(
"V_{#it{z}}");
394 h->GetYaxis()->SetTitle(
"counts");
399 h =
new TH1F(
"fHistCentrality",
"Event centrality distribution", 100, 0, 100);
400 h->GetXaxis()->SetTitle(
"Centrality (%)");
401 h->GetYaxis()->SetTitle(
"counts");
405 h =
new TH1F(
"fHistCentralityNoSel",
"Event centrality distribution (no event selection)", 100, 0, 100);
406 h->GetXaxis()->SetTitle(
"Centrality (%)");
407 h->GetYaxis()->SetTitle(
"counts");
413 h =
new TH1F(
"fHistEventPlane",
"Event plane", 120, -TMath::Pi(), TMath::Pi());
414 h->GetXaxis()->SetTitle(
"event plane");
415 h->GetYaxis()->SetTitle(
"counts");
419 h =
new TH1F(
"fHistEventPlaneNoSel",
"Event plane (no event selection)", 120, -TMath::Pi(), TMath::Pi());
420 h->GetXaxis()->SetTitle(
"event plane");
421 h->GetYaxis()->SetTitle(
"counts");
426 h =
new TH1F(
"fHistEventRejection",
"Reasons to reject event",30,0,30);
427 #if ROOT_VERSION_CODE < ROOT_VERSION(6,4,2) 428 h->SetBit(TH1::kCanRebin);
430 h->SetCanExtend(TH1::kAllAxes);
432 std::array<std::string, 10> labels = {
"PhysSel",
"Evt Gen Name",
"Trg class (acc)",
"Trg class (rej)",
"Cent",
"vertex contr.",
"Vz",
"VzSPD",
"SelPtHardBin",
"MCOutlier"};
434 for (
auto label : labels) {
435 h->GetXaxis()->SetBinLabel(i, label.c_str());
438 h->GetYaxis()->SetTitle(
"counts");
442 h =
new TH1F(
"fHistTriggerClasses",
"fHistTriggerClasses",3,0,3);
443 #if ROOT_VERSION_CODE < ROOT_VERSION(6,4,2) 444 h->SetBit(TH1::kCanRebin);
446 h->SetCanExtend(TH1::kAllAxes);
451 h =
new TH1F(
"fHistTriggerClassesNoSel",
"fHistTriggerClassesNoSel",3,0,3);
452 #if ROOT_VERSION_CODE < ROOT_VERSION(6,4,2) 453 h->SetBit(TH1::kCanRebin);
455 h->SetCanExtend(TH1::kAllAxes);
460 h =
new TH1F(
"fHistEventCount",
"fHistEventCount",2,0,2);
461 h->GetXaxis()->SetBinLabel(1,
"Accepted");
462 h->GetXaxis()->SetBinLabel(2,
"Rejected");
463 h->GetYaxis()->SetTitle(
"counts");
502 if (hCent) hCent->Fill(
fCent);
505 if (hEventPlane) hEventPlane->Fill(
fEPV0);
526 if (hCent) hCent->Fill(
fCent);
529 if (hEventPlane) hEventPlane->Fill(
fEPV0);
560 AliWarningStream() <<
"The execution of this task is inhibited. Returning." << std::endl;
613 if (file.Contains(
".zip#")) {
614 Ssiz_t pos1 = file.Index(
"root_archive",12,0,TString::kExact);
615 Ssiz_t pos = file.Index(
"#",1,pos1,TString::kExact);
616 Ssiz_t pos2 = file.Index(
".root",5,TString::kExact);
617 file.Replace(pos+1,pos2-pos1,
"");
620 file.ReplaceAll(
gSystem->BaseName(file.Data()),
"");
622 AliDebug(1,Form(
"File name: %s",file.Data()));
627 strPthard.Remove(strPthard.Last(
'/'));
628 strPthard.Remove(strPthard.Last(
'/'));
629 if (strPthard.Contains(
"AOD")) strPthard.Remove(strPthard.Last(
'/'));
630 strPthard.Remove(0,strPthard.Last(
'/')+1);
631 if (strPthard.IsDec()) {
632 pthard = strPthard.Atoi();
635 AliWarning(Form(
"Could not extract file number from path %s", strPthard.Data()));
640 TFile *fxsec = TFile::Open(Form(
"%s%s",file.Data(),
"pyxsec.root"));
644 fxsec = TFile::Open(Form(
"%s%s",file.Data(),
"pyxsec_hists.root"));
650 TKey* key =
static_cast<TKey*
>(fxsec->GetListOfKeys()->At(0));
655 TList *list =
dynamic_cast<TList*
>(key->ReadObj());
660 xsec =
static_cast<TProfile*
>(list->FindObject(
"h1Xsec"))->GetBinContent(1);
661 trials =
static_cast<TH1F*
>(list->FindObject(
"h1Trials"))->GetBinContent(1);
665 TTree *xtree =
static_cast<TTree*
>(fxsec->Get(
"Xsection"));
672 xtree->SetBranchAddress(
"xsection",&xsection);
673 xtree->SetBranchAddress(
"ntrials",&ntrials);
700 TTree *tree = AliAnalysisManager::GetAnalysisManager()->GetTree();
702 AliError(Form(
"%s - UserNotify: No current tree!",GetName()));
710 TFile *curfile = tree->GetCurrentFile();
712 AliError(Form(
"%s - UserNotify: No current file!",GetName()));
717 if (chain) tree = chain->GetTree();
725 if (!res)
return kTRUE;
727 GetGeneralTH1(
"fHistTrialsExternalFile",
true)->Fill(fPtHardBin, trials);
729 GetGeneralTH1(
"fHistEventsExternalFile",
true)->Fill(fPtHardBin, nevents);
747 AliError(Form(
"%s: Could not retrieve event! Returning!", GetName()));
752 fGeom = AliEMCALGeometry::GetInstanceFromRunNumber(InputEvent()->
GetRunNumber());
754 AliFatal(Form(
"%s: Can not get EMCal geometry instance. If you do not need the EMCal geometry, disable it by setting task->SetNeedEmcalGeometry(kFALSE).", GetName()));
760 TTree *aodTree = AliAnalysisManager::GetAnalysisManager()->GetTree();
761 aodTree->SetBranchStatus(
"D0toKpi.fPx", 0);
762 aodTree->SetBranchStatus(
"D0toKpi.fPy", 0);
763 aodTree->SetBranchStatus(
"D0toKpi.fPz", 0);
764 aodTree->SetBranchStatus(
"D0toKpi.fd0", 0);
765 aodTree->SetBranchStatus(
"Charm3Prong.fPx", 0);
766 aodTree->SetBranchStatus(
"Charm3Prong.fPy", 0);
767 aodTree->SetBranchStatus(
"Charm3Prong.fPz", 0);
768 aodTree->SetBranchStatus(
"Charm3Prong.fd0", 0);
769 aodTree->SetBranchStatus(
"Dstar.fPx", 0);
770 aodTree->SetBranchStatus(
"Dstar.fPy", 0);
771 aodTree->SetBranchStatus(
"Dstar.fPz", 0);
772 aodTree->SetBranchStatus(
"Dstar.fd0", 0);
784 AliError(Form(
"%s: Could not retrieve cells %s!", GetName(),
fCaloCellsName.Data()));
792 AliError(Form(
"%s: Could not retrieve calo triggers %s!", GetName(),
fCaloTriggersName.Data()));
821 const AliESDRun *run = esd->GetESDRun();
822 TString beamType = run->GetBeamType();
823 if (beamType ==
"p-p")
825 else if (beamType ==
"A-A")
827 else if (beamType ==
"p-A")
832 Int_t runNumber = InputEvent()->GetRunNumber();
834 if ((runNumber >= 136833 && runNumber <= 139517) ||
835 (runNumber >= 167693 && runNumber <= 170593) ||
836 (runNumber >= 244824 && runNumber <= 246994)) {
838 }
else if ((runNumber >= 188356 && runNumber <= 188366) ||
839 (runNumber >= 195164 && runNumber <= 197388) ||
840 (runNumber >= 265015 && runNumber <= 267166)) {
885 Bool_t acceptedTrgClassFound = kFALSE;
889 if (fired_trg.find(acc_trg) != std::string::npos) {
890 acceptedTrgClassFound = kTRUE;
894 if (acceptedTrgClassFound)
break;
897 if (!acceptedTrgClassFound) {
906 if (fired_trg.find(rej_trg) != std::string::npos) {
914 if (fMinCent < fMaxCent && fMaxCent > 0) {
915 if (fCent < fMinCent || fCent >
fMaxCent) {
979 TClonesArray *arr = 0;
981 if (!sname.IsNull()) {
982 arr =
dynamic_cast<TClonesArray*
>(InputEvent()->FindListObject(sname));
984 AliWarning(Form(
"%s: Could not retrieve array with name %s!", GetName(), name));
994 TString objname(arr->GetClass()->GetName());
996 if (!cls.InheritsFrom(clname)) {
997 AliWarning(Form(
"%s: Objects of type %s in %s are not inherited from %s!",
998 GetName(), cls.GetName(), name, clname));
1021 std::stringstream firedClasses(InputEvent()->GetFiredTriggerClasses().
Data());
1022 while (firedClasses.good()) {
1023 std::string trgClass;
1024 firedClasses >> trgClass;
1032 fFiredTriggerBitMap =
static_cast<AliVAODHeader*
>(InputEvent()->GetHeader())->GetOfflineTrigger();
1035 const AliVVertex *vert = InputEvent()->GetPrimaryVertex();
1041 const AliVVertex *vertSPD = InputEvent()->GetPrimaryVertexSPD();
1058 AliMultSelection *MultSelection =
static_cast<AliMultSelection*
>(InputEvent()->FindListObject(
"MultSelection"));
1059 if (MultSelection) {
1060 fCent = MultSelection->GetMultiplicityPercentile(
fCentEst.Data());
1063 AliWarning(Form(
"%s: Could not retrieve centrality information! Assuming 99", GetName()));
1068 AliCentrality *aliCent = InputEvent()->GetCentrality();
1073 AliWarning(Form(
"%s: Could not retrieve centrality information! Assuming 99", GetName()));
1086 AliEventplane *aliEP = InputEvent()->GetEventplane();
1088 fEPV0 = aliEP->GetEventplane(
"V0" ,InputEvent());
1089 fEPV0A = aliEP->GetEventplane(
"V0A",InputEvent());
1090 fEPV0C = aliEP->GetEventplane(
"V0C",InputEvent());
1092 AliWarning(Form(
"%s: Could not retrieve event plane information!", GetName()));
1098 AliGenEventHeader* header = MCEvent()->GenEventHeader();
1099 if (header->InheritsFrom(
"AliGenPythiaEventHeader")) {
1100 fPythiaHeader =
static_cast<AliGenPythiaEventHeader*
>(header);
1102 else if (header->InheritsFrom(
"AliGenCocktailEventHeader")) {
1103 AliGenCocktailEventHeader* cocktailHeader =
static_cast<AliGenCocktailEventHeader*
>(header);
1104 TList* headers = cocktailHeader->GetHeaders();
1105 for (
auto obj : *headers) {
1106 fPythiaHeader =
dynamic_cast<AliGenPythiaEventHeader*
>(obj);
1135 if (branchName.size() == 0)
return 0;
1139 if (branchName ==
"tracks" || branchName ==
"Tracks") cont =
new AliTrackContainer(branchName.c_str());
1143 if (contName.size() > 0) cont->SetName(contName.c_str());
1160 if (branchName.size() == 0)
return 0;
1164 if (contName.size() > 0) cont->SetName(contName.c_str());
1178 std::map<std::string, AliParticleContainer*>::const_iterator cont_it =
fParticleCollArray.find(name);
1180 else return nullptr;
1190 std::map<std::string, AliClusterContainer*>::const_iterator cont_it =
fClusterCollArray.find(name);
1192 else return nullptr;
1202 if (!(InputEvent()->FindListObject(obj->GetName()))) {
1203 InputEvent()->AddObject(obj);
1207 AliFatal(Form(
"%s: Container with name %s already present. Aborting", GetName(), obj->GetName()));
1223 AliWarning(Form(
"%s - AliAnalysisTaskEmcalBase::IsTrackInEmcalAcceptance - Geometry is not available!", GetName()));
1230 if (part->Phi() > minPhi && part->Phi() < maxPhi) {
1240 axis->SetBinLabel(1,
"NullObject");
1241 axis->SetBinLabel(2,
"Pt");
1242 axis->SetBinLabel(3,
"Acceptance");
1243 axis->SetBinLabel(4,
"MCLabel");
1244 axis->SetBinLabel(5,
"BitMap");
1245 axis->SetBinLabel(6,
"HF cut");
1246 axis->SetBinLabel(7,
"Bit6");
1247 axis->SetBinLabel(8,
"NotHybridTrack");
1248 axis->SetBinLabel(9,
"MCFlag");
1249 axis->SetBinLabel(10,
"MCGenerator");
1250 axis->SetBinLabel(11,
"ChargeCut");
1251 axis->SetBinLabel(12,
"MinDistanceTPCSectorEdge");
1252 axis->SetBinLabel(13,
"Bit12");
1253 axis->SetBinLabel(14,
"IsEMCal");
1254 axis->SetBinLabel(15,
"Time");
1255 axis->SetBinLabel(16,
"Energy");
1256 axis->SetBinLabel(17,
"ExoticCut");
1257 axis->SetBinLabel(18,
"Bit17");
1258 axis->SetBinLabel(19,
"Area");
1259 axis->SetBinLabel(20,
"AreaEmc");
1260 axis->SetBinLabel(21,
"ZLeadingCh");
1261 axis->SetBinLabel(22,
"ZLeadingEmc");
1262 axis->SetBinLabel(23,
"NEF");
1263 axis->SetBinLabel(24,
"MinLeadPt");
1264 axis->SetBinLabel(25,
"MaxTrackPt");
1265 axis->SetBinLabel(26,
"MaxClusterPt");
1266 axis->SetBinLabel(27,
"Flavour");
1267 axis->SetBinLabel(28,
"TagStatus");
1268 axis->SetBinLabel(29,
"MinNConstituents");
1269 axis->SetBinLabel(30,
"Bit29");
1270 axis->SetBinLabel(31,
"Bit30");
1271 axis->SetBinLabel(32,
"Bit31");
1282 TVector3 vect1(part1->Px(), part1->Py(), part1->Pz());
1283 TVector3 vect2(part2->Px(), part2->Py(), part2->Pz());
1284 Double_t z = (vect1 * vect2) / (vect2 * vect2);
1296 TVector3 vect2(part2->Px(), part2->Py(), part2->Pz());
1297 Double_t z = (vect1 * vect2) / (vect2 * vect2);
1316 Double_t veta = t->GetTrackEtaOnEMCal();
1317 Double_t vphi = t->GetTrackPhiOnEMCal();
1320 v->GetPosition(pos);
1325 phidiff=TVector2::Phi_mpi_pi(vphi-cphi);
1336 if (t->TestBit(BIT(22)) && !t->TestBit(BIT(23)))
1338 else if (!t->TestBit(BIT(22)) && t->TestBit(BIT(23)))
1340 else if (t->TestBit(BIT(22)) && t->TestBit(BIT(23)))
1359 if (aodTrack->TestFilterBit(filterBit1)) {
1362 else if (aodTrack->TestFilterBit(filterBit2)) {
1363 if ((aodTrack->GetStatus()&AliVTrack::kITSrefit)!=0) {
1385 if ((runnumber >= 136833 && runnumber <= 139517) ||
1386 (runnumber >= 167693 && runnumber <= 170593) ||
1387 (runnumber >= 244824 && runnumber <= 246994)) {
1390 else if ((runnumber > 188356 && runnumber <= 188503) ||
1391 (runnumber >= 195164 && runnumber <= 197388) ||
1392 (runnumber >= 265077 && runnumber <= 267166)) {
1413 AliDebug(1,Form(
"Njets: %d, pT Hard %f",nTriggerJets,
fPtHard));
1416 for (
Int_t ijet = 0; ijet< nTriggerJets; ijet++) {
1419 jet.SetPxPyPzE(tmpjet[0],tmpjet[1],tmpjet[2],tmpjet[3]);
1421 AliDebug(1,Form(
"jet %d; pycell jet pT %f",ijet, jet.Pt()));
1425 AliInfo(Form(
"Reject jet event with : pT Hard %2.2f, pycell jet pT %2.2f, rejection factor %1.1f\n",
fPtHard, jet.Pt(),
fPtHardAndJetPtFactor));
1435 if ((
Bool_t)mccluscont) {
1436 for (
auto cluster : mccluscont->all()) {
1437 Float_t ecluster = cluster->E();
1451 if ((
Bool_t)mcpartcont) {
1452 for (
auto mctrack : mcpartcont->
all()) {
1453 Float_t trackpt = mctrack->Pt();
1477 const Double_t tpi = TMath::TwoPi();
1479 if (phia < 0) phia += tpi;
1480 else if (phia > tpi) phia -= tpi;
1481 if (phib < 0) phib += tpi;
1482 else if (phib > tpi) phib -= tpi;
1484 if (dphi < rangeMin) dphi += tpi;
1485 else if (dphi > rangeMax) dphi -= tpi;
1501 double binWidth = (max - min) / n;
1504 for (
int i = 0; i < n; i++) {
1521 std::vector<double> array;
1537 if (min <= 0 || max < min) {
1538 AliErrorClassStream() <<
"Cannot generate a log scale fixed-bin array with limits " << min <<
", " << max << std::endl;
1541 double binWidth = std::pow(max / min, 1.0 / n);
1544 for (
int i = 0; i < n; i++) {
1561 std::vector<double> array;
1571 return search->second;
1574 if (warn) AliErrorStream() <<
"Could not find histogram '" << name <<
"'" << std::endl;
Bool_t fSwitchOffLHC15oFaultyBranches
Switch off faulty tree branches in LHC15o AOD trees.
void SetRejectionReasonLabels(TAxis *axis)
AliClusterContainer * AddClusterContainer(std::string branchName, std::string contName="")
Float_t fPtHardAndJetPtFactor
Factor between ptHard and jet pT to reject/accept event.
Double_t fVertexSPD[3]
!event Svertex
void UserCreateOutputObjects()
TString fCaloTriggersName
name of calo triggers collection
AliEMCALGeometry * fGeom
!emcal geometry
EBeamType_t fBeamType
!event beam type
Bool_t fInhibit
!inhibit execution of the task
TList * fOutput
!output list
TClonesArray * GetArrayFromEvent(const char *name, const char *clname=0)
Double_t fPtHard
!event pt hard
Float_t fXsection
!x-section from pythia header
Double_t fEPV0A
!event plane V0A
TString fSelectGeneratorName
Selects only events produced by a generator that has a name containing a string.
Double_t fEPV0
!event plane V0
Int_t fNTrials
!event trials
Container with name, TClonesArray and cuts for particles.
Bool_t fMCRejectFilter
enable the filtering of events by tail rejection
TString fCaloTriggerPatchInfoName
trigger patch info array name
Double_t fMinVz
min vertex for event selection
New centrality estimation (AliMultSelection, see https://twiki.cern.ch/twiki/bin/viewauth/ALICE/AliMu...
void UserExec(Option_t *option)
TString fCentEst
name of the centrality estimator
UInt_t fTriggerSelectionBitMap
trigger selection bit map
const AliMCParticleIterableContainer all() const
std::vector< double > fCentBins
how many centrality bins
Bool_t fEventSelectionAfterRun
If kTRUE, the event selection is performed after Run() but before FillHistograms() ...
static Byte_t GetTrackType(const AliVTrack *t)
virtual ~AliAnalysisTaskEmcalLight()
static std::vector< double > GenerateFixedBinArray(int n, double min, double max, bool last=true)
TString fCaloCellsName
name of calo cell collection
Bool_t IsTrackInEmcalAcceptance(AliVParticle *part, Double_t edges=0.9) const
std::set< std::string > fRejectedTriggerClasses
list of accepted trigger classes
TH1 * GetGeneralTH1(const char *name, bool warn=false)
TString part
use mixed event to constrain combinatorial background
virtual Bool_t FillHistograms()
Double_t fMaxMinimumBiasPtHard
maximum pt hard for the minimum bias pt hard bin (MC)
Container for particles within the EMCAL framework.
static void GetEtaPhiDiff(const AliVTrack *t, const AliVCluster *v, Double_t &phidiff, Double_t &etadiff)
void AddObjectToEvent(TObject *obj, Bool_t attempt=kFALSE)
std::map< std::string, TH1 * > fHistograms
!general QA histograms
static Double_t fgkEMCalDCalPhiDivide
phi value used to distinguish between DCal and EMCal
EBeamType_t fForceBeamType
forced beam type
No centrality estimation.
virtual Bool_t IsEventSelected()
AliVCaloCells * fCaloCells
!cells
std::vector< std::string > fFiredTriggerClasses
!trigger classes fired by the current event
Bool_t fCreateHisto
whether or not create histograms
TH2 * GetGeneralTH2(const char *name, bool warn=false)
Double_t fMinPtHard
select minimum pt hard (MC)
Base task in the EMCAL framework (lighter version of AliAnalysisTaskEmcal)
EBeamType_t GetBeamType()
Float_t fPtHardAndClusterPtFactor
Factor between ptHard and cluster pT to reject/accept event.
Double_t fMaxVzDiff
upper limit for distance between primary and SPD vertex
Double_t fVertex[3]
!event vertex
Double_t fMaximumEventWeight
Minimum event weight for the related bookkeping histogram.
ECentralityEstimation_t fCentralityEstimation
Centrality estimation.
Int_t fPtHardBin
!event pt hard bin
AliClusterContainer * GetClusterContainer(std::string name) const
void AdoptClusterContainer(AliClusterContainer *cont)
Bool_t fIsPythia
if it is a PYTHIA production
Int_t fCentBin
!event centrality bin
Double_t fMaxCent
max centrality for event selection
ULong_t fFiredTriggerBitMap
!bit map of fired triggers
Double_t fMinNVertCont
minumum number of vertex contributors
virtual Bool_t RetrieveEventObjects()
Float_t fEventWeight
!event weight
Int_t fNVertSPDCont
!event SPD vertex number of contributors
std::set< std::string > fAcceptedTriggerClasses
list of accepted trigger classes
static Double_t DeltaPhi(Double_t phia, Double_t phib, Double_t rMin=-TMath::Pi()/2, Double_t rMax=3 *TMath::Pi()/2)
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)
Double_t fMinimumEventWeight
Minimum event weight for the related bookkeping histogram.
Bool_t PythiaInfoFromFile(const char *currFile, Float_t &fXsec, Float_t &fTrials, Int_t &pthard)
Bool_t fLocalInitialized
!whether or not the task has been already initialized
static EBeamType_t BeamTypeFromRunNumber(Int_t runnumber)
AliParticleContainer * AddParticleContainer(std::string branchName, std::string contName="")
TProfile * GetGeneralTProfile(const char *name, bool warn=false)
std::map< std::string, AliParticleContainer * > fParticleCollArray
particle/track collection array
TFile * file
TList with histograms for a given trigger.
Int_t fNVertCont
!event vertex number of contributors
static std::vector< double > GenerateLogFixedBinArray(int n, double min, double max, bool last=true)
Bool_t fGeneralHistograms
whether or not it should fill some general histograms
Int_t GetRunNumber(TString)
AliGenPythiaEventHeader * fPythiaHeader
!event Pythia header
Float_t fPtHardAndTrackPtFactor
Factor between ptHard and track pT to reject/accept event.
AliParticleContainer * GetParticleContainer(std::string name) const
AliAnalysisTaskEmcalLight()
std::map< std::string, AliClusterContainer * > fClusterCollArray
cluster collection array
EBeamType_t
Switch for the beam type.
AliVCaloTrigger * fCaloTriggers
!calo triggers
Container structure for EMCAL clusters.
Container for MC-true particles within the EMCAL framework.
TString fGeneratorName
!name of the MC generator used to produce the current event (only AOD)
void AdoptParticleContainer(AliParticleContainer *cont)
virtual Bool_t FillGeneralHistograms(Bool_t eventSelected)
Double_t fMaxVz
max vertex for event selection
Double_t fCent
!event centrality
Double_t fEPV0C
!event plane V0C
TClonesArray * fTriggerPatchInfo
!trigger patch info array
Double_t fMaxPtHard
select maximum pt hard (MC)
Old centrality estimation (AliCentrality, works only on Run-1 PbPb and pPb)
TList * OpenFile(const char *fname)
Bool_t fNeedEmcalGeom
whether or not the task needs the emcal geometry
static Double_t GetParallelFraction(AliVParticle *part1, AliVParticle *part2)
EDataType_t fDataType
!data type (ESD or AOD)