13 #include <THnSparse.h>
18 #include <AliAnalysisManager.h>
19 #include <AliInputEventHandler.h>
20 #include <AliEventPoolManager.h>
22 #include <AliVAODHeader.h>
23 #include <AliVTrack.h>
39 Double_t AliAnalysisTaskEmcalJetHCorrelations::p0_10SG[17] = {0.906767, 0.0754127, 1.11638, -0.0233078, 0.795454, 0.00935385, -0.000327857, 1.08903, 0.0107272, 0.443252, -0.143411, 0.965822, 0.359156, -0.581221, 1.0739, 0.00632828, 0.706356};
41 Double_t AliAnalysisTaskEmcalJetHCorrelations::p10_30SG[17] = {0.908011, 0.0769254, 1.11912, -0.0249449, 0.741488, 0.0361252, -0.00367954, 1.10424, 0.011472, 0.452059, -0.133282, 0.980633, 0.358222, -0.620256, 1.06871, 0.00564449, 0.753168};
43 Double_t AliAnalysisTaskEmcalJetHCorrelations::p30_50SG[17] = {0.958708, 0.0799197, 1.10817, -0.0357678, 0.75051, 0.0607808, -0.00929713, 0.998801, 0.00692244, 0.615452, -0.0480328, 0.968431, 0.321634, -0.619066, 1.03412, 0.00656201, 0.798666};
45 Double_t AliAnalysisTaskEmcalJetHCorrelations::p50_90SG[17] = {0.944565, 0.0807258, 1.12709, -0.0324746, 0.666452, 0.0842476, -0.00963837, 1.02829, 0.00666852, 0.549625, -0.0603107, 0.981374, 0.309374, -0.619181, 1.05367, 0.005925, 0.744887};
48 Double_t AliAnalysisTaskEmcalJetHCorrelations::p0_10G[17] = {0.971679, 0.0767571, 1.13355, -0.0274484, 0.856652, 0.00536795, 3.90795e-05, 1.06889, 0.011007, 0.447046, -0.146626, 0.919777, 0.192601, -0.268515, 1.00243, 0.00620849, 0.709477};
50 Double_t AliAnalysisTaskEmcalJetHCorrelations::p10_30G[17] = {0.97929, 0.0776039, 1.12213, -0.0300645, 0.844722, 0.0134788, -0.0012333, 1.07955, 0.0116835, 0.456608, -0.132743, 0.930964, 0.174175, -0.267154, 0.993118, 0.00574892, 0.765256};
52 Double_t AliAnalysisTaskEmcalJetHCorrelations::p30_50G[17] = {0.997696, 0.0816769, 1.14341, -0.0353734, 0.752151, 0.0744259, -0.0102926, 1.01561, 0.00713274, 0.57203, -0.0640248, 0.947747, 0.102007, -0.194698, 0.999164, 0.00568476, 0.7237};
54 Double_t AliAnalysisTaskEmcalJetHCorrelations::p50_90G[17] = {0.97041, 0.0813559, 1.12151, -0.0368797, 0.709327, 0.0701501, -0.00784043, 1.06276, 0.00676173, 0.53607, -0.0703117, 0.982534, 0.0947881, -0.18073, 1.03229, 0.00580109, 0.737801};
63 fDoEventMixing(kFALSE),
64 fNMixingTracks(50000), fMinNTracksMixedEvents(5000), fMinNEventsMixedEvents(5), fNCentBinsMixedEvent(10),
66 fTriggerType(AliVEvent::kEMCEJE), fMixingEventType(AliVEvent::kMB | AliVEvent::kCentral | AliVEvent::kSemiCentral),
67 fDisableFastPartition(kFALSE),
69 fNoMixedEventJESCorrection(kFALSE),
71 fDoLessSparseAxes(kFALSE), fDoWiderTrackBin(kFALSE),
90 fDoEventMixing(kFALSE),
91 fNMixingTracks(50000), fMinNTracksMixedEvents(5000), fMinNEventsMixedEvents(5), fNCentBinsMixedEvent(10),
93 fTriggerType(AliVEvent::kEMCEJE), fMixingEventType(AliVEvent::kMB | AliVEvent::kCentral | AliVEvent::kSemiCentral),
94 fDisableFastPartition(kFALSE),
96 fNoMixedEventJESCorrection(kFALSE),
98 fDoLessSparseAxes(kFALSE), fDoWiderTrackBin(kFALSE),
125 fHistJetH[centralityBin][jetPtBin][etaBin] =
nullptr;
140 fHistTrackPt =
new TH1F(
"fHistTrackPt",
"P_{T} distribution", 1000, 0.0, 100.0);
142 fHistJetHEtaPhi =
new TH2F(
"fHistJetHEtaPhi",
"Jet-Hadron deta-dphi",900,-1.8,1.8,720,-1.6,4.8);
144 fHistJHPsi =
new TH3F(
"fHistJHPsi",
"Jet-Hadron ntr-trpt-dpsi",20,0,100,200,0,20,120,0,180);
154 name = Form(
"fHistTrackEtaPhi_%i", trackPtBin);
160 name = Form(
"fHistJetPt_%i",centralityBin);
161 fHistJetPt[centralityBin] =
new TH1F(name,name,200,0,200);
164 name = Form(
"fHistJetPtBias_%i",centralityBin);
170 name = Form(
"fHistJetH_%i_%i_%i",centralityBin,jetPtBin,etaBin);
171 fHistJetH[centralityBin][jetPtBin][etaBin]=
new TH2F(name,name,72,-0.5*TMath::Pi(),1.5*TMath::Pi(),300,0,30);
174 name = Form(
"fHistJetHBias_%i_%i_%i",centralityBin,jetPtBin,etaBin);
175 fHistJetHBias[centralityBin][jetPtBin][etaBin]=
new TH2F(name,name,72,-0.5*TMath::Pi(),1.5*TMath::Pi(),300,0,30);
183 cifras = 1<<0 | 1<<1 | 1<<2 | 1<<3 | 1<<4 | 1<<5;
185 cifras = 1<<0 | 1<<1 | 1<<2 | 1<<3 | 1<<4 | 1<<5 | 1<<7;
194 cifras = 1<<0 | 1<<1 | 1<<2 | 1<<3 | 1<<4 | 1<<5;
196 cifras = 1<<0 | 1<<1 | 1<<2 | 1<<3 | 1<<4 | 1<<5 | 1<<7;
207 Int_t poolSize = 1000;
209 Int_t nZVertexBins = 10;
212 Int_t nEventActivityBins = 8;
225 eventActivityBins = multiplicityBins;
228 fPoolMgr =
new AliEventPoolManager(poolSize,
fNMixingTracks, nEventActivityBins, eventActivityBins, nZVertexBins, zVertexBins);
242 eta = TMath::Abs(eta);
243 if (eta <= 0.4) etabin = 0;
244 else if (eta > 0.4 && eta < 0.8) etabin = 1;
245 else if (eta >= 0.8) etabin = 2;
258 if (pt < 0.5) ptBin = 0;
259 else if (pt < 1 ) ptBin = 1;
260 else if (pt < 2 ) ptBin = 2;
261 else if (pt < 3 ) ptBin = 3;
262 else if (pt < 5 ) ptBin = 4;
263 else if (pt < 8 ) ptBin = 5;
264 else if (pt < 20 ) ptBin = 6;
280 if (pt >= 15 && pt < 20) ptBin = 0;
281 else if (pt >= 20 && pt < 25) ptBin = 1;
282 else if (pt >= 25 && pt < 30) ptBin = 2;
283 else if (pt >= 30 && pt < 60) ptBin = 3;
284 else if (pt >= 60) ptBin = 4;
299 if (embeddingHelper) {
300 auto aodHeader =
dynamic_cast<AliVAODHeader *
>(embeddingHelper->GetEventHeader());
302 eventTrigger = aodHeader->GetOfflineTrigger();
305 AliErrorStream() <<
"Failed to retrieve requested AOD header from embedding helper\n";
309 AliErrorStream() <<
"Failed to retrieve requested embedding helper\n";
313 eventTrigger = ((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected();
328 AliError(Form(
"%s: Unable to retrieve tracks!", GetName()));
335 AliError(Form(
"%s: Unable to retrieve jets!", GetName()));
344 Bool_t biasedJet = kFALSE;
365 AliDebugStream(5) <<
"Beginning main processing. Number of jets: " << jets->
GetNJets() <<
", accepted jets: " << jets->
GetNAcceptedJets() <<
"\n";
369 AliDebugStream(4) << GetName() <<
": Fast partition disabled\n";
379 AliDebugStream(5) <<
"Rejected jets due to physics selection. Phys sel: " << std::bitset<32>(eventTrigger) <<
", requested triggers: " << std::bitset<32>(fTriggerType) <<
" \n";
384 AliDebugStream(5) <<
"Jet passed event selection!\nJet: " << jet->toString().Data() <<
"\n";
389 if (jet->MatchedJet()) {
390 AliDebugStream(4) <<
"Jet is matched!\nJet: " << jet->toString().Data() <<
"\n";
393 AliDebugStream(5) <<
"Rejected jet because it was not matched to a external event jet.\n";
401 if (jet == leadingJet) leadJet = kTRUE;
407 jetVector.SetXYZ(jet->Px(), jet->Py(), jet->Pz());
411 if (biasedJet == kTRUE) {
417 if (jet->Pt() > 15) {
419 AliDebugStream(4) <<
"Passed min jet pt cut of 15. Jet: " << jet->toString().Data() <<
"\n";
424 track = trackIter.first;
434 AliErrorStream() <<
"Jet Pt Bin negative: " << jet->Pt() <<
"\n";
440 AliErrorStream() <<
"Eta Bin negative: " << deltaEta <<
"\n";
447 if ( (jet->Pt() > 20.) && (jet->Pt() < 60.) ) {
448 fHistJHPsi->Fill(tracks->
GetNTracks(), track.Pt(), track.Vect().Angle(jetVector) * TMath::RadToDeg() );
456 AliDebugStream(6) << GetName() <<
": efficiency: " << efficiency <<
"\n";
458 if (biasedJet == kTRUE) {
462 eventActivity =
fCent;
469 Double_t triggerEntries[6] = {eventActivity, jet->Pt(), track.Pt(), deltaEta, deltaPhi,
static_cast<Double_t>(leadJet)};
472 Double_t triggerEntries[7] = {eventActivity, jet->Pt(), track.Pt(), deltaEta, deltaPhi,
static_cast<Double_t>(leadJet), deltaR};
506 AliEventPool *pool = 0;
516 else if (
fBeamType ==
kpp) AliFatal(Form(
"No pool found for ntracks_pp = %d, zVertex = %f", tracks->
GetNTracks(), zVertex));
521 Int_t nMix = pool->GetCurrentNEvents();
523 if(eventTrigger & fTriggerType) {
531 if (jet->MatchedJet()) {
532 AliDebugStream(4) <<
"Jet is matched!\nJet: " << jet->toString().Data() <<
"\n";
535 AliDebugStream(5) <<
"Rejected jet because it was not matched to a external event jet.\n";
543 if (jet == leadingJet) { leadJet = kTRUE; }
549 if (jet->Pt() < 15)
continue;
552 if (biasedJet == kTRUE) {
555 for (
Int_t jMix=0; jMix < nMix; jMix++) {
556 TObjArray* bgTracks = pool->GetEvent(jMix);
558 for(
Int_t ibg=0; ibg < bgTracks->GetEntries(); ibg++){
563 AliError(Form(
"%s:Failed to retrieve tracks from mixed events", GetName()));
568 track.SetPtEtaPhiE(bgTrack->
Pt(), bgTrack->
Eta(), bgTrack->
Phi(), 0);
577 eventActivity =
fCent;
584 Double_t triggerEntries[6] = {eventActivity, jet->Pt(), track.Pt(), deltaEta, deltaPhi,
static_cast<Double_t>(leadJet)};
587 Double_t triggerEntries[7] = {eventActivity, jet->Pt(), track.Pt(), deltaEta, deltaPhi,
static_cast<Double_t>(leadJet), deltaR};
601 pool->UpdatePool(tracksClone);
637 deltaPhi =
DeltaPhi(particleTwo->Phi(), particleOne.Phi(), -1.0*TMath::Pi(), TMath::Pi());
638 deltaEta = particleOne.Eta() - particleTwo->Eta();
639 deltaR = TMath::Sqrt(deltaPhi*deltaPhi + deltaEta*deltaEta);
642 deltaPhi =
DeltaPhi(particleTwo->Phi(), particleOne.Phi(), -0.5*TMath::Pi(), 3*TMath::Pi()/2.);
662 const Int_t dim = count;
669 while(c<dim && i<32){
674 hnTitle += Form(
";%s",label.Data());
682 return new THnSparseF(name, hnTitle.Data(), dim,
nbins, xmin, xmax);
701 label =
"V0 centrality (%)";
708 label =
"corrected jet pt";
743 label =
"leading jet";
750 label =
"trigger track";
764 label =
"leading track";
783 tracksClone->SetOwner(kTRUE);
789 for (
auto particle : tracks->
accepted())
793 if(trackPtBin > -1)
fHistTrackEtaPhi[trackPtBin]->Fill(particle->Eta(),particle->Phi());
796 clone =
new AliBasicParticle(particle->Eta(), particle->Phi(), particle->Pt(), particle->Charge());
798 clone ->SetUniqueID(particle->GetUniqueID());
800 tracksClone->Add(clone);
842 Int_t runNUM = fCurrentRunNumber;
843 Int_t runSwitchGood = -999;
854 if ((runNUM == 169975 || runNUM == 169981 || runNUM == 170038 || runNUM == 170040 || runNUM == 170083 || runNUM == 170084 || runNUM == 170085 || runNUM == 170088 || runNUM == 170089 || runNUM == 170091 || runNUM == 170152 || runNUM == 170155 || runNUM == 170159 || runNUM == 170163 || runNUM == 170193 || runNUM == 170195 || runNUM == 170203 || runNUM == 170204 || runNUM == 170228 || runNUM == 170230 || runNUM == 170268 || runNUM == 170269 || runNUM == 170270 || runNUM == 170306 || runNUM == 170308 || runNUM == 170309)) runSwitchGood = 0;
857 if ((runNUM == 167902 || runNUM == 167903 || runNUM == 167915 || runNUM == 167920 || runNUM == 167987 || runNUM == 167988 || runNUM == 168066 || runNUM == 168068 || runNUM == 168069 || runNUM == 168076 || runNUM == 168104 || runNUM == 168107 || runNUM == 168108 || runNUM == 168115 || runNUM == 168212 || runNUM == 168310 || runNUM == 168311 || runNUM == 168322 || runNUM == 168325 || runNUM == 168341 || runNUM == 168342 || runNUM == 168361 || runNUM == 168362 || runNUM == 168458 || runNUM == 168460 || runNUM == 168461 || runNUM == 168464 || runNUM == 168467 || runNUM == 168511 || runNUM == 168512 || runNUM == 168777 || runNUM == 168826 || runNUM == 168984 || runNUM == 168988 || runNUM == 168992 || runNUM == 169035 || runNUM == 169091 || runNUM == 169094 || runNUM == 169138 || runNUM == 169143 || runNUM == 169144 || runNUM == 169145 || runNUM == 169148 || runNUM == 169156 || runNUM == 169160 || runNUM == 169167 || runNUM == 169238 || runNUM == 169411 || runNUM == 169415 || runNUM == 169417 || runNUM == 169835 || runNUM == 169837 || runNUM == 169838 || runNUM == 169846 || runNUM == 169855 || runNUM == 169858 || runNUM == 169859 || runNUM == 169923 || runNUM == 169956 || runNUM == 170027 || runNUM == 170036 || runNUM == 170081)) runSwitchGood = 1;
862 if (runSwitchGood != -999) {
863 effSwitch = 2 + runSwitchGood*4 +
fCentBin;
879 TRefficiency = ptaxis*etaaxis;
886 TRefficiency = ptaxis*etaaxis;
893 TRefficiency = ptaxis*etaaxis;
900 TRefficiency = ptaxis*etaaxis;
907 TRefficiency = ptaxis*etaaxis;
914 TRefficiency = ptaxis*etaaxis;
921 TRefficiency = ptaxis*etaaxis;
928 TRefficiency = ptaxis*etaaxis;
945 coefficient = (1 + -0.442232 * trackPT
946 + 0.501831 * std::pow(trackPT, 2)
947 + -0.252024 * std::pow(trackPT, 3)
948 + 0.062964 * std::pow(trackPT, 4)
949 + -0.007681 * std::pow(trackPT, 5)
950 + 0.000365 * std::pow(trackPT, 6));
954 TRefficiency = coefficient * (1 + 0.402825 * std::abs(trackETA)
955 + -2.213152 * std::pow(trackETA, 2)
956 + 4.311098 * std::abs(std::pow(trackETA, 3))
957 + -2.778200 * std::pow(trackETA, 4));
981 AliDebugStream(3) << GetName() <<
":" << hist->GetName() <<
": " << std::boolalpha <<
"Using normal weights: JESHist: " << (
fJESCorrectionHist ?
fJESCorrectionHist->GetName() :
"Null") <<
", noCorrection: " << noCorrection << std::endl;
982 hist->Fill(fillValue, weight);
989 std::vector <Double_t> yBinsContent;
990 AliDebug(3, TString::Format(
"%s: Attempt to access weights from JES correction hist %s with jet pt %f!", GetName(), hist->GetName(), fillValue));
992 AliDebug(3, TString::Format(
"weights size: %zd", yBinsContent.size()));
999 if (yBinsContent.at(index-1) > 0) {
1003 AliDebug(4, TString::Format(
"fillLocation: %f, weight: %f", fillLocation, yBinsContent.at(index-1)));
1005 hist->Fill(fillLocation, weight*yBinsContent.at(index-1));
1029 AliDebugStream(3) << GetName() <<
":" << hist->GetName() <<
": " << std::boolalpha <<
"Using normal weights: JESHist: " << (
fJESCorrectionHist ?
fJESCorrectionHist->GetName() :
"Null") <<
", noCorrection: " << noCorrection << std::endl;
1030 hist->Fill(fillValue, weight);
1040 std::vector <Double_t> yBinsContent;
1041 AliDebug(3, TString::Format(
"%s: Attempt to access weights from JES correction hist %s with jet pt %f!", GetName(), hist->GetName(), jetPt));
1043 AliDebug(3, TString::Format(
"weights size: %zd", yBinsContent.size()));
1050 if (yBinsContent.at(index-1) > 0) {
1054 AliDebug(4,TString::Format(
"fillValue[1]: %f, weight: %f", fillValue[1], yBinsContent.at(index-1)));
1056 hist->Fill(fillValue, weight*yBinsContent.at(index-1));
1073 for (
Int_t index = 1; index <= hist->GetYaxis()->GetNbins(); index++)
1076 yBinsContent.push_back(hist->GetBinContent(hist->GetBin(xBin,index)));
1078 if (scaleFactor >= 0)
1081 hist->SetBinContent(hist->GetBin(xBin,index), yBinsContent.at(index-1)/scaleFactor);
1105 if (filename.Contains(
"alien://") && !gGrid) {
1106 TGrid::Connect(
"alien://");
1116 TString histBaseName = histName;
1118 histName = TString::Format(
"%s_Track%.2f", histName.Data(), trackBias);
1121 histName = TString::Format(
"%s_Clus%.2f", histName.Data(), clusterBias);
1125 TFile * jesCorrectionFile = TFile::Open(filename);
1126 if (!jesCorrectionFile || jesCorrectionFile->IsZombie()) {
1127 AliError(TString::Format(
"%s: Could not open JES correction file %s", GetName(), filename.Data()));
1132 TH2D * JESCorrectionHist =
dynamic_cast<TH2D*
>(jesCorrectionFile->Get(histName.Data()));
1133 if (JESCorrectionHist) {
1134 AliInfo(TString::Format(
"%s: JES correction hist name \"%s\" loaded from file %s.", GetName(), histName.Data(), filename.Data()));
1137 AliError(TString::Format(
"%s: JES correction hist name \"%s\" not found in file %s.", GetName(), histName.Data(), filename.Data()));
1140 JESCorrectionHist =
dynamic_cast<TH2D*
>(jesCorrectionFile->Get(histBaseName.Data()));
1141 if (JESCorrectionHist) {
1142 AliInfo(TString::Format(
"%s: JES correction hist name \"%s\" loaded from file %s.", GetName(), histBaseName.Data(), filename.Data()));
1143 histName = histBaseName;
1147 AliError(TString::Format(
"%s: JES correction with base hist name %s not found in file %s.", GetName(), histBaseName.Data(), filename.Data()));
1153 TH2D * tempHist =
static_cast<TH2D *
>(JESCorrectionHist->Clone());
1154 tempHist->SetDirectory(0);
1158 jesCorrectionFile->Close();
1167 if (tempName.Index(tag) == -1) {
1169 Ssiz_t suffixLocation = tempName.Last(
'_');
1170 tempName.Insert(suffixLocation, tag.Data());
1173 AliDebug(3, TString::Format(
"%s: Setting task name to %s", GetName(), tempName.Data()));
1174 SetName(tempName.Data());
1186 const char *nTracks,
1187 const char *nCaloClusters,
1192 const Int_t nTracksMixedEvent,
1193 const Int_t minNTracksMixedEvent,
1194 const Int_t minNEventsMixedEvent,
1195 const UInt_t nCentBinsMixedEvent,
1200 const Bool_t lessSparseAxes,
1201 const Bool_t widerTrackBin,
1203 const Int_t doEffCorrSW,
1204 const Bool_t JESCorrection,
1205 const char * JESCorrectionFilename,
1206 const char * JESCorrectionHistName,
1215 AliErrorClass(
"No analysis manager to connect to.");
1225 TString clusName(nCaloClusters);
1227 if (trackName ==
"usedefault") {
1231 if (clusName ==
"usedefault") {
1235 TString name(
"AliAnalysisTaskJetH");
1236 if (!trackName.IsNull()) {
1237 name += TString::Format(
"_%s", trackName.Data());
1239 if (!clusName.IsNull()) {
1240 name += TString::Format(
"_%s", clusName.Data());
1242 if (strcmp(suffix,
"") != 0) {
1243 name += TString::Format(
"_%s", suffix);
1251 correlationTask->
SetEventMixing(static_cast<Bool_t>(nTracksMixedEvent));
1266 if (JESCorrection == kTRUE)
1270 AliErrorClass(
"Failed to successfully retrieve and initialize the JES correction! Task initialization continuing without JES correction (can be set manually later).");
1278 mgr->AddTask(correlationTask);
1281 mgr->ConnectInput (correlationTask, 0, mgr->GetCommonInputContainer() );
1282 AliAnalysisDataContainer * cojeth = mgr->CreateContainer(correlationTask->GetName(),
1284 AliAnalysisManager::kOutputContainer,
1285 Form(
"%s", AliAnalysisManager::GetCommonFileName()));
1286 mgr->ConnectOutput(correlationTask, 1, cojeth);
1288 return correlationTask;
1297 std::string clusName,
1298 const double jetConstituentPtCut,
1299 const double trackEta,
1300 const double jetRadius)
1302 bool returnValue =
false;
1303 AliInfoStream() <<
"Configuring Jet-H Correlations task for a standard analysis.\n";
1307 if (clusName ==
"usedefault") {
1312 clustersForJets->SetName(
"clustersForJets");
1313 clustersForJets->SetMinE(jetConstituentPtCut);
1317 if (trackName ==
"usedefault") {
1321 particlesForJets->SetName(
"particlesForJets");
1322 particlesForJets->SetMinPt(jetConstituentPtCut);
1323 particlesForJets->SetEtaLimits(-1.0*trackEta, trackEta);
1327 if (particlesForCorrelations)
1329 particlesForCorrelations->SetName(
"tracksForCorrelations");
1330 particlesForCorrelations->SetMinPt(0.15);
1331 particlesForCorrelations->SetEtaLimits(-1.0*trackEta, trackEta);
1336 AliWarningStream() <<
"No particle container was successfully created!\n";
1348 jetContainer->
SetJetAreaCut(jetRadius * jetRadius * TMath::Pi() * 0.6);
1364 std::string clusName,
1365 const double jetConstituentPtCut,
1366 const double trackEta,
1367 const double jetRadius,
1368 const std::string & jetTag,
1369 const std::string & correlationsTracksCutsPeriod)
1371 bool returnValue =
false;
1372 AliInfoStream() <<
"Configuring Jet-H Correlations task for an embedding analysis.\n";
1379 if (clusName ==
"usedefault") {
1384 clustersForJets->SetName(
"clustersForJets");
1385 clustersForJets->SetMinE(jetConstituentPtCut);
1397 if (trackName ==
"usedefault") {
1401 particlesForJets->SetName(
"particlesForJets");
1402 particlesForJets->SetMinPt(jetConstituentPtCut);
1403 particlesForJets->SetEtaLimits(-1.0*trackEta, trackEta);
1408 if (particlesForCorrelations)
1410 particlesForCorrelations->SetName(
"tracksForCorrelations");
1411 particlesForCorrelations->SetMinPt(0.15);
1412 particlesForCorrelations->SetEtaLimits(-1.0*trackEta, trackEta);
1413 particlesForCorrelations->SetIsEmbedding(
true);
1423 AliWarningStream() <<
"No particle container was successfully created!\n";
1437 jetContainer->
SetJetAreaCut(jetRadius * jetRadius * TMath::Pi() * 0.6);
1459 partCont = trackCont;
1461 else if (collectionName !=
"") {
static AliAnalysisTaskEmcalJetHCorrelations * AddTaskEmcalJetHCorrelations(const char *nTracks="usedefault", const char *nCaloClusters="usedefault", const Double_t trackBias=5, const Double_t clusterBias=5, const Int_t nTracksMixedEvent=0, const Int_t minNTracksMixedEvent=5000, const Int_t minNEventsMixedEvent=5, const UInt_t nCentBinsMixedEvent=10, UInt_t trigEvent=AliVEvent::kAny, UInt_t mixEvent=AliVEvent::kAny, const Bool_t lessSparseAxes=kFALSE, const Bool_t widerTrackBin=kFALSE, const Int_t doEffCorrSW=0, const Bool_t JESCorrection=kFALSE, const char *JESCorrectionFilename="alien:///alice/cern.ch/user/r/rehlersi/JESCorrection.root", const char *JESCorrectionHistName="JESCorrection", const char *suffix="biased")
virtual void GetDimParams(Int_t iEntry, TString &label, Int_t &nbins, Double_t &xmin, Double_t &xmax)
Bool_t RetrieveAndInitializeJESCorrectionHist(TString filename, TString histName, Double_t trackBias=AliAnalysisTaskEmcalJetHCorrelations::kDisableBias, Double_t clusterBias=AliAnalysisTaskEmcalJetHCorrelations::kDisableBias)
void FillHist(TH1 *hist, Double_t fillValue, Double_t weight=1.0, Bool_t noCorrection=kFALSE)
virtual void UserCreateOutputObjects()
void SetTrackCutsPeriod(const char *period)
virtual void SetTrackBias(Double_t b)
Require a track with pt > b in jet.
TH2 * fHistJetHBias[6][5][3]
! Jet-hadron correlations of jets which meet the constituent bias criteria (the arrays correspond to ...
void SetDoLessSparseAxes(Bool_t dlsa)
static Double_t p50_90SG[17]
50-90% centrality semi-good runs
AliParticleContainer * CreateParticleOrTrackContainer(std::string const &collectionName) const
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 fDisableFastPartition
True if task should be disabled for the fast partition, where the EMCal is not included.
void AccessSetOfYBinValues(TH2D *hist, Int_t xBin, std::vector< Double_t > &yBinsContent, Double_t scaleFactor=-1.0)
AliJetContainer * GetJetContainer(Int_t i=0) const
void SetDoEffCorr(Int_t effcorr)
virtual void SetMinNTracksForMixedEvents(Int_t nmt)
void AdoptParticleContainer(AliParticleContainer *cont)
Int_t GetJetPtBin(Double_t pt) const
THnSparse * fhnJH
! JetH THnSparse
Double_t fClusterBias
Jet cluster bias.
const AliTrackIterableContainer accepted() const
static Double_t p0_10SG[17]
0-10% centrality semi-good runs
void SetJESCorrectionHist(TH2D *hist)
Container with name, TClonesArray and cuts for particles.
UInt_t RetrieveTriggerMask() const
void InitializeArraysToZero()
Declaration of class AliTLorentzVector.
TH3 * fHistJHPsi
! Psi angle distribution
static Double_t p10_30G[17]
10-30% centrality good runs
Double_t GetTrackBias() const
Bool_t fGeneralHistograms
whether or not it should fill some general histograms
Declaration of class AliAnalysisTaskEmcalEmbeddingHelper.
virtual void SetMixedEventTriggerType(UInt_t me)
Set the mixed event trigger selection.
AliAnalysisTaskEmcalJetHCorrelations()
TH2D * fJESCorrectionHist
Histogram containing the jet energy scale correction.
TH2 * fHistJetH[6][5][3]
! Jet-hadron correlations (the arrays correspond to centrality, jet pt bins, and eta bins) ...
AliJetContainer * AddJetContainer(const char *n, TString defaultCutType, Float_t jetRadius=0.4)
Int_t fCentBin
!event centrality bin
void SetVzRange(Double_t min, Double_t max)
virtual void SetNCentBinsMixedEvent(Bool_t centbins)
virtual Double_t Pt() const
TH1 * fHistJetPt[6]
! Jet pt spectrum (the array corresponds to centrality bins)
TObjArray * CloneAndReduceTrackList()
virtual Double_t Eta() const
TH2 * fHistJetHEtaPhi
! Eta-phi distribution of jets which are in jet-hadron correlations
UInt_t fTriggerType
Event selection for jets (ie triggered events).
Container for particles within the EMCAL framework.
Bool_t fIsEmbedded
trigger, embedded signal
BeamType
Switch for the beam type.
virtual void SetMinNEventsForMixedEvents(Int_t nme)
AliParticleContainer * GetParticleContainer(Int_t i=0) const
Get particle container attached to this task.
TH2 * fHistTrackEtaPhi[7]
! Track eta-phi distribution (the array corresponds to track pt)
AliEmcalJet * GetLeadingJet(const char *opt="")
void SetJetPtCut(Float_t cut)
void SetDoWiderTrackBin(Bool_t wtrbin)
Double_t fTrackBias
Jet track bias.
bool ConfigureForEmbeddingAnalysis(std::string trackName="usedefault", std::string clusName="caloClustersCombined", const double jetConstituentPtCut=3, const double trackEta=0.8, const double jetRadius=0.2, const std::string &jetTag="hybridJets", const std::string &correlationsTracksCutsPeriod="lhc11a")
BeamType fForceBeamType
forced beam type
Int_t GetEtaBin(Double_t eta) const
Double_t MaxTrackPt() const
TH2 * fHistJetEtaPhi
! Jet eta-phi distribution
BeamType fBeamType
!event beam type
Double_t fCent
!event centrality
virtual void SetTriggerType(UInt_t te)
Set the trigger event trigger selection.
Bool_t fDoWiderTrackBin
True if the track pt bins in the THnSparse should be wider.
THnSparse * fhnMixedEvents
! Mixed events THnSparse
UInt_t fMixingEventType
Event selection for mixed events.
static Double_t p50_90G[17]
50-90% centrality good runs
! Number of elements in mixed event multiplicity binned arrays
virtual void SetNumberOfMixingTracks(Int_t tracks)
Int_t fMinNTracksMixedEvents
threshold to use event pool # tracks
! Number of elements in track pt binned arrays
! Number of elements in centrality binned arrays
Double_t GetClusterBias() const
virtual void SetNCentBins(Int_t n)
void SetIsEmbedded(Bool_t i)
! Arbitrarily large value which can be used to disable the constituent bias. Can be used for either t...
bool ConfigureForStandardAnalysis(std::string trackName="usedefault", std::string clusName="usedefault", const double jetConstituentPtCut=3, const double trackEta=0.8, const double jetRadius=0.2)
Bool_t fNoMixedEventJESCorrection
True if the jet energy scale correction should be applied to mixed event histograms.
! Number of elements in eta binned arrays
AliEventPoolManager * fPoolMgr
! Event pool manager
Int_t fDoEffCorrection
Control the efficiency correction. See EffCorrection() for meaning of values.
static Double_t * GenerateFixedBinArray(Int_t n, Double_t min, Double_t max)
virtual THnSparse * NewTHnSparseF(const char *name, UInt_t entries)
AliEmcalList * fOutput
!output list
static Double_t p0_10G[17]
0-10% centrality good runs
virtual void SetEventMixing(Bool_t enable)
TH1 * fHistTrackPt
! Track pt spectrum
Double_t fVertex[3]
!event vertex
AliTrackContainer * GetTrackContainer(Int_t i=0) const
TH1 * fHistEventRejection
!book keep reasons for rejecting event
void SetMakeGeneralHistograms(Bool_t g)
Int_t GetTrackPtBin(Double_t pt) const
Base task in the EMCAL jet framework.
Double_t EffCorrection(Double_t trkETA, Double_t trkPT, AliAnalysisTaskEmcal::BeamType beamType) const
Double_t MaxClusterPt() const
Represent a jet reconstructed using the EMCal jet framework.
static std::string DetermineUseDefaultName(InputObject_t objType)
const AliTrackIterableMomentumContainer accepted_momentum() const
static Double_t p30_50SG[17]
30-50% centrality semi-good runs
void GetDeltaEtaDeltaPhiDeltaR(AliTLorentzVector &particleOne, AliVParticle *particleTwo, Double_t &deltaEta, Double_t &deltaPhi, Double_t &deltaR)
Bool_t fDoEventMixing
flag to do evt mixing
Bool_t BiasedJet(AliEmcalJet *jet)
void UserCreateOutputObjects()
Main initialization function on the worker.
Bool_t fDoLessSparseAxes
True if there should be fewer THnSparse axes.
const AliJetIterableContainer accepted() const
Jet-hadron correlations analysis task for central Pb-Pb and pp.
UInt_t fNCentBinsMixedEvent
N cent bins for the event mixing pool.
void SetMaxTrackPt(Float_t b)
TH1 * fHistJetPtBias[6]
! Jet pt spectrum of jets which meet the constituent bias criteria (the array corresponds to centrali...
virtual void SetClusterBias(Double_t b)
Require a cluster with pt > b in jet.
virtual Double_t Phi() const
Container structure for EMCAL clusters.
Int_t fMinNEventsMixedEvents
threshold to use event pool # events
EMCal fiducial acceptance (each eta, phi edge narrowed by jet R)
Int_t fNMixingTracks
size of track buffer for event mixing
static Double_t p30_50G[17]
30-50% centrality good runs
Container for jet within the EMCAL jet framework.
! Number of elements in jet pt binned arrays
static Double_t p10_30SG[17]
10-30% centrality semi-good runs
void SetJetAreaCut(Float_t cut)
static const AliAnalysisTaskEmcalEmbeddingHelper * GetInstance()