#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 49 of file TrackingParticleNumberOfLayers.h.
TrackingParticleNumberOfLayers::TrackingParticleNumberOfLayers | ( | const edm::Event & | iEvent, |
const std::vector< edm::EDGetTokenT< std::vector< PSimHit >>> & | simHitTokens | ||
) |
Definition at line 31 of file TrackingParticleNumberOfLayers.cc.
References iEvent, rpcPointValidation_cfi::simHit, SiPixelPhase1TrackingParticleV_cfi::simHitToken, 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 49 of file TrackingParticleNumberOfLayers.cc.
References trigObjTnPSource_cfi::filler, edm::EventSetup::get(), get, mps_fire::i, fastTrackerRecHitType::isPixel(), dqmiolumiharvest::j, TrackerTopology::layer(), eostools::move(), MuonTCMETValueMapProducer_cff::nLayers, nPixelLayers, nStripMonoAndStereoLayers, PbPb_ZMuSkimMuonDPG_cff::particleType, EgammaValidation_cff::pdgId, PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, FastTimerService_cff::range, rpcPointValidation_cfi::simHit, muonSimHitMatcherPSet::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_.
|
private |
Definition at line 57 of file TrackingParticleNumberOfLayers.h.
Referenced by calculate(), and TrackingParticleNumberOfLayers().