CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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  class CosMuoGenProducer : public one::EDProducer<EndRunProducer, one::WatchLuminosityBlocks> {
22  public:
24  ~CosMuoGenProducer() override;
25 
26  private:
27  void beginLuminosityBlock(LuminosityBlock const&, EventSetup const&) override;
28  void endLuminosityBlock(LuminosityBlock const&, EventSetup const&) override {}
29 
30  void produce(Event& e, const EventSetup& es) override;
31 
32  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
50  ZCTarget; // z-position of centre of target-cylinder which cosmics HAVE to hit [mm], default is Nominal Interaction Point
51  bool TrackerOnly; //if set to "true" detector with tracker-only setup is used, so no material or B-field outside is considerd
52  bool MultiMuon; //read in multi-muon events from file instead of generating single muon events
53  std::string MultiMuonFileName; //file containing multi muon events, to be read in
55  int32_t MultiMuonNmin;
56  bool TIFOnly_constant; //if set to "true" cosmics can also be generated below 2GeV with unphysical constant energy dependence
57  bool TIFOnly_linear; //if set to "true" cosmics can also be generated below 2GeV with unphysical linear energy dependence
58  bool MTCCHalf; //if set to "true" muons are sure to hit half of CMS important for MTCC,
59  //still material and B-field of whole CMS is considered
60 
61  //Plug position (default = on shaft)
62  double PlugVtx;
63  double PlugVtz;
64 
65  //material densities in g/cm^3
66  double VarRhoAir;
67  double VarRhoWall;
68  double VarRhoRock;
69  double VarRhoClay;
70  double VarRhoPlug;
71  double ClayLayerWidth; //[mm]
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 
84  std::unique_ptr<CosmicMuonGenerator> CosMuoGen;
85  // the event format itself
87 
89  };
90 } // namespace edm
91 
92 #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
void endLuminosityBlock(LuminosityBlock const &, EventSetup const &) override
Definition: Run.h:45