00001 #ifndef CosMuoGenProducer_h 00002 #define CosMuoGenProducer_h 00003 // 00004 // CosmicMuonProducer by droll (01/FEB/2006) 00005 // 00006 #include "HepMC/GenEvent.h" 00007 00008 #include "FWCore/Framework/interface/one/EDProducer.h" 00009 #include "FWCore/Framework/interface/EventSetup.h" 00010 #include "FWCore/Framework/interface/Event.h" 00011 #include "FWCore/Framework/interface/Run.h" 00012 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00013 #include "FWCore/Utilities/interface/Exception.h" 00014 00015 #include "GeneratorInterface/CosmicMuonGenerator/interface/CosmicMuonGenerator.h" 00016 00017 namespace edm 00018 { 00019 class CosMuoGenProducer : public one::EDProducer<EndRunProducer> { 00020 public: 00021 CosMuoGenProducer(const ParameterSet& ); 00022 virtual ~CosMuoGenProducer(); 00023 00024 private: 00025 virtual void produce(Event & e, const EventSetup& es); 00026 00027 virtual void endRunProduce(Run & r, const EventSetup & es); 00028 00029 void clear(); 00030 // define the configurable generator parameters 00031 int32_t RanS; // seed of random number generator (from Framework) 00032 double MinP; // min. P [GeV] 00033 double MinP_CMS; // min. P at CMS surface [GeV]; default is MinP_CMS=MinP, thus no bias from access-shaft 00034 double MaxP; // max. P [GeV] 00035 double MinT; // min. theta [deg] 00036 double MaxT; // max. theta [deg] 00037 double MinPh; // min. phi [deg] 00038 double MaxPh; // max. phi [deg] 00039 double MinS; // min. t0 [ns] 00040 double MaxS; // max. t0 [ns] 00041 double ELSF; // scale factor for energy loss 00042 double RTarget; // Radius of target-cylinder which cosmics HAVE to hit [mm], default is CMS-dimensions 00043 double ZTarget; // z-length of target-cylinder which cosmics HAVE to hit [mm], default is CMS-dimensions 00044 double ZCTarget; // z-position of centre of target-cylinder which cosmics HAVE to hit [mm], default is Nominal Interaction Point 00045 bool TrackerOnly; //if set to "true" detector with tracker-only setup is used, so no material or B-field outside is considerd 00046 bool MultiMuon; //read in multi-muon events from file instead of generating single muon events 00047 std::string MultiMuonFileName; //file containing multi muon events, to be read in 00048 int32_t MultiMuonFileFirstEvent; 00049 int32_t MultiMuonNmin; 00050 bool TIFOnly_constant; //if set to "true" cosmics can also be generated below 2GeV with unphysical constant energy dependence 00051 bool TIFOnly_linear; //if set to "true" cosmics can also be generated below 2GeV with unphysical linear energy dependence 00052 bool MTCCHalf; //if set to "true" muons are sure to hit half of CMS important for MTCC, 00053 //still material and B-field of whole CMS is considered 00054 00055 //Plug position (default = on shaft) 00056 double PlugVtx; 00057 double PlugVtz; 00058 00059 //material densities in g/cm^3 00060 double VarRhoAir; 00061 double VarRhoWall; 00062 double VarRhoRock; 00063 double VarRhoClay; 00064 double VarRhoPlug; 00065 double ClayLayerWidth; //[mm] 00066 00067 00068 //For upgoing muon generation: Neutrino energy limits 00069 double MinEn; 00070 double MaxEn; 00071 double NuPrdAlt; 00072 00073 bool AllMu; //Accepting All Muons regardeless of direction 00074 00075 // external cross section and filter efficiency 00076 double extCrossSect; 00077 double extFilterEff; 00078 00079 CosmicMuonGenerator* CosMuoGen; 00080 // the event format itself 00081 HepMC::GenEvent* fEvt; 00082 bool cmVerbosity_; 00083 }; 00084 } 00085 00086 #endif