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

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.

Definition at line 32 of file RPCSim.h.

Definition at line 33 of file RPCSim.h.

Constructor & Destructor Documentation

virtual RPCSim::~RPCSim ( )
inlinevirtual

Definition at line 35 of file RPCSim.h.

References HLT_2018_cff::fillDigis.

35 {};
RPCSim::RPCSim ( const edm::ParameterSet config)
protected

Definition at line 5 of file RPCSim.cc.

5 {}

Member Function Documentation

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 PSimHit::detUnitId(), PSimHit::energyLoss(), PSimHit::entryPoint(), PSimHit::eventId(), PSimHit::momentumAtEntry(), PSimHit::particleType(), PSimHit::processType(), edm::DetSet< T >::push_back(), theDetectorHitMap, theRpcDigiSimLinks, PSimHit::timeOfFlight(), and PSimHit::trackId().

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:67
LocalVector momentumAtEntry() const
The momentum of the track that produced the hit, at entry point.
Definition: PSimHit.h:55
DetectorHitMap theDetectorHitMap
Definition: RPCSim.h:68
float timeOfFlight() const
Definition: PSimHit.h:73
EncodedEventId eventId() const
Definition: PSimHit.h:108
unsigned short processType() const
Definition: PSimHit.h:120
float energyLoss() const
The energy deposit in the PSimHit, in ???.
Definition: PSimHit.h:79
int particleType() const
Definition: PSimHit.h:89
unsigned int trackId() const
Definition: PSimHit.h:106
Local3DPoint entryPoint() const
Entry point in the local Det frame.
Definition: PSimHit.h:43
RPCDigiSimLinks theRpcDigiSimLinks
Definition: RPCSim.h:70
unsigned int detUnitId() const
Definition: PSimHit.h:97
const DigiSimLinks& RPCSim::digiSimLinks ( ) const
inline

Definition at line 47 of file RPCSim.h.

47 { return theDigiSimLinks; }
DigiSimLinks theDigiSimLinks
Definition: RPCSim.h:69
void RPCSim::fillDigis ( int  rollDetId,
RPCDigiCollection digis 
)
virtual

Definition at line 7 of file RPCSim.cc.

References addLinks(), mps_fire::i, irpc_digis, 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
RPCSimSetUp* RPCSim::getRPCSimSetUp ( )
inline
virtual void RPCSim::init ( )
protectedpure virtual
const RPCDigiSimLinks& RPCSim::rpcDigiSimLinks ( ) const
inline

Definition at line 48 of file RPCSim.h.

References init.

48 { return theRpcDigiSimLinks; }
RPCDigiSimLinks theRpcDigiSimLinks
Definition: RPCSim.h:70
void RPCSim::setRPCSimSetUp ( RPCSimSetUp setup)
inline

Definition at line 43 of file RPCSim.h.

References singleTopDQM_cfi::setup.

43 { theSimSetUp = setup; }
RPCSimSetUp * theSimSetUp
Definition: RPCSim.h:74
virtual void RPCSim::simulate ( const RPCRoll roll,
const edm::PSimHitContainer rpcHits,
CLHEP::HepRandomEngine *   
)
pure virtual
virtual void RPCSim::simulateNoise ( const RPCRoll roll,
CLHEP::HepRandomEngine *   
)
pure virtual

Member Data Documentation

std::set<RPCDigi> RPCSim::irpc_digis
protected
std::set<std::pair<int, int> > RPCSim::strips
protected
DetectorHitMap RPCSim::theDetectorHitMap
protected
DigiSimLinks RPCSim::theDigiSimLinks
protected

Definition at line 69 of file RPCSim.h.

RPCDigiSimLinks RPCSim::theRpcDigiSimLinks
protected
RPCSimSetUp* RPCSim::theSimSetUp
protected

Definition at line 74 of file RPCSim.h.