#include <PSimHit.h>
Public Member Functions | |
unsigned int | detUnitId () const |
float | energyLoss () const |
The energy deposit in the PSimHit, in ???. | |
Local3DPoint | entryPoint () const |
Entry point in the local Det frame. | |
EncodedEventId | eventId () const |
Local3DPoint | exitPoint () const |
Exit point in the local Det frame. | |
LocalVector | localDirection () const |
Obsolete. Same as momentumAtEntry().unit(), for backward compatibility. | |
Local3DPoint | localPosition () const |
LocalVector | momentumAtEntry () const |
The momentum of the track that produced the hit, at entry point. | |
float | pabs () const |
fast and more accurate access to momentumAtEntry().mag() | |
int | particleType () const |
Geom::Phi< float > | phiAtEntry () const |
fast and more accurate access to momentumAtEntry().phi() | |
unsigned short | processType () const |
PSimHit () | |
PSimHit (const Local3DPoint &entry, const Local3DPoint &exit, float pabs, float tof, float eloss, int particleType, unsigned int detId, unsigned int trackId, float theta, float phi, unsigned short processType=0) | |
void | setEventId (EncodedEventId e) |
void | setTof (float tof) |
Geom::Theta< float > | thetaAtEntry () const |
fast and more accurate access to momentumAtEntry().theta() | |
float | timeOfFlight () const |
float | tof () const |
deprecated name for timeOfFlight() | |
unsigned int | trackId () const |
Protected Attributes | |
unsigned int | theDetUnitId |
float | theEnergyLoss |
Local3DPoint | theEntryPoint |
EncodedEventId | theEventId |
float | thePabs |
int | theParticleType |
float | thePhiAtEntry |
unsigned short | theProcessType |
Local3DVector | theSegment |
float | theThetaAtEntry |
float | theTof |
unsigned int | theTrackId |
Friends | |
class | TrackingSlaveSD |
Persistent-capable SimHit. Suitable for tracking detectors.
PSimHit::PSimHit | ( | ) | [inline] |
Definition at line 18 of file PSimHit.h.
: theDetUnitId(0) {}
PSimHit::PSimHit | ( | const Local3DPoint & | entry, |
const Local3DPoint & | exit, | ||
float | pabs, | ||
float | tof, | ||
float | eloss, | ||
int | particleType, | ||
unsigned int | detId, | ||
unsigned int | trackId, | ||
float | theta, | ||
float | phi, | ||
unsigned short | processType = 0 |
||
) | [inline] |
Definition at line 20 of file PSimHit.h.
: theEntryPoint( entry), theSegment(exit-entry), thePabs(pabs), theEnergyLoss(eloss), theThetaAtEntry(theta), thePhiAtEntry(phi), theTof(tof), theParticleType(particleType), theProcessType(processType), theDetUnitId( detId), theTrackId( trackId) {}
unsigned int PSimHit::detUnitId | ( | ) | const [inline] |
The DetUnit identifier, to be interpreted in the context of the detector system that produced the hit. E.g. in the Tracker this is index used with DetUnitNumbering<TrackerSimHitTag>. Currently the context is not deducible from the PSimHit and must be known when the PSimHit is created/accessed.
Definition at line 93 of file PSimHit.h.
References theDetUnitId.
Referenced by RPCSim::addLinks(), SubsystemNeutronWriter::adjust(), CkfDebugger::analyseCompatibleMeasurements(), CkfDebugger::analyseRecHitExistance(), CSCSegmentValidation::analyze(), FWPSimHitProxyBuilder::build(), FWTrackingParticleProxyBuilder::build(), MuonIdTruthInfo::checkSimHitForBestMatch(), PLTSensitiveDetector::createHit(), TkAccumulatingSensitiveDetector::createHit(), ChargeDividerFP420::DeconvolutionShape(), CkfDebugger::det(), CkfDebugger::SimHit::detUnitId(), DTHitQualityUtils::findMuSimSegmentDirAndPos(), SiTrackerGaussianSmearingRecHitConverter::gaussianSmearing(), SubsystemNeutronReader::generateChamberNoise(), HitInfo::getInfo(), RPCSynchronizer::getSimHitBx(), CkfDebugger::hasDelta(), CkfDebugger::nextCorrectHits(), MuonTrackResidualAnalyzer::RadiusComparatorInOut::operator()(), operator<<(), ChargeDividerFP420::PeakShape(), CkfDebugger::position(), cms::DigitizerFP420::produce(), ShallowSimhitClustersProducer::produce(), FP420DigiMain::run(), MuonSensitiveDetector::saveHit(), TkAccumulatingSensitiveDetector::sendHit(), PLTSensitiveDetector::sendHit(), TrackingTruthProducer::setTrackingParticle(), DTHitAssociator::SimHitOK(), FormatEndcapHits::sortId(), FormatRpcHits::sortId(), FormatBarrelHits::sortId(), PLTSensitiveDetector::updateHit(), TkAccumulatingSensitiveDetector::updateHit(), AsciiNeutronWriter::writeCluster(), and SubsystemNeutronWriter::writeHits().
{return theDetUnitId;}
float PSimHit::energyLoss | ( | ) | const [inline] |
The energy deposit in the PSimHit, in ???.
Definition at line 75 of file PSimHit.h.
References theEnergyLoss.
Referenced by RPCSim::addLinks(), SubsystemNeutronWriter::adjust(), PLTSensitiveDetector::createHit(), TkAccumulatingSensitiveDetector::createHit(), SiLinearChargeDivider::DeconvolutionShape(), ChargeDividerFP420::DeconvolutionShape(), SiLinearChargeDivider::divide(), ChargeDividerFP420::divide(), DTDigitizer::dumpHit(), CkfDebugger::SimHit::energyLoss(), SubsystemNeutronReader::generateChamberNoise(), ChargeDividerFP420::PeakShape(), SiLinearChargeDivider::PeakShape(), SiPixelDigitizerAlgorithm::primary_ionization(), ShallowSimhitClustersProducer::produce(), FP420DigiMain::run(), TkAccumulatingSensitiveDetector::sendHit(), PLTSensitiveDetector::sendHit(), ChargeDividerFP420::TimeResponse(), MuonSensitiveDetector::updateHit(), PLTSensitiveDetector::updateHit(), TkAccumulatingSensitiveDetector::updateHit(), and AsciiNeutronWriter::writeCluster().
{return theEnergyLoss;}
Local3DPoint PSimHit::entryPoint | ( | ) | const [inline] |
Entry point in the local Det frame.
Definition at line 35 of file PSimHit.h.
References theEntryPoint.
Referenced by RPCSim::addLinks(), SubsystemNeutronWriter::adjust(), MuonIdTruthInfo::checkSimHitForBestMatch(), DTDigitizer::computeTime(), PLTSensitiveDetector::createHit(), TkAccumulatingSensitiveDetector::createHit(), SiLinearChargeDivider::divide(), ChargeDividerFP420::divide(), DTDigitizer::dumpHit(), SiPixelRecHitsValid::fillBarrel(), SiPixelRecHitsValid::fillForward(), SubsystemNeutronReader::generateChamberNoise(), CSCWireHitSim::getIonizationClusters(), operator<<(), SiPixelDigitizerAlgorithm::primary_ionization(), HitDigitizerFP420::processHit(), FP420DigiMain::run(), MuonSensitiveDetector::saveHit(), TkAccumulatingSensitiveDetector::sendHit(), PLTSensitiveDetector::sendHit(), DTRecHitQuality::simHitDistFromFE(), GlobalRecHitsProducer::simHitDistFromWire(), DTRecHitQuality::simHitDistFromWire(), GlobalRecHitsAnalyzer::simHitDistFromWire(), DTRecHitQuality::simHitImpactAngle(), DTHitAssociator::SimHitOK(), CSCGasCollisions::simulate(), MuonSensitiveDetector::updateHit(), PLTSensitiveDetector::updateHit(), TkAccumulatingSensitiveDetector::updateHit(), and AsciiNeutronWriter::writeCluster().
{return theEntryPoint;}
EncodedEventId PSimHit::eventId | ( | ) | const [inline] |
Definition at line 105 of file PSimHit.h.
References theEventId.
Referenced by CSCBaseElectronicsSim::addLinks(), RPCSim::addLinks(), DTHitAssociator::associateDTHitId(), TrackerHitAssociator::associateHit(), and DTHitAssociator::DTHitAssociator().
{return theEventId;}
Local3DPoint PSimHit::exitPoint | ( | ) | const [inline] |
Exit point in the local Det frame.
Definition at line 38 of file PSimHit.h.
References theEntryPoint, and theSegment.
Referenced by SubsystemNeutronWriter::adjust(), MuonIdTruthInfo::checkSimHitForBestMatch(), TkAccumulatingSensitiveDetector::closeHit(), PLTSensitiveDetector::closeHit(), DTDigitizer::computeTime(), PLTSensitiveDetector::createHit(), TkAccumulatingSensitiveDetector::createHit(), SiLinearChargeDivider::divide(), ChargeDividerFP420::divide(), DTDigitizer::dumpHit(), SiPixelRecHitsValid::fillBarrel(), SiPixelRecHitsValid::fillForward(), SubsystemNeutronReader::generateChamberNoise(), CSCWireHitSim::getIonizationClusters(), SiPixelDigitizerAlgorithm::primary_ionization(), HitDigitizerFP420::processHit(), FP420DigiMain::run(), MuonSensitiveDetector::saveHit(), TkAccumulatingSensitiveDetector::sendHit(), PLTSensitiveDetector::sendHit(), DTRecHitQuality::simHitDistFromFE(), DTRecHitQuality::simHitDistFromWire(), GlobalRecHitsProducer::simHitDistFromWire(), GlobalRecHitsAnalyzer::simHitDistFromWire(), DTRecHitQuality::simHitImpactAngle(), DTHitAssociator::SimHitOK(), CSCGasCollisions::simulate(), PLTSensitiveDetector::updateHit(), TkAccumulatingSensitiveDetector::updateHit(), and AsciiNeutronWriter::writeCluster().
{return theEntryPoint + theSegment;}
LocalVector PSimHit::localDirection | ( | ) | const [inline] |
Obsolete. Same as momentumAtEntry().unit(), for backward compatibility.
Definition at line 52 of file PSimHit.h.
References f, phiAtEntry(), and thetaAtEntry().
Referenced by DTDigitizer::computeTime(), CkfDebugger::SimHit::localDirection(), CSCSegmentValidation::plotResolution(), TestSmoothHits::projectHit(), GlobalRecHitsProducer::projectHit(), TestHits::projectHit(), TestTrackHits::projectHit(), GlobalRecHitsAnalyzer::projectHit(), SiStripRecHitsValid::projectHit(), SiStripTrackingRecHitsValid::projectHit(), and SiPixelGaussianSmearingRecHitConverterAlgorithm::smearHit().
{ return LocalVector( thetaAtEntry(), phiAtEntry(), 1.f); }
Local3DPoint PSimHit::localPosition | ( | ) | const [inline] |
Local position in the Det frame. Normally it is on the detection surface, but this is not checked. It is computed as the middle point between entry and exit.
Definition at line 44 of file PSimHit.h.
References theEntryPoint, and theSegment.
Referenced by CkfDebugger::analyseCompatibleMeasurements(), TestHits::analyze(), SiStripRecHitsValid::analyze(), TestTrackHits::analyze(), TestSmoothHits::analyze(), SiStripTrackingRecHitsValid::analyze(), FWPSimHitProxyBuilder::build(), FWTrackingParticleProxyBuilder::build(), DTRecHitQuality::compute(), DTDigitizer::computeTime(), SiLinearChargeDivider::DeconvolutionShape(), SiLinearChargeDivider::divide(), DTDigitizer::externalDelays(), DTHitQualityUtils::findMuSimSegmentDirAndPos(), SiTrackerGaussianSmearingRecHitConverter::gaussianSmearing(), RPCSynchronizer::getSimHitBx(), TrackAssociatorByPosition::getState(), CkfDebugger::SimHit::globalPosition(), CkfDebugger::SimHit::localPosition(), FTSFromSimHitFactory::operator()(), MuonTrackResidualAnalyzer::RadiusComparatorInOut::operator()(), SiLinearChargeDivider::PeakShape(), CSCRecHit2DValidation::plotResolution(), CSCSegmentValidation::plotResolution(), GlobalRecHitsAnalyzer::plotResolution(), GlobalRecHitsProducer::plotResolution(), CSCStripDigiValidation::plotResolution(), CSCWireDigiValidation::plotResolution(), CkfDebugger::position(), ShallowSimhitClustersProducer::produce(), TestSmoothHits::projectHit(), GlobalRecHitsProducer::projectHit(), TestHits::projectHit(), TestTrackHits::projectHit(), GlobalRecHitsAnalyzer::projectHit(), SiStripRecHitsValid::projectHit(), SiStripTrackingRecHitsValid::projectHit(), DTHitAssociator::SimHitOK(), SiStripGaussianSmearingRecHitConverterAlgorithm::smearHit(), SiPixelGaussianSmearingRecHitConverterAlgorithm::smearHit(), and CkfDebugger::testSeed().
{return theEntryPoint + 0.5*theSegment;}
LocalVector PSimHit::momentumAtEntry | ( | ) | const [inline] |
The momentum of the track that produced the hit, at entry point.
Definition at line 47 of file PSimHit.h.
References pabs(), phiAtEntry(), and thetaAtEntry().
Referenced by RPCSim::addLinks(), SubsystemNeutronWriter::adjust(), TestHits::analyze(), TestTrackHits::analyze(), TestSmoothHits::analyze(), FWTrackingParticleProxyBuilder::build(), DTDigitizer::computeTime(), DTDigitizer::dumpHit(), TrackAssociatorByPosition::getState(), FTSFromSimHitFactory::operator()(), SiPixelGaussianSmearingRecHitConverterAlgorithm::smearHit(), CkfDebugger::testSeed(), and AsciiNeutronWriter::writeCluster().
{ return LocalVector( thetaAtEntry(), phiAtEntry(), pabs()); }
float PSimHit::pabs | ( | ) | const [inline] |
fast and more accurate access to momentumAtEntry().mag()
Definition at line 63 of file PSimHit.h.
References thePabs.
Referenced by SubsystemNeutronWriter::adjust(), CkfDebugger::associated(), DTDigitizer::computeTime(), SiLinearChargeDivider::divide(), ChargeDividerFP420::divide(), DTDigitizer::dumpHit(), SubsystemNeutronReader::generateChamberNoise(), CSCWireHitSim::getIonizationClusters(), CkfDebugger::goodSimHit(), momentumAtEntry(), sortByPabs::operator()(), CkfDebugger::SimHit::pabs(), SiPixelDigitizerAlgorithm::primary_ionization(), ShallowSimhitClustersProducer::produce(), FP420DigiMain::run(), TkAccumulatingSensitiveDetector::sendHit(), CSCSegmentValidationUtils::SimHitPabsLessThan(), CSCGasCollisions::simulate(), AsciiNeutronWriter::writeCluster(), and SubsystemNeutronWriter::writeHits().
{return thePabs;}
int PSimHit::particleType | ( | ) | const [inline] |
The particle type of the track that produced this hit, in standard PDG code. NB: This differs from ORCA5 and earlier, where the code was Geant3. The particle type of the hit may differ from the particle type of the SimTrack with id trackId(). This happends if the hit was created by a secondary track (e.g. a delta ray) originating from the trackId() and not existing as a separate SimTrack.
Definition at line 85 of file PSimHit.h.
References theParticleType.
Referenced by RPCSim::addLinks(), SubsystemNeutronWriter::adjust(), DTDigitizer::computeTime(), SiLinearChargeDivider::divide(), ChargeDividerFP420::divide(), DTHitAssociator::DTHitAssociator(), DTDigitizer::dumpHit(), SubsystemNeutronReader::generateChamberNoise(), HitInfo::getInfo(), CSCWireHitSim::getIonizationClusters(), TrackAssociatorByPosition::getState(), FTSFromSimHitFactory::operator()(), CkfDebugger::SimHit::particleType(), SiPixelDigitizerAlgorithm::primary_ionization(), ShallowSimhitClustersProducer::produce(), FP420DigiMain::run(), TrackingTruthProducer::setTrackingParticle(), CSCGasCollisions::simulate(), AsciiNeutronWriter::writeCluster(), and SubsystemNeutronWriter::writeHits().
{return theParticleType;}
Geom::Phi<float> PSimHit::phiAtEntry | ( | ) | const [inline] |
fast and more accurate access to momentumAtEntry().phi()
Definition at line 60 of file PSimHit.h.
References thePhiAtEntry.
Referenced by SubsystemNeutronReader::generateChamberNoise(), localDirection(), momentumAtEntry(), CkfDebugger::SimHit::phiAtEntry(), and ShallowSimhitClustersProducer::produce().
{ return Geom::Phi<float>(thePhiAtEntry);}
unsigned short PSimHit::processType | ( | ) | const [inline] |
The ID of the physics process that created the track that produced the hit. This is useful for identifying hits from secondary interactions, especially in the case when the track that produced the hit was not saved as a SimTrack. The meaning of the ID is defined outside of the PSimHit; The only value with special significance is zero (for "undefined"), so zero should not be the ID of any process.
Definition at line 118 of file PSimHit.h.
References theProcessType.
Referenced by RPCSim::addLinks(), CkfDebugger::analyseCompatibleMeasurements(), TestHits::analyze(), TestTrackHits::analyze(), TestOutliers::analyze(), TestSmoothHits::analyze(), DTHitAssociator::DTHitAssociator(), DTDigitizer::dumpHit(), SubsystemNeutronReader::generateChamberNoise(), CkfDebugger::SimHit::processType(), ShallowSimhitClustersProducer::produce(), and TrackingTruthProducer::setTrackingParticle().
{return theProcessType;}
void PSimHit::setEventId | ( | EncodedEventId | e | ) | [inline] |
void PSimHit::setTof | ( | float | tof | ) | [inline] |
Geom::Theta<float> PSimHit::thetaAtEntry | ( | ) | const [inline] |
fast and more accurate access to momentumAtEntry().theta()
Definition at line 57 of file PSimHit.h.
References theThetaAtEntry.
Referenced by SubsystemNeutronReader::generateChamberNoise(), localDirection(), momentumAtEntry(), ShallowSimhitClustersProducer::produce(), and CkfDebugger::SimHit::thetaAtEntry().
{ return Geom::Theta<float>(theThetaAtEntry);}
float PSimHit::timeOfFlight | ( | ) | const [inline] |
Time of flight in nanoseconds from the primary interaction to the entry point. Always positive in a PSimHit, but may become negative in a SimHit due to bunch assignment.
Definition at line 69 of file PSimHit.h.
References tof().
Referenced by RPCSim::addLinks(), SubsystemNeutronWriter::adjust(), CkfDebugger::associated(), RPCSynchronizer::getSimHitBx(), CkfDebugger::nextCorrectHits(), less_mag::operator()(), ShallowSimhitClustersProducer::produce(), TkAccumulatingSensitiveDetector::sendHit(), CkfDebugger::SimHit::timeOfFlight(), and AsciiNeutronWriter::writeCluster().
{return tof();}
float PSimHit::tof | ( | ) | const [inline] |
deprecated name for timeOfFlight()
Definition at line 72 of file PSimHit.h.
References theTof.
Referenced by SiLinearChargeDivider::DeconvolutionShape(), ChargeDividerFP420::DeconvolutionShape(), SiPixelDigitizerAlgorithm::drift(), DTDigitizer::externalDelays(), SubsystemNeutronReader::generateChamberNoise(), CSCDriftSim::getWireHit(), sortByTof::operator()(), SortByTime::operator()(), operator<<(), ChargeDividerFP420::PeakShape(), SiLinearChargeDivider::PeakShape(), FP420DigiMain::run(), setTof(), timeOfFlight(), and SubsystemNeutronWriter::writeHits().
{return theTof;}
unsigned int PSimHit::trackId | ( | ) | const [inline] |
The SimTrack ID of the "mother" track. This may be the actual charged track that produced the hit, or a "mother" of this track, in case the track that produced the hit was not saved as a SimTrack. This ID must be interpreted in the context of the SimEvent to which the PSimHit belongs.
Definition at line 102 of file PSimHit.h.
References theTrackId.
Referenced by RPCSim::addLinks(), SubsystemNeutronWriter::adjust(), CkfDebugger::analyseRecHitExistance(), DTHitAssociator::associateDTHitId(), TrackerHitAssociator::associateHit(), FWTrackingParticleProxyBuilder::build(), CkfDebugger::correctMeas(), PLTSensitiveDetector::createHit(), TkAccumulatingSensitiveDetector::createHit(), DTHitAssociator::DTHitAssociator(), DTDigitizer::dumpHit(), SubsystemNeutronReader::generateChamberNoise(), FP420DigiMain::run(), TkAccumulatingSensitiveDetector::sendHit(), PLTSensitiveDetector::sendHit(), CkfDebugger::SimHit::trackId(), PLTSensitiveDetector::updateHit(), TkAccumulatingSensitiveDetector::updateHit(), and AsciiNeutronWriter::writeCluster().
{return theTrackId;}
friend class TrackingSlaveSD [friend] |
unsigned int PSimHit::theDetUnitId [protected] |
Definition at line 139 of file PSimHit.h.
Referenced by detUnitId().
float PSimHit::theEnergyLoss [protected] |
Definition at line 129 of file PSimHit.h.
Referenced by UpdatablePSimHit::addEnergyLoss(), energyLoss(), and UpdatablePSimHit::setEnergyLoss().
Local3DPoint PSimHit::theEntryPoint [protected] |
Definition at line 126 of file PSimHit.h.
Referenced by entryPoint(), exitPoint(), localPosition(), UpdatablePSimHit::setEntryPoint(), and UpdatablePSimHit::updateExitPoint().
EncodedEventId PSimHit::theEventId [protected] |
Definition at line 141 of file PSimHit.h.
Referenced by eventId(), and setEventId().
float PSimHit::thePabs [protected] |
int PSimHit::theParticleType [protected] |
Definition at line 134 of file PSimHit.h.
Referenced by particleType().
float PSimHit::thePhiAtEntry [protected] |
Definition at line 131 of file PSimHit.h.
Referenced by phiAtEntry().
unsigned short PSimHit::theProcessType [protected] |
Definition at line 135 of file PSimHit.h.
Referenced by processType().
Local3DVector PSimHit::theSegment [protected] |
Definition at line 127 of file PSimHit.h.
Referenced by exitPoint(), localPosition(), UpdatablePSimHit::setEntryPoint(), and UpdatablePSimHit::updateExitPoint().
float PSimHit::theThetaAtEntry [protected] |
Definition at line 130 of file PSimHit.h.
Referenced by thetaAtEntry().
float PSimHit::theTof [protected] |
unsigned int PSimHit::theTrackId [protected] |
Definition at line 140 of file PSimHit.h.
Referenced by UpdatablePSimHit::setTrackId(), TrackingSlaveSD::setTrackId(), and trackId().