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 "AliGenEventHeader.h" 49 #include "AliAODMCHeader.h" 50 #include "AliMCEvent.h" 51 #include "AliEMCALTriggerPatchInfo.h" 53 #include "AliMultSelection.h" 69 fGeneralHistograms(kFALSE),
71 fNeedEmcalGeom(kTRUE),
73 fCentralityEstimation(kNewCentrality),
75 fIsMonteCarlo(kFALSE),
79 fCaloTriggerPatchInfoName(),
83 fTriggerSelectionBitMap(0),
92 fMaxMinimumBiasPtHard(-1),
93 fAcceptedTriggerClasses(),
94 fRejectedTriggerClasses(),
95 fMCRejectFilter(kFALSE),
96 fPtHardAndJetPtFactor(0.),
97 fPtHardAndClusterPtFactor(0.),
98 fPtHardAndTrackPtFactor(0.),
99 fSwitchOffLHC15oFaultyBranches(kFALSE),
100 fEventSelectionAfterRun(kFALSE),
101 fSelectGeneratorName(),
102 fMinimumEventWeight(1e-6),
103 fMaximumEventWeight(1e6),
105 fLocalInitialized(kFALSE),
110 fTriggerPatchInfo(0),
118 fFiredTriggerBitMap(0),
119 fFiredTriggerClasses(),
153 fGeneralHistograms(kFALSE),
155 fNeedEmcalGeom(kTRUE),
157 fCentralityEstimation(kNewCentrality),
159 fIsMonteCarlo(kFALSE),
160 fMCEventHeaderName(),
163 fCaloTriggerPatchInfoName(),
165 fParticleCollArray(),
167 fTriggerSelectionBitMap(0),
176 fMaxMinimumBiasPtHard(-1),
177 fAcceptedTriggerClasses(),
178 fRejectedTriggerClasses(),
179 fMCRejectFilter(kFALSE),
180 fPtHardAndJetPtFactor(0.),
181 fPtHardAndClusterPtFactor(0.),
182 fPtHardAndTrackPtFactor(0.),
183 fSwitchOffLHC15oFaultyBranches(kFALSE),
184 fEventSelectionAfterRun(kFALSE),
185 fSelectGeneratorName(),
186 fMinimumEventWeight(1e-6),
187 fMaximumEventWeight(1e6),
189 fLocalInitialized(kFALSE),
194 fTriggerPatchInfo(0),
202 fFiredTriggerBitMap(0),
203 fFiredTriggerClasses(),
264 AliWarningStream() <<
"The execution of this task is inhibited. Returning." << std::endl;
269 AliVEventHandler *evhand = mgr->GetInputEventHandler();
271 if (evhand->InheritsFrom(
"AliESDInputHandler")) {
279 AliError(
"Event handler not found!");
283 AliError(
"Analysis manager not found!");
302 h =
new TH1F(
"fHistEventsVsPtHard",
"fHistEventsVsPtHard", 1000, 0, 1000);
303 h->GetXaxis()->SetTitle(
"#it{p}_{T,hard} (GeV/#it{c})");
304 h->GetYaxis()->SetTitle(
"events");
308 h =
new TH1F(
"fHistTrialsVsPtHard",
"fHistTrialsVsPtHard", 1000, 0, 1000);
309 h->GetXaxis()->SetTitle(
"#it{p}_{T,hard} (GeV/#it{c})");
310 h->GetYaxis()->SetTitle(
"trials");
314 h =
new TProfile(
"fHistXsection",
"fHistXsection", 50, 0, 50);
315 h->GetXaxis()->SetTitle(
"#it{p}_{T,hard} bin");
316 h->GetYaxis()->SetTitle(
"total integrated cross section (mb)");
320 h =
new TH1F(
"fHistXsectionDistribution",
"fHistXsectionDistribution", 1000, &weight_bins[0]);
321 h->GetXaxis()->SetTitle(
"total integrated cross section (mb)");
322 h->GetYaxis()->SetTitle(
"events");
326 h =
new TH1F(
"fHistEventWeights",
"fHistEventWeights", 1000, &weight_bins[0]);
327 h->GetXaxis()->SetTitle(
"weight");
328 h->GetYaxis()->SetTitle(
"events");
332 h =
new TH2F(
"fHistEventWeightsVsPtHard",
"fHistEventWeightsVsPtHard", 1000, 0, 1000, 1000, &weight_bins[0]);
333 h->GetXaxis()->SetTitle(
"#it{p}_{T,hard} (GeV/#it{c})");
334 h->GetYaxis()->SetTitle(
"event weight");
338 h =
new TH1F(
"fHistEventsVsPtHardNoSel",
"fHistEventsVsPtHardNoSel", 1000, 0, 1000);
339 h->GetXaxis()->SetTitle(
"#it{p}_{T,hard} (GeV/#it{c})");
340 h->GetYaxis()->SetTitle(
"events");
344 h =
new TH1F(
"fHistTrialsVsPtHardNoSel",
"fHistTrialsVsPtHardNoSel", 1000, 0, 1000);
345 h->GetXaxis()->SetTitle(
"#it{p}_{T,hard} (GeV/#it{c})");
346 h->GetYaxis()->SetTitle(
"trials");
350 h =
new TProfile(
"fHistXsectionNoSel",
"fHistXsectionNoSel", 50, 0, 50);
351 h->GetXaxis()->SetTitle(
"#it{p}_{T,hard} bin");
352 h->GetYaxis()->SetTitle(
"total integrated cross section (mb)");
356 h =
new TH1F(
"fHistXsectionDistributionNoSel",
"fHistXsectionDistributionNoSel", 1000, &weight_bins[0]);
357 h->GetXaxis()->SetTitle(
"total integrated cross section (mb)");
358 h->GetYaxis()->SetTitle(
"events");
362 h =
new TH1F(
"fHistEventWeightsNoSel",
"fHistEventWeightsNoSel", 1000, &weight_bins[0]);
363 h->GetXaxis()->SetTitle(
"weight");
364 h->GetYaxis()->SetTitle(
"events");
368 h =
new TH2F(
"fHistEventWeightsVsPtHardNoSel",
"fHistEventWeightsVsPtHardNoSel", 1000, 0, 1000, 1000, &weight_bins[0]);
369 h->GetXaxis()->SetTitle(
"#it{p}_{T,hard} (GeV/#it{c})");
370 h->GetYaxis()->SetTitle(
"event weight");
374 h =
new TH1F(
"fHistTrialsExternalFile",
"fHistTrialsExternalFile", 50, 0, 50);
375 h->GetXaxis()->SetTitle(
"#it{p}_{T,hard} bin");
376 h->GetYaxis()->SetTitle(
"trials");
380 h =
new TH1F(
"fHistEventsExternalFile",
"fHistEventsExternalFile", 50, 0, 50);
381 h->GetXaxis()->SetTitle(
"#it{p}_{T,hard} bin");
382 h->GetYaxis()->SetTitle(
"total events");
386 h =
new TProfile(
"fHistXsectionExternalFile",
"fHistXsectionExternalFile", 50, 0, 50);
387 h->GetXaxis()->SetTitle(
"#it{p}_{T,hard} bin");
388 h->GetYaxis()->SetTitle(
"total integrated cross section (mb)");
393 h =
new TH1F(
"fHistZVertex",
"Z vertex position", 60, -30, 30);
394 h->GetXaxis()->SetTitle(
"V_{#it{z}}");
395 h->GetYaxis()->SetTitle(
"counts");
399 h =
new TH1F(
"fHistZVertexNoSel",
"Z vertex position (no event selection)", 60, -30, 30);
400 h->GetXaxis()->SetTitle(
"V_{#it{z}}");
401 h->GetYaxis()->SetTitle(
"counts");
406 h =
new TH1F(
"fHistCentrality",
"Event centrality distribution", 100, 0, 100);
407 h->GetXaxis()->SetTitle(
"Centrality (%)");
408 h->GetYaxis()->SetTitle(
"counts");
412 h =
new TH1F(
"fHistCentralityNoSel",
"Event centrality distribution (no event selection)", 100, 0, 100);
413 h->GetXaxis()->SetTitle(
"Centrality (%)");
414 h->GetYaxis()->SetTitle(
"counts");
420 h =
new TH1F(
"fHistEventPlane",
"Event plane", 120, -TMath::Pi(), TMath::Pi());
421 h->GetXaxis()->SetTitle(
"event plane");
422 h->GetYaxis()->SetTitle(
"counts");
426 h =
new TH1F(
"fHistEventPlaneNoSel",
"Event plane (no event selection)", 120, -TMath::Pi(), TMath::Pi());
427 h->GetXaxis()->SetTitle(
"event plane");
428 h->GetYaxis()->SetTitle(
"counts");
433 h =
new TH1F(
"fHistEventRejection",
"Reasons to reject event",30,0,30);
434 #if ROOT_VERSION_CODE < ROOT_VERSION(6,4,2) 435 h->SetBit(TH1::kCanRebin);
437 h->SetCanExtend(TH1::kAllAxes);
439 std::array<std::string, 10> labels = {
"PhysSel",
"Evt Gen Name",
"Trg class (acc)",
"Trg class (rej)",
"Cent",
"vertex contr.",
"Vz",
"VzSPD",
"SelPtHardBin",
"MCOutlier"};
441 for (
auto label : labels) {
442 h->GetXaxis()->SetBinLabel(i, label.c_str());
445 h->GetYaxis()->SetTitle(
"counts");
449 h =
new TH1F(
"fHistTriggerClasses",
"fHistTriggerClasses",3,0,3);
450 #if ROOT_VERSION_CODE < ROOT_VERSION(6,4,2) 451 h->SetBit(TH1::kCanRebin);
453 h->SetCanExtend(TH1::kAllAxes);
458 h =
new TH1F(
"fHistTriggerClassesNoSel",
"fHistTriggerClassesNoSel",3,0,3);
459 #if ROOT_VERSION_CODE < ROOT_VERSION(6,4,2) 460 h->SetBit(TH1::kCanRebin);
462 h->SetCanExtend(TH1::kAllAxes);
467 h =
new TH1F(
"fHistEventCount",
"fHistEventCount",2,0,2);
468 h->GetXaxis()->SetBinLabel(1,
"Accepted");
469 h->GetXaxis()->SetBinLabel(2,
"Rejected");
470 h->GetYaxis()->SetTitle(
"counts");
506 if (hCent) hCent->Fill(
fCent);
509 if (hEventPlane) hEventPlane->Fill(
fEPV0);
530 if (hCent) hCent->Fill(
fCent);
533 if (hEventPlane) hEventPlane->Fill(
fEPV0);
564 AliWarningStream() <<
"The execution of this task is inhibited. Returning." << std::endl;
617 if (file.Contains(
".zip#")) {
618 Ssiz_t pos1 = file.Index(
"root_archive",12,0,TString::kExact);
619 Ssiz_t pos = file.Index(
"#",1,pos1,TString::kExact);
620 Ssiz_t pos2 = file.Index(
".root",5,TString::kExact);
621 file.Replace(pos+1,pos2-pos1,
"");
624 file.ReplaceAll(
gSystem->BaseName(file.Data()),
"");
626 AliDebug(1,Form(
"File name: %s",file.Data()));
631 strPthard.Remove(strPthard.Last(
'/'));
632 strPthard.Remove(strPthard.Last(
'/'));
633 if (strPthard.Contains(
"AOD")) strPthard.Remove(strPthard.Last(
'/'));
634 strPthard.Remove(0,strPthard.Last(
'/')+1);
635 if (strPthard.IsDec()) {
636 pthard = strPthard.Atoi();
639 AliWarning(Form(
"Could not extract file number from path %s", strPthard.Data()));
644 TFile *fxsec = TFile::Open(Form(
"%s%s",file.Data(),
"pyxsec.root"));
648 fxsec = TFile::Open(Form(
"%s%s",file.Data(),
"pyxsec_hists.root"));
654 TKey* key =
static_cast<TKey*
>(fxsec->GetListOfKeys()->At(0));
659 TList *list =
dynamic_cast<TList*
>(key->ReadObj());
664 xsec =
static_cast<TProfile*
>(list->FindObject(
"h1Xsec"))->GetBinContent(1);
665 trials =
static_cast<TH1F*
>(list->FindObject(
"h1Trials"))->GetBinContent(1);
669 TTree *xtree =
static_cast<TTree*
>(fxsec->Get(
"Xsection"));
676 xtree->SetBranchAddress(
"xsection",&xsection);
677 xtree->SetBranchAddress(
"ntrials",&ntrials);
703 TTree *tree = AliAnalysisManager::GetAnalysisManager()->GetTree();
705 AliError(Form(
"%s - UserNotify: No current tree!",GetName()));
713 TFile *curfile = tree->GetCurrentFile();
715 AliError(Form(
"%s - UserNotify: No current file!",GetName()));
720 if (chain) tree = chain->GetTree();
728 if (!res)
return kTRUE;
731 GetGeneralTH1(
"fHistTrialsExternalFile",
true)->Fill(fPtHardBin, trials);
733 GetGeneralTH1(
"fHistEventsExternalFile",
true)->Fill(fPtHardBin, nevents);
752 AliError(Form(
"%s: Could not retrieve event! Returning!", GetName()));
757 fGeom = AliEMCALGeometry::GetInstanceFromRunNumber(InputEvent()->
GetRunNumber());
759 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()));
765 TTree *aodTree = AliAnalysisManager::GetAnalysisManager()->GetTree();
766 aodTree->SetBranchStatus(
"D0toKpi.fPx", 0);
767 aodTree->SetBranchStatus(
"D0toKpi.fPy", 0);
768 aodTree->SetBranchStatus(
"D0toKpi.fPz", 0);
769 aodTree->SetBranchStatus(
"D0toKpi.fd0", 0);
770 aodTree->SetBranchStatus(
"Charm3Prong.fPx", 0);
771 aodTree->SetBranchStatus(
"Charm3Prong.fPy", 0);
772 aodTree->SetBranchStatus(
"Charm3Prong.fPz", 0);
773 aodTree->SetBranchStatus(
"Charm3Prong.fd0", 0);
774 aodTree->SetBranchStatus(
"Dstar.fPx", 0);
775 aodTree->SetBranchStatus(
"Dstar.fPy", 0);
776 aodTree->SetBranchStatus(
"Dstar.fPz", 0);
777 aodTree->SetBranchStatus(
"Dstar.fd0", 0);
789 AliError(Form(
"%s: Could not retrieve cells %s!", GetName(),
fCaloCellsName.Data()));
797 AliError(Form(
"%s: Could not retrieve calo triggers %s!", GetName(),
fCaloTriggersName.Data()));
826 const AliESDRun *run = esd->GetESDRun();
827 TString beamType = run->GetBeamType();
828 if (beamType ==
"p-p")
830 else if (beamType ==
"A-A")
832 else if (beamType ==
"p-A")
837 Int_t runNumber = InputEvent()->GetRunNumber();
839 if ((runNumber >= 136833 && runNumber <= 139517) ||
840 (runNumber >= 167693 && runNumber <= 170593) ||
841 (runNumber >= 244824 && runNumber <= 246994)) {
843 }
else if ((runNumber >= 188356 && runNumber <= 188366) ||
844 (runNumber >= 195164 && runNumber <= 197388) ||
845 (runNumber >= 265015 && runNumber <= 267166)) {
890 Bool_t acceptedTrgClassFound = kFALSE;
894 if (fired_trg.find(acc_trg) != std::string::npos) {
895 acceptedTrgClassFound = kTRUE;
899 if (acceptedTrgClassFound)
break;
902 if (!acceptedTrgClassFound) {
911 if (fired_trg.find(rej_trg) != std::string::npos) {
919 if (fMinCent < fMaxCent && fMaxCent > 0) {
920 if (fCent < fMinCent || fCent >
fMaxCent) {
984 TClonesArray *arr = 0;
986 if (!sname.IsNull()) {
987 arr =
dynamic_cast<TClonesArray*
>(InputEvent()->FindListObject(sname));
989 AliWarning(Form(
"%s: Could not retrieve array with name %s!", GetName(), name));
999 TString objname(arr->GetClass()->GetName());
1000 TClass cls(objname);
1001 if (!cls.InheritsFrom(clname)) {
1002 AliWarning(Form(
"%s: Objects of type %s in %s are not inherited from %s!",
1003 GetName(), cls.GetName(), name, clname));
1026 std::stringstream firedClasses(InputEvent()->GetFiredTriggerClasses().
Data());
1027 while (firedClasses.good()) {
1028 std::string trgClass;
1029 firedClasses >> trgClass;
1037 fFiredTriggerBitMap =
static_cast<AliVAODHeader*
>(InputEvent()->GetHeader())->GetOfflineTrigger();
1040 const AliVVertex *vert = InputEvent()->GetPrimaryVertex();
1046 const AliVVertex *vertSPD = InputEvent()->GetPrimaryVertexSPD();
1063 AliMultSelection *MultSelection =
static_cast<AliMultSelection*
>(InputEvent()->FindListObject(
"MultSelection"));
1064 if (MultSelection) {
1065 fCent = MultSelection->GetMultiplicityPercentile(
fCentEst.Data());
1068 AliWarning(Form(
"%s: Could not retrieve centrality information! Assuming 99", GetName()));
1073 AliCentrality *aliCent = InputEvent()->GetCentrality();
1078 AliWarning(Form(
"%s: Could not retrieve centrality information! Assuming 99", GetName()));
1091 AliEventplane *aliEP = InputEvent()->GetEventplane();
1093 fEPV0 = aliEP->GetEventplane(
"V0" ,InputEvent());
1094 fEPV0A = aliEP->GetEventplane(
"V0A",InputEvent());
1095 fEPV0C = aliEP->GetEventplane(
"V0C",InputEvent());
1097 AliWarning(Form(
"%s: Could not retrieve event plane information!", GetName()));
1102 AliGenEventHeader* header = MCEvent()->GenEventHeader();
1110 else if (header->InheritsFrom(
"AliGenCocktailEventHeader")) {
1111 AliGenCocktailEventHeader* cocktailHeader =
static_cast<AliGenCocktailEventHeader*
>(header);
1112 TList* headers = cocktailHeader->GetHeaders();
1113 for (
auto obj : *headers) {
1115 fMCHeader =
static_cast<AliGenEventHeader*
>(obj);
1148 if (branchName.size() == 0)
return 0;
1152 if (branchName ==
"tracks" || branchName ==
"Tracks") cont =
new AliTrackContainer(branchName.c_str());
1156 if (contName.size() > 0) cont->SetName(contName.c_str());
1173 if (branchName.size() == 0)
return 0;
1177 if (contName.size() > 0) cont->SetName(contName.c_str());
1191 std::map<std::string, AliParticleContainer*>::const_iterator cont_it =
fParticleCollArray.find(name);
1193 else return nullptr;
1203 std::map<std::string, AliClusterContainer*>::const_iterator cont_it =
fClusterCollArray.find(name);
1205 else return nullptr;
1215 if (!(InputEvent()->FindListObject(obj->GetName()))) {
1216 InputEvent()->AddObject(obj);
1220 AliFatal(Form(
"%s: Container with name %s already present. Aborting", GetName(), obj->GetName()));
1236 AliWarning(Form(
"%s - AliAnalysisTaskEmcalBase::IsTrackInEmcalAcceptance - Geometry is not available!", GetName()));
1243 if (part->Phi() > minPhi && part->Phi() < maxPhi) {
1253 axis->SetBinLabel(1,
"NullObject");
1254 axis->SetBinLabel(2,
"Pt");
1255 axis->SetBinLabel(3,
"Acceptance");
1256 axis->SetBinLabel(4,
"MCLabel");
1257 axis->SetBinLabel(5,
"BitMap");
1258 axis->SetBinLabel(6,
"HF cut");
1259 axis->SetBinLabel(7,
"Bit6");
1260 axis->SetBinLabel(8,
"NotHybridTrack");
1261 axis->SetBinLabel(9,
"MCFlag");
1262 axis->SetBinLabel(10,
"MCGenerator");
1263 axis->SetBinLabel(11,
"ChargeCut");
1264 axis->SetBinLabel(12,
"MinDistanceTPCSectorEdge");
1265 axis->SetBinLabel(13,
"Bit12");
1266 axis->SetBinLabel(14,
"IsEMCal");
1267 axis->SetBinLabel(15,
"Time");
1268 axis->SetBinLabel(16,
"Energy");
1269 axis->SetBinLabel(17,
"ExoticCut");
1270 axis->SetBinLabel(18,
"Bit17");
1271 axis->SetBinLabel(19,
"Area");
1272 axis->SetBinLabel(20,
"AreaEmc");
1273 axis->SetBinLabel(21,
"ZLeadingCh");
1274 axis->SetBinLabel(22,
"ZLeadingEmc");
1275 axis->SetBinLabel(23,
"NEF");
1276 axis->SetBinLabel(24,
"MinLeadPt");
1277 axis->SetBinLabel(25,
"MaxTrackPt");
1278 axis->SetBinLabel(26,
"MaxClusterPt");
1279 axis->SetBinLabel(27,
"Flavour");
1280 axis->SetBinLabel(28,
"TagStatus");
1281 axis->SetBinLabel(29,
"MinNConstituents");
1282 axis->SetBinLabel(30,
"Bit29");
1283 axis->SetBinLabel(31,
"Bit30");
1284 axis->SetBinLabel(32,
"Bit31");
1295 TVector3 vect1(part1->Px(), part1->Py(), part1->Pz());
1296 TVector3 vect2(part2->Px(), part2->Py(), part2->Pz());
1297 Double_t z = (vect1 * vect2) / (vect2 * vect2);
1309 TVector3 vect2(part2->Px(), part2->Py(), part2->Pz());
1310 Double_t z = (vect1 * vect2) / (vect2 * vect2);
1329 Double_t veta = t->GetTrackEtaOnEMCal();
1330 Double_t vphi = t->GetTrackPhiOnEMCal();
1333 v->GetPosition(pos);
1338 phidiff=TVector2::Phi_mpi_pi(vphi-cphi);
1349 if (t->TestBit(BIT(22)) && !t->TestBit(BIT(23)))
1351 else if (!t->TestBit(BIT(22)) && t->TestBit(BIT(23)))
1353 else if (t->TestBit(BIT(22)) && t->TestBit(BIT(23)))
1372 if (aodTrack->TestFilterBit(filterBit1)) {
1375 else if (aodTrack->TestFilterBit(filterBit2)) {
1376 if ((aodTrack->GetStatus()&AliVTrack::kITSrefit)!=0) {
1398 if ((runnumber >= 136833 && runnumber <= 139517) ||
1399 (runnumber >= 167693 && runnumber <= 170593) ||
1400 (runnumber >= 244824 && runnumber <= 246994)) {
1403 else if ((runnumber > 188356 && runnumber <= 188503) ||
1404 (runnumber >= 195164 && runnumber <= 197388) ||
1405 (runnumber >= 265077 && runnumber <= 267166)) {
1426 AliDebug(1,Form(
"Njets: %d, pT Hard %f",nTriggerJets,
fPtHard));
1429 for (
Int_t ijet = 0; ijet< nTriggerJets; ijet++) {
1432 jet.SetPxPyPzE(tmpjet[0],tmpjet[1],tmpjet[2],tmpjet[3]);
1434 AliDebug(1,Form(
"jet %d; pycell jet pT %f",ijet, jet.Pt()));
1438 AliInfo(Form(
"Reject jet event with : pT Hard %2.2f, pycell jet pT %2.2f, rejection factor %1.1f\n",
fPtHard, jet.Pt(),
fPtHardAndJetPtFactor));
1448 if ((
Bool_t)mccluscont) {
1449 for (
auto cluster : mccluscont->all()) {
1450 Float_t ecluster = cluster->E();
1464 if ((
Bool_t)mcpartcont) {
1465 for (
auto mctrack : mcpartcont->
all()) {
1466 Float_t trackpt = mctrack->Pt();
1490 const Double_t tpi = TMath::TwoPi();
1492 if (phia < 0) phia += tpi;
1493 else if (phia > tpi) phia -= tpi;
1494 if (phib < 0) phib += tpi;
1495 else if (phib > tpi) phib -= tpi;
1497 if (dphi < rangeMin) dphi += tpi;
1498 else if (dphi > rangeMax) dphi -= tpi;
1514 double binWidth = (max - min) / n;
1517 for (
int i = 0; i < n; i++) {
1534 std::vector<double> array;
1550 if (min <= 0 || max < min) {
1551 AliErrorClassStream() <<
"Cannot generate a log scale fixed-bin array with limits " << min <<
", " << max << std::endl;
1554 double binWidth = std::pow(max / min, 1.0 / n);
1557 for (
int i = 0; i < n; i++) {
1574 std::vector<double> array;
1584 return search->second;
1587 if (warn) AliErrorStream() <<
"Could not find histogram '" << name <<
"'" << std::endl;
1618 TClass gen_header_class(name);
1619 if (gen_header_class.InheritsFrom(
"AliGenEventHeader")) {
1623 AliWarningStream() <<
"Class name '" << name <<
"' does not inherit from 'AliGenEventHeader'. Not setting it." << 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
Bool_t fIsMonteCarlo
if it is a MC production
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
void SetMCEventHeaderName(const char *name)
std::set< std::string > fRejectedTriggerClasses
list of accepted trigger classes
TH1 * GetGeneralTH1(const char *name, bool warn=false)
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)
TString fMCEventHeaderName
Looks for MC event properties in a particular MC event type (useful for a MC cocktail production) ...
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
AliGenEventHeader * fMCHeader
!event MC header
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.
void SetIsPythia(Bool_t i)
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)