CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
RPCSimTriv Class Reference

#include <RPCSimTriv.h>

Inheritance diagram for RPCSimTriv:
RPCSim

Public Member Functions

 RPCSimTriv (const edm::ParameterSet &config)
 
void simulate (const RPCRoll *roll, const edm::PSimHitContainer &rpcHits, CLHEP::HepRandomEngine *) override
 
void simulateNoise (const RPCRoll *, CLHEP::HepRandomEngine *) override
 
 ~RPCSimTriv () override
 
- Public Member Functions inherited from RPCSim
const DigiSimLinksdigiSimLinks () const
 
virtual void fillDigis (int rollDetId, RPCDigiCollection &digis)
 
RPCSimSetUpgetRPCSimSetUp ()
 
const RPCDigiSimLinksrpcDigiSimLinks () const
 
void setRPCSimSetUp (RPCSimSetUp *setup)
 
virtual ~RPCSim ()
 

Private Member Functions

void init () override
 

Private Attributes

RPCSynchronizer_rpcSync
 
double gate
 
int N_hits
 
int nbxing
 
double rate
 

Additional Inherited Members

- Public Types inherited from RPCSim
typedef edm::DetSet< StripDigiSimLinkDigiSimLinks
 
typedef edm::DetSet< RPCDigiSimLinkRPCDigiSimLinks
 
- Protected Types inherited from RPCSim
typedef std::multimap< std::pair< unsigned int, int >, const PSimHit *, std::less< std::pair< unsigned int, int > > > DetectorHitMap
 
- Protected Member Functions inherited from RPCSim
virtual void addLinks (unsigned int strip, int bx)
 
 RPCSim (const edm::ParameterSet &config)
 
- Protected Attributes inherited from RPCSim
std::set< RPCDigiirpc_digis
 
std::set< std::pair< int, int > > strips
 
DetectorHitMap theDetectorHitMap
 
DigiSimLinks theDigiSimLinks
 
RPCDigiSimLinks theRpcDigiSimLinks
 
RPCSimSetUptheSimSetUp
 

Detailed Description

Class for the RPC strip response simulation based on a very simple model

Author
Marcello Maggi – INFN Bari

Definition at line 19 of file RPCSimTriv.h.

Constructor & Destructor Documentation

◆ RPCSimTriv()

RPCSimTriv::RPCSimTriv ( const edm::ParameterSet config)

Definition at line 13 of file RPCSimTriv.cc.

References _rpcSync, gate, nbxing, and rate.

13  : RPCSim(config) {
14  rate = config.getParameter<double>("Rate");
15  nbxing = config.getParameter<int>("Nbxing");
16  gate = config.getParameter<double>("Gate");
17 
19 }
Definition: config.py:1
RPCSim(const edm::ParameterSet &config)
Definition: RPCSim.cc:5
double gate
Definition: RPCSimTriv.h:36
RPCSynchronizer * _rpcSync
Definition: RPCSimTriv.h:29
int nbxing
Definition: RPCSimTriv.h:34
double rate
Definition: RPCSimTriv.h:35

◆ ~RPCSimTriv()

RPCSimTriv::~RPCSimTriv ( )
override

Definition at line 21 of file RPCSimTriv.cc.

References _rpcSync.

21 { delete _rpcSync; }
RPCSynchronizer * _rpcSync
Definition: RPCSimTriv.h:29

Member Function Documentation

◆ init()

void RPCSimTriv::init ( void  )
inlineoverrideprivatevirtual

Implements RPCSim.

Definition at line 29 of file RPCSimTriv.h.

29 {};

◆ simulate()

void RPCSimTriv::simulate ( const RPCRoll roll,
const edm::PSimHitContainer rpcHits,
CLHEP::HepRandomEngine *   
)
overridevirtual

Implements RPCSim.

Definition at line 23 of file RPCSimTriv.cc.

References edm::DetSet< T >::clear(), RPCRoll::id(), DetId::rawId(), RPCRoll::specs(), RPCSim::strips, RPCSim::theDetectorHitMap, RPCSim::theRpcDigiSimLinks, and RPCRollSpecs::topology().

23  {
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 }
DetectorHitMap theDetectorHitMap
Definition: RPCSim.h:68
const RPCRollSpecs * specs() const
Definition: RPCRoll.cc:14
edm::DetSet< RPCDigiSimLink > RPCDigiSimLinks
Definition: RPCSim.h:33
std::set< std::pair< int, int > > strips
Definition: RPCSim.h:55
const Topology & topology() const override
Definition: RPCRollSpecs.cc:36
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
RPCDetId id() const
Definition: RPCRoll.cc:16
void clear()
Definition: DetSet.h:71
RPCDigiSimLinks theRpcDigiSimLinks
Definition: RPCSim.h:70

◆ simulateNoise()

void RPCSimTriv::simulateNoise ( const RPCRoll roll,
CLHEP::HepRandomEngine *   
)
overridevirtual

Implements RPCSim.

Definition at line 46 of file RPCSimTriv.cc.

46  {
47  // plase keep it empty for this model
48  return;
49 }

Member Data Documentation

◆ _rpcSync

RPCSynchronizer* RPCSimTriv::_rpcSync
private

Definition at line 29 of file RPCSimTriv.h.

Referenced by RPCSimTriv(), and ~RPCSimTriv().

◆ gate

double RPCSimTriv::gate
private

Definition at line 36 of file RPCSimTriv.h.

Referenced by RPCSimTriv().

◆ N_hits

int RPCSimTriv::N_hits
private

Definition at line 33 of file RPCSimTriv.h.

◆ nbxing

int RPCSimTriv::nbxing
private

Definition at line 34 of file RPCSimTriv.h.

Referenced by RPCSimTriv().

◆ rate

double RPCSimTriv::rate
private

Definition at line 35 of file RPCSimTriv.h.

Referenced by RPCSimTriv().