16 #include <TClonesArray.h>
20 #include <THnSparse.h>
22 #include <AliVCluster.h>
23 #include <AliVParticle.h>
46 fNDijetPtThresholds(1),
49 fDijetLeadingHadronPt(0),
53 fPlotJetHistograms(kFALSE),
54 fPlotDijetJetHistograms(kFALSE),
55 fPlotDijetImbalanceHistograms(kFALSE),
56 fDoMomentumBalance(kFALSE),
57 fDoGeometricalMatching(kFALSE),
59 fTrackConstituentThreshold(0),
60 fClusterConstituentThreshold(0)
77 fNDijetPtThresholds(1),
80 fDijetLeadingHadronPt(0),
84 fPlotJetHistograms(kFALSE),
85 fPlotDijetJetHistograms(kFALSE),
86 fPlotDijetImbalanceHistograms(kFALSE),
87 fDoMomentumBalance(kFALSE),
88 fDoGeometricalMatching(kFALSE),
90 fTrackConstituentThreshold(0),
91 fClusterConstituentThreshold(0)
136 while ((obj = next())) {
152 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
163 axisTitle[dim] =
"Centrality (%)";
171 axisTitle[dim] =
"#eta_{jet}";
178 axisTitle[dim] =
"#phi_{jet} (rad)";
181 max[dim] = TMath::Pi() * 2.02;
185 axisTitle[dim] =
"#it{p}_{T} (GeV/#it{c})";
186 nbins[dim] = TMath::CeilNint(
fMaxPt/2);
193 axisTitle[dim] =
"#it{p}_{T}^{corr} (GeV/#it{c})";
194 nbins[dim] = TMath::CeilNint(
fMaxPt/2);
195 min[dim] = -
fMaxPt/2 + 25;
201 axisTitle[dim] =
"#it{p}_{T,particle}^{leading} (GeV/#it{c})";
208 max[dim] = pTLeadingBins[nbins[dim]];
209 binEdges[dim] = pTLeadingBins;
212 axisTitle[dim] =
"#it{A}_{jet}";
220 axisTitle[dim] =
"NEF";
228 axisTitle[dim] =
"#it{z}_{leading}";
236 axisTitle[dim] =
"No. of constituents";
244 axisTitle[dim] =
"No. of constituents";
252 TString thnname = TString::Format(
"%s/JetObservables", jets->GetArrayName().Data());
254 for (
Int_t i = 0; i < dim; i++) {
255 hn->GetAxis(i)->SetTitle(axisTitle[i]);
256 hn->SetBinEdges(i, binEdges[i]);
262 histname = TString::Format(
"%s/fHistJetRejectionReason", jets->GetArrayName().Data());
263 title = histname +
";Rejection reason;#it{p}_{T,jet} (GeV/#it{c});counts";
268 histname = TString::Format(
"%s/fHistRhoVsCent", jets->GetArrayName().Data());
269 title = histname +
";Centrality (%);#rho (GeV/#it{c});counts";
284 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
293 axisTitle[dim] =
"Centrality (%)";
301 axisTitle[dim] =
"LeadingHadronRequired";
308 axisTitle[dim] =
"#it{p}_{T,min}^{trig}";
315 axisTitle[dim] =
"#it{p}_{T,min}^{ass}";
322 axisTitle[dim] =
"isAccepted";
329 axisTitle[dim] =
"LeadingSubleading";
336 axisTitle[dim] =
"#it{p}_{T,jet} (GeV/#it{c})";
338 min[dim] = -
fMaxPt/2 + 25;
343 axisTitle[dim] =
"#phi_{jet}";
346 max[dim] = TMath::TwoPi();
350 axisTitle[dim] =
"#eta_{jet}";
357 axisTitle[dim] =
"N_{tracks}";
364 axisTitle[dim] =
"A_{jet}";
371 TString thnname = TString::Format(
"%s/DijetObservables", jets->GetArrayName().Data());
373 for (
Int_t i = 0; i < dim; i++) {
374 hn->GetAxis(i)->SetTitle(axisTitle[i]);
375 hn->SetBinEdges(i, binEdges[i]);
388 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
397 axisTitle[dim] =
"Centrality (%)";
405 axisTitle[dim] =
"LeadingHadronRequired";
412 axisTitle[dim] =
"#it{p}_{T,min}^{trig}";
419 axisTitle[dim] =
"#it{p}_{T,min}^{ass}";
426 axisTitle[dim] =
"#Delta#phi";
433 axisTitle[dim] =
"#Delta#eta";
440 axisTitle[dim] =
"A_{J}";
447 axisTitle[dim] =
"x_{J}";
454 axisTitle[dim] =
"k_{Ty} (GeV)";
461 TString thnname = TString::Format(
"%s/DijetImbalanceObservables", jets->GetArrayName().Data());
463 for (
Int_t i = 0; i < dim; i++) {
464 hn->GetAxis(i)->SetTitle(axisTitle[i]);
465 hn->SetBinEdges(i, binEdges[i]);
477 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
487 axisTitle[dim] =
"LeadingHadronRequired";
494 axisTitle[dim] =
"#it{p}_{T,min}^{trig}";
501 axisTitle[dim] =
"#it{p}_{T,min}^{ass}";
508 axisTitle[dim] =
"A_{J}";
515 axisTitle[dim] =
"#Delta#phi";
522 axisTitle[dim] =
"#it{p}_{T,particle} (GeV/#it{c})";
532 max[dim] = pTParticleBins[nbins[dim]];
533 binEdges[dim] = pTParticleBins;
536 axisTitle[dim] =
"#it{p}_{T}#parallel (GeV/#it{c})";
545 max[dim] = pTParallelBins[nbins[dim]];
546 binEdges[dim] = pTParallelBins;
549 TString thnname = TString::Format(
"%s/MomentumBalance", jets->GetArrayName().Data());
551 for (
Int_t i = 0; i < dim; i++) {
552 hn->GetAxis(i)->SetTitle(axisTitle[i]);
553 hn->SetBinEdges(i, binEdges[i]);
572 axisTitle[dim] =
"Centrality (%)";
580 axisTitle[dim] =
"#it{p}_{T,min}^{trig}";
587 axisTitle[dim] =
"#it{p}_{T,min}^{ass}";
594 axisTitle[dim] =
"isSwitched";
601 axisTitle[dim] =
"#DeltaR_{trig}";
608 axisTitle[dim] =
"#DeltaR_{ass}";
615 axisTitle[dim] =
"trig #it{p}_{T,low-thresh} - #it{p}_{T,hard-core}";
622 axisTitle[dim] =
"ass #it{p}_{T,low-thresh} - #it{p}_{T,hard-core}";
629 axisTitle[dim] =
"A_{J} low-threshold";
636 axisTitle[dim] =
"A_{J} hard-core";
643 TString thnname =
"GeometricalMatching";
645 for (
Int_t i = 0; i < dim; i++) {
646 hn->GetAxis(i)->SetTitle(axisTitle[i]);
647 hn->SetBinEdges(i, binEdges[i]);
653 histname =
"GeometricalMatchingEfficiency";
654 title = histname +
";isMatched;counts";
668 AliInfo(Form(
"Trigger jet threshold %d = %f, Associated jet threshold %d = %f", i,
fMinTrigJetPt[i], i,
fMinAssJetPt[i]));
688 while ((jetCont = static_cast<AliJetContainer*>(next()))) {
689 TString jetContName = jetCont->GetName();
690 if (jetContName.Contains(
"HardCore"))
continue;
693 for (
Int_t leadingHadronCutType=0; leadingHadronCutType<2; leadingHadronCutType++) {
702 FindDijet(jetCont, leadingHadronCutType, trigJetMinPtType, assJetMinPtType);
706 TString histname = TString::Format(
"%s/DijetObservables", jetCont->GetArrayName().Data());
716 TString histname = TString::Format(
"%s/DijetImbalanceObservables", jetCont->GetArrayName().Data());
722 histname = TString::Format(
"%s/MomentumBalance", jetCont->GetArrayName().Data());
771 for(
auto assJetCand : jetCont->
accepted()) {
772 if (!assJetCand)
continue;
774 if ( TMath::Abs(trigJet->
Phi() - assJetCand->Phi()) <
fDeltaPhiMin )
continue;
777 if ( assJetCandPt < assJetPt )
continue;
809 track = trackIterator.second;
819 Double_t deltaPhiTrigJet = TMath::Abs(trackPhi - trigJetPhi);
820 Double_t deltaPhiAssJet = TMath::Abs(trackPhi - assJetPhi);
821 Bool_t isNearside = deltaPhiTrigJet < deltaPhiAssJet;
826 deltaPhi = trackPhi - trigJetPhi;
827 balancePt = trackPt * TMath::Cos(deltaPhi);
830 deltaPhi = trackPhi - assJetPhi;
831 balancePt = -trackPt * TMath::Cos(deltaPhi);
845 TString jetContAllName = Form(
"Jet_AKTFullR0%d0_tracks_pT0150_caloClusters_E0300_pt_scheme", (
int) (
fMatchingJetR*10) );
851 TString jetContHardCoreName = Form(
"JetHardCore_AKTFullR0%d0_tracks_pT%d_caloClusters_E%d_pt_scheme", (
int) (
fMatchingJetR*10), trackThreshold, clusThreshold);
873 for(
auto matchingTrigJetCand : jetCont->
accepted()) {
874 if (!matchingTrigJetCand)
continue;
876 if (matchingTrigJet) {
877 if (
GetJetPt(jetCont, matchingTrigJetCand) <
GetJetPt(jetCont, matchingTrigJet) )
continue;
879 matchingTrigJet = matchingTrigJetCand;
881 if (!matchingTrigJet)
return;
885 for(
auto matchingAssJetCand : jetCont->
accepted()) {
886 if (!matchingAssJetCand)
continue;
888 if (matchingAssJet) {
889 if (
GetJetPt(jetCont, matchingAssJetCand) <
GetJetPt(jetCont, matchingAssJet) )
continue;
891 matchingAssJet = matchingAssJetCand;
895 if (matchingAssJet) {
898 if (
GetJetPt(jetCont, matchingTrigJet) <
GetJetPt(jetCont, matchingAssJet) ) {
929 TString jetContName = jetCont->GetName();
930 if (jetContName.Contains(
"HardCore")) pT = jet->
Pt();
941 Double_t deltaR = TMath::Sqrt( deltaPhi*deltaPhi + deltaEta*deltaEta );
967 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
968 TString jetContName = jets->GetName();
969 if (jetContName.Contains(
"HardCore"))
continue;
973 histname = TString::Format(
"%s/fHistRhoVsCent", jets->GetArrayName().Data());
977 for (
auto jet : jets->
all()) {
979 UInt_t rejectionReason = 0;
980 if (!jets->
AcceptJet(jet, rejectionReason)) {
981 histname = TString::Format(
"%s/fHistJetRejectionReason", jets->GetArrayName().Data());
982 fHistManager.
FillTH2(histname.Data(), jets->GetRejectionReasonBitPosition(rejectionReason), jet->Pt());
987 Float_t corrPt = jet->Pt() - rhoVal * jet->Area();
989 TLorentzVector leadPart;
992 if (z == 1 || (z > 1 && z - 1 < 1e-3)) z = 0.999;
995 histname = TString::Format(
"%s/JetObservables", jets->GetArrayName().Data());
997 if (!histJetObservables)
return;
998 for (
Int_t i = 0; i < histJetObservables->GetNdimensions(); i++) {
999 TString title(histJetObservables->GetAxis(i)->GetTitle());
1000 if (
title==
"Centrality (%)")
1001 contents[i] =
fCent;
1002 else if (
title==
"#eta_{jet}")
1003 contents[i] = jet->Eta();
1004 else if (
title==
"#phi_{jet} (rad)")
1005 contents[i] = jet->Phi_0_2pi();
1006 else if (
title==
"#it{p}_{T} (GeV/#it{c})")
1007 contents[i] = jet->Pt();
1008 else if (
title==
"#it{p}_{T}^{corr} (GeV/#it{c})")
1009 contents[i] = corrPt;
1010 else if (
title==
"#it{p}_{T,particle}^{leading} (GeV/#it{c})")
1011 contents[i] = ptLeading;
1012 else if (
title==
"#it{A}_{jet}")
1013 contents[i] = jet->Area();
1014 else if (
title==
"NEF")
1015 contents[i] = jet->NEF();
1016 else if (
title==
"#it{z}_{leading}")
1018 else if (
title==
"No. of constituents")
1019 contents[i] = jet->GetNumberOfConstituents();
1021 AliWarning(Form(
"Unable to fill dimension %s!",
title.Data()));
1023 histJetObservables->Fill(contents);
1036 if (!histJetObservables)
return;
1037 for (
Int_t n = 0; n < histJetObservables->GetNdimensions(); n++) {
1038 TString title(histJetObservables->GetAxis(n)->GetTitle());
1039 if (
title==
"Centrality (%)")
1040 contents[n] =
fCent;
1041 else if (
title==
"LeadingHadronRequired")
1043 else if (
title==
"#it{p}_{T,min}^{trig}")
1045 else if (
title==
"#it{p}_{T,min}^{ass}")
1047 else if (
title==
"isAccepted")
1048 contents[n] = isAccepted;
1049 else if (
title==
"LeadingSubleading")
1050 contents[n] = IsAssJet;
1051 else if (
title==
"#it{p}_{T,jet} (GeV/#it{c})")
1052 contents[n] = jetPt;
1053 else if (
title==
"#phi_{jet}")
1054 contents[n] = jetPhi;
1055 else if (
title==
"#eta_{jet}")
1056 contents[n] = jetEta;
1057 else if (
title==
"N_{tracks}")
1058 contents[n] = nTracksJet;
1059 else if (
title==
"A_{jet}")
1060 contents[n] = jetArea;
1062 AliWarning(Form(
"Unable to fill dimension %s!",
title.Data()));
1064 histJetObservables->Fill(contents);
1074 if (!histJetObservables)
return;
1075 for (
Int_t n = 0; n < histJetObservables->GetNdimensions(); n++) {
1076 TString title(histJetObservables->GetAxis(n)->GetTitle());
1077 if (
title==
"Centrality (%)")
1078 contents[n] =
fCent;
1079 else if (
title==
"LeadingHadronRequired")
1081 else if (
title==
"#it{p}_{T,min}^{trig}")
1083 else if (
title==
"#it{p}_{T,min}^{ass}")
1085 else if (
title==
"#Delta#phi")
1087 else if (
title==
"#Delta#eta")
1089 else if (
title==
"A_{J}")
1091 else if (
title==
"x_{J}")
1093 else if (
title==
"k_{Ty} (GeV)")
1096 AliWarning(Form(
"Unable to fill dimension %s!",
title.Data()));
1098 histJetObservables->Fill(contents);
1108 if (!histJetObservables)
return;
1109 for (
Int_t n = 0; n < histJetObservables->GetNdimensions(); n++) {
1110 TString title(histJetObservables->GetAxis(n)->GetTitle());
1111 if (
title==
"LeadingHadronRequired")
1113 else if (
title==
"#it{p}_{T,min}^{trig}")
1115 else if (
title==
"#it{p}_{T,min}^{ass}")
1117 else if (
title==
"A_{J}")
1119 else if (
title==
"#Delta#phi")
1120 contents[n] = deltaPhi;
1121 else if (
title==
"#it{p}_{T,particle} (GeV/#it{c})")
1122 contents[n] = trackPt;
1123 else if (
title==
"#it{p}_{T}#parallel (GeV/#it{c})")
1124 contents[n] = balancePt;
1126 AliWarning(Form(
"Unable to fill dimension %s!",
title.Data()));
1128 histJetObservables->Fill(contents);
1137 TString histname =
"GeometricalMatchingEfficiency";
1147 TString thnname =
"GeometricalMatching";
1150 if (!histJetObservables)
return;
1151 for (
Int_t n = 0; n < histJetObservables->GetNdimensions(); n++) {
1152 TString title(histJetObservables->GetAxis(n)->GetTitle());
1153 if (
title==
"Centrality (%)")
1154 contents[n] =
fCent;
1155 else if (
title==
"#it{p}_{T,min}^{trig}")
1157 else if (
title==
"#it{p}_{T,min}^{ass}")
1159 else if (
title==
"isSwitched")
1160 contents[n] = isSwitched;
1161 else if (
title==
"#DeltaR_{trig}")
1162 contents[n] = trigDeltaR;
1163 else if (
title==
"#DeltaR_{ass}")
1164 contents[n] = assDeltaR;
1165 else if (
title==
"trig #it{p}_{T,low-thresh} - #it{p}_{T,hard-core}")
1167 else if (
title==
"ass #it{p}_{T,low-thresh} - #it{p}_{T,hard-core}")
1169 else if (
title==
"A_{J} low-threshold")
1171 else if (
title==
"A_{J} hard-core")
1174 AliWarning(Form(
"Unable to fill dimension %s!",
title.Data()));
1176 histJetObservables->Fill(contents);
Double_t fMatchingJetR
jet R for matching study
void AllocateDijetImbalanceHistograms()
TObjArray fClusterCollArray
cluster collection array
Double_t GetRhoVal() const
const TString & GetRhoName() const
void FindMatchingDijet(AliJetContainer *jetCont, Int_t assJetMinPtBin)
void UserCreateOutputObjects()
void AllocateJetHistograms()
Float_t fMaxPt
Histogram pt limit.
AliJetContainer * GetJetContainer(Int_t i=0) const
void AllocateGeometricalMatchingHistograms()
void DoMomentumBalance(TString histname)
Container with name, TClonesArray and cuts for particles.
Bool_t fPlotJetHistograms
Set whether to enable inclusive jet histograms.
void FillTH2(const char *hname, double x, double y, double weight=1., Option_t *opt="")
Declaration of class AliTLorentzVector.
Double_t fDijetLeadingHadronPt
leading hadron pT threshold for leading jet in dijet
virtual Bool_t AcceptJet(Int_t i, UInt_t &rejectionReason) const
AliAnalysisTaskEmcalDijetImbalance()
void FillGeometricalMatchingHistograms()
UShort_t GetNumberOfTracks() const
Bool_t fDoMomentumBalance
Set whether to enable momentum balance study.
TObjArray fParticleCollArray
particle/track collection array
Bool_t fPlotDijetImbalanceHistograms
Set whether to enable dijet imbalance histograms.
AliParticleContainer * GetParticleContainer(Int_t i=0) const
Int_t fNDijetPtThresholds
number of pT thresholds on leading/subleading jets
AliEmcalJet * GetLeadingJet(const char *opt="")
void GetLeadingHadronMomentum(TLorentzVector &mom, const AliEmcalJet *jet) const
Dijet_t fDijet
! dijet candidate (per event)
TH2 * CreateTH2(const char *name, const char *title, int nbinsx, double xmin, double xmax, int nbinsy, double ymin, double ymax, Option_t *opt="")
TObject * FindObject(const char *name) const
THashList * GetListOfHistograms() const
Double_t GetDeltaR(AliEmcalJet *jet1, AliEmcalJet *jet2)
Double_t GetLeadingHadronPt(const AliEmcalJet *jet) const
Double_t fClusterConstituentThreshold
constituent threshold for matching study
Di-jet imbalance analysis with full jets.
TH1 * CreateTH1(const char *name, const char *title, int nbins, double xmin, double xmax, Option_t *opt="")
BeamType fForceBeamType
forced beam type
Int_t leadingHadronCutType
Double_t fDeltaPhiMin
minimum delta phi between di-jets
Double_t fCent
!event centrality
Double_t GetJetPt(AliJetContainer *jetCont, AliEmcalJet *jet)
static Double_t GetParallelFraction(AliVParticle *part1, AliVParticle *part2)
void FillMomentumBalanceHistograms(TString histname, Double_t deltaPhi, Double_t trackPt, Double_t balancePt)
void FillTH1(const char *hname, double x, double weight=1., Option_t *opt="")
TObjArray fJetCollArray
jet collection array
THistManager fHistManager
Histogram manager.
void FillDijetImbalanceHistograms(TString histname)
AliRhoParameter * GetRhoParameter()
Bool_t fPlotDijetJetHistograms
Set whether to enable dijet pair histograms.
static Double_t * GenerateFixedBinArray(Int_t n, Double_t min, Double_t max)
AliEmcalList * fOutput
!output list
void AllocateDijetJetHistograms()
ClassImp(AliAnalysisTaskCRC) AliAnalysisTaskCRC
void SetMakeGeneralHistograms(Bool_t g)
Base task in the EMCAL jet framework.
Bool_t fDoGeometricalMatching
Set whether to enable constituent study with geometrical matching.
Represent a jet reconstructed using the EMCal jet framework.
void FillDijetJetHistograms(TString histname, Int_t isAccepted, Int_t IsAssJet, Double_t jetPt, Double_t jetPhi, Double_t jetEta, Int_t nTracksJet, Double_t jetArea)
const AliTrackIterableMomentumContainer accepted_momentum() const
Dijet_t fMatchingDijet
! low-threshold matching dijet, for matching study
void SetRejectionReasonLabels(TAxis *axis)
void UserCreateOutputObjects()
const AliJetIterableContainer accepted() const
Double_t fTrackConstituentThreshold
constituent threshold for matching study
Double_t * fCentHistBins
! cent bins
Int_t fNCentHistBins
! number of cent bins
THnSparse * CreateTHnSparse(const char *name, const char *title, int ndim, const int *nbins, const double *min, const double *max, Option_t *opt="")
virtual ~AliAnalysisTaskEmcalDijetImbalance()
Container for jet within the EMCAL jet framework.
void DoGeometricalMatching()
void AllocateMomentumBalanceHistograms()
void FindDijet(AliJetContainer *jetCont, Int_t leadingHadronCutBin, Int_t trigJetMinPtBin, Int_t assJetMinPtBin)
const AliJetIterableContainer all() const