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