#include <SimMuon/CSCDigitizer/src/CSCNeutronReader.h>
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 () |
Definition at line 6 of file CSCNeutronReader.h.
CSCNeutronReader::CSCNeutronReader | ( | const edm::ParameterSet & | pset | ) | [inline] |
virtual CSCNeutronReader::~CSCNeutronReader | ( | ) | [inline, virtual] |
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 }
Definition at line 57 of file CSCNeutronReader.cc.
Referenced by addHits().
00058 { 00059 return CSCDetId(globalDetId).chamberId().rawId(); 00060 }
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 }
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 }
Definition at line 44 of file CSCNeutronReader.cc.
00045 { 00046 return CSCDetId(globalDetId).layer(); 00047 }