File indexing completed on 2024-04-06 12:13:48
0001 #ifndef HydjetHadronizer_h
0002 #define HydjetHadronizer_h
0003
0004
0005
0006
0007
0008
0009
0010
0011 #define PYCOMP pycomp_
0012
0013 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0014 #include "GeneratorInterface/Core/interface/BaseHadronizer.h"
0015
0016 #include "FWCore/Utilities/interface/EDGetToken.h"
0017 #include "FWCore/Framework/interface/ConsumesCollector.h"
0018 #include "SimDataFormats/CrossingFrame/interface/MixCollection.h"
0019 #include "SimDataFormats/PileupSummaryInfo/interface/PileupMixingContent.h"
0020
0021 #include <map>
0022 #include <string>
0023 #include <vector>
0024 #include <cmath>
0025
0026 namespace CLHEP {
0027 class HepRandomEngine;
0028 }
0029
0030 namespace HepMC {
0031 class GenEvent;
0032 class GenParticle;
0033 class GenVertex;
0034 class FourVector;
0035 }
0036
0037 namespace gen {
0038 class Pythia6Service;
0039
0040 class HydjetHadronizer : public BaseHadronizer {
0041 public:
0042 HydjetHadronizer(const edm::ParameterSet&, edm::ConsumesCollector&&);
0043 ~HydjetHadronizer() override;
0044
0045 bool generatePartonsAndHadronize();
0046 bool hadronize();
0047 bool decay();
0048 bool residualDecay();
0049 bool readSettings(int);
0050 bool initializeForExternalPartons();
0051 bool initializeForInternalPartons();
0052 bool declareStableParticles(const std::vector<int>&);
0053 bool declareSpecialSettings(const std::vector<std::string>&) { return true; }
0054
0055 void finalizeEvent();
0056 void statistics();
0057 const char* classname() const;
0058
0059 private:
0060 void doSetRandomEngine(CLHEP::HepRandomEngine* v) override;
0061 std::vector<std::string> const& doSharedResources() const override { return theSharedResources; }
0062
0063 static const std::vector<std::string> theSharedResources;
0064
0065 void add_heavy_ion_rec(HepMC::GenEvent* evt);
0066 HepMC::GenParticle* build_hyjet(int index, int barcode);
0067 HepMC::GenVertex* build_hyjet_vertex(int i, int id);
0068 bool get_particles(HepMC::GenEvent* evt);
0069 bool call_hyinit(double energy, double a, int ifb, double bmin, double bmax, double bfix, int nh);
0070 bool hydjet_init(const edm::ParameterSet& pset);
0071 inline double nuclear_radius() const;
0072 void rotateEvtPlane();
0073 int convertStatus(int st);
0074
0075 HepMC::GenEvent* evt;
0076 edm::ParameterSet pset_;
0077 double abeamtarget_;
0078 int angularspecselector_;
0079 double bfixed_;
0080 double bmax_;
0081
0082 double bmin_;
0083
0084 int cflag_;
0085
0086
0087 bool embedding_;
0088 double comenergy;
0089 bool doradiativeenloss_;
0090 bool docollisionalenloss_;
0091 double fracsoftmult_;
0092
0093
0094
0095
0096
0097 double hadfreeztemp_;
0098
0099 std::string hymode_;
0100 unsigned int maxEventsToPrint_;
0101 double maxlongy_;
0102
0103
0104 double maxtrany_;
0105
0106
0107 int nsub_;
0108 int nhard_;
0109 int nmultiplicity_;
0110
0111 int nsoft_;
0112 unsigned int nquarkflavor_;
0113
0114 unsigned int pythiaPylistVerbosity_;
0115 double qgpt0_;
0116
0117 double qgptau0_;
0118
0119
0120 double phi0_;
0121 double sinphi0_;
0122 double cosphi0_;
0123 bool rotate_;
0124
0125 unsigned int shadowingswitch_;
0126
0127 double signn_;
0128
0129 HepMC::FourVector* fVertex_;
0130 std::vector<double> signalVtx_;
0131
0132 Pythia6Service* pythia6Service_;
0133 edm::EDGetTokenT<CrossingFrame<edm::HepMCProduct> > src_;
0134 };
0135
0136
0137
0138
0139
0140 double HydjetHadronizer::nuclear_radius() const { return 1.15 * pow((double)abeamtarget_, 1. / 3.); }
0141 }
0142 #endif