16 #include <TClonesArray.h> 21 #include <AliVCluster.h> 22 #include <AliVParticle.h> 77 while ((obj = next())) {
96 while ((clusCont = static_cast<AliClusterContainer*>(next()))) {
97 groupname = clusCont->GetName();
100 histname = TString::Format(
"%s/histClusterEnergy_%d", groupname.Data(), cent);
101 histtitle = TString::Format(
"%s;#it{E}_{cluster} (GeV);counts", histname.Data());
104 histname = TString::Format(
"%s/histClusterEnergyExotic_%d", groupname.Data(), cent);
105 histtitle = TString::Format(
"%s;#it{E}_{cluster}^{exotic} (GeV);counts", histname.Data());
108 histname = TString::Format(
"%s/histClusterNonLinCorrEnergy_%d", groupname.Data(), cent);
109 histtitle = TString::Format(
"%s;#it{E}_{cluster}^{non-lin.corr.} (GeV);counts", histname.Data());
112 histname = TString::Format(
"%s/histClusterHadCorrEnergy_%d", groupname.Data(), cent);
113 histtitle = TString::Format(
"%s;#it{E}_{cluster}^{had.corr.} (GeV);counts", histname.Data());
116 histname = TString::Format(
"%s/histClusterPhi_%d", groupname.Data(), cent);
117 histtitle = TString::Format(
"%s;#it{#phi}_{custer};counts", histname.Data());
120 histname = TString::Format(
"%s/histClusterEta_%d", groupname.Data(), cent);
121 histtitle = TString::Format(
"%s;#it{#eta}_{custer};counts", histname.Data());
124 histname = TString::Format(
"%s/histLeadingClusterEnergy_%d", groupname.Data(), cent);
125 histtitle = TString::Format(
"%s;#it{E}_{cluster}^{leading} (GeV);counts", histname.Data());
128 histname = TString::Format(
"%s/histNClusters_%d", groupname.Data(), cent);
129 histtitle = TString::Format(
"%s;number of clusters;events", histname.Data());
153 histname = TString::Format(
"%s/histCellEnergyvsAbsId_%d", groupname.Data(), cent);
154 histtitle = TString::Format(
"%s;cell abs. ID;#it{E}_{cell} (GeV);counts", histname.Data());
157 histname = TString::Format(
"%s/histNCells_%d", groupname.Data(), cent);
158 histtitle = TString::Format(
"%s;number of cells;events", histname.Data());
181 while ((partCont = static_cast<AliParticleContainer*>(next()))) {
182 groupname = partCont->GetName();
185 histname = TString::Format(
"%s/histTrackPt_%d", groupname.Data(), cent);
186 histtitle = TString::Format(
"%s;#it{p}_{T,track} (GeV/#it{c});counts", histname.Data());
189 histname = TString::Format(
"%s/histTrackPhi_%d", groupname.Data(), cent);
190 histtitle = TString::Format(
"%s;#it{#phi}_{track};counts", histname.Data());
193 histname = TString::Format(
"%s/histTrackEta_%d", groupname.Data(), cent);
194 histtitle = TString::Format(
"%s;#it{#eta}_{track};counts", histname.Data());
197 if (TClass(partCont->GetClassName()).InheritsFrom(
"AliVTrack")) {
198 histname = TString::Format(
"%s/fHistDeltaEtaPt_%d", groupname.Data(), cent);
199 histtitle = TString::Format(
"%s;#it{p}_{T,track}^{vertex} (GeV/#it{c});#it{#eta}_{track}^{vertex} - #it{#eta}_{track}^{EMCal};counts", histname.Data());
202 histname = TString::Format(
"%s/fHistDeltaPhiPt_%d", groupname.Data(), cent);
203 histtitle = TString::Format(
"%s;#it{p}_{T,track}^{vertex} (GeV/#it{c});#it{#phi}_{track}^{vertex} - #it{#phi}_{track}^{EMCal};counts", histname.Data());
206 histname = TString::Format(
"%s/fHistDeltaPtvsPt_%d", groupname.Data(), cent);
207 histtitle = TString::Format(
"%s;#it{p}_{T,track}^{vertex} (GeV/#it{c});#it{p}_{T,track}^{vertex} - #it{p}_{T,track}^{EMCal} (GeV/#it{c});counts", histname.Data());
210 histname = TString::Format(
"%s/fHistEoverPvsP_%d", groupname.Data(), cent);
211 histtitle = TString::Format(
"%s;#it{P}_{track} (GeV/#it{c});#it{E}_{cluster} / #it{P}_{track} #it{c};counts", histname.Data());
215 histname = TString::Format(
"%s/histNTracks_%d", groupname.Data(), cent);
216 histtitle = TString::Format(
"%s;number of tracks;events", histname.Data());
254 while ((partCont = static_cast<AliParticleContainer*>(next()))) {
255 groupname = partCont->GetName();
257 for(
auto part : partCont->
accepted()) {
262 histname = TString::Format(
"%s/histTrackPt_%d", groupname.Data(),
fCentBin);
265 histname = TString::Format(
"%s/histTrackPhi_%d", groupname.Data(),
fCentBin);
268 histname = TString::Format(
"%s/histTrackEta_%d", groupname.Data(),
fCentBin);
271 if (partCont->GetLoadedClass()->InheritsFrom(
"AliVTrack")) {
272 const AliVTrack* track =
static_cast<const AliVTrack*
>(part);
274 histname = TString::Format(
"%s/fHistDeltaEtaPt_%d", groupname.Data(),
fCentBin);
277 histname = TString::Format(
"%s/fHistDeltaPhiPt_%d", groupname.Data(),
fCentBin);
280 histname = TString::Format(
"%s/fHistDeltaPtvsPt_%d", groupname.Data(),
fCentBin);
284 Int_t iCluster = track->GetEMCALcluster();
288 histname = TString::Format(
"%s/fHistEoverPvsP_%d", groupname.Data(),
fCentBin);
296 histname = TString::Format(
"%s/histNTracks_%d", groupname.Data(),
fCentBin);
311 while ((clusCont = static_cast<AliClusterContainer*>(next()))) {
312 groupname = clusCont->GetName();
314 for(
auto cluster : clusCont->
all()) {
315 if (!cluster)
continue;
317 if (cluster->GetIsExotic()) {
318 histname = TString::Format(
"%s/histClusterEnergyExotic_%d", groupname.Data(),
fCentBin);
324 for(
auto cluster : clusCont->
accepted()) {
325 if (!cluster)
continue;
330 cluster->GetMomentum(nPart,
fVertex);
332 histname = TString::Format(
"%s/histClusterEnergy_%d", groupname.Data(),
fCentBin);
335 histname = TString::Format(
"%s/histClusterNonLinCorrEnergy_%d", groupname.Data(),
fCentBin);
338 histname = TString::Format(
"%s/histClusterHadCorrEnergy_%d", groupname.Data(),
fCentBin);
341 histname = TString::Format(
"%s/histClusterPhi_%d", groupname.Data(),
fCentBin);
344 histname = TString::Format(
"%s/histClusterEta_%d", groupname.Data(),
fCentBin);
348 histname = TString::Format(
"%s/histNClusters_%d", groupname.Data(),
fCentBin);
354 histname = TString::Format(
"%s/histLeadingClusterEnergy_%d", groupname.Data(),
fCentBin);
376 for (
Short_t pos = 0; pos < ncells; pos++) {
THashList * CreateHistoGroup(const char *groupname)
Create a new group of histograms within a parent group.
TObjArray fClusterCollArray
cluster collection array
void AllocateClusterHistograms()
Base task in the EMCAL framework.
void FillTH2(const char *hname, double x, double y, double weight=1., Option_t *opt="")
Fill a 2D histogram within the container.
Declaration of class AliTLorentzVector.
Double_t fMinBinPt
min pt in histograms
AliAnalysisTaskEmcalSample()
Int_t fCentBin
!event centrality bin
AliVCluster * GetLeadingCluster(const char *opt="")
Container for particles within the EMCAL framework.
Int_t GetDefaultClusterEnergy() const
TObjArray fParticleCollArray
particle/track collection array
const AliClusterIterableContainer all() const
void UserCreateOutputObjects()
void Terminate(Option_t *option)
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.
THashList * GetListOfHistograms() const
Get the list of histograms.
Double_t Phi_0_2pi() const
TH1 * CreateTH1(const char *name, const char *title, int nbins, double xmin, double xmax, Option_t *opt="")
Create a new TH1 within the container.
BeamType fForceBeamType
forced beam type
Int_t fNcentBins
how many centrality bins
AliClusterContainer * GetClusterContainer(Int_t i=0) const
Get cluster container attached to this task.
AliVCluster * GetAcceptCluster(Int_t i) const
const AliClusterIterableContainer accepted() const
Implementation of a sample jet analysis task.
TString fCaloCellsName
name of calo cell collection
Declaration of class AliAnalysisTaskEmcalSample.
void FillTH1(const char *hname, double x, double weight=1., Option_t *opt="")
Fill a 1D histogram within the container.
AliVCaloCells * fCaloCells
!cells
void AllocateTrackHistograms()
virtual ~AliAnalysisTaskEmcalSample()
THistManager fHistManager
Histogram manager.
AliEmcalList * fOutput
!output list
Double_t fMaxBinPt
max pt in histograms
Double_t fVertex[3]
!event vertex
void SetMakeGeneralHistograms(Bool_t g)
void AllocateCellHistograms()
virtual void ExecOnce()
Perform steps needed to initialize the analysis.
const AliParticleIterableContainer accepted() const
void UserCreateOutputObjects()
Main initialization function on the worker.
Container structure for EMCAL clusters.
Int_t fNbins
no. of pt bins