Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:13:53

0001 #ifndef Pyquen_Hadronizer_h
0002 #define Pyquen_Hadronizer_h
0003 
0004 /**
0005    \class PyquenHadronizer
0006    \brief Interface to the PYQUEN generator (since core v. 1.5.4), produces HepMC events
0007    \version 2.0
0008    \authors Camelia Mironov, Andrey Belyaev
0009 */
0010 
0011 #include "GeneratorInterface/Core/interface/BaseHadronizer.h"
0012 #include "GeneratorInterface/HiGenCommon/interface/BaseHiGenEvtSelector.h"
0013 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0014 #include "FWCore/Utilities/interface/InputTag.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 
0025 #include "HepMC/GenEvent.h"
0026 
0027 namespace CLHEP {
0028   class HepRandomEngine;
0029 }
0030 
0031 namespace gen {
0032   class Pythia6Service;
0033 
0034   class PyquenHadronizer : public BaseHadronizer {
0035   public:
0036     PyquenHadronizer(const edm::ParameterSet&, edm::ConsumesCollector&&);
0037     ~PyquenHadronizer() override;
0038 
0039     bool generatePartonsAndHadronize();
0040     bool hadronize();
0041     bool decay();
0042     bool residualDecay();
0043     bool readSettings(int);
0044     bool initializeForExternalPartons();
0045     bool initializeForInternalPartons();
0046     bool declareStableParticles(const std::vector<int>&);
0047     bool declareSpecialSettings(const std::vector<std::string>&) { return true; }
0048     bool select(HepMC::GenEvent* evtTry) const override { return selector_->filter(evtTry); }
0049     void finalizeEvent();
0050     void statistics();
0051     const char* classname() const;
0052 
0053   private:
0054     void doSetRandomEngine(CLHEP::HepRandomEngine* v) override;
0055     std::vector<std::string> const& doSharedResources() const override { return theSharedResources; }
0056 
0057     static const std::vector<std::string> theSharedResources;
0058 
0059     void add_heavy_ion_rec(HepMC::GenEvent* evt);
0060 
0061     bool pyqpythia_init(const edm::ParameterSet& pset);
0062     bool pyquen_init(const edm::ParameterSet& pset);
0063     const char* nucleon();
0064     void rotateEvtPlane(HepMC::GenEvent* evt, double angle);
0065 
0066     edm::ParameterSet pset_;
0067     double abeamtarget_;                ///< beam/target atomic mass number
0068     unsigned int angularspecselector_;  ///< angular emitted gluon  spectrum selection
0069                                         ///< DEFAULT= 0 -- small angular emitted gluon spectrum
0070                                         ///<        = 1 -- broad angular emitted gluon spectrum
0071                                         ///<        = 2 -- collinear angular emitted gluon spectrum
0072     double bmin_;                       ///< min impact param (fm); valid only if cflag_!=0
0073     double bmax_;                       ///< max impact param (fm); valid only if cflag_!=0
0074     double bfixed_;                     ///< fixed impact param (fm); valid only if cflag_=0
0075     int cflag_;                         ///< centrality flag =0 fixed impact param, <>0 minbias
0076     double comenergy;                   ///< collision energy
0077     bool doquench_;                     ///< if true perform quenching (default = true)
0078     bool doradiativeenloss_;            ///< DEFAULT = true
0079     bool docollisionalenloss_;          ///< DEFAULT = true
0080     bool doIsospin_;                    ///< Run n&p with proper ratios; if false, only p+p collisions
0081     int protonSide_;
0082     bool embedding_;
0083     double evtPlane_;
0084     double pfrac_;  ///< Proton fraction in the nucleus
0085 
0086     unsigned int nquarkflavor_;      ///< number of active quark flavors in qgp
0087                                      ///< DEFAULT=0; allowed values: 0,1,2,3.
0088     double qgpt0_;                   ///< initial temperature of QGP
0089                                      ///< DEFAULT = 1GeV; allowed range [0.2,2.0]GeV;
0090     double qgptau0_;                 ///< proper time of QGP formation
0091                                      ///< DEFAULT = 0.1 fm/c; allowed range [0.01,10.0]fm/c;
0092     unsigned int maxEventsToPrint_;  ///< Events to print if verbosity
0093 
0094     HepMC::FourVector* fVertex_;     ///< Event signal vertex
0095     std::vector<double> signalVtx_;  ///< Pset double vector to set event signal vertex
0096 
0097     bool pythiaHepMCVerbosity_;           ///< HepMC verbosity flag
0098     unsigned int pythiaPylistVerbosity_;  ///< Pythia PYLIST Verbosity flag
0099 
0100     //    CLHEP::HepRandomEngine* fRandomEngine;
0101     edm::EDGetTokenT<CrossingFrame<edm::HepMCProduct> > src_;
0102     Pythia6Service* pythia6Service_;
0103     std::string filterType_;
0104     BaseHiGenEvtSelector* selector_;
0105   };
0106 }  // namespace gen
0107 
0108 #endif