CMS 3D CMS Logo

RPCSim.h
Go to the documentation of this file.
1 #ifndef RPCDigitizer_RPCSim_h
2 #define RPCDigitizer_RPCSim_h
3 
13 
14 #include <map>
15 #include <set>
16 
20 
21 class RPCRoll;
22 class RPCGeometry;
23 class RPCSimSetUp;
24 class PSimHit;
25 
26 namespace CLHEP {
27  class HepRandomEngine;
28 }
29 
30 class RPCSim {
31 public:
34 
35  virtual ~RPCSim(){};
36 
37  virtual void simulate(const RPCRoll* roll, const edm::PSimHitContainer& rpcHits, CLHEP::HepRandomEngine*) = 0;
38 
39  virtual void simulateNoise(const RPCRoll* roll, CLHEP::HepRandomEngine*) = 0;
40 
41  virtual void fillDigis(int rollDetId, RPCDigiCollection& digis);
42 
43  void setRPCSimSetUp(RPCSimSetUp* setup) { theSimSetUp = setup; }
44 
45  RPCSimSetUp* getRPCSimSetUp() { return theSimSetUp; }
46 
47  const DigiSimLinks& digiSimLinks() const { return theDigiSimLinks; }
48  const RPCDigiSimLinks& rpcDigiSimLinks() const { return theRpcDigiSimLinks; }
49 
50 protected:
52  virtual void init() = 0;
53 
54 protected:
55  std::set<std::pair<int, int> > strips;
56  std::set<RPCDigi> irpc_digis;
57 
58  //--------NEW---------------------
59 
62  virtual void addLinks(unsigned int strip, int bx);
63 
64  // keeps track of which hits contribute to which channels
65  typedef std::multimap<std::pair<unsigned int, int>, const PSimHit*, std::less<std::pair<unsigned int, int> > >
67 
69  DigiSimLinks theDigiSimLinks;
70  RPCDigiSimLinks theRpcDigiSimLinks;
71  //--------------------------------
72 
73 protected:
75 };
76 #endif
const DigiSimLinks & digiSimLinks() const
Definition: RPCSim.h:47
const RPCDigiSimLinks & rpcDigiSimLinks() const
Definition: RPCSim.h:48
virtual ~RPCSim()
Definition: RPCSim.h:35
std::multimap< std::pair< unsigned int, int >, const PSimHit *, std::less< std::pair< unsigned int, int > > > DetectorHitMap
Definition: RPCSim.h:66
DetectorHitMap theDetectorHitMap
Definition: RPCSim.h:68
int init
Definition: HydjetWrapper.h:64
RPCSimSetUp * getRPCSimSetUp()
Definition: RPCSim.h:45
RPCSimSetUp * theSimSetUp
Definition: RPCSim.h:74
DigiSimLinks theDigiSimLinks
Definition: RPCSim.h:69
Definition: config.py:1
edm::DetSet< RPCDigiSimLink > RPCDigiSimLinks
Definition: RPCSim.h:33
std::set< std::pair< int, int > > strips
Definition: RPCSim.h:55
Definition: RPCSim.h:30
void setRPCSimSetUp(RPCSimSetUp *setup)
Definition: RPCSim.h:43
std::set< RPCDigi > irpc_digis
Definition: RPCSim.h:56
std::vector< PSimHit > PSimHitContainer
edm::DetSet< StripDigiSimLink > DigiSimLinks
Definition: RPCSim.h:32
RPCDigiSimLinks theRpcDigiSimLinks
Definition: RPCSim.h:70