File indexing completed on 2024-09-10 02:59:12
0001 #ifndef RPCDigitizer_RPCSimAverageNoiseEffCls_h
0002 #define RPCDigitizer_RPCSimAverageNoiseEffCls_h
0003
0004
0005
0006
0007
0008
0009
0010 #include "SimMuon/RPCDigitizer/src/RPCSim.h"
0011 #include "SimMuon/RPCDigitizer/src/RPCSynchronizer.h"
0012
0013 #include <cstring>
0014 #include <iostream>
0015 #include <fstream>
0016 #include <string>
0017 #include <vector>
0018 #include <cstdlib>
0019 #include "FWCore/Framework/interface/EventSetup.h"
0020 #include "SimMuon/RPCDigitizer/src/RPCSimSetUp.h"
0021
0022 class RPCGeometry;
0023
0024
0025 namespace CLHEP {
0026 class HepRandomEngine;
0027 }
0028
0029 class RPCSimAverageNoiseEffCls : public RPCSim {
0030 public:
0031 RPCSimAverageNoiseEffCls(const edm::ParameterSet& config);
0032 ~RPCSimAverageNoiseEffCls() override;
0033
0034 void simulate(const RPCRoll* roll, const edm::PSimHitContainer& rpcHits, CLHEP::HepRandomEngine*) override;
0035
0036 void simulateNoise(const RPCRoll*, CLHEP::HepRandomEngine*) override;
0037
0038 int getClSize(float posX, CLHEP::HepRandomEngine*);
0039 int getClSize(uint32_t id, float posX, CLHEP::HepRandomEngine*);
0040
0041
0042 protected:
0043 void init() override {}
0044
0045 double aveEff;
0046 double aveCls;
0047 double resRPC;
0048 double timOff;
0049 double dtimCs;
0050 double resEle;
0051 double sspeed;
0052 double lbGate;
0053 bool rpcdigiprint;
0054 bool eledig;
0055
0056 int N_hits;
0057 int nbxing;
0058 double rate;
0059 double gate;
0060 double frate;
0061
0062 std::map<int, std::vector<double> > clsMap;
0063 std::vector<double> sum_clsize;
0064 std::vector<double> clsForDetId;
0065 std::ifstream* infile;
0066
0067 RPCSynchronizer* _rpcSync;
0068 };
0069 #endif