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 70 of file RPCSim.h.

Definition at line 34 of file RPCSim.h.

Definition at line 35 of file RPCSim.h.

Constructor & Destructor Documentation

virtual RPCSim::~RPCSim ( )
inlinevirtual

Definition at line 37 of file RPCSim.h.

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

Definition at line 5 of file RPCSim.cc.

6 {
7 
8 }

Member Function Documentation

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

creates links from Digi to SimTrack disabled for now

Definition at line 39 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().

39  {
40 
41  std::pair<unsigned int, int > digi(strip, bx);
42  std::pair<DetectorHitMap::iterator, DetectorHitMap::iterator> channelHitItr
43  = theDetectorHitMap.equal_range(digi);
44 
45  for( DetectorHitMap::iterator hitItr = channelHitItr.first;
46  hitItr != channelHitItr.second; ++hitItr){
47  const PSimHit * hit = (hitItr->second);
48 
49  if(hit != nullptr) {
51  hit->timeOfFlight(),hit->energyLoss(),hit->particleType(),
52  hit->detUnitId(), hit->trackId(), hit->eventId(), hit->processType() ) );
53 
54  }
55  }
56 }
void push_back(const T &t)
Definition: DetSet.h:68
LocalVector momentumAtEntry() const
The momentum of the track that produced the hit, at entry point.
Definition: PSimHit.h:47
DetectorHitMap theDetectorHitMap
Definition: RPCSim.h:72
float timeOfFlight() const
Definition: PSimHit.h:69
EncodedEventId eventId() const
Definition: PSimHit.h:105
unsigned short processType() const
Definition: PSimHit.h:118
float energyLoss() const
The energy deposit in the PSimHit, in ???.
Definition: PSimHit.h:75
int particleType() const
Definition: PSimHit.h:85
unsigned int trackId() const
Definition: PSimHit.h:102
Local3DPoint entryPoint() const
Entry point in the local Det frame.
Definition: PSimHit.h:35
RPCDigiSimLinks theRpcDigiSimLinks
Definition: RPCSim.h:74
unsigned int detUnitId() const
Definition: PSimHit.h:93
const DigiSimLinks& RPCSim::digiSimLinks ( ) const
inline

Definition at line 52 of file RPCSim.h.

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

Definition at line 11 of file RPCSim.cc.

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

Referenced by IRPCDigitizer::doAction(), and RPCDigitizer::doAction().

12 {
13  // theRpcDigiSimLinks.clear();
14 
15 // std::vector<std::pair<int,int> > vdigi;
16 // vdigi.clear();
17 
18  for (std::set< std::pair<int,int> >::iterator i=strips.begin();
19  i!=strips.end(); i++){
20  if(i->second != -999){
21  RPCDigi rpcDigi(i->first,i->second);
22 
23  //NCA
24  digis.insertDigi(RPCDetId(rollDetId),rpcDigi);
25  this->addLinks(i->first,i->second);
26  }
27  }
28  strips.clear();
29 
30  for (auto it: irpc_digis){
31  if(it.bx() != -999){
32  digis.insertDigi(RPCDetId(rollDetId),it);
33  this->addLinks(it.strip(),it.bx());
34  }
35  }
36  irpc_digis.clear();
37 }
std::set< std::pair< int, int > > strips
Definition: RPCSim.h:60
std::set< RPCDigi > irpc_digis
Definition: RPCSim.h:61
virtual void addLinks(unsigned int strip, int bx)
Definition: RPCSim.cc:39
RPCSimSetUp* RPCSim::getRPCSimSetUp ( )
inline
virtual void RPCSim::init ( )
protectedpure virtual
const RPCDigiSimLinks& RPCSim::rpcDigiSimLinks ( ) const
inline

Definition at line 53 of file RPCSim.h.

References init.

Referenced by IRPCDigitizer::doAction(), and RPCDigitizer::doAction().

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

Definition at line 48 of file RPCSim.h.

References GeneralSetup::setup().

Referenced by IRPCDigitizer::doAction(), and RPCDigitizer::doAction().

48 {theSimSetUp = setup;}
def setup(process, global_tag, zero_tesla=False)
Definition: GeneralSetup.py:1
RPCSimSetUp * theSimSetUp
Definition: RPCSim.h:78
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 73 of file RPCSim.h.

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

Definition at line 78 of file RPCSim.h.