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 protonSide_(pset.getUntrackedParameter<int>(
"protonSide",0)),
50 embedding_(pset.getParameter<bool>(
"embeddingMode")),
52 nquarkflavor_(pset.getParameter<int>(
"qgpNumQuarkFlavor")),
53 qgpt0_(pset.getParameter<double>(
"qgpInitialTemperature")),
54 qgptau0_(pset.getParameter<double>(
"qgpProperTimeFormation")),
55 maxEventsToPrint_(pset.getUntrackedParameter<int>(
"maxEventsToPrint",1)),
56 pythiaHepMCVerbosity_(pset.getUntrackedParameter<bool>(
"pythiaHepMCVerbosity",
false)),
57 pythiaPylistVerbosity_(pset.getUntrackedParameter<int>(
"pythiaPylistVerbosity",0)),
59 filterType_(pset.getUntrackedParameter<string>(
"filterType",
"None"))
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!";
149 call_pyinit(
"CMS", projN.data(), targN.data(),
comenergy);
159 edm::LogInfo(
"PYQUENinAction") <<
"##### Calling PYQUEN: QUENCHING OFF!! This is just PYTHIA !!!! ####";
169 HepMC::GenEvent* evt =
hepevtio.read_next_event();
171 evt->set_signal_process_id(
pypars.msti[0]);
172 evt->set_event_scale(
pypars.pari[16]);
220 string sHadOff(
"MSTP(111)=0");
237 edm::LogInfo(
"PYQUENinEnLoss") <<
"##### PYQUEN: Radiative AND Collisional partonic energy loss ON ####";
240 edm::LogInfo(
"PYQUENinRad") <<
"##### PYQUEN: Only RADIATIVE partonic energy loss ON ####";
243 edm::LogInfo(
"PYQUENinColl") <<
"##### PYQUEN: Only COLLISIONAL partonic energy loss ON ####";
246 edm::LogInfo(
"PYQUENinEnLoss") <<
"##### PYQUEN: Radiative AND Collisional partonic energy loss ON ####";
264 if(random >
pfrac_) nuc =
"n";
272 double sinphi0 =
sin(angle);
273 double cosphi0 =
cos(angle);
276 vt!=evt->vertices_end(); ++vt )
279 double x0 = (*vt)->position().x();
280 double y0 = (*vt)->position().y();
281 double z = (*vt)->position().z();
282 double t = (*vt)->position().t();
284 double x = x0*cosphi0-y0*sinphi0;
285 double y = y0*cosphi0+x0*sinphi0;
287 (*vt)->set_position( HepMC::FourVector(x,y,z,t) ) ;
290 for ( HepMC::GenEvent::particle_iterator vt=evt->particles_begin();
291 vt!=evt->particles_end(); ++vt )
294 double x0 = (*vt)->momentum().x();
295 double y0 = (*vt)->momentum().y();
296 double z = (*vt)->momentum().z();
297 double t = (*vt)->momentum().t();
299 double x = x0*cosphi0-y0*sinphi0;
300 double y = y0*cosphi0+x0*sinphi0;
302 (*vt)->set_momentum( HepMC::FourVector(x,y,z,t) ) ;
308 for (
size_t i=0;
i < pdg.size();
i++ )
311 std::ostringstream pyCard ;
312 pyCard <<
"MDCY(" << pyCode <<
",1)=0";
349 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 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 >)
void add_heavy_ion_rec(HepMC::GenEvent *evt)
Pythia6Service * pythia6Service_
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
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
int protonSide_
Run n&p with proper ratios; if false, only p+p collisions.
Power< A, B >::type pow(const A &a, const B &b)
edm::Event & getEDMEvent() const
HepMC::IO_HEPEVT hepevtio
T angle(T x1, T y1, T z1, T x2, T y2, T z2)