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();
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 }
RPCRoll
Definition: RPCRoll.h:12
edm::DetSet::clear
void clear()
Definition: DetSet.h:71
RPCSynchronizer
Definition: RPCSynchronizer.h:36
RPCRoll.h
RPCSimTriv::gate
double gate
Definition: RPCSimTriv.h:36
RPCSimTriv::nbxing
int nbxing
Definition: RPCSimTriv.h:34
RPCSim::strips
std::set< std::pair< int, int > > strips
Definition: RPCSim.h:55
RectangularStripTopology.h
config
Definition: config.py:1
RPCRoll::id
RPCDetId id() const
Definition: RPCRoll.cc:16
RPCSim::theDetectorHitMap
DetectorHitMap theDetectorHitMap
Definition: RPCSim.h:68
RPCSimTriv::_rpcSync
RPCSynchronizer * _rpcSync
Definition: RPCSimTriv.h:29
RPCSimTriv::simulateNoise
void simulateNoise(const RPCRoll *, CLHEP::HepRandomEngine *) override
Definition: RPCSimTriv.cc:46
RPCSim::theRpcDigiSimLinks
RPCDigiSimLinks theRpcDigiSimLinks
Definition: RPCSim.h:70
RPCRollSpecs::topology
const Topology & topology() const override
Definition: RPCRollSpecs.cc:36
RPCSimTriv::rate
double rate
Definition: RPCSimTriv.h:35
Point3DBase< float, LocalTag >
RPCRollSpecs.h
edm::ParameterSet
Definition: ParameterSet.h:47
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
RPCSimTriv.h
reco::JetExtendedAssociation::value_type
Container::value_type value_type
Definition: JetExtendedAssociation.h:30
RPCSim
Definition: RPCSim.h:30
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
TrapezoidalStripTopology.h
RPCSimTriv::RPCSimTriv
RPCSimTriv(const edm::ParameterSet &config)
Definition: RPCSimTriv.cc:13
RPCRoll::specs
const RPCRollSpecs * specs() const
Definition: RPCRoll.cc:14
RPCSimSetUp.h
Topology
Definition: Topology.h:39
edm::PSimHitContainer
std::vector< PSimHit > PSimHitContainer
Definition: PSimHitContainer.h:11
RPCSim::RPCDigiSimLinks
edm::DetSet< RPCDigiSimLink > RPCDigiSimLinks
Definition: RPCSim.h:33
RPCSimTriv::~RPCSimTriv
~RPCSimTriv() override
Definition: RPCSimTriv.cc:21
RPCGeometry.h
RPCSimTriv::simulate
void simulate(const RPCRoll *roll, const edm::PSimHitContainer &rpcHits, CLHEP::HepRandomEngine *) override
Definition: RPCSimTriv.cc:23