Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:06:59

0001 #ifndef HijingHadronizer_h
0002 #define HijingHadronizer_h
0003 
0004 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0005 #include "GeneratorInterface/Core/interface/BaseHadronizer.h"
0006 
0007 #include <map>
0008 #include <string>
0009 #include <vector>
0010 #include <cmath>
0011 
0012 namespace HepMC {
0013   class GenEvent;
0014   class GenParticle;
0015   class GenVertex;
0016 }  // namespace HepMC
0017 
0018 namespace CLHEP {
0019   class HepRandomEngine;
0020 }
0021 
0022 namespace gen {
0023   extern "C" {
0024   float hijran_(int*);
0025   }
0026 
0027   class HijingHadronizer : public BaseHadronizer {
0028   public:
0029     HijingHadronizer(const edm::ParameterSet&);
0030     ~HijingHadronizer() override;
0031 
0032     bool generatePartonsAndHadronize();
0033     bool hadronize();
0034     bool decay();
0035     bool residualDecay();
0036     bool readSettings(int) { return true; }
0037     bool initializeForExternalPartons();
0038     bool initializeForInternalPartons();
0039     bool declareStableParticles(const std::vector<int>&);
0040     bool declareSpecialSettings(const std::vector<std::string>&) { return true; }
0041 
0042     void finalizeEvent();
0043     void statistics();
0044     const char* classname() const;
0045 
0046   private:
0047     void doSetRandomEngine(CLHEP::HepRandomEngine* v) override;
0048     std::vector<std::string> const& doSharedResources() const override { return theSharedResources; }
0049 
0050     void add_heavy_ion_rec(HepMC::GenEvent* evt);
0051     HepMC::GenParticle* build_hijing(int index, int barcode);
0052     HepMC::GenVertex* build_hijing_vertex(int i, int id);
0053     bool get_particles(HepMC::GenEvent* evt);
0054     bool call_hijset(
0055         double efrm, std::string frame, std::string proj, std::string targ, int iap, int izp, int iat, int izt);
0056     //    inline double                 nuclear_radius() const;
0057     void rotateEvtPlane();
0058 
0059     HepMC::GenEvent* evt;
0060     edm::ParameterSet pset_;
0061     double bmax_;  // max impact param;
0062                    // units of nucl radius
0063     double bmin_;  // min impact param;
0064                    // units of nucl radius
0065     double efrm_;  // collision energy
0066     std::string frame_;
0067     std::string proj_;
0068     std::string targ_;
0069     int iap_;
0070     int izp_;
0071     int iat_;
0072     int izt_;
0073 
0074     //    unsigned int      maxEventsToPrint_;      // Events to print if verbosity
0075     //    unsigned int      pythiaPylistVerbosity_; // pythia verbosity; def=1
0076 
0077     double phi0_;  // Event plane angle
0078     double sinphi0_;
0079     double cosphi0_;
0080     bool rotate_;  // Switch to rotate event plane
0081 
0082     static const std::vector<std::string> theSharedResources;
0083 
0084     //    unsigned int      shadowingswitch_;       // shadowing switcher
0085     // 1-ON, 0-OFF
0086     //    double            signn_;                 // inelastic nucleon nucleon cross section [mb]
0087     // DEFAULT= 58 mb
0088     //    CLHEP::HepRandomEngine* fRandomEngine;
0089     //    Pythia6Service* pythia6Service_;
0090   };
0091 
0092 }  // namespace gen
0093 
0094 #endif