AliPhysics  9538fdd (9538fdd)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliJetModelBaseTask.h
Go to the documentation of this file.
1 #ifndef ALIJETMODELBASETASK_H
16 #define ALIJETMODELBASETASK_H
17 
18 class TClonesArray;
19 class AliEMCALGeometry;
20 class AliVCluster;
21 class AliPicoTrack;
22 class AliVCaloCells;
23 class AliAODMCParticle;
24 class AliNamedArrayI;
25 class TF2;
26 class AliEmcalPythiaInfo;
27 
28 #include <TH1F.h>
29 #include <TF1.h>
30 
31 #include "AliAnalysisTaskSE.h"
32 
34  public:
36  AliJetModelBaseTask(const char *name, Bool_t drawqa=kFALSE);
37  virtual ~AliJetModelBaseTask();
38 
39  void SetEtaRange(Float_t min, Float_t max) { fEtaMin = min; fEtaMax = max; }
40  void SetPhiRange(Float_t min, Float_t max) { fPhiMin = min; fPhiMax = max; }
41  void SetPtRange(Float_t min, Float_t max) { fPtMin = min; fPtMax = max; }
42  void SetGenType(Int_t gentype) {fGenType = gentype;}
43  void SetPtSpectrum(TH1F *f) { fPtSpectrum = f; }
44  void SetPtSpectrum(TF1 *f) { fPtSpectrum = new TH1F("ptSpectrum","ptSpectrum",1000,f->GetXmin(),f->GetXmax());
45  fPtSpectrum->Add(f); }
47  void SetDensitySpectrum(TH1F *f) { fDensitySpectrum = f; }
48  void SetDensitySpectrum(TF1 *f) { fDensitySpectrum = new TH1F("densitypectrum","densitypectrum",1000,f->GetXmin(),f->GetXmax());
49  fDensitySpectrum->Add(f); }
50  void SetMassDistribution(TH1F *hM);
54  void SetMassAndPtDistributionFromFile(TString filenameM, TString filenamepT, TString histonameM, TString histonamepT);
55  void SetMassVsPtDistribution(TH2F *hmasspt);
56  void SetDistributionFromFile(TString filename, TString histoname, Int_t type);
57 
58  void SetDifferentialV2(TF1* f) { fDifferentialV2 = f; }
59  void SetAddV2(Bool_t b) { fAddV2 = b; }
61  void SetMC(Bool_t a) { fIsMC = a ; }
62  void SetCopyArray(Bool_t copy) { fCopyArray = copy; }
63  void SetTracksName(const char *n) { fTracksName = n; }
64  void SetClusName(const char *n) { fCaloName = n; }
65  void SetCellsName(const char *n) { fCellsName = n; }
66  void SetMCParticlesName(const char *n) { fMCParticlesName = n; }
67  void SetPythiaInfoName(const char *n) { fPythiaInfoName = n; }
68  void SetSuffix(const char *s) { fSuffix = s; }
69  void SetGeometryName(const char *n) { fGeomName = n; }
70  void SetMarkMC(Int_t m) { fMarkMC = m; }
71  virtual void SetNClusters(Int_t n) { fNClusters = n; }
72  virtual void SetNCells(Int_t n) { fNCells = n; }
73  virtual void SetNTracks(Int_t n) { fNTracks = n; }
74 
75  TString GetOutTrackName() const;
76  protected:
77  void UserExec(Option_t* /*option*/);
80  Int_t AddCell(Double_t e = -1, Double_t eta = -999, Double_t phi = -1);
81  Int_t AddCell(Double_t e, Int_t absId, Double_t time = 0, Int_t label=0);
82  AliVCluster *AddCluster(Double_t e = -1, Double_t eta = -999, Double_t phi = -1, Int_t label=0);
83  AliVCluster *AddCluster(Double_t e, Int_t absId, Int_t label=0);
84  AliVCluster *AddCluster(AliVCluster *oc);
85  AliPicoTrack *AddTrack(Double_t pt = -999, Double_t eta = -999, Double_t phi = -999, Byte_t type=0,
86  Double_t etaemc=0, Double_t phiemc=0, Double_t ptemc=0, Bool_t ise=kFALSE,
87  Int_t label=0, Short_t charge=1, Double_t mass = 0.1396);
88  AliAODMCParticle *AddMCParticle(AliAODMCParticle *part, Int_t origIndex); // add a MC particle
89  void AddV2(Double_t &phi, Double_t &pt) const;
90  void CopyCells();
91  void CopyClusters();
92  void CopyTracks();
93  void CopyMCParticles();
94  void GetRandomCell(Double_t &eta, Double_t &phi, Int_t &absId);
95  Double_t GetRandomEta(Bool_t emcal=kFALSE);
96  Double_t GetRandomPhi(Bool_t emcal=kFALSE);
99  void GetRandomParticle(Double_t &pt, Double_t &eta, Double_t &phi, Bool_t emcal=kFALSE);
100  void GetRandomMassiveParticle(Double_t &pt, Double_t &eta, Double_t &phi, Bool_t emcal, Double_t& m);
101  void GetRandomMvsPt(Double_t &m, Double_t &pt);
102  void GetRandomMvsPtParticle(Double_t &pt, Double_t &m, Double_t &eta, Double_t &phi, Bool_t emcal = kFALSE);
103 
104  virtual Bool_t ExecOnce();
105  virtual void Run();
106  void FillHistograms();
107 
108 
109 
134  TH1F *fPtSpectrum;
143  AliEMCALGeometry *fGeom;
145  TClonesArray *fClusters;
146  TClonesArray *fOutClusters;
147  TClonesArray *fTracks;
148  TClonesArray *fOutTracks;
149  AliVCaloCells *fCaloCells;
150  AliVCaloCells *fOutCaloCells;
152  TClonesArray *fMCParticles;
154  TClonesArray *fOutMCParticles;
160  TH1F *fhpTEmb ;
161  TH1F *fhMEmb ;
162  TH1F *fhEtaEmb ;
163  TH1F *fhPhiEmb ;
168  private:
169  AliJetModelBaseTask(const AliJetModelBaseTask&); // not implemented
170  AliJetModelBaseTask &operator=(const AliJetModelBaseTask&); // not implemented
171 
172  ClassDef(AliJetModelBaseTask, 13) // Jet modeling task
173 };
174 #endif
TH1F * fDensitySpectrum
particle density spectrum to extract random density values
Int_t charge
Int_t fGenType
generator type. 0=pythia, 1=qpythia,2=pyquen, 3=herwig6.5
void SetDifferentialV2(TF1 *f)
const char * filename
Definition: TestFCM.C:1
void SetCellsName(const char *n)
double Double_t
Definition: External.C:58
virtual void Run()
intialize task
TClonesArray * fClusters
! cluster collection
Double_t GetRandomPt()
generate a random phi value in the given range
Definition: External.C:236
void SetpTDistributionFromFile(TString filename, TString histoname)
TString fOutCellsName
name of output cells collection
Float_t fPtMin
pt minimum value
void SetTracksName(const char *n)
Double_t mass
void SetPtRange(Float_t min, Float_t max)
TList * fOutput
! output list for QA histograms
TClonesArray * fOutClusters
! output cluster collection
void SetPtPhiEvPlDistribution(TF2 *f)
Int_t fMarkMC
which MC label is to be used (default=100)
TString fOutTracksName
name of output track collection
void SetMassDistribution(TH1F *hM)
void SetMassVsPtDistribution(TH2F *hmasspt)
Bool_t fIsInit
! =true if initialized
TString fMCParticlesName
name of MC particle collection
AliNamedArrayI * fMCParticlesMap
! MC particles mapping
void GetRandomMassiveParticle(Double_t &pt, Double_t &eta, Double_t &phi, Bool_t emcal, Double_t &m)
generate a particle with random eta,phi,pt values
Base class for embedding into an event.
TString GetOutTrackName() const
Bool_t fIsMC
whether the current event is MC or not
void SetDensitySpectrum(TF1 *f)
void SetPythiaInfoName(const char *n)
void SetCopyArray(Bool_t copy)
TString fCaloName
name of calo cluster collection
void SetEtaRange(Float_t min, Float_t max)
TString fCellsName
name of calo cells collection
void SetAddFlowFluctuations(Bool_t b)
AliVCaloCells * fCaloCells
! cells collection
Float_t fEtaMax
eta maximum value
virtual void SetNCells(Int_t n)
void SetMCParticlesName(const char *n)
TClonesArray * fOutTracks
! output track collection
TH1I * fhEvents
! store the number of events analysed
void SetPhiRange(Float_t min, Float_t max)
TClonesArray * fOutMCParticles
! output MC particles collection
AliJetModelBaseTask & operator=(const AliJetModelBaseTask &)
Int_t fNTracks
how many tracks are being processed
Float_t fPhiMin
phi minimum value
int Int_t
Definition: External.C:63
Bool_t fEsdMode
! ESD/AOD mode
Bool_t fAddV2
add v2 sampled from a tf1
Double_t GetRandomM()
generate a random pt value in the given range
Definition: External.C:204
void GetRandomParticle(Double_t &pt, Double_t &eta, Double_t &phi, Bool_t emcal=kFALSE)
generate a random m value from a given distribution or take a fixed value
float Float_t
Definition: External.C:68
TString fTracksName
name of track collection
virtual void SetNClusters(Int_t n)
TH1F * fhpTEmb
! embedded tracks pT
Bool_t fFlowFluctuations
introduce gaussian flow fluctuation
TString fOutMCParticlesName
name of output MC particle collection
void SetGenType(Int_t gentype)
void GetRandomCell(Double_t &eta, Double_t &phi, Int_t &absId)
TString fOutCaloName
name of output cluster collection
Int_t fNClusters
how many clusters are being processed
Int_t fMCLabelShift
! MC label shift
void SetDistributionFromFile(TString filename, TString histoname, Int_t type)
AliAODMCParticle * AddMCParticle(AliAODMCParticle *part, Int_t origIndex)
add a track; if values are -1 generate random parameters
AliVCaloCells * fOutCaloCells
! output cells collection
Bool_t fQAhistos
draw QA histograms
TString fSuffix
suffix to add in the name of new collections
TH1F * fhPhiEmb
! embedded tracks phi
Bool_t fCopyArray
whether or not the array will be copied to a new one before modelling
Int_t SetNumberOfOutCells(Int_t n)
void GetRandomMvsPt(Double_t &m, Double_t &pt)
generate a particle with random eta,phi,pt,mass values
TClonesArray * fMCParticles
! MC particles collection
Int_t AddCell(Double_t e=-1, Double_t eta=-999, Double_t phi=-1)
set the number of cells
short Short_t
Definition: External.C:23
virtual void SetNTracks(Int_t n)
Double_t GetRandomPhi(Bool_t emcal=kFALSE)
generate a random eta value in the given range
TH2F * fHMassPtDistrib
shape of mass vs pt distribution of embedded track
TF2 * fPtPhiEvPlDistribution
pt vs. (phi-psi) distribution to extract random pt/phi values
void SetDensitySpectrum(TH1F *f)
void FillHistograms()
do jet model action
AliNamedArrayI * fOutMCParticlesMap
! MC particles mapping
Int_t fAddedCells
! number of added cells
Double_t fPsi
! simmetry plane for the elliptic flow
TH1F * fhEtaEmb
! embedded tracks eta
AliEmcalPythiaInfo * fPythiaInfo
! Info on original partons:PDG,pt, eta, phi and pythia event weight
AliVCluster * AddCluster(Double_t e=-1, Double_t eta=-999, Double_t phi=-1, Int_t label=0)
add a cell with given energy, position and times
TF1 * fDifferentialV2
v2 as function of pt
Bool_t fMassFromDistr
draw the particle mass from fHMassDistrib
void SetGeometryName(const char *n)
TH1F * fhMEmb
! embedded tracks M
Float_t fEtaMin
eta minimum value
TH1F * fPtSpectrum
pt spectrum to extract random pt values
Store some informaion about a Pythia eventThis class is used to store some information about a Pythia...
TString fGeomName
Fill QA histograms.
TString fPythiaInfoName
name of pythia info
TH1F * fHMassDistrib
shape of mass distribution of embedded tracks
const char Option_t
Definition: External.C:48
void SetSuffix(const char *s)
Double_t fVertex[3]
! event vertex
bool Bool_t
Definition: External.C:53
void AddV2(Double_t &phi, Double_t &pt) const
AliPicoTrack * AddTrack(Double_t pt=-999, Double_t eta=-999, Double_t phi=-999, Byte_t type=0, Double_t etaemc=0, Double_t phiemc=0, Double_t ptemc=0, Bool_t ise=kFALSE, Int_t label=0, Short_t charge=1, Double_t mass=0.1396)
add a cluster (copy)
void SetClusName(const char *n)
void SetMassDistributionFromFile(TString filename, TString histoname)
Float_t fPhiMax
phi maximum value
void SetMassAndPtDistributionFromFile(TString filenameM, TString filenamepT, TString histonameM, TString histonamepT)
TClonesArray * fTracks
! track collection
void GetRandomMvsPtParticle(Double_t &pt, Double_t &m, Double_t &eta, Double_t &phi, Bool_t emcal=kFALSE)
generate 2 random values for pt and mass from a gived 2D distribution
AliEMCALGeometry * fGeom
! pointer to EMCal geometry
virtual Bool_t ExecOnce()
generate a particle with random eta,phi, and correlated pt,mass values
void SetPtSpectrum(TH1F *f)
Double_t GetRandomEta(Bool_t emcal=kFALSE)
generate a random cell in the calorimeter
Int_t fNCells
how many cells are being processed
void SetMassVsPtDistributionFromFile(TString filename, TString histoname)
Float_t fPtMax
pt maximum value