CMS 3D CMS Logo

Hydjet2Hadronizer.h
Go to the documentation of this file.
1 #ifndef Hydjet2Hadronizer_h
2 #define Hydjet2Hadronizer_h
3 
13 
18 
19 #include <cmath>
20 #include <iostream>
21 #include <map>
22 #include <string>
23 #include <vector>
24 
25 #include <Hydjet2.h>
26 #include <InitialParams.h>
27 
28 namespace CLHEP {
29  class HepRandomEngine;
30  class RandFlat;
31  class RandPoisson;
32  class RandGauss;
33 } // namespace CLHEP
34 
35 namespace HepMC {
36  class GenEvent;
37  class GenParticle;
38  class GenVertex;
39  class FourVector;
40 } // namespace HepMC
41 
42 namespace gen {
43  class Pythia6Service;
45  public:
47  ~Hydjet2Hadronizer() override;
48 
49  bool readSettings(int);
50  bool declareSpecialSettings(const std::vector<std::string> &) { return true; }
54  bool declareStableParticles(const std::vector<int> &);
55 
56  bool hadronize(); //0
57  bool decay(); //0
58  bool residualDecay();
59  void finalizeEvent();
60  void statistics();
61  const char *classname() const;
62 
63  private:
64  void doSetRandomEngine(CLHEP::HepRandomEngine *v) override;
65  void rotateEvtPlane();
67  HepMC::GenParticle *build_hyjet2(int index, int barcode);
68  HepMC::GenVertex *build_hyjet2_vertex(int i, int id);
70 
71  std::vector<std::string> const &doSharedResources() const override { return theSharedResources; }
72  static const std::vector<std::string> theSharedResources;
73 
74  inline double nuclear_radius() const;
75 
76  int convertStatusForComponents(int, int, int);
77  int convertStatus(int);
78 
79  InitialParamsHydjet_t fParams;
80  Hydjet2 *hj2;
81 
82  bool ev = false;
84  bool rotate_; // Switch to rotate event plane
86  int nsub_; // number of sub-events
87  int nhard_; // multiplicity of PYTHIA(+PYQUEN)-induced particles in event
88  int nsoft_; // multiplicity of HYDRO-induced particles in event
89  double phi0_; // Event plane angle
90  double sinphi0_;
91  double cosphi0_;
92 
93  unsigned int pythiaPylistVerbosity_; // pythia verbosity; def=1
94  unsigned int maxEventsToPrint_; // Events to print if verbosity
95 
97  double Sigin, Sigjet;
98 
99  HepMC::FourVector *fVertex_; // Event signal vertex
100 
101  std::vector<double> signalVtx_; // Pset double vector to set event signal vertex
102 
105  };
106 
108  // Return the nuclear radius derived from the
109  // beam/target atomic mass number.
110 
111  return 1.15 * pow((double)fParams.fAw, 1. / 3.);
112  }
113 } // namespace gen
114 #endif
bool declareStableParticles(const std::vector< int > &)
edm::ParameterSet pset
unsigned int maxEventsToPrint_
InitialParamsHydjet_t fParams
void add_heavy_ion_rec(HepMC::GenEvent *evt)
unsigned int pythiaPylistVerbosity_
HepMC::FourVector * fVertex_
constexpr int pow(int x)
Definition: conifer.h:24
std::vector< double > signalVtx_
static const std::vector< std::string > theSharedResources
double v[5][pyjets_maxn]
edm::EDGetTokenT< CrossingFrame< edm::HepMCProduct > > src_
const char * classname() const
HepMC::GenVertex * build_hyjet2_vertex(int i, int id)
double nuclear_radius() const
Pythia6Service * pythia6Service_
std::vector< std::string > const & doSharedResources() const override
bool get_particles(HepMC::GenEvent *evt)
int convertStatusForComponents(int, int, int)
void doSetRandomEngine(CLHEP::HepRandomEngine *v) override
bool declareSpecialSettings(const std::vector< std::string > &)
Hydjet2Hadronizer(const edm::ParameterSet &, edm::ConsumesCollector &&)
HepMC::GenParticle * build_hyjet2(int index, int barcode)
bool initializeForExternalPartons()
HepMC::GenEvent * evt