23 fTrackSelection(NULL),
25 fNameJetContainer(
""),
26 fNameTrackContainer(
"")
39 double defaultJetRadii[] = {0, 0.01, 0.02, 0.05, 0.1, 0.2, 0.4},
40 defaultPtMinSteps[] = {0.5, 1, 2, 5, 10, 20},
41 defaultJetPtBins[] = {20, 40, 60, 80, 100, 150, 200, 1000};
71 fHistos->
CreateTH1(
"hTrackPtSel",
"Pt spectrum of selected tracks", *trackptbinning);
72 fHistos->
CreateTH1(
"hTrackPtSelEvent",
"Pt spectrum of selected tracks (directly from the input event)", *trackptbinning);
73 fHistos->
CreateTH2(
"hJetMultiplicity",
"Multiplicity of particles in jets", *jetptbinning, *contributorbinning);
74 fHistos->
CreateTH2(
"hParticlePtJet",
"Correlation between track pt and jet pt", *jetptbinning, *trackptbinning);
77 jetradii->CreateBinEdges(jrad);
78 ptminsteps->CreateBinEdges(ptms);
79 jetptlarge->CreateBinEdges(jptl);
80 for(
int irad = 0; irad < jrad.GetSize()-1; irad++){
81 for(
int ptstep = 0; ptstep <ptms.GetSize(); ptstep++){
83 static_cast<int>(jrad[irad] * 100.),
84 static_cast<int>(jrad[irad+1] * 100.),
85 static_cast<int>(ptms[ptstep] * 10.)),
86 Form(
"Density of tracks with p_{t} > %f GeV/c in r [%.2f, %.2f]; p_{t, jet} (GeV/c); Number of tracks",
93 for(
int jetptbin = 0 ; jetptbin < jptl.GetSize()-1; jetptbin++){
95 static_cast<int>(jrad[irad] * 100.),
96 static_cast<int>(jrad[irad+1] * 100.),
97 static_cast<int>(jptl[jetptbin]),
98 static_cast<int>(jptl[jetptbin+1])),
99 Form(
"Density of tracks in jet with p_{t} [%.1f, %.1f] in r[%.2f,%2f]",
104 *trackptbinning, *contributorbinning);
124 AliVParticle *jetparticle = NULL;
125 TArrayD particlePtBinning, jetradii, ptminsteps;
129 for(
int ipart = 0; ipart < InputEvent()->GetNumberOfTracks(); ipart++){
130 jetparticle = InputEvent()->GetTrack(ipart);
131 if(TMath::Abs(jetparticle->Eta()) > 0.8)
continue;
133 fHistos->
FillTH1(
"hTrackPtSelEvent", TMath::Abs(jetparticle->Pt()));
137 jetparticle = *trackiter;
138 if(TMath::Abs(jetparticle->Eta()) > 0.8)
continue;
145 fHistos->
FillTH2(
"hJetMultiplicity", myjet->Pt(), myjet->GetNumberOfConstituents());
147 for(
int iconst = 0; iconst < myjet->GetNumberOfTracks(); iconst++){
148 jetparticle = myjet->TrackAt(iconst, tcont->GetArray());
149 if(TMath::Abs(jetparticle->Eta()) > 0.8)
continue;
151 fHistos->
FillTH2(
"hParticlePtJet", myjet->Pt(), jetparticle->Pt());
154 for(
int irad = 0 ; irad < jetradii.GetSize()-1; irad++){
155 for(
int ptstep = 0; ptstep < ptminsteps.GetSize(); ptstep++){
156 fHistos->
FillTH2(Form(
"trackDensityJet_r%d_%d_minpt%d", static_cast<int>(jetradii[irad] * 100.), static_cast<int>(jetradii[irad+1] * 100.), static_cast<int>(ptminsteps[ptstep] * 10.)),
157 TMath::Abs(myjet->Pt()),
GetParticleMultiplicity(*myjet, *tcont, ptminsteps[ptstep], 10000., jetradii[irad], jetradii[irad+1]));
159 double jetptmin, jetptmax;
161 if(jetptmin > 0 && jetptmax > 0){
162 for(
int ptstep = 0; ptstep < particlePtBinning.GetSize()-1; ptstep++){
163 double mean = (particlePtBinning[ptstep] + particlePtBinning[ptstep+1])/2.;
164 fHistos->
FillTH2(Form(
"trackDensityParticle_r%d_%d_jetpt%d_%d", static_cast<int>(jetradii[irad] * 100.),static_cast<int>(jetradii[irad+1] * 100.),
165 static_cast<int>(jetptmin), static_cast<int>(jetptmax)), mean,
GetParticleMultiplicity(*myjet, *tcont, particlePtBinning[ptstep], particlePtBinning[+1], jetradii[irad], jetradii[irad+1]));
175 AliDebug(1, Form(
"Next jet: %s\n", jet.
toString().Data()));
176 TLorentzVector jetaxis(jet.
Px(), jet.
Py(), jet.
Pz(), jet.
E());
178 AliVParticle *jetparticle(NULL);
180 jetparticle =
static_cast<AliVParticle *
>(jet.
TrackAt(ipart, partcont.GetArray()));
181 if(TMath::Abs(jetparticle->Eta()) > 0.8)
continue;
183 double partpt = TMath::Abs(jetparticle->Pt());
184 if(partpt >= ptmin && partpt < ptmax){
185 TLorentzVector partvector(jetparticle->Px(), jetparticle->Py(), jetparticle->Pz(), jetparticle->E());
186 double r = TMath::Abs(jetaxis.DeltaR(partvector));
187 if(r >= rmin && r < rmax) nselected++;
198 double jetpt = TMath::Abs(jet->
Pt());
199 for(
int ptstep = 0; ptstep < jetptlarge.GetSize() - 1; ptstep++){
200 if(jetpt >= jetptlarge[ptstep] && jetpt < jetptlarge[ptstep+1]){
201 ptmin = jetptlarge[ptstep];
202 ptmax = jetptlarge[ptstep+1];
TString fNameTrackContainer
name of the jet container
AliJetContainer * GetJetContainer(Int_t i=0) const
bidirectional stl iterator over the EMCAL iterable container
Container with name, TClonesArray and cuts for particles.
int GetParticleMultiplicity(const AliEmcalJet &jet, const AliParticleContainer &partcont, double ptmin, double ptmax, double rmin, double rmax) const
void FillTH2(const char *hname, double x, double y, double weight=1., Option_t *opt="")
Fill a 2D histogram within the container.
virtual void CreateBinEdges(TArrayD &binedges) const =0
TBinning * GetBinning(const char *name) const
Interface for binnings used by the histogram handler.
Container for particles within the EMCAL framework.
virtual bool Run()
Run function. This is the core function of the analysis and contains the user code. Therefore users have to implement this function.
Int_t TrackAt(Int_t idx) const
UShort_t GetNumberOfTracks() const
Global binning handler used by several analysis components.
TH2 * CreateTH2(const char *name, const char *title, int nbinsx, double xmin, double xmax, int nbinsy, double ymin, double ymax, Option_t *opt="")
Create a new TH2 within the container.
TH1 * CreateTH1(const char *name, const char *title, int nbins, double xmin, double xmax, Option_t *opt="")
Create a new TH1 within the container.
void SetBinning(const char *dimname, int nbins, const double *binning)
stl-iterator for the histogram manager
void FillTH1(const char *hname, double x, double weight=1., Option_t *opt="")
Fill a 1D histogram within the container.
Global binning definition for the high- charged particle analysis.
AliAnalysisTaskTrackDensityData()
iterator begin() const
Create forward iterator starting at the beginning of the container.
virtual PWG::EMCAL::AliEmcalTrackSelResultPtr IsTrackAccepted(AliVTrack *const trk)=0
Interface for track selection code.
AliEmcalList * fOutput
!output list
AliEMCalTriggerBinningComponent * fBinHandler
EMCAL track selection.
virtual ~AliAnalysisTaskTrackDensityData()
Analysis of high- tracks in triggered events.
AliTrackContainer * GetTrackContainer(Int_t i=0) const
iterator end() const
Create forward iterator starting at the end of the container.
void SetMakeGeneralHistograms(Bool_t g)
Base task in the EMCAL jet framework.
Represent a jet reconstructed using the EMCal jet framework.
Container class for histograms.
TString fNameJetContainer
Binning handler.
void UserCreateOutputObjects()
Main initialization function on the worker.
const AliJetIterableContainer accepted() const
virtual void UserCreateOutputObjects()
Container for jet within the EMCAL jet framework.
void SetLinearBinning(const char *dirname, int nbins, double min, double max)
void FindJetPtBin(const AliEmcalJet *const jet, double &ptmin, double &ptmax) const
AliEmcalTrackSelection * fTrackSelection