25 #include "HepMC/IO_HEPEVT.h"
26 #include "HepMC/PythiaWrapper.h"
37 abeamtarget_(pset.getParameter<double>(
"aBeamTarget")),
38 angularspecselector_(pset.getParameter<int>(
"angularSpectrumSelector")),
39 bmin_(pset.getParameter<double>(
"bMin")),
40 bmax_(pset.getParameter<double>(
"bMax")),
41 bfixed_(pset.getParameter<double>(
"bFixed")),
42 cflag_(pset.getParameter<int>(
"cFlag")),
43 comenergy(pset.getParameter<double>(
"comEnergy")),
44 doquench_(pset.getParameter<bool>(
"doQuench")),
45 doradiativeenloss_(pset.getParameter<bool>(
"doRadiativeEnLoss")),
46 docollisionalenloss_(pset.getParameter<bool>(
"doCollisionalEnLoss")),
47 doIsospin_(pset.getParameter<bool>(
"doIsospin")),
48 protonSide_(pset.getUntrackedParameter<int>(
"protonSide",0)),
49 embedding_(pset.getParameter<bool>(
"embeddingMode")),
51 nquarkflavor_(pset.getParameter<int>(
"qgpNumQuarkFlavor")),
52 qgpt0_(pset.getParameter<double>(
"qgpInitialTemperature")),
53 qgptau0_(pset.getParameter<double>(
"qgpProperTimeFormation")),
54 maxEventsToPrint_(pset.getUntrackedParameter<int>(
"maxEventsToPrint",1)),
55 pythiaHepMCVerbosity_(pset.getUntrackedParameter<bool>(
"pythiaHepMCVerbosity",
false)),
56 pythiaPylistVerbosity_(pset.getUntrackedParameter<int>(
"pythiaPylistVerbosity",0)),
58 filterType_(pset.getUntrackedParameter<
string>(
"filterType",
"None"))
94 HepMC::HeavyIon *hi =
new HepMC::HeavyIon(
110 evt->set_heavy_ion(*hi);
129 const HepMC::GenEvent * inev = input->GetEvent();
130 const HepMC::HeavyIon* hi = inev->heavy_ion();
132 bfixed_ = hi->impact_parameter();
135 LogWarning(
"EventEmbedding")<<
"Background event does not have heavy ion record!";
148 call_pyinit(
"CMS", projN.data(), targN.data(),
comenergy);
158 edm::LogInfo(
"PYQUENinAction") <<
"##### Calling PYQUEN: QUENCHING OFF!! This is just PYTHIA !!!! ####";
168 HepMC::GenEvent* evt =
hepevtio.read_next_event();
170 evt->set_signal_process_id(
pypars.msti[0]);
171 evt->set_event_scale(
pypars.pari[16]);
219 string sHadOff(
"MSTP(111)=0");
236 edm::LogInfo(
"PYQUENinEnLoss") <<
"##### PYQUEN: Radiative AND Collisional partonic energy loss ON ####";
239 edm::LogInfo(
"PYQUENinRad") <<
"##### PYQUEN: Only RADIATIVE partonic energy loss ON ####";
242 edm::LogInfo(
"PYQUENinColl") <<
"##### PYQUEN: Only COLLISIONAL partonic energy loss ON ####";
245 edm::LogInfo(
"PYQUENinEnLoss") <<
"##### PYQUEN: Radiative AND Collisional partonic energy loss ON ####";
263 if(random >
pfrac_) nuc =
"n";
271 double sinphi0 =
sin(angle);
272 double cosphi0 =
cos(angle);
275 vt!=evt->vertices_end(); ++vt )
278 double x0 = (*vt)->position().x();
279 double y0 = (*vt)->position().y();
280 double z = (*vt)->position().z();
281 double t = (*vt)->position().t();
283 double x = x0*cosphi0-y0*sinphi0;
284 double y = y0*cosphi0+x0*sinphi0;
286 (*vt)->set_position( HepMC::FourVector(x,y,z,t) ) ;
289 for ( HepMC::GenEvent::particle_iterator vt=evt->particles_begin();
290 vt!=evt->particles_end(); ++vt )
293 double x0 = (*vt)->momentum().x();
294 double y0 = (*vt)->momentum().y();
295 double z = (*vt)->momentum().z();
296 double t = (*vt)->momentum().t();
298 double x = x0*cosphi0-y0*sinphi0;
299 double y = y0*cosphi0+x0*sinphi0;
301 (*vt)->set_momentum( HepMC::FourVector(x,y,z,t) ) ;
307 std::vector<int> pdg = _pdg;
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 &)
bool declareStableParticles(const std::vector< int > &)
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()
static std::string const input
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.
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
volatile std::atomic< bool > shutdown_flag false
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)