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 {
32  public:
33 
36 
37  virtual ~RPCSim(){};
38 
39  virtual void simulate(const RPCRoll* roll,
40  const edm::PSimHitContainer& rpcHits,
41  CLHEP::HepRandomEngine*)=0;
42 
43  virtual void simulateNoise(const RPCRoll* roll,
44  CLHEP::HepRandomEngine*)=0;
45 
46  virtual void fillDigis(int rollDetId, RPCDigiCollection& digis);
47 
48  void setRPCSimSetUp(RPCSimSetUp* setup){theSimSetUp = setup;}
49 
50  RPCSimSetUp* getRPCSimSetUp(){ return theSimSetUp; }
51 
52  const DigiSimLinks & digiSimLinks() const {return theDigiSimLinks;}
53  const RPCDigiSimLinks & rpcDigiSimLinks() const {return theRpcDigiSimLinks;}
54 
55  protected:
57  virtual void init()=0;
58 
59  protected:
60  std::set< std::pair<int,int> > strips;
61  std::set<RPCDigi> irpc_digis;
62 
63  //--------NEW---------------------
64 
67  virtual void addLinks(unsigned int strip,int bx);
68 
69  // keeps track of which hits contribute to which channels
70  typedef std::multimap<std::pair<unsigned int,int>,const PSimHit*,std::less<std::pair<unsigned int, int> > > DetectorHitMap;
71 
72  DetectorHitMap theDetectorHitMap;
73  DigiSimLinks theDigiSimLinks;
74  RPCDigiSimLinks theRpcDigiSimLinks;
75  //--------------------------------
76 
77  protected:
79 };
80 #endif
const DigiSimLinks & digiSimLinks() const
Definition: RPCSim.h:52
const RPCDigiSimLinks & rpcDigiSimLinks() const
Definition: RPCSim.h:53
virtual ~RPCSim()
Definition: RPCSim.h:37
DetectorHitMap theDetectorHitMap
Definition: RPCSim.h:72
int init
Definition: HydjetWrapper.h:67
def setup(process, global_tag, zero_tesla=False)
Definition: GeneralSetup.py:2
RPCSimSetUp * getRPCSimSetUp()
Definition: RPCSim.h:50
RPCSimSetUp * theSimSetUp
Definition: RPCSim.h:78
DigiSimLinks theDigiSimLinks
Definition: RPCSim.h:73
Definition: config.py:1
std::multimap< std::pair< unsigned int, int >, const PSimHit *, std::less< std::pair< unsigned int, int > > > DetectorHitMap
Definition: RPCSim.h:70
std::set< std::pair< int, int > > strips
Definition: RPCSim.h:60
edm::DetSet< RPCDigiSimLink > RPCDigiSimLinks
Definition: RPCSim.h:35
Definition: RPCSim.h:30
void setRPCSimSetUp(RPCSimSetUp *setup)
Definition: RPCSim.h:48
std::set< RPCDigi > irpc_digis
Definition: RPCSim.h:61
std::vector< PSimHit > PSimHitContainer
edm::DetSet< StripDigiSimLink > DigiSimLinks
Definition: RPCSim.h:34
RPCDigiSimLinks theRpcDigiSimLinks
Definition: RPCSim.h:74