CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 RPCSimParam RPCSimSimple RPCSimTriv

Public Types

typedef edm::DetSet
< StripDigiSimLink
DigiSimLinks
 
typedef edm::DetSet
< RPCDigiSimLink
RPCDigiSimLinks
 

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< 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 69 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 }

Member Function Documentation

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

creates links from Digi to SimTrack disabled for now

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

28  {
29 
30  std::pair<unsigned int, int > digi(strip, bx);
31  std::pair<DetectorHitMap::iterator, DetectorHitMap::iterator> channelHitItr
32  = theDetectorHitMap.equal_range(digi);
33 
34  for( DetectorHitMap::iterator hitItr = channelHitItr.first;
35  hitItr != channelHitItr.second; ++hitItr){
36  const PSimHit * hit = (hitItr->second);
37 
38  if(hit != 0) {
40  hit->timeOfFlight(),hit->energyLoss(),hit->particleType(),
41  hit->detUnitId(), hit->trackId(), hit->eventId(), hit->processType() ) );
42 
43  }
44  }
45 }
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:71
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:73
unsigned int detUnitId() const
Definition: PSimHit.h:93
const DigiSimLinks& RPCSim::digiSimLinks ( ) const
inline

Definition at line 52 of file RPCSim.h.

References theDigiSimLinks.

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

Definition at line 10 of file RPCSim.cc.

References addLinks(), i, RPCDetId, and strips.

Referenced by RPCDigitizer::doAction().

11 {
12  // theRpcDigiSimLinks.clear();
13  std::vector<std::pair<int,int> > vdigi;
14  vdigi.clear();
15 
16  for (std::set< std::pair<int,int> >::iterator i=strips.begin();
17  i!=strips.end(); i++){
18  if(i->second != -999){
19  RPCDigi rpcDigi(i->first,i->second);
20  //NCA
21  digis.insertDigi(RPCDetId(rollDetId),rpcDigi);
22  this->addLinks(i->first,i->second);
23  }
24  }
25  strips.clear();
26 }
int i
Definition: DBlmapReader.cc:9
std::set< std::pair< int, int > > strips
Definition: RPCSim.h:60
virtual void addLinks(unsigned int strip, int bx)
Definition: RPCSim.cc:28
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 theRpcDigiSimLinks.

Referenced by RPCDigitizer::doAction().

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

Definition at line 48 of file RPCSim.h.

References HcalObjRepresent::setup(), and theSimSetUp.

Referenced by RPCDigitizer::doAction().

48 {theSimSetUp = setup;}
RPCSimSetUp * theSimSetUp
Definition: RPCSim.h:77
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
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< std::pair<int,int> > RPCSim::strips
protected
DetectorHitMap RPCSim::theDetectorHitMap
protected
DigiSimLinks RPCSim::theDigiSimLinks
protected

Definition at line 72 of file RPCSim.h.

Referenced by digiSimLinks().

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

Definition at line 77 of file RPCSim.h.

Referenced by getRPCSimSetUp(), and setRPCSimSetUp().