CMS 3D CMS Logo

CSCNeutronReader Class Reference

#include <SimMuon/CSCDigitizer/src/CSCNeutronReader.h>

Inheritance diagram for CSCNeutronReader:

SubsystemNeutronReader

List of all members.

Public Member Functions

void addHits (std::map< int, edm::PSimHitContainer > &hitMap)
int chamberId (int globalDetId) const
int chamberType (int globalDetId) const
 CSCNeutronReader (const edm::ParameterSet &pset)
virtual int detId (int chamberIndex, int localDetId)
 detector-specific way to get the global detector ID, given the local one.
int localDetId (int globalDetId) const
virtual ~CSCNeutronReader ()


Detailed Description

Definition at line 6 of file CSCNeutronReader.h.


Constructor & Destructor Documentation

CSCNeutronReader::CSCNeutronReader ( const edm::ParameterSet pset  )  [inline]

Definition at line 9 of file CSCNeutronReader.h.

00010   : SubsystemNeutronReader(pset) {}

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

Definition at line 11 of file CSCNeutronReader.h.

00011 {}


Member Function Documentation

void CSCNeutronReader::addHits ( std::map< int, edm::PSimHitContainer > &  hitMap  ) 

Definition at line 7 of file CSCNeutronReader.cc.

References chamberId(), chamberType(), find(), and SubsystemNeutronReader::generateChamberNoise().

Referenced by CSCDigitizer::doAction().

00008 {
00009   std::vector<int> chambersDone;
00010 
00011   std::map<int, edm::PSimHitContainer> signalHits = hitMap;
00012   for(std::map<int, edm::PSimHitContainer>::const_iterator signalHitItr = signalHits.begin();
00013       signalHitItr != signalHits.end(); ++signalHitItr)
00014   {
00015     int chamberIndex = chamberId(signalHitItr->first);
00016 
00017     // see if this chamber has been done yet
00018     if(find(chambersDone.begin(), chambersDone.end(), chamberIndex) == chambersDone.end())
00019     {
00020       edm::PSimHitContainer neutronHits;
00021       generateChamberNoise(chamberType(chamberIndex), chamberIndex, neutronHits);
00022 
00023       // add these hits to the original map
00024       for(edm::PSimHitContainer::const_iterator neutronHitItr = neutronHits.begin();
00025           neutronHitItr != neutronHits.end(); ++neutronHitItr) 
00026       {
00027         uint32_t layerId = neutronHitItr->detUnitId();
00028         hitMap[layerId].push_back(*neutronHitItr);
00029       }
00030       // mark chamber as done
00031       chambersDone.push_back(chamberIndex);
00032     }
00033   }
00034 }

int CSCNeutronReader::chamberId ( int  globalDetId  )  const

Definition at line 57 of file CSCNeutronReader.cc.

Referenced by addHits().

00058 {
00059   return CSCDetId(globalDetId).chamberId().rawId();
00060 }

int CSCNeutronReader::chamberType ( int  globalDetId  )  const

Definition at line 50 of file CSCNeutronReader.cc.

References id, and CSCChamberSpecs::whatChamberType().

Referenced by addHits().

00051 {
00052   CSCDetId id(globalDetId);
00053   return CSCChamberSpecs::whatChamberType(id.station(), id.ring());
00054 }

int CSCNeutronReader::detId ( int  chamberIndex,
int  localDetId 
) [virtual]

detector-specific way to get the global detector ID, given the local one.

Implements SubsystemNeutronReader.

Definition at line 37 of file CSCNeutronReader.cc.

00038 {
00039   // add the layer bits
00040   return chamberIndex + localDetId;
00041 }

int CSCNeutronReader::localDetId ( int  globalDetId  )  const

Definition at line 44 of file CSCNeutronReader.cc.

00045 {
00046   return CSCDetId(globalDetId).layer();
00047 }


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:17:22 2009 for CMSSW by  doxygen 1.5.4