CMS 3D CMS Logo

Generator.h
Go to the documentation of this file.
1 #ifndef SimG4Core_Generator_H
2 #define SimG4Core_Generator_H
3 
6 
9 
10 #include "HepMC/GenEvent.h"
11 #include "HepMC/GenParticle.h"
12 
13 #include <vector>
14 
15 class G4Event;
16 class G4PrimaryParticle;
17 class LumiMonitorFilter;
18 
19 class Generator {
20 public:
22  virtual ~Generator();
23 
24  void setGenEvent(const HepMC::GenEvent *inpevt) {
25  evt_ = (HepMC::GenEvent *)inpevt;
26  return;
27  }
28  void HepMC2G4(const HepMC::GenEvent *g, G4Event *e);
29  void nonCentralEvent2G4(const HepMC::GenEvent *g, G4Event *e);
30  virtual const HepMC::GenEvent *genEvent() const { return evt_; }
31  virtual const math::XYZTLorentzVector *genVertex() const { return vtx_; }
32  virtual const double eventWeight() const { return weight_; }
33 
34 private:
35  bool particlePassesPrimaryCuts(const G4ThreeVector &p) const;
36  bool isExotic(int pdgcode) const;
37  bool isExoticNonDetectable(int pdgcode) const;
38  bool IsInTheFilterList(int pdgcode) const;
39  void particleAssignDaughters(G4PrimaryParticle *p, HepMC::GenParticle *hp, double length);
40  void setGenId(G4PrimaryParticle *p, int id) const { p->SetUserInformation(new GenParticleInfo(id)); }
41 
42 private:
43  bool fPCuts;
44  bool fPtransCut;
45  bool fEtaCuts;
46  bool fPhiCuts;
48  double theMinPhiCut;
49  double theMaxPhiCut;
50  double theMinEtaCut;
51  double theMaxEtaCut;
52  double theMinPCut;
53  double theMinPtCut2;
54  double theMaxPCut;
55  double theDecRCut2;
57  double theDecLenCut;
59  int verbose;
63  double weight_;
65  std::vector<int> pdgFilter;
67  bool fPDGFilter;
68 };
69 
70 #endif
Generator::eventWeight
virtual const double eventWeight() const
Definition: Generator.h:32
Generator::Z_lmax
double Z_lmax
Definition: Generator.h:64
Generator::theMaxPhiCut
double theMaxPhiCut
Definition: Generator.h:49
Generator::theDecLenCut
double theDecLenCut
Definition: Generator.h:57
Generator::particlePassesPrimaryCuts
bool particlePassesPrimaryCuts(const G4ThreeVector &p) const
Definition: Generator.cc:485
Generator::isExoticNonDetectable
bool isExoticNonDetectable(int pdgcode) const
Definition: Generator.cc:525
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
Generator::genVertex
virtual const math::XYZTLorentzVector * genVertex() const
Definition: Generator.h:31
Generator::nonCentralEvent2G4
void nonCentralEvent2G4(const HepMC::GenEvent *g, G4Event *e)
Definition: Generator.cc:542
Generator::theMinPtCut2
double theMinPtCut2
Definition: Generator.h:53
Generator::IsInTheFilterList
bool IsInTheFilterList(int pdgcode) const
Definition: Generator.cc:532
Generator::fEtaCuts
bool fEtaCuts
Definition: Generator.h:45
HepMC::GenEvent
Definition: hepmc_rootio.cc:9
Generator::isExotic
bool isExotic(int pdgcode) const
Definition: Generator.cc:517
Generator::fPCuts
bool fPCuts
Definition: Generator.h:43
Generator::fFiductialCuts
bool fFiductialCuts
Definition: Generator.h:47
GenParticleInfo.h
trackingPlots.hp
hp
Definition: trackingPlots.py:1248
Generator::fPDGFilter
bool fPDGFilter
Definition: Generator.h:67
Generator::weight_
double weight_
Definition: Generator.h:63
Generator::theMaxEtaCut
double theMaxEtaCut
Definition: Generator.h:51
Generator::setGenEvent
void setGenEvent(const HepMC::GenEvent *inpevt)
Definition: Generator.h:24
Generator::theEtaCutForHector
double theEtaCutForHector
Definition: Generator.h:56
Generator::Z_lmin
double Z_lmin
Definition: Generator.h:64
Generator::~Generator
virtual ~Generator()
Definition: Generator.cc:110
Generator::particleAssignDaughters
void particleAssignDaughters(G4PrimaryParticle *p, HepMC::GenParticle *hp, double length)
Definition: Generator.cc:423
Generator::theMaxPCut
double theMaxPCut
Definition: Generator.h:54
Generator::setGenId
void setGenId(G4PrimaryParticle *p, int id) const
Definition: Generator.h:40
Generator::theMinPCut
double theMinPCut
Definition: Generator.h:52
Generator::fLumiFilter
LumiMonitorFilter * fLumiFilter
Definition: Generator.h:60
edm::ParameterSet
Definition: ParameterSet.h:47
Generator::pdgFilterSel
bool pdgFilterSel
Definition: Generator.h:66
LorentzVector.h
Generator::theMinPhiCut
double theMinPhiCut
Definition: Generator.h:48
Generator::Z_hector
double Z_hector
Definition: Generator.h:64
Generator::theDecRCut2
double theDecRCut2
Definition: Generator.h:55
Generator::fPhiCuts
bool fPhiCuts
Definition: Generator.h:46
Generator
Definition: Generator.h:19
GenParticleInfo
Definition: GenParticleInfo.h:6
GenParticle.GenParticle
GenParticle
Definition: GenParticle.py:18
HepMCParticle.h
math::XYZTLorentzVector
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
Generator::maxZCentralCMS
double maxZCentralCMS
Definition: Generator.h:58
Generator::vtx_
math::XYZTLorentzVector * vtx_
Definition: Generator.h:62
Generator::evt_
HepMC::GenEvent * evt_
Definition: Generator.h:61
LumiMonitorFilter
Definition: LumiMonitorFilter.h:6
Generator::HepMC2G4
void HepMC2G4(const HepMC::GenEvent *g, G4Event *e)
Definition: Generator.cc:112
Generator::Generator
Generator(const edm::ParameterSet &p)
Definition: Generator.cc:23
Generator::fPtransCut
bool fPtransCut
Definition: Generator.h:44
ParameterSet.h
Generator::verbose
int verbose
Definition: Generator.h:59
Generator::genEvent
virtual const HepMC::GenEvent * genEvent() const
Definition: Generator.h:30
Generator::theMinEtaCut
double theMinEtaCut
Definition: Generator.h:50
Generator::pdgFilter
std::vector< int > pdgFilter
Definition: Generator.h:65
g
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
Definition: Activities.doc:4
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37