CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
RPCSim Class Referenceabstract

#include <RPCSim.h>

Inheritance diagram for RPCSim:
RPCSimAsymmetricCls RPCSimAverage RPCSimAverageNoise RPCSimAverageNoiseEff RPCSimAverageNoiseEffCls RPCSimModelTiming RPCSimParam RPCSimSimple RPCSimTriv

Public Types

typedef edm::DetSet< StripDigiSimLinkDigiSimLinks
 
typedef edm::DetSet< RPCDigiSimLinkRPCDigiSimLinks
 

Public Member Functions

const DigiSimLinksdigiSimLinks () const
 
virtual void fillDigis (int rollDetId, RPCDigiCollection &digis)
 
RPCSimSetUpgetRPCSimSetUp ()
 
const RPCDigiSimLinksrpcDigiSimLinks () const
 
void setRPCSimSetUp (RPCSimSetUp *setup)
 
virtual void simulate (const RPCRoll *roll, const edm::PSimHitContainer &rpcHits, CLHEP::HepRandomEngine *)=0
 
virtual void simulateNoise (const RPCRoll *roll, CLHEP::HepRandomEngine *)=0
 
virtual ~RPCSim ()
 

Protected Types

typedef std::multimap< std::pair< unsigned int, int >, const PSimHit *, std::less< std::pair< unsigned int, int > > > DetectorHitMap
 

Protected Member Functions

virtual void addLinks (unsigned int strip, int bx)
 
virtual void init ()=0
 
 RPCSim (const edm::ParameterSet &config)
 

Protected Attributes

std::set< RPCDigiirpc_digis
 
std::set< std::pair< int, int > > strips
 
DetectorHitMap theDetectorHitMap
 
DigiSimLinks theDigiSimLinks
 
RPCDigiSimLinks theRpcDigiSimLinks
 
RPCSimSetUptheSimSetUp
 

Detailed Description

Base Class for the RPC strip response simulation

Author
Marcello Maggi – INFN Bari

Definition at line 30 of file RPCSim.h.

Member Typedef Documentation

◆ DetectorHitMap

typedef std::multimap<std::pair<unsigned int, int>, const PSimHit*, std::less<std::pair<unsigned int, int> > > RPCSim::DetectorHitMap
protected

Definition at line 66 of file RPCSim.h.

◆ DigiSimLinks

Definition at line 32 of file RPCSim.h.

◆ RPCDigiSimLinks

Definition at line 33 of file RPCSim.h.

Constructor & Destructor Documentation

◆ ~RPCSim()

virtual RPCSim::~RPCSim ( )
inlinevirtual

Definition at line 35 of file RPCSim.h.

35 {}

◆ RPCSim()

RPCSim::RPCSim ( const edm::ParameterSet config)
protected

Definition at line 5 of file RPCSim.cc.

5 {}

Member Function Documentation

◆ addLinks()

void RPCSim::addLinks ( unsigned int  strip,
int  bx 
)
protectedvirtual

creates links from Digi to SimTrack disabled for now

Definition at line 33 of file RPCSim.cc.

References nano_mu_digi_cff::bx, edm::DetSet< T >::push_back(), nano_mu_digi_cff::strip, theDetectorHitMap, and theRpcDigiSimLinks.

Referenced by fillDigis().

33  {
34  std::pair<unsigned int, int> digi(strip, bx);
35  std::pair<DetectorHitMap::iterator, DetectorHitMap::iterator> channelHitItr = theDetectorHitMap.equal_range(digi);
36 
37  for (DetectorHitMap::iterator hitItr = channelHitItr.first; hitItr != channelHitItr.second; ++hitItr) {
38  const PSimHit* hit = (hitItr->second);
39 
40  if (hit != nullptr) {
42  hit->entryPoint(),
43  hit->momentumAtEntry(),
44  hit->timeOfFlight(),
45  hit->energyLoss(),
46  hit->particleType(),
47  hit->detUnitId(),
48  hit->trackId(),
49  hit->eventId(),
50  hit->processType()));
51  }
52  }
53 }
void push_back(const T &t)
Definition: DetSet.h:66
DetectorHitMap theDetectorHitMap
Definition: RPCSim.h:68
RPCDigiSimLinks theRpcDigiSimLinks
Definition: RPCSim.h:70

◆ digiSimLinks()

const DigiSimLinks& RPCSim::digiSimLinks ( ) const
inline

Definition at line 47 of file RPCSim.h.

References theDigiSimLinks.

47 { return theDigiSimLinks; }
DigiSimLinks theDigiSimLinks
Definition: RPCSim.h:69

◆ fillDigis()

void RPCSim::fillDigis ( int  rollDetId,
RPCDigiCollection digis 
)
virtual

Definition at line 7 of file RPCSim.cc.

References addLinks(), mps_fire::i, irpc_digis, ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, and strips.

7  {
8  // theRpcDigiSimLinks.clear();
9 
10  // std::vector<std::pair<int,int> > vdigi;
11  // vdigi.clear();
12 
13  for (std::set<std::pair<int, int> >::iterator i = strips.begin(); i != strips.end(); i++) {
14  if (i->second != -999) {
15  RPCDigi rpcDigi(i->first, i->second);
16 
17  //NCA
18  digis.insertDigi(RPCDetId(rollDetId), rpcDigi);
19  this->addLinks(i->first, i->second);
20  }
21  }
22  strips.clear();
23 
24  for (auto it : irpc_digis) {
25  if (it.bx() != -999) {
26  digis.insertDigi(RPCDetId(rollDetId), it);
27  this->addLinks(it.strip(), it.bx());
28  }
29  }
30  irpc_digis.clear();
31 }
std::set< std::pair< int, int > > strips
Definition: RPCSim.h:55
std::set< RPCDigi > irpc_digis
Definition: RPCSim.h:56
virtual void addLinks(unsigned int strip, int bx)
Definition: RPCSim.cc:33

◆ getRPCSimSetUp()

RPCSimSetUp* RPCSim::getRPCSimSetUp ( )
inline

◆ init()

virtual void RPCSim::init ( )
protectedpure virtual

◆ rpcDigiSimLinks()

const RPCDigiSimLinks& RPCSim::rpcDigiSimLinks ( ) const
inline

Definition at line 48 of file RPCSim.h.

References theRpcDigiSimLinks.

48 { return theRpcDigiSimLinks; }
RPCDigiSimLinks theRpcDigiSimLinks
Definition: RPCSim.h:70

◆ setRPCSimSetUp()

void RPCSim::setRPCSimSetUp ( RPCSimSetUp setup)
inline

Definition at line 43 of file RPCSim.h.

References singleTopDQM_cfi::setup, and theSimSetUp.

43 { theSimSetUp = setup; }
RPCSimSetUp * theSimSetUp
Definition: RPCSim.h:74

◆ simulate()

virtual void RPCSim::simulate ( const RPCRoll roll,
const edm::PSimHitContainer rpcHits,
CLHEP::HepRandomEngine *   
)
pure virtual

◆ simulateNoise()

virtual void RPCSim::simulateNoise ( const RPCRoll roll,
CLHEP::HepRandomEngine *   
)
pure virtual

Member Data Documentation

◆ irpc_digis

std::set<RPCDigi> RPCSim::irpc_digis
protected

◆ strips

std::set<std::pair<int, int> > RPCSim::strips
protected

◆ theDetectorHitMap

DetectorHitMap RPCSim::theDetectorHitMap
protected

◆ theDigiSimLinks

DigiSimLinks RPCSim::theDigiSimLinks
protected

Definition at line 69 of file RPCSim.h.

Referenced by digiSimLinks().

◆ theRpcDigiSimLinks

RPCDigiSimLinks RPCSim::theRpcDigiSimLinks
protected

◆ theSimSetUp

RPCSimSetUp* RPCSim::theSimSetUp
protected

Definition at line 74 of file RPCSim.h.

Referenced by getRPCSimSetUp(), and setRPCSimSetUp().