#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 edm::EventSetup &iSetup) 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 44 of file TrackingParticleNumberOfLayers.h.
anonymous enum |
Enumerator | |
---|---|
nTrackerLayers | |
nPixelLayers | |
nStripMonoAndStereoLayers |
Definition at line 48 of file TrackingParticleNumberOfLayers.h.
TrackingParticleNumberOfLayers::TrackingParticleNumberOfLayers | ( | const edm::Event & | iEvent, |
const std::vector< edm::EDGetTokenT< std::vector< PSimHit > > > & | simHitTokens | ||
) |
Definition at line 14 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 edm::EventSetup & | iSetup | ||
) | const |
Definition at line 32 of file TrackingParticleNumberOfLayers.cc.
References constexpr, PSimHit::detUnitId(), TrackingParticle::eventId(), PSimHit::eventId(), edm::helper::Filler< Map >::fill(), TrackingParticle::g4Tracks(), edm::EventSetup::get(), i, edm::helper::Filler< Map >::insert(), fastTrackerRecHitType::isPixel(), j, TrackerTopology::layer(), nPixelLayers, nStripMonoAndStereoLayers, PSimHit::particleType(), HLT_25ns14e33_v1_cff::particleType, benchmark_cfg::pdgId, TrackingParticle::pdgId(), PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, PSimHit::processType(), 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(), and trackIdToHitPtr_.
Referenced by MultiTrackValidator::analyze(), TrackerSeedValidator::analyze(), and TrackingParticleNumberOfLayersProducer::produce().
|
private |
Definition at line 60 of file TrackingParticleNumberOfLayers.h.
Referenced by calculate(), and TrackingParticleNumberOfLayers().