16 #include <TClonesArray.h>
21 #include <AliVCluster.h>
22 #include <AliVParticle.h>
81 while ((obj = next())) {
100 while ((clusCont = static_cast<AliClusterContainer*>(next()))) {
101 groupname = clusCont->GetName();
104 AliWarning(TString::Format(
"%s: Found groupname %s in hist manager. The cluster containers will be filled into the same histograms.", GetName(), groupname.Data()));
109 histname = TString::Format(
"%s/histClusterEnergy_%d", groupname.Data(), cent);
110 histtitle = TString::Format(
"%s;#it{E}_{cluster} (GeV);counts", histname.Data());
113 histname = TString::Format(
"%s/histClusterEnergyExotic_%d", groupname.Data(), cent);
114 histtitle = TString::Format(
"%s;#it{E}_{cluster}^{exotic} (GeV);counts", histname.Data());
117 histname = TString::Format(
"%s/histClusterNonLinCorrEnergy_%d", groupname.Data(), cent);
118 histtitle = TString::Format(
"%s;#it{E}_{cluster}^{non-lin.corr.} (GeV);counts", histname.Data());
121 histname = TString::Format(
"%s/histClusterHadCorrEnergy_%d", groupname.Data(), cent);
122 histtitle = TString::Format(
"%s;#it{E}_{cluster}^{had.corr.} (GeV);counts", histname.Data());
125 histname = TString::Format(
"%s/histClusterPhi_%d", groupname.Data(), cent);
126 histtitle = TString::Format(
"%s;#it{#phi}_{custer};counts", histname.Data());
129 histname = TString::Format(
"%s/histClusterEta_%d", groupname.Data(), cent);
130 histtitle = TString::Format(
"%s;#it{#eta}_{custer};counts", histname.Data());
133 histname = TString::Format(
"%s/histNClusters_%d", groupname.Data(), cent);
134 histtitle = TString::Format(
"%s;number of clusters;events", histname.Data());
144 histname =
"fHistSumNClusters";
145 histtitle = TString::Format(
"%s;Sum of n clusters;events", histname.Data());
167 histname = TString::Format(
"%s/histCellEnergy_%d", groupname.Data(), cent);
168 histtitle = TString::Format(
"%s;#it{E}_{cell} (GeV);counts", histname.Data());
171 histname = TString::Format(
"%s/histNCells_%d", groupname.Data(), cent);
172 histtitle = TString::Format(
"%s;number of cells;events", histname.Data());
195 while ((partCont = static_cast<AliParticleContainer*>(next()))) {
196 groupname = partCont->GetName();
199 AliWarning(TString::Format(
"%s: Found groupname %s in hist manager. The track containers will be filled into the same histograms.", GetName(), groupname.Data()));
204 histname = TString::Format(
"%s/histTrackPt_%d", groupname.Data(), cent);
205 histtitle = TString::Format(
"%s;#it{p}_{T,track} (GeV/#it{c});counts", histname.Data());
208 histname = TString::Format(
"%s/histTrackPhi_%d", groupname.Data(), cent);
209 histtitle = TString::Format(
"%s;#it{#phi}_{track};counts", histname.Data());
212 histname = TString::Format(
"%s/histTrackEta_%d", groupname.Data(), cent);
213 histtitle = TString::Format(
"%s;#it{#eta}_{track};counts", histname.Data());
216 if (TClass(partCont->GetClassName()).InheritsFrom(
"AliVTrack")) {
217 histname = TString::Format(
"%s/fHistDeltaEtaPt_%d", groupname.Data(), cent);
218 histtitle = TString::Format(
"%s;#it{p}_{T,track}^{vertex} (GeV/#it{c});#it{#eta}_{track}^{vertex} - #it{#eta}_{track}^{EMCal};counts", histname.Data());
221 histname = TString::Format(
"%s/fHistDeltaPhiPt_%d", groupname.Data(), cent);
222 histtitle = TString::Format(
"%s;#it{p}_{T,track}^{vertex} (GeV/#it{c});#it{#phi}_{track}^{vertex} - #it{#phi}_{track}^{EMCal};counts", histname.Data());
225 histname = TString::Format(
"%s/fHistDeltaPtvsPt_%d", groupname.Data(), cent);
226 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());
229 histname = TString::Format(
"%s/fHistEoverPvsP_%d", groupname.Data(), cent);
230 histtitle = TString::Format(
"%s;#it{P}_{track} (GeV/#it{c});#it{E}_{cluster} / #it{P}_{track} #it{c};counts", histname.Data());
234 histname = TString::Format(
"%s/histNTracks_%d", groupname.Data(), cent);
235 histtitle = TString::Format(
"%s;number of tracks;events", histname.Data());
245 histname =
"fHistSumNTracks";
246 histtitle = TString::Format(
"%s;Sum of n tracks;events", histname.Data());
267 while ((jetCont = static_cast<AliJetContainer*>(next()))) {
268 groupname = jetCont->GetName();
271 AliWarning(TString::Format(
"%s: Found groupname %s in hist manager. The jet containers will be filled into the same histograms.", GetName(), groupname.Data()));
276 histname = TString::Format(
"%s/histJetPt_%d", groupname.Data(), cent);
277 histtitle = TString::Format(
"%s;#it{p}_{T,jet} (GeV/#it{c});counts", histname.Data());
280 histname = TString::Format(
"%s/histJetArea_%d", groupname.Data(), cent);
281 histtitle = TString::Format(
"%s;#it{A}_{jet};counts", histname.Data());
284 histname = TString::Format(
"%s/histJetPhi_%d", groupname.Data(), cent);
285 histtitle = TString::Format(
"%s;#it{#phi}_{jet};counts", histname.Data());
288 histname = TString::Format(
"%s/histJetEta_%d", groupname.Data(), cent);
289 histtitle = TString::Format(
"%s;#it{#eta}_{jet};counts", histname.Data());
292 histname = TString::Format(
"%s/histNJets_%d", groupname.Data(), cent);
293 histtitle = TString::Format(
"%s;number of jets;events", histname.Data());
302 histname = TString::Format(
"%s/histJetCorrPt_%d", groupname.Data(), cent);
303 histtitle = TString::Format(
"%s;#it{p}_{T,jet}^{corr} (GeV/#it{c});counts", histname.Data());
336 while ((jetCont = static_cast<AliJetContainer*>(next()))) {
337 groupname = jetCont->GetName();
339 for(
auto jet : jetCont->
accepted()) {
343 histname = TString::Format(
"%s/histJetPt_%d", groupname.Data(),
fCentBin);
346 histname = TString::Format(
"%s/histJetArea_%d", groupname.Data(),
fCentBin);
349 histname = TString::Format(
"%s/histJetPhi_%d", groupname.Data(),
fCentBin);
352 histname = TString::Format(
"%s/histJetEta_%d", groupname.Data(),
fCentBin);
356 histname = TString::Format(
"%s/histJetCorrPt_%d", groupname.Data(),
fCentBin);
360 histname = TString::Format(
"%s/histNJets_%d", groupname.Data(),
fCentBin);
375 UInt_t sumAcceptedTracks = 0;
378 while ((partCont = static_cast<AliParticleContainer*>(next()))) {
379 groupname = partCont->GetName();
381 for(
auto part : partCont->
accepted()) {
385 histname = TString::Format(
"%s/histTrackPt_%d", groupname.Data(),
fCentBin);
388 histname = TString::Format(
"%s/histTrackPhi_%d", groupname.Data(),
fCentBin);
391 histname = TString::Format(
"%s/histTrackEta_%d", groupname.Data(),
fCentBin);
394 if (partCont->GetLoadedClass()->InheritsFrom(
"AliVTrack")) {
395 const AliVTrack* track =
static_cast<const AliVTrack*
>(part);
397 histname = TString::Format(
"%s/fHistDeltaEtaPt_%d", groupname.Data(),
fCentBin);
400 histname = TString::Format(
"%s/fHistDeltaPhiPt_%d", groupname.Data(),
fCentBin);
403 histname = TString::Format(
"%s/fHistDeltaPtvsPt_%d", groupname.Data(),
fCentBin);
407 Int_t iCluster = track->GetEMCALcluster();
411 histname = TString::Format(
"%s/fHistEoverPvsP_%d", groupname.Data(),
fCentBin);
418 sumAcceptedTracks += count;
420 histname = TString::Format(
"%s/histNTracks_%d", groupname.Data(),
fCentBin);
424 histname =
"fHistSumNTracks";
436 UInt_t sumAcceptedClusters = 0;
439 while ((clusCont = static_cast<AliClusterContainer*>(next()))) {
440 groupname = clusCont->GetName();
442 for(
auto cluster : clusCont->
all()) {
443 if (!cluster)
continue;
445 if (cluster->GetIsExotic()) {
446 histname = TString::Format(
"%s/histClusterEnergyExotic_%d", groupname.Data(),
fCentBin);
452 for(
auto cluster : clusCont->
accepted()) {
453 if (!cluster)
continue;
457 cluster->GetMomentum(nPart,
fVertex);
459 histname = TString::Format(
"%s/histClusterEnergy_%d", groupname.Data(),
fCentBin);
462 histname = TString::Format(
"%s/histClusterNonLinCorrEnergy_%d", groupname.Data(),
fCentBin);
465 histname = TString::Format(
"%s/histClusterHadCorrEnergy_%d", groupname.Data(),
fCentBin);
468 histname = TString::Format(
"%s/histClusterPhi_%d", groupname.Data(),
fCentBin);
471 histname = TString::Format(
"%s/histClusterEta_%d", groupname.Data(),
fCentBin);
474 sumAcceptedClusters += count;
476 histname = TString::Format(
"%s/histNClusters_%d", groupname.Data(),
fCentBin);
480 histname =
"fHistSumNClusters";
500 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
Double_t GetRhoVal() const
const TString & GetRhoName() const
Declaration of class AliAnalysisTaskEmcalJetSample.
AliAnalysisTaskEmcalJetSample()
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
void AllocateCellHistograms()
Int_t fCentBin
!event centrality bin
Implementation of a sample jet analysis task.
Container for particles within the EMCAL framework.
TObjArray fParticleCollArray
particle/track collection array
void AllocateClusterHistograms()
const AliClusterIterableContainer all() const
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.
TObject * FindObject(const char *name) const
Find an object inside the container.
void AllocateTrackHistograms()
THashList * GetListOfHistograms() const
Get the list of histograms.
Double_t Phi_0_2pi() const
void Terminate(Option_t *option)
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
TString fCaloCellsName
name of calo cell collection
void FillTH1(const char *hname, double x, double weight=1., Option_t *opt="")
Fill a 1D histogram within the container.
TObjArray fJetCollArray
jet collection array
AliVCaloCells * fCaloCells
!cells
AliRhoParameter * GetRhoParameter()
void AllocateJetHistograms()
AliEmcalList * fOutput
!output list
Double_t fMaxBinPt
max pt in histograms
ClassImp(AliAnalysisTaskCRC) AliAnalysisTaskCRC
THistManager fHistManager
Histogram manager.
Double_t fVertex[3]
!event vertex
void SetMakeGeneralHistograms(Bool_t g)
Base task in the EMCAL jet framework.
const AliParticleIterableContainer accepted() const
void UserCreateOutputObjects()
Main initialization function on the worker.
const AliJetIterableContainer accepted() const
Container structure for EMCAL clusters.
void UserCreateOutputObjects()
Container for jet within the EMCAL jet framework.
Int_t fNbins
no. of pt bins
virtual ~AliAnalysisTaskEmcalJetSample()