AliPhysics  bf041da (bf041da)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Go to the documentation of this file.
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;
28 #include <TH1F.h>
29 #include <TF1.h>
31 #include "AliAnalysisTaskSE.h"
33 class AliJetModelBaseTask : public AliAnalysisTaskSE {
34  public:
36  AliJetModelBaseTask(const char *name, Bool_t drawqa=kFALSE);
37  virtual ~AliJetModelBaseTask();
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);
51  void SetMassDistributionFromFile(TString filename, TString histoname);
52  void SetpTDistributionFromFile(TString filename, TString histoname);
53  void SetMassVsPtDistributionFromFile(TString filename, TString histoname);
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);
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; }
75  TString GetOutTrackName() const;
76  protected:
77  void UserExec(Option_t* /*option*/);
79  Int_t SetNumberOfOutCells(Int_t n);
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);
97  Double_t GetRandomPt();
98  Double_t GetRandomM();
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);
104  virtual Bool_t ExecOnce();
105  virtual void Run();
106  void FillHistograms();
110  TString fGeomName;
111  TString fTracksName;
112  TString fOutTracksName;
113  TString fCaloName;
114  TString fOutCaloName;
115  TString fCellsName;
116  TString fOutCellsName;
119  TString fPythiaInfoName;
120  Bool_t fIsMC;
121  TString fSuffix;
122  Float_t fEtaMin;
123  Float_t fEtaMax;
124  Float_t fPhiMin;
125  Float_t fPhiMax;
126  Float_t fPtMin;
127  Float_t fPtMax;
128  Int_t fGenType;
129  Bool_t fCopyArray;
130  Int_t fNClusters;
131  Int_t fNCells;
132  Int_t fNTracks;
133  Int_t fMarkMC;
134  TH1F *fPtSpectrum;
138  Bool_t fAddV2;
140  Bool_t fQAhistos;
141  Double_t fPsi;
142  Bool_t fIsInit;
143  AliEMCALGeometry *fGeom;
144  Double_t fVertex[3];
145  TClonesArray *fClusters;
146  TClonesArray *fOutClusters;
147  TClonesArray *fTracks;
148  TClonesArray *fOutTracks;
149  AliVCaloCells *fCaloCells;
150  AliVCaloCells *fOutCaloCells;
151  Int_t fAddedCells;
152  TClonesArray *fMCParticles;
154  TClonesArray *fOutMCParticles;
157  Bool_t fEsdMode;
158  TList *fOutput;
160  TH1F *fhpTEmb ;
161  TH1F *fhMEmb ;
162  TH1F *fhEtaEmb ;
163  TH1F *fhPhiEmb ;
164  TH1I *fhEvents ;
165  Bool_t fMassFromDistr;
168  private:
169  AliJetModelBaseTask(const AliJetModelBaseTask&); // not implemented
170  AliJetModelBaseTask &operator=(const AliJetModelBaseTask&); // not implemented
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)
void SetCellsName(const char *n)
virtual void Run()
intialize task
TClonesArray * fClusters
! cluster collection
Double_t GetRandomPt()
generate a random phi value in the given range
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
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
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
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
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
void SetSuffix(const char *s)
Double_t fVertex[3]
! event vertex
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