CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RPCSimTriv.cc
Go to the documentation of this file.
8 
9 #include <cmath>
10 #include <utility>
11 #include <map>
12 
14 
15  rate=config.getParameter<double>("Rate");
16  nbxing=config.getParameter<int>("Nbxing");
17  gate=config.getParameter<double>("Gate");
18 
19  _rpcSync = new RPCSynchronizer(config);
20 }
21 
23  delete _rpcSync;
24 }
25 
26 void
28  const edm::PSimHitContainer& rpcHits,
29  CLHEP::HepRandomEngine*)
30 {
31 
32  //_rpcSync->setRPCSimSetUp(getRPCSimSetUp());
34  theDetectorHitMap.clear();
36 
37  const Topology& topology=roll->specs()->topology();
38  for (edm::PSimHitContainer::const_iterator _hit = rpcHits.begin();
39  _hit != rpcHits.end(); ++_hit){
40 
41  int type = _hit->particleType();
42  if (type == 13 || type == -13){
43  // Here I hould check if the RPC are up side down;
44  const LocalPoint& entr=_hit->entryPoint();
45  //int time_hit = _rpcSync->getSimHitBx(&(*_hit));
46  // please keep hit time always 0 for this model
47  int time_hit = 0;
48  std::pair<int, int> digi(topology.channel(entr)+1,
49  time_hit);
50 
51  theDetectorHitMap.insert(DetectorHitMap::value_type(digi,&(*_hit)));
52  strips.insert(digi);
53  }
54  }
55 }
56 
57 
59  CLHEP::HepRandomEngine*)
60 {
61  // plase keep it empty for this model
62  return;
63 }
type
Definition: HCALResponse.h:21
T getParameter(std::string const &) const
CaloTopology const * topology(0)
RPCSimTriv(const edm::ParameterSet &config)
Definition: RPCSimTriv.cc:13
DetectorHitMap theDetectorHitMap
Definition: RPCSim.h:72
const RPCRollSpecs * specs() const
Definition: RPCRoll.cc:18
std::set< std::pair< int, int > > strips
Definition: RPCSim.h:60
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
edm::DetSet< RPCDigiSimLink > RPCDigiSimLinks
Definition: RPCSim.h:35
RPCDetId id() const
Definition: RPCRoll.cc:24
Definition: RPCSim.h:30
void simulate(const RPCRoll *roll, const edm::PSimHitContainer &rpcHits, CLHEP::HepRandomEngine *) override
Definition: RPCSimTriv.cc:27
double gate
Definition: RPCSimTriv.h:40
RPCSynchronizer * _rpcSync
Definition: RPCSimTriv.h:33
void simulateNoise(const RPCRoll *, CLHEP::HepRandomEngine *) override
Definition: RPCSimTriv.cc:58
int nbxing
Definition: RPCSimTriv.h:38
void clear()
Definition: DetSet.h:69
std::vector< PSimHit > PSimHitContainer
double rate
Definition: RPCSimTriv.h:39
RPCDigiSimLinks theRpcDigiSimLinks
Definition: RPCSim.h:74
const Topology & topology() const
Definition: RPCRollSpecs.cc:43