test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
gen::ReggeGribovPartonMCHadronizer Class Reference

#include <ReggeGribovPartonMC.h>

Inheritance diagram for gen::ReggeGribovPartonMCHadronizer:
gen::BaseHadronizer gen::BaseHadronizer

Public Member Functions

const char * classname () const
 
bool decay ()
 
bool declareSpecialSettings (const std::vector< std::string > &)
 
bool declareStableParticles (const std::vector< int > &)
 
void finalizeEvent ()
 
bool generatePartonsAndHadronize ()
 
bool hadronize ()
 
bool initializeForExternalPartons ()
 
bool initializeForInternalPartons ()
 
bool initializeTablePaths ()
 
bool readSettings (int)
 
 ReggeGribovPartonMCHadronizer (const edm::ParameterSet &)
 
 ReggeGribovPartonMCHadronizer (const edm::ParameterSet &)
 
bool residualDecay ()
 
void statistics ()
 
virtual ~ReggeGribovPartonMCHadronizer ()
 
virtual ~ReggeGribovPartonMCHadronizer ()
 
- Public Member Functions inherited from gen::BaseHadronizer
 BaseHadronizer (edm::ParameterSet const &ps)
 
edm::EventgetEDMEvent () const
 
HepMC::GenEvent * getGenEvent ()
 
GenEventInfoProductgetGenEventInfo ()
 
GenRunInfoProductgetGenRunInfo ()
 
const boost::shared_ptr
< lhef::LHERunInfo > & 
getLHERunInfo () const
 
void resetEvent (HepMC::GenEvent *event)
 
void resetEventInfo (GenEventInfoProduct *eventInfo)
 
virtual bool select (HepMC::GenEvent *) const
 
void setEDMEvent (edm::Event &event)
 
void setLHEEvent (lhef::LHEEvent *event)
 
void setLHERunInfo (lhef::LHERunInfo *runInfo)
 
void setRandomEngine (CLHEP::HepRandomEngine *v)
 
std::vector< std::string > const & sharedResources () const
 
 ~BaseHadronizer ()
 

Private Member Functions

virtual void doSetRandomEngine (CLHEP::HepRandomEngine *v) override
 

Private Attributes

int m_BeamID
 
double m_BeamMomentum
 
double m_bMax
 
double m_bMin
 
int m_HEModel
 
double m_ImpactParameter
 
bool m_IsInitialized
 
int m_NEvent
 
int m_NParticles
 
edm::FileInPath m_ParamFileName
 
double m_PartEnergy [99990]
 
int m_PartID [99990]
 
double m_PartMass [99990]
 
double m_PartPx [99990]
 
double m_PartPy [99990]
 
double m_PartPz [99990]
 
int m_PartStatus [99990]
 
bool m_SkipNuclFrag
 
int m_TargetID
 
double m_TargetMomentum
 
edm::ParameterSet pset_
 

Additional Inherited Members

- Protected Member Functions inherited from gen::BaseHadronizer
std::auto_ptr< HepMC::GenEvent > & event ()
 
std::auto_ptr
< GenEventInfoProduct > & 
eventInfo ()
 
lhef::LHEEventlheEvent ()
 
lhef::LHERunInfolheRunInfo ()
 
GenRunInfoProductrunInfo ()
 

Detailed Description

Definition at line 22 of file ReggeGribovPartonMC.h.

Constructor & Destructor Documentation

ReggeGribovPartonMCHadronizer::ReggeGribovPartonMCHadronizer ( const edm::ParameterSet pset)

Definition at line 61 of file ReggeGribovPartonMCHadronizer.cc.

References crmc_set_f_(), edm::FileInPath::fullPath(), initializeTablePaths(), m_BeamID, m_BeamMomentum, m_bMax, m_bMin, m_HEModel, m_ParamFileName, m_TargetID, m_TargetMomentum, and nucl2_.

61  :
62  BaseHadronizer(pset),
63  pset_(pset),
64  m_BeamMomentum(pset.getParameter<double>("beammomentum")),
65  m_TargetMomentum(pset.getParameter<double>("targetmomentum")),
66  m_BeamID(pset.getParameter<int>("beamid")),
67  m_TargetID(pset.getParameter<int>("targetid")),
68  m_HEModel(pset.getParameter<int>("model")),
69  m_bMin(pset.getParameter<double>("bmin")),
70  m_bMax(pset.getParameter<double>("bmax")),
71  m_ParamFileName(pset.getUntrackedParameter<string>("paramFileName")),
72  m_SkipNuclFrag(pset.getParameter<bool>("skipNuclFrag")),
73  m_NEvent(0),
74  m_NParticles(0),
76  m_IsInitialized(false)
77 {
78  int nevet = 1; //needed for CS
79  int noTables = 0; //don't calculate tables
80  int LHEoutput = 0; //no lhe
81  int dummySeed = 123;
82  char dummyName[] = "dummy";
84  m_TargetID,m_HEModel,noTables,LHEoutput,dummyName,
85  m_ParamFileName.fullPath().c_str());
86 
87  //additionally initialise tables
89 
90  //change impact paramter
91  nucl2_.bminim = float(m_bMin);
92  nucl2_.bmaxim = float(m_bMax);
93 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
BaseHadronizer(edm::ParameterSet const &ps)
struct @571 nucl2_
std::string fullPath() const
Definition: FileInPath.cc:165
void crmc_set_f_(int &, int &, double &, double &, int &, int &, int &, int &, int &, const char *, const char *)
ReggeGribovPartonMCHadronizer::~ReggeGribovPartonMCHadronizer ( )
virtual

Definition at line 97 of file ReggeGribovPartonMCHadronizer.cc.

98 {
99  // destructor
100 }
gen::ReggeGribovPartonMCHadronizer::ReggeGribovPartonMCHadronizer ( const edm::ParameterSet )
virtual gen::ReggeGribovPartonMCHadronizer::~ReggeGribovPartonMCHadronizer ( )
virtual

Member Function Documentation

const char * ReggeGribovPartonMCHadronizer::classname ( ) const

Definition at line 202 of file ReggeGribovPartonMCHadronizer.cc.

203 {
204  return "gen::ReggeGribovPartonMCHadronizer";
205 }
bool ReggeGribovPartonMCHadronizer::decay ( )

Definition at line 184 of file ReggeGribovPartonMCHadronizer.cc.

185 {
186  return true;
187 }
bool gen::ReggeGribovPartonMCHadronizer::declareSpecialSettings ( const std::vector< std::string > &  )
inline

Definition at line 213 of file ReggeGribovPartonMCHadronizer.h.

213 { return true; }
bool ReggeGribovPartonMCHadronizer::declareStableParticles ( const std::vector< int > &  )

Definition at line 207 of file ReggeGribovPartonMCHadronizer.cc.

208 {
209  return true;
210  }
void ReggeGribovPartonMCHadronizer::doSetRandomEngine ( CLHEP::HepRandomEngine *  v)
overrideprivatevirtual

Reimplemented from gen::BaseHadronizer.

Definition at line 104 of file ReggeGribovPartonMCHadronizer.cc.

References reggeGribovRandomEngine, and gen::v.

105 {
107 }
double v[5][pyjets_maxn]
static CLHEP::HepRandomEngine * reggeGribovRandomEngine
void ReggeGribovPartonMCHadronizer::finalizeEvent ( )

Definition at line 194 of file ReggeGribovPartonMCHadronizer.cc.

194  {
195  return;
196 }
bool ReggeGribovPartonMCHadronizer::generatePartonsAndHadronize ( )

Definition at line 111 of file ReggeGribovPartonMCHadronizer.cc.

References c2evt_, cevt_, conv, crmc_f_(), gen::BaseHadronizer::event(), hadr5_, LogDebug, m_BeamID, m_ImpactParameter, m_NEvent, m_NParticles, m_PartEnergy, m_PartID, m_PartMass, m_PartPx, m_PartPy, m_PartPz, m_PartStatus, m_SkipNuclFrag, and m_TargetID.

112 {
113  int iout=0,ievent=0;
115  m_PartID[0],m_PartPx[0],m_PartPy[0],m_PartPz[0],
117  LogDebug("ReggeGribovPartonMCInterface") << "event generated" << endl;
118 
119  const bool isHeavyIon = (m_TargetID + m_BeamID > 2);
120 
121  if(isHeavyIon)
122  conv.set_trust_beam_particles(false);
123 
124  conv.set_skip_nuclear_fragments(m_SkipNuclFrag);
125 
126  HepMC::GenEvent* evt = conv.read_next_event();
127 
128  evt->set_event_number(m_NEvent++);
129  int sig_id = -1;
130  switch (int(c2evt_.typevt)) // if negative typevt mini plasma was created by event (except -4)
131  {
132  case 0: break; //unknown for qgsjetII
133  case 1: sig_id = 101; break;
134  case -1: sig_id = 101; break;
135  case 2: sig_id = 105; break;
136  case -2: sig_id = 105; break;
137  case 3: sig_id = 102; break;
138  case -3: sig_id = 102; break;
139  case 4: sig_id = 103; break;
140  case -4: sig_id = 104; break;
141  default: LogDebug("ReggeGribovPartonMCInterface") << "Signal ID not recognised for setting HEPEVT" << endl;
142  }
143  evt->set_signal_process_id(sig_id); //an integer ID uniquely specifying the signal process (i.e. MSUB in Pythia)
144 
145 #ifdef HEPMC_HAS_CROSS_SECTION
146  // set cross section information for this event
147  HepMC::GenCrossSection theCrossSection;
148  theCrossSection.set_cross_section(double(hadr5_.sigineaa)*1e9); //required in pB
149  evt->set_cross_section(theCrossSection);
150 #endif
151 
152  if (isHeavyIon) //other than pp
153  {
154  HepMC::HeavyIon ion(cevt_.kohevt, // Number of hard scatterings
155  cevt_.npjevt, // Number of projectile participants
156  cevt_.ntgevt, // Number of target participants
157  cevt_.kolevt, // Number of NN (nucleon-nucleon) collisions
158  cevt_.npnevt + cevt_.ntnevt, // Number of spectator neutrons
159  cevt_.nppevt + cevt_.ntpevt, // Number of spectator protons
160  -1, // Number of N-Nwounded collisions
161  -1, // Number of Nwounded-N collisons
162  -1, // Number of Nwounded-Nwounded collisions
163  cevt_.bimevt, // Impact Parameter(fm) of collision
164  cevt_.phievt, // Azimuthal angle of event plane
165  c2evt_.fglevt, // eccentricity of participating nucleons
166  hadr5_.sigine*1e9); // nucleon-nucleon inelastic (in pB)
167  evt->set_heavy_ion(ion);
168  }
169 
170 
171  event().reset(evt);
172  //evt->print();
173  //EPOS::EPOS_Wrapper::print_hepcom();
174 
175  return true;
176 }
#define LogDebug(id)
static HepMC::IO_HEPEVT conv
void crmc_f_(int &, int &, int &, double &, int &, double &, double &, double &, double &, double &, int &)
std::auto_ptr< HepMC::GenEvent > & event()
struct @569 cevt_
struct @570 c2evt_
struct @568 hadr5_
bool ReggeGribovPartonMCHadronizer::hadronize ( )

Definition at line 179 of file ReggeGribovPartonMCHadronizer.cc.

180 {
181  return false;
182 }
bool gen::ReggeGribovPartonMCHadronizer::initializeForExternalPartons ( )
inline

Definition at line 210 of file ReggeGribovPartonMCHadronizer.h.

210 { return true; }
bool ReggeGribovPartonMCHadronizer::initializeForInternalPartons ( )

Definition at line 212 of file ReggeGribovPartonMCHadronizer.cc.

References crmc_init_f_(), and m_IsInitialized.

213 {
214  if (!m_IsInitialized) {
215  //use set parameters to init models
216  crmc_init_f_();
217  m_IsInitialized = true;
218  }
219  return true;
220 }
void crmc_init_f_()
bool ReggeGribovPartonMCHadronizer::initializeTablePaths ( )

Definition at line 222 of file ReggeGribovPartonMCHadronizer.cc.

References fname_, contentValuesFiles::fullPath, nfname_, qgsfname_, qgsiifname_, qgsiinfname_, and qgsnfname_.

Referenced by ReggeGribovPartonMCHadronizer().

223 {
224  //epos
225  string path_fnii(FileInPath("GeneratorInterface/ReggeGribovPartonMCInterface/data/epos.initl").fullPath());
226  string path_fnie(FileInPath("GeneratorInterface/ReggeGribovPartonMCInterface/data/epos.iniev").fullPath());
227  string path_fnrj(FileInPath("GeneratorInterface/ReggeGribovPartonMCInterface/data/epos.inirj").fullPath());
228  string path_fncs(FileInPath("GeneratorInterface/ReggeGribovPartonMCInterface/data/epos.inics").fullPath());
229 
230  if (path_fnii.length() >= 500) LogError("ReggeGribovPartonMCInterface") << "table path too long" << endl;
231  else nfname_.nfnii = path_fnii.length();
232  if (path_fnie.length() >= 500) LogError("ReggeGribovPartonMCInterface") << "table path too long" << endl;
233  else nfname_.nfnie = path_fnie.length();
234  if (path_fnrj.length() >= 500) LogError("ReggeGribovPartonMCInterface") << "table path too long" << endl;
235  else nfname_.nfnrj = path_fnrj.length();
236  if (path_fncs.length() >= 500) LogError("ReggeGribovPartonMCInterface") << "table path too long" << endl;
237  else nfname_.nfncs = path_fncs.length();
238 
239  strcpy(fname_.fnii, path_fnii.c_str());
240  strcpy(fname_.fnie, path_fnie.c_str());
241  strcpy(fname_.fnrj, path_fnrj.c_str());
242  strcpy(fname_.fncs, path_fncs.c_str());
243 
244  //qgsjet
245  string path_fndat(FileInPath("GeneratorInterface/ReggeGribovPartonMCInterface/data/qgsjet.dat").fullPath());
246  string path_fnncs(FileInPath("GeneratorInterface/ReggeGribovPartonMCInterface/data/qgsjet.ncs").fullPath());
247 
248  if (path_fndat.length() >= 500) LogError("ReggeGribovPartonMCInterface") << "table path too long" << endl;
249  else qgsnfname_.nfndat = path_fndat.length();
250  if (path_fnncs.length() >= 500) LogError("ReggeGribovPartonMCInterface") << "table path too long" << endl;
251  else qgsnfname_.nfnncs = path_fnncs.length();
252 
253  strcpy(qgsfname_.fndat, path_fndat.c_str());
254  strcpy(qgsfname_.fnncs, path_fnncs.c_str());
255 
256  qgsfname_.ifdat=1; //option to overwrite the normal path
257  qgsfname_.ifncs=2;
258 
259  //qgsjetII
260  string path_fniidat(FileInPath("GeneratorInterface/ReggeGribovPartonMCInterface/data/qgsdat-II-04.lzma").fullPath());
261  string path_fniincs(FileInPath("GeneratorInterface/ReggeGribovPartonMCInterface/data/sectnu-II-04").fullPath());
262 
263  if (path_fniidat.length() >= 500) LogError("ReggeGribovPartonMCInterface") << "table path too long" << endl;
264  else qgsiinfname_.nfniidat = path_fniidat.length();
265  if (path_fniincs.length() >= 500) LogError("ReggeGribovPartonMCInterface") << "table path too long" << endl;
266  else qgsiinfname_.nfniincs = path_fniincs.length();
267 
268  strcpy(qgsiifname_.fniidat, path_fniidat.c_str());
269  strcpy(qgsiifname_.fniincs, path_fniincs.c_str());
270 
271  qgsiifname_.ifiidat=1; //option to overwrite the normal path
272  qgsiifname_.ifiincs=2;
273 
274  return true;
275 }
struct @575 qgsnfname_
struct @573 nfname_
struct @576 qgsiifname_
struct @572 fname_
struct @574 qgsfname_
struct @577 qgsiinfname_
bool gen::ReggeGribovPartonMCHadronizer::readSettings ( int  )
inline

Definition at line 209 of file ReggeGribovPartonMCHadronizer.h.

209 { return true; }
bool ReggeGribovPartonMCHadronizer::residualDecay ( )

Definition at line 189 of file ReggeGribovPartonMCHadronizer.cc.

190 {
191  return true;
192 }
void ReggeGribovPartonMCHadronizer::statistics ( )

Definition at line 198 of file ReggeGribovPartonMCHadronizer.cc.

198  {
199  return;
200 }

Member Data Documentation

int gen::ReggeGribovPartonMCHadronizer::m_BeamID
private
double gen::ReggeGribovPartonMCHadronizer::m_BeamMomentum
private

Definition at line 225 of file ReggeGribovPartonMCHadronizer.h.

Referenced by ReggeGribovPartonMCHadronizer().

double gen::ReggeGribovPartonMCHadronizer::m_bMax
private

Definition at line 231 of file ReggeGribovPartonMCHadronizer.h.

Referenced by ReggeGribovPartonMCHadronizer().

double gen::ReggeGribovPartonMCHadronizer::m_bMin
private

Definition at line 230 of file ReggeGribovPartonMCHadronizer.h.

Referenced by ReggeGribovPartonMCHadronizer().

int gen::ReggeGribovPartonMCHadronizer::m_HEModel
private

Definition at line 229 of file ReggeGribovPartonMCHadronizer.h.

Referenced by ReggeGribovPartonMCHadronizer().

double gen::ReggeGribovPartonMCHadronizer::m_ImpactParameter
private

Definition at line 237 of file ReggeGribovPartonMCHadronizer.h.

Referenced by generatePartonsAndHadronize().

bool gen::ReggeGribovPartonMCHadronizer::m_IsInitialized
private

Definition at line 246 of file ReggeGribovPartonMCHadronizer.h.

Referenced by initializeForInternalPartons().

int gen::ReggeGribovPartonMCHadronizer::m_NEvent
private

Definition at line 234 of file ReggeGribovPartonMCHadronizer.h.

Referenced by generatePartonsAndHadronize().

int gen::ReggeGribovPartonMCHadronizer::m_NParticles
private

Definition at line 236 of file ReggeGribovPartonMCHadronizer.h.

Referenced by generatePartonsAndHadronize().

edm::FileInPath gen::ReggeGribovPartonMCHadronizer::m_ParamFileName
private

Definition at line 232 of file ReggeGribovPartonMCHadronizer.h.

Referenced by ReggeGribovPartonMCHadronizer().

double gen::ReggeGribovPartonMCHadronizer::m_PartEnergy[99990]
private

Definition at line 242 of file ReggeGribovPartonMCHadronizer.h.

Referenced by generatePartonsAndHadronize().

int gen::ReggeGribovPartonMCHadronizer::m_PartID[99990]
private

Definition at line 238 of file ReggeGribovPartonMCHadronizer.h.

Referenced by generatePartonsAndHadronize().

double gen::ReggeGribovPartonMCHadronizer::m_PartMass[99990]
private

Definition at line 243 of file ReggeGribovPartonMCHadronizer.h.

Referenced by generatePartonsAndHadronize().

double gen::ReggeGribovPartonMCHadronizer::m_PartPx[99990]
private

Definition at line 239 of file ReggeGribovPartonMCHadronizer.h.

Referenced by generatePartonsAndHadronize().

double gen::ReggeGribovPartonMCHadronizer::m_PartPy[99990]
private

Definition at line 240 of file ReggeGribovPartonMCHadronizer.h.

Referenced by generatePartonsAndHadronize().

double gen::ReggeGribovPartonMCHadronizer::m_PartPz[99990]
private

Definition at line 241 of file ReggeGribovPartonMCHadronizer.h.

Referenced by generatePartonsAndHadronize().

int gen::ReggeGribovPartonMCHadronizer::m_PartStatus[99990]
private

Definition at line 244 of file ReggeGribovPartonMCHadronizer.h.

Referenced by generatePartonsAndHadronize().

bool gen::ReggeGribovPartonMCHadronizer::m_SkipNuclFrag
private

Definition at line 233 of file ReggeGribovPartonMCHadronizer.h.

Referenced by generatePartonsAndHadronize().

int gen::ReggeGribovPartonMCHadronizer::m_TargetID
private
double gen::ReggeGribovPartonMCHadronizer::m_TargetMomentum
private

Definition at line 226 of file ReggeGribovPartonMCHadronizer.h.

Referenced by ReggeGribovPartonMCHadronizer().

edm::ParameterSet gen::ReggeGribovPartonMCHadronizer::pset_
private

Definition at line 224 of file ReggeGribovPartonMCHadronizer.h.