26 #include "HepMC/IO_HEPEVT.h"
27 #include "HepMC/PythiaWrapper.h"
38 abeamtarget_(pset.getParameter<double>(
"aBeamTarget")),
39 angularspecselector_(pset.getParameter<int>(
"angularSpectrumSelector")),
40 bmin_(pset.getParameter<double>(
"bMin")),
41 bmax_(pset.getParameter<double>(
"bMax")),
42 bfixed_(pset.getParameter<double>(
"bFixed")),
43 cflag_(pset.getParameter<int>(
"cFlag")),
44 comenergy(pset.getParameter<double>(
"comEnergy")),
45 doquench_(pset.getParameter<bool>(
"doQuench")),
46 doradiativeenloss_(pset.getParameter<bool>(
"doRadiativeEnLoss")),
47 docollisionalenloss_(pset.getParameter<bool>(
"doCollisionalEnLoss")),
48 doIsospin_(pset.getParameter<bool>(
"doIsospin")),
49 embedding_(pset.getParameter<bool>(
"embeddingMode")),
51 filterType_(pset.getUntrackedParameter<string>(
"filterType",
"None")),
52 maxTries_(pset.getUntrackedParameter<int>(
"maxTries",1000)),
53 nquarkflavor_(pset.getParameter<int>(
"qgpNumQuarkFlavor")),
54 qgpt0_(pset.getParameter<double>(
"qgpInitialTemperature")),
55 qgptau0_(pset.getParameter<double>(
"qgpProperTimeFormation")),
56 maxEventsToPrint_(pset.getUntrackedParameter<int>(
"maxEventsToPrint",1)),
57 pythiaHepMCVerbosity_(pset.getUntrackedParameter<bool>(
"pythiaHepMCVerbosity",
false)),
58 pythiaPylistVerbosity_(pset.getUntrackedParameter<int>(
"pythiaPylistVerbosity",0)),
95 HepMC::HeavyIon *hi =
new HepMC::HeavyIon(
111 evt->set_heavy_ion(*hi);
130 const HepMC::GenEvent * inev = input->GetEvent();
131 const HepMC::HeavyIon* hi = inev->heavy_ion();
133 bfixed_ = hi->impact_parameter();
136 LogWarning(
"EventEmbedding")<<
"Background event does not have heavy ion record!";
143 HepMC::GenEvent* evt = 0;
160 edm::LogInfo(
"PYQUENinAction") <<
"##### Calling PYQUEN: QUENCHING OFF!! This is just PYTHIA !!!! ####";
175 evt->set_signal_process_id(
pypars.msti[0]);
176 evt->set_event_scale(
pypars.pari[16]);
213 string sHadOff(
"MSTP(111)=0");
230 edm::LogInfo(
"PYQUENinEnLoss") <<
"##### PYQUEN: Radiative AND Collisional partonic energy loss ON ####";
233 edm::LogInfo(
"PYQUENinRad") <<
"##### PYQUEN: Only RADIATIVE partonic energy loss ON ####";
236 edm::LogInfo(
"PYQUENinColl") <<
"##### PYQUEN: Only COLLISIONAL partonic energy loss ON ####";
239 edm::LogInfo(
"PYQUENinEnLoss") <<
"##### PYQUEN: Radiative AND Collisional partonic energy loss ON ####";
257 if(random >
pfrac_) nuc =
"n";
265 double sinphi0 =
sin(angle);
266 double cosphi0 =
cos(angle);
269 vt!=evt->vertices_end(); ++vt )
272 double x0 = (*vt)->position().x();
273 double y0 = (*vt)->position().y();
274 double z = (*vt)->position().z();
275 double t = (*vt)->position().t();
277 double x = x0*cosphi0-y0*sinphi0;
278 double y = y0*cosphi0+x0*sinphi0;
280 (*vt)->set_position( HepMC::FourVector(x,y,z,t) ) ;
283 for ( HepMC::GenEvent::particle_iterator vt=evt->particles_begin();
284 vt!=evt->particles_end(); ++vt )
287 double x0 = (*vt)->momentum().x();
288 double y0 = (*vt)->momentum().y();
289 double z = (*vt)->momentum().z();
290 double t = (*vt)->momentum().t();
292 double x = x0*cosphi0-y0*sinphi0;
293 double y = y0*cosphi0+x0*sinphi0;
295 (*vt)->set_momentum( HepMC::FourVector(x,y,z,t) ) ;
301 for (
size_t i=0;
i < pdg.size();
i++ )
304 std::ostringstream pyCard ;
305 pyCard <<
"MDCY(" << pyCode <<
",1)=0";
342 return "gen::PyquenHadronizer";
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
unsigned int maxEventsToPrint_
bool pyquen_init(const edm::ParameterSet &pset)
PyquenHadronizer(const edm::ParameterSet &)
Sin< T >::type sin(const T &t)
bool call_pygive(const std::string &line)
bool embedding_
Run n&p with proper ratios; if false, only p+p collisions.
bool doradiativeenloss_
if true perform quenching (default = true)
bool docollisionalenloss_
DEFAULT = true.
std::auto_ptr< HepMC::GenEvent > & event()
void rotateEvtPlane(HepMC::GenEvent *evt, double angle)
bool initializeForInternalPartons()
double bmax_
min impact param (fm); valid only if cflag_!=0
int cflag_
fixed impact param (fm); valid only if cflag_=0
unsigned int pythiaPylistVerbosity_
HepMC verbosity flag.
bool doIsospin_
DEFAULT = true.
static BaseHiGenEvtSelector * get(std::string, const edm::ParameterSet &)
unsigned int angularspecselector_
beam/target atomic mass number
bool generatePartonsAndHadronize()
Cos< T >::type cos(const T &t)
edm::InputTag src_
Pythia PYLIST Verbosity flag.
bool declareStableParticles(const std::vector< int >)
virtual bool filter(HepMC::GenEvent *)
void add_heavy_ion_rec(HepMC::GenEvent *evt)
Pythia6Service * pythia6Service_
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
HepMC::IO_HEPEVT hepevtio
bool pyqpythia_init(const edm::ParameterSet &pset)
unsigned int nquarkflavor_
Proton fraction in the nucleus.
bool doquench_
collision energy
const char * classname() const
double comenergy
centrality flag =0 fixed impact param, <>0 minbias
bool pythiaHepMCVerbosity_
Events to print if verbosity.
virtual ~PyquenHadronizer()
BaseHiGenEvtSelector * selector_
VertexRefVector::iterator vertex_iterator
iterator over a vector of references to Vertex objects in the same collection
double bfixed_
max impact param (fm); valid only if cflag_!=0
Power< A, B >::type pow(const A &a, const B &b)
edm::Event & getEDMEvent() const
T angle(T x1, T y1, T z1, T x2, T y2, T z2)