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 
5 
8 
9 #include "HepMC/GenEvent.h"
10 #include "HepMC/GenParticle.h"
11 
13 
14 #include <vector>
15 #include <map>
16 #include <string>
17 
18 class G4Event;
19 class G4PrimaryParticle;
20 
21 class Generator
22 {
23 public:
24  Generator(const edm::ParameterSet & p);
25  virtual ~Generator();
26  // temp.(?) method
27  void setGenEvent( const HepMC::GenEvent* inpevt ) { evt_ = (HepMC::GenEvent*)inpevt; return ; }
28  void HepMC2G4(const HepMC::GenEvent * g,G4Event * e);
29  void nonBeamEvent2G4(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 private:
34  bool particlePassesPrimaryCuts(const G4PrimaryParticle * p) const;
35  bool particlePassesPrimaryCuts( const math::XYZTLorentzVector& mom, const double zimp ) const ;
36  void particleAssignDaughters(G4PrimaryParticle * p, HepMC::GenParticle * hp, double length);
37  void setGenId(G4PrimaryParticle* p, int id) const
38  {p->SetUserInformation(new GenParticleInfo(id));}
39 
40 private:
41  bool fPCuts;
42  bool fEtaCuts;
43  bool fPhiCuts;
44  double theMinPhiCut;
45  double theMaxPhiCut;
46  double theMinEtaCut;
47  double theMaxEtaCut;
48  double theMinPCut;
49  double theMaxPCut;
50  double theRDecLenCut;
52  int verbose;
53  HepMC::GenEvent* evt_;
55  double weight_;
57 };
58 
59 #endif
bool fPhiCuts
Definition: Generator.h:43
virtual const math::XYZTLorentzVector * genVertex() const
Definition: Generator.h:31
void setGenId(G4PrimaryParticle *p, int id) const
Definition: Generator.h:37
virtual const double eventWeight() const
Definition: Generator.h:32
virtual const HepMC::GenEvent * genEvent() const
Definition: Generator.h:30
double theEtaCutForHector
Definition: Generator.h:51
double Z_lmax
Definition: Generator.h:56
void HepMC2G4(const HepMC::GenEvent *g, G4Event *e)
Definition: Generator.cc:58
double theMaxPhiCut
Definition: Generator.h:45
Generator(const edm::ParameterSet &p)
Definition: Generator.cc:22
double theMinEtaCut
Definition: Generator.h:46
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:266
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:30
double theMinPCut
Definition: Generator.h:48
double theMinPhiCut
Definition: Generator.h:44
double weight_
Definition: Generator.h:55
double theMaxEtaCut
Definition: Generator.h:47
void setGenEvent(const HepMC::GenEvent *inpevt)
Definition: Generator.h:27
double theRDecLenCut
Definition: Generator.h:50
double theMaxPCut
Definition: Generator.h:49
math::XYZTLorentzVector * vtx_
Definition: Generator.h:54
HepMC::GenEvent * evt_
Definition: Generator.h:53
void nonBeamEvent2G4(const HepMC::GenEvent *g, G4Event *e)
Definition: Generator.cc:368
double Z_lmin
Definition: Generator.h:56
int verbose
Definition: Generator.h:52
virtual ~Generator()
Definition: Generator.cc:54
bool particlePassesPrimaryCuts(const G4PrimaryParticle *p) const
Definition: Generator.cc:344
bool fEtaCuts
Definition: Generator.h:42
double Z_hector
Definition: Generator.h:56
bool fPCuts
Definition: Generator.h:41