CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_4_5_patch3/src/SimMuon/RPCDigitizer/src/RPCSimAverageNoise.h

Go to the documentation of this file.
00001 #ifndef RPCDigitizer_RPCSimAverageNoise_h
00002 #define RPCDigitizer_RPCSimAverageNoise_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 
00021 
00022 class RPCGeometry;
00023 
00024 namespace CLHEP {
00025   class HepRandomEngine;
00026   class RandFlat;
00027   class RandPoissonQ;
00028 }
00029 
00030 class RPCSimAverageNoise : public RPCSim
00031 {
00032  public:
00033 
00034   RPCSimAverageNoise(const edm::ParameterSet& config);
00035   ~RPCSimAverageNoise();
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 
00046  private:
00047   void init(){};
00048  private:
00049   double aveEff;
00050   double aveCls;
00051   double resRPC;
00052   double timOff;
00053   double dtimCs;
00054   double resEle;
00055   double sspeed;
00056   double lbGate;
00057   bool rpcdigiprint;
00058   
00059   int N_hits;
00060   int nbxing;
00061   double rate;
00062   double gate;
00063   double frate;
00064 
00065   std::map< int, std::vector<double> > clsMap;
00066   std::vector<double> sum_clsize;
00067   std::ifstream *infile;
00068  
00069   RPCSynchronizer* _rpcSync;
00070   
00071   //Defining the engines in the constructor and the method
00072   //CLHEP::HepRandomEngine* rndEngine;
00073   CLHEP::RandFlat* flatDistribution;
00074   //Adding a second flatDistribution, since it was redefined 
00075   //in a method with different interval
00076   CLHEP::RandFlat* flatDistribution2;
00077   CLHEP::RandPoissonQ *poissonDistribution_;
00078 };
00079 #endif