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