CMS 3D CMS Logo

CosMuoGenProducer.h
Go to the documentation of this file.
1 #ifndef CosMuoGenProducer_h
2 #define CosMuoGenProducer_h
3 //
4 // CosmicMuonProducer by droll (01/FEB/2006)
5 //
6 #include "HepMC/GenEvent.h"
7 
15 
17 
18 namespace edm
19 {
20  class CosMuoGenProducer : public one::EDProducer<EndRunProducer, one::WatchLuminosityBlocks> {
21  public:
23  virtual ~CosMuoGenProducer();
24 
25  private:
26 
27  virtual void beginLuminosityBlock(LuminosityBlock const&, EventSetup const&) override;
28  virtual void endLuminosityBlock(LuminosityBlock const&, EventSetup const&) override { }
29 
30  virtual void produce(Event & e, const EventSetup& es) override;
31 
32  virtual void endRunProduce(Run & r, const EventSetup & es) override;
33 
34  void clear();
35  // define the configurable generator parameters
36  int32_t RanS; // seed of random number generator (from Framework)
37  double MinP; // min. P [GeV]
38  double MinP_CMS; // min. P at CMS surface [GeV]; default is MinP_CMS=MinP, thus no bias from access-shaft
39  double MaxP; // max. P [GeV]
40  double MinT; // min. theta [deg]
41  double MaxT; // max. theta [deg]
42  double MinPh; // min. phi [deg]
43  double MaxPh; // max. phi [deg]
44  double MinS; // min. t0 [ns]
45  double MaxS; // max. t0 [ns]
46  double ELSF; // scale factor for energy loss
47  double RTarget; // Radius of target-cylinder which cosmics HAVE to hit [mm], default is CMS-dimensions
48  double ZTarget; // z-length of target-cylinder which cosmics HAVE to hit [mm], default is CMS-dimensions
49  double ZCTarget; // z-position of centre of target-cylinder which cosmics HAVE to hit [mm], default is Nominal Interaction Point
50  bool TrackerOnly; //if set to "true" detector with tracker-only setup is used, so no material or B-field outside is considerd
51  bool MultiMuon; //read in multi-muon events from file instead of generating single muon events
52  std::string MultiMuonFileName; //file containing multi muon events, to be read in
54  int32_t MultiMuonNmin;
55  bool TIFOnly_constant; //if set to "true" cosmics can also be generated below 2GeV with unphysical constant energy dependence
56  bool TIFOnly_linear; //if set to "true" cosmics can also be generated below 2GeV with unphysical linear energy dependence
57  bool MTCCHalf; //if set to "true" muons are sure to hit half of CMS important for MTCC,
58  //still material and B-field of whole CMS is considered
59 
60  //Plug position (default = on shaft)
61  double PlugVtx;
62  double PlugVtz;
63 
64  //material densities in g/cm^3
65  double VarRhoAir;
66  double VarRhoWall;
67  double VarRhoRock;
68  double VarRhoClay;
69  double VarRhoPlug;
70  double ClayLayerWidth; //[mm]
71 
72 
73  //For upgoing muon generation: Neutrino energy limits
74  double MinEn;
75  double MaxEn;
76  double NuPrdAlt;
77 
78  bool AllMu; //Accepting All Muons regardeless of direction
79 
80  // external cross section and filter efficiency
81  double extCrossSect;
82  double extFilterEff;
83 
85  // the event format itself
86  HepMC::GenEvent* fEvt;
88 
90  };
91 }
92 
93 #endif
virtual void endRunProduce(Run &r, const EventSetup &es) override
CosMuoGenProducer(const ParameterSet &)
virtual void endLuminosityBlock(LuminosityBlock const &, EventSetup const &) override
virtual void produce(Event &e, const EventSetup &es) override
virtual void beginLuminosityBlock(LuminosityBlock const &, EventSetup const &) override
CosmicMuonGenerator * CosMuoGen
HLT enums.
HepMC::GenEvent * fEvt
Definition: Run.h:42