1 #ifndef __StarPrimaryMaker_h__
2 #define __StarPrimaryMaker_h__
5 #include "TLorentzVector.h"
7 #include "TClonesArray.h"
8 #include "TDatabasePDG.h"
9 #include "StarParticleStack.h"
10 #include "StMessMgr.h"
12 #include "StarGenerator/UTIL/StarParticleData.h"
14 #include "TEventList.h"
109 Int_t InitRun( Int_t runnumber );
112 void Clear(
const Option_t *opts=
"" );
120 static TParticlePDG *
pdg( Int_t pdgid );
131 void SetVertex( Double_t x, Double_t y, Double_t z ){ mVx=x; mVy=y; mVz=z; }
138 void SetSigma( Double_t sx, Double_t sy, Double_t sz, Double_t rho=0 ){ mSx=sx; mSy=sy; mSz=sz; mRho=rho; }
143 void SetSlope( Double_t dxdz, Double_t dydz ){ mVdxdz=dxdz; mVdydz=dydz; }
150 void SetBeamline( Int_t beamline=1 ){ assert(beamline>=0); SetAttr(
"beamline",beamline); }
153 void SetCuts( Double_t ptmin, Double_t ptmax=-1,
154 Double_t ymin=0, Double_t ymax=-1,
155 Double_t phimin=0, Double_t phimax=-1,
156 Double_t zmin=-999, Double_t zmax=+999 );
159 void SetPtRange( Double_t ptmin, Double_t ptmax=-1 ){ LOG_INFO <<
" -- StarPrimaryMaker -- ptmin=" << (mPtMin = ptmin) <<
" ptmax=" << (mPtMax = ptmax) << endm; }
161 void SetEtaRange( Double_t etamin, Double_t etamax ){ LOG_INFO <<
" -- StarPrimaryMaker -- ymin=" << (mRapidityMin = etamin) <<
" ymax= " << (mRapidityMax = etamax) << endm; }
163 void SetPhiRange( Double_t phimin, Double_t phimax ){ LOG_INFO <<
" -- StarPrimaryMaker -- phimn=" << (mPhiMin = phimin) <<
" phimx=" << (mPhiMax = phimax) << endm; }
166 void SetZvertexRange( Double_t zmin, Double_t zmax ){ LOG_INFO <<
" -- StarPrimaryMaker -- zmin=" << (mZMin = zmin) <<
" zmax=" << (mZMax = zmax) << endm; }
171 virtual const char *GetCVS()
const
172 {
static const char cvs[]=
"Tag $Name: $ $Id: StarPrimaryMaker.h,v 1.8 2015/06/15 13:23:00 jwebb Exp $ built " __DATE__
" " __TIME__ ;
return cvs;}
180 Int_t PostGenerate();
196 Double_t mVx, mVy, mVz, mSx, mSy, mSz, mRho;
199 Double_t mVdxdz, mVdydz;
214 void RotateBeamline( Double_t &px, Double_t &py, Double_t &pz, Double_t &E, Double_t &M, Double_t &vx, Double_t &vy, Double_t &vz, Double_t &vt );
216 Double_t mPtMin, mPtMax, mRapidityMin, mRapidityMax, mPhiMin, mPhiMax, mZMin, mZMax;
223 TLorentzVector mPrimaryVertex;
226 TEventList *mAccepted;
229 std::function< TLorentzVector() > mVertexFunction;
230 std::map< std::string, std::function< TLorentzVector() > > mVertexFunctionMap;
231 std::function< TLorentzVector() > GetVertexFunction(
const char* name);
234 TLorentzVector vertexGaussXYZ();
235 TLorentzVector vertexFlatZ();
236 TLorentzVector vertexFlatXYZ();
237 TLorentzVector vertexFlatRZ();
238 TLorentzVector vertexFlatABZ();
static TParticlePDG * pdg(Int_t pdgid)
TTree * mTree
The output tree.
Bool_t Simulate(StarGenParticle *p)
Tests to see whether the particle passes all appropriate cuts to be passed to the simulator...
void SetSigma(Double_t sx, Double_t sy, Double_t sz, Double_t rho=0)
void SetFileName(const Char_t *name)
Set the filename of the output TTree.
void SetSlope(Double_t dxdz, Double_t dydz)
Yet another particle class.
void SetPhiRange(Double_t phimin, Double_t phimax)
Set phi range. Particles falling outside this range will be dropped from simulation.
ABC for defining event generator interfaces.
void SetCuts(Double_t ptmin, Double_t ptmax=-1, Double_t ymin=0, Double_t ymax=-1, Double_t phimin=0, Double_t phimax=-1, Double_t zmin=-999, Double_t zmax=+999)
Set particle cuts.
void SetBeamline(Int_t beamline=1)
Int_t mNumParticles
Total number of particles.
Main filter class. Goes anywhere in the chain, filters StarGenEvent objects.
void AddGenerator(StarGenerator *gener)
Implementation of the VMC particle stack for use in STAR.
Base class for event records.
StarGenEvent * event()
Return a pointer to the event.
Main steering class for event generation.
void SetZvertexRange(Double_t zmin, Double_t zmax)
Set z-vertex range. Primary vertices outside these bounds will be rejected.
void SetPtRange(Double_t ptmin, Double_t ptmax=-1)
Set PT range. Particles falling outside this range will be dropped from simulation.
void RotateBeamline(Double_t &px, Double_t &py, Double_t &pz, Double_t &E, Double_t &M, Double_t &vx, Double_t &vy, Double_t &vz, Double_t &vt)
void SetEtaRange(Double_t etamin, Double_t etamax)
Set rapidity range. Particles falling outside this range will be dropped from simulation.
void AddFilter(StarFilterMaker *filt)
void SetVertex(Double_t x, Double_t y, Double_t z)
Set the x, y and z vertex position.