Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:07:23

0001 #ifndef gen_Pythia6Hadronizer_h
0002 #define gen_Pythia6Hadronizer_h
0003 
0004 // -*- C++ -*-
0005 
0006 // class Pythia6Hadronizer is an example of a class that models the
0007 // Hadronizer concept.
0008 
0009 #include <memory>
0010 #include <string>
0011 #include <vector>
0012 
0013 #include "FWCore/ParameterSet/interface/ParameterSetfwd.h"
0014 
0015 #include "GeneratorInterface/Core/interface/BaseHadronizer.h"
0016 
0017 namespace lhef {
0018   class LHERunInfo;
0019   class LHEEvent;
0020 }  // namespace lhef
0021 
0022 class LHEEventProduct;
0023 
0024 namespace HepMC {
0025   class GenEvent;
0026 }
0027 
0028 namespace CLHEP {
0029   class HepRandomEngine;
0030 }
0031 
0032 namespace gen {
0033 
0034   class Pythia6Service;
0035   class JetMatching;
0036 
0037   class Pythia6Hadronizer : public BaseHadronizer {
0038   public:
0039     Pythia6Hadronizer(edm::ParameterSet const& ps);
0040     ~Pythia6Hadronizer() override;
0041 
0042     // bool generatePartons();
0043     bool generatePartonsAndHadronize();
0044     bool hadronize();
0045     bool decay();
0046     bool residualDecay();
0047     bool readSettings(int);
0048     bool initializeForExternalPartons();
0049     bool initializeForInternalPartons();
0050     bool declareStableParticles(const std::vector<int>&);
0051     bool declareSpecialSettings(const std::vector<std::string>&);
0052 
0053     static JetMatching* getJetMatching() { return fJetMatching; }
0054 
0055     void finalizeEvent();
0056 
0057     void statistics();
0058 
0059     const char* classname() const;
0060 
0061   private:
0062     // methods
0063     //
0064 
0065     void doSetRandomEngine(CLHEP::HepRandomEngine* v) override;
0066     std::vector<std::string> const& doSharedResources() const override { return theSharedResources; }
0067 
0068     void flushTmpStorage();
0069     void fillTmpStorage();
0070 
0071     void imposeProperTime();
0072 
0073     // data members
0074     //
0075 
0076     Pythia6Service* fPy6Service;
0077 
0078     // some of the following params are common for all generators(interfaces)
0079     // probably better to wrap them up in a class and reuse ?
0080     // (the event/run pointers are already moved to BaseHadronizer)
0081     //
0082     enum { PP, PPbar, ElectronPositron, ElectronProton, PositronProton };
0083 
0084     int fInitialState;  // pp, ppbar, e-e+, or e-p
0085     double fCOMEnergy;  // this one is irrelevant for setting py6 as hadronizer
0086                         // or if anything, it should be picked up from LHERunInfoProduct !
0087     double fBeam1PZ;
0088     double fBeam2PZ;
0089 
0090     static JetMatching* fJetMatching;
0091 
0092     bool fHepMCVerbosity;
0093     unsigned int fMaxEventsToPrint;
0094 
0095     // this is the only one specific to Pythia6
0096     //
0097     unsigned int fPythiaListVerbosity;
0098     bool fDisplayPythiaBanner;
0099     bool fDisplayPythiaCards;
0100 
0101     // these two params control stop- and r-handron features,
0102     // that are "custom" add-ons to Py6;
0103     // I doubt they should drag along Py6Int main library...
0104     //
0105     bool fStopHadronsEnabled;
0106     bool fGluinoHadronsEnabled;
0107 
0108     // this is a "trick" to generate enriched mu-samples and the likes
0109     bool fImposeProperTime;
0110 
0111     // and final touch - conversion of Py6 PID's into PDG convension
0112     bool fConvertToPDG;
0113 
0114     // tmp stuff, to deal with EvtGen corrupting pyjets
0115     // int NPartsBeforeDecays;
0116 
0117     static const std::vector<std::string> theSharedResources;
0118   };
0119 }  // namespace gen
0120 
0121 #endif