CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Attributes | Friends
PSimHit Class Reference

#include <PSimHit.h>

Inheritance diagram for PSimHit:
UpdatablePSimHit

Public Member Functions

unsigned int detUnitId () const
 
float energyLoss () const
 The energy deposit in the PSimHit, in ???. More...
 
Local3DPoint entryPoint () const
 Entry point in the local Det frame. More...
 
EncodedEventId eventId () const
 
Local3DPoint exitPoint () const
 Exit point in the local Det frame. More...
 
LocalVector localDirection () const
 Obsolete. Same as momentumAtEntry().unit(), for backward compatibility. More...
 
Local3DPoint localPosition () const
 
LocalVector momentumAtEntry () const
 The momentum of the track that produced the hit, at entry point. More...
 
float pabs () const
 fast and more accurate access to momentumAtEntry().mag() More...
 
int particleType () const
 
Geom::Phi< float > phiAtEntry () const
 fast and more accurate access to momentumAtEntry().phi() More...
 
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() More...
 
float timeOfFlight () const
 
float tof () const
 deprecated name for timeOfFlight() More...
 
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
 

Detailed Description

Persistent-capable SimHit. Suitable for tracking detectors.

Definition at line 15 of file PSimHit.h.

Constructor & Destructor Documentation

PSimHit::PSimHit ( )
inline

Definition at line 18 of file PSimHit.h.

18 : theDetUnitId(0) {}
unsigned int theDetUnitId
Definition: PSimHit.h:139
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.

23  :
24  theEntryPoint( entry),
25  theSegment(exit-entry),
26  thePabs(pabs),
27  theEnergyLoss(eloss),
29  theTof(tof),
31  theDetUnitId( detId), theTrackId( trackId)
32 {}
float thePabs
Definition: PSimHit.h:128
float tof() const
deprecated name for timeOfFlight()
Definition: PSimHit.h:72
unsigned int theTrackId
Definition: PSimHit.h:140
Local3DPoint theEntryPoint
Definition: PSimHit.h:126
unsigned int theDetUnitId
Definition: PSimHit.h:139
Geom::Theta< T > theta() const
float theTof
Definition: PSimHit.h:133
float thePhiAtEntry
Definition: PSimHit.h:131
unsigned short theProcessType
Definition: PSimHit.h:135
float theEnergyLoss
Definition: PSimHit.h:129
float pabs() const
fast and more accurate access to momentumAtEntry().mag()
Definition: PSimHit.h:63
Local3DVector theSegment
Definition: PSimHit.h:127
int theParticleType
Definition: PSimHit.h:134
unsigned short processType() const
Definition: PSimHit.h:118
float theThetaAtEntry
Definition: PSimHit.h:130
int particleType() const
Definition: PSimHit.h:85
unsigned int trackId() const
Definition: PSimHit.h:102

Member Function Documentation

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(), GEMDigiModel::addLinksWithPartId(), ME0DigiModel::addLinksWithPartId(), SubsystemNeutronWriter::adjust(), CkfDebugger::analyseCompatibleMeasurements(), CkfDebugger::analyseRecHitExistance(), CSCSegmentValidation::analyze(), SiPixelPhase1TrackingParticleV::analyze(), TrackerHitAssociator::associateHit(), FWTrackingParticleProxyBuilderFullFramework::build(), FWPSimHitProxyBuilder::buildViewType(), TrackingParticleNumberOfLayers::calculate(), MuonIdTruthInfo::checkSimHitForBestMatch(), MuonTrackResidualAnalyzer::computeResolution(), TkAccumulatingSensitiveDetector::createHit(), ChargeDividerFP420::DeconvolutionShape(), CkfDebugger::det(), CkfDebugger::SimHit::detUnitId(), Phase2TrackerDigitizerAlgorithm::drift(), SiPixelDigitizerAlgorithm::drift(), SubsystemNeutronReader::generateChamberNoise(), HitInfo::getInfo(), GEMSimpleModel::getSimHitBx(), ME0SimpleModel::getSimHitBx(), RPCSynchronizer::getSimHitBx(), RPCSynchronizer::getSimHitBxAndTimingForIRPC(), CkfDebugger::hasDelta(), CkfDebugger::nextCorrectHits(), MuonTrackResidualAnalyzer::RadiusComparatorInOut::operator()(), operator<<(), ChargeDividerFP420::PeakShape(), CkfDebugger::position(), ShallowSimhitClustersProducer::produce(), cms::DigitizerFP420::produce(), TrackingRecHitProducer::produce(), CTPPSRecHitProducer::produce(), FP420DigiMain::run(), MuonSensitiveDetector::saveHit(), TkAccumulatingSensitiveDetector::sendHit(), DTHitAssociator::SimHitOK(), FormatBarrelHits::sortId(), FormatEndcapHits::sortId(), FormatRpcHits::sortId(), FormatGemHits::sortId(), FormatMe0Hits::sortId(), TkAccumulatingSensitiveDetector::updateHit(), AsciiNeutronWriter::writeCluster(), and SubsystemNeutronWriter::writeHits().

93 {return theDetUnitId;}
unsigned int theDetUnitId
Definition: PSimHit.h:139
float PSimHit::energyLoss ( ) const
inline
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(), GEMDigiModel::addLinksWithPartId(), ME0DigiModel::addLinksWithPartId(), SubsystemNeutronWriter::adjust(), SiPixelPhase1RecHitsV::analyze(), MuonIdTruthInfo::checkSimHitForBestMatch(), DTDigitizer::computeTime(), TkAccumulatingSensitiveDetector::createHit(), ChargeDividerFP420::divide(), SiLinearChargeDivider::divide(), DTDigitizer::dumpHit(), SiPixelRecHitsValid::fillBarrel(), SiPixelRecHitsValid::fillForward(), SubsystemNeutronReader::generateChamberNoise(), CSCWireHitSim::getIonizationClusters(), SiPixelDigitizerAlgorithm::hitSignalReweight(), PixelClusterShapeExtractor::isSuitable(), operator<<(), Phase2TrackerDigitizerAlgorithm::primary_ionization(), SiPixelDigitizerAlgorithm::primary_ionization(), HitDigitizerFP420::processHit(), PixelClusterShapeExtractor::processSim(), CTPPSRecHitProducer::produce(), FP420DigiMain::run(), MuonSensitiveDetector::saveHit(), TkAccumulatingSensitiveDetector::sendHit(), DTRecHitQuality::simHitDistFromFE(), DTRecHitQuality::simHitDistFromWire(), GlobalRecHitsAnalyzer::simHitDistFromWire(), GlobalRecHitsProducer::simHitDistFromWire(), DTRecHitQuality::simHitImpactAngle(), DTHitAssociator::SimHitOK(), CSCGasCollisions::simulate(), GEMSimpleModel::simulateClustering(), TkAccumulatingSensitiveDetector::updateHit(), AsciiNeutronWriter::writeCluster(), and CSCGasCollisions::writeSummary().

35 {return theEntryPoint;}
Local3DPoint theEntryPoint
Definition: PSimHit.h:126
EncodedEventId PSimHit::eventId ( ) const
inline
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(), SiPixelPhase1RecHitsV::analyze(), MuonIdTruthInfo::checkSimHitForBestMatch(), TkAccumulatingSensitiveDetector::closeHit(), DTDigitizer::computeTime(), TkAccumulatingSensitiveDetector::createHit(), ChargeDividerFP420::divide(), SiLinearChargeDivider::divide(), DTDigitizer::dumpHit(), SiPixelRecHitsValid::fillBarrel(), SiPixelRecHitsValid::fillForward(), SubsystemNeutronReader::generateChamberNoise(), CSCWireHitSim::getIonizationClusters(), SiPixelDigitizerAlgorithm::hitSignalReweight(), PixelClusterShapeExtractor::isSuitable(), Phase2TrackerDigitizerAlgorithm::primary_ionization(), SiPixelDigitizerAlgorithm::primary_ionization(), HitDigitizerFP420::processHit(), PixelClusterShapeExtractor::processSim(), FP420DigiMain::run(), MuonSensitiveDetector::saveHit(), TkAccumulatingSensitiveDetector::sendHit(), DTRecHitQuality::simHitDistFromFE(), DTRecHitQuality::simHitDistFromWire(), GlobalRecHitsAnalyzer::simHitDistFromWire(), GlobalRecHitsProducer::simHitDistFromWire(), DTRecHitQuality::simHitImpactAngle(), DTHitAssociator::SimHitOK(), CSCGasCollisions::simulate(), GEMSimpleModel::simulateClustering(), TkAccumulatingSensitiveDetector::updateHit(), AsciiNeutronWriter::writeCluster(), and CSCGasCollisions::writeSummary().

38 {return theEntryPoint + theSegment;}
Local3DPoint theEntryPoint
Definition: PSimHit.h:126
Local3DVector theSegment
Definition: PSimHit.h:127
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(), FastTrackerRecHitMatcher::produce(), TestHits::projectHit(), TestSmoothHits::projectHit(), TestTrackHits::projectHit(), SiStripRecHitsValid::projectHit(), GlobalRecHitsAnalyzer::projectHit(), GlobalRecHitsProducer::projectHit(), and SiStripTrackingRecHitsValid::projectHit().

52  {
53  return LocalVector( thetaAtEntry(), phiAtEntry(), 1.f);
54  }
Local3DVector LocalVector
Definition: LocalVector.h:12
Geom::Theta< float > thetaAtEntry() const
fast and more accurate access to momentumAtEntry().theta()
Definition: PSimHit.h:57
double f[11][100]
Geom::Phi< float > phiAtEntry() const
fast and more accurate access to momentumAtEntry().phi()
Definition: PSimHit.h:60
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(), TestSmoothHits::analyze(), TestTrackHits::analyze(), SiPixelErrorEstimation::analyze(), FWTrackingParticleProxyBuilderFullFramework::build(), FWPSimHitProxyBuilder::buildViewType(), DTRecHitQuality::compute(), MuonTrackResidualAnalyzer::computeResolution(), DTDigitizer::computeTime(), SiLinearChargeDivider::DeconvolutionShape(), SiLinearChargeDivider::divide(), DTDigitizer::externalDelays(), GEMSimpleModel::getSimHitBx(), ME0SimpleModel::getSimHitBx(), RPCSynchronizer::getSimHitBx(), RPCSynchronizer::getSimHitBxAndTimingForIRPC(), CkfDebugger::SimHit::globalPosition(), SiPixelDigitizerAlgorithm::hitSignalReweight(), PixelTemplateSmearerBase::hitsMerge(), CkfDebugger::SimHit::localPosition(), MuonTrackResidualAnalyzer::RadiusComparatorInOut::operator()(), SiLinearChargeDivider::PeakShape(), CSCStripDigiValidation::plotResolution(), CSCWireDigiValidation::plotResolution(), CSCSegmentValidation::plotResolution(), CSCRecHit2DValidation::plotResolution(), GlobalRecHitsAnalyzer::plotResolution(), GlobalRecHitsProducer::plotResolution(), CkfDebugger::position(), TrackingRecHitNoSmearingPlugin::process(), TrackingRecHitStripGSPlugin::process(), ShallowSimhitClustersProducer::produce(), TestHits::projectHit(), TestSmoothHits::projectHit(), TestTrackHits::projectHit(), SiStripRecHitsValid::projectHit(), GlobalRecHitsAnalyzer::projectHit(), GlobalRecHitsProducer::projectHit(), SiStripTrackingRecHitsValid::projectHit(), SiStripRecHitsValid::rechitanalysis(), SiStripTrackingRecHitsValid::rechitanalysis(), SiStripTrackingRecHitsValid::rechitanalysis_matched(), DTHitAssociator::SimHitOK(), ME0SimpleModel::simulateClustering(), PixelTemplateSmearerBase::smearHit(), PixelTemplateSmearerBase::smearMergeGroup(), and CkfDebugger::testSeed().

44 {return theEntryPoint + 0.5*theSegment;}
Local3DPoint theEntryPoint
Definition: PSimHit.h:126
Local3DVector theSegment
Definition: PSimHit.h:127
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(), GEMDigiModel::addLinksWithPartId(), ME0DigiModel::addLinksWithPartId(), SubsystemNeutronWriter::adjust(), TestHits::analyze(), TestSmoothHits::analyze(), TestTrackHits::analyze(), FWTrackingParticleProxyBuilderFullFramework::build(), MuonTrackResidualAnalyzer::computeResolution(), DTDigitizer::computeTime(), DTDigitizer::dumpHit(), PixelTemplateSmearerBase::hitsMerge(), PixelClusterShapeExtractor::isSuitable(), PixelTemplateSmearerBase::smearHit(), PixelTemplateSmearerBase::smearMergeGroup(), CkfDebugger::testSeed(), and AsciiNeutronWriter::writeCluster().

47  {
48  return LocalVector( thetaAtEntry(), phiAtEntry(), pabs());
49  }
Local3DVector LocalVector
Definition: LocalVector.h:12
Geom::Theta< float > thetaAtEntry() const
fast and more accurate access to momentumAtEntry().theta()
Definition: PSimHit.h:57
float pabs() const
fast and more accurate access to momentumAtEntry().mag()
Definition: PSimHit.h:63
Geom::Phi< float > phiAtEntry() const
fast and more accurate access to momentumAtEntry().phi()
Definition: PSimHit.h:60
float PSimHit::pabs ( ) const
inline
int PSimHit::particleType ( ) const
inline
Geom::Phi<float> PSimHit::phiAtEntry ( ) const
inline
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(), GEMDigiModel::addLinksWithPartId(), ME0DigiModel::addLinksWithPartId(), CkfDebugger::analyseCompatibleMeasurements(), TestHits::analyze(), TestSmoothHits::analyze(), TestTrackHits::analyze(), TestOutliers::analyze(), SiPixelErrorEstimation::analyze(), TrackerHitAssociator::associateHit(), TrackingParticleNumberOfLayers::calculate(), DTDigitizer::dumpHit(), SubsystemNeutronReader::generateChamberNoise(), SiPixelDigitizerAlgorithm::hitSignalReweight(), SiPixelDigitizerAlgorithm::induce_signal(), DTHitAssociator::initEvent(), PixelClusterShapeExtractor::isSuitable(), CkfDebugger::SimHit::processType(), and ShallowSimhitClustersProducer::produce().

118 {return theProcessType;}
unsigned short theProcessType
Definition: PSimHit.h:135
void PSimHit::setEventId ( EncodedEventId  e)
inline

Definition at line 108 of file PSimHit.h.

References MillePedeFileConverter_cfg::e, and theEventId.

void PSimHit::setTof ( float  tof)
inline

Definition at line 121 of file PSimHit.h.

References theTof, and tof().

121 {theTof=tof;}
float tof() const
deprecated name for timeOfFlight()
Definition: PSimHit.h:72
float theTof
Definition: PSimHit.h:133
Geom::Theta<float> PSimHit::thetaAtEntry ( ) const
inline
float PSimHit::timeOfFlight ( ) const
inline
float PSimHit::tof ( ) const
inline
unsigned int PSimHit::trackId ( ) const
inline

Friends And Related Function Documentation

friend class TrackingSlaveSD
friend

Definition at line 143 of file PSimHit.h.

Member Data Documentation

unsigned int PSimHit::theDetUnitId
protected

Definition at line 139 of file PSimHit.h.

Referenced by detUnitId().

float PSimHit::theEnergyLoss
protected
Local3DPoint PSimHit::theEntryPoint
protected
EncodedEventId PSimHit::theEventId
protected

Definition at line 141 of file PSimHit.h.

Referenced by eventId(), and setEventId().

float PSimHit::thePabs
protected

Definition at line 128 of file PSimHit.h.

Referenced by pabs().

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
float PSimHit::theThetaAtEntry
protected

Definition at line 130 of file PSimHit.h.

Referenced by thetaAtEntry().

float PSimHit::theTof
protected

Definition at line 133 of file PSimHit.h.

Referenced by setTof(), and tof().

unsigned int PSimHit::theTrackId
protected

Definition at line 140 of file PSimHit.h.

Referenced by TrackingSlaveSD::setTrackId(), UpdatablePSimHit::setTrackId(), and trackId().