18 #include <TClonesArray.h>
29 #include "AliAODEvent.h"
30 #include "AliAnalysisManager.h"
31 #include "AliCentrality.h"
32 #include "AliEMCALGeometry.h"
33 #include "AliESDEvent.h"
35 #include "AliEventplane.h"
36 #include "AliInputEventHandler.h"
38 #include "AliMCParticle.h"
39 #include "AliVCluster.h"
40 #include "AliVEventHandler.h"
41 #include "AliVParticle.h"
42 #include "AliAODTrack.h"
43 #include "AliVCaloTrigger.h"
44 #include "AliGenPythiaEventHeader.h"
45 #include "AliAODMCHeader.h"
46 #include "AliMCEvent.h"
47 #include "AliAnalysisUtils.h"
48 #include "AliEMCALTriggerPatchInfo.h"
51 #include "AliMultSelection.h"
63 AliAnalysisTaskSE(
"AliAnalysisTaskEmcal"),
66 fGeneralHistograms(kFALSE),
71 fCaloTriggerPatchInfoName(),
79 fUseAliAnaUtils(kFALSE),
80 fRejectPileup(kFALSE),
81 fTklVsClusSPDCut(kFALSE),
82 fOffTrigger(AliVEvent::kAny),
88 fMinPtTrackInEmcal(0),
89 fEventPlaneVsEmcal(-1),
95 fSelectPtHardBin(-999),
99 fNeedEmcalGeom(kTRUE),
100 fParticleCollArray(),
103 fEMCalTriggerMode(kOverlapWithLowThreshold),
104 fUseNewCentralityEstimation(kFALSE),
105 fGeneratePythiaInfoObject(kFALSE),
106 fAliAnalysisUtils(0x0),
113 fTriggerPatchInfo(0),
130 fHistTrialsAfterSel(0),
131 fHistEventsAfterSel(0),
132 fHistXsectionAfterSel(0),
140 fHistEventRejection(0),
141 fHistTriggerClasses(0)
165 AliAnalysisTaskSE(name),
168 fGeneralHistograms(kFALSE),
169 fInitialized(kFALSE),
173 fCaloTriggerPatchInfoName(),
181 fUseAliAnaUtils(kFALSE),
182 fRejectPileup(kFALSE),
183 fTklVsClusSPDCut(kFALSE),
184 fOffTrigger(AliVEvent::kAny),
186 fTriggerTypeSel(kND),
190 fMinPtTrackInEmcal(0),
191 fEventPlaneVsEmcal(-1),
192 fMinEventPlane(-1e6),
197 fSelectPtHardBin(-999),
201 fNeedEmcalGeom(kTRUE),
202 fParticleCollArray(),
205 fEMCalTriggerMode(kOverlapWithLowThreshold),
206 fUseNewCentralityEstimation(kFALSE),
207 fGeneratePythiaInfoObject(kFALSE),
208 fAliAnalysisUtils(0x0),
215 fTriggerPatchInfo(0),
232 fHistTrialsAfterSel(0),
233 fHistEventsAfterSel(0),
234 fHistXsectionAfterSel(0),
242 fHistEventRejection(0),
243 fHistTriggerClasses(0)
255 DefineOutput(1, TList::Class());
276 else AliError(Form(
"%s in SetClusPtCut(...): container %d not found",GetName(),c));
290 else AliError(Form(
"%s in SetClusTimeCut(...): container %d not found",GetName(),c));
303 else AliError(Form(
"%s in SetTrackPtCut(...): container %d not found",GetName(),c));
319 else AliError(Form(
"%s in SetTrackPtCut(...): container %d not found",GetName(),c));
333 else AliError(Form(
"%s in SetTrackPhiLimits(...): container %d not found",GetName(),c));
357 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
359 AliVEventHandler *evhand = mgr->GetInputEventHandler();
361 if (evhand->InheritsFrom(
"AliESDInputHandler")) {
369 AliError(
"Event handler not found!");
373 AliError(
"Analysis manager not found!");
405 fHistTrials =
new TH1F(
"fHistTrials",
"fHistTrials", 11, 0, 11);
406 fHistTrials->GetXaxis()->SetTitle(
"p_{T} hard bin");
410 fHistEvents =
new TH1F(
"fHistEvents",
"fHistEvents", 11, 0, 11);
411 fHistEvents->GetXaxis()->SetTitle(
"p_{T} hard bin");
415 fHistXsection =
new TProfile(
"fHistXsection",
"fHistXsection", 11, 0, 11);
420 const Int_t ptHardLo[11] = { 0, 5,11,21,36,57, 84,117,152,191,234};
421 const Int_t ptHardHi[11] = { 5,11,21,36,57,84,117,152,191,234,1000000};
423 for (Int_t i = 1; i < 12; i++) {
424 fHistTrialsAfterSel->GetXaxis()->SetBinLabel(i, Form(
"%d-%d",ptHardLo[i-1],ptHardHi[i-1]));
425 fHistEventsAfterSel->GetXaxis()->SetBinLabel(i, Form(
"%d-%d",ptHardLo[i-1],ptHardHi[i-1]));
427 fHistTrials->GetXaxis()->SetBinLabel(i, Form(
"%d-%d",ptHardLo[i-1],ptHardHi[i-1]));
428 fHistXsection->GetXaxis()->SetBinLabel(i, Form(
"%d-%d",ptHardLo[i-1],ptHardHi[i-1]));
429 fHistEvents->GetXaxis()->SetBinLabel(i, Form(
"%d-%d",ptHardLo[i-1],ptHardHi[i-1]));
433 fHistPtHard->GetXaxis()->SetTitle(
"p_{T,hard} (GeV/c)");
438 fHistZVertex =
new TH1F(
"fHistZVertex",
"Z vertex position", 60, -30, 30);
444 fHistCentrality =
new TH1F(
"fHistCentrality",
"Event centrality distribution", 200, 0, 100);
449 fHistEventPlane =
new TH1F(
"fHistEventPlane",
"Event plane", 120, -TMath::Pi(), TMath::Pi());
456 #if ROOT_VERSION_CODE < ROOT_VERSION(6,4,2)
479 #if ROOT_VERSION_CODE < ROOT_VERSION(6,4,2)
524 TObjArray* triggerClasses = InputEvent()->GetFiredTriggerClasses().Tokenize(
" ");
525 TIter next(triggerClasses);
526 TObjString* triggerClass = 0;
527 while ((triggerClass = static_cast<TObjString*>(next()))) {
530 delete triggerClasses;
603 AliWarning(
"AliAnalysisTaskEmcal::AcceptCluster method is deprecated. Please use GetCusterContainer(c)->AcceptCluster(clus).");
605 if (!clus)
return kFALSE;
609 AliError(Form(
"%s:Container %d not found",GetName(),c));
612 UInt_t rejectionReason = 0;
626 AliWarning(
"AliAnalysisTaskEmcal::AcceptTrack method is deprecated. Please use GetParticleContainer(c)->AcceptParticle(clus).");
628 if (!track)
return kFALSE;
632 AliError(Form(
"%s:Container %d not found",GetName(),c));
636 UInt_t rejectionReason = 0;
654 TString
file(currFile);
658 if (file.Contains(
".zip#")) {
659 Ssiz_t pos1 = file.Index(
"root_archive",12,0,TString::kExact);
660 Ssiz_t pos = file.Index(
"#",1,pos1,TString::kExact);
661 Ssiz_t pos2 = file.Index(
".root",5,TString::kExact);
662 file.Replace(pos+1,pos2-pos1,
"");
665 file.ReplaceAll(
gSystem->BaseName(file.Data()),
"");
667 AliDebug(1,Form(
"File name: %s",file.Data()));
670 TString strPthard(file);
672 strPthard.Remove(strPthard.Last(
'/'));
673 strPthard.Remove(strPthard.Last(
'/'));
674 if (strPthard.Contains(
"AOD")) strPthard.Remove(strPthard.Last(
'/'));
675 strPthard.Remove(0,strPthard.Last(
'/')+1);
676 if (strPthard.IsDec())
677 pthard = strPthard.Atoi();
679 AliWarning(Form(
"Could not extract file number from path %s", strPthard.Data()));
682 TFile *fxsec = TFile::Open(Form(
"%s%s",file.Data(),
"pyxsec.root"));
686 fxsec = TFile::Open(Form(
"%s%s",file.Data(),
"pyxsec_hists.root"));
692 TKey* key = (TKey*)fxsec->GetListOfKeys()->At(0);
697 TList *
list =
dynamic_cast<TList*
>(key->ReadObj());
702 fXsec = ((TProfile*)list->FindObject(
"h1Xsec"))->GetBinContent(1);
703 fTrials = ((TH1F*)list->FindObject(
"h1Trials"))->GetBinContent(1);
707 TTree *xtree = (TTree*)fxsec->Get(
"Xsection");
713 Double_t xsection = 0;
714 xtree->SetBranchAddress(
"xsection",&xsection);
715 xtree->SetBranchAddress(
"ntrials",&ntrials);
742 TTree *tree = AliAnalysisManager::GetAnalysisManager()->GetTree();
744 AliError(Form(
"%s - UserNotify: No current tree!",GetName()));
748 Float_t xsection = 0;
752 TFile *curfile = tree->GetCurrentFile();
754 AliError(Form(
"%s - UserNotify: No current file!",GetName()));
758 TChain *chain =
dynamic_cast<TChain*
>(tree);
759 if (chain) tree = chain->GetTree();
761 Int_t
nevents = tree->GetEntriesFast();
766 if ((pthardbin < 0) || (pthardbin > 10)) pthardbin = 0;
784 AliError(Form(
"%s: Could not retrieve parton infos! %s!", GetName(),
fPythiaInfoName.Data()));
803 AliError(Form(
"%s: Could not retrieve event! Returning!", GetName()));
810 fGeom = AliEMCALGeometry::GetInstanceFromRunNumber(InputEvent()->
GetRunNumber());
812 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()));
824 AliWarning(
"Could not set event plane limits because EMCal geometry was not loaded!");
837 AliError(Form(
"%s: Could not retrieve first track branch!", GetName()));
851 AliError(Form(
"%s: Could not retrieve first cluster branch!", GetName()));
859 AliError(Form(
"%s: Could not retrieve cells %s!", GetName(),
fCaloCellsName.Data()));
867 AliError(Form(
"%s: Could not retrieve calo triggers %s!", GetName(),
fCaloTriggersName.Data()));
895 AliESDEvent *esd =
dynamic_cast<AliESDEvent*
>(InputEvent());
897 const AliESDRun *run = esd->GetESDRun();
898 TString beamType = run->GetBeamType();
899 if (beamType ==
"p-p")
901 else if (beamType ==
"A-A")
903 else if (beamType ==
"p-A")
908 Int_t runNumber = InputEvent()->GetRunNumber();
909 if ((runNumber >= 136851 && runNumber <= 139517) ||
910 (runNumber >= 166529 && runNumber <= 170593)) {
912 }
else if ((runNumber>=188365 && runNumber <= 188366) ||
913 (runNumber >= 195344 && runNumber <= 196608)) {
941 AliEMCALTriggerPatchInfo *patch;
942 for (Int_t iPatch = 0; iPatch < nPatch; iPatch++) {
944 if (patch->IsGammaHigh()) nG1++;
945 if (patch->IsGammaLow()) nG2++;
946 if (patch->IsJetHigh()) nJ1++;
947 if (patch->IsJetLow()) nJ2++;
948 if (patch->IsLevel0()) nL0++;
951 AliDebug(2,
"Patch summary: ");
952 AliDebug(2, Form(
"Number of patches: %d", nPatch));
953 AliDebug(2, Form(
"Jet: low[%d], high[%d]" ,nJ2, nJ1));
954 AliDebug(2, Form(
"Gamma: low[%d], high[%d]" ,nG2, nG1));
957 if (nL0>0) SETBIT(triggers,
kL0);
958 if (nG1>0) SETBIT(triggers,
kG1);
959 if (nG2>0) SETBIT(triggers,
kG2);
960 if (nJ1>0) SETBIT(triggers,
kJ1);
961 if (nJ2>0) SETBIT(triggers,
kJ2);
975 AliWarning(Form(
"%s: Requesting undefined trigger type!", GetName()));
1010 const AliESDEvent *eev =
dynamic_cast<const AliESDEvent*
>(InputEvent());
1012 res = ((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected();
1014 const AliAODEvent *aev =
dynamic_cast<const AliAODEvent*
>(InputEvent());
1016 res = ((AliVAODHeader*)aev->GetHeader())->GetOfflineTrigger();
1027 const AliESDEvent *eev =
dynamic_cast<const AliESDEvent*
>(InputEvent());
1029 fired = eev->GetFiredTriggerClasses();
1031 const AliAODEvent *aev =
dynamic_cast<const AliAODEvent*
>(InputEvent());
1033 fired = aev->GetFiredTriggerClasses();
1036 if (!fired.Contains(
"-B-")) {
1047 for (Int_t i=0;i<arr->GetEntriesFast();++i) {
1048 TObject *obj = arr->At(i);
1053 TString objStr = obj->GetName();
1055 (objStr.Contains(
"J1") || objStr.Contains(
"J2") || objStr.Contains(
"G1") || objStr.Contains(
"G2"))) {
1058 TString trigType1 =
"J1";
1059 TString trigType2 =
"J2";
1060 if(objStr.Contains(
"G")) {
1064 if(objStr.Contains(trigType2) && fired.Contains(trigType2.Data())) {
1068 else if(objStr.Contains(trigType1) && fired.Contains(trigType1.Data()) && !fired.Contains(trigType2.Data())) {
1076 if (fired.Contains(obj->GetName())) {
1097 if (fCent<fMinCent || fCent>
fMaxCent) {
1133 if (vz < fMinVz || vz >
fMaxVz) {
1140 Double_t dvertex = TMath::Abs(vz-vzSPD);
1150 Bool_t trackInEmcalOk = kFALSE;
1152 for (Int_t i = 0; i < ntracks; i++) {
1157 Double_t phiMin =
fGeom->GetArm1PhiMin() * TMath::DegToRad();
1158 Double_t phiMax =
fGeom->GetArm1PhiMax() * TMath::DegToRad();
1159 Int_t runNumber = InputEvent()->GetRunNumber();
1160 if (runNumber>=177295 && runNumber<=197470) {
1162 phiMax = TMath::Pi();
1165 if (track->Eta() <
fGeom->GetArm1EtaMin() || track->Eta() >
fGeom->GetArm1EtaMax() || track->Phi() < phiMin || track->Phi() > phiMax)
1168 trackInEmcalOk = kTRUE;
1172 if (!trackInEmcalOk) {
1179 Int_t nTracksAcc = 0;
1181 for (Int_t i = 0; i < ntracks; i++) {
1223 TClonesArray *arr = 0;
1224 TString sname(name);
1225 if (!sname.IsNull()) {
1226 arr =
dynamic_cast<TClonesArray*
>(InputEvent()->FindListObject(sname));
1228 AliWarning(Form(
"%s: Could not retrieve array with name %s!", GetName(), name));
1238 TString objname(arr->GetClass()->GetName());
1239 TClass cls(objname);
1240 if (!cls.InheritsFrom(clname)) {
1241 AliWarning(Form(
"%s: Objects of type %s in %s are not inherited from %s!",
1242 GetName(), cls.GetName(), name, clname));
1268 const AliVVertex *vert = InputEvent()->GetPrimaryVertex();
1274 const AliVVertex *vertSPD = InputEvent()->GetPrimaryVertexSPD();
1284 AliMultSelection *MultSelection =
static_cast<AliMultSelection*
>(InputEvent()->FindListObject(
"MultSelection"));
1285 if (MultSelection) {
1286 fCent = MultSelection->GetMultiplicityPercentile(
fCentEst.Data());
1289 AliWarning(Form(
"%s: Could not retrieve centrality information! Assuming 99", GetName()));
1293 AliCentrality *aliCent = InputEvent()->GetCentrality();
1298 AliWarning(Form(
"%s: Could not retrieve centrality information! Assuming 99", GetName()));
1308 AliWarning(Form(
"%s: Negative centrality: %f. Assuming 99", GetName(),
fCent));
1317 else if (
fCent > 90) {
1322 AliWarning(Form(
"%s: Negative centrality: %f. Assuming 99", GetName(),
fCent));
1335 AliWarning(Form(
"%s: fCentBin too large: cent = %f fCentBin = %d. Assuming 99", GetName(),
fCent,
fCentBin));
1340 AliEventplane *aliEP = InputEvent()->GetEventplane();
1342 fEPV0 = aliEP->GetEventplane(
"V0" ,InputEvent());
1343 fEPV0A = aliEP->GetEventplane(
"V0A",InputEvent());
1344 fEPV0C = aliEP->GetEventplane(
"V0C",InputEvent());
1346 AliWarning(Form(
"%s: Could not retrieve event plane information!", GetName()));
1357 fPythiaHeader =
dynamic_cast<AliGenPythiaEventHeader*
>(MCEvent()->GenEventHeader());
1360 AliAODMCHeader* aodMCH =
dynamic_cast<AliAODMCHeader*
>(InputEvent()->FindListObject(AliAODMCHeader::StdBranchName()));
1363 for (UInt_t i = 0;i<aodMCH->GetNCocktailHeaders();i++) {
1364 fPythiaHeader =
dynamic_cast<AliGenPythiaEventHeader*
>(aodMCH->GetCocktailHeader(i));
1374 const Int_t ptHardLo[11] = { 0, 5,11,21,36,57, 84,117,152,191,234};
1375 const Int_t ptHardHi[11] = { 5,11,21,36,57,84,117,152,191,234,1000000};
1391 while ((cont = static_cast<AliEmcalContainer*>(nextPartColl()))) cont->
NextEvent();
1394 while ((cont = static_cast<AliParticleContainer*>(nextClusColl()))) cont->
NextEvent();
1408 if (TString(n).IsNull())
return 0;
1426 if (TString(n).IsNull())
return 0;
1444 if (TString(n).IsNull())
return 0;
1462 if (TString(n).IsNull())
return 0;
1526 AliError(Form(
"%s: Particle container %d not found",GetName(),i));
1542 AliError(Form(
"%s:Cluster container %d not found",GetName(),i));
1560 AliError(Form(
"%s: Particle container %d not found",GetName(),c));
1579 AliError(Form(
"%s: Cluster container %d not found",GetName(),c));
1596 AliError(Form(
"%s: Particle container %d not found",GetName(),i));
1612 AliError(Form(
"%s: Cluster container %d not found",GetName(),i));
1633 AliError(Form(
"%s: fTriggerPatchInfo not available",GetName()));
1641 AliEMCALTriggerPatchInfo *patch(NULL), *selected(NULL);
1642 for (Int_t iPatch = 0; iPatch < nPatch; iPatch++) {
1645 if (patch->IsMainTrigger()) {
1646 if(doSimpleOffline){
1647 if(patch->IsOfflineSimple()){
1651 if(patch->IsLevel0()) selected = patch;
1654 if(patch->IsJetHighSimple() || patch->IsJetLowSimple()){
1655 if(!selected) selected = patch;
1656 else if(patch->GetADCOfflineAmp() > selected->GetADCOfflineAmp()) selected = patch;
1660 if(patch->IsGammaHighSimple() || patch->IsGammaLowSimple()){
1661 if(!selected) selected = patch;
1662 else if(patch->GetADCOfflineAmp() > selected->GetADCOfflineAmp()) selected = patch;
1666 AliError(
"Untreated case: Main Patch is recalculated; should be in 'else' branch");
1672 if(patch->IsLevel0()) selected = patch;
1675 if(patch->IsJetHigh() || patch->IsJetLow()){
1676 if(!selected) selected = patch;
1677 else if (patch->GetADCAmp() > selected->GetADCAmp())
1682 if(patch->IsGammaHigh() || patch->IsGammaLow()){
1683 if(!selected) selected = patch;
1684 else if (patch->GetADCAmp() > selected->GetADCAmp())
1689 AliError(
"Untreated case: Main Patch is recalculated; should be in 'else' branch");
1695 if (doSimpleOffline && patch->IsOfflineSimple()) {
1696 if(!selected) selected = patch;
1697 else if (patch->GetADCOfflineAmp() > selected->GetADCOfflineAmp())
1700 else if (!doSimpleOffline && !patch->IsOfflineSimple()) {
1701 if(!selected) selected = patch;
1702 else if (patch->GetADCAmp() > selected->GetADCAmp())
1717 if (!(InputEvent()->FindListObject(obj->GetName()))) {
1718 InputEvent()->AddObject(obj);
1722 AliFatal(Form(
"%s: Container with name %s already present. Aborting", GetName(), obj->GetName()));
1738 AliWarning(Form(
"%s - AliAnalysisTaskEmcal::IsTrackInEmcalAcceptance - Geometry is not available!", GetName()));
1742 Double_t minPhi =
fGeom->GetArm1PhiMin() - edges;
1743 Double_t maxPhi =
fGeom->GetArm1PhiMax() + edges;
1745 if (part->Phi() > minPhi && part->Phi() < maxPhi) {
1755 axis->SetBinLabel(1,
"NullObject");
1756 axis->SetBinLabel(2,
"Pt");
1757 axis->SetBinLabel(3,
"Acceptance");
1758 axis->SetBinLabel(4,
"MCLabel");
1759 axis->SetBinLabel(5,
"BitMap");
1760 axis->SetBinLabel(6,
"HF cut");
1761 axis->SetBinLabel(7,
"Bit6");
1762 axis->SetBinLabel(8,
"NotHybridTrack");
1763 axis->SetBinLabel(9,
"MCFlag");
1764 axis->SetBinLabel(10,
"MCGenerator");
1765 axis->SetBinLabel(11,
"ChargeCut");
1766 axis->SetBinLabel(12,
"MinDistanceTPCSectorEdge");
1767 axis->SetBinLabel(13,
"Bit12");
1768 axis->SetBinLabel(14,
"IsEMCal");
1769 axis->SetBinLabel(15,
"Time");
1770 axis->SetBinLabel(16,
"Energy");
1771 axis->SetBinLabel(17,
"ExoticCut");
1772 axis->SetBinLabel(18,
"Bit17");
1773 axis->SetBinLabel(19,
"Area");
1774 axis->SetBinLabel(20,
"AreaEmc");
1775 axis->SetBinLabel(21,
"ZLeadingCh");
1776 axis->SetBinLabel(22,
"ZLeadingEmc");
1777 axis->SetBinLabel(23,
"NEF");
1778 axis->SetBinLabel(24,
"MinLeadPt");
1779 axis->SetBinLabel(25,
"MaxTrackPt");
1780 axis->SetBinLabel(26,
"MaxClusterPt");
1781 axis->SetBinLabel(27,
"Flavour");
1782 axis->SetBinLabel(28,
"TagStatus");
1783 axis->SetBinLabel(29,
"MinNConstituents");
1784 axis->SetBinLabel(30,
"Bit29");
1785 axis->SetBinLabel(31,
"Bit30");
1786 axis->SetBinLabel(32,
"Bit31");
1797 TVector3 vect1(part1->Px(), part1->Py(), part1->Pz());
1798 TVector3 vect2(part2->Px(), part2->Py(), part2->Pz());
1799 Double_t z = (vect1 * vect2) / (vect2 * vect2);
1811 TVector3 vect2(part2->Px(), part2->Py(), part2->Pz());
1812 Double_t z = (vect1 * vect2) / (vect2 * vect2);
1831 Double_t veta = t->GetTrackEtaOnEMCal();
1832 Double_t vphi = t->GetTrackPhiOnEMCal();
1834 Float_t pos[3] = {0};
1835 v->GetPosition(pos);
1837 Double_t ceta = cpos.Eta();
1838 Double_t cphi = cpos.Phi();
1840 phidiff=TVector2::Phi_mpi_pi(vphi-cphi);
1851 if (t->TestBit(BIT(22)) && !t->TestBit(BIT(23)))
1853 else if (!t->TestBit(BIT(22)) && t->TestBit(BIT(23)))
1855 else if (t->TestBit(BIT(22)) && t->TestBit(BIT(23)))
1874 if (aodTrack->TestFilterBit(filterBit1)) {
1877 else if (aodTrack->TestFilterBit(filterBit2)) {
1878 if ((aodTrack->GetStatus()&AliVTrack::kITSrefit)!=0) {
1902 AliStack* stack = mcEvent->Stack();
1904 const Int_t nprim = stack->GetNprimary();
1906 if (nprim < 8)
return;
1908 TParticle *part6 = stack->Particle(6);
1909 TParticle *part7 = stack->Particle(7);
1917 AliGenPythiaEventHeader *pythiaGenHeader =
dynamic_cast<AliGenPythiaEventHeader*
>(mcEvent->GenEventHeader());
1918 if(pythiaGenHeader){
1919 Float_t
ptWeight=pythiaGenHeader->EventWeight();
ClassImp(AliAnalysisTaskTriggerRates) AliAnalysisTaskTriggerRates
Bool_t fGeneratePythiaInfoObject
Generate Pythia info object.
TObjArray fClusterCollArray
cluster collection array
Int_t fNVertSPDCont
!event SPD vertex number of contributors
void SetParticlePtCut(Double_t cut)
Bool_t fIsPythia
trigger, if it is a PYTHIA production
void SetParton7(Float_t pt, Float_t eta, Float_t phi, Float_t mass=0)
TH1 * fHistTrials
!trials from pyxsec.root
EMCAL Level1 gamma trigger, low threshold.
AliEmcalPythiaInfo * fPythiaInfo
!event parton info
Bool_t AcceptTrack(AliVParticle *track, Int_t c=0) const
EMCAL Level1 jet trigger, low threshold.
Bool_t HasTriggerType(TriggerType triggersel)
Int_t fNTrials
!event trials
UInt_t fOffTrigger
offline trigger for event selection
Double_t fVertexSPD[3]
!event Svertex
Double_t fMinCent
min centrality for event selection
Double_t fTrackPtCut
cut on track pt in event selection
Recalculated jet trigger patch; does not need to be above trigger threshold.
Base task in the EMCAL framework.
void SetPartonFlag7(Int_t flag7)
Container with name, TClonesArray and cuts for particles.
Double_t fPtHard
!event pt hard
void SetTrackPtCut(Double_t cut, Int_t c=0)
static void GetEtaPhiDiff(const AliVTrack *t, const AliVCluster *v, Double_t &phidiff, Double_t &etadiff)
Double_t fMinBinPt
min pt in histograms
Double_t fEPV0
!event plane V0
Bool_t fGeneralHistograms
whether or not it should fill some general histograms
virtual void SetArray(AliVEvent *event)
Bool_t AcceptCluster(AliVCluster *clus, Int_t c=0) const
Int_t fCentBin
!event centrality bin
TH1 * fHistEventsAfterSel
!total number of events per pt hard bin after selection
Double_t fMinPtTrackInEmcal
min pt track in emcal
TH1 * fHistEventPlane
!event plane distribution
TList * fOutput
!output list
TH1 * fHistEvents
!total number of events per pt hard bin
void SetClusPtCut(Double_t cut, Int_t c=0)
AliClusterContainer * AddClusterContainer(const char *n)
Double_t fEPV0C
!event plane V0C
void SetParton6(Float_t pt, Float_t eta, Float_t phi, Float_t mass=0)
TH1 * fHistCentrality
!event centrality distribution
Container for particles within the EMCAL framework.
TObjArray fParticleCollArray
particle/track collection array
BeamType
Switch for the beam type.
void SetTrackEtaLimits(Double_t min, Double_t max, Int_t c=0)
AliParticleContainer * GetParticleContainer(Int_t i=0) const
Level1 jet trigger patch.
TProfile * fHistXsectionAfterSel
!x section from pythia header
TriggerType
Switch for EMCAL trigger types.
EMCalTriggerMode_t fEMCalTriggerMode
EMCal trigger selection mode.
virtual Bool_t FillHistograms()
Int_t GetNParticles(Int_t i=0) const
TClonesArray * fCaloClusters
!clusters
Bool_t fUseNewCentralityEstimation
Use new centrality estimation (for 2015 data)
Bool_t IsTrackInEmcalAcceptance(AliVParticle *part, Double_t edges=0.9) const
TH1 * fHistTriggerClasses
!number of events in each trigger class
Double_t fMaxVz
max vertex for event selection
void GeneratePythiaInfoObject(AliMCEvent *mcEvent)
AliEMCALGeometry * fGeom
!emcal geometry
The overlap between low and high threshold trigger is assigned to the lower threshold only...
kRecalculated gamma trigger patch; does not need to be above trigger threshold
TString fCaloTriggerPatchInfoName
trigger patch info array name
TString fCaloTriggersName
name of calo triggers collection
AliGenPythiaEventHeader * fPythiaHeader
!event Pythia header
void SetTrackPhiLimits(Double_t min, Double_t max, Int_t c=0)
AliParticleContainer * AddParticleContainer(const char *n)
AliAnalysisUtils * fAliAnalysisUtils
!vertex selection (optional)
BeamType fForceBeamType
forced beam type
Int_t fNcentBins
how many centrality bins
AliClusterContainer * GetClusterContainer(Int_t i=0) const
Base class for container structures within the EMCAL framework.
TriggerType fTriggerTypeSel
trigger type to select based on trigger patches
virtual Bool_t AcceptCluster(Int_t i, UInt_t &rejectionReason) const
virtual Bool_t FillGeneralHistograms()
TString fTrigClass
trigger class name for event selection
AliVCluster * GetAcceptCluster(Int_t i) const
TClonesArray * GetParticleArray(Int_t i=0) const
Double_t fMinVz
min vertex for event selection
virtual AliVParticle * GetAcceptParticle(Int_t i=-1) const
BeamType fBeamType
!event beam type
Double_t fCent
!event centrality
TClonesArray * GetArray() const
Double_t fMinEventPlane
minimum event plane value
TString fCaloCellsName
name of calo cell collection
Int_t GetNClusters(Int_t i=0) const
Int_t fNVertCont
!event vertex number of contributors
Double_t fZvertexDiff
upper limit for distance between primary and SPD vertex
virtual Bool_t AcceptParticle(const AliVParticle *vp, UInt_t &rejectionReason) const
EMCAL Level1 jet trigger, high threshold.
Int_t fSelectPtHardBin
select one pt hard bin for analysis
AliMCParticleContainer * AddMCParticleContainer(const char *n)
static Double_t GetParallelFraction(AliVParticle *part1, AliVParticle *part2)
virtual Bool_t RetrieveEventObjects()
Bool_t fRejectPileup
Reject pilup using function AliAnalysisUtils::IsPileUpEvent()
TProfile * fHistXsection
!x section from pyxsec.root
Bool_t PythiaInfoFromFile(const char *currFile, Float_t &fXsec, Float_t &fTrials, Int_t &pthard)
void UserExec(Option_t *option)
void SetPartonFlag6(Int_t flag6)
AliVCaloCells * fCaloCells
!cells
const TString & GetArrayName() const
TClonesArray * GetArrayFromEvent(const char *name, const char *clname=0)
Double_t fEventPlaneVsEmcal
select events which have a certain event plane wrt the emcal
virtual Bool_t IsEventSelected()
TH1 * fHistPtHard
!pt hard distribution
void SetParticleEtaLimits(Double_t min, Double_t max)
Double_t fMaxBinPt
max pt in histograms
Int_t fPtHardBin
!event pt hard bin
TClonesArray * fTracks
!tracks
TH1 * fHistTrialsAfterSel
!total number of trials per pt hard bin after selection
void LoadPythiaInfo(AliVEvent *event)
Bool_t fIsEsd
!whether it's an ESD analysis
Double_t fVertex[3]
!event vertex
AliTrackContainer * AddTrackContainer(const char *n)
Bool_t fCreateHisto
whether or not create histograms
Store some informaion about a Pythia eventThis class is used to store some information about a Pythia...
TH1 * fHistEventRejection
!book keep reasons for rejecting event
TClonesArray * fTriggerPatchInfo
!trigger patch info array
TClonesArray * GetClusterArray(Int_t i=0) const
Double_t fEPV0A
!event plane V0A
TString fCentEst
name of V0 centrality estimator
TString fPythiaInfoName
name of pythia info object
Int_t GetRunNumber(TString)
Declaration of class AliEmcalPythiaInfo.
void SetClusPtCut(Double_t cut)
EMCAL Level1 gamma trigger, high threshold.
void AddObjectToEvent(TObject *obj, Bool_t attempt=kFALSE)
AliVCaloTrigger * fCaloTriggers
!calo triggers
void SetRejectionReasonLabels(TAxis *axis)
void UserCreateOutputObjects()
TH1 * fHistZVertex
!z vertex position
Int_t fMinNTrack
minimum nr of tracks in event with pT>fTrackPtCut
Int_t GetNEntries() const
static Byte_t GetTrackType(const AliVTrack *t)
Bool_t fUseAliAnaUtils
used for LHC13* data: z-vtx, Ncontributors, z-vtx resolution cuts
void SetClusTimeCut(Double_t min, Double_t max, Int_t c=0)
ULong_t fTriggers
list of fired triggers
Double_t fMaxEventPlane
maximum event plane value
void SetPythiaEventWeight(Float_t ptWeight)
Float_t fXsection
!x-section from pythia header
Bool_t fInitialized
whether or not the task has been already initialized
TH1 * fHistEventCount
!incoming and selected events
Double_t fMaxCent
max centrality for event selection
void SetClusTimeCut(Double_t min, Double_t max)
TriggerCategory
Online trigger categories.
void SetParticlePhiLimits(Double_t min, Double_t max)
AliVParticle * GetAcceptParticleFromArray(Int_t p, Int_t c=0) const
Container structure for EMCAL clusters.
Container for MC-true particles within the EMCAL framework.
Bool_t fNeedEmcalGeom
whether or not the task needs the emcal geometry
AliVCluster * GetAcceptClusterFromArray(Int_t cl, Int_t c=0) const
Int_t fNbins
no. of pt bins
Bool_t fTklVsClusSPDCut
Apply tracklet-vs-cluster SPD cut to reject background events in pp.
virtual ~AliAnalysisTaskEmcal()
AliEMCALTriggerPatchInfo * GetMainTriggerPatch(TriggerCategory triggersel=kTriggerLevel1Jet, Bool_t doOfflinSimple=kFALSE)
Level1 gamma trigger patch.
static Double_t fgkEMCalDCalPhiDivide
phi value used to distinguish between DCal and EMCal