|
|
Go to the documentation of this file.
20 #include "HepMC/IO_HEPEVT.h"
21 #include "HepMC/PythiaWrapper.h"
35 abeamtarget_(
pset.getParameter<double>(
"aBeamTarget")),
36 angularspecselector_(
pset.getParameter<
int>(
"angularSpectrumSelector")),
37 bmin_(
pset.getParameter<double>(
"bMin")),
38 bmax_(
pset.getParameter<double>(
"bMax")),
39 bfixed_(
pset.getParameter<double>(
"bFixed")),
40 cflag_(
pset.getParameter<
int>(
"cFlag")),
41 comenergy(
pset.getParameter<double>(
"comEnergy")),
42 doquench_(
pset.getParameter<
bool>(
"doQuench")),
43 doradiativeenloss_(
pset.getParameter<
bool>(
"doRadiativeEnLoss")),
44 docollisionalenloss_(
pset.getParameter<
bool>(
"doCollisionalEnLoss")),
45 doIsospin_(
pset.getParameter<
bool>(
"doIsospin")),
46 protonSide_(
pset.getUntrackedParameter<
int>(
"protonSide", 0)),
47 embedding_(
pset.getParameter<
bool>(
"embeddingMode")),
49 nquarkflavor_(
pset.getParameter<
int>(
"qgpNumQuarkFlavor")),
50 qgpt0_(
pset.getParameter<double>(
"qgpInitialTemperature")),
51 qgptau0_(
pset.getParameter<double>(
"qgpProperTimeFormation")),
52 maxEventsToPrint_(
pset.getUntrackedParameter<
int>(
"maxEventsToPrint", 1)),
54 pythiaHepMCVerbosity_(
pset.getUntrackedParameter<
bool>(
"pythiaHepMCVerbosity",
false)),
55 pythiaPylistVerbosity_(
pset.getUntrackedParameter<
int>(
"pythiaPylistVerbosity", 0)),
57 filterType_(
pset.getUntrackedParameter<
string>(
"filterType",
"None")) {
58 if (
pset.exists(
"signalVtx"))
59 signalVtx_ =
pset.getUntrackedParameter<std::vector<double> >(
"signalVtx");
64 LogDebug(
"EventSignalVertex") <<
"Setting event signal vertex "
88 int cm = 1, va, vb, vc;
106 HepMC::HeavyIon*
hi =
new HepMC::HeavyIon(1,
121 evt->set_heavy_ion(*
hi);
136 HepMC::GenVertex* genvtx =
nullptr;
139 e.getByToken(
src_, cf);
141 if (
mix.size() < 1) {
142 throw cms::Exception(
"MatchVtx") <<
"Mixing has " <<
mix.size() <<
" sub-events, should have been at least 1"
147 throw cms::Exception(
"MatchVtx") <<
"Input background does not have smeared vertex!" << endl;
152 genvtx = inev->signal_process_vertex();
155 throw cms::Exception(
"MatchVtx") <<
"Input background does not have signal process vertex!" << endl;
157 double aX, aY, aZ, aT;
159 aX = genvtx->position().x();
160 aY = genvtx->position().y();
161 aZ = genvtx->position().z();
162 aT = genvtx->position().t();
170 <<
" aX " << aX <<
" aY " << aY <<
" aZ " << aZ <<
" aT " << aT << endl;
173 const HepMC::HeavyIon*
hi = inev->heavy_ion();
179 LogWarning(
"EventEmbedding") <<
"Background event does not have heavy ion record!";
194 call_pyinit(
"CMS", projN.data(), targN.data(),
comenergy);
205 edm::LogInfo(
"PYQUENinAction") <<
"##### Calling PYQUEN: QUENCHING OFF!! This is just PYTHIA !!!! ####";
218 evt->set_signal_process_id(
pypars.msti[0]);
219 evt->set_event_scale(
pypars.pari[16]);
270 string sHadOff(
"MSTP(111)=0");
285 edm::LogInfo(
"PYQUENinEnLoss") <<
"##### PYQUEN: Radiative AND Collisional partonic energy loss ON ####";
288 edm::LogInfo(
"PYQUENinRad") <<
"##### PYQUEN: Only RADIATIVE partonic energy loss ON ####";
291 edm::LogInfo(
"PYQUENinColl") <<
"##### PYQUEN: Only COLLISIONAL partonic energy loss ON ####";
294 edm::LogInfo(
"PYQUENinEnLoss") <<
"##### PYQUEN: Radiative AND Collisional partonic energy loss ON ####";
309 int*
dummy =
nullptr;
311 const char* nuc =
nullptr;
325 double x0 = (*vt)->position().x();
326 double y0 = (*vt)->position().y();
327 double z = (*vt)->position().z();
328 double t = (*vt)->position().t();
330 double x = x0 * cosphi0 - y0 * sinphi0;
331 double y = y0 * cosphi0 + x0 * sinphi0;
333 (*vt)->set_position(HepMC::FourVector(x, y, z,
t));
336 for (HepMC::GenEvent::particle_iterator vt = evt->particles_begin(); vt != evt->particles_end(); ++vt) {
337 double x0 = (*vt)->momentum().x();
338 double y0 = (*vt)->momentum().y();
339 double z = (*vt)->momentum().z();
340 double t = (*vt)->momentum().t();
342 double x = x0 * cosphi0 - y0 * sinphi0;
343 double y = y0 * cosphi0 + x0 * sinphi0;
345 (*vt)->set_momentum(HepMC::FourVector(x, y, z,
t));
350 std::vector<int>
pdg = _pdg;
351 for (
size_t i = 0;
i <
pdg.size();
i++) {
353 std::ostringstream pyCard;
354 pyCard <<
"MDCY(" << pyCode <<
",1)=0";
unsigned int maxEventsToPrint_
Events to print if verbosity.
bool declareStableParticles(const std::vector< int > &)
const char * classname() const
T const * product() const
bool pyquen_init(const edm::ParameterSet &pset)
void rotateEvtPlane(HepMC::GenEvent *evt, double angle)
static const std::string kFortranInstance
double abeamtarget_
beam/target atomic mass number
void setRandomEngine(CLHEP::HepRandomEngine *v)
Log< level::Info, false > LogInfo
bool doradiativeenloss_
DEFAULT = true.
Log< level::Warning, false > LogWarning
bool docollisionalenloss_
DEFAULT = true.
unsigned int pythiaPylistVerbosity_
Pythia PYLIST Verbosity flag.
Sin< T >::type sin(const T &t)
static BaseHiGenEvtSelector * get(std::string, const edm::ParameterSet &)
bool doIsospin_
Run n&p with proper ratios; if false, only p+p collisions.
int cflag_
centrality flag =0 fixed impact param, <>0 minbias
Cos< T >::type cos(const T &t)
edm::Event & getEDMEvent() const
bool generatePartonsAndHadronize()
bool initializeForInternalPartons()
double bmax_
max impact param (fm); valid only if cflag_!=0
void add_heavy_ion_rec(HepMC::GenEvent *evt)
bool pyqpythia_init(const edm::ParameterSet &pset)
bool doquench_
if true perform quenching (default = true)
edm::EDGetTokenT< CrossingFrame< edm::HepMCProduct > > src_
std::vector< double > signalVtx_
Pset double vector to set event signal vertex.
HepMC::FourVector * fVertex_
Event signal vertex.
unsigned int angularspecselector_
PyquenHadronizer(const edm::ParameterSet &, edm::ConsumesCollector &&)
static const std::vector< std::string > theSharedResources
const HepMC::GenEvent * GetEvent() const
bool isVtxGenApplied() const
double bfixed_
fixed impact param (fm); valid only if cflag_=0
Pythia6Service * pythia6Service_
unsigned int nquarkflavor_
std::unique_ptr< HepMC::GenEvent > & event()
double comenergy
collision energy
double pfrac_
Proton fraction in the nucleus.
static const std::string kPythia6
T angle(T x1, T y1, T z1, T x2, T y2, T z2)
~PyquenHadronizer() override
Power< A, B >::type pow(const A &a, const B &b)
BaseHiGenEvtSelector * selector_
bool pythiaHepMCVerbosity_
HepMC verbosity flag.
double bmin_
min impact param (fm); valid only if cflag_!=0
HepMC::IO_HEPEVT hepevtio
bool call_pygive(const std::string &line)
void doSetRandomEngine(CLHEP::HepRandomEngine *v) override
VertexRefVector::iterator vertex_iterator
iterator over a vector of references to Vertex objects in the same collection