CMS 3D CMS Logo

RPCSimTriv.cc
Go to the documentation of this file.
8 
9 #include <cmath>
10 #include <utility>
11 #include <map>
12 
14  rate = config.getParameter<double>("Rate");
15  nbxing = config.getParameter<int>("Nbxing");
16  gate = config.getParameter<double>("Gate");
17 
19 }
20 
22 
23 void RPCSimTriv::simulate(const RPCRoll* roll, const edm::PSimHitContainer& rpcHits, CLHEP::HepRandomEngine*) {
24  //_rpcSync->setRPCSimSetUp(getRPCSimSetUp());
26  theDetectorHitMap.clear();
27  theRpcDigiSimLinks = RPCDigiSimLinks(roll->id().rawId());
28 
29  const Topology& topology = roll->specs()->topology();
30  for (edm::PSimHitContainer::const_iterator _hit = rpcHits.begin(); _hit != rpcHits.end(); ++_hit) {
31  int type = _hit->particleType();
32  if (type == 13 || type == -13) {
33  // Here I hould check if the RPC are up side down;
34  const LocalPoint& entr = _hit->entryPoint();
35  //int time_hit = _rpcSync->getSimHitBx(&(*_hit));
36  // please keep hit time always 0 for this model
37  int time_hit = 0;
38  std::pair<int, int> digi(topology.channel(entr) + 1, time_hit);
39 
40  theDetectorHitMap.insert(DetectorHitMap::value_type(digi, &(*_hit)));
41  strips.insert(digi);
42  }
43  }
44 }
45 
46 void RPCSimTriv::simulateNoise(const RPCRoll* roll, CLHEP::HepRandomEngine*) {
47  // plase keep it empty for this model
48  return;
49 }
RPCSimTriv(const edm::ParameterSet &config)
Definition: RPCSimTriv.cc:13
DetectorHitMap theDetectorHitMap
Definition: RPCSim.h:68
Definition: config.py:1
edm::DetSet< RPCDigiSimLink > RPCDigiSimLinks
Definition: RPCSim.h:33
std::set< std::pair< int, int > > strips
Definition: RPCSim.h:55
~RPCSimTriv() override
Definition: RPCSimTriv.cc:21
Definition: RPCSim.h:30
void simulate(const RPCRoll *roll, const edm::PSimHitContainer &rpcHits, CLHEP::HepRandomEngine *) override
Definition: RPCSimTriv.cc:23
double gate
Definition: RPCSimTriv.h:36
RPCSynchronizer * _rpcSync
Definition: RPCSimTriv.h:29
void simulateNoise(const RPCRoll *, CLHEP::HepRandomEngine *) override
Definition: RPCSimTriv.cc:46
int nbxing
Definition: RPCSimTriv.h:34
void clear()
Definition: DetSet.h:71
std::vector< PSimHit > PSimHitContainer
double rate
Definition: RPCSimTriv.h:35
RPCDigiSimLinks theRpcDigiSimLinks
Definition: RPCSim.h:70