CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 {
21 public:
22  Generator(const edm::ParameterSet & p);
23  virtual ~Generator();
24 
25  void setGenEvent( const HepMC::GenEvent* inpevt )
26  { evt_ = (HepMC::GenEvent*)inpevt; return ; }
27  void HepMC2G4(const HepMC::GenEvent * g,G4Event * e);
28  void nonBeamEvent2G4(const HepMC::GenEvent * g,G4Event * e);
29  virtual const HepMC::GenEvent* genEvent() const { return evt_; }
30  virtual const math::XYZTLorentzVector* genVertex() const { return vtx_; }
31  virtual const double eventWeight() const { return weight_; }
32 
33 private:
34 
35  bool particlePassesPrimaryCuts(const G4ThreeVector& p) const;
36  void particleAssignDaughters(G4PrimaryParticle * p, HepMC::GenParticle * hp,
37  double length);
38  void setGenId(G4PrimaryParticle* p, int id) const
39  { p->SetUserInformation(new GenParticleInfo(id));}
40 
41 private:
42  bool fPCuts;
43  bool fPtransCut;
44  bool fEtaCuts;
45  bool fPhiCuts;
46  double theMinPhiCut;
47  double theMaxPhiCut;
48  double theMinEtaCut;
49  double theMaxEtaCut;
50  double theMinPCut;
51  double theMinPtCut2;
52  double theMaxPCut;
53  double theDecRCut2;
55  double theDecLenCut;
56  int verbose;
58  HepMC::GenEvent* evt_;
60  double weight_;
62  std::vector<int> pdgFilter;
64  bool fPDGFilter;
65 };
66 
67 #endif
double theDecRCut2
Definition: Generator.h:53
bool fPhiCuts
Definition: Generator.h:45
virtual const math::XYZTLorentzVector * genVertex() const
Definition: Generator.h:30
void setGenId(G4PrimaryParticle *p, int id) const
Definition: Generator.h:38
double theMinPtCut2
Definition: Generator.h:51
virtual const double eventWeight() const
Definition: Generator.h:31
virtual const HepMC::GenEvent * genEvent() const
Definition: Generator.h:29
double theEtaCutForHector
Definition: Generator.h:54
double Z_lmax
Definition: Generator.h:61
void HepMC2G4(const HepMC::GenEvent *g, G4Event *e)
Definition: Generator.cc:100
double theMaxPhiCut
Definition: Generator.h:47
Generator(const edm::ParameterSet &p)
Definition: Generator.cc:22
bool fPtransCut
Definition: Generator.h:43
double theDecLenCut
Definition: Generator.h:55
double theMinEtaCut
Definition: Generator.h:48
bool pdgFilterSel
Definition: Generator.h:63
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
void particleAssignDaughters(G4PrimaryParticle *p, HepMC::GenParticle *hp, double length)
Definition: Generator.cc:397
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
double theMinPCut
Definition: Generator.h:50
LumiMonitorFilter * fLumiFilter
Definition: Generator.h:57
susybsm::HSCParticleRefProd hp
Definition: classes.h:27
bool fPDGFilter
Definition: Generator.h:64
double theMinPhiCut
Definition: Generator.h:46
double weight_
Definition: Generator.h:60
double theMaxEtaCut
Definition: Generator.h:49
void setGenEvent(const HepMC::GenEvent *inpevt)
Definition: Generator.h:25
double theMaxPCut
Definition: Generator.h:52
math::XYZTLorentzVector * vtx_
Definition: Generator.h:59
HepMC::GenEvent * evt_
Definition: Generator.h:58
void nonBeamEvent2G4(const HepMC::GenEvent *g, G4Event *e)
Definition: Generator.cc:508
return(e1-e2)*(e1-e2)+dp *dp
double Z_lmin
Definition: Generator.h:61
int verbose
Definition: Generator.h:56
virtual ~Generator()
Definition: Generator.cc:95
bool particlePassesPrimaryCuts(const G4ThreeVector &p) const
Definition: Generator.cc:475
std::vector< int > pdgFilter
Definition: Generator.h:62
bool fEtaCuts
Definition: Generator.h:44
double Z_hector
Definition: Generator.h:61
bool fPCuts
Definition: Generator.h:42