CMS 3D CMS Logo

Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes

RPCSim Class Reference

#include <RPCSim.h>

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

List of all members.

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
virtual void setRandomEngine (CLHEP::HepRandomEngine &eng)=0
void setRPCSimSetUp (RPCSimSetUp *setup)
virtual void simulate (const RPCRoll *roll, const edm::PSimHitContainer &rpcHits)=0
virtual void simulateNoise (const RPCRoll *roll)=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 27 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 31 of file RPCSim.h.

Definition at line 32 of file RPCSim.h.


Constructor & Destructor Documentation

virtual RPCSim::~RPCSim ( ) [inline, virtual]

Definition at line 34 of file RPCSim.h.

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

Definition at line 5 of file RPCSim.cc.

{
}

Member Function Documentation

void RPCSim::addLinks ( unsigned int  strip,
int  bx 
) [protected, virtual]

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().

                                                {

  std::pair<unsigned int, int > digi(strip, bx);
  std::pair<DetectorHitMap::iterator, DetectorHitMap::iterator> channelHitItr 
     = theDetectorHitMap.equal_range(digi);

  for( DetectorHitMap::iterator hitItr = channelHitItr.first; 
                                hitItr != channelHitItr.second; ++hitItr){
    const PSimHit * hit = (hitItr->second);

    if(hit != 0) {
      theRpcDigiSimLinks.push_back( RPCDigiSimLink(digi, hit->entryPoint(),hit->momentumAtEntry(),
                                                   hit->timeOfFlight(),hit->energyLoss(),hit->particleType(), 
                                                   hit->detUnitId(), hit->trackId(), hit->eventId(), hit->processType() ) );

    }
  }
}
const DigiSimLinks& RPCSim::digiSimLinks ( ) const [inline]

Definition at line 49 of file RPCSim.h.

References theDigiSimLinks.

{return theDigiSimLinks;}
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().

{
  //  theRpcDigiSimLinks.clear();
  std::vector<std::pair<int,int> > vdigi;
  vdigi.clear();

  for (std::set< std::pair<int,int> >::iterator i=strips.begin();
       i!=strips.end(); i++){
    if(i->second != -999){
      RPCDigi rpcDigi(i->first,i->second);
      //NCA
      digis.insertDigi(RPCDetId(rollDetId),rpcDigi);
      this->addLinks(i->first,i->second);
    }
  }
  strips.clear();
}
RPCSimSetUp* RPCSim::getRPCSimSetUp ( ) [inline]
virtual void RPCSim::init ( ) [protected, pure virtual]
const RPCDigiSimLinks& RPCSim::rpcDigiSimLinks ( ) const [inline]

Definition at line 50 of file RPCSim.h.

References theRpcDigiSimLinks.

Referenced by RPCDigitizer::doAction().

virtual void RPCSim::setRandomEngine ( CLHEP::HepRandomEngine &  eng) [pure virtual]
void RPCSim::setRPCSimSetUp ( RPCSimSetUp setup) [inline]

Definition at line 45 of file RPCSim.h.

References theSimSetUp.

Referenced by RPCDigitizer::doAction().

{theSimSetUp = setup;}
virtual void RPCSim::simulate ( const RPCRoll roll,
const edm::PSimHitContainer rpcHits 
) [pure virtual]
virtual void RPCSim::simulateNoise ( const RPCRoll roll) [pure virtual]

Member Data Documentation

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

Definition at line 69 of file RPCSim.h.

Referenced by digiSimLinks().

Definition at line 74 of file RPCSim.h.

Referenced by getRPCSimSetUp(), and setRPCSimSetUp().