CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_9/src/SimMuon/RPCDigitizer/src/RPCSimAverageNoiseEffCls.h

Go to the documentation of this file.
00001 #ifndef RPCDigitizer_RPCSimAverageNoiseEffCls_h
00002 #define RPCDigitizer_RPCSimAverageNoiseEffCls_h
00003 
00010 #include "SimMuon/RPCDigitizer/src/RPCSim.h"
00011 #include "SimMuon/RPCDigitizer/src/RPCSynchronizer.h"
00012 
00013 #include<cstring>
00014 #include<iostream>
00015 #include<fstream>
00016 #include<string>
00017 #include<vector>
00018 #include<stdlib.h>
00019 #include <FWCore/Framework/interface/EventSetup.h>
00020 #include "SimMuon/RPCDigitizer/src/RPCSimSetUp.h"
00021 
00022 class RPCGeometry;
00023 //class RPCSimSetUp;
00024 
00025 namespace CLHEP {
00026   class HepRandomEngine;
00027   class RandFlat;
00028   class RandPoisson;
00029 }
00030 
00031 class RPCSimAverageNoiseEffCls : public RPCSim
00032 {
00033  public:
00034   RPCSimAverageNoiseEffCls(const edm::ParameterSet& config);
00035   ~RPCSimAverageNoiseEffCls();
00036 
00037   void simulate(const RPCRoll* roll,
00038                 const edm::PSimHitContainer& rpcHits);
00039 
00040   void simulateNoise(const RPCRoll*);
00041 
00042   void setRandomEngine(CLHEP::HepRandomEngine& eng);
00043 
00044   int getClSize(float posX);
00045   int getClSize(uint32_t id,float posX);
00046 
00047  private:
00048   void init(){};
00049  private:
00050   double aveEff;
00051   double aveCls;
00052   double resRPC;
00053   double timOff;
00054   double dtimCs;
00055   double resEle;
00056   double sspeed;
00057   double lbGate;
00058   bool rpcdigiprint;
00059   
00060   int N_hits;
00061   int nbxing;
00062   double rate;
00063   double gate;
00064   double frate;
00065 
00066   std::map< int, std::vector<double> > clsMap;
00067   std::vector<double> sum_clsize;
00068   std::vector<double> clsForDetId;
00069   std::ifstream *infile;
00070  
00071   RPCSynchronizer* _rpcSync;
00072 
00073   //Defining the engines in the constructor and the method
00074   //CLHEP::HepRandomEngine* rndEngine;
00075   CLHEP::RandFlat* flatDistribution;
00076   //Adding a second flatDistribution, since it was redefined 
00077   //in a method with different interval
00078   CLHEP::RandFlat* flatDistribution2;
00079   CLHEP::RandPoissonQ *poissonDistribution_;
00080 
00081 };
00082 #endif