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 fUsePtHardBinScaling(kFALSE),
107 fMCRejectFilter(kFALSE),
108 fPtHardAndJetPtFactor(0.),
109 fPtHardAndClusterPtFactor(0.),
110 fPtHardAndTrackPtFactor(0.),
111 fAliAnalysisUtils(0x0),
118 fTriggerPatchInfo(0),
135 fHistTrialsAfterSel(0),
136 fHistEventsAfterSel(0),
137 fHistXsectionAfterSel(0),
145 fHistEventRejection(0),
146 fHistTriggerClasses(0)
170 AliAnalysisTaskSE(name),
173 fGeneralHistograms(kFALSE),
174 fInitialized(kFALSE),
178 fCaloTriggerPatchInfoName(),
186 fUseAliAnaUtils(kFALSE),
187 fRejectPileup(kFALSE),
188 fTklVsClusSPDCut(kFALSE),
189 fOffTrigger(AliVEvent::kAny),
191 fTriggerTypeSel(kND),
195 fMinPtTrackInEmcal(0),
196 fEventPlaneVsEmcal(-1),
197 fMinEventPlane(-1e6),
202 fSelectPtHardBin(-999),
206 fNeedEmcalGeom(kTRUE),
207 fParticleCollArray(),
210 fEMCalTriggerMode(kOverlapWithLowThreshold),
211 fUseNewCentralityEstimation(kFALSE),
212 fGeneratePythiaInfoObject(kFALSE),
213 fUsePtHardBinScaling(kFALSE),
214 fMCRejectFilter(kFALSE),
215 fPtHardAndJetPtFactor(0.),
216 fPtHardAndClusterPtFactor(0.),
217 fPtHardAndTrackPtFactor(0.),
218 fAliAnalysisUtils(0x0),
225 fTriggerPatchInfo(0),
242 fHistTrialsAfterSel(0),
243 fHistEventsAfterSel(0),
244 fHistXsectionAfterSel(0),
252 fHistEventRejection(0),
253 fHistTriggerClasses(0)
265 DefineOutput(1, AliEmcalList::Class());
286 else AliError(Form(
"%s in SetClusPtCut(...): container %d not found",GetName(),c));
300 else AliError(Form(
"%s in SetClusTimeCut(...): container %d not found",GetName(),c));
313 else AliError(Form(
"%s in SetTrackPtCut(...): container %d not found",GetName(),c));
329 else AliError(Form(
"%s in SetTrackPtCut(...): container %d not found",GetName(),c));
343 else AliError(Form(
"%s in SetTrackPhiLimits(...): container %d not found",GetName(),c));
367 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
369 AliVEventHandler *evhand = mgr->GetInputEventHandler();
371 if (evhand->InheritsFrom(
"AliESDInputHandler")) {
379 AliError(
"Event handler not found!");
383 AliError(
"Analysis manager not found!");
416 fHistTrials =
new TH1F(
"fHistTrials",
"fHistTrials", 11, 0, 11);
417 fHistTrials->GetXaxis()->SetTitle(
"p_{T} hard bin");
421 fHistEvents =
new TH1F(
"fHistEvents",
"fHistEvents", 11, 0, 11);
422 fHistEvents->GetXaxis()->SetTitle(
"p_{T} hard bin");
426 fHistXsection =
new TProfile(
"fHistXsection",
"fHistXsection", 11, 0, 11);
431 const Int_t ptHardLo[11] = { 0, 5,11,21,36,57, 84,117,152,191,234};
432 const Int_t ptHardHi[11] = { 5,11,21,36,57,84,117,152,191,234,1000000};
434 for (Int_t i = 1; i < 12; i++) {
435 fHistTrialsAfterSel->GetXaxis()->SetBinLabel(i, Form(
"%d-%d",ptHardLo[i-1],ptHardHi[i-1]));
436 fHistEventsAfterSel->GetXaxis()->SetBinLabel(i, Form(
"%d-%d",ptHardLo[i-1],ptHardHi[i-1]));
438 fHistTrials->GetXaxis()->SetBinLabel(i, Form(
"%d-%d",ptHardLo[i-1],ptHardHi[i-1]));
439 fHistXsection->GetXaxis()->SetBinLabel(i, Form(
"%d-%d",ptHardLo[i-1],ptHardHi[i-1]));
440 fHistEvents->GetXaxis()->SetBinLabel(i, Form(
"%d-%d",ptHardLo[i-1],ptHardHi[i-1]));
444 fHistPtHard->GetXaxis()->SetTitle(
"p_{T,hard} (GeV/c)");
449 fHistZVertex =
new TH1F(
"fHistZVertex",
"Z vertex position", 60, -30, 30);
455 fHistCentrality =
new TH1F(
"fHistCentrality",
"Event centrality distribution", 200, 0, 100);
460 fHistEventPlane =
new TH1F(
"fHistEventPlane",
"Event plane", 120, -TMath::Pi(), TMath::Pi());
467 #if ROOT_VERSION_CODE < ROOT_VERSION(6,4,2)
490 #if ROOT_VERSION_CODE < ROOT_VERSION(6,4,2)
535 TObjArray* triggerClasses = InputEvent()->GetFiredTriggerClasses().Tokenize(
" ");
536 TIter next(triggerClasses);
537 TObjString* triggerClass = 0;
538 while ((triggerClass = static_cast<TObjString*>(next()))) {
541 delete triggerClasses;
614 AliWarning(
"AliAnalysisTaskEmcal::AcceptCluster method is deprecated. Please use GetCusterContainer(c)->AcceptCluster(clus).");
616 if (!clus)
return kFALSE;
620 AliError(Form(
"%s:Container %d not found",GetName(),c));
623 UInt_t rejectionReason = 0;
637 AliWarning(
"AliAnalysisTaskEmcal::AcceptTrack method is deprecated. Please use GetParticleContainer(c)->AcceptParticle(clus).");
639 if (!track)
return kFALSE;
643 AliError(Form(
"%s:Container %d not found",GetName(),c));
647 UInt_t rejectionReason = 0;
665 TString
file(currFile);
669 if (file.Contains(
".zip#")) {
670 Ssiz_t pos1 = file.Index(
"root_archive",12,0,TString::kExact);
671 Ssiz_t pos = file.Index(
"#",1,pos1,TString::kExact);
672 Ssiz_t pos2 = file.Index(
".root",5,TString::kExact);
673 file.Replace(pos+1,pos2-pos1,
"");
676 file.ReplaceAll(
gSystem->BaseName(file.Data()),
"");
678 AliDebug(1,Form(
"File name: %s",file.Data()));
681 TString strPthard(file);
683 strPthard.Remove(strPthard.Last(
'/'));
684 strPthard.Remove(strPthard.Last(
'/'));
685 if (strPthard.Contains(
"AOD")) strPthard.Remove(strPthard.Last(
'/'));
686 strPthard.Remove(0,strPthard.Last(
'/')+1);
687 if (strPthard.IsDec())
688 pthard = strPthard.Atoi();
690 AliWarning(Form(
"Could not extract file number from path %s", strPthard.Data()));
693 TFile *fxsec = TFile::Open(Form(
"%s%s",file.Data(),
"pyxsec.root"));
697 fxsec = TFile::Open(Form(
"%s%s",file.Data(),
"pyxsec_hists.root"));
703 TKey* key = (TKey*)fxsec->GetListOfKeys()->At(0);
708 TList *
list =
dynamic_cast<TList*
>(key->ReadObj());
713 fXsec = ((TProfile*)list->FindObject(
"h1Xsec"))->GetBinContent(1);
714 fTrials = ((TH1F*)list->FindObject(
"h1Trials"))->GetBinContent(1);
718 TTree *xtree = (TTree*)fxsec->Get(
"Xsection");
724 Double_t xsection = 0;
725 xtree->SetBranchAddress(
"xsection",&xsection);
726 xtree->SetBranchAddress(
"ntrials",&ntrials);
753 TTree *tree = AliAnalysisManager::GetAnalysisManager()->GetTree();
755 AliError(Form(
"%s - UserNotify: No current tree!",GetName()));
759 Float_t xsection = 0;
763 TFile *curfile = tree->GetCurrentFile();
765 AliError(Form(
"%s - UserNotify: No current file!",GetName()));
769 TChain *chain =
dynamic_cast<TChain*
>(tree);
770 if (chain) tree = chain->GetTree();
772 Int_t
nevents = tree->GetEntriesFast();
777 if ((pthardbin < 0) || (pthardbin > 10)) pthardbin = 0;
795 AliError(Form(
"%s: Could not retrieve parton infos! %s!", GetName(),
fPythiaInfoName.Data()));
814 AliError(Form(
"%s: Could not retrieve event! Returning!", GetName()));
822 fPythiaHeader =
dynamic_cast<AliGenPythiaEventHeader*
>(MCEvent()->GenEventHeader());
825 AliAODMCHeader* aodMCH =
dynamic_cast<AliAODMCHeader*
>(InputEvent()->FindListObject(AliAODMCHeader::StdBranchName()));
828 for (UInt_t i = 0;i<aodMCH->GetNCocktailHeaders();i++) {
829 fPythiaHeader =
dynamic_cast<AliGenPythiaEventHeader*
>(aodMCH->GetCocktailHeader(i));
838 fGeom = AliEMCALGeometry::GetInstanceFromRunNumber(InputEvent()->
GetRunNumber());
840 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()));
852 AliWarning(
"Could not set event plane limits because EMCal geometry was not loaded!");
859 cont->SetArray(InputEvent());
865 AliError(Form(
"%s: Could not retrieve first track branch!", GetName()));
873 cont->SetArray(InputEvent());
879 AliError(Form(
"%s: Could not retrieve first cluster branch!", GetName()));
887 AliError(Form(
"%s: Could not retrieve cells %s!", GetName(),
fCaloCellsName.Data()));
895 AliError(Form(
"%s: Could not retrieve calo triggers %s!", GetName(),
fCaloTriggersName.Data()));
923 AliESDEvent *esd =
dynamic_cast<AliESDEvent*
>(InputEvent());
925 const AliESDRun *run = esd->GetESDRun();
926 TString beamType = run->GetBeamType();
927 if (beamType ==
"p-p")
929 else if (beamType ==
"A-A")
931 else if (beamType ==
"p-A")
936 Int_t runNumber = InputEvent()->GetRunNumber();
937 if ((runNumber >= 136851 && runNumber <= 139517) ||
938 (runNumber >= 166529 && runNumber <= 170593)) {
940 }
else if ((runNumber>=188365 && runNumber <= 188366) ||
941 (runNumber >= 195344 && runNumber <= 196608)) {
969 AliEMCALTriggerPatchInfo *patch;
970 for (Int_t iPatch = 0; iPatch < nPatch; iPatch++) {
972 if (patch->IsGammaHigh()) nG1++;
973 if (patch->IsGammaLow()) nG2++;
974 if (patch->IsJetHigh()) nJ1++;
975 if (patch->IsJetLow()) nJ2++;
976 if (patch->IsLevel0()) nL0++;
979 AliDebug(2,
"Patch summary: ");
980 AliDebug(2, Form(
"Number of patches: %d", nPatch));
981 AliDebug(2, Form(
"Jet: low[%d], high[%d]" ,nJ2, nJ1));
982 AliDebug(2, Form(
"Gamma: low[%d], high[%d]" ,nG2, nG1));
985 if (nL0>0) SETBIT(triggers,
kL0);
986 if (nG1>0) SETBIT(triggers,
kG1);
987 if (nG2>0) SETBIT(triggers,
kG2);
988 if (nJ1>0) SETBIT(triggers,
kJ1);
989 if (nJ2>0) SETBIT(triggers,
kJ2);
1003 AliWarning(Form(
"%s: Requesting undefined trigger type!", GetName()));
1038 const AliESDEvent *eev =
dynamic_cast<const AliESDEvent*
>(InputEvent());
1040 res = ((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected();
1042 const AliAODEvent *aev =
dynamic_cast<const AliAODEvent*
>(InputEvent());
1044 res = ((AliVAODHeader*)aev->GetHeader())->GetOfflineTrigger();
1055 const AliESDEvent *eev =
dynamic_cast<const AliESDEvent*
>(InputEvent());
1057 fired = eev->GetFiredTriggerClasses();
1059 const AliAODEvent *aev =
dynamic_cast<const AliAODEvent*
>(InputEvent());
1061 fired = aev->GetFiredTriggerClasses();
1064 if (!fired.Contains(
"-B-")) {
1075 for (Int_t i=0;i<arr->GetEntriesFast();++i) {
1076 TObject *obj = arr->At(i);
1081 TString objStr = obj->GetName();
1083 (objStr.Contains(
"J1") || objStr.Contains(
"J2") || objStr.Contains(
"G1") || objStr.Contains(
"G2"))) {
1086 TString trigType1 =
"J1";
1087 TString trigType2 =
"J2";
1088 if(objStr.Contains(
"G")) {
1092 if(objStr.Contains(trigType2) && fired.Contains(trigType2.Data())) {
1096 else if(objStr.Contains(trigType1) && fired.Contains(trigType1.Data()) && !fired.Contains(trigType2.Data())) {
1104 if (fired.Contains(obj->GetName())) {
1125 if (fCent<fMinCent || fCent>
fMaxCent) {
1161 if (vz < fMinVz || vz >
fMaxVz) {
1168 Double_t dvertex = TMath::Abs(vz-vzSPD);
1178 Bool_t trackInEmcalOk = kFALSE;
1180 for (Int_t i = 0; i < ntracks; i++) {
1185 Double_t phiMin =
fGeom->GetArm1PhiMin() * TMath::DegToRad();
1186 Double_t phiMax =
fGeom->GetArm1PhiMax() * TMath::DegToRad();
1187 Int_t runNumber = InputEvent()->GetRunNumber();
1188 if (runNumber>=177295 && runNumber<=197470) {
1190 phiMax = TMath::Pi();
1193 if (track->Eta() <
fGeom->GetArm1EtaMin() || track->Eta() >
fGeom->GetArm1EtaMax() || track->Phi() < phiMin || track->Phi() > phiMax)
1196 trackInEmcalOk = kTRUE;
1200 if (!trackInEmcalOk) {
1207 Int_t nTracksAcc = 0;
1209 for (Int_t i = 0; i < ntracks; i++) {
1255 AliTLorentzVector jet;
1259 AliDebug(1,Form(
"Njets: %d, pT Hard %f",nTriggerJets,
fPtHard));
1261 Float_t tmpjet[]={0,0,0,0};
1262 for (Int_t ijet = 0; ijet< nTriggerJets; ijet++) {
1265 jet.SetPxPyPzE(tmpjet[0],tmpjet[1],tmpjet[2],tmpjet[3]);
1267 AliDebug(1,Form(
"jet %d; pycell jet pT %f",ijet, jet.Pt()));
1271 AliInfo(Form(
"Reject jet event with : pT Hard %2.2f, pycell jet pT %2.2f, rejection factor %1.1f\n",
fPtHard, jet.Pt(),
fPtHardAndJetPtFactor));
1281 if ((Bool_t)mccluscont) {
1282 for (
auto obj : mccluscont->all()) {
1283 AliVCluster* cluster =
static_cast<AliVCluster*
>(obj);
1284 Float_t ecluster = cluster->E();
1298 if ((Bool_t)mcpartcont) {
1299 for (
auto obj : mcpartcont->all()) {
1300 AliAODMCParticle* mctrack =
static_cast<AliAODMCParticle*
>(obj);
1301 Float_t trackpt = mctrack->Pt();
1324 TClonesArray *arr = 0;
1325 TString sname(name);
1326 if (!sname.IsNull()) {
1327 arr =
dynamic_cast<TClonesArray*
>(InputEvent()->FindListObject(sname));
1329 AliWarning(Form(
"%s: Could not retrieve array with name %s!", GetName(), name));
1339 TString objname(arr->GetClass()->GetName());
1340 TClass cls(objname);
1341 if (!cls.InheritsFrom(clname)) {
1342 AliWarning(Form(
"%s: Objects of type %s in %s are not inherited from %s!",
1343 GetName(), cls.GetName(), name, clname));
1369 const AliVVertex *vert = InputEvent()->GetPrimaryVertex();
1375 const AliVVertex *vertSPD = InputEvent()->GetPrimaryVertexSPD();
1385 AliMultSelection *MultSelection =
static_cast<AliMultSelection*
>(InputEvent()->FindListObject(
"MultSelection"));
1386 if (MultSelection) {
1387 fCent = MultSelection->GetMultiplicityPercentile(
fCentEst.Data());
1390 AliWarning(Form(
"%s: Could not retrieve centrality information! Assuming 99", GetName()));
1394 AliCentrality *aliCent = InputEvent()->GetCentrality();
1399 AliWarning(Form(
"%s: Could not retrieve centrality information! Assuming 99", GetName()));
1409 AliWarning(Form(
"%s: Negative centrality: %f. Assuming 99", GetName(),
fCent));
1418 else if (
fCent > 90) {
1423 AliWarning(Form(
"%s: Negative centrality: %f. Assuming 99", GetName(),
fCent));
1436 AliWarning(Form(
"%s: fCentBin too large: cent = %f fCentBin = %d. Assuming 99", GetName(),
fCent,
fCentBin));
1441 AliEventplane *aliEP = InputEvent()->GetEventplane();
1443 fEPV0 = aliEP->GetEventplane(
"V0" ,InputEvent());
1444 fEPV0A = aliEP->GetEventplane(
"V0A",InputEvent());
1445 fEPV0C = aliEP->GetEventplane(
"V0C",InputEvent());
1447 AliWarning(Form(
"%s: Could not retrieve event plane information!", GetName()));
1458 const Int_t ptHardLo[11] = { 0, 5,11,21,36,57, 84,117,152,191,234};
1459 const Int_t ptHardHi[11] = { 5,11,21,36,57,84,117,152,191,234,1000000};
1471 AliEmcalContainer* cont = 0;
1474 while ((cont = static_cast<AliEmcalContainer*>(nextPartColl()))) cont->NextEvent();
1477 while ((cont = static_cast<AliParticleContainer*>(nextClusColl()))) cont->NextEvent();
1491 if (TString(n).IsNull())
return 0;
1509 if (TString(n).IsNull())
return 0;
1527 if (TString(n).IsNull())
return 0;
1545 if (TString(n).IsNull())
return 0;
1609 AliError(Form(
"%s: Particle container %d not found",GetName(),i));
1612 TString contName = cont->GetArrayName();
1613 return cont->GetArray();
1625 AliError(Form(
"%s:Cluster container %d not found",GetName(),i));
1628 return cont->GetArray();
1643 AliError(Form(
"%s: Particle container %d not found",GetName(),c));
1662 AliError(Form(
"%s: Cluster container %d not found",GetName(),c));
1679 AliError(Form(
"%s: Particle container %d not found",GetName(),i));
1682 return cont->GetNEntries();
1695 AliError(Form(
"%s: Cluster container %d not found",GetName(),i));
1698 return cont->GetNEntries();
1716 AliError(Form(
"%s: fTriggerPatchInfo not available",GetName()));
1724 AliEMCALTriggerPatchInfo *patch(NULL), *selected(NULL);
1725 for (Int_t iPatch = 0; iPatch < nPatch; iPatch++) {
1728 if (patch->IsMainTrigger()) {
1729 if(doSimpleOffline){
1730 if(patch->IsOfflineSimple()){
1734 if(patch->IsLevel0()) selected = patch;
1737 if(patch->IsJetHighSimple() || patch->IsJetLowSimple()){
1738 if(!selected) selected = patch;
1739 else if(patch->GetADCOfflineAmp() > selected->GetADCOfflineAmp()) selected = patch;
1743 if(patch->IsGammaHighSimple() || patch->IsGammaLowSimple()){
1744 if(!selected) selected = patch;
1745 else if(patch->GetADCOfflineAmp() > selected->GetADCOfflineAmp()) selected = patch;
1749 AliError(
"Untreated case: Main Patch is recalculated; should be in 'else' branch");
1755 if(patch->IsLevel0()) selected = patch;
1758 if(patch->IsJetHigh() || patch->IsJetLow()){
1759 if(!selected) selected = patch;
1760 else if (patch->GetADCAmp() > selected->GetADCAmp())
1765 if(patch->IsGammaHigh() || patch->IsGammaLow()){
1766 if(!selected) selected = patch;
1767 else if (patch->GetADCAmp() > selected->GetADCAmp())
1772 AliError(
"Untreated case: Main Patch is recalculated; should be in 'else' branch");
1778 if (doSimpleOffline && patch->IsOfflineSimple()) {
1779 if(!selected) selected = patch;
1780 else if (patch->GetADCOfflineAmp() > selected->GetADCOfflineAmp())
1783 else if (!doSimpleOffline && !patch->IsOfflineSimple()) {
1784 if(!selected) selected = patch;
1785 else if (patch->GetADCAmp() > selected->GetADCAmp())
1800 if (!(InputEvent()->FindListObject(obj->GetName()))) {
1801 InputEvent()->AddObject(obj);
1805 AliFatal(Form(
"%s: Container with name %s already present. Aborting", GetName(), obj->GetName()));
1821 AliWarning(Form(
"%s - AliAnalysisTaskEmcal::IsTrackInEmcalAcceptance - Geometry is not available!", GetName()));
1825 Double_t minPhi =
fGeom->GetArm1PhiMin() - edges;
1826 Double_t maxPhi =
fGeom->GetArm1PhiMax() + edges;
1828 if (part->Phi() > minPhi && part->Phi() < maxPhi) {
1838 axis->SetBinLabel(1,
"NullObject");
1839 axis->SetBinLabel(2,
"Pt");
1840 axis->SetBinLabel(3,
"Acceptance");
1841 axis->SetBinLabel(4,
"MCLabel");
1842 axis->SetBinLabel(5,
"BitMap");
1843 axis->SetBinLabel(6,
"HF cut");
1844 axis->SetBinLabel(7,
"Bit6");
1845 axis->SetBinLabel(8,
"NotHybridTrack");
1846 axis->SetBinLabel(9,
"MCFlag");
1847 axis->SetBinLabel(10,
"MCGenerator");
1848 axis->SetBinLabel(11,
"ChargeCut");
1849 axis->SetBinLabel(12,
"MinDistanceTPCSectorEdge");
1850 axis->SetBinLabel(13,
"Bit12");
1851 axis->SetBinLabel(14,
"IsEMCal");
1852 axis->SetBinLabel(15,
"Time");
1853 axis->SetBinLabel(16,
"Energy");
1854 axis->SetBinLabel(17,
"ExoticCut");
1855 axis->SetBinLabel(18,
"Bit17");
1856 axis->SetBinLabel(19,
"Area");
1857 axis->SetBinLabel(20,
"AreaEmc");
1858 axis->SetBinLabel(21,
"ZLeadingCh");
1859 axis->SetBinLabel(22,
"ZLeadingEmc");
1860 axis->SetBinLabel(23,
"NEF");
1861 axis->SetBinLabel(24,
"MinLeadPt");
1862 axis->SetBinLabel(25,
"MaxTrackPt");
1863 axis->SetBinLabel(26,
"MaxClusterPt");
1864 axis->SetBinLabel(27,
"Flavour");
1865 axis->SetBinLabel(28,
"TagStatus");
1866 axis->SetBinLabel(29,
"MinNConstituents");
1867 axis->SetBinLabel(30,
"Bit29");
1868 axis->SetBinLabel(31,
"Bit30");
1869 axis->SetBinLabel(32,
"Bit31");
1880 TVector3 vect1(part1->Px(), part1->Py(), part1->Pz());
1881 TVector3 vect2(part2->Px(), part2->Py(), part2->Pz());
1882 Double_t z = (vect1 * vect2) / (vect2 * vect2);
1894 TVector3 vect2(part2->Px(), part2->Py(), part2->Pz());
1895 Double_t z = (vect1 * vect2) / (vect2 * vect2);
1914 Double_t veta = t->GetTrackEtaOnEMCal();
1915 Double_t vphi = t->GetTrackPhiOnEMCal();
1917 Float_t pos[3] = {0};
1918 v->GetPosition(pos);
1920 Double_t ceta = cpos.Eta();
1921 Double_t cphi = cpos.Phi();
1923 phidiff=TVector2::Phi_mpi_pi(vphi-cphi);
1934 if (t->TestBit(BIT(22)) && !t->TestBit(BIT(23)))
1936 else if (!t->TestBit(BIT(22)) && t->TestBit(BIT(23)))
1938 else if (t->TestBit(BIT(22)) && t->TestBit(BIT(23)))
1957 if (aodTrack->TestFilterBit(filterBit1)) {
1960 else if (aodTrack->TestFilterBit(filterBit2)) {
1961 if ((aodTrack->GetStatus()&AliVTrack::kITSrefit)!=0) {
1985 AliStack* stack = mcEvent->Stack();
1987 const Int_t nprim = stack->GetNprimary();
1989 if (nprim < 8)
return;
1991 TParticle *part6 = stack->Particle(6);
1992 TParticle *part7 = stack->Particle(7);
2000 AliGenPythiaEventHeader *pythiaGenHeader =
dynamic_cast<AliGenPythiaEventHeader*
>(mcEvent->GenEventHeader());
2001 if(pythiaGenHeader){
2002 Float_t
ptWeight=pythiaGenHeader->EventWeight();
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.
Bool_t fUsePtHardBinScaling
Use pt hard bin scaling in merging.
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
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
Float_t fPtHardAndClusterPtFactor
Factor between ptHard and cluster pT to reject/accept event.
Double_t fMinPtTrackInEmcal
min pt track in emcal
TH1 * fHistEventPlane
!event plane distribution
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
void SetUseScaling(Bool_t val)
Int_t fNcentBins
how many centrality bins
AliClusterContainer * GetClusterContainer(Int_t i=0) const
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
Float_t fPtHardAndJetPtFactor
Factor between ptHard and jet pT to reject/accept event.
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
Float_t fPtHardAndTrackPtFactor
Factor between ptHard and track pT to reject/accept event.
Double_t fCent
!event centrality
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
Bool_t fMCRejectFilter
enable the filtering of events by tail rejection
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
TClonesArray * GetArrayFromEvent(const char *name, const char *clname=0)
Enhanced TList-derived class that implements correct merging for pt_hard binned production.
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)
AliEmcalList * fOutput
!output list
Double_t fMaxBinPt
max pt in histograms
Int_t fPtHardBin
!event pt hard bin
AliMCParticleContainer * GetMCParticleContainer(Int_t i=0) const
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
ClassImp(AliAnalysisTaskCRC) AliAnalysisTaskCRC
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
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