#include <TrackingParticleNumberOfLayers.h>
Public Types | |
enum | { nTrackerLayers = 0, nPixelLayers = 1, nStripMonoAndStereoLayers = 2 } |
Public Member Functions | |
std::tuple< std::unique_ptr < edm::ValueMap< unsigned int > >, std::unique_ptr < edm::ValueMap< unsigned int > >, std::unique_ptr < edm::ValueMap< unsigned int > > > | calculate (const edm::Handle< TrackingParticleCollection > &tps, const TrackerTopology &tTopo) const |
TrackingParticleNumberOfLayers (const edm::Event &iEvent, const std::vector< edm::EDGetTokenT< std::vector< PSimHit >>> &simHitTokens) | |
Private Attributes | |
std::vector< std::pair < unsigned int, const PSimHit * > > | trackIdToHitPtr_ |
This class calculates the number of tracker layers, pixel layers, and strip mono+stereo layers "crossed" by TrackingParticle.
The numbers of pixel and strip mono+stereo layers are not available from TrackingParticle itself, so they are calculated here in a standalone way in order to not to modify the TP dataformat (for now). The number of tracker layers is available in TP, but its calculation in TrackingTruthAccumulator gives wrong results (too many layers) for loopers, so also it is calculated here on the same go.
The PSimHits are needed for the calculation, so, in practice, in events with pileup the numbers of layers can be calculated only for TPs from the signal event (i.e. not for pileup TPs). Fortunately this is exactly what is sufficient for MultiTrackValidator.
Eventually we should move to use HitPattern as in reco::TrackBase (more information in a compact format), and consider adding it to the TrackingParticle itself.
In principle we could utilize the TP->SimHit map produced in SimHitTPAssociationProducer instead of doing the association here again, but
Definition at line 46 of file TrackingParticleNumberOfLayers.h.
anonymous enum |
Enumerator | |
---|---|
nTrackerLayers | |
nPixelLayers | |
nStripMonoAndStereoLayers |
Definition at line 51 of file TrackingParticleNumberOfLayers.h.
TrackingParticleNumberOfLayers::TrackingParticleNumberOfLayers | ( | const edm::Event & | iEvent, |
const std::vector< edm::EDGetTokenT< std::vector< PSimHit >>> & | simHitTokens | ||
) |
Definition at line 28 of file TrackingParticleNumberOfLayers.cc.
References edm::Event::getByToken(), and trackIdToHitPtr_.
std::tuple< std::unique_ptr< edm::ValueMap< unsigned int > >, std::unique_ptr< edm::ValueMap< unsigned int > >, std::unique_ptr< edm::ValueMap< unsigned int > > > TrackingParticleNumberOfLayers::calculate | ( | const edm::Handle< TrackingParticleCollection > & | tps, |
const TrackerTopology & | tTopo | ||
) | const |
Definition at line 46 of file TrackingParticleNumberOfLayers.cc.
References PSimHit::detUnitId(), TrackingParticle::eventId(), PSimHit::eventId(), edm::helper::Filler< Map >::fill(), TrackingParticle::g4Tracks(), mps_fire::i, edm::helper::Filler< Map >::insert(), fastTrackerRecHitType::isPixel(), dqmiolumiharvest::j, phase1PixelTopology::layer, TrackerTopology::layer(), eostools::move(), nPixelLayers, nStripMonoAndStereoLayers, PSimHit::particleType(), HLT_FULL_cff::particleType, TrackingParticle::pdgId(), PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, PSimHit::processType(), sistrip::SpyUtilities::range(), cscDigiValidation_cfi::simTrack, DetId::subdetId(), StripSubdetector::TEC, TrackerTopology::tecIsRPhi(), TrackerTopology::tecIsStereo(), StripSubdetector::TIB, TrackerTopology::tibIsRPhi(), TrackerTopology::tibIsStereo(), StripSubdetector::TID, TrackerTopology::tidIsRPhi(), TrackerTopology::tidIsStereo(), StripSubdetector::TOB, TrackerTopology::tobIsRPhi(), TrackerTopology::tobIsStereo(), cmsswSequenceInfo::tp, and trackIdToHitPtr_.
Referenced by TrackingParticleNumberOfLayersProducer::produce().
|
private |
Definition at line 59 of file TrackingParticleNumberOfLayers.h.
Referenced by calculate(), and TrackingParticleNumberOfLayers().