CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes
TrackingNtuple Class Reference

#include <NtupleDump/TrackingNtuple/plugins/TrackingNtuple.cc>

Inheritance diagram for TrackingNtuple:
edm::one::EDAnalyzer< edm::one::SharedResources > edm::one::EDAnalyzerBase edm::EDConsumerBase

Classes

class  DetIdCommon
 
class  DetIdOTCommon
 
class  DetIdPhase2OTOnly
 
class  DetIdPixelOnly
 
class  DetIdStripOnly
 
struct  SimHitData
 
struct  TPHitIndex
 

Public Member Functions

 TrackingNtuple (const edm::ParameterSet &)
 
 ~TrackingNtuple () override
 
- Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::SharedResources >
 EDAnalyzer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDAnalyzerBase () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Types

using DetIdAll = CombineDetId< DetIdCommon, DetIdPixelOnly, DetIdOTCommon, DetIdStripOnly >
 
using DetIdAllPhase2 = CombineDetId< DetIdCommon, DetIdPixelOnly, DetIdOTCommon, DetIdPhase2OTOnly >
 
using DetIdPhase2OT = CombineDetId< DetIdCommon, DetIdOTCommon, DetIdPhase2OTOnly >
 
using DetIdPixel = CombineDetId< DetIdCommon, DetIdPixelOnly >
 
using DetIdStrip = CombineDetId< DetIdCommon, DetIdOTCommon, DetIdStripOnly >
 
enum  HitSimType {
  HitSimType::Signal = 0, HitSimType::ITPileup = 1, HitSimType::OOTPileup = 2, HitSimType::Noise = 3,
  HitSimType::Unknown = 99
}
 
enum  HitType {
  HitType::Pixel = 0, HitType::Strip = 1, HitType::Glued = 2, HitType::Invalid = 3,
  HitType::Phase2OT = 4, HitType::Unknown = 99
}
 
using MVACollection = std::vector< float >
 
using QualityMaskCollection = std::vector< unsigned char >
 

Private Member Functions

size_t addStripMatchedHit (const SiStripMatchedRecHit2D &hit, const TransientTrackingRecHitBuilder &theTTRHBuilder, const TrackerTopology &tTopo, std::vector< std::pair< int, int > > &monoStereoClusterList)
 
void analyze (const edm::Event &, const edm::EventSetup &) override
 
void clearVariables ()
 
void fillBeamSpot (const reco::BeamSpot &bs)
 
void fillPhase2OTHits (const edm::Event &iEvent, const ClusterTPAssociation &clusterToTPMap, const TrackingParticleRefKeyToIndex &tpKeyToIndex, const SimHitTPAssociationProducer::SimHitTPAssociationList &simHitsTPAssoc, const edm::DetSetVector< PixelDigiSimLink > &digiSimLink, const TransientTrackingRecHitBuilder &theTTRHBuilder, const TrackerTopology &tTopo, const SimHitRefKeyToIndex &simHitRefKeyToIndex, std::set< edm::ProductID > &hitProductIds)
 
void fillPixelHits (const edm::Event &iEvent, const ClusterTPAssociation &clusterToTPMap, const TrackingParticleRefKeyToIndex &tpKeyToIndex, const SimHitTPAssociationProducer::SimHitTPAssociationList &simHitsTPAssoc, const edm::DetSetVector< PixelDigiSimLink > &digiSimLink, const TransientTrackingRecHitBuilder &theTTRHBuilder, const TrackerTopology &tTopo, const SimHitRefKeyToIndex &simHitRefKeyToIndex, std::set< edm::ProductID > &hitProductIds)
 
void fillSeeds (const edm::Event &iEvent, const TrackingParticleRefVector &tpCollection, const TrackingParticleRefKeyToIndex &tpKeyToIndex, const reco::BeamSpot &bs, const reco::TrackToTrackingParticleAssociator &associatorByHits, const ClusterTPAssociation &clusterToTPMap, const TransientTrackingRecHitBuilder &theTTRHBuilder, const MagneticField &theMF, const TrackerTopology &tTopo, std::vector< std::pair< int, int > > &monoStereoClusterList, const std::set< edm::ProductID > &hitProductIds, std::map< edm::ProductID, size_t > &seedToCollIndex)
 
void fillSimHits (const TrackerGeometry &tracker, const TrackingParticleRefKeyToIndex &tpKeyToIndex, const SimHitTPAssociationProducer::SimHitTPAssociationList &simHitsTPAssoc, const TrackerTopology &tTopo, SimHitRefKeyToIndex &simHitRefKeyToIndex, std::vector< TPHitIndex > &tpHitList)
 
void fillStripMatchedHits (const edm::Event &iEvent, const TransientTrackingRecHitBuilder &theTTRHBuilder, const TrackerTopology &tTopo, std::vector< std::pair< int, int > > &monoStereoClusterList)
 
void fillStripRphiStereoHits (const edm::Event &iEvent, const ClusterTPAssociation &clusterToTPMap, const TrackingParticleRefKeyToIndex &tpKeyToIndex, const SimHitTPAssociationProducer::SimHitTPAssociationList &simHitsTPAssoc, const edm::DetSetVector< StripDigiSimLink > &digiSimLink, const TransientTrackingRecHitBuilder &theTTRHBuilder, const TrackerTopology &tTopo, const SimHitRefKeyToIndex &simHitRefKeyToIndex, std::set< edm::ProductID > &hitProductIds)
 
void fillTrackingParticles (const edm::Event &iEvent, const edm::EventSetup &iSetup, const edm::RefToBaseVector< reco::Track > &tracks, const reco::BeamSpot &bs, const TrackingParticleRefVector &tpCollection, const TrackingVertexRefKeyToIndex &tvKeyToIndex, const reco::TrackToTrackingParticleAssociator &associatorByHits, const std::vector< TPHitIndex > &tpHitList, const TrackingParticleRefKeyToCount &tpKeyToClusterCount)
 
void fillTrackingParticlesForSeeds (const TrackingParticleRefVector &tpCollection, const reco::SimToRecoCollection &simRecColl, const TrackingParticleRefKeyToIndex &tpKeyToIndex, const unsigned int seedOffset)
 
void fillTrackingVertices (const TrackingVertexRefVector &trackingVertices, const TrackingParticleRefKeyToIndex &tpKeyToIndex)
 
void fillTracks (const edm::RefToBaseVector< reco::Track > &tracks, const TrackingParticleRefVector &tpCollection, const TrackingParticleRefKeyToIndex &tpKeyToIndex, const TrackingParticleRefKeyToCount &tpKeyToClusterCount, const MagneticField &mf, const reco::BeamSpot &bs, const reco::VertexCollection &vertices, const reco::TrackToTrackingParticleAssociator &associatorByHits, const ClusterTPAssociation &clusterToTPMap, const TransientTrackingRecHitBuilder &theTTRHBuilder, const TrackerTopology &tTopo, const std::set< edm::ProductID > &hitProductIds, const std::map< edm::ProductID, size_t > &seedToCollIndex, const std::vector< const MVACollection * > &mvaColls, const std::vector< const QualityMaskCollection * > &qualColls)
 
void fillVertices (const reco::VertexCollection &vertices, const edm::RefToBaseVector< reco::Track > &tracks)
 
template<typename SimLink >
SimHitData matchCluster (const OmniClusterRef &cluster, DetId hitId, int clusterKey, const TransientTrackingRecHit::RecHitPointer &ttrh, const ClusterTPAssociation &clusterToTPMap, const TrackingParticleRefKeyToIndex &tpKeyToIndex, const SimHitTPAssociationProducer::SimHitTPAssociationList &simHitsTPAssoc, const edm::DetSetVector< SimLink > &digiSimLinks, const SimHitRefKeyToIndex &simHitRefKeyToIndex, HitType hitType)
 

Static Private Member Functions

static bool tpHitIndexListLess (const TPHitIndex &i, const TPHitIndex &j)
 
static bool tpHitIndexListLessSort (const TPHitIndex &i, const TPHitIndex &j)
 

Private Attributes

edm::EDGetTokenT< reco::BeamSpotbeamSpotToken_
 
float bsp_sigmax
 
float bsp_sigmay
 
float bsp_sigmaz
 
float bsp_x
 
float bsp_y
 
float bsp_z
 
std::string builderName_
 
edm::EDGetTokenT< ClusterTPAssociationclusterTPMapToken_
 
edm::EventNumber_t ev_event
 
edm::LuminosityBlockNumber_t ev_lumi
 
edm::RunNumber_t ev_run
 
std::vector< float > glu_bbxi
 
DetIdStrip glu_detId
 
std::vector< short > glu_isBarrel
 
std::vector< int > glu_monoIdx
 
std::vector< float > glu_radL
 
std::vector< std::vector< int > > glu_seeIdx
 
std::vector< int > glu_stereoIdx
 
std::vector< float > glu_x
 
std::vector< float > glu_xx
 
std::vector< float > glu_xy
 
std::vector< float > glu_y
 
std::vector< float > glu_yy
 
std::vector< float > glu_yz
 
std::vector< float > glu_z
 
std::vector< float > glu_zx
 
std::vector< float > glu_zz
 
const bool includeAllHits_
 
const bool includeMVA_
 
bool includePhase2OTHits_
 
const bool includeSeeds_
 
bool includeStripHits_
 
const bool includeTrackingParticles_
 
DetIdAll inv_detId
 
DetIdAllPhase2 inv_detId_phase2
 
std::vector< short > inv_isBarrel
 
std::vector< unsigned short > inv_type
 
std::vector< std::tuple< edm::EDGetTokenT< MVACollection >, edm::EDGetTokenT< QualityMaskCollection > > > mvaQualityCollectionTokens_
 
std::string parametersDefinerName_
 
std::vector< float > ph2_bbxi
 
DetIdPhase2OT ph2_detId
 
std::vector< short > ph2_isBarrel
 
std::vector< float > ph2_radL
 
std::vector< std::vector< int > > ph2_seeIdx
 
std::vector< std::vector< int > > ph2_simHitIdx
 
std::vector< unsigned short > ph2_simType
 
std::vector< std::vector< int > > ph2_trkIdx
 
std::vector< float > ph2_x
 
std::vector< float > ph2_xx
 
std::vector< float > ph2_xy
 
std::vector< float > ph2_y
 
std::vector< float > ph2_yy
 
std::vector< float > ph2_yz
 
std::vector< float > ph2_z
 
std::vector< float > ph2_zx
 
std::vector< float > ph2_zz
 
edm::EDGetTokenT< Phase2TrackerRecHit1DCollectionNewphase2OTRecHitToken_
 
std::vector< float > pix_bbxi
 
std::vector< std::vector< float > > pix_chargeFraction
 
DetIdPixel pix_detId
 
std::vector< short > pix_isBarrel
 
std::vector< float > pix_radL
 
std::vector< std::vector< int > > pix_seeIdx
 
std::vector< std::vector< int > > pix_simHitIdx
 
std::vector< unsigned short > pix_simType
 
std::vector< std::vector< int > > pix_trkIdx
 
std::vector< float > pix_x
 
std::vector< float > pix_xx
 
std::vector< float > pix_xy
 
std::vector< float > pix_y
 
std::vector< float > pix_yy
 
std::vector< float > pix_yz
 
std::vector< float > pix_z
 
std::vector< float > pix_zx
 
std::vector< float > pix_zz
 
edm::EDGetTokenT< SiPixelRecHitCollectionpixelRecHitToken_
 
edm::EDGetTokenT< edm::DetSetVector< PixelDigiSimLink > > pixelSimLinkToken_
 
std::vector< unsigned int > see_algo
 
std::vector< int > see_bestFromFirstHitSimTrkIdx
 
std::vector< float > see_bestFromFirstHitSimTrkShareFrac
 
std::vector< int > see_bestSimTrkIdx
 
std::vector< float > see_bestSimTrkShareFrac
 
std::vector< float > see_chi2
 
std::vector< float > see_dxy
 
std::vector< float > see_dxyErr
 
std::vector< float > see_dz
 
std::vector< float > see_dzErr
 
std::vector< float > see_eta
 
std::vector< float > see_etaErr
 
std::vector< short > see_fitok
 
std::vector< std::vector< int > > see_hitIdx
 
std::vector< std::vector< int > > see_hitType
 
std::vector< short > see_isTrue
 
std::vector< unsigned short > see_nCands
 
std::vector< unsigned int > see_nCluster
 
std::vector< unsigned int > see_nGlued
 
std::vector< unsigned int > see_nPhase2OT
 
std::vector< unsigned int > see_nPixel
 
std::vector< unsigned int > see_nStrip
 
std::vector< unsigned int > see_nValid
 
std::vector< unsigned int > see_offset
 
std::vector< float > see_phi
 
std::vector< float > see_phiErr
 
std::vector< float > see_pt
 
std::vector< float > see_ptErr
 
std::vector< float > see_px
 
std::vector< float > see_py
 
std::vector< float > see_pz
 
std::vector< int > see_q
 
std::vector< std::vector< int > > see_simTrkIdx
 
std::vector< std::vector< float > > see_simTrkShareFrac
 
std::vector< float > see_statePt
 
std::vector< float > see_stateTrajPx
 
std::vector< float > see_stateTrajPy
 
std::vector< float > see_stateTrajPz
 
std::vector< float > see_stateTrajX
 
std::vector< float > see_stateTrajY
 
std::vector< unsigned short > see_stopReason
 
std::vector< int > see_trkIdx
 
std::vector< edm::EDGetTokenT< std::vector< SeedStopInfo > > > seedStopInfoTokens_
 
std::vector< edm::EDGetTokenT< edm::View< reco::Track > > > seedTokens_
 
std::vector< int > sim_bunchCrossing
 
std::vector< std::vector< int > > sim_decayVtxIdx
 
std::vector< float > sim_eta
 
std::vector< int > sim_event
 
std::vector< std::vector< int > > sim_genPdgIds
 
std::vector< int > sim_isFromBHadron
 
std::vector< unsigned int > sim_n3DLay
 
std::vector< unsigned int > sim_nLay
 
std::vector< unsigned int > sim_nPixel
 
std::vector< unsigned int > sim_nPixelLay
 
std::vector< unsigned int > sim_nRecoClusters
 
std::vector< unsigned int > sim_nStrip
 
std::vector< unsigned int > sim_nTrackerHits
 
std::vector< unsigned int > sim_nValid
 
std::vector< int > sim_parentVtxIdx
 
std::vector< float > sim_pca_cotTheta
 
std::vector< float > sim_pca_dxy
 
std::vector< float > sim_pca_dz
 
std::vector< float > sim_pca_eta
 
std::vector< float > sim_pca_lambda
 
std::vector< float > sim_pca_phi
 
std::vector< float > sim_pca_pt
 
std::vector< int > sim_pdgId
 
std::vector< float > sim_phi
 
std::vector< float > sim_pt
 
std::vector< float > sim_px
 
std::vector< float > sim_py
 
std::vector< float > sim_pz
 
std::vector< int > sim_q
 
std::vector< std::vector< int > > sim_seedIdx
 
std::vector< std::vector< int > > sim_simHitIdx
 
std::vector< std::vector< int > > sim_trkIdx
 
std::vector< std::vector< float > > sim_trkShareFrac
 
DetIdAll simhit_detId
 
DetIdAllPhase2 simhit_detId_phase2
 
std::vector< float > simhit_eloss
 
std::vector< std::vector< int > > simhit_hitIdx
 
std::vector< std::vector< int > > simhit_hitType
 
std::vector< int > simhit_particle
 
std::vector< short > simhit_process
 
std::vector< int > simhit_simTrkIdx
 
std::vector< float > simhit_tof
 
std::vector< float > simhit_x
 
std::vector< float > simhit_y
 
std::vector< float > simhit_z
 
edm::EDGetTokenT< SimHitTPAssociationProducer::SimHitTPAssociationListsimHitTPMapToken_
 
std::vector< int > simpv_idx
 
std::vector< int > simvtx_bunchCrossing
 
std::vector< std::vector< int > > simvtx_daughterSimIdx
 
std::vector< int > simvtx_event
 
std::vector< unsigned int > simvtx_processType
 
std::vector< std::vector< int > > simvtx_sourceSimIdx
 
std::vector< float > simvtx_x
 
std::vector< float > simvtx_y
 
std::vector< float > simvtx_z
 
edm::EDGetTokenT< edm::DetSetVector< PixelDigiSimLink > > siphase2OTSimLinksToken_
 
std::vector< float > str_bbxi
 
std::vector< std::vector< float > > str_chargeFraction
 
DetIdStrip str_detId
 
std::vector< short > str_isBarrel
 
std::vector< float > str_radL
 
std::vector< std::vector< int > > str_seeIdx
 
std::vector< std::vector< int > > str_simHitIdx
 
std::vector< unsigned short > str_simType
 
std::vector< std::vector< int > > str_trkIdx
 
std::vector< float > str_x
 
std::vector< float > str_xx
 
std::vector< float > str_xy
 
std::vector< float > str_y
 
std::vector< float > str_yy
 
std::vector< float > str_yz
 
std::vector< float > str_z
 
std::vector< float > str_zx
 
std::vector< float > str_zz
 
edm::EDGetTokenT< SiStripMatchedRecHit2DCollectionstripMatchedRecHitToken_
 
edm::EDGetTokenT< SiStripRecHit2DCollectionstripRphiRecHitToken_
 
edm::EDGetTokenT< edm::DetSetVector< StripDigiSimLink > > stripSimLinkToken_
 
edm::EDGetTokenT< SiStripRecHit2DCollectionstripStereoRecHitToken_
 
TTree * t
 
edm::EDGetTokenT< edm::ValueMap< unsigned int > > tpNLayersToken_
 
edm::EDGetTokenT< edm::ValueMap< unsigned int > > tpNPixelLayersToken_
 
edm::EDGetTokenT< edm::ValueMap< unsigned int > > tpNStripStereoLayersToken_
 
HistoryBase tracer_
 
edm::EDGetTokenT< reco::TrackToTrackingParticleAssociatortrackAssociatorToken_
 
edm::EDGetTokenT< TrackingParticleRefVectortrackingParticleRefToken_
 
edm::EDGetTokenT< TrackingParticleCollectiontrackingParticleToken_
 
edm::EDGetTokenT< TrackingVertexCollectiontrackingVertexToken_
 
edm::EDGetTokenT< edm::View< reco::Track > > trackToken_
 
std::vector< unsigned int > trk_algo
 
std::vector< decltype(reco::TrackBase().algoMaskUL())> trk_algoMask
 
std::vector< int > trk_bestFromFirstHitSimTrkIdx
 
std::vector< float > trk_bestFromFirstHitSimTrkNChi2
 
std::vector< float > trk_bestFromFirstHitSimTrkShareFrac
 
std::vector< float > trk_bestFromFirstHitSimTrkShareFracSimClusterDenom
 
std::vector< float > trk_bestFromFirstHitSimTrkShareFracSimDenom
 
std::vector< int > trk_bestSimTrkIdx
 
std::vector< float > trk_bestSimTrkNChi2
 
std::vector< float > trk_bestSimTrkShareFrac
 
std::vector< float > trk_bestSimTrkShareFracSimClusterDenom
 
std::vector< float > trk_bestSimTrkShareFracSimDenom
 
std::vector< float > trk_cotTheta
 
std::vector< float > trk_dxy
 
std::vector< float > trk_dxyClosestPV
 
std::vector< float > trk_dxyErr
 
std::vector< float > trk_dxyPV
 
std::vector< float > trk_dz
 
std::vector< float > trk_dzClosestPV
 
std::vector< float > trk_dzErr
 
std::vector< float > trk_dzPV
 
std::vector< float > trk_eta
 
std::vector< float > trk_etaErr
 
std::vector< std::vector< int > > trk_hitIdx
 
std::vector< std::vector< int > > trk_hitType
 
std::vector< float > trk_inner_pt
 
std::vector< float > trk_inner_px
 
std::vector< float > trk_inner_py
 
std::vector< float > trk_inner_pz
 
std::vector< short > trk_isHP
 
std::vector< short > trk_isTrue
 
std::vector< float > trk_lambda
 
std::vector< float > trk_lambdaErr
 
std::vector< std::vector< float > > trk_mvas
 
std::vector< unsigned int > trk_n3DLay
 
std::vector< float > trk_nChi2
 
std::vector< float > trk_nChi2_1Dmod
 
std::vector< unsigned int > trk_nCluster
 
std::vector< float > trk_ndof
 
std::vector< unsigned int > trk_nInactive
 
std::vector< unsigned int > trk_nInnerInactive
 
std::vector< unsigned int > trk_nInnerLost
 
std::vector< unsigned int > trk_nLost
 
std::vector< unsigned int > trk_nLostLay
 
std::vector< unsigned int > trk_nOuterInactive
 
std::vector< unsigned int > trk_nOuterLost
 
std::vector< unsigned int > trk_nPixel
 
std::vector< unsigned int > trk_nPixelLay
 
std::vector< unsigned int > trk_nStrip
 
std::vector< unsigned int > trk_nStripLay
 
std::vector< unsigned int > trk_nValid
 
std::vector< unsigned int > trk_originalAlgo
 
std::vector< float > trk_outer_pt
 
std::vector< float > trk_outer_px
 
std::vector< float > trk_outer_py
 
std::vector< float > trk_outer_pz
 
std::vector< float > trk_phi
 
std::vector< float > trk_phiErr
 
std::vector< float > trk_pt
 
std::vector< float > trk_ptErr
 
std::vector< float > trk_px
 
std::vector< float > trk_py
 
std::vector< float > trk_pz
 
std::vector< int > trk_q
 
std::vector< std::vector< unsigned short > > trk_qualityMasks
 
std::vector< float > trk_refpoint_x
 
std::vector< float > trk_refpoint_y
 
std::vector< float > trk_refpoint_z
 
std::vector< int > trk_seedIdx
 
std::vector< std::vector< int > > trk_simTrkIdx
 
std::vector< std::vector< float > > trk_simTrkNChi2
 
std::vector< std::vector< float > > trk_simTrkShareFrac
 
std::vector< unsigned short > trk_stopReason
 
std::vector< int > trk_vtxIdx
 
edm::EDGetTokenT< reco::VertexCollectionvertexToken_
 
std::vector< float > vtx_chi2
 
std::vector< short > vtx_fake
 
std::vector< float > vtx_ndof
 
std::vector< std::vector< int > > vtx_trkIdx
 
std::vector< short > vtx_valid
 
std::vector< float > vtx_x
 
std::vector< float > vtx_xErr
 
std::vector< float > vtx_y
 
std::vector< float > vtx_yErr
 
std::vector< float > vtx_z
 
std::vector< float > vtx_zErr
 

Additional Inherited Members

- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Description: [one line class summary]

Implementation: [Notes on implementation]

Definition at line 466 of file TrackingNtuple.cc.

Member Typedef Documentation

Definition at line 957 of file TrackingNtuple.cc.

Definition at line 958 of file TrackingNtuple.cc.

Definition at line 956 of file TrackingNtuple.cc.

using TrackingNtuple::DetIdPixel = CombineDetId<DetIdCommon, DetIdPixelOnly>
private

Definition at line 954 of file TrackingNtuple.cc.

Definition at line 955 of file TrackingNtuple.cc.

using TrackingNtuple::MVACollection = std::vector<float>
private

Definition at line 500 of file TrackingNtuple.cc.

using TrackingNtuple::QualityMaskCollection = std::vector<unsigned char>
private

Definition at line 501 of file TrackingNtuple.cc.

Member Enumeration Documentation

enum TrackingNtuple::HitSimType
strongprivate
Enumerator
Signal 
ITPileup 
OOTPileup 
Noise 
Unknown 

Definition at line 492 of file TrackingNtuple.cc.

492  {
493  Signal = 0,
494  ITPileup = 1,
495  OOTPileup = 2,
496  Noise = 3,
497  Unknown = 99
498  };
Definition: vlib.h:39
enum TrackingNtuple::HitType
strongprivate
Enumerator
Pixel 
Strip 
Glued 
Invalid 
Phase2OT 
Unknown 

Definition at line 479 of file TrackingNtuple.cc.

479  {
480  Pixel = 0,
481  Strip = 1,
482  Glued = 2,
483  Invalid = 3,
484  Phase2OT = 4,
485  Unknown = 99
486  };

Constructor & Destructor Documentation

TrackingNtuple::TrackingNtuple ( const edm::ParameterSet iConfig)
explicit

Definition at line 1276 of file TrackingNtuple.cc.

References bsp_sigmax, bsp_sigmay, bsp_sigmaz, bsp_x, bsp_y, bsp_z, HistoryBase::depth(), Exception, edm::ParameterSet::getUntrackedParameter(), glu_bbxi, glu_detId, glu_isBarrel, glu_monoIdx, glu_radL, glu_seeIdx, glu_stereoIdx, glu_x, glu_xx, glu_xy, glu_y, glu_yy, glu_yz, glu_z, glu_zx, glu_zz, mps_fire::i, inv_detId, inv_detId_phase2, inv_isBarrel, inv_type, TFileService::kSharedResource, TFileService::make(), ph2_bbxi, ph2_detId, ph2_isBarrel, ph2_radL, ph2_seeIdx, ph2_simHitIdx, ph2_simType, ph2_trkIdx, ph2_x, ph2_xx, ph2_xy, ph2_y, ph2_yy, ph2_yz, ph2_z, ph2_zx, ph2_zz, pix_bbxi, pix_chargeFraction, pix_detId, pix_isBarrel, pix_radL, pix_seeIdx, pix_simHitIdx, pix_simType, pix_trkIdx, pix_x, pix_xx, pix_xy, pix_y, pix_yy, pix_yz, pix_z, pix_zx, pix_zz, see_algo, see_bestFromFirstHitSimTrkIdx, see_bestFromFirstHitSimTrkShareFrac, see_bestSimTrkIdx, see_bestSimTrkShareFrac, see_chi2, see_dxy, see_dxyErr, see_dz, see_dzErr, see_eta, see_etaErr, see_fitok, see_hitIdx, see_hitType, see_isTrue, see_nCands, see_nCluster, see_nGlued, see_nPhase2OT, see_nPixel, see_nStrip, see_nValid, see_offset, see_phi, see_phiErr, see_pt, see_ptErr, see_px, see_py, see_pz, see_q, see_simTrkIdx, see_simTrkShareFrac, see_statePt, see_stateTrajPx, see_stateTrajPy, see_stateTrajPz, see_stateTrajX, see_stateTrajY, see_stopReason, see_trkIdx, sim_bunchCrossing, sim_decayVtxIdx, sim_eta, sim_event, sim_genPdgIds, sim_isFromBHadron, sim_n3DLay, sim_nLay, sim_nPixel, sim_nPixelLay, sim_nRecoClusters, sim_nStrip, sim_nTrackerHits, sim_nValid, sim_parentVtxIdx, sim_pca_cotTheta, sim_pca_dxy, sim_pca_dz, sim_pca_eta, sim_pca_lambda, sim_pca_phi, sim_pca_pt, sim_pdgId, sim_phi, sim_pt, sim_px, sim_py, sim_pz, sim_q, sim_seedIdx, sim_simHitIdx, sim_trkIdx, sim_trkShareFrac, simhit_detId, simhit_detId_phase2, simhit_eloss, simhit_hitIdx, simhit_hitType, simhit_particle, simhit_process, simhit_simTrkIdx, simhit_tof, simhit_x, simhit_y, simhit_z, simpv_idx, simvtx_bunchCrossing, simvtx_daughterSimIdx, simvtx_event, simvtx_processType, simvtx_sourceSimIdx, simvtx_x, simvtx_y, simvtx_z, str_bbxi, str_chargeFraction, str_detId, str_isBarrel, str_radL, str_seeIdx, str_simHitIdx, str_simType, str_trkIdx, str_x, str_xx, str_xy, str_y, str_yy, str_yz, str_z, str_zx, str_zz, AlCaHLTBitMon_QueryRunRegistry::string, GlobalPosition_Frontier_DevDB_cff::tag, MuonAssociatorByHits_cfi::tpTag, trk_algoMask, trk_bestFromFirstHitSimTrkIdx, trk_bestFromFirstHitSimTrkNChi2, trk_bestFromFirstHitSimTrkShareFrac, trk_bestFromFirstHitSimTrkShareFracSimClusterDenom, trk_bestFromFirstHitSimTrkShareFracSimDenom, trk_bestSimTrkIdx, trk_bestSimTrkNChi2, trk_bestSimTrkShareFrac, trk_bestSimTrkShareFracSimClusterDenom, trk_bestSimTrkShareFracSimDenom, trk_hitIdx, trk_hitType, trk_isHP, trk_isTrue, trk_seedIdx, trk_simTrkIdx, trk_simTrkNChi2, trk_simTrkShareFrac, trk_stopReason, trk_vtxIdx, edm::vector_transform(), vtx_chi2, vtx_fake, vtx_ndof, vtx_trkIdx, vtx_valid, vtx_x, vtx_xErr, vtx_y, vtx_yErr, vtx_z, and vtx_zErr.

1276  :
1278  clusterTPMapToken_(consumes<ClusterTPAssociation>(iConfig.getUntrackedParameter<edm::InputTag>("clusterTPMap"))),
1279  simHitTPMapToken_(consumes<SimHitTPAssociationProducer::SimHitTPAssociationList>(iConfig.getUntrackedParameter<edm::InputTag>("simHitTPMap"))),
1280  trackAssociatorToken_(consumes<reco::TrackToTrackingParticleAssociator>(iConfig.getUntrackedParameter<edm::InputTag>("trackAssociator"))),
1284  includeStripHits_(iConfig.getUntrackedParameter<edm::InputTag>("stripDigiSimLink").label() != ""),
1285  includePhase2OTHits_(iConfig.getUntrackedParameter<edm::InputTag>("phase2OTSimLink").label() != ""),
1286  beamSpotToken_(consumes<reco::BeamSpot>(iConfig.getUntrackedParameter<edm::InputTag>("beamSpot"))),
1287  pixelRecHitToken_(consumes<SiPixelRecHitCollection>(iConfig.getUntrackedParameter<edm::InputTag>("pixelRecHits"))),
1288  stripRphiRecHitToken_(consumes<SiStripRecHit2DCollection>(iConfig.getUntrackedParameter<edm::InputTag>("stripRphiRecHits"))),
1289  stripStereoRecHitToken_(consumes<SiStripRecHit2DCollection>(iConfig.getUntrackedParameter<edm::InputTag>("stripStereoRecHits"))),
1290  stripMatchedRecHitToken_(consumes<SiStripMatchedRecHit2DCollection>(iConfig.getUntrackedParameter<edm::InputTag>("stripMatchedRecHits"))),
1291  phase2OTRecHitToken_(consumes<Phase2TrackerRecHit1DCollectionNew>(iConfig.getUntrackedParameter<edm::InputTag>("phase2OTRecHits"))),
1292  vertexToken_(consumes<reco::VertexCollection>(iConfig.getUntrackedParameter<edm::InputTag>("vertices"))),
1293  trackingVertexToken_(consumes<TrackingVertexCollection>(iConfig.getUntrackedParameter<edm::InputTag>("trackingVertices"))),
1296  tpNStripStereoLayersToken_(consumes<edm::ValueMap<unsigned int> >(iConfig.getUntrackedParameter<edm::InputTag>("trackingParticleNstripstereolayers"))),
1297  builderName_(iConfig.getUntrackedParameter<std::string>("TTRHBuilder")),
1298  parametersDefinerName_(iConfig.getUntrackedParameter<std::string>("parametersDefiner")),
1299  includeSeeds_(iConfig.getUntrackedParameter<bool>("includeSeeds")),
1300  includeAllHits_(iConfig.getUntrackedParameter<bool>("includeAllHits")),
1301  includeMVA_(iConfig.getUntrackedParameter<bool>("includeMVA")),
1302  includeTrackingParticles_(iConfig.getUntrackedParameter<bool>("includeTrackingParticles"))
1303 {
1304  if(includeSeeds_) {
1305  seedTokens_ = edm::vector_transform(iConfig.getUntrackedParameter<std::vector<edm::InputTag> >("seedTracks"), [&](const edm::InputTag& tag) {
1306  return consumes<edm::View<reco::Track> >(tag);
1307  });
1308  seedStopInfoTokens_ = edm::vector_transform(iConfig.getUntrackedParameter<std::vector<edm::InputTag> >("trackCandidates"), [&](const edm::InputTag& tag) {
1309  return consumes<std::vector<SeedStopInfo> >(tag);
1310  });
1311  if(seedTokens_.size() != seedStopInfoTokens_.size()) {
1312  throw cms::Exception("Configuration") << "Got " << seedTokens_.size() << " seed collections, but " << seedStopInfoTokens_.size() << " track candidate collections";
1313  }
1314  }
1315 
1316  if(includeAllHits_) {
1318  throw cms::Exception("Configuration") << "Both stripDigiSimLink and phase2OTSimLink are set, please set only either one (this information is used to infer if you're running phase0/1 or phase2 detector)";
1319  }
1321  throw cms::Exception("Configuration") << "Neither stripDigiSimLink or phase2OTSimLink are set, please set either one.";
1322  }
1323  }
1324 
1325  const bool tpRef = iConfig.getUntrackedParameter<bool>("trackingParticlesRef");
1326  const auto tpTag = iConfig.getUntrackedParameter<edm::InputTag>("trackingParticles");
1327  if(tpRef) {
1328  trackingParticleRefToken_ = consumes<TrackingParticleRefVector>(tpTag);
1329  }
1330  else {
1331  trackingParticleToken_ = consumes<TrackingParticleCollection>(tpTag);
1332  }
1333 
1334  tracer_.depth(-2); // as in SimTracker/TrackHistory/src/TrackClassifier.cc
1335 
1336  if(includeMVA_) {
1337  mvaQualityCollectionTokens_ = edm::vector_transform(iConfig.getUntrackedParameter<std::vector<std::string> >("trackMVAs"),
1338  [&](const std::string& tag) {
1339  return std::make_tuple(consumes<MVACollection>(edm::InputTag(tag, "MVAValues")),
1340  consumes<QualityMaskCollection>(edm::InputTag(tag, "QualityMasks")));
1341  });
1342  }
1343 
1344  usesResource(TFileService::kSharedResource);
1346  t = fs->make<TTree>("tree","tree");
1347 
1348  t->Branch("event" , &ev_event);
1349  t->Branch("lumi" , &ev_lumi);
1350  t->Branch("run" , &ev_run);
1351 
1352  //tracks
1353  t->Branch("trk_px" , &trk_px);
1354  t->Branch("trk_py" , &trk_py);
1355  t->Branch("trk_pz" , &trk_pz);
1356  t->Branch("trk_pt" , &trk_pt);
1357  t->Branch("trk_inner_px" , &trk_inner_px);
1358  t->Branch("trk_inner_py" , &trk_inner_py);
1359  t->Branch("trk_inner_pz" , &trk_inner_pz);
1360  t->Branch("trk_inner_pt" , &trk_inner_pt);
1361  t->Branch("trk_outer_px" , &trk_outer_px);
1362  t->Branch("trk_outer_py" , &trk_outer_py);
1363  t->Branch("trk_outer_pz" , &trk_outer_pz);
1364  t->Branch("trk_outer_pt" , &trk_outer_pt);
1365  t->Branch("trk_eta" , &trk_eta);
1366  t->Branch("trk_lambda" , &trk_lambda);
1367  t->Branch("trk_cotTheta" , &trk_cotTheta);
1368  t->Branch("trk_phi" , &trk_phi);
1369  t->Branch("trk_dxy" , &trk_dxy );
1370  t->Branch("trk_dz" , &trk_dz );
1371  t->Branch("trk_dxyPV" , &trk_dxyPV );
1372  t->Branch("trk_dzPV" , &trk_dzPV );
1373  t->Branch("trk_dxyClosestPV", &trk_dxyClosestPV );
1374  t->Branch("trk_dzClosestPV", &trk_dzClosestPV );
1375  t->Branch("trk_ptErr" , &trk_ptErr );
1376  t->Branch("trk_etaErr" , &trk_etaErr );
1377  t->Branch("trk_lambdaErr", &trk_lambdaErr);
1378  t->Branch("trk_phiErr" , &trk_phiErr );
1379  t->Branch("trk_dxyErr" , &trk_dxyErr );
1380  t->Branch("trk_dzErr" , &trk_dzErr );
1381  t->Branch("trk_refpoint_x", &trk_refpoint_x);
1382  t->Branch("trk_refpoint_y", &trk_refpoint_y);
1383  t->Branch("trk_refpoint_z", &trk_refpoint_z);
1384  t->Branch("trk_nChi2" , &trk_nChi2);
1385  t->Branch("trk_nChi2_1Dmod", &trk_nChi2_1Dmod);
1386  t->Branch("trk_ndof" , &trk_ndof);
1387  if(includeMVA_) {
1388  trk_mvas.resize(mvaQualityCollectionTokens_.size());
1390  if(!trk_mvas.empty()) {
1391  t->Branch("trk_mva" , &(trk_mvas[0]));
1392  t->Branch("trk_qualityMask", &(trk_qualityMasks[0]));
1393  for(size_t i=1; i<trk_mvas.size(); ++i) {
1394  t->Branch(("trk_mva"+std::to_string(i+1)).c_str(), &(trk_mvas[i]));
1395  t->Branch(("trk_qualityMask"+std::to_string(i+1)).c_str(), &(trk_qualityMasks[i]));
1396  }
1397  }
1398  }
1399  t->Branch("trk_q" , &trk_q);
1400  t->Branch("trk_nValid" , &trk_nValid );
1401  t->Branch("trk_nLost" , &trk_nLost);
1402  t->Branch("trk_nInactive", &trk_nInactive);
1403  t->Branch("trk_nPixel" , &trk_nPixel );
1404  t->Branch("trk_nStrip" , &trk_nStrip );
1405  t->Branch("trk_nOuterLost", &trk_nOuterLost);
1406  t->Branch("trk_nInnerLost", &trk_nInnerLost);
1407  t->Branch("trk_nOuterInactive", &trk_nOuterInactive);
1408  t->Branch("trk_nInnerInactive", &trk_nInnerInactive);
1409  t->Branch("trk_nPixelLay", &trk_nPixelLay);
1410  t->Branch("trk_nStripLay", &trk_nStripLay);
1411  t->Branch("trk_n3DLay" , &trk_n3DLay );
1412  t->Branch("trk_nLostLay" , &trk_nLostLay );
1413  t->Branch("trk_nCluster" , &trk_nCluster);
1414  t->Branch("trk_algo" , &trk_algo );
1415  t->Branch("trk_originalAlgo", &trk_originalAlgo);
1416  t->Branch("trk_algoMask" , &trk_algoMask);
1417  t->Branch("trk_stopReason", &trk_stopReason);
1418  t->Branch("trk_isHP" , &trk_isHP );
1419  if(includeSeeds_) {
1420  t->Branch("trk_seedIdx" , &trk_seedIdx );
1421  }
1422  t->Branch("trk_vtxIdx" , &trk_vtxIdx);
1424  t->Branch("trk_simTrkIdx", &trk_simTrkIdx );
1425  t->Branch("trk_simTrkShareFrac", &trk_simTrkShareFrac);
1426  t->Branch("trk_simTrkNChi2", &trk_simTrkNChi2);
1427  t->Branch("trk_bestSimTrkIdx", &trk_bestSimTrkIdx);
1428  t->Branch("trk_bestFromFirstHitSimTrkIdx", &trk_bestFromFirstHitSimTrkIdx);
1429  }
1430  else {
1431  t->Branch("trk_isTrue", &trk_isTrue);
1432  }
1433  t->Branch("trk_bestSimTrkShareFrac", &trk_bestSimTrkShareFrac);
1434  t->Branch("trk_bestSimTrkShareFracSimDenom", &trk_bestSimTrkShareFracSimDenom);
1435  t->Branch("trk_bestSimTrkShareFracSimClusterDenom", &trk_bestSimTrkShareFracSimClusterDenom);
1436  t->Branch("trk_bestSimTrkNChi2", &trk_bestSimTrkNChi2);
1437  t->Branch("trk_bestFromFirstHitSimTrkShareFrac", &trk_bestFromFirstHitSimTrkShareFrac);
1438  t->Branch("trk_bestFromFirstHitSimTrkShareFracSimDenom", &trk_bestFromFirstHitSimTrkShareFracSimDenom);
1439  t->Branch("trk_bestFromFirstHitSimTrkShareFracSimClusterDenom", &trk_bestFromFirstHitSimTrkShareFracSimClusterDenom);
1440  t->Branch("trk_bestFromFirstHitSimTrkNChi2", &trk_bestFromFirstHitSimTrkNChi2);
1441  if(includeAllHits_) {
1442  t->Branch("trk_hitIdx" , &trk_hitIdx);
1443  t->Branch("trk_hitType", &trk_hitType);
1444  }
1446  //sim tracks
1447  t->Branch("sim_event" , &sim_event );
1448  t->Branch("sim_bunchCrossing", &sim_bunchCrossing);
1449  t->Branch("sim_pdgId" , &sim_pdgId );
1450  t->Branch("sim_genPdgIds", &sim_genPdgIds);
1451  t->Branch("sim_isFromBHadron", &sim_isFromBHadron);
1452  t->Branch("sim_px" , &sim_px );
1453  t->Branch("sim_py" , &sim_py );
1454  t->Branch("sim_pz" , &sim_pz );
1455  t->Branch("sim_pt" , &sim_pt );
1456  t->Branch("sim_eta" , &sim_eta );
1457  t->Branch("sim_phi" , &sim_phi );
1458  t->Branch("sim_pca_pt" , &sim_pca_pt );
1459  t->Branch("sim_pca_eta" , &sim_pca_eta );
1460  t->Branch("sim_pca_lambda", &sim_pca_lambda);
1461  t->Branch("sim_pca_cotTheta", &sim_pca_cotTheta);
1462  t->Branch("sim_pca_phi" , &sim_pca_phi );
1463  t->Branch("sim_pca_dxy" , &sim_pca_dxy );
1464  t->Branch("sim_pca_dz" , &sim_pca_dz );
1465  t->Branch("sim_q" , &sim_q );
1466  t->Branch("sim_nValid" , &sim_nValid );
1467  t->Branch("sim_nPixel" , &sim_nPixel );
1468  t->Branch("sim_nStrip" , &sim_nStrip );
1469  t->Branch("sim_nLay" , &sim_nLay );
1470  t->Branch("sim_nPixelLay", &sim_nPixelLay);
1471  t->Branch("sim_n3DLay" , &sim_n3DLay );
1472  t->Branch("sim_nTrackerHits", &sim_nTrackerHits);
1473  t->Branch("sim_nRecoClusters", &sim_nRecoClusters);
1474  t->Branch("sim_trkIdx" , &sim_trkIdx );
1475  t->Branch("sim_trkShareFrac", &sim_trkShareFrac);
1476  if(includeSeeds_) {
1477  t->Branch("sim_seedIdx" , &sim_seedIdx );
1478  }
1479  t->Branch("sim_parentVtxIdx", &sim_parentVtxIdx);
1480  t->Branch("sim_decayVtxIdx", &sim_decayVtxIdx);
1481  if(includeAllHits_) {
1482  t->Branch("sim_simHitIdx" , &sim_simHitIdx );
1483  }
1484  }
1485  if(includeAllHits_) {
1486  //pixels
1487  t->Branch("pix_isBarrel" , &pix_isBarrel );
1488  pix_detId.book("pix", t);
1489  t->Branch("pix_trkIdx" , &pix_trkIdx );
1490  if(includeSeeds_) {
1491  t->Branch("pix_seeIdx" , &pix_seeIdx );
1492  }
1494  t->Branch("pix_simHitIdx" , &pix_simHitIdx);
1495  t->Branch("pix_chargeFraction", &pix_chargeFraction);
1496  t->Branch("pix_simType", &pix_simType);
1497  }
1498  t->Branch("pix_x" , &pix_x );
1499  t->Branch("pix_y" , &pix_y );
1500  t->Branch("pix_z" , &pix_z );
1501  t->Branch("pix_xx" , &pix_xx );
1502  t->Branch("pix_xy" , &pix_xy );
1503  t->Branch("pix_yy" , &pix_yy );
1504  t->Branch("pix_yz" , &pix_yz );
1505  t->Branch("pix_zz" , &pix_zz );
1506  t->Branch("pix_zx" , &pix_zx );
1507  t->Branch("pix_radL" , &pix_radL );
1508  t->Branch("pix_bbxi" , &pix_bbxi );
1509  t->Branch("pix_bbxi" , &pix_bbxi );
1510  //strips
1511  if(includeStripHits_){
1512  t->Branch("str_isBarrel" , &str_isBarrel );
1513  str_detId.book("str", t);
1514  t->Branch("str_trkIdx" , &str_trkIdx );
1515  if(includeSeeds_) {
1516  t->Branch("str_seeIdx" , &str_seeIdx );
1517  }
1519  t->Branch("str_simHitIdx" , &str_simHitIdx);
1520  t->Branch("str_chargeFraction", &str_chargeFraction);
1521  t->Branch("str_simType", &str_simType);
1522  }
1523  t->Branch("str_x" , &str_x );
1524  t->Branch("str_y" , &str_y );
1525  t->Branch("str_z" , &str_z );
1526  t->Branch("str_xx" , &str_xx );
1527  t->Branch("str_xy" , &str_xy );
1528  t->Branch("str_yy" , &str_yy );
1529  t->Branch("str_yz" , &str_yz );
1530  t->Branch("str_zz" , &str_zz );
1531  t->Branch("str_zx" , &str_zx );
1532  t->Branch("str_radL" , &str_radL );
1533  t->Branch("str_bbxi" , &str_bbxi );
1534  //matched hits
1535  t->Branch("glu_isBarrel" , &glu_isBarrel );
1536  glu_detId.book("glu", t);
1537  t->Branch("glu_monoIdx" , &glu_monoIdx );
1538  t->Branch("glu_stereoIdx" , &glu_stereoIdx);
1539  if(includeSeeds_) {
1540  t->Branch("glu_seeIdx" , &glu_seeIdx );
1541  }
1542  t->Branch("glu_x" , &glu_x );
1543  t->Branch("glu_y" , &glu_y );
1544  t->Branch("glu_z" , &glu_z );
1545  t->Branch("glu_xx" , &glu_xx );
1546  t->Branch("glu_xy" , &glu_xy );
1547  t->Branch("glu_yy" , &glu_yy );
1548  t->Branch("glu_yz" , &glu_yz );
1549  t->Branch("glu_zz" , &glu_zz );
1550  t->Branch("glu_zx" , &glu_zx );
1551  t->Branch("glu_radL" , &glu_radL );
1552  t->Branch("glu_bbxi" , &glu_bbxi );
1553  }
1554  //phase2 OT
1556  t->Branch("ph2_isBarrel" , &ph2_isBarrel );
1557  ph2_detId.book("ph2", t);
1558  t->Branch("ph2_trkIdx" , &ph2_trkIdx );
1559  if(includeSeeds_) {
1560  t->Branch("ph2_seeIdx" , &ph2_seeIdx );
1561  }
1563  t->Branch("ph2_simHitIdx" , &ph2_simHitIdx);
1564  t->Branch("ph2_simType", &ph2_simType);
1565  }
1566  t->Branch("ph2_x" , &ph2_x );
1567  t->Branch("ph2_y" , &ph2_y );
1568  t->Branch("ph2_z" , &ph2_z );
1569  t->Branch("ph2_xx" , &ph2_xx );
1570  t->Branch("ph2_xy" , &ph2_xy );
1571  t->Branch("ph2_yy" , &ph2_yy );
1572  t->Branch("ph2_yz" , &ph2_yz );
1573  t->Branch("ph2_zz" , &ph2_zz );
1574  t->Branch("ph2_zx" , &ph2_zx );
1575  t->Branch("ph2_radL" , &ph2_radL );
1576  t->Branch("ph2_bbxi" , &ph2_bbxi );
1577  t->Branch("ph2_bbxi" , &ph2_bbxi );
1578  }
1579  //invalid hits
1580  t->Branch("inv_isBarrel" , &inv_isBarrel );
1581  if(includeStripHits_) inv_detId.book("inv", t);
1582  else inv_detId_phase2.book("inv", t);
1583  t->Branch("inv_type" , &inv_type );
1584  //simhits
1586  if(includeStripHits_) simhit_detId.book("simhit", t);
1587  else simhit_detId_phase2.book("simhit", t);
1588  t->Branch("simhit_x" , &simhit_x);
1589  t->Branch("simhit_y" , &simhit_y);
1590  t->Branch("simhit_z" , &simhit_z);
1591  t->Branch("simhit_particle", &simhit_particle);
1592  t->Branch("simhit_process" , &simhit_process);
1593  t->Branch("simhit_eloss" , &simhit_eloss);
1594  t->Branch("simhit_tof" , &simhit_tof);
1595  t->Branch("simhit_simTrkIdx", &simhit_simTrkIdx);
1596  t->Branch("simhit_hitIdx" , &simhit_hitIdx);
1597  t->Branch("simhit_hitType" , &simhit_hitType);
1598  }
1599  }
1600  //beam spot
1601  t->Branch("bsp_x" , &bsp_x , "bsp_x/F");
1602  t->Branch("bsp_y" , &bsp_y , "bsp_y/F");
1603  t->Branch("bsp_z" , &bsp_z , "bsp_z/F");
1604  t->Branch("bsp_sigmax" , &bsp_sigmax , "bsp_sigmax/F");
1605  t->Branch("bsp_sigmay" , &bsp_sigmay , "bsp_sigmay/F");
1606  t->Branch("bsp_sigmaz" , &bsp_sigmaz , "bsp_sigmaz/F");
1607  if(includeSeeds_) {
1608  //seeds
1609  t->Branch("see_fitok" , &see_fitok );
1610  t->Branch("see_px" , &see_px );
1611  t->Branch("see_py" , &see_py );
1612  t->Branch("see_pz" , &see_pz );
1613  t->Branch("see_pt" , &see_pt );
1614  t->Branch("see_eta" , &see_eta );
1615  t->Branch("see_phi" , &see_phi );
1616  t->Branch("see_dxy" , &see_dxy );
1617  t->Branch("see_dz" , &see_dz );
1618  t->Branch("see_ptErr" , &see_ptErr );
1619  t->Branch("see_etaErr" , &see_etaErr );
1620  t->Branch("see_phiErr" , &see_phiErr );
1621  t->Branch("see_dxyErr" , &see_dxyErr );
1622  t->Branch("see_dzErr" , &see_dzErr );
1623  t->Branch("see_chi2" , &see_chi2 );
1624  t->Branch("see_statePt" , &see_statePt );
1625  t->Branch("see_stateTrajX", &see_stateTrajX);
1626  t->Branch("see_stateTrajY", &see_stateTrajY);
1627  t->Branch("see_stateTrajPx", &see_stateTrajPx);
1628  t->Branch("see_stateTrajPy", &see_stateTrajPy);
1629  t->Branch("see_stateTrajPz", &see_stateTrajPz);
1630  t->Branch("see_q" , &see_q );
1631  t->Branch("see_nValid" , &see_nValid );
1632  t->Branch("see_nPixel" , &see_nPixel );
1633  t->Branch("see_nGlued" , &see_nGlued );
1634  t->Branch("see_nStrip" , &see_nStrip );
1635  t->Branch("see_nPhase2OT", &see_nPhase2OT);
1636  t->Branch("see_nCluster" , &see_nCluster);
1637  t->Branch("see_algo" , &see_algo );
1638  t->Branch("see_stopReason", &see_stopReason);
1639  t->Branch("see_nCands" , &see_nCands );
1640  t->Branch("see_trkIdx" , &see_trkIdx );
1642  t->Branch("see_simTrkIdx", &see_simTrkIdx );
1643  t->Branch("see_simTrkShareFrac", &see_simTrkShareFrac);
1644  t->Branch("see_bestSimTrkIdx", &see_bestSimTrkIdx);
1645  t->Branch("see_bestFromFirstHitSimTrkIdx", &see_bestFromFirstHitSimTrkIdx);
1646  }
1647  else {
1648  t->Branch("see_isTrue", &see_isTrue);
1649  }
1650  t->Branch("see_bestSimTrkShareFrac", &see_bestSimTrkShareFrac);
1651  t->Branch("see_bestFromFirstHitSimTrkShareFrac", &see_bestFromFirstHitSimTrkShareFrac);
1652  if(includeAllHits_) {
1653  t->Branch("see_hitIdx" , &see_hitIdx );
1654  t->Branch("see_hitType", &see_hitType );
1655  }
1656  //seed algo offset
1657  t->Branch("see_offset" , &see_offset );
1658  }
1659 
1660  //vertices
1661  t->Branch("vtx_x" , &vtx_x);
1662  t->Branch("vtx_y" , &vtx_y);
1663  t->Branch("vtx_z" , &vtx_z);
1664  t->Branch("vtx_xErr" , &vtx_xErr);
1665  t->Branch("vtx_yErr" , &vtx_yErr);
1666  t->Branch("vtx_zErr" , &vtx_zErr);
1667  t->Branch("vtx_ndof" , &vtx_ndof);
1668  t->Branch("vtx_chi2" , &vtx_chi2);
1669  t->Branch("vtx_fake" , &vtx_fake);
1670  t->Branch("vtx_valid" , &vtx_valid);
1671  t->Branch("vtx_trkIdx" , &vtx_trkIdx);
1672 
1673  // tracking vertices
1674  t->Branch("simvtx_event" , &simvtx_event );
1675  t->Branch("simvtx_bunchCrossing", &simvtx_bunchCrossing);
1676  t->Branch("simvtx_processType", &simvtx_processType);
1677  t->Branch("simvtx_x" , &simvtx_x);
1678  t->Branch("simvtx_y" , &simvtx_y);
1679  t->Branch("simvtx_z" , &simvtx_z);
1680  t->Branch("simvtx_sourceSimIdx", &simvtx_sourceSimIdx);
1681  t->Branch("simvtx_daughterSimIdx", &simvtx_daughterSimIdx);
1682 
1683  t->Branch("simpv_idx" , &simpv_idx);
1684 
1685  //t->Branch("" , &);
1686 }
std::vector< unsigned int > sim_nTrackerHits
std::vector< int > trk_bestSimTrkIdx
std::vector< float > sim_pca_dz
edm::LuminosityBlockNumber_t ev_lumi
std::vector< float > trk_nChi2_1Dmod
static const std::string kSharedResource
Definition: TFileService.h:76
std::vector< unsigned int > simvtx_processType
edm::EDGetTokenT< TrackingParticleRefVector > trackingParticleRefToken_
std::vector< unsigned int > sim_nLay
std::vector< float > ph2_radL
std::vector< float > trk_dxyPV
std::vector< float > see_bestSimTrkShareFrac
std::vector< std::vector< float > > see_simTrkShareFrac
edm::EDGetTokenT< SiStripMatchedRecHit2DCollection > stripMatchedRecHitToken_
T getUntrackedParameter(std::string const &, T const &) const
std::vector< short > see_fitok
std::vector< short > vtx_fake
std::vector< float > simvtx_z
std::vector< std::vector< float > > trk_simTrkNChi2
std::vector< std::vector< int > > see_hitType
std::vector< float > trk_dzClosestPV
edm::EDGetTokenT< SiStripRecHit2DCollection > stripRphiRecHitToken_
std::vector< short > ph2_isBarrel
DetIdStrip str_detId
std::vector< float > trk_phi
std::vector< float > sim_pca_cotTheta
std::vector< float > sim_pca_dxy
std::vector< float > see_stateTrajX
std::vector< unsigned int > trk_nOuterLost
std::vector< float > glu_xy
std::vector< short > trk_isTrue
std::vector< std::vector< int > > ph2_seeIdx
std::vector< float > glu_radL
std::vector< float > trk_inner_pz
std::vector< float > see_stateTrajPy
std::vector< float > pix_y
std::vector< int > trk_vtxIdx
std::vector< std::vector< int > > str_trkIdx
std::vector< unsigned int > see_nValid
std::vector< float > str_yy
std::vector< float > trk_outer_py
std::vector< float > pix_zz
std::vector< float > ph2_bbxi
std::vector< int > glu_monoIdx
std::vector< float > trk_eta
std::vector< short > glu_isBarrel
std::vector< int > sim_bunchCrossing
std::vector< float > see_phiErr
std::vector< int > trk_bestFromFirstHitSimTrkIdx
std::vector< std::vector< int > > simhit_hitIdx
std::vector< float > str_x
std::vector< float > see_dzErr
std::vector< unsigned int > sim_n3DLay
std::vector< float > trk_cotTheta
std::vector< float > trk_bestSimTrkNChi2
std::vector< unsigned int > see_nStrip
std::vector< float > trk_px
std::vector< unsigned short > pix_simType
std::vector< unsigned short > inv_type
std::vector< float > see_stateTrajPz
std::vector< float > pix_zx
std::vector< float > sim_phi
std::vector< std::vector< int > > trk_simTrkIdx
std::vector< float > trk_dzPV
edm::EDGetTokenT< reco::TrackToTrackingParticleAssociator > trackAssociatorToken_
edm::EDGetTokenT< SiStripRecHit2DCollection > stripStereoRecHitToken_
std::vector< float > trk_dxyErr
std::vector< float > str_yz
std::vector< float > trk_pt
std::vector< float > glu_x
std::vector< float > trk_inner_py
std::vector< float > see_px
std::vector< float > see_chi2
std::vector< float > glu_z
std::vector< float > see_stateTrajY
edm::EDGetTokenT< edm::View< reco::Track > > trackToken_
std::vector< unsigned short > see_stopReason
std::vector< float > trk_outer_px
std::vector< std::vector< int > > trk_hitType
std::vector< unsigned int > trk_nCluster
DetIdPixel pix_detId
std::vector< float > ph2_xx
std::vector< std::vector< int > > ph2_trkIdx
edm::EDGetTokenT< Phase2TrackerRecHit1DCollectionNew > phase2OTRecHitToken_
std::vector< unsigned int > see_algo
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
std::vector< float > trk_inner_pt
std::vector< short > simhit_process
std::vector< float > trk_bestSimTrkShareFracSimClusterDenom
std::vector< std::vector< int > > str_seeIdx
std::vector< std::vector< int > > see_simTrkIdx
std::vector< int > simvtx_event
std::vector< float > str_radL
std::vector< int > simhit_simTrkIdx
std::vector< unsigned short > trk_stopReason
std::vector< float > sim_py
std::vector< float > sim_px
std::vector< float > pix_xx
std::vector< std::vector< int > > sim_decayVtxIdx
std::vector< float > trk_refpoint_x
std::vector< float > pix_radL
std::vector< float > pix_bbxi
std::vector< std::vector< float > > sim_trkShareFrac
std::vector< std::vector< float > > trk_mvas
std::vector< float > ph2_zx
std::vector< int > simpv_idx
edm::EDGetTokenT< edm::DetSetVector< PixelDigiSimLink > > pixelSimLinkToken_
std::vector< std::vector< int > > pix_seeIdx
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
std::vector< unsigned short > str_simType
std::vector< int > sim_q
std::vector< short > see_isTrue
std::vector< short > inv_isBarrel
std::vector< float > trk_bestSimTrkShareFracSimDenom
std::vector< float > trk_bestFromFirstHitSimTrkNChi2
std::vector< float > see_etaErr
std::vector< std::vector< float > > trk_simTrkShareFrac
std::vector< float > simhit_z
std::vector< float > ph2_z
std::vector< float > ph2_yy
std::vector< float > trk_refpoint_y
std::vector< unsigned int > trk_nLostLay
std::vector< int > sim_event
std::vector< unsigned int > trk_nStrip
std::vector< int > see_bestSimTrkIdx
edm::EDGetTokenT< edm::ValueMap< unsigned int > > tpNStripStereoLayersToken_
std::string parametersDefinerName_
std::vector< unsigned int > trk_nPixel
std::vector< float > glu_y
std::vector< float > trk_pz
std::vector< float > trk_dzErr
std::vector< float > trk_lambdaErr
std::vector< unsigned int > see_nCluster
edm::EDGetTokenT< SiPixelRecHitCollection > pixelRecHitToken_
std::vector< float > ph2_y
std::vector< std::tuple< edm::EDGetTokenT< MVACollection >, edm::EDGetTokenT< QualityMaskCollection > > > mvaQualityCollectionTokens_
std::vector< std::vector< int > > simvtx_sourceSimIdx
std::vector< float > trk_bestFromFirstHitSimTrkShareFracSimDenom
std::vector< float > trk_etaErr
std::vector< short > pix_isBarrel
edm::EDGetTokenT< edm::DetSetVector< PixelDigiSimLink > > siphase2OTSimLinksToken_
std::vector< float > glu_yz
std::vector< float > sim_pca_phi
std::vector< unsigned int > trk_algo
std::vector< unsigned int > sim_nRecoClusters
std::vector< float > ph2_xy
std::vector< float > trk_bestFromFirstHitSimTrkShareFracSimClusterDenom
std::vector< float > vtx_y
std::vector< float > pix_z
std::vector< int > see_bestFromFirstHitSimTrkIdx
std::vector< float > sim_eta
std::vector< unsigned int > trk_originalAlgo
std::vector< unsigned int > trk_nInnerLost
std::vector< float > str_y
std::vector< int > sim_pdgId
std::vector< int > see_q
std::vector< std::vector< int > > simhit_hitType
std::vector< float > trk_refpoint_z
std::vector< unsigned int > trk_nInactive
std::vector< edm::EDGetTokenT< edm::View< reco::Track > > > seedTokens_
edm::EDGetTokenT< SimHitTPAssociationProducer::SimHitTPAssociationList > simHitTPMapToken_
std::vector< unsigned int > trk_nOuterInactive
std::vector< float > pix_yz
std::vector< std::vector< int > > sim_genPdgIds
std::vector< int > trk_seedIdx
std::vector< std::vector< float > > pix_chargeFraction
edm::RunNumber_t ev_run
std::vector< float > vtx_yErr
std::vector< std::vector< int > > pix_trkIdx
std::vector< unsigned int > sim_nValid
std::vector< float > glu_yy
std::vector< float > vtx_ndof
std::vector< std::vector< int > > ph2_simHitIdx
std::vector< float > simvtx_x
std::vector< float > str_zz
DetIdAllPhase2 inv_detId_phase2
std::vector< float > sim_pca_pt
DetIdPhase2OT ph2_detId
std::vector< float > see_dxyErr
std::vector< float > trk_bestFromFirstHitSimTrkShareFrac
std::vector< float > see_pt
std::vector< unsigned int > see_nPhase2OT
edm::EDGetTokenT< TrackingVertexCollection > trackingVertexToken_
std::vector< float > see_dxy
std::vector< std::vector< int > > glu_seeIdx
std::vector< unsigned int > trk_n3DLay
std::vector< std::vector< int > > sim_trkIdx
std::vector< float > trk_outer_pt
const bool includeSeeds_
const bool includeTrackingParticles_
std::vector< float > trk_dz
std::vector< float > trk_ptErr
std::vector< unsigned int > trk_nStripLay
std::vector< float > see_phi
std::vector< float > vtx_z
std::vector< float > see_pz
std::vector< float > trk_phiErr
std::vector< unsigned int > sim_nPixelLay
std::vector< float > trk_lambda
std::vector< edm::EDGetTokenT< std::vector< SeedStopInfo > > > seedStopInfoTokens_
std::vector< float > glu_zz
std::vector< float > sim_pca_lambda
std::vector< float > see_stateTrajPx
std::vector< float > glu_zx
std::vector< float > vtx_xErr
std::vector< float > sim_pz
std::vector< std::vector< int > > sim_simHitIdx
edm::EventNumber_t ev_event
std::vector< float > ph2_x
edm::EDGetTokenT< TrackingParticleCollection > trackingParticleToken_
edm::EDGetTokenT< reco::VertexCollection > vertexToken_
std::vector< int > glu_stereoIdx
auto vector_transform(std::vector< InputType > const &input, Function predicate) -> std::vector< typename std::remove_cv< typename std::remove_reference< decltype(predicate(input.front()))>::type >::type >
Definition: transform.h:11
std::vector< float > trk_py
std::vector< std::vector< int > > pix_simHitIdx
std::vector< float > trk_nChi2
std::vector< std::vector< unsigned short > > trk_qualityMasks
std::vector< unsigned int > see_nGlued
std::vector< float > see_py
std::vector< float > pix_x
std::vector< int > sim_parentVtxIdx
std::vector< float > see_ptErr
const bool includeMVA_
std::vector< float > str_z
std::vector< float > str_zx
HistoryBase tracer_
std::vector< short > trk_isHP
std::vector< float > str_xy
std::vector< std::vector< float > > str_chargeFraction
std::vector< unsigned int > trk_nInnerInactive
std::vector< std::vector< int > > trk_hitIdx
std::string const & label() const
Definition: InputTag.h:36
std::vector< int > trk_q
std::vector< unsigned int > sim_nPixel
const bool includeAllHits_
std::vector< short > vtx_valid
edm::EDGetTokenT< ClusterTPAssociation > clusterTPMapToken_
std::vector< std::vector< int > > vtx_trkIdx
std::vector< short > str_isBarrel
void depth(int d)
Set the depth of the history.
Definition: HistoryBase.h:49
std::vector< float > glu_bbxi
std::vector< int > simhit_particle
std::vector< float > trk_outer_pz
edm::EDGetTokenT< edm::ValueMap< unsigned int > > tpNLayersToken_
std::vector< unsigned short > ph2_simType
std::vector< float > sim_pca_eta
std::vector< float > ph2_yz
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_
std::vector< float > simhit_y
std::vector< float > trk_dxyClosestPV
std::vector< std::vector< int > > str_simHitIdx
std::vector< float > see_statePt
std::string builderName_
std::vector< float > trk_ndof
std::vector< float > glu_xx
edm::EDGetTokenT< edm::ValueMap< unsigned int > > tpNPixelLayersToken_
std::vector< unsigned int > trk_nPixelLay
std::vector< float > simhit_x
std::vector< float > simvtx_y
std::vector< unsigned short > see_nCands
std::vector< std::vector< int > > simvtx_daughterSimIdx
std::vector< float > str_xx
std::vector< float > trk_bestSimTrkShareFrac
std::vector< unsigned int > see_offset
std::vector< float > ph2_zz
std::vector< int > see_trkIdx
std::vector< float > simhit_tof
std::vector< std::vector< int > > sim_seedIdx
std::vector< float > pix_xy
std::vector< float > trk_dxy
std::vector< float > sim_pt
std::vector< float > pix_yy
std::vector< decltype(reco::TrackBase().algoMaskUL())> trk_algoMask
std::vector< std::vector< int > > see_hitIdx
std::vector< float > vtx_x
std::vector< unsigned int > see_nPixel
std::vector< float > see_eta
DetIdAllPhase2 simhit_detId_phase2
std::vector< unsigned int > trk_nValid
std::vector< unsigned int > trk_nLost
std::vector< float > trk_inner_px
DetIdStrip glu_detId
std::vector< float > vtx_zErr
std::vector< float > simhit_eloss
std::vector< float > see_bestFromFirstHitSimTrkShareFrac
std::vector< int > sim_isFromBHadron
edm::EDGetTokenT< edm::DetSetVector< StripDigiSimLink > > stripSimLinkToken_
std::vector< float > vtx_chi2
std::vector< int > simvtx_bunchCrossing
std::vector< float > str_bbxi
std::vector< float > see_dz
std::vector< unsigned int > sim_nStrip
TrackingNtuple::~TrackingNtuple ( )
override

Definition at line 1689 of file TrackingNtuple.cc.

1689  {
1690  // do anything here that needs to be done at desctruction time
1691  // (e.g. close files, deallocate resources etc.)
1692 }

Member Function Documentation

size_t TrackingNtuple::addStripMatchedHit ( const SiStripMatchedRecHit2D hit,
const TransientTrackingRecHitBuilder theTTRHBuilder,
const TrackerTopology tTopo,
std::vector< std::pair< int, int > > &  monoStereoClusterList 
)
private

Definition at line 2566 of file TrackingNtuple.cc.

References TransientTrackingRecHitBuilder::build(), SiStripRecHit2D::cluster(), TrackingRecHit::geographicalId(), glu_bbxi, glu_detId, glu_isBarrel, glu_monoIdx, glu_radL, glu_seeIdx, glu_stereoIdx, glu_x, glu_xx, glu_xy, glu_y, glu_yy, glu_yz, glu_z, glu_zx, glu_zz, edm::Ref< C, T, F >::key(), TrackerTopology::layer(), LogTrace, SiStripMatchedRecHit2D::monoHit(), SiStripMatchedRecHit2D::stereoHit(), StripSubdetector::TIB, and StripSubdetector::TOB.

Referenced by fillSeeds(), and fillStripMatchedHits().

2570  {
2571  TransientTrackingRecHit::RecHitPointer ttrh = theTTRHBuilder.build(&hit);
2572  const auto hitId = hit.geographicalId();
2573  const int lay = tTopo.layer(hitId);
2574  monoStereoClusterList.emplace_back(hit.monoHit().cluster().key(),hit.stereoHit().cluster().key());
2575  glu_isBarrel .push_back( (hitId.subdetId()==StripSubdetector::TIB || hitId.subdetId()==StripSubdetector::TOB) );
2576  glu_detId .push_back( tTopo, hitId );
2577  glu_monoIdx .push_back( hit.monoHit().cluster().key() );
2578  glu_stereoIdx.push_back( hit.stereoHit().cluster().key() );
2579  glu_seeIdx .emplace_back(); // filled in fillSeeds
2580  glu_x .push_back( ttrh->globalPosition().x() );
2581  glu_y .push_back( ttrh->globalPosition().y() );
2582  glu_z .push_back( ttrh->globalPosition().z() );
2583  glu_xx .push_back( ttrh->globalPositionError().cxx() );
2584  glu_xy .push_back( ttrh->globalPositionError().cyx() );
2585  glu_yy .push_back( ttrh->globalPositionError().cyy() );
2586  glu_yz .push_back( ttrh->globalPositionError().czy() );
2587  glu_zz .push_back( ttrh->globalPositionError().czz() );
2588  glu_zx .push_back( ttrh->globalPositionError().czx() );
2589  glu_radL .push_back( ttrh->surface()->mediumProperties().radLen() );
2590  glu_bbxi .push_back( ttrh->surface()->mediumProperties().xi() );
2591  LogTrace("TrackingNtuple") << "stripMatchedHit"
2592  << " cluster0=" << hit.stereoHit().cluster().key()
2593  << " cluster1=" << hit.monoHit().cluster().key()
2594  << " subdId=" << hitId.subdetId()
2595  << " lay=" << lay
2596  << " rawId=" << hitId.rawId()
2597  << " pos =" << ttrh->globalPosition();
2598  return glu_isBarrel.size()-1;
2599 }
std::vector< float > glu_xy
std::vector< float > glu_radL
std::vector< int > glu_monoIdx
std::vector< short > glu_isBarrel
std::vector< float > glu_x
std::vector< float > glu_z
key_type key() const
Accessor for product key.
Definition: Ref.h:263
std::vector< float > glu_y
std::vector< float > glu_yz
std::vector< float > glu_yy
ClusterRef cluster() const
std::vector< std::vector< int > > glu_seeIdx
#define LogTrace(id)
std::vector< float > glu_zz
std::vector< float > glu_zx
std::shared_ptr< TrackingRecHit const > RecHitPointer
virtual RecHitPointer build(const TrackingRecHit *p) const =0
build a tracking rechit from an existing rechit
std::vector< int > glu_stereoIdx
SiStripRecHit2D stereoHit() const
unsigned int layer(const DetId &id) const
SiStripRecHit2D monoHit() const
std::vector< float > glu_bbxi
std::vector< float > glu_xx
DetId geographicalId() const
DetIdStrip glu_detId
void TrackingNtuple::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 1986 of file TrackingNtuple.cc.

References EncodedEventId::bunchCrossing(), clearVariables(), edm::EventID::event(), TrackingVertex::eventId(), Exception, fillBeamSpot(), fillPhase2OTHits(), fillPixelHits(), fillSeeds(), fillSimHits(), fillStripMatchedHits(), fillStripRphiStereoHits(), fillTrackingParticles(), fillTrackingVertices(), fillTracks(), fillVertices(), edm::EventSetup::get(), edm::Event::getByToken(), mps_fire::i, edm::EventBase::id(), edm::EDGetTokenT< T >::isUninitialized(), LogDebug, edm::EventID::luminosityBlock(), edm::Handle< T >::product(), edm::RefToBaseVector< T >::push_back(), edm::RefVector< C, T, F >::push_back(), edm::View< T >::refAt(), edm::EventID::run(), edm::RefVector< C, T, F >::size(), edm::View< T >::size(), findQualityFiles::size, tpHitIndexListLessSort(), findQualityFiles::v, and electrons_cff::vertices.

1986  {
1987 
1988  using namespace edm;
1989  using namespace reco;
1990  using namespace std;
1991 
1993  iSetup.get<IdealMagneticFieldRecord>().get(mfHandle);
1994  const auto& mf = *mfHandle;
1995 
1997  iSetup.get<TransientRecHitRecord>().get(builderName_,theTTRHBuilder);
1998 
1999  edm::ESHandle<TrackerTopology> tTopoHandle;
2000  iSetup.get<TrackerTopologyRcd>().get(tTopoHandle);
2001  const TrackerTopology& tTopo = *tTopoHandle;
2002 
2003  edm::ESHandle<TrackerGeometry> geometryHandle;
2004  iSetup.get<TrackerDigiGeometryRecord>().get(geometryHandle);
2005  const TrackerGeometry &tracker = *geometryHandle;
2006 
2008  iEvent.getByToken(trackAssociatorToken_, theAssociator);
2009  const reco::TrackToTrackingParticleAssociator& associatorByHits = *theAssociator;
2010 
2011  LogDebug("TrackingNtuple") << "Analyzing new event";
2012 
2013  //initialize tree variables
2014  clearVariables();
2015 
2016  // FIXME: we really need to move to edm::View for reading the
2017  // TrackingParticles... Unfortunately it has non-trivial
2018  // consequences on the associator/association interfaces etc.
2020  const TrackingParticleRefVector *tmpTPptr = nullptr;
2022  edm::Handle<TrackingParticleRefVector> TPCollectionHRefVector;
2023 
2025  iEvent.getByToken(trackingParticleToken_, TPCollectionH);
2026  for(size_t i=0, size=TPCollectionH->size(); i<size; ++i) {
2027  tmpTP.push_back(TrackingParticleRef(TPCollectionH, i));
2028  }
2029  tmpTPptr = &tmpTP;
2030  }
2031  else {
2032  iEvent.getByToken(trackingParticleRefToken_, TPCollectionHRefVector);
2033  tmpTPptr = TPCollectionHRefVector.product();
2034  }
2035  const TrackingParticleRefVector& tpCollection = *tmpTPptr;
2036 
2037  // Fill mapping from Ref::key() to index
2038  TrackingParticleRefKeyToIndex tpKeyToIndex;
2039  for(size_t i=0; i<tpCollection.size(); ++i) {
2040  tpKeyToIndex[tpCollection[i].key()] = i;
2041  }
2042 
2043  // tracking vertices
2045  iEvent.getByToken(trackingVertexToken_, htv);
2046  const TrackingVertexCollection& tvs = *htv;
2047 
2048  // Fill mapping from Ref::key() to index
2049  TrackingVertexRefVector tvRefs;
2050  TrackingVertexRefKeyToIndex tvKeyToIndex;
2051  for(size_t i=0; i<tvs.size(); ++i) {
2052  const TrackingVertex& v = tvs[i];
2053  if(v.eventId().bunchCrossing() != 0) // Ignore OOTPU; would be better to not to hardcode?
2054  continue;
2055  tvKeyToIndex[i] = tvRefs.size();
2056  tvRefs.push_back(TrackingVertexRef(htv, i));
2057  }
2058 
2059  //get association maps, etc.
2060  Handle<ClusterTPAssociation> pCluster2TPListH;
2061  iEvent.getByToken(clusterTPMapToken_, pCluster2TPListH);
2062  const ClusterTPAssociation& clusterToTPMap = *pCluster2TPListH;
2064  iEvent.getByToken(simHitTPMapToken_, simHitsTPAssoc);
2065 
2066  // TP -> cluster count
2067  TrackingParticleRefKeyToCount tpKeyToClusterCount;
2068  for(const auto& clusterTP: clusterToTPMap) {
2069  tpKeyToClusterCount[clusterTP.second.key()] += 1;
2070  }
2071 
2072  // SimHit key -> index mapping
2073  SimHitRefKeyToIndex simHitRefKeyToIndex;
2074 
2075  //make a list to link TrackingParticles to its simhits
2076  std::vector<TPHitIndex> tpHitList;
2077 
2078  // Count the number of reco cluster per TP
2079 
2080  std::set<edm::ProductID> hitProductIds;
2081  std::map<edm::ProductID, size_t> seedCollToOffset;
2082 
2083  ev_run = iEvent.id().run();
2084  ev_lumi = iEvent.id().luminosityBlock();
2085  ev_event = iEvent.id().event();
2086 
2087  // Digi->Sim links for pixels and strips
2088  edm::Handle<edm::DetSetVector<PixelDigiSimLink> > pixelDigiSimLinksHandle;
2089  iEvent.getByToken(pixelSimLinkToken_, pixelDigiSimLinksHandle);
2090  const auto& pixelDigiSimLinks = *pixelDigiSimLinksHandle;
2091 
2092  edm::Handle<edm::DetSetVector<StripDigiSimLink> > stripDigiSimLinksHandle;
2093  iEvent.getByToken(stripSimLinkToken_, stripDigiSimLinksHandle);
2094 
2095  // Phase2 OT DigiSimLink
2096  edm::Handle<edm::DetSetVector<PixelDigiSimLink> > siphase2OTSimLinksHandle;
2097  iEvent.getByToken(siphase2OTSimLinksToken_, siphase2OTSimLinksHandle);
2098 
2099  //beamspot
2100  Handle<reco::BeamSpot> recoBeamSpotHandle;
2101  iEvent.getByToken(beamSpotToken_, recoBeamSpotHandle);
2102  BeamSpot const & bs = *recoBeamSpotHandle;
2103  fillBeamSpot(bs);
2104 
2105 
2106  //prapare list to link matched hits to collection
2107  vector<pair<int,int> > monoStereoClusterList;
2108  if(includeAllHits_) {
2109  // simhits, only if TPs are saved as well
2111  fillSimHits(tracker, tpKeyToIndex, *simHitsTPAssoc, tTopo, simHitRefKeyToIndex, tpHitList);
2112  }
2113 
2114  //pixel hits
2115  fillPixelHits(iEvent, clusterToTPMap, tpKeyToIndex, *simHitsTPAssoc, pixelDigiSimLinks, *theTTRHBuilder, tTopo, simHitRefKeyToIndex, hitProductIds);
2116 
2117  //strip hits
2118  if(includeStripHits_){
2119  LogDebug("TrackingNtuple") << "foundStripSimLink" ;
2120  const auto& stripDigiSimLinks = *stripDigiSimLinksHandle;
2121  fillStripRphiStereoHits(iEvent, clusterToTPMap, tpKeyToIndex, *simHitsTPAssoc, stripDigiSimLinks, *theTTRHBuilder, tTopo, simHitRefKeyToIndex, hitProductIds);
2122 
2123  //matched hits
2124  fillStripMatchedHits(iEvent, *theTTRHBuilder, tTopo, monoStereoClusterList);
2125  }
2126 
2128  LogDebug("TrackingNtuple") << "foundPhase2OTSimLinks" ;
2129  const auto& phase2OTSimLinks = *siphase2OTSimLinksHandle;
2130  fillPhase2OTHits(iEvent, clusterToTPMap, tpKeyToIndex, *simHitsTPAssoc, phase2OTSimLinks, *theTTRHBuilder, tTopo, simHitRefKeyToIndex, hitProductIds);
2131  }
2132  }
2133 
2134  //seeds
2135  if(includeSeeds_) {
2136  fillSeeds(iEvent, tpCollection, tpKeyToIndex, bs, associatorByHits, clusterToTPMap, *theTTRHBuilder, mf, tTopo, monoStereoClusterList, hitProductIds, seedCollToOffset);
2137  }
2138 
2139  //tracks
2140  edm::Handle<edm::View<reco::Track> > tracksHandle;
2141  iEvent.getByToken(trackToken_, tracksHandle);
2142  const edm::View<reco::Track>& tracks = *tracksHandle;
2143  // The associator interfaces really need to be fixed...
2145  for(edm::View<Track>::size_type i=0; i<tracks.size(); ++i) {
2146  trackRefs.push_back(tracks.refAt(i));
2147  }
2148  std::vector<const MVACollection *> mvaColls;
2149  std::vector<const QualityMaskCollection *> qualColls;
2150  if(includeMVA_) {
2153 
2154  for(const auto& tokenTpl: mvaQualityCollectionTokens_) {
2155  iEvent.getByToken(std::get<0>(tokenTpl), hmva);
2156  iEvent.getByToken(std::get<1>(tokenTpl), hqual);
2157 
2158  mvaColls.push_back(hmva.product());
2159  qualColls.push_back(hqual.product());
2160  if(mvaColls.back()->size() != tracks.size()) {
2161  throw cms::Exception("Configuration") << "Inconsistency in track collection and MVA sizes. Track collection has " << tracks.size() << " tracks, whereas the MVA " << (mvaColls.size()-1) << " has " << mvaColls.back()->size() << " entries. Double-check your configuration.";
2162  }
2163  if(qualColls.back()->size() != tracks.size()) {
2164  throw cms::Exception("Configuration") << "Inconsistency in track collection and quality mask sizes. Track collection has " << tracks.size() << " tracks, whereas the quality mask " << (qualColls.size()-1) << " has " << qualColls.back()->size() << " entries. Double-check your configuration.";
2165  }
2166  }
2167  }
2168 
2170  iEvent.getByToken(vertexToken_, vertices);
2171 
2172  fillTracks(trackRefs, tpCollection, tpKeyToIndex, tpKeyToClusterCount, mf, bs, *vertices, associatorByHits, clusterToTPMap, *theTTRHBuilder, tTopo, hitProductIds, seedCollToOffset, mvaColls, qualColls);
2173 
2174  //tracking particles
2175  //sort association maps with simHits
2176  std::sort( tpHitList.begin(), tpHitList.end(), tpHitIndexListLessSort );
2177  fillTrackingParticles(iEvent, iSetup, trackRefs, bs, tpCollection, tvKeyToIndex, associatorByHits, tpHitList, tpKeyToClusterCount);
2178 
2179  // vertices
2180  fillVertices(*vertices, trackRefs);
2181 
2182  // tracking vertices
2183  fillTrackingVertices(tvRefs, tpKeyToIndex);
2184 
2185  t->Fill();
2186 
2187 }
#define LogDebug(id)
RunNumber_t run() const
Definition: EventID.h:39
size
Write out results.
edm::LuminosityBlockNumber_t ev_lumi
edm::EDGetTokenT< TrackingParticleRefVector > trackingParticleRefToken_
EventNumber_t event() const
Definition: EventID.h:41
unsigned int size_type
Definition: View.h:90
void fillTrackingVertices(const TrackingVertexRefVector &trackingVertices, const TrackingParticleRefKeyToIndex &tpKeyToIndex)
void fillStripMatchedHits(const edm::Event &iEvent, const TransientTrackingRecHitBuilder &theTTRHBuilder, const TrackerTopology &tTopo, std::vector< std::pair< int, int > > &monoStereoClusterList)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
void fillPixelHits(const edm::Event &iEvent, const ClusterTPAssociation &clusterToTPMap, const TrackingParticleRefKeyToIndex &tpKeyToIndex, const SimHitTPAssociationProducer::SimHitTPAssociationList &simHitsTPAssoc, const edm::DetSetVector< PixelDigiSimLink > &digiSimLink, const TransientTrackingRecHitBuilder &theTTRHBuilder, const TrackerTopology &tTopo, const SimHitRefKeyToIndex &simHitRefKeyToIndex, std::set< edm::ProductID > &hitProductIds)
void fillStripRphiStereoHits(const edm::Event &iEvent, const ClusterTPAssociation &clusterToTPMap, const TrackingParticleRefKeyToIndex &tpKeyToIndex, const SimHitTPAssociationProducer::SimHitTPAssociationList &simHitsTPAssoc, const edm::DetSetVector< StripDigiSimLink > &digiSimLink, const TransientTrackingRecHitBuilder &theTTRHBuilder, const TrackerTopology &tTopo, const SimHitRefKeyToIndex &simHitRefKeyToIndex, std::set< edm::ProductID > &hitProductIds)
edm::EDGetTokenT< reco::TrackToTrackingParticleAssociator > trackAssociatorToken_
edm::EDGetTokenT< edm::View< reco::Track > > trackToken_
void fillBeamSpot(const reco::BeamSpot &bs)
size_type size() const
LuminosityBlockNumber_t luminosityBlock() const
Definition: EventID.h:40
void fillPhase2OTHits(const edm::Event &iEvent, const ClusterTPAssociation &clusterToTPMap, const TrackingParticleRefKeyToIndex &tpKeyToIndex, const SimHitTPAssociationProducer::SimHitTPAssociationList &simHitsTPAssoc, const edm::DetSetVector< PixelDigiSimLink > &digiSimLink, const TransientTrackingRecHitBuilder &theTTRHBuilder, const TrackerTopology &tTopo, const SimHitRefKeyToIndex &simHitRefKeyToIndex, std::set< edm::ProductID > &hitProductIds)
edm::EDGetTokenT< edm::DetSetVector< PixelDigiSimLink > > pixelSimLinkToken_
RefToBase< value_type > refAt(size_type i) const
std::vector< std::tuple< edm::EDGetTokenT< MVACollection >, edm::EDGetTokenT< QualityMaskCollection > > > mvaQualityCollectionTokens_
edm::EDGetTokenT< edm::DetSetVector< PixelDigiSimLink > > siphase2OTSimLinksToken_
int bunchCrossing() const
get the detector field from this detid
edm::EDGetTokenT< SimHitTPAssociationProducer::SimHitTPAssociationList > simHitTPMapToken_
edm::RunNumber_t ev_run
void fillSeeds(const edm::Event &iEvent, const TrackingParticleRefVector &tpCollection, const TrackingParticleRefKeyToIndex &tpKeyToIndex, const reco::BeamSpot &bs, const reco::TrackToTrackingParticleAssociator &associatorByHits, const ClusterTPAssociation &clusterToTPMap, const TransientTrackingRecHitBuilder &theTTRHBuilder, const MagneticField &theMF, const TrackerTopology &tTopo, std::vector< std::pair< int, int > > &monoStereoClusterList, const std::set< edm::ProductID > &hitProductIds, std::map< edm::ProductID, size_t > &seedToCollIndex)
edm::EDGetTokenT< TrackingVertexCollection > trackingVertexToken_
static bool tpHitIndexListLessSort(const TPHitIndex &i, const TPHitIndex &j)
const bool includeSeeds_
const bool includeTrackingParticles_
void fillSimHits(const TrackerGeometry &tracker, const TrackingParticleRefKeyToIndex &tpKeyToIndex, const SimHitTPAssociationProducer::SimHitTPAssociationList &simHitsTPAssoc, const TrackerTopology &tTopo, SimHitRefKeyToIndex &simHitRefKeyToIndex, std::vector< TPHitIndex > &tpHitList)
void fillTrackingParticles(const edm::Event &iEvent, const edm::EventSetup &iSetup, const edm::RefToBaseVector< reco::Track > &tracks, const reco::BeamSpot &bs, const TrackingParticleRefVector &tpCollection, const TrackingVertexRefKeyToIndex &tvKeyToIndex, const reco::TrackToTrackingParticleAssociator &associatorByHits, const std::vector< TPHitIndex > &tpHitList, const TrackingParticleRefKeyToCount &tpKeyToClusterCount)
void fillTracks(const edm::RefToBaseVector< reco::Track > &tracks, const TrackingParticleRefVector &tpCollection, const TrackingParticleRefKeyToIndex &tpKeyToIndex, const TrackingParticleRefKeyToCount &tpKeyToClusterCount, const MagneticField &mf, const reco::BeamSpot &bs, const reco::VertexCollection &vertices, const reco::TrackToTrackingParticleAssociator &associatorByHits, const ClusterTPAssociation &clusterToTPMap, const TransientTrackingRecHitBuilder &theTTRHBuilder, const TrackerTopology &tTopo, const std::set< edm::ProductID > &hitProductIds, const std::map< edm::ProductID, size_t > &seedToCollIndex, const std::vector< const MVACollection * > &mvaColls, const std::vector< const QualityMaskCollection * > &qualColls)
edm::Ref< TrackingVertexCollection > TrackingVertexRef
edm::EventNumber_t ev_event
edm::EDGetTokenT< reco::VertexCollection > vertexToken_
edm::EDGetTokenT< TrackingParticleCollection > trackingParticleToken_
T const * product() const
Definition: Handle.h:74
const bool includeMVA_
std::vector< TrackingVertex > TrackingVertexCollection
const bool includeAllHits_
edm::EventID id() const
Definition: EventBase.h:59
const EncodedEventId & eventId() const
edm::EDGetTokenT< ClusterTPAssociation > clusterTPMapToken_
fixed size matrix
HLT enums.
T get() const
Definition: EventSetup.h:71
void push_back(const RefToBase< T > &)
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_
void push_back(value_type const &ref)
Add a Ref<C, T> to the RefVector.
Definition: RefVector.h:69
std::string builderName_
size_type size() const
Size of the RefVector.
Definition: RefVector.h:107
bool isUninitialized() const
Definition: EDGetToken.h:70
void fillVertices(const reco::VertexCollection &vertices, const edm::RefToBaseVector< reco::Track > &tracks)
edm::Ref< TrackingParticleCollection > TrackingParticleRef
edm::EDGetTokenT< edm::DetSetVector< StripDigiSimLink > > stripSimLinkToken_
void TrackingNtuple::clearVariables ( )
private

Definition at line 1698 of file TrackingNtuple.cc.

References bsp_sigmax, bsp_sigmay, bsp_sigmaz, bsp_x, bsp_y, bsp_z, glu_bbxi, glu_detId, glu_isBarrel, glu_monoIdx, glu_radL, glu_seeIdx, glu_stereoIdx, glu_x, glu_xx, glu_xy, glu_y, glu_yy, glu_yz, glu_z, glu_zx, glu_zz, inv_detId, inv_detId_phase2, inv_isBarrel, inv_type, RecoTauDiscriminantConfiguration::mask, DetachedQuadStep_cff::mva, ph2_bbxi, ph2_detId, ph2_isBarrel, ph2_radL, ph2_seeIdx, ph2_simHitIdx, ph2_simType, ph2_trkIdx, ph2_x, ph2_xx, ph2_xy, ph2_y, ph2_yy, ph2_yz, ph2_z, ph2_zx, ph2_zz, pix_bbxi, pix_chargeFraction, pix_detId, pix_isBarrel, pix_radL, pix_seeIdx, pix_simHitIdx, pix_simType, pix_trkIdx, pix_x, pix_xx, pix_xy, pix_y, pix_yy, pix_yz, pix_z, pix_zx, pix_zz, see_algo, see_bestFromFirstHitSimTrkIdx, see_bestFromFirstHitSimTrkShareFrac, see_bestSimTrkIdx, see_bestSimTrkShareFrac, see_chi2, see_dxy, see_dxyErr, see_dz, see_dzErr, see_eta, see_etaErr, see_fitok, see_hitIdx, see_hitType, see_nCands, see_nCluster, see_nGlued, see_nPhase2OT, see_nPixel, see_nStrip, see_nValid, see_offset, see_phi, see_phiErr, see_pt, see_ptErr, see_px, see_py, see_pz, see_q, see_simTrkIdx, see_simTrkShareFrac, see_statePt, see_stateTrajPx, see_stateTrajPy, see_stateTrajPz, see_stateTrajX, see_stateTrajY, see_stopReason, see_trkIdx, sim_bunchCrossing, sim_decayVtxIdx, sim_eta, sim_event, sim_genPdgIds, sim_isFromBHadron, sim_n3DLay, sim_nLay, sim_nPixel, sim_nPixelLay, sim_nRecoClusters, sim_nStrip, sim_nTrackerHits, sim_nValid, sim_parentVtxIdx, sim_pca_cotTheta, sim_pca_dxy, sim_pca_dz, sim_pca_eta, sim_pca_lambda, sim_pca_phi, sim_pca_pt, sim_pdgId, sim_phi, sim_pt, sim_px, sim_py, sim_pz, sim_q, sim_seedIdx, sim_simHitIdx, sim_trkIdx, sim_trkShareFrac, simhit_detId, simhit_detId_phase2, simhit_eloss, simhit_hitIdx, simhit_hitType, simhit_particle, simhit_process, simhit_simTrkIdx, simhit_tof, simhit_x, simhit_y, simhit_z, simpv_idx, simvtx_bunchCrossing, simvtx_daughterSimIdx, simvtx_event, simvtx_sourceSimIdx, simvtx_x, simvtx_y, simvtx_z, str_bbxi, str_chargeFraction, str_detId, str_isBarrel, str_radL, str_seeIdx, str_simHitIdx, str_simType, str_trkIdx, str_x, str_xx, str_xy, str_y, str_yy, str_yz, str_z, str_zx, str_zz, trk_algoMask, trk_bestFromFirstHitSimTrkIdx, trk_bestFromFirstHitSimTrkNChi2, trk_bestFromFirstHitSimTrkShareFrac, trk_bestFromFirstHitSimTrkShareFracSimClusterDenom, trk_bestFromFirstHitSimTrkShareFracSimDenom, trk_bestSimTrkIdx, trk_bestSimTrkNChi2, trk_bestSimTrkShareFrac, trk_bestSimTrkShareFracSimClusterDenom, trk_bestSimTrkShareFracSimDenom, trk_hitIdx, trk_hitType, trk_isHP, trk_isTrue, trk_seedIdx, trk_simTrkIdx, trk_simTrkNChi2, trk_simTrkShareFrac, trk_stopReason, trk_vtxIdx, vtx_chi2, vtx_fake, vtx_ndof, vtx_trkIdx, vtx_valid, vtx_x, vtx_xErr, vtx_y, vtx_yErr, vtx_z, and vtx_zErr.

Referenced by analyze().

1698  {
1699 
1700  ev_run = 0;
1701  ev_lumi = 0;
1702  ev_event = 0;
1703 
1704  //tracks
1705  trk_px .clear();
1706  trk_py .clear();
1707  trk_pz .clear();
1708  trk_pt .clear();
1709  trk_inner_px .clear();
1710  trk_inner_py .clear();
1711  trk_inner_pz .clear();
1712  trk_inner_pt .clear();
1713  trk_outer_px .clear();
1714  trk_outer_py .clear();
1715  trk_outer_pz .clear();
1716  trk_outer_pt .clear();
1717  trk_eta .clear();
1718  trk_lambda .clear();
1719  trk_cotTheta .clear();
1720  trk_phi .clear();
1721  trk_dxy .clear();
1722  trk_dz .clear();
1723  trk_dxyPV .clear();
1724  trk_dzPV .clear();
1725  trk_dxyClosestPV.clear();
1726  trk_dzClosestPV.clear();
1727  trk_ptErr .clear();
1728  trk_etaErr .clear();
1729  trk_lambdaErr.clear();
1730  trk_phiErr .clear();
1731  trk_dxyErr .clear();
1732  trk_dzErr .clear();
1733  trk_refpoint_x.clear();
1734  trk_refpoint_y.clear();
1735  trk_refpoint_z.clear();
1736  trk_nChi2 .clear();
1737  trk_nChi2_1Dmod.clear();
1738  trk_ndof .clear();
1739  for(auto& mva: trk_mvas) {
1740  mva.clear();
1741  }
1742  for(auto& mask: trk_qualityMasks) {
1743  mask.clear();
1744  }
1745  trk_q .clear();
1746  trk_nValid .clear();
1747  trk_nLost .clear();
1748  trk_nInactive.clear();
1749  trk_nPixel .clear();
1750  trk_nStrip .clear();
1751  trk_nOuterLost.clear();
1752  trk_nInnerLost.clear();
1753  trk_nOuterInactive.clear();
1754  trk_nInnerInactive.clear();
1755  trk_nPixelLay.clear();
1756  trk_nStripLay.clear();
1757  trk_n3DLay .clear();
1758  trk_nLostLay .clear();
1759  trk_nCluster .clear();
1760  trk_algo .clear();
1761  trk_originalAlgo.clear();
1762  trk_algoMask .clear();
1763  trk_stopReason.clear();
1764  trk_isHP .clear();
1765  trk_seedIdx .clear();
1766  trk_vtxIdx .clear();
1767  trk_isTrue .clear();
1768  trk_bestSimTrkIdx.clear();
1769  trk_bestSimTrkShareFrac.clear();
1772  trk_bestSimTrkNChi2.clear();
1778  trk_simTrkIdx.clear();
1779  trk_simTrkShareFrac.clear();
1780  trk_simTrkNChi2.clear();
1781  trk_hitIdx .clear();
1782  trk_hitType .clear();
1783  //sim tracks
1784  sim_event .clear();
1785  sim_bunchCrossing.clear();
1786  sim_pdgId .clear();
1787  sim_genPdgIds.clear();
1788  sim_isFromBHadron.clear();
1789  sim_px .clear();
1790  sim_py .clear();
1791  sim_pz .clear();
1792  sim_pt .clear();
1793  sim_eta .clear();
1794  sim_phi .clear();
1795  sim_pca_pt .clear();
1796  sim_pca_eta .clear();
1797  sim_pca_lambda.clear();
1798  sim_pca_cotTheta.clear();
1799  sim_pca_phi .clear();
1800  sim_pca_dxy .clear();
1801  sim_pca_dz .clear();
1802  sim_q .clear();
1803  sim_nValid .clear();
1804  sim_nPixel .clear();
1805  sim_nStrip .clear();
1806  sim_nLay .clear();
1807  sim_nPixelLay.clear();
1808  sim_n3DLay .clear();
1809  sim_nTrackerHits.clear();
1810  sim_nRecoClusters.clear();
1811  sim_trkIdx .clear();
1812  sim_seedIdx .clear();
1813  sim_trkShareFrac.clear();
1814  sim_parentVtxIdx.clear();
1815  sim_decayVtxIdx.clear();
1816  sim_simHitIdx .clear();
1817  //pixels
1818  pix_isBarrel .clear();
1819  pix_detId .clear();
1820  pix_trkIdx .clear();
1821  pix_seeIdx .clear();
1822  pix_simHitIdx.clear();
1823  pix_chargeFraction.clear();
1824  pix_simType.clear();
1825  pix_x .clear();
1826  pix_y .clear();
1827  pix_z .clear();
1828  pix_xx .clear();
1829  pix_xy .clear();
1830  pix_yy .clear();
1831  pix_yz .clear();
1832  pix_zz .clear();
1833  pix_zx .clear();
1834  pix_radL .clear();
1835  pix_bbxi .clear();
1836  //strips
1837  str_isBarrel .clear();
1838  str_detId .clear();
1839  str_trkIdx .clear();
1840  str_seeIdx .clear();
1841  str_simHitIdx.clear();
1842  str_chargeFraction.clear();
1843  str_simType.clear();
1844  str_x .clear();
1845  str_y .clear();
1846  str_z .clear();
1847  str_xx .clear();
1848  str_xy .clear();
1849  str_yy .clear();
1850  str_yz .clear();
1851  str_zz .clear();
1852  str_zx .clear();
1853  str_radL .clear();
1854  str_bbxi .clear();
1855  //matched hits
1856  glu_isBarrel .clear();
1857  glu_detId .clear();
1858  glu_monoIdx .clear();
1859  glu_stereoIdx.clear();
1860  glu_seeIdx .clear();
1861  glu_x .clear();
1862  glu_y .clear();
1863  glu_z .clear();
1864  glu_xx .clear();
1865  glu_xy .clear();
1866  glu_yy .clear();
1867  glu_yz .clear();
1868  glu_zz .clear();
1869  glu_zx .clear();
1870  glu_radL .clear();
1871  glu_bbxi .clear();
1872  //phase2 OT
1873  ph2_isBarrel .clear();
1874  ph2_detId .clear();
1875  ph2_trkIdx .clear();
1876  ph2_seeIdx .clear();
1877  ph2_simHitIdx.clear();
1878  ph2_simType.clear();
1879  ph2_x .clear();
1880  ph2_y .clear();
1881  ph2_z .clear();
1882  ph2_xx .clear();
1883  ph2_xy .clear();
1884  ph2_yy .clear();
1885  ph2_yz .clear();
1886  ph2_zz .clear();
1887  ph2_zx .clear();
1888  ph2_radL .clear();
1889  ph2_bbxi .clear();
1890  //invalid hits
1891  inv_isBarrel .clear();
1892  inv_detId .clear();
1893  inv_detId_phase2.clear();
1894  inv_type .clear();
1895  // simhits
1896  simhit_detId.clear();
1897  simhit_detId_phase2.clear();
1898  simhit_x.clear();
1899  simhit_y.clear();
1900  simhit_z.clear();
1901  simhit_particle.clear();
1902  simhit_process.clear();
1903  simhit_eloss.clear();
1904  simhit_tof.clear();
1905  //simhit_simTrackId.clear();
1906  simhit_simTrkIdx.clear();
1907  simhit_hitIdx.clear();
1908  simhit_hitType.clear();
1909  //beamspot
1910  bsp_x = -9999.;
1911  bsp_y = -9999.;
1912  bsp_z = -9999.;
1913  bsp_sigmax = -9999.;
1914  bsp_sigmay = -9999.;
1915  bsp_sigmaz = -9999.;
1916  //seeds
1917  see_fitok .clear();
1918  see_px .clear();
1919  see_py .clear();
1920  see_pz .clear();
1921  see_pt .clear();
1922  see_eta .clear();
1923  see_phi .clear();
1924  see_dxy .clear();
1925  see_dz .clear();
1926  see_ptErr .clear();
1927  see_etaErr .clear();
1928  see_phiErr .clear();
1929  see_dxyErr .clear();
1930  see_dzErr .clear();
1931  see_chi2 .clear();
1932  see_statePt.clear();
1933  see_stateTrajX.clear();
1934  see_stateTrajY.clear();
1935  see_stateTrajPx.clear();
1936  see_stateTrajPy.clear();
1937  see_stateTrajPz.clear();
1938  see_q .clear();
1939  see_nValid .clear();
1940  see_nPixel .clear();
1941  see_nGlued .clear();
1942  see_nStrip .clear();
1943  see_nPhase2OT.clear();
1944  see_nCluster.clear();
1945  see_algo .clear();
1946  see_stopReason.clear();
1947  see_nCands .clear();
1948  see_trkIdx .clear();
1949  see_bestSimTrkIdx.clear();
1950  see_bestSimTrkShareFrac.clear();
1953  see_simTrkIdx.clear();
1954  see_simTrkShareFrac.clear();
1955  see_hitIdx .clear();
1956  see_hitType .clear();
1957  //seed algo offset
1958  see_offset.clear();
1959 
1960  // vertices
1961  vtx_x.clear();
1962  vtx_y.clear();
1963  vtx_z.clear();
1964  vtx_xErr.clear();
1965  vtx_yErr.clear();
1966  vtx_zErr.clear();
1967  vtx_ndof.clear();
1968  vtx_chi2.clear();
1969  vtx_fake.clear();
1970  vtx_valid.clear();
1971  vtx_trkIdx.clear();
1972 
1973  // Tracking vertices
1974  simvtx_event.clear();
1975  simvtx_bunchCrossing.clear();
1976  simvtx_x.clear();
1977  simvtx_y.clear();
1978  simvtx_z.clear();
1979  simvtx_sourceSimIdx.clear();
1980  simvtx_daughterSimIdx.clear();
1981  simpv_idx.clear();
1982 }
std::vector< unsigned int > sim_nTrackerHits
std::vector< int > trk_bestSimTrkIdx
std::vector< float > sim_pca_dz
edm::LuminosityBlockNumber_t ev_lumi
std::vector< float > trk_nChi2_1Dmod
std::vector< unsigned int > sim_nLay
std::vector< float > ph2_radL
std::vector< float > trk_dxyPV
std::vector< float > see_bestSimTrkShareFrac
std::vector< std::vector< float > > see_simTrkShareFrac
std::vector< short > see_fitok
std::vector< short > vtx_fake
std::vector< float > simvtx_z
std::vector< std::vector< float > > trk_simTrkNChi2
std::vector< std::vector< int > > see_hitType
std::vector< float > trk_dzClosestPV
std::vector< short > ph2_isBarrel
DetIdStrip str_detId
std::vector< float > trk_phi
std::vector< float > sim_pca_cotTheta
std::vector< float > sim_pca_dxy
std::vector< float > see_stateTrajX
std::vector< unsigned int > trk_nOuterLost
std::vector< float > glu_xy
std::vector< short > trk_isTrue
std::vector< std::vector< int > > ph2_seeIdx
std::vector< float > glu_radL
std::vector< float > trk_inner_pz
std::vector< float > see_stateTrajPy
std::vector< float > pix_y
std::vector< int > trk_vtxIdx
std::vector< std::vector< int > > str_trkIdx
std::vector< unsigned int > see_nValid
std::vector< float > str_yy
std::vector< float > trk_outer_py
std::vector< float > pix_zz
std::vector< float > ph2_bbxi
std::vector< int > glu_monoIdx
std::vector< float > trk_eta
std::vector< short > glu_isBarrel
std::vector< int > sim_bunchCrossing
std::vector< float > see_phiErr
std::vector< int > trk_bestFromFirstHitSimTrkIdx
std::vector< std::vector< int > > simhit_hitIdx
std::vector< float > str_x
std::vector< float > see_dzErr
std::vector< unsigned int > sim_n3DLay
std::vector< float > trk_cotTheta
std::vector< float > trk_bestSimTrkNChi2
std::vector< unsigned int > see_nStrip
std::vector< float > trk_px
std::vector< unsigned short > pix_simType
std::vector< unsigned short > inv_type
std::vector< float > see_stateTrajPz
std::vector< float > pix_zx
std::vector< float > sim_phi
std::vector< std::vector< int > > trk_simTrkIdx
std::vector< float > trk_dzPV
std::vector< float > trk_dxyErr
std::vector< float > str_yz
std::vector< float > trk_pt
std::vector< float > glu_x
std::vector< float > trk_inner_py
std::vector< float > see_px
std::vector< float > see_chi2
std::vector< float > glu_z
std::vector< float > see_stateTrajY
std::vector< unsigned short > see_stopReason
std::vector< float > trk_outer_px
std::vector< std::vector< int > > trk_hitType
std::vector< unsigned int > trk_nCluster
DetIdPixel pix_detId
std::vector< float > ph2_xx
std::vector< std::vector< int > > ph2_trkIdx
std::vector< unsigned int > see_algo
std::vector< float > trk_inner_pt
std::vector< short > simhit_process
std::vector< float > trk_bestSimTrkShareFracSimClusterDenom
std::vector< std::vector< int > > str_seeIdx
std::vector< std::vector< int > > see_simTrkIdx
std::vector< int > simvtx_event
std::vector< float > str_radL
std::vector< int > simhit_simTrkIdx
std::vector< unsigned short > trk_stopReason
std::vector< float > sim_py
std::vector< float > sim_px
std::vector< float > pix_xx
std::vector< std::vector< int > > sim_decayVtxIdx
std::vector< float > trk_refpoint_x
std::vector< float > pix_radL
std::vector< float > pix_bbxi
std::vector< std::vector< float > > sim_trkShareFrac
std::vector< std::vector< float > > trk_mvas
std::vector< float > ph2_zx
std::vector< int > simpv_idx
std::vector< std::vector< int > > pix_seeIdx
std::vector< unsigned short > str_simType
std::vector< int > sim_q
std::vector< short > inv_isBarrel
std::vector< float > trk_bestSimTrkShareFracSimDenom
std::vector< float > trk_bestFromFirstHitSimTrkNChi2
std::vector< float > see_etaErr
std::vector< std::vector< float > > trk_simTrkShareFrac
std::vector< float > simhit_z
std::vector< float > ph2_z
std::vector< float > ph2_yy
std::vector< float > trk_refpoint_y
std::vector< unsigned int > trk_nLostLay
std::vector< int > sim_event
std::vector< unsigned int > trk_nStrip
std::vector< int > see_bestSimTrkIdx
std::vector< unsigned int > trk_nPixel
std::vector< float > glu_y
std::vector< float > trk_pz
std::vector< float > trk_dzErr
std::vector< float > trk_lambdaErr
std::vector< unsigned int > see_nCluster
std::vector< float > ph2_y
std::vector< std::vector< int > > simvtx_sourceSimIdx
std::vector< float > trk_bestFromFirstHitSimTrkShareFracSimDenom
std::vector< float > trk_etaErr
std::vector< short > pix_isBarrel
std::vector< float > glu_yz
std::vector< float > sim_pca_phi
std::vector< unsigned int > trk_algo
std::vector< unsigned int > sim_nRecoClusters
std::vector< float > ph2_xy
std::vector< float > trk_bestFromFirstHitSimTrkShareFracSimClusterDenom
std::vector< float > vtx_y
std::vector< float > pix_z
std::vector< int > see_bestFromFirstHitSimTrkIdx
std::vector< float > sim_eta
std::vector< unsigned int > trk_originalAlgo
std::vector< unsigned int > trk_nInnerLost
std::vector< float > str_y
std::vector< int > sim_pdgId
std::vector< int > see_q
std::vector< std::vector< int > > simhit_hitType
std::vector< float > trk_refpoint_z
std::vector< unsigned int > trk_nInactive
std::vector< unsigned int > trk_nOuterInactive
std::vector< float > pix_yz
std::vector< std::vector< int > > sim_genPdgIds
std::vector< int > trk_seedIdx
std::vector< std::vector< float > > pix_chargeFraction
edm::RunNumber_t ev_run
std::vector< float > vtx_yErr
std::vector< std::vector< int > > pix_trkIdx
std::vector< unsigned int > sim_nValid
std::vector< float > glu_yy
std::vector< float > vtx_ndof
std::vector< std::vector< int > > ph2_simHitIdx
std::vector< float > simvtx_x
std::vector< float > str_zz
DetIdAllPhase2 inv_detId_phase2
std::vector< float > sim_pca_pt
DetIdPhase2OT ph2_detId
std::vector< float > see_dxyErr
std::vector< float > trk_bestFromFirstHitSimTrkShareFrac
std::vector< float > see_pt
std::vector< unsigned int > see_nPhase2OT
std::vector< float > see_dxy
std::vector< std::vector< int > > glu_seeIdx
std::vector< unsigned int > trk_n3DLay
std::vector< std::vector< int > > sim_trkIdx
std::vector< float > trk_outer_pt
std::vector< float > trk_dz
std::vector< float > trk_ptErr
std::vector< unsigned int > trk_nStripLay
std::vector< float > see_phi
std::vector< float > vtx_z
std::vector< float > see_pz
std::vector< float > trk_phiErr
std::vector< unsigned int > sim_nPixelLay
std::vector< float > trk_lambda
std::vector< float > glu_zz
std::vector< float > sim_pca_lambda
std::vector< float > see_stateTrajPx
std::vector< float > glu_zx
std::vector< float > vtx_xErr
std::vector< float > sim_pz
std::vector< std::vector< int > > sim_simHitIdx
edm::EventNumber_t ev_event
std::vector< float > ph2_x
std::vector< int > glu_stereoIdx
std::vector< float > trk_py
std::vector< std::vector< int > > pix_simHitIdx
std::vector< float > trk_nChi2
std::vector< std::vector< unsigned short > > trk_qualityMasks
std::vector< unsigned int > see_nGlued
std::vector< float > see_py
std::vector< float > pix_x
std::vector< int > sim_parentVtxIdx
std::vector< float > see_ptErr
std::vector< float > str_z
std::vector< float > str_zx
std::vector< short > trk_isHP
std::vector< float > str_xy
std::vector< std::vector< float > > str_chargeFraction
std::vector< unsigned int > trk_nInnerInactive
std::vector< std::vector< int > > trk_hitIdx
std::vector< int > trk_q
std::vector< unsigned int > sim_nPixel
std::vector< short > vtx_valid
std::vector< std::vector< int > > vtx_trkIdx
std::vector< short > str_isBarrel
std::vector< float > glu_bbxi
std::vector< int > simhit_particle
std::vector< float > trk_outer_pz
std::vector< unsigned short > ph2_simType
std::vector< float > sim_pca_eta
std::vector< float > ph2_yz
std::vector< float > simhit_y
std::vector< float > trk_dxyClosestPV
std::vector< std::vector< int > > str_simHitIdx
std::vector< float > see_statePt
std::vector< float > trk_ndof
std::vector< float > glu_xx
std::vector< unsigned int > trk_nPixelLay
std::vector< float > simhit_x
std::vector< float > simvtx_y
std::vector< unsigned short > see_nCands
std::vector< std::vector< int > > simvtx_daughterSimIdx
std::vector< float > str_xx
std::vector< float > trk_bestSimTrkShareFrac
std::vector< unsigned int > see_offset
std::vector< float > ph2_zz
std::vector< int > see_trkIdx
std::vector< float > simhit_tof
std::vector< std::vector< int > > sim_seedIdx
std::vector< float > pix_xy
std::vector< float > trk_dxy
std::vector< float > sim_pt
std::vector< float > pix_yy
std::vector< decltype(reco::TrackBase().algoMaskUL())> trk_algoMask
std::vector< std::vector< int > > see_hitIdx
std::vector< float > vtx_x
std::vector< unsigned int > see_nPixel
std::vector< float > see_eta
DetIdAllPhase2 simhit_detId_phase2
std::vector< unsigned int > trk_nValid
std::vector< unsigned int > trk_nLost
std::vector< float > trk_inner_px
DetIdStrip glu_detId
std::vector< float > vtx_zErr
std::vector< float > simhit_eloss
std::vector< float > see_bestFromFirstHitSimTrkShareFrac
std::vector< int > sim_isFromBHadron
std::vector< float > vtx_chi2
std::vector< int > simvtx_bunchCrossing
std::vector< float > str_bbxi
std::vector< float > see_dz
std::vector< unsigned int > sim_nStrip
void TrackingNtuple::fillBeamSpot ( const reco::BeamSpot bs)
private

Definition at line 2189 of file TrackingNtuple.cc.

References reco::BeamSpot::BeamWidthX(), reco::BeamSpot::BeamWidthY(), bsp_sigmax, bsp_sigmay, bsp_sigmaz, bsp_x, bsp_y, bsp_z, OmniClusterRef::pixelCluster(), reco::BeamSpot::sigmaZ(), OmniClusterRef::stripCluster(), reco::BeamSpot::x0(), and reco::BeamSpot::y0().

Referenced by analyze().

2189  {
2190  bsp_x = bs.x0();
2191  bsp_y = bs.y0();
2192  bsp_z = bs.x0();
2193  bsp_sigmax = bs.BeamWidthX();
2194  bsp_sigmay = bs.BeamWidthY();
2195  bsp_sigmaz = bs.sigmaZ();
2196 }
double BeamWidthX() const
beam width X
Definition: BeamSpot.h:86
double sigmaZ() const
sigma z
Definition: BeamSpot.h:80
double BeamWidthY() const
beam width Y
Definition: BeamSpot.h:88
double y0() const
y coordinate
Definition: BeamSpot.h:66
double x0() const
x coordinate
Definition: BeamSpot.h:64
void TrackingNtuple::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 3500 of file TrackingNtuple.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::addUntracked(), DEFINE_FWK_MODULE, and AlCaHLTBitMon_QueryRunRegistry::string.

3500  {
3501  //The following says we do not know what parameters are allowed so do no validation
3502  // Please change this to state exactly what you do use, even if it is no parameters
3504  desc.addUntracked<std::vector<edm::InputTag> >("seedTracks", std::vector<edm::InputTag>{
3505  edm::InputTag("seedTracksinitialStepSeeds"),
3506  edm::InputTag("seedTracksdetachedTripletStepSeeds"),
3507  edm::InputTag("seedTrackspixelPairStepSeeds"),
3508  edm::InputTag("seedTrackslowPtTripletStepSeeds"),
3509  edm::InputTag("seedTracksmixedTripletStepSeeds"),
3510  edm::InputTag("seedTrackspixelLessStepSeeds"),
3511  edm::InputTag("seedTrackstobTecStepSeeds"),
3512  edm::InputTag("seedTracksjetCoreRegionalStepSeeds"),
3513  edm::InputTag("seedTracksmuonSeededSeedsInOut"),
3514  edm::InputTag("seedTracksmuonSeededSeedsOutIn")
3515  });
3516  desc.addUntracked<std::vector<edm::InputTag> >("trackCandidates", std::vector<edm::InputTag>{
3517  edm::InputTag("initialStepTrackCandidates"),
3518  edm::InputTag("detachedTripletStepTrackCandidates"),
3519  edm::InputTag("pixelPairStepTrackCandidates"),
3520  edm::InputTag("lowPtTripletStepTrackCandidates"),
3521  edm::InputTag("mixedTripletStepTrackCandidates"),
3522  edm::InputTag("pixelLessStepTrackCandidates"),
3523  edm::InputTag("tobTecStepTrackCandidates"),
3524  edm::InputTag("jetCoreRegionalStepTrackCandidates"),
3525  edm::InputTag("muonSeededTrackCandidatesInOut"),
3526  edm::InputTag("muonSeededTrackCandidatesOutIn")
3527  });
3528  desc.addUntracked<edm::InputTag>("tracks", edm::InputTag("generalTracks"));
3529  desc.addUntracked<std::vector<std::string> >("trackMVAs", std::vector<std::string>{{"generalTracks"}});
3530  desc.addUntracked<edm::InputTag>("trackingParticles", edm::InputTag("mix", "MergedTrackTruth"));
3531  desc.addUntracked<bool>("trackingParticlesRef", false);
3532  desc.addUntracked<edm::InputTag>("clusterTPMap", edm::InputTag("tpClusterProducer"));
3533  desc.addUntracked<edm::InputTag>("simHitTPMap", edm::InputTag("simHitTPAssocProducer"));
3534  desc.addUntracked<edm::InputTag>("trackAssociator", edm::InputTag("quickTrackAssociatorByHits"));
3535  desc.addUntracked<edm::InputTag>("pixelDigiSimLink", edm::InputTag("simSiPixelDigis"));
3536  desc.addUntracked<edm::InputTag>("stripDigiSimLink", edm::InputTag("simSiStripDigis"));
3537  desc.addUntracked<edm::InputTag>("phase2OTSimLink", edm::InputTag(""));
3538  desc.addUntracked<edm::InputTag>("beamSpot", edm::InputTag("offlineBeamSpot"));
3539  desc.addUntracked<edm::InputTag>("pixelRecHits", edm::InputTag("siPixelRecHits"));
3540  desc.addUntracked<edm::InputTag>("stripRphiRecHits", edm::InputTag("siStripMatchedRecHits", "rphiRecHit"));
3541  desc.addUntracked<edm::InputTag>("stripStereoRecHits", edm::InputTag("siStripMatchedRecHits", "stereoRecHit"));
3542  desc.addUntracked<edm::InputTag>("stripMatchedRecHits", edm::InputTag("siStripMatchedRecHits", "matchedRecHit"));
3543  desc.addUntracked<edm::InputTag>("phase2OTRecHits", edm::InputTag("siPhase2RecHits"));
3544  desc.addUntracked<edm::InputTag>("vertices", edm::InputTag("offlinePrimaryVertices"));
3545  desc.addUntracked<edm::InputTag>("trackingVertices", edm::InputTag("mix", "MergedTrackTruth"));
3546  desc.addUntracked<edm::InputTag>("trackingParticleNlayers", edm::InputTag("trackingParticleNumberOfLayersProducer", "trackerLayers"));
3547  desc.addUntracked<edm::InputTag>("trackingParticleNpixellayers", edm::InputTag("trackingParticleNumberOfLayersProducer", "pixelLayers"));
3548  desc.addUntracked<edm::InputTag>("trackingParticleNstripstereolayers", edm::InputTag("trackingParticleNumberOfLayersProducer", "stripStereoLayers"));
3549  desc.addUntracked<std::string>("TTRHBuilder", "WithTrackAngle");
3550  desc.addUntracked<std::string>("parametersDefiner", "LhcParametersDefinerForTP");
3551  desc.addUntracked<bool>("includeSeeds", false);
3552  desc.addUntracked<bool>("includeAllHits", false);
3553  desc.addUntracked<bool>("includeMVA", true);
3554  desc.addUntracked<bool>("includeTrackingParticles", true);
3555  descriptions.add("trackingNtuple",desc);
3556 }
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void TrackingNtuple::fillPhase2OTHits ( const edm::Event iEvent,
const ClusterTPAssociation clusterToTPMap,
const TrackingParticleRefKeyToIndex &  tpKeyToIndex,
const SimHitTPAssociationProducer::SimHitTPAssociationList simHitsTPAssoc,
const edm::DetSetVector< PixelDigiSimLink > &  digiSimLink,
const TransientTrackingRecHitBuilder theTTRHBuilder,
const TrackerTopology tTopo,
const SimHitRefKeyToIndex &  simHitRefKeyToIndex,
std::set< edm::ProductID > &  hitProductIds 
)
private

Definition at line 2615 of file TrackingNtuple.cc.

References edmNew::DetSetVector< T >::begin(), TransientTrackingRecHitBuilder::build(), TrackingNtuple::SimHitData::bunchCrossing, edmNew::DetSetVector< T >::end(), TrackingNtuple::SimHitData::event, SiStripMatchedRecHit2D::firstClusterRef(), edm::Event::getByToken(), crabWrapper::key, TrackerTopology::layer(), LogTrace, matchCluster(), TrackingNtuple::SimHitData::matchingSimHit, ph2_bbxi, ph2_detId, ph2_isBarrel, ph2_radL, ph2_seeIdx, ph2_simHitIdx, ph2_simType, ph2_trkIdx, ph2_x, ph2_xx, ph2_xy, ph2_y, ph2_yy, ph2_yz, ph2_z, ph2_zx, ph2_zz, Phase2OT, DetId::rawId(), simhit_eloss, simhit_particle, simhit_process, simhit_x, simhit_y, simhit_z, DetId::subdetId(), and TrackingNtuple::SimHitData::type.

Referenced by analyze().

2624  {
2626  iEvent.getByToken(phase2OTRecHitToken_, phase2OTHits);
2627  for (auto it = phase2OTHits->begin(); it!=phase2OTHits->end(); it++ ) {
2628  const DetId hitId = it->detId();
2629  for (auto hit = it->begin(); hit!=it->end(); hit++ ) {
2630  TransientTrackingRecHit::RecHitPointer ttrh = theTTRHBuilder.build(&*hit);
2631 
2632  hitProductIds.insert(hit->cluster().id());
2633 
2634  const int key = hit->cluster().key();
2635  const int lay = tTopo.layer(hitId);
2636 
2637  ph2_isBarrel .push_back( hitId.subdetId()==1 );
2638  ph2_detId .push_back( tTopo, hitId );
2639  ph2_trkIdx .emplace_back(); // filled in fillTracks
2640  ph2_seeIdx .emplace_back(); // filled in fillSeeds
2641  ph2_x .push_back( ttrh->globalPosition().x() );
2642  ph2_y .push_back( ttrh->globalPosition().y() );
2643  ph2_z .push_back( ttrh->globalPosition().z() );
2644  ph2_xx .push_back( ttrh->globalPositionError().cxx() );
2645  ph2_xy .push_back( ttrh->globalPositionError().cyx() );
2646  ph2_yy .push_back( ttrh->globalPositionError().cyy() );
2647  ph2_yz .push_back( ttrh->globalPositionError().czy() );
2648  ph2_zz .push_back( ttrh->globalPositionError().czz() );
2649  ph2_zx .push_back( ttrh->globalPositionError().czx() );
2650  ph2_radL .push_back( ttrh->surface()->mediumProperties().radLen() );
2651  ph2_bbxi .push_back( ttrh->surface()->mediumProperties().xi() );
2652 
2653  LogTrace("TrackingNtuple") << "phase2 OT cluster=" << key
2654  << " subdId=" << hitId.subdetId()
2655  << " lay=" << lay
2656  << " rawId=" << hitId.rawId()
2657  << " pos =" << ttrh->globalPosition();
2658 
2660  SimHitData simHitData = matchCluster(hit->firstClusterRef(), hitId, key, ttrh,
2661  clusterToTPMap, tpKeyToIndex, simHitsTPAssoc, digiSimLink, simHitRefKeyToIndex, HitType::Phase2OT);
2662  ph2_simHitIdx.push_back( simHitData.matchingSimHit );
2663  ph2_simType.push_back( static_cast<int>(simHitData.type) );
2664  LogTrace("TrackingNtuple") << " nMatchingSimHit=" << simHitData.matchingSimHit.size();
2665  if(!simHitData.matchingSimHit.empty()) {
2666  const auto simHitIdx = simHitData.matchingSimHit[0];
2667  LogTrace("TrackingNtuple") << " firstMatchingSimHit=" << simHitIdx
2668  << " simHitPos=" << GlobalPoint(simhit_x[simHitIdx], simhit_y[simHitIdx], simhit_z[simHitIdx])
2669  << " energyLoss=" << simhit_eloss[simHitIdx]
2670  << " particleType=" << simhit_particle[simHitIdx]
2671  << " processType=" << simhit_process[simHitIdx]
2672  << " bunchCrossing=" << simHitData.bunchCrossing[0]
2673  << " event=" << simHitData.event[0];
2674  }
2675  }
2676  }
2677  }
2678 }
std::vector< float > ph2_radL
std::vector< short > ph2_isBarrel
const_iterator end(bool update=false) const
std::vector< std::vector< int > > ph2_seeIdx
std::vector< float > ph2_bbxi
SimHitData matchCluster(const OmniClusterRef &cluster, DetId hitId, int clusterKey, const TransientTrackingRecHit::RecHitPointer &ttrh, const ClusterTPAssociation &clusterToTPMap, const TrackingParticleRefKeyToIndex &tpKeyToIndex, const SimHitTPAssociationProducer::SimHitTPAssociationList &simHitsTPAssoc, const edm::DetSetVector< SimLink > &digiSimLinks, const SimHitRefKeyToIndex &simHitRefKeyToIndex, HitType hitType)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:50
std::vector< float > ph2_xx
std::vector< std::vector< int > > ph2_trkIdx
edm::EDGetTokenT< Phase2TrackerRecHit1DCollectionNew > phase2OTRecHitToken_
std::vector< short > simhit_process
std::vector< float > ph2_zx
std::vector< float > simhit_z
std::vector< float > ph2_z
std::vector< float > ph2_yy
std::vector< float > ph2_y
std::vector< float > ph2_xy
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:41
std::vector< std::vector< int > > ph2_simHitIdx
DetIdPhase2OT ph2_detId
const bool includeTrackingParticles_
#define LogTrace(id)
std::shared_ptr< TrackingRecHit const > RecHitPointer
virtual RecHitPointer build(const TrackingRecHit *p) const =0
build a tracking rechit from an existing rechit
unsigned int id
Definition: DetId.h:18
std::vector< float > ph2_x
unsigned int layer(const DetId &id) const
std::vector< int > simhit_particle
std::vector< unsigned short > ph2_simType
std::vector< float > ph2_yz
std::vector< float > simhit_y
std::vector< float > simhit_x
std::vector< float > ph2_zz
const_iterator begin(bool update=false) const
std::vector< float > simhit_eloss
void TrackingNtuple::fillPixelHits ( const edm::Event iEvent,
const ClusterTPAssociation clusterToTPMap,
const TrackingParticleRefKeyToIndex &  tpKeyToIndex,
const SimHitTPAssociationProducer::SimHitTPAssociationList simHitsTPAssoc,
const edm::DetSetVector< PixelDigiSimLink > &  digiSimLink,
const TransientTrackingRecHitBuilder theTTRHBuilder,
const TrackerTopology tTopo,
const SimHitRefKeyToIndex &  simHitRefKeyToIndex,
std::set< edm::ProductID > &  hitProductIds 
)
private

Definition at line 2408 of file TrackingNtuple.cc.

References edmNew::DetSetVector< T >::begin(), TransientTrackingRecHitBuilder::build(), TrackingNtuple::SimHitData::bunchCrossing, TrackingNtuple::SimHitData::chargeFraction, edmNew::DetSetVector< T >::end(), TrackingNtuple::SimHitData::event, SiStripMatchedRecHit2D::firstClusterRef(), edm::Event::getByToken(), crabWrapper::key, TrackerTopology::layer(), LogTrace, matchCluster(), TrackingNtuple::SimHitData::matchingSimHit, pix_bbxi, pix_chargeFraction, pix_detId, pix_isBarrel, pix_radL, pix_seeIdx, pix_simHitIdx, pix_simType, pix_trkIdx, pix_x, pix_xx, pix_xy, pix_y, pix_yy, pix_yz, pix_z, pix_zx, pix_zz, Pixel, NuclearInteractionSecond_cff::pixelHits, DetId::rawId(), simhit_eloss, simhit_particle, simhit_process, simhit_x, simhit_y, simhit_z, DetId::subdetId(), and TrackingNtuple::SimHitData::type.

Referenced by analyze().

2417  {
2419  iEvent.getByToken(pixelRecHitToken_, pixelHits);
2420  for (auto it = pixelHits->begin(); it!=pixelHits->end(); it++ ) {
2421  const DetId hitId = it->detId();
2422  for (auto hit = it->begin(); hit!=it->end(); hit++ ) {
2423  TransientTrackingRecHit::RecHitPointer ttrh = theTTRHBuilder.build(&*hit);
2424 
2425  hitProductIds.insert(hit->cluster().id());
2426 
2427  const int key = hit->cluster().key();
2428  const int lay = tTopo.layer(hitId);
2429 
2430  pix_isBarrel .push_back( hitId.subdetId()==1 );
2431  pix_detId .push_back( tTopo, hitId );
2432  pix_trkIdx .emplace_back(); // filled in fillTracks
2433  pix_seeIdx .emplace_back(); // filled in fillSeeds
2434  pix_x .push_back( ttrh->globalPosition().x() );
2435  pix_y .push_back( ttrh->globalPosition().y() );
2436  pix_z .push_back( ttrh->globalPosition().z() );
2437  pix_xx .push_back( ttrh->globalPositionError().cxx() );
2438  pix_xy .push_back( ttrh->globalPositionError().cyx() );
2439  pix_yy .push_back( ttrh->globalPositionError().cyy() );
2440  pix_yz .push_back( ttrh->globalPositionError().czy() );
2441  pix_zz .push_back( ttrh->globalPositionError().czz() );
2442  pix_zx .push_back( ttrh->globalPositionError().czx() );
2443  pix_radL .push_back( ttrh->surface()->mediumProperties().radLen() );
2444  pix_bbxi .push_back( ttrh->surface()->mediumProperties().xi() );
2445 
2446  LogTrace("TrackingNtuple") << "pixHit cluster=" << key
2447  << " subdId=" << hitId.subdetId()
2448  << " lay=" << lay
2449  << " rawId=" << hitId.rawId()
2450  << " pos =" << ttrh->globalPosition();
2452  SimHitData simHitData = matchCluster(hit->firstClusterRef(), hitId, key, ttrh,
2453  clusterToTPMap, tpKeyToIndex, simHitsTPAssoc, digiSimLink, simHitRefKeyToIndex, HitType::Pixel);
2454  pix_simHitIdx.push_back( simHitData.matchingSimHit );
2455  pix_simType.push_back( static_cast<int>(simHitData.type) );
2456  pix_chargeFraction.push_back( simHitData.chargeFraction );
2457  LogTrace("TrackingNtuple") << " nMatchingSimHit=" << simHitData.matchingSimHit.size();
2458  if(!simHitData.matchingSimHit.empty()) {
2459  const auto simHitIdx = simHitData.matchingSimHit[0];
2460  LogTrace("TrackingNtuple") << " firstMatchingSimHit=" << simHitIdx
2461  << " simHitPos=" << GlobalPoint(simhit_x[simHitIdx], simhit_y[simHitIdx], simhit_z[simHitIdx])
2462  << " energyLoss=" << simhit_eloss[simHitIdx]
2463  << " particleType=" << simhit_particle[simHitIdx]
2464  << " processType=" << simhit_process[simHitIdx]
2465  << " bunchCrossing=" << simHitData.bunchCrossing[0]
2466  << " event=" << simHitData.event[0];
2467  }
2468  }
2469  }
2470  }
2471 }
const_iterator end(bool update=false) const
std::vector< float > pix_y
std::vector< float > pix_zz
SimHitData matchCluster(const OmniClusterRef &cluster, DetId hitId, int clusterKey, const TransientTrackingRecHit::RecHitPointer &ttrh, const ClusterTPAssociation &clusterToTPMap, const TrackingParticleRefKeyToIndex &tpKeyToIndex, const SimHitTPAssociationProducer::SimHitTPAssociationList &simHitsTPAssoc, const edm::DetSetVector< SimLink > &digiSimLinks, const SimHitRefKeyToIndex &simHitRefKeyToIndex, HitType hitType)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
std::vector< unsigned short > pix_simType
std::vector< float > pix_zx
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:50
DetIdPixel pix_detId
std::vector< short > simhit_process
std::vector< float > pix_xx
std::vector< float > pix_radL
std::vector< float > pix_bbxi
std::vector< std::vector< int > > pix_seeIdx
std::vector< float > simhit_z
edm::EDGetTokenT< SiPixelRecHitCollection > pixelRecHitToken_
std::vector< short > pix_isBarrel
std::vector< float > pix_z
std::vector< float > pix_yz
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:41
std::vector< std::vector< float > > pix_chargeFraction
std::vector< std::vector< int > > pix_trkIdx
const bool includeTrackingParticles_
#define LogTrace(id)
std::shared_ptr< TrackingRecHit const > RecHitPointer
virtual RecHitPointer build(const TrackingRecHit *p) const =0
build a tracking rechit from an existing rechit
unsigned int id
Definition: DetId.h:18
std::vector< std::vector< int > > pix_simHitIdx
std::vector< float > pix_x
unsigned int layer(const DetId &id) const
std::vector< int > simhit_particle
std::vector< float > simhit_y
std::vector< float > simhit_x
std::vector< float > pix_xy
std::vector< float > pix_yy
const_iterator begin(bool update=false) const
std::vector< float > simhit_eloss
void TrackingNtuple::fillSeeds ( const edm::Event iEvent,
const TrackingParticleRefVector tpCollection,
const TrackingParticleRefKeyToIndex &  tpKeyToIndex,
const reco::BeamSpot bs,
const reco::TrackToTrackingParticleAssociator associatorByHits,
const ClusterTPAssociation clusterToTPMap,
const TransientTrackingRecHitBuilder theTTRHBuilder,
const MagneticField theMF,
const TrackerTopology tTopo,
std::vector< std::pair< int, int > > &  monoStereoClusterList,
const std::set< edm::ProductID > &  hitProductIds,
std::map< edm::ProductID, size_t > &  seedToCollIndex 
)
private

Hmm, the following could make sense instead of plain failing if propagation to beam line fails

Definition at line 2681 of file TrackingNtuple.cc.

References addStripMatchedHit(), patPFMETCorrections_cff::algo, reco::TrackBase::algoByName(), reco::TrackToTrackingParticleAssociator::associateRecoToSim(), reco::TrackToTrackingParticleAssociator::associateSimToReco(), TransientTrackingRecHitBuilder::build(), ALCARECOTkAlJpsiMuMu_cff::charge, vertices_cff::chi2, RZLine::chi2(), OmniClusterRef::cluster_phase2OT(), OmniClusterRef::cluster_pixel(), KineDebug3::count(), declareDynArray, SoftLeptonByDistance_cfi::distance, edm::AssociationMap< Tag >::end(), PVValHelper::eta, Exception, fillTrackingParticlesForSeeds(), spr::find(), edm::AssociationMap< Tag >::find(), BaseTrackerRecHit::firstClusterRef(), edm::Event::getByToken(), glu_seeIdx, Glued, runTauDisplay::gp, track_associator::hitsToClusterRefs(), mps_fire::i, triggerObjects_cff::id, OmniClusterRef::id(), createfilelist::int, trackerHitRTTI::isMatched(), OmniClusterRef::key(), edm::Ref< C, T, F >::key(), label, tablePrinter::labels, edm::EDConsumerBase::labelsForToken(), LogTrace, edm::ProductLabels::module, SiStripMatchedRecHit2D::monoClusterRef(), PFRecoTauDiscriminationByIsolation_cfi::offset, ph2_seeIdx, Phase2OT, phi, pix_seeIdx, Pixel, PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, reco::BeamSpot::position(), EnergyCorrector::pt, edm::RefToBaseVector< T >::push_back(), rpcPointValidation_cfi::recHit, see_algo, see_bestFromFirstHitSimTrkIdx, see_bestFromFirstHitSimTrkShareFrac, see_bestSimTrkIdx, see_bestSimTrkShareFrac, see_chi2, see_dxy, see_dxyErr, see_dz, see_dzErr, see_eta, see_etaErr, see_fitok, see_hitIdx, see_hitType, see_isTrue, see_nCands, see_nCluster, see_nGlued, see_nPhase2OT, see_nPixel, see_nStrip, see_nValid, see_offset, see_phi, see_phiErr, see_pt, see_ptErr, see_px, see_py, see_pz, see_q, see_simTrkIdx, see_simTrkShareFrac, see_statePt, see_stateTrajPx, see_stateTrajPy, see_stateTrajPz, see_stateTrajX, see_stateTrajY, see_stopReason, see_trkIdx, SurveyInfoScenario_cff::seed, trackingNtuple_cff::seedTracks, edm::RefToBaseVector< T >::size(), SiStripMatchedRecHit2D::stereoClusterRef(), str_seeIdx, Strip, StripSubdetector::TEC, StripSubdetector::TIB, StripSubdetector::TID, StripSubdetector::TOB, and trackFromSeedFitFailed().

Referenced by analyze().

2693  {
2694  TSCBLBuilderNoMaterial tscblBuilder;
2695  for(size_t iColl=0; iColl < seedTokens_.size(); ++iColl) {
2696  const auto& seedToken = seedTokens_[iColl];
2697 
2698  edm::Handle<edm::View<reco::Track> > seedTracksHandle;
2699  iEvent.getByToken(seedToken, seedTracksHandle);
2700  const auto& seedTracks = *seedTracksHandle;
2701 
2702  if(seedTracks.empty())
2703  continue;
2704 
2706  labelsForToken(seedToken, labels);
2707 
2708  const auto& seedStopInfoToken = seedStopInfoTokens_[iColl];
2709  edm::Handle<std::vector<SeedStopInfo> > seedStopInfoHandle;
2710  iEvent.getByToken(seedStopInfoToken, seedStopInfoHandle);
2711  const auto& seedStopInfos = *seedStopInfoHandle;
2712  if(seedTracks.size() != seedStopInfos.size()) {
2714  labelsForToken(seedStopInfoToken, labels2);
2715 
2716  throw cms::Exception("LogicError") << "Got " << seedTracks.size() << " seeds, but " << seedStopInfos.size() << " seed stopping infos for collections " << labels.module << ", " << labels2.module;
2717  }
2718 
2719  // The associator interfaces really need to be fixed...
2720  edm::RefToBaseVector<reco::Track> seedTrackRefs;
2721  for(edm::View<reco::Track>::size_type i=0; i<seedTracks.size(); ++i) {
2722  seedTrackRefs.push_back(seedTracks.refAt(i));
2723  }
2724  reco::RecoToSimCollection recSimColl = associatorByHits.associateRecoToSim(seedTrackRefs, tpCollection);
2725  reco::SimToRecoCollection simRecColl = associatorByHits.associateSimToReco(seedTrackRefs, tpCollection);
2726 
2727  TString label = labels.module;
2728  //format label to match algoName
2729  label.ReplaceAll("seedTracks", "");
2730  label.ReplaceAll("Seeds","");
2731  label.ReplaceAll("muonSeeded","muonSeededStep");
2732  int algo = reco::TrackBase::algoByName(label.Data());
2733 
2734  edm::ProductID id = seedTracks[0].seedRef().id();
2735  const auto offset = see_fitok.size();
2736  auto inserted = seedCollToOffset.emplace(id, offset);
2737  if(!inserted.second)
2738  throw cms::Exception("Configuration") << "Trying to add seeds with ProductID " << id << " for a second time from collection " << labels.module << ", seed algo " << label << ". Typically this is caused by a configuration problem.";
2739  see_offset.push_back(offset);
2740 
2741  LogTrace("TrackingNtuple") << "NEW SEED LABEL: " << label << " size: " << seedTracks.size() << " algo=" << algo
2742  << " ProductID " << id;
2743 
2744  for(size_t iSeed=0; iSeed < seedTrackRefs.size(); ++iSeed) {
2745  const auto& seedTrackRef = seedTrackRefs[iSeed];
2746  const auto& seedTrack = *seedTrackRef;
2747  const auto& seedRef = seedTrack.seedRef();
2748  const auto& seed = *seedRef;
2749 
2750  const auto seedStopInfo = seedStopInfos[iSeed];
2751 
2752  if(seedRef.id() != id)
2753  throw cms::Exception("LogicError") << "All tracks in 'TracksFromSeeds' collection should point to seeds in the same collection. Now the element 0 had ProductID " << id << " while the element " << seedTrackRef.key() << " had " << seedTrackRef.id() << ". The source collection is " << labels.module << ".";
2754 
2755  std::vector<int> tpIdx;
2756  std::vector<float> sharedFraction;
2757  auto foundTPs = recSimColl.find(seedTrackRef);
2758  if (foundTPs != recSimColl.end()) {
2759  for(const auto tpQuality: foundTPs->val) {
2760  tpIdx.push_back( tpKeyToIndex.at( tpQuality.first.key() ) );
2761  sharedFraction.push_back(tpQuality.second);
2762  }
2763  }
2764 
2765  // Search for a best-matching TrackingParticle for a seed
2766  const int nHits = seedTrack.numberOfValidHits();
2767  const auto clusters = track_associator::hitsToClusterRefs(seedTrack.recHitsBegin(), seedTrack.recHitsEnd()); // TODO: this function is called 3 times per track, try to reduce
2768  const int nClusters = clusters.size();
2769  const auto bestKeyCount = findBestMatchingTrackingParticle(seedTrack, clusterToTPMap, tpKeyToIndex);
2770  const float bestShareFrac = nClusters > 0 ? static_cast<float>(bestKeyCount.countClusters)/static_cast<float>(nClusters): 0;
2771  // Another way starting from the first hit of the seed
2772  const auto bestFirstHitKeyCount = findMatchingTrackingParticleFromFirstHit(seedTrack, clusterToTPMap, tpKeyToIndex);
2773  const float bestFirstHitShareFrac = nClusters > 0 ? static_cast<float>(bestFirstHitKeyCount.countClusters)/static_cast<float>(nClusters) : 0;
2774 
2775  const bool seedFitOk = !trackFromSeedFitFailed(seedTrack);
2776  const int charge = seedTrack.charge();
2777  const float pt = seedFitOk ? seedTrack.pt() : 0;
2778  const float eta = seedFitOk ? seedTrack.eta() : 0;
2779  const float phi = seedFitOk ? seedTrack.phi() : 0;
2780 
2781  const auto seedIndex = see_fitok.size();
2782 
2783  see_fitok .push_back(seedFitOk);
2784 
2785  see_px .push_back( seedFitOk ? seedTrack.px() : 0 );
2786  see_py .push_back( seedFitOk ? seedTrack.py() : 0 );
2787  see_pz .push_back( seedFitOk ? seedTrack.pz() : 0 );
2788  see_pt .push_back( pt );
2789  see_eta .push_back( eta );
2790  see_phi .push_back( phi );
2791  see_q .push_back( charge );
2792  see_nValid .push_back( nHits );
2793 
2794  see_dxy .push_back( seedFitOk ? seedTrack.dxy(bs.position()) : 0);
2795  see_dz .push_back( seedFitOk ? seedTrack.dz(bs.position()) : 0);
2796  see_ptErr .push_back( seedFitOk ? seedTrack.ptError() : 0);
2797  see_etaErr .push_back( seedFitOk ? seedTrack.etaError() : 0);
2798  see_phiErr .push_back( seedFitOk ? seedTrack.phiError() : 0);
2799  see_dxyErr .push_back( seedFitOk ? seedTrack.dxyError() : 0);
2800  see_dzErr .push_back( seedFitOk ? seedTrack.dzError() : 0);
2801  see_algo .push_back( algo );
2802  see_stopReason.push_back( seedStopInfo.stopReasonUC() );
2803  see_nCands .push_back( seedStopInfo.candidatesPerSeed() );
2804 
2805  const auto& state = seedTrack.seedRef()->startingState();
2806  const auto& pos = state.parameters().position();
2807  const auto& mom = state.parameters().momentum();
2808  see_statePt.push_back(state.pt());
2809  see_stateTrajX.push_back(pos.x());
2810  see_stateTrajY.push_back(pos.y());
2811  see_stateTrajPx.push_back(mom.x());
2812  see_stateTrajPy.push_back(mom.y());
2813  see_stateTrajPz.push_back(mom.z());
2814 
2815  see_trkIdx .push_back(-1); // to be set correctly in fillTracks
2817  see_simTrkIdx.push_back( tpIdx );
2818  see_simTrkShareFrac.push_back( sharedFraction );
2819  see_bestSimTrkIdx.push_back(bestKeyCount.key >= 0 ? tpKeyToIndex.at(bestKeyCount.key) : -1);
2820  see_bestFromFirstHitSimTrkIdx.push_back(bestFirstHitKeyCount.key >= 0 ? tpKeyToIndex.at(bestFirstHitKeyCount.key) : -1);
2821  }
2822  else {
2823  see_isTrue.push_back(!tpIdx.empty());
2824  }
2825  see_bestSimTrkShareFrac.push_back(bestShareFrac);
2826  see_bestFromFirstHitSimTrkShareFrac.push_back(bestFirstHitShareFrac);
2827 
2829  /*
2830  TransientTrackingRecHit::RecHitPointer lastRecHit = theTTRHBuilder.build(&*(seed.recHits().second-1));
2831  TrajectoryStateOnSurface state = trajectoryStateTransform::transientState( itSeed->startingState(), lastRecHit->surface(), &theMF);
2832  float pt = state.globalParameters().momentum().perp();
2833  float eta = state.globalParameters().momentum().eta();
2834  float phi = state.globalParameters().momentum().phi();
2835  see_px .push_back( state.globalParameters().momentum().x() );
2836  see_py .push_back( state.globalParameters().momentum().y() );
2837  see_pz .push_back( state.globalParameters().momentum().z() );
2838  */
2839 
2840  std::vector<int> hitIdx;
2841  std::vector<int> hitType;
2842 
2843  for (auto hit=seed.recHits().first; hit!=seed.recHits().second; ++hit) {
2845  int subid = recHit->geographicalId().subdetId();
2846  if (subid == (int) PixelSubdetector::PixelBarrel || subid == (int) PixelSubdetector::PixelEndcap) {
2847  const BaseTrackerRecHit* bhit = dynamic_cast<const BaseTrackerRecHit*>(&*recHit);
2848  const auto& clusterRef = bhit->firstClusterRef();
2849  const auto clusterKey = clusterRef.cluster_pixel().key();
2850  if(includeAllHits_) {
2851  checkProductID(hitProductIds, clusterRef.id(), "seed");
2852  pix_seeIdx[clusterKey].push_back(seedIndex);
2853  }
2854  hitIdx.push_back( clusterKey );
2855  hitType.push_back( static_cast<int>(HitType::Pixel) );
2856  } else if (subid == (int) StripSubdetector::TOB || subid == (int) StripSubdetector::TID ||
2857  subid == (int) StripSubdetector::TIB || subid == (int) StripSubdetector::TEC) {
2858  if (trackerHitRTTI::isMatched(*recHit)) {
2859  const SiStripMatchedRecHit2D * matchedHit = dynamic_cast<const SiStripMatchedRecHit2D *>(&*recHit);
2860  if(includeAllHits_) {
2861  checkProductID(hitProductIds, matchedHit->monoClusterRef().id(), "seed");
2862  checkProductID(hitProductIds, matchedHit->stereoClusterRef().id(), "seed");
2863  }
2864  int monoIdx = matchedHit->monoClusterRef().key();
2865  int stereoIdx = matchedHit->stereoClusterRef().key();
2866 
2867  std::vector<std::pair<int,int> >::iterator pos = find( monoStereoClusterList.begin(), monoStereoClusterList.end(), std::make_pair(monoIdx,stereoIdx) );
2868  size_t gluedIndex = -1;
2869  if(pos != monoStereoClusterList.end()) {
2870  gluedIndex = std::distance(monoStereoClusterList.begin(), pos);
2871  }
2872  else {
2873  // We can encounter glued hits not in the input
2874  // SiStripMatchedRecHit2DCollection, e.g. via muon
2875  // outside-in seeds (or anything taking hits from
2876  // MeasurementTrackerEvent). So let's add them here.
2877  gluedIndex = addStripMatchedHit(*matchedHit, theTTRHBuilder, tTopo, monoStereoClusterList);
2878  }
2879 
2880  if(includeAllHits_) glu_seeIdx[gluedIndex].push_back(seedIndex);
2881  hitIdx.push_back( gluedIndex );
2882  hitType.push_back( static_cast<int>(HitType::Glued) );
2883  } else {
2884  const BaseTrackerRecHit* bhit = dynamic_cast<const BaseTrackerRecHit*>(&*recHit);
2885  const auto& clusterRef = bhit->firstClusterRef();
2886  unsigned int clusterKey;
2887  if(clusterRef.isPhase2()){
2888  clusterKey = clusterRef.cluster_phase2OT().key();
2889  } else {
2890  clusterKey = clusterRef.cluster_strip().key();
2891  }
2892 
2893  if(includeAllHits_) {
2894  checkProductID(hitProductIds, clusterRef.id(), "seed");
2895  if(clusterRef.isPhase2()){
2896  ph2_seeIdx[clusterKey].push_back(seedIndex);
2897  } else {
2898  str_seeIdx[clusterKey].push_back(seedIndex);
2899  }
2900  }
2901 
2902  hitIdx.push_back( clusterKey );
2903  if(clusterRef.isPhase2()){
2904  hitType.push_back( static_cast<int>(HitType::Phase2OT) );
2905  } else {
2906  hitType.push_back( static_cast<int>(HitType::Strip) );
2907  }
2908  }
2909  } else {
2910  LogTrace("TrackingNtuple") << " not pixel and not Strip detector";
2911  }
2912  }
2913  see_hitIdx .push_back( hitIdx );
2914  see_hitType .push_back( hitType );
2915  see_nPixel .push_back( std::count(hitType.begin(), hitType.end(), static_cast<int>(HitType::Pixel)) );
2916  see_nGlued .push_back( std::count(hitType.begin(), hitType.end(), static_cast<int>(HitType::Glued)) );
2917  see_nStrip .push_back( std::count(hitType.begin(), hitType.end(), static_cast<int>(HitType::Strip)) );
2918  see_nPhase2OT.push_back( std::count(hitType.begin(), hitType.end(), static_cast<int>(HitType::Phase2OT)) );
2919  see_nCluster .push_back( nClusters );
2920  //the part below is not strictly needed
2921  float chi2 = -1;
2922  if (nHits==2) {
2923  TransientTrackingRecHit::RecHitPointer recHit0 = theTTRHBuilder.build(&*(seed.recHits().first));
2924  TransientTrackingRecHit::RecHitPointer recHit1 = theTTRHBuilder.build(&*(seed.recHits().first+1));
2925  std::vector<GlobalPoint> gp(2);
2926  std::vector<GlobalError> ge(2);
2927  gp[0] = recHit0->globalPosition();
2928  ge[0] = recHit0->globalPositionError();
2929  gp[1] = recHit1->globalPosition();
2930  ge[1] = recHit1->globalPositionError();
2931  LogTrace("TrackingNtuple") << "seed " << seedTrackRef.key()
2932  << " pt=" << pt << " eta=" << eta << " phi=" << phi << " q=" << charge
2933  << " - PAIR - ids: " << recHit0->geographicalId().rawId() << " " << recHit1->geographicalId().rawId()
2934  << " hitpos: " << gp[0] << " " << gp[1]
2935  << " trans0: " << (recHit0->transientHits().size()>1 ? recHit0->transientHits()[0]->globalPosition() : GlobalPoint(0,0,0))
2936  << " " << (recHit0->transientHits().size()>1 ? recHit0->transientHits()[1]->globalPosition() : GlobalPoint(0,0,0))
2937  << " trans1: " << (recHit1->transientHits().size()>1 ? recHit1->transientHits()[0]->globalPosition() : GlobalPoint(0,0,0))
2938  << " " << (recHit1->transientHits().size()>1 ? recHit1->transientHits()[1]->globalPosition() : GlobalPoint(0,0,0))
2939  << " eta,phi: " << gp[0].eta() << "," << gp[0].phi();
2940  } else if (nHits==3) {
2941  TransientTrackingRecHit::RecHitPointer recHit0 = theTTRHBuilder.build(&*(seed.recHits().first));
2942  TransientTrackingRecHit::RecHitPointer recHit1 = theTTRHBuilder.build(&*(seed.recHits().first+1));
2943  TransientTrackingRecHit::RecHitPointer recHit2 = theTTRHBuilder.build(&*(seed.recHits().first+2));
2946  declareDynArray(bool,4, bl);
2947  gp[0] = recHit0->globalPosition();
2948  ge[0] = recHit0->globalPositionError();
2949  int subid0 = recHit0->geographicalId().subdetId();
2950  bl[0] = (subid0 == StripSubdetector::TIB || subid0 == StripSubdetector::TOB || subid0 == (int) PixelSubdetector::PixelBarrel);
2951  gp[1] = recHit1->globalPosition();
2952  ge[1] = recHit1->globalPositionError();
2953  int subid1 = recHit1->geographicalId().subdetId();
2954  bl[1] = (subid1 == StripSubdetector::TIB || subid1 == StripSubdetector::TOB || subid1 == (int) PixelSubdetector::PixelBarrel);
2955  gp[2] = recHit2->globalPosition();
2956  ge[2] = recHit2->globalPositionError();
2957  int subid2 = recHit2->geographicalId().subdetId();
2958  bl[2] = (subid2 == StripSubdetector::TIB || subid2 == StripSubdetector::TOB || subid2 == (int) PixelSubdetector::PixelBarrel);
2959  RZLine rzLine(gp,ge,bl);
2960  float seed_chi2 = rzLine.chi2();
2961  //float seed_pt = state.globalParameters().momentum().perp();
2962  float seed_pt = pt;
2963  LogTrace("TrackingNtuple") << "seed " << seedTrackRef.key()
2964  << " pt=" << pt << " eta=" << eta << " phi=" << phi << " q=" << charge
2965  << " - TRIPLET - ids: " << recHit0->geographicalId().rawId() << " " << recHit1->geographicalId().rawId() << " " << recHit2->geographicalId().rawId()
2966  << " hitpos: " << gp[0] << " " << gp[1] << " " << gp[2]
2967  << " trans0: " << (recHit0->transientHits().size()>1 ? recHit0->transientHits()[0]->globalPosition() : GlobalPoint(0,0,0))
2968  << " " << (recHit0->transientHits().size()>1 ? recHit0->transientHits()[1]->globalPosition() : GlobalPoint(0,0,0))
2969  << " trans1: " << (recHit1->transientHits().size()>1 ? recHit1->transientHits()[0]->globalPosition() : GlobalPoint(0,0,0))
2970  << " " << (recHit1->transientHits().size()>1 ? recHit1->transientHits()[1]->globalPosition() : GlobalPoint(0,0,0))
2971  << " trans2: " << (recHit2->transientHits().size()>1 ? recHit2->transientHits()[0]->globalPosition() : GlobalPoint(0,0,0))
2972  << " " << (recHit2->transientHits().size()>1 ? recHit2->transientHits()[1]->globalPosition() : GlobalPoint(0,0,0))
2973  << " local: " << recHit2->localPosition()
2974  //<< " tsos pos, mom: " << state.globalPosition()<<" "<<state.globalMomentum()
2975  << " eta,phi: " << gp[0].eta() << "," << gp[0].phi()
2976  << " pt,chi2: " << seed_pt << "," << seed_chi2;
2977  chi2 = seed_chi2;
2978  }
2979  see_chi2 .push_back( chi2 );
2980  }
2981 
2982  fillTrackingParticlesForSeeds(tpCollection, simRecColl, tpKeyToIndex, offset);
2983  }
2984 }
reco::SimToRecoCollection associateSimToReco(const edm::Handle< edm::View< reco::Track >> &tCH, const edm::Handle< TrackingParticleCollection > &tPCH) const
unsigned int size_type
Definition: View.h:90
std::vector< float > see_bestSimTrkShareFrac
std::vector< std::vector< float > > see_simTrkShareFrac
std::vector< short > see_fitok
Phase2Cluster1DRef cluster_phase2OT() const
std::vector< std::vector< int > > see_hitType
std::vector< float > see_stateTrajX
std::vector< std::vector< int > > ph2_seeIdx
std::vector< float > see_stateTrajPy
std::vector< unsigned int > see_nValid
bool trackFromSeedFitFailed(const reco::Track &track)
std::vector< float > see_phiErr
const_iterator end() const
last iterator over the map (read only)
std::vector< float > see_dzErr
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
std::vector< unsigned int > see_nStrip
std::vector< float > see_stateTrajPz
OmniClusterRef const & stereoClusterRef() const
std::vector< float > see_px
std::vector< float > see_chi2
const_iterator find(const key_type &k) const
find element with specified reference key
std::vector< float > see_stateTrajY
size_t addStripMatchedHit(const SiStripMatchedRecHit2D &hit, const TransientTrackingRecHitBuilder &theTTRHBuilder, const TrackerTopology &tTopo, std::vector< std::pair< int, int > > &monoStereoClusterList)
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
std::vector< unsigned short > see_stopReason
std::vector< OmniClusterRef > hitsToClusterRefs(iter begin, iter end)
std::vector< unsigned int > see_algo
std::vector< std::vector< int > > str_seeIdx
std::vector< std::vector< int > > see_simTrkIdx
key_type key() const
Accessor for product key.
Definition: Ref.h:263
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:20
std::vector< std::vector< int > > pix_seeIdx
ClusterPixelRef cluster_pixel() const
std::vector< short > see_isTrue
std::vector< float > see_etaErr
char const * label
std::vector< int > see_bestSimTrkIdx
std::vector< unsigned int > see_nCluster
void fillTrackingParticlesForSeeds(const TrackingParticleRefVector &tpCollection, const reco::SimToRecoCollection &simRecColl, const TrackingParticleRefKeyToIndex &tpKeyToIndex, const unsigned int seedOffset)
std::vector< int > see_bestFromFirstHitSimTrkIdx
std::vector< int > see_q
std::vector< edm::EDGetTokenT< edm::View< reco::Track > > > seedTokens_
std::vector< float > see_dxyErr
bool isMatched(TrackingRecHit const &hit)
std::vector< float > see_pt
std::vector< unsigned int > see_nPhase2OT
std::vector< std::vector< int > > glu_seeIdx
std::vector< float > see_dxy
const bool includeTrackingParticles_
size_type size() const
std::vector< float > see_phi
OmniClusterRef const & monoClusterRef() const
char const * module
Definition: ProductLabels.h:5
std::vector< float > see_pz
std::vector< edm::EDGetTokenT< std::vector< SeedStopInfo > > > seedStopInfoTokens_
#define LogTrace(id)
std::vector< float > see_stateTrajPx
reco::RecoToSimCollection associateRecoToSim(const edm::Handle< edm::View< reco::Track >> &tCH, const edm::Handle< TrackingParticleCollection > &tPCH) const
std::shared_ptr< TrackingRecHit const > RecHitPointer
virtual RecHitPointer build(const TrackingRecHit *p) const =0
build a tracking rechit from an existing rechit
Definition: RZLine.h:12
std::vector< unsigned int > see_nGlued
std::vector< float > see_py
std::vector< float > see_ptErr
void labelsForToken(EDGetToken iToken, Labels &oLabels) const
const bool includeAllHits_
edm::ProductID id() const
void push_back(const RefToBase< T > &)
virtual OmniClusterRef const & firstClusterRef() const =0
static TrackAlgorithm algoByName(const std::string &name)
Definition: TrackBase.cc:146
std::vector< float > see_statePt
const Point & position() const
position
Definition: BeamSpot.h:62
std::vector< unsigned short > see_nCands
#define declareDynArray(T, n, x)
Definition: DynArray.h:59
std::vector< unsigned int > see_offset
std::vector< int > see_trkIdx
unsigned int key() const
std::vector< std::vector< int > > see_hitIdx
std::vector< unsigned int > see_nPixel
std::vector< float > see_eta
std::vector< float > see_bestFromFirstHitSimTrkShareFrac
std::vector< float > see_dz
void TrackingNtuple::fillSimHits ( const TrackerGeometry tracker,
const TrackingParticleRefKeyToIndex &  tpKeyToIndex,
const SimHitTPAssociationProducer::SimHitTPAssociationList simHitsTPAssoc,
const TrackerTopology tTopo,
SimHitRefKeyToIndex &  simHitRefKeyToIndex,
std::vector< TPHitIndex > &  tpHitList 
)
private

Definition at line 2313 of file TrackingNtuple.cc.

References funct::abs(), trackingPlots::assoc, DetId::det(), Exception, TrackerGeometry::idToDetUnit(), LogTrace, TrackingParticle::pdgId(), simhit_detId, simhit_detId_phase2, simhit_eloss, simhit_hitIdx, simhit_hitType, simhit_particle, simhit_process, simhit_simTrkIdx, simhit_tof, simhit_x, simhit_y, simhit_z, SimHitTPAssociationProducer::simHitTPAssociationListGreater(), muonSimHitMatcherPSet::simTrack, and DetId::Tracker.

Referenced by analyze().

2318  {
2319 
2320  for(const auto& assoc: simHitsTPAssoc) {
2321  auto tpKey = assoc.first.key();
2322 
2323  // SimHitTPAssociationList can contain more TrackingParticles than
2324  // what are given to this EDAnalyzer, so we can filter those out here.
2325  auto found = tpKeyToIndex.find(tpKey);
2326  if(found == tpKeyToIndex.end())
2327  continue;
2328  const auto tpIndex = found->second;
2329 
2330  // skip non-tracker simhits (mostly muons)
2331  const auto& simhit = *(assoc.second);
2332  auto detId = DetId(simhit.detUnitId());
2333  if(detId.det() != DetId::Tracker) continue;
2334 
2335  // Skip electron SimHits for non-electron TrackingParticles to
2336  // filter out delta rays. The delta ray hits just confuse. If we
2337  // need them later, let's add them as a separate "collection" of
2338  // hits of a TP
2339  const TrackingParticle& tp = *(assoc.first);
2340  if(std::abs(simhit.particleType()) == 11 && std::abs(tp.pdgId()) != 11) continue;
2341 
2342  auto simHitKey = std::make_pair(assoc.second.key(), assoc.second.id());
2343 
2344  if(simHitRefKeyToIndex.find(simHitKey) != simHitRefKeyToIndex.end()) {
2345  for(const auto& assoc2: simHitsTPAssoc) {
2346  if(std::make_pair(assoc2.second.key(), assoc2.second.id()) == simHitKey) {
2347 
2348 #ifdef EDM_ML_DEBUG
2349  auto range1 = std::equal_range(simHitsTPAssoc.begin(), simHitsTPAssoc.end(),
2350  std::make_pair(assoc.first, TrackPSimHitRef()),
2352  auto range2 = std::equal_range(simHitsTPAssoc.begin(), simHitsTPAssoc.end(),
2353  std::make_pair(assoc2.first, TrackPSimHitRef()),
2355 
2356  LogTrace("TrackingNtuple") << "Earlier TP " << assoc2.first.key() << " SimTrack Ids";
2357  for(const auto& simTrack: assoc2.first->g4Tracks()) {
2358  edm::LogPrint("TrackingNtuple") << " SimTrack " << simTrack.trackId() << " BX:event " << simTrack.eventId().bunchCrossing() << ":" << simTrack.eventId().event();
2359  }
2360  for(auto iHit = range2.first; iHit != range2.second; ++iHit) {
2361  LogTrace("TrackingNtuple") << " SimHit " << iHit->second.key() << " " << iHit->second.id() << " tof " << iHit->second->tof() << " trackId " << iHit->second->trackId() << " BX:event " << iHit->second->eventId().bunchCrossing() << ":" << iHit->second->eventId().event();
2362  }
2363  LogTrace("TrackingNtuple") << "Current TP " << assoc.first.key() << " SimTrack Ids";
2364  for(const auto& simTrack: assoc.first->g4Tracks()) {
2365  edm::LogPrint("TrackingNtuple") << " SimTrack " << simTrack.trackId() << " BX:event " << simTrack.eventId().bunchCrossing() << ":" << simTrack.eventId().event();
2366  }
2367  for(auto iHit = range1.first; iHit != range1.second; ++iHit) {
2368  LogTrace("TrackingNtuple") << " SimHit " << iHit->second.key() << " " << iHit->second.id() << " tof " << iHit->second->tof() << " trackId " << iHit->second->trackId() << " BX:event " << iHit->second->eventId().bunchCrossing() << ":" << iHit->second->eventId().event();
2369  }
2370 #endif
2371 
2372  throw cms::Exception("LogicError") << "Got second time the SimHit " << simHitKey.first << " of " << simHitKey.second << ", first time with TrackingParticle " << assoc2.first.key() << ", now with " << tpKey;
2373  }
2374  }
2375  throw cms::Exception("LogicError") << "Got second time the SimHit " << simHitKey.first << " of " << simHitKey.second << ", now with TrackingParticle " << tpKey << ", but I didn't find the first occurrance!";
2376  }
2377 
2378  auto det = tracker.idToDetUnit(detId);
2379  if(!det)
2380  throw cms::Exception("LogicError") << "Did not find a det unit for DetId " << simhit.detUnitId() << " from tracker geometry";
2381 
2382  const auto pos = det->surface().toGlobal(simhit.localPosition());
2383  const float tof = simhit.timeOfFlight();
2384 
2385  const auto simHitIndex = simhit_x.size();
2386  simHitRefKeyToIndex[simHitKey] = simHitIndex;
2387 
2388  if(includeStripHits_) simhit_detId.push_back(tTopo, detId);
2389  else simhit_detId_phase2.push_back(tTopo, detId);
2390  simhit_x.push_back(pos.x());
2391  simhit_y.push_back(pos.y());
2392  simhit_z.push_back(pos.z());
2393  simhit_particle.push_back(simhit.particleType());
2394  simhit_process.push_back(simhit.processType());
2395  simhit_eloss.push_back(simhit.energyLoss());
2396  simhit_tof.push_back(tof);
2397  //simhit_simTrackId.push_back(simhit.trackId());
2398 
2399  simhit_simTrkIdx.push_back(tpIndex);
2400 
2401  simhit_hitIdx.emplace_back(); // filled in matchCluster
2402  simhit_hitType.emplace_back(); // filled in matchCluster
2403 
2404  tpHitList.emplace_back(tpKey, simHitIndex, tof, simhit.detUnitId());
2405  }
2406 }
std::vector< std::vector< int > > simhit_hitIdx
static bool simHitTPAssociationListGreater(SimHitTPPair i, SimHitTPPair j)
int pdgId() const
PDG ID.
std::vector< short > simhit_process
std::vector< int > simhit_simTrkIdx
std::vector< float > simhit_z
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
std::vector< std::vector< int > > simhit_hitType
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
#define LogTrace(id)
Definition: DetId.h:18
std::vector< int > simhit_particle
std::vector< float > simhit_y
Monte Carlo truth information used for tracking validation.
std::vector< float > simhit_x
std::vector< float > simhit_tof
DetIdAllPhase2 simhit_detId_phase2
std::vector< float > simhit_eloss
void TrackingNtuple::fillStripMatchedHits ( const edm::Event iEvent,
const TransientTrackingRecHitBuilder theTTRHBuilder,
const TrackerTopology tTopo,
std::vector< std::pair< int, int > > &  monoStereoClusterList 
)
private

Definition at line 2601 of file TrackingNtuple.cc.

References addStripMatchedHit(), edmNew::DetSetVector< T >::begin(), edmNew::DetSetVector< T >::end(), and edm::Event::getByToken().

Referenced by analyze().

2605  {
2607  iEvent.getByToken(stripMatchedRecHitToken_, matchedHits);
2608  for (auto it = matchedHits->begin(); it!=matchedHits->end(); it++ ) {
2609  for (auto hit = it->begin(); hit!=it->end(); hit++ ) {
2610  addStripMatchedHit(*hit, theTTRHBuilder, tTopo, monoStereoClusterList);
2611  }
2612  }
2613 }
edm::EDGetTokenT< SiStripMatchedRecHit2DCollection > stripMatchedRecHitToken_
const_iterator end(bool update=false) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
size_t addStripMatchedHit(const SiStripMatchedRecHit2D &hit, const TransientTrackingRecHitBuilder &theTTRHBuilder, const TrackerTopology &tTopo, std::vector< std::pair< int, int > > &monoStereoClusterList)
const_iterator begin(bool update=false) const
void TrackingNtuple::fillStripRphiStereoHits ( const edm::Event iEvent,
const ClusterTPAssociation clusterToTPMap,
const TrackingParticleRefKeyToIndex &  tpKeyToIndex,
const SimHitTPAssociationProducer::SimHitTPAssociationList simHitsTPAssoc,
const edm::DetSetVector< StripDigiSimLink > &  digiSimLink,
const TransientTrackingRecHitBuilder theTTRHBuilder,
const TrackerTopology tTopo,
const SimHitRefKeyToIndex &  simHitRefKeyToIndex,
std::set< edm::ProductID > &  hitProductIds 
)
private

Definition at line 2474 of file TrackingNtuple.cc.

References TransientTrackingRecHitBuilder::build(), TrackingNtuple::SimHitData::bunchCrossing, TrackingNtuple::SimHitData::chargeFraction, edmNew::DetSetVector< T >::dataSize(), TrackingNtuple::SimHitData::event, lumiContext::fill, SiStripMatchedRecHit2D::firstClusterRef(), edm::Event::getByToken(), hfClusterShapes_cfi::hits, crabWrapper::key, TrackerTopology::layer(), LogTrace, matchCluster(), TrackingNtuple::SimHitData::matchingSimHit, dataset::name, DetId::rawId(), simhit_eloss, simhit_particle, simhit_process, simhit_x, simhit_y, simhit_z, str_bbxi, str_chargeFraction, str_detId, str_isBarrel, str_radL, str_seeIdx, str_simHitIdx, str_simType, str_trkIdx, str_x, str_xx, str_xy, str_y, str_yy, str_yz, str_z, str_zx, str_zz, Strip, DetId::subdetId(), StripSubdetector::TIB, StripSubdetector::TOB, and TrackingNtuple::SimHitData::type.

Referenced by analyze().

2483  {
2484  //index strip hit branches by cluster index
2486  iEvent.getByToken(stripRphiRecHitToken_, rphiHits);
2488  iEvent.getByToken(stripStereoRecHitToken_, stereoHits);
2489  int totalStripHits = rphiHits->dataSize()+stereoHits->dataSize();
2490  str_isBarrel .resize(totalStripHits);
2491  str_detId .resize(totalStripHits);
2492  str_trkIdx .resize(totalStripHits); // filled in fillTracks
2493  str_seeIdx .resize(totalStripHits); // filled in fillSeeds
2494  str_simHitIdx.resize(totalStripHits);
2495  str_simType .resize(totalStripHits);
2496  str_chargeFraction.resize(totalStripHits);
2497  str_x .resize(totalStripHits);
2498  str_y .resize(totalStripHits);
2499  str_z .resize(totalStripHits);
2500  str_xx .resize(totalStripHits);
2501  str_xy .resize(totalStripHits);
2502  str_yy .resize(totalStripHits);
2503  str_yz .resize(totalStripHits);
2504  str_zz .resize(totalStripHits);
2505  str_zx .resize(totalStripHits);
2506  str_radL .resize(totalStripHits);
2507  str_bbxi .resize(totalStripHits);
2508 
2509  auto fill = [&](const SiStripRecHit2DCollection& hits, const char *name) {
2510  for(const auto& detset: hits) {
2511  const DetId hitId = detset.detId();
2512  for(const auto& hit: detset) {
2513  TransientTrackingRecHit::RecHitPointer ttrh = theTTRHBuilder.build(&hit);
2514 
2515  hitProductIds.insert(hit.cluster().id());
2516 
2517  const int key = hit.cluster().key();
2518  const int lay = tTopo.layer(hitId);
2520  str_detId.set(key, tTopo, hitId);
2521  str_x [key] = ttrh->globalPosition().x();
2522  str_y [key] = ttrh->globalPosition().y();
2523  str_z [key] = ttrh->globalPosition().z();
2524  str_xx [key] = ttrh->globalPositionError().cxx();
2525  str_xy [key] = ttrh->globalPositionError().cyx();
2526  str_yy [key] = ttrh->globalPositionError().cyy();
2527  str_yz [key] = ttrh->globalPositionError().czy();
2528  str_zz [key] = ttrh->globalPositionError().czz();
2529  str_zx [key] = ttrh->globalPositionError().czx();
2530  str_radL [key] = ttrh->surface()->mediumProperties().radLen();
2531  str_bbxi [key] = ttrh->surface()->mediumProperties().xi();
2532  LogTrace("TrackingNtuple") << name << " cluster=" << key
2533  << " subdId=" << hitId.subdetId()
2534  << " lay=" << lay
2535  << " rawId=" << hitId.rawId()
2536  << " pos =" << ttrh->globalPosition();
2537 
2539  SimHitData simHitData = matchCluster(hit.firstClusterRef(), hitId, key, ttrh,
2540  clusterToTPMap, tpKeyToIndex, simHitsTPAssoc, digiSimLink, simHitRefKeyToIndex, HitType::Strip);
2541  str_simHitIdx[key] = simHitData.matchingSimHit;
2542  str_simType [key] = static_cast<int>(simHitData.type);
2543  str_chargeFraction[key] = simHitData.chargeFraction;
2544  LogTrace("TrackingNtuple") << " nMatchingSimHit=" << simHitData.matchingSimHit.size();
2545  if(!simHitData.matchingSimHit.empty()) {
2546  const auto simHitIdx = simHitData.matchingSimHit[0];
2547  LogTrace("TrackingNtuple") << " firstMatchingSimHit=" << simHitIdx
2548  << " simHitPos=" << GlobalPoint(simhit_x[simHitIdx], simhit_y[simHitIdx], simhit_z[simHitIdx])
2549  << " simHitPos=" << GlobalPoint(simhit_x[simHitIdx], simhit_y[simHitIdx], simhit_z[simHitIdx])
2550  << " energyLoss=" << simhit_eloss[simHitIdx]
2551  << " particleType=" << simhit_particle[simHitIdx]
2552  << " processType=" << simhit_process[simHitIdx]
2553  << " bunchCrossing=" << simHitData.bunchCrossing[0]
2554  << " event=" << simHitData.event[0];
2555  }
2556  }
2557  }
2558  }
2559  };
2560 
2561  fill(*rphiHits, "stripRPhiHit");
2562  fill(*stereoHits, "stripStereoHit");
2563 }
edm::EDGetTokenT< SiStripRecHit2DCollection > stripRphiRecHitToken_
DetIdStrip str_detId
size_type dataSize() const
std::vector< std::vector< int > > str_trkIdx
std::vector< float > str_yy
SimHitData matchCluster(const OmniClusterRef &cluster, DetId hitId, int clusterKey, const TransientTrackingRecHit::RecHitPointer &ttrh, const ClusterTPAssociation &clusterToTPMap, const TrackingParticleRefKeyToIndex &tpKeyToIndex, const SimHitTPAssociationProducer::SimHitTPAssociationList &simHitsTPAssoc, const edm::DetSetVector< SimLink > &digiSimLinks, const SimHitRefKeyToIndex &simHitRefKeyToIndex, HitType hitType)
std::vector< float > str_x
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
edm::EDGetTokenT< SiStripRecHit2DCollection > stripStereoRecHitToken_
std::vector< float > str_yz
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:50
std::vector< short > simhit_process
std::vector< std::vector< int > > str_seeIdx
std::vector< float > str_radL
std::vector< unsigned short > str_simType
std::vector< float > simhit_z
std::vector< float > str_y
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:41
std::vector< float > str_zz
const bool includeTrackingParticles_
#define LogTrace(id)
std::shared_ptr< TrackingRecHit const > RecHitPointer
virtual RecHitPointer build(const TrackingRecHit *p) const =0
build a tracking rechit from an existing rechit
unsigned int id
Definition: DetId.h:18
std::vector< float > str_z
std::vector< float > str_zx
std::vector< float > str_xy
std::vector< std::vector< float > > str_chargeFraction
unsigned int layer(const DetId &id) const
std::vector< short > str_isBarrel
std::vector< int > simhit_particle
std::vector< float > simhit_y
std::vector< std::vector< int > > str_simHitIdx
std::vector< float > simhit_x
std::vector< float > str_xx
std::vector< float > simhit_eloss
std::vector< float > str_bbxi
void TrackingNtuple::fillTrackingParticles ( const edm::Event iEvent,
const edm::EventSetup iSetup,
const edm::RefToBaseVector< reco::Track > &  tracks,
const reco::BeamSpot bs,
const TrackingParticleRefVector tpCollection,
const TrackingVertexRefKeyToIndex &  tvKeyToIndex,
const reco::TrackToTrackingParticleAssociator associatorByHits,
const std::vector< TPHitIndex > &  tpHitList,
const TrackingParticleRefKeyToCount &  tpKeyToClusterCount 
)
private

Definition at line 3259 of file TrackingNtuple.cc.

References reco::TrackToTrackingParticleAssociator::associateSimToReco(), TrackingParticleIP::dxy(), TrackingParticleIP::dz(), edm::AssociationMap< Tag >::end(), HistoryBase::evaluate(), Exception, edm::AssociationMap< Tag >::find(), edm::EventSetup::get(), edm::Event::getByToken(), LogTrace, M_PI, ParametersDefinerForTP::momentum(), MuonTrackValidator_cfi::parametersDefiner, EgammaObjectsElectrons_cfi::particleID, source_particleGun_cfi::ParticleID, PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, reco::BeamSpot::position(), edm::ESHandle< T >::product(), HistoryBase::recoGenParticleTrail(), sim_bunchCrossing, sim_decayVtxIdx, sim_eta, sim_event, sim_genPdgIds, sim_isFromBHadron, sim_n3DLay, sim_nLay, sim_nPixel, sim_nPixelLay, sim_nRecoClusters, sim_nStrip, sim_nTrackerHits, sim_nValid, sim_parentVtxIdx, sim_pca_cotTheta, sim_pca_dxy, sim_pca_dz, sim_pca_eta, sim_pca_lambda, sim_pca_phi, sim_pca_pt, sim_pdgId, sim_phi, sim_pt, sim_px, sim_py, sim_pz, sim_q, sim_simHitIdx, sim_trkIdx, sim_trkShareFrac, simhit_detId, simhit_detId_phase2, simhit_hitType, mathSSE::sqrt(), funct::tan(), StripSubdetector::TEC, StripSubdetector::TIB, StripSubdetector::TID, StripSubdetector::TOB, tpHitIndexListLess(), DetId::Tracker, photonIsolationHIProducer_cfi::trackQuality, Unknown, findQualityFiles::v, and ParametersDefinerForTP::vertex().

Referenced by analyze().

3267  {
3268  edm::ESHandle<ParametersDefinerForTP> parametersDefinerH;
3269  iSetup.get<TrackAssociatorRecord>().get(parametersDefinerName_, parametersDefinerH);
3270  const ParametersDefinerForTP *parametersDefiner = parametersDefinerH.product();
3271 
3272  // Number of 3D layers for TPs
3274  iEvent.getByToken(tpNLayersToken_, tpNLayersH);
3275  const auto& nLayers_tPCeff = *tpNLayersH;
3276 
3277  iEvent.getByToken(tpNPixelLayersToken_, tpNLayersH);
3278  const auto& nPixelLayers_tPCeff = *tpNLayersH;
3279 
3280  iEvent.getByToken(tpNStripStereoLayersToken_, tpNLayersH);
3281  const auto& nStripMonoAndStereoLayers_tPCeff = *tpNLayersH;
3282 
3283  reco::SimToRecoCollection simRecColl = associatorByHits.associateSimToReco(tracks, tpCollection);
3284 
3285  for(const TrackingParticleRef& tp: tpCollection) {
3286  LogTrace("TrackingNtuple") << "tracking particle pt=" << tp->pt() << " eta=" << tp->eta() << " phi=" << tp->phi();
3287  bool isRecoMatched = false;
3288  std::vector<int> tkIdx;
3289  std::vector<float> sharedFraction;
3290  auto foundTracks = simRecColl.find(tp);
3291  if(foundTracks != simRecColl.end()) {
3292  isRecoMatched = true;
3293  for(const auto trackQuality: foundTracks->val) {
3294  sharedFraction.push_back(trackQuality.second);
3295  tkIdx.push_back(trackQuality.first.key());
3296  }
3297  }
3298 
3299  sim_genPdgIds.emplace_back();
3300  for(const auto& genRef: tp->genParticles()) {
3301  if(genRef.isNonnull())
3302  sim_genPdgIds.back().push_back(genRef->pdgId());
3303  }
3304 
3305  bool isFromBHadron = false;
3306  // Logic is similar to SimTracker/TrackHistory
3307  if(tracer_.evaluate(tp)) { // ignore TP if history can not be traced
3308  // following is from TrackClassifier::processesAtGenerator()
3309  HistoryBase::RecoGenParticleTrail const & recoGenParticleTrail = tracer_.recoGenParticleTrail();
3310  for(const auto& particle: recoGenParticleTrail) {
3311  HepPDT::ParticleID particleID(particle->pdgId());
3312  if(particleID.hasBottom()) {
3313  isFromBHadron = true;
3314  break;
3315  }
3316  }
3317  }
3318 
3319  LogTrace("TrackingNtuple") << "matched to tracks = " << make_VectorPrinter(tkIdx) << " isRecoMatched=" << isRecoMatched;
3320  sim_event .push_back(tp->eventId().event());
3321  sim_bunchCrossing.push_back(tp->eventId().bunchCrossing());
3322  sim_pdgId .push_back(tp->pdgId());
3323  sim_isFromBHadron.push_back(isFromBHadron);
3324  sim_px .push_back(tp->px());
3325  sim_py .push_back(tp->py());
3326  sim_pz .push_back(tp->pz());
3327  sim_pt .push_back(tp->pt());
3328  sim_eta .push_back(tp->eta());
3329  sim_phi .push_back(tp->phi());
3330  sim_q .push_back(tp->charge());
3331  sim_trkIdx .push_back(tkIdx);
3332  sim_trkShareFrac.push_back(sharedFraction);
3333  sim_parentVtxIdx.push_back( tvKeyToIndex.at(tp->parentVertex().key()) );
3334  std::vector<int> decayIdx;
3335  for(const auto& v: tp->decayVertices())
3336  decayIdx.push_back( tvKeyToIndex.at(v.key()) );
3337  sim_decayVtxIdx.push_back(decayIdx);
3338 
3339  //Calcualte the impact parameters w.r.t. PCA
3340  TrackingParticle::Vector momentum = parametersDefiner->momentum(iEvent,iSetup,tp);
3341  TrackingParticle::Point vertex = parametersDefiner->vertex(iEvent,iSetup,tp);
3342  auto dxySim = TrackingParticleIP::dxy(vertex, momentum, bs.position());
3343  auto dzSim = TrackingParticleIP::dz(vertex, momentum, bs.position());
3344  const double lambdaSim = M_PI/2 - momentum.theta();
3345  sim_pca_pt .push_back(std::sqrt(momentum.perp2()));
3346  sim_pca_eta .push_back(momentum.Eta());
3347  sim_pca_lambda .push_back(lambdaSim);
3348  sim_pca_cotTheta .push_back(1/tan(M_PI*0.5-lambdaSim));
3349  sim_pca_phi .push_back(momentum.phi());
3350  sim_pca_dxy .push_back(dxySim);
3351  sim_pca_dz .push_back(dzSim);
3352 
3353  std::vector<int> hitIdx;
3354  int nPixel=0, nStrip=0;
3355  auto rangeHit = std::equal_range(tpHitList.begin(), tpHitList.end(), TPHitIndex(tp.key()), tpHitIndexListLess);
3356  for(auto ip = rangeHit.first; ip != rangeHit.second; ++ip) {
3357  auto type = HitType::Unknown;
3358  if(!simhit_hitType[ip->simHitIdx].empty())
3359  type = static_cast<HitType>(simhit_hitType[ip->simHitIdx][0]);
3360  LogTrace("TrackingNtuple") << "simhit=" << ip->simHitIdx << " type=" << static_cast<int>(type);
3361  hitIdx.push_back(ip->simHitIdx);
3362  const auto detid = DetId(includeStripHits_ ? simhit_detId[ip->simHitIdx] : simhit_detId_phase2[ip->simHitIdx]);
3363  if(detid.det() != DetId::Tracker) {
3364  throw cms::Exception("LogicError") << "Encountered SimHit for TP " << tp.key() << " with DetId " << detid.rawId() << " whose det() is not Tracker but " << detid.det();
3365  }
3366  const auto subdet = detid.subdetId();
3367  switch(subdet) {
3370  ++nPixel;
3371  break;
3372  case StripSubdetector::TIB:
3373  case StripSubdetector::TID:
3374  case StripSubdetector::TOB:
3375  case StripSubdetector::TEC:
3376  ++nStrip;
3377  break;
3378  default:
3379  throw cms::Exception("LogicError") << "Encountered SimHit for TP " << tp.key() << " with DetId " << detid.rawId() << " whose subdet is not recognized, is " << subdet;
3380  };
3381  }
3382  sim_nValid .push_back( hitIdx.size() );
3383  sim_nPixel .push_back( nPixel );
3384  sim_nStrip .push_back( nStrip );
3385 
3386  const auto nSimLayers = nLayers_tPCeff[tp];
3387  const auto nSimPixelLayers = nPixelLayers_tPCeff[tp];
3388  const auto nSimStripMonoAndStereoLayers = nStripMonoAndStereoLayers_tPCeff[tp];
3389  sim_nLay .push_back( nSimLayers );
3390  sim_nPixelLay.push_back( nSimPixelLayers );
3391  sim_n3DLay .push_back( nSimPixelLayers+nSimStripMonoAndStereoLayers );
3392 
3393  sim_nTrackerHits.push_back(tp->numberOfTrackerHits());
3394  auto found = tpKeyToClusterCount.find(tp.key());
3395  sim_nRecoClusters.push_back(found != cend(tpKeyToClusterCount) ? found->second : 0);
3396 
3397  sim_simHitIdx.push_back(hitIdx);
3398  }
3399 }
std::vector< unsigned int > sim_nTrackerHits
std::vector< float > sim_pca_dz
std::vector< unsigned int > sim_nLay
type
Definition: HCALResponse.h:21
reco::SimToRecoCollection associateSimToReco(const edm::Handle< edm::View< reco::Track >> &tCH, const edm::Handle< TrackingParticleCollection > &tPCH) const
std::vector< float > sim_pca_cotTheta
std::vector< float > sim_pca_dxy
std::vector< int > sim_bunchCrossing
const_iterator end() const
last iterator over the map (read only)
std::vector< unsigned int > sim_n3DLay
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
std::vector< float > sim_phi
const_iterator find(const key_type &k) const
find element with specified reference key
static bool tpHitIndexListLess(const TPHitIndex &i, const TPHitIndex &j)
std::vector< float > sim_py
std::vector< float > sim_px
std::vector< std::vector< int > > sim_decayVtxIdx
std::vector< std::vector< float > > sim_trkShareFrac
std::vector< int > sim_q
math::XYZPointD Point
point in the space
std::vector< int > sim_event
std::vector< const reco::GenParticle * > RecoGenParticleTrail
reco::GenParticle trail type.
Definition: HistoryBase.h:18
edm::EDGetTokenT< edm::ValueMap< unsigned int > > tpNStripStereoLayersToken_
std::string parametersDefinerName_
std::vector< float > sim_pca_phi
auto dz(const T_Vertex &vertex, const T_Momentum &momentum, const T_Point &point)
std::vector< unsigned int > sim_nRecoClusters
T sqrt(T t)
Definition: SSEVec.h:18
std::vector< float > sim_eta
std::vector< int > sim_pdgId
std::vector< std::vector< int > > simhit_hitType
std::vector< std::vector< int > > sim_genPdgIds
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
std::vector< unsigned int > sim_nValid
virtual TrackingParticle::Vector momentum(const edm::Event &iEvent, const edm::EventSetup &iSetup, const Charge ch, const Point &vtx, const LorentzVector &lv) const
std::vector< float > sim_pca_pt
std::vector< std::vector< int > > sim_trkIdx
std::vector< unsigned int > sim_nPixelLay
#define LogTrace(id)
std::vector< float > sim_pca_lambda
#define M_PI
std::vector< float > sim_pz
std::vector< std::vector< int > > sim_simHitIdx
Definition: DetId.h:18
std::vector< int > sim_parentVtxIdx
HistoryBase tracer_
std::vector< unsigned int > sim_nPixel
bool evaluate(TrackingParticleRef tpr)
Evaluate track history using a TrackingParticleRef.
Definition: HistoryBase.h:96
auto dxy(const T_Vertex &vertex, const T_Momentum &momentum, const T_Point &point)
T get() const
Definition: EventSetup.h:71
edm::EDGetTokenT< edm::ValueMap< unsigned int > > tpNLayersToken_
std::vector< float > sim_pca_eta
edm::EDGetTokenT< edm::ValueMap< unsigned int > > tpNPixelLayersToken_
const Point & position() const
position
Definition: BeamSpot.h:62
math::XYZVectorD Vector
point in the space
RecoGenParticleTrail const & recoGenParticleTrail() const
Return all reco::GenParticle in the history.
Definition: HistoryBase.h:64
std::vector< float > sim_pt
T const * product() const
Definition: ESHandle.h:86
DetIdAllPhase2 simhit_detId_phase2
std::vector< int > sim_isFromBHadron
virtual TrackingParticle::Point vertex(const edm::Event &iEvent, const edm::EventSetup &iSetup, const Charge ch, const Point &vtx, const LorentzVector &lv) const
std::vector< unsigned int > sim_nStrip
void TrackingNtuple::fillTrackingParticlesForSeeds ( const TrackingParticleRefVector tpCollection,
const reco::SimToRecoCollection simRecColl,
const TrackingParticleRefKeyToIndex &  tpKeyToIndex,
const unsigned int  seedOffset 
)
private

Definition at line 3402 of file TrackingNtuple.cc.

References sim_seedIdx, and edm::RefVector< C, T, F >::size().

Referenced by fillSeeds().

3405  {
3406  if(sim_seedIdx.empty()) // first call
3407  sim_seedIdx.resize(tpCollection.size());
3408 
3409  for(const auto& keyVal: simRecColl) {
3410  const auto& tpRef = keyVal.key;
3411  auto found = tpKeyToIndex.find(tpRef.key());
3412  if(found == tpKeyToIndex.end())
3413  throw cms::Exception("Assert") << __FILE__ << ":" << __LINE__ << " fillTrackingParticlesForSeeds: tpRef.key() " << tpRef.key() << " not found from tpKeyToIndex. tpKeyToIndex size " << tpKeyToIndex.size();
3414  const auto tpIndex = found->second;
3415  for(const auto& pair: keyVal.val) {
3416  const auto& seedRef = pair.first->seedRef();
3417  sim_seedIdx[tpIndex].push_back(seedOffset + seedRef.key());
3418  }
3419  }
3420 }
size_type size() const
Size of the RefVector.
Definition: RefVector.h:107
std::vector< std::vector< int > > sim_seedIdx
void TrackingNtuple::fillTrackingVertices ( const TrackingVertexRefVector trackingVertices,
const TrackingParticleRefKeyToIndex &  tpKeyToIndex 
)
private

Definition at line 3455 of file TrackingNtuple.cc.

References EncodedEventId::bunchCrossing(), TrackingVertex::daughterTracks(), EncodedEventId::event(), TrackingVertex::eventId(), lumiContext::fill, TrackingVertex::g4Vertices(), training_settings::idx, SiStripPI::max, TrackingVertex::position(), simpv_idx, simvtx_bunchCrossing, simvtx_daughterSimIdx, simvtx_event, simvtx_processType, simvtx_sourceSimIdx, simvtx_x, simvtx_y, simvtx_z, TrackingVertex::sourceTracks(), and findQualityFiles::v.

Referenced by analyze().

3457  {
3458  int current_event = -1;
3459  for(const auto& ref: trackingVertices) {
3460  const TrackingVertex v = *ref;
3461  if(v.eventId().event() != current_event) {
3462  // next PV
3463  current_event = v.eventId().event();
3464  simpv_idx.push_back(simvtx_x.size());
3465  }
3466 
3467  unsigned int processType = std::numeric_limits<unsigned int>::max();
3468  if(!v.g4Vertices().empty()) {
3469  processType = v.g4Vertices()[0].processType();
3470  }
3471 
3472  simvtx_event.push_back(v.eventId().event());
3473  simvtx_bunchCrossing.push_back(v.eventId().bunchCrossing());
3474  simvtx_processType.push_back(processType);
3475 
3476  simvtx_x.push_back(v.position().x());
3477  simvtx_y.push_back(v.position().y());
3478  simvtx_z.push_back(v.position().z());
3479 
3480  auto fill = [&](const TrackingParticleRefVector& tps, std::vector<int>& idx) {
3481  for(const auto& tpRef: tps) {
3482  auto found = tpKeyToIndex.find(tpRef.key());
3483  if(found != tpKeyToIndex.end()) {
3484  idx.push_back(found->second);
3485  }
3486  }
3487  };
3488 
3489  std::vector<int> sourceIdx;
3490  std::vector<int> daughterIdx;
3491  fill(v.sourceTracks(), sourceIdx);
3492  fill(v.daughterTracks(), daughterIdx);
3493 
3494  simvtx_sourceSimIdx.push_back(sourceIdx);
3495  simvtx_daughterSimIdx.push_back(daughterIdx);
3496  }
3497 }
std::vector< unsigned int > simvtx_processType
std::vector< float > simvtx_z
const TrackingParticleRefVector & sourceTracks() const
int event() const
get the contents of the subdetector field (should be protected?)
const std::vector< SimVertex > & g4Vertices() const
std::vector< int > simvtx_event
std::vector< int > simpv_idx
std::vector< std::vector< int > > simvtx_sourceSimIdx
int bunchCrossing() const
get the detector field from this detid
std::vector< float > simvtx_x
const EncodedEventId & eventId() const
const TrackingParticleRefVector & daughterTracks() const
std::vector< float > simvtx_y
std::vector< std::vector< int > > simvtx_daughterSimIdx
std::vector< int > simvtx_bunchCrossing
const LorentzVector & position() const
void TrackingNtuple::fillTracks ( const edm::RefToBaseVector< reco::Track > &  tracks,
const TrackingParticleRefVector tpCollection,
const TrackingParticleRefKeyToIndex &  tpKeyToIndex,
const TrackingParticleRefKeyToCount &  tpKeyToClusterCount,
const MagneticField mf,
const reco::BeamSpot bs,
const reco::VertexCollection vertices,
const reco::TrackToTrackingParticleAssociator associatorByHits,
const ClusterTPAssociation clusterToTPMap,
const TransientTrackingRecHitBuilder theTTRHBuilder,
const TrackerTopology tTopo,
const std::set< edm::ProductID > &  hitProductIds,
const std::map< edm::ProductID, size_t > &  seedToCollIndex,
const std::vector< const MVACollection * > &  mvaColls,
const std::vector< const QualityMaskCollection * > &  qualColls 
)
private

Definition at line 2986 of file TrackingNtuple.cc.

References reco::TrackBase::algoName(), reco::TrackToTrackingParticleAssociator::associateRecoToSim(), TransientTrackingRecHitBuilder::build(), ALCARECOTkAlJpsiMuMu_cff::charge, vertices_cff::chi2, OmniClusterRef::cluster_pixel(), DetId::det(), SoftLeptonByDistance_cfi::distance, edm::AssociationMap< Tag >::end(), PVValHelper::eta, Exception, edm::AssociationMap< Tag >::find(), BaseTrackerRecHit::firstClusterRef(), getBestVertex(), reco::TrackBase::highPurity, track_associator::hitsToClusterRefs(), AnalysisDataFormats_SUSYBSMObjects::hp, mps_fire::i, inv_detId, inv_detId_phase2, inv_isBarrel, inv_type, Invalid, TrackingRecHit::isValid(), edm::Ref< C, T, F >::key(), tablePrinter::labels, edm::EDConsumerBase::labelsForToken(), TrackerTopology::layer(), LogTrace, M_PI, reco::HitPattern::MISSING_INNER_HITS, reco::HitPattern::MISSING_OUTER_HITS, edm::ProductLabels::module, ndof, reco::HitPattern::numberOfLostHits(), reco::HitPattern::numberOfLostTrackerHits(), reco::HitPattern::numberOfValidHits(), reco::HitPattern::numberOfValidPixelHits(), reco::HitPattern::numberOfValidStripHits(), reco::HitPattern::numberOfValidStripLayersWithMonoAndStereo(), PFRecoTauDiscriminationByIsolation_cfi::offset, ph2_trkIdx, Phase2OT, phi, pix_trkIdx, Pixel, reco::HitPattern::pixelLayersWithMeasurement(), reco::BeamSpot::position(), EnergyCorrector::pt, DetId::rawId(), see_trkIdx, edm::RefToBaseVector< T >::size(), str_trkIdx, Strip, reco::HitPattern::stripLayersWithMeasurement(), DetId::subdetId(), funct::tan(), reco::HitPattern::TRACK_HITS, track_associator::trackAssociationChi2(), DetId::Tracker, reco::HitPattern::trackerLayersTotallyOffOrBad(), reco::HitPattern::trackerLayersWithoutMeasurement(), trk_algoMask, trk_bestFromFirstHitSimTrkIdx, trk_bestFromFirstHitSimTrkNChi2, trk_bestFromFirstHitSimTrkShareFrac, trk_bestFromFirstHitSimTrkShareFracSimClusterDenom, trk_bestFromFirstHitSimTrkShareFracSimDenom, trk_bestSimTrkIdx, trk_bestSimTrkNChi2, trk_bestSimTrkShareFrac, trk_bestSimTrkShareFracSimClusterDenom, trk_bestSimTrkShareFracSimDenom, trk_hitIdx, trk_hitType, trk_isHP, trk_isTrue, trk_seedIdx, trk_simTrkIdx, trk_simTrkNChi2, trk_simTrkShareFrac, trk_stopReason, and trk_vtxIdx.

Referenced by analyze().

3001  {
3002  reco::RecoToSimCollection recSimColl = associatorByHits.associateRecoToSim(tracks, tpCollection);
3004  labelsForToken(trackToken_, labels);
3005  LogTrace("TrackingNtuple") << "NEW TRACK LABEL: " << labels.module;
3006 
3007  auto pvPosition = vertices[0].position();
3008 
3009  for(size_t iTrack = 0; iTrack<tracks.size(); ++iTrack) {
3010  const auto& itTrack = tracks[iTrack];
3011  int charge = itTrack->charge();
3012  float pt = itTrack->pt();
3013  float eta = itTrack->eta();
3014  const double lambda = itTrack->lambda();
3015  float chi2 = itTrack->normalizedChi2();
3016  float ndof = itTrack->ndof();
3017  float phi = itTrack->phi();
3018  int nHits = itTrack->numberOfValidHits();
3019  const reco::HitPattern& hp = itTrack->hitPattern();
3020 
3021  const auto& tkParam = itTrack->parameters();
3022  auto tkCov = itTrack->covariance();
3023  tkCov.Invert();
3024 
3025  // Standard track-TP matching
3026  int nSimHits = 0;
3027  bool isSimMatched = false;
3028  std::vector<int> tpIdx;
3029  std::vector<float> sharedFraction;
3030  std::vector<float> tpChi2;
3031  auto foundTPs = recSimColl.find(itTrack);
3032  if (foundTPs != recSimColl.end()) {
3033  if (!foundTPs->val.empty()) {
3034  nSimHits = foundTPs->val[0].first->numberOfTrackerHits();
3035  isSimMatched = true;
3036  }
3037  for(const auto tpQuality: foundTPs->val) {
3038  tpIdx.push_back( tpKeyToIndex.at( tpQuality.first.key() ) );
3039  sharedFraction.push_back(tpQuality.second);
3040  tpChi2.push_back(track_associator::trackAssociationChi2(tkParam, tkCov, *(tpCollection[tpIdx.back()]), mf, bs));
3041  }
3042  }
3043 
3044  // Search for a best-matching TrackingParticle for a track
3045  const auto clusters = track_associator::hitsToClusterRefs(itTrack->recHitsBegin(), itTrack->recHitsEnd()); // TODO: this function is called 3 times per track, try to reduce
3046  const int nClusters = clusters.size();
3047 
3048  const auto bestKeyCount = findBestMatchingTrackingParticle(*itTrack, clusterToTPMap, tpKeyToIndex);
3049  const float bestShareFrac = static_cast<float>(bestKeyCount.countClusters)/static_cast<float>(nClusters);
3050  float bestShareFracSimDenom = 0;
3051  float bestShareFracSimClusterDenom = 0;
3052  float bestChi2 = -1;
3053  if(bestKeyCount.key >= 0) {
3054  bestShareFracSimDenom = static_cast<float>(bestKeyCount.countClusters)/static_cast<float>(tpCollection[tpKeyToIndex.at(bestKeyCount.key)]->numberOfTrackerHits());
3055  bestShareFracSimClusterDenom = static_cast<float>(bestKeyCount.countClusters)/static_cast<float>(tpKeyToClusterCount.at(bestKeyCount.key));
3056  bestChi2 = track_associator::trackAssociationChi2(tkParam, tkCov, *(tpCollection[tpKeyToIndex.at(bestKeyCount.key)]), mf, bs);
3057  }
3058  // Another way starting from the first hit of the track
3059  const auto bestFirstHitKeyCount = findMatchingTrackingParticleFromFirstHit(*itTrack, clusterToTPMap, tpKeyToIndex);
3060  const float bestFirstHitShareFrac = static_cast<float>(bestFirstHitKeyCount.countClusters)/static_cast<float>(nClusters);
3061  float bestFirstHitShareFracSimDenom = 0;
3062  float bestFirstHitShareFracSimClusterDenom = 0;
3063  float bestFirstHitChi2 = -1;
3064  if(bestFirstHitKeyCount.key >= 0) {
3065  bestFirstHitShareFracSimDenom = static_cast<float>(bestFirstHitKeyCount.countClusters)/static_cast<float>(tpCollection[tpKeyToIndex.at(bestFirstHitKeyCount.key)]->numberOfTrackerHits());
3066  bestFirstHitShareFracSimClusterDenom = static_cast<float>(bestFirstHitKeyCount.countClusters)/static_cast<float>(tpKeyToClusterCount.at(bestFirstHitKeyCount.key));
3067  bestFirstHitChi2 = track_associator::trackAssociationChi2(tkParam, tkCov, *(tpCollection[tpKeyToIndex.at(bestFirstHitKeyCount.key)]), mf, bs);
3068  }
3069 
3070  float chi2_1Dmod = chi2;
3071  int count1dhits = 0;
3072  for(auto iHit = itTrack->recHitsBegin(), iEnd=itTrack->recHitsEnd(); iHit != iEnd; ++iHit) {
3073  const TrackingRecHit& hit = **iHit;
3074  if(hit.isValid() && typeid(hit) == typeid(SiStripRecHit1D))
3075  ++count1dhits;
3076  }
3077  if(count1dhits > 0) {
3078  chi2_1Dmod = (chi2+count1dhits)/(ndof+count1dhits);
3079  }
3080 
3081  Point bestPV = getBestVertex(*itTrack, vertices);
3082 
3083  trk_px .push_back(itTrack->px());
3084  trk_py .push_back(itTrack->py());
3085  trk_pz .push_back(itTrack->pz());
3086  trk_pt .push_back(pt);
3087  trk_inner_px.push_back(itTrack->innerMomentum().x());
3088  trk_inner_py.push_back(itTrack->innerMomentum().y());
3089  trk_inner_pz.push_back(itTrack->innerMomentum().z());
3090  trk_inner_pt.push_back(itTrack->innerMomentum().rho());
3091  trk_outer_px.push_back(itTrack->outerMomentum().x());
3092  trk_outer_py.push_back(itTrack->outerMomentum().y());
3093  trk_outer_pz.push_back(itTrack->outerMomentum().z());
3094  trk_outer_pt.push_back(itTrack->outerMomentum().rho());
3095  trk_eta .push_back(eta);
3096  trk_lambda .push_back(lambda);
3097  trk_cotTheta .push_back(1/tan(M_PI*0.5-lambda));
3098  trk_phi .push_back(phi);
3099  trk_dxy .push_back(itTrack->dxy(bs.position()));
3100  trk_dz .push_back(itTrack->dz(bs.position()));
3101  trk_dxyPV .push_back(itTrack->dxy(pvPosition));
3102  trk_dzPV .push_back(itTrack->dz(pvPosition));
3103  trk_dxyClosestPV.push_back(itTrack->dxy(bestPV));
3104  trk_dzClosestPV .push_back(itTrack->dz(bestPV));
3105  trk_ptErr .push_back(itTrack->ptError());
3106  trk_etaErr .push_back(itTrack->etaError());
3107  trk_lambdaErr.push_back(itTrack->lambdaError());
3108  trk_phiErr .push_back(itTrack->phiError());
3109  trk_dxyErr .push_back(itTrack->dxyError());
3110  trk_dzErr .push_back(itTrack->dzError());
3111  trk_refpoint_x.push_back(itTrack->vx());
3112  trk_refpoint_y.push_back(itTrack->vy());
3113  trk_refpoint_z.push_back(itTrack->vz());
3114  trk_nChi2 .push_back(chi2);
3115  trk_nChi2_1Dmod.push_back(chi2_1Dmod);
3116  trk_ndof .push_back(ndof);
3117  trk_q .push_back(charge);
3118  trk_nValid .push_back(hp.numberOfValidHits());
3121  trk_nPixel .push_back(hp.numberOfValidPixelHits());
3122  trk_nStrip .push_back(hp.numberOfValidStripHits());
3127  trk_nPixelLay.push_back(hp.pixelLayersWithMeasurement());
3128  trk_nStripLay.push_back(hp.stripLayersWithMeasurement());
3131  trk_nCluster .push_back(nClusters);
3132  trk_algo .push_back(itTrack->algo());
3133  trk_originalAlgo.push_back(itTrack->originalAlgo());
3134  trk_algoMask .push_back(itTrack->algoMaskUL());
3135  trk_stopReason.push_back(itTrack->stopReason());
3136  trk_isHP .push_back(itTrack->quality(reco::TrackBase::highPurity));
3137  if(includeMVA_) {
3138  for(size_t i=0; i<trk_mvas.size(); ++i) {
3139  trk_mvas [i].push_back( (*(mvaColls [i]))[iTrack] );
3140  trk_qualityMasks[i].push_back( (*(qualColls[i]))[iTrack] );
3141  }
3142  }
3143  if(includeSeeds_) {
3144  auto offset = seedCollToOffset.find(itTrack->seedRef().id());
3145  if(offset == seedCollToOffset.end()) {
3146  throw cms::Exception("Configuration") << "Track algo '" << reco::TrackBase::algoName(itTrack->algo())
3147  << "' originalAlgo '" << reco::TrackBase::algoName(itTrack->originalAlgo())
3148  << "' refers to seed collection " << itTrack->seedRef().id()
3149  << ", but that seed collection is not given as an input. The following collections were given as an input " << make_ProductIDMapPrinter(seedCollToOffset);
3150  }
3151 
3152  const auto seedIndex = offset->second + itTrack->seedRef().key();
3153  trk_seedIdx .push_back(seedIndex);
3154  if(see_trkIdx[seedIndex] != -1) {
3155  throw cms::Exception("LogicError") << "Track index has already been set for seed " << seedIndex << " to " << see_trkIdx[seedIndex] << "; was trying to set it to " << iTrack;
3156  }
3157  see_trkIdx[seedIndex] = iTrack;
3158  }
3159  trk_vtxIdx .push_back(-1); // to be set correctly in fillVertices
3161  trk_simTrkIdx.push_back(tpIdx);
3162  trk_simTrkShareFrac.push_back(sharedFraction);
3163  trk_simTrkNChi2.push_back(tpChi2);
3164  trk_bestSimTrkIdx.push_back(bestKeyCount.key >= 0 ? tpKeyToIndex.at(bestKeyCount.key) : -1);
3165  trk_bestFromFirstHitSimTrkIdx.push_back(bestFirstHitKeyCount.key >= 0 ? tpKeyToIndex.at(bestFirstHitKeyCount.key) : -1);
3166  }
3167  else {
3168  trk_isTrue.push_back(!tpIdx.empty());
3169  }
3170  trk_bestSimTrkShareFrac.push_back(bestShareFrac);
3171  trk_bestSimTrkShareFracSimDenom.push_back(bestShareFracSimDenom);
3172  trk_bestSimTrkShareFracSimClusterDenom.push_back(bestShareFracSimClusterDenom);
3173  trk_bestSimTrkNChi2.push_back(bestChi2);
3174  trk_bestFromFirstHitSimTrkShareFrac.push_back(bestFirstHitShareFrac);
3175  trk_bestFromFirstHitSimTrkShareFracSimDenom.push_back(bestFirstHitShareFracSimDenom);
3176  trk_bestFromFirstHitSimTrkShareFracSimClusterDenom.push_back(bestFirstHitShareFracSimClusterDenom);
3177  trk_bestFromFirstHitSimTrkNChi2.push_back(bestFirstHitChi2);
3178 
3179  LogTrace("TrackingNtuple") << "Track #" << itTrack.key() << " with q=" << charge
3180  << ", pT=" << pt << " GeV, eta: " << eta << ", phi: " << phi
3181  << ", chi2=" << chi2
3182  << ", Nhits=" << nHits
3183  << ", algo=" << itTrack->algoName(itTrack->algo()).c_str()
3184  << " hp=" << itTrack->quality(reco::TrackBase::highPurity)
3185  << " seed#=" << itTrack->seedRef().key()
3186  << " simMatch=" << isSimMatched
3187  << " nSimHits=" << nSimHits
3188  << " sharedFraction=" << (sharedFraction.empty()?-1:sharedFraction[0])
3189  << " tpIdx=" << (tpIdx.empty()?-1:tpIdx[0]);
3190  std::vector<int> hitIdx;
3191  std::vector<int> hitType;
3192 
3193  for(auto i=itTrack->recHitsBegin(); i!=itTrack->recHitsEnd(); i++) {
3194  TransientTrackingRecHit::RecHitPointer hit=theTTRHBuilder.build(&**i );
3195  DetId hitId = hit->geographicalId();
3196  LogTrace("TrackingNtuple") << "hit #" << std::distance(itTrack->recHitsBegin(), i) << " subdet=" << hitId.subdetId();
3197  if(hitId.det() != DetId::Tracker)
3198  continue;
3199 
3200  LogTrace("TrackingNtuple") << " " << subdetstring(hitId.subdetId()) << " " << tTopo.layer(hitId);
3201 
3202  if (hit->isValid()) {
3203  //ugly... but works
3204  const BaseTrackerRecHit* bhit = dynamic_cast<const BaseTrackerRecHit*>(&*hit);
3205  const auto& clusterRef = bhit->firstClusterRef();
3206  unsigned int clusterKey;
3207  if(clusterRef.isPixel()){
3208  clusterKey = clusterRef.cluster_pixel().key();
3209  } else if(clusterRef.isPhase2()){
3210  clusterKey = clusterRef.cluster_phase2OT().key();
3211  } else {
3212  clusterKey = clusterRef.cluster_strip().key();
3213  }
3214 
3215  LogTrace("TrackingNtuple") << " id: " << hitId.rawId() << " - globalPos =" << hit->globalPosition()
3216  << " cluster=" << clusterKey
3217  << " clusterRef ID=" << clusterRef.id()
3218  << " eta,phi: " << hit->globalPosition().eta() << "," << hit->globalPosition().phi();
3219  if(includeAllHits_) {
3220  checkProductID(hitProductIds, clusterRef.id(), "track");
3221  if(clusterRef.isPixel()){
3222  pix_trkIdx[clusterKey].push_back(iTrack);
3223  } else if(clusterRef.isPhase2()){
3224  ph2_trkIdx[clusterKey].push_back(iTrack);
3225  } else {
3226  str_trkIdx[clusterKey].push_back(iTrack);
3227  }
3228 
3229  }
3230 
3231  hitIdx.push_back(clusterKey);
3232  if(clusterRef.isPixel()){
3233  hitType.push_back( static_cast<int>(HitType::Pixel));
3234  } else if(clusterRef.isPhase2()){
3235  hitType.push_back( static_cast<int>(HitType::Phase2OT));
3236  } else {
3237  hitType.push_back( static_cast<int>(HitType::Strip));
3238  }
3239  } else {
3240  LogTrace("TrackingNtuple") << " - invalid hit";
3241 
3242  hitIdx.push_back( inv_isBarrel.size() );
3243  hitType.push_back( static_cast<int>(HitType::Invalid) );
3244 
3245  inv_isBarrel.push_back( hitId.subdetId()==1 );
3246  if(includeStripHits_) inv_detId.push_back( tTopo, hitId );
3247  else inv_detId_phase2.push_back( tTopo, hitId );
3248  inv_type .push_back( hit->getType() );
3249 
3250  }
3251  }
3252 
3253  trk_hitIdx.push_back(hitIdx);
3254  trk_hitType.push_back(hitType);
3255  }
3256 }
std::vector< int > trk_bestSimTrkIdx
std::vector< float > trk_nChi2_1Dmod
std::vector< float > trk_dxyPV
std::vector< std::vector< float > > trk_simTrkNChi2
std::vector< float > trk_dzClosestPV
std::vector< float > trk_phi
std::vector< unsigned int > trk_nOuterLost
std::vector< short > trk_isTrue
std::vector< float > trk_inner_pz
std::vector< int > trk_vtxIdx
std::vector< std::vector< int > > str_trkIdx
std::vector< float > trk_outer_py
std::vector< float > trk_eta
std::vector< int > trk_bestFromFirstHitSimTrkIdx
const_iterator end() const
last iterator over the map (read only)
std::vector< float > trk_cotTheta
std::vector< float > trk_bestSimTrkNChi2
std::vector< float > trk_px
std::vector< unsigned short > inv_type
std::vector< std::vector< int > > trk_simTrkIdx
int numberOfValidHits() const
Definition: HitPattern.h:896
std::vector< float > trk_dzPV
std::vector< float > trk_dxyErr
std::vector< float > trk_pt
std::vector< float > trk_inner_py
const_iterator find(const key_type &k) const
find element with specified reference key
edm::EDGetTokenT< edm::View< reco::Track > > trackToken_
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:50
std::vector< float > trk_outer_px
std::vector< std::vector< int > > trk_hitType
std::vector< unsigned int > trk_nCluster
std::vector< std::vector< int > > ph2_trkIdx
int numberOfValidStripHits() const
Definition: HitPattern.h:931
std::vector< OmniClusterRef > hitsToClusterRefs(iter begin, iter end)
std::vector< float > trk_inner_pt
std::vector< float > trk_bestSimTrkShareFracSimClusterDenom
key_type key() const
Accessor for product key.
Definition: Ref.h:263
std::vector< unsigned short > trk_stopReason
int pixelLayersWithMeasurement() const
Definition: HitPattern.cc:538
std::vector< float > trk_refpoint_x
std::vector< std::vector< float > > trk_mvas
int numberOfLostTrackerHits(HitCategory category) const
Definition: HitPattern.h:995
ClusterPixelRef cluster_pixel() const
std::vector< short > inv_isBarrel
std::vector< float > trk_bestSimTrkShareFracSimDenom
std::vector< float > trk_bestFromFirstHitSimTrkNChi2
std::vector< std::vector< float > > trk_simTrkShareFrac
std::vector< float > trk_refpoint_y
std::vector< unsigned int > trk_nLostLay
std::vector< unsigned int > trk_nStrip
std::vector< unsigned int > trk_nPixel
std::vector< float > trk_pz
std::vector< float > trk_dzErr
std::vector< float > trk_lambdaErr
int numberOfValidStripLayersWithMonoAndStereo(uint16_t stripdet, uint16_t layer) const
Definition: HitPattern.cc:379
std::vector< float > trk_bestFromFirstHitSimTrkShareFracSimDenom
std::vector< float > trk_etaErr
std::vector< unsigned int > trk_algo
susybsm::HSCParticleRefProd hp
Definition: classes.h:27
std::vector< float > trk_bestFromFirstHitSimTrkShareFracSimClusterDenom
std::vector< unsigned int > trk_originalAlgo
std::vector< unsigned int > trk_nInnerLost
std::vector< float > trk_refpoint_z
std::vector< unsigned int > trk_nInactive
std::vector< unsigned int > trk_nOuterInactive
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:41
std::vector< int > trk_seedIdx
std::vector< std::vector< int > > pix_trkIdx
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
DetIdAllPhase2 inv_detId_phase2
std::vector< float > trk_bestFromFirstHitSimTrkShareFrac
std::vector< unsigned int > trk_n3DLay
std::vector< float > trk_outer_pt
const bool includeSeeds_
const bool includeTrackingParticles_
size_type size() const
std::vector< float > trk_dz
std::vector< float > trk_ptErr
std::vector< unsigned int > trk_nStripLay
char const * module
Definition: ProductLabels.h:5
int trackerLayersTotallyOffOrBad(HitCategory category=TRACK_HITS) const
Definition: HitPattern.h:1164
std::vector< float > trk_phiErr
std::vector< float > trk_lambda
#define LogTrace(id)
reco::RecoToSimCollection associateRecoToSim(const edm::Handle< edm::View< reco::Track >> &tCH, const edm::Handle< TrackingParticleCollection > &tPCH) const
std::shared_ptr< TrackingRecHit const > RecHitPointer
virtual RecHitPointer build(const TrackingRecHit *p) const =0
build a tracking rechit from an existing rechit
#define M_PI
Definition: DetId.h:18
std::vector< float > trk_py
std::vector< float > trk_nChi2
std::vector< std::vector< unsigned short > > trk_qualityMasks
const bool includeMVA_
std::string algoName() const
Definition: TrackBase.h:541
int stripLayersWithMeasurement() const
Definition: HitPattern.h:1138
std::vector< short > trk_isHP
bool isValid() const
std::vector< unsigned int > trk_nInnerInactive
int numberOfLostHits(HitCategory category) const
Definition: HitPattern.h:990
std::vector< std::vector< int > > trk_hitIdx
unsigned int layer(const DetId &id) const
void labelsForToken(EDGetToken iToken, Labels &oLabels) const
std::vector< int > trk_q
const bool includeAllHits_
int trackerLayersWithoutMeasurement(HitCategory category) const
Definition: HitPattern.cc:574
Structure Point Contains parameters of Gaussian fits to DMRs.
Definition: DMRtrends.cc:55
std::vector< float > trk_outer_pz
virtual OmniClusterRef const & firstClusterRef() const =0
Point getBestVertex(reco::Track const &trk, reco::VertexCollection const &vertices, const size_t minNtracks=2)
Definition: getBestVertex.h:9
std::vector< float > trk_dxyClosestPV
int numberOfValidPixelHits() const
Definition: HitPattern.h:916
std::vector< float > trk_ndof
std::vector< unsigned int > trk_nPixelLay
const Point & position() const
position
Definition: BeamSpot.h:62
std::vector< float > trk_bestSimTrkShareFrac
std::vector< int > see_trkIdx
std::vector< float > trk_dxy
std::vector< decltype(reco::TrackBase().algoMaskUL())> trk_algoMask
double trackAssociationChi2(const reco::TrackBase::ParameterVector &rParameters, const reco::TrackBase::CovarianceMatrix &recoTrackCovMatrix, const Basic3DVector< double > &momAtVtx, const Basic3DVector< double > &vert, int charge, const MagneticField &magfield, const reco::BeamSpot &bs)
basic method where chi2 is computed
std::vector< unsigned int > trk_nValid
std::vector< unsigned int > trk_nLost
std::vector< float > trk_inner_px
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:39
void TrackingNtuple::fillVertices ( const reco::VertexCollection vertices,
const edm::RefToBaseVector< reco::Track > &  tracks 
)
private

Definition at line 3423 of file TrackingNtuple.cc.

References reco::Vertex::chi2(), Exception, edm::RefToBaseVector< T >::id(), reco::Vertex::isFake(), reco::Vertex::isValid(), reco::Vertex::ndof(), findQualityFiles::size, reco::Vertex::tracks_begin(), reco::Vertex::tracks_end(), trk_vtxIdx, vtx_chi2, vtx_fake, vtx_ndof, vtx_trkIdx, vtx_valid, vtx_x, vtx_xErr, vtx_y, vtx_yErr, vtx_z, vtx_zErr, reco::Vertex::x(), reco::Vertex::xError(), reco::Vertex::y(), reco::Vertex::yError(), reco::Vertex::z(), and reco::Vertex::zError().

Referenced by analyze().

3424  {
3425  for(size_t iVertex=0, size=vertices.size(); iVertex<size; ++iVertex) {
3426  const reco::Vertex& vertex = vertices[iVertex];
3427  vtx_x.push_back(vertex.x());
3428  vtx_y.push_back(vertex.y());
3429  vtx_z.push_back(vertex.z());
3430  vtx_xErr.push_back(vertex.xError());
3431  vtx_yErr.push_back(vertex.yError());
3432  vtx_zErr.push_back(vertex.zError());
3433  vtx_chi2.push_back(vertex.chi2());
3434  vtx_ndof.push_back(vertex.ndof());
3435  vtx_fake.push_back(vertex.isFake());
3436  vtx_valid.push_back(vertex.isValid());
3437 
3438  std::vector<int> trkIdx;
3439  for(auto iTrack = vertex.tracks_begin(); iTrack != vertex.tracks_end(); ++iTrack) {
3440  // Ignore link if vertex was fit from a track collection different from the input
3441  if(iTrack->id() != tracks.id())
3442  continue;
3443 
3444  trkIdx.push_back(iTrack->key());
3445 
3446  if(trk_vtxIdx[iTrack->key()] != -1) {
3447  throw cms::Exception("LogicError") << "Vertex index has already been set for track " << iTrack->key() << " to " << trk_vtxIdx[iTrack->key()] << "; was trying to set it to " << iVertex;
3448  }
3449  trk_vtxIdx[iTrack->key()] = iVertex;
3450  }
3451  vtx_trkIdx.push_back(trkIdx);
3452  }
3453 }
size
Write out results.
std::vector< short > vtx_fake
std::vector< int > trk_vtxIdx
trackRef_iterator tracks_end() const
last iterator over tracks
Definition: Vertex.cc:81
double zError() const
error on z
Definition: Vertex.h:123
double y() const
y coordinate
Definition: Vertex.h:113
bool isValid() const
Tells whether the vertex is valid.
Definition: Vertex.h:68
std::vector< float > vtx_y
std::vector< float > vtx_yErr
std::vector< float > vtx_ndof
double chi2() const
chi-squares
Definition: Vertex.h:98
double z() const
z coordinate
Definition: Vertex.h:115
std::vector< float > vtx_z
double ndof() const
Definition: Vertex.h:105
std::vector< float > vtx_xErr
double x() const
x coordinate
Definition: Vertex.h:111
double xError() const
error on x
Definition: Vertex.h:119
bool isFake() const
Definition: Vertex.h:72
std::vector< short > vtx_valid
std::vector< std::vector< int > > vtx_trkIdx
trackRef_iterator tracks_begin() const
first iterator over tracks
Definition: Vertex.cc:76
std::vector< float > vtx_x
ProductID id() const
double yError() const
error on y
Definition: Vertex.h:121
std::vector< float > vtx_zErr
std::vector< float > vtx_chi2
template<typename SimLink >
TrackingNtuple::SimHitData TrackingNtuple::matchCluster ( const OmniClusterRef cluster,
DetId  hitId,
int  clusterKey,
const TransientTrackingRecHit::RecHitPointer ttrh,
const ClusterTPAssociation clusterToTPMap,
const TrackingParticleRefKeyToIndex &  tpKeyToIndex,
const SimHitTPAssociationProducer::SimHitTPAssociationList simHitsTPAssoc,
const edm::DetSetVector< SimLink > &  digiSimLinks,
const SimHitRefKeyToIndex &  simHitRefKeyToIndex,
HitType  hitType 
)
private

Definition at line 2211 of file TrackingNtuple.cc.

References funct::abs(), TrackingNtuple::SimHitData::bunchCrossing, TrackingNtuple::SimHitData::chargeFraction, TTClusterAssociation_cfi::digiSimLinks, ClusterTPAssociation::equal_range(), TrackingNtuple::SimHitData::event, Exception, edm::Ref< C, T, F >::id(), ITPileup, edm::Ref< C, T, F >::key(), TrackingNtuple::SimHitData::matchingSimHit, min(), Noise, OOTPileup, Phase2OT, OmniClusterRef::phase2OTCluster(), DetId::rawId(), Signal, simhit_hitIdx, simhit_hitType, SimHitTPAssociationProducer::simHitTPAssociationListGreater(), and TrackingNtuple::SimHitData::type.

Referenced by fillPhase2OTHits(), fillPixelHits(), and fillStripRphiStereoHits().

2220  {
2221  SimHitData ret;
2222 
2223  std::map<unsigned int, double> simTrackIdToChargeFraction;
2224  if(hitType == HitType::Phase2OT) simTrackIdToChargeFraction = chargeFraction(cluster.phase2OTCluster(), hitId, digiSimLinks);
2225  else simTrackIdToChargeFraction = chargeFraction(GetCluster<SimLink>::call(cluster), hitId, digiSimLinks);
2226 
2227  ret.type = HitSimType::Noise;
2228  auto range = clusterToTPMap.equal_range( cluster );
2229  if( range.first != range.second ) {
2230  for( auto ip=range.first; ip != range.second; ++ip ) {
2231  const TrackingParticleRef& trackingParticle = ip->second;
2232 
2233  // Find out if the cluster is from signal/ITPU/OOTPU
2234  const auto event = trackingParticle->eventId().event();
2235  const auto bx = trackingParticle->eventId().bunchCrossing();
2237  if(bx == 0) {
2238  type = (event == 0 ? HitSimType::Signal : HitSimType::ITPileup);
2239  }
2240  ret.type = static_cast<HitSimType>(std::min(static_cast<int>(ret.type), static_cast<int>(type)));
2241 
2242  // Limit to only input TrackingParticles (usually signal+ITPU)
2243  auto tpIndex = tpKeyToIndex.find(trackingParticle.key());
2244  if( tpIndex == tpKeyToIndex.end())
2245  continue;
2246 
2247  //now get the corresponding sim hit
2248  std::pair<TrackingParticleRef, TrackPSimHitRef> simHitTPpairWithDummyTP(trackingParticle,TrackPSimHitRef());
2249  //SimHit is dummy: for simHitTPAssociationListGreater sorting only the TP is needed
2250  auto range = std::equal_range(simHitsTPAssoc.begin(), simHitsTPAssoc.end(),
2252  bool foundSimHit = false;
2253  bool foundElectron = false;
2254  for(auto ip = range.first; ip != range.second; ++ip) {
2255  TrackPSimHitRef TPhit = ip->second;
2256  DetId dId = DetId(TPhit->detUnitId());
2257  if (dId.rawId()==hitId.rawId()) {
2258  // skip electron SimHits for non-electron TPs also here
2259  if(std::abs(TPhit->particleType()) == 11 && std::abs(trackingParticle->pdgId()) != 11) {
2260  foundElectron = true;
2261  continue;
2262  }
2263 
2264  foundSimHit = true;
2265  auto simHitKey = TPhit.key();
2266  auto simHitID = TPhit.id();
2267 
2268  auto simHitIndex = simHitRefKeyToIndex.at(std::make_pair(simHitKey, simHitID));
2269  ret.matchingSimHit.push_back(simHitIndex);
2270 
2271  double chargeFraction = 0.;
2272  for(const SimTrack& simtrk: trackingParticle->g4Tracks()) {
2273  auto found = simTrackIdToChargeFraction.find(simtrk.trackId());
2274  if(found != simTrackIdToChargeFraction.end()) {
2275  chargeFraction += found->second;
2276  }
2277  }
2278  ret.chargeFraction.push_back(chargeFraction);
2279 
2280  // only for debug prints
2281  ret.bunchCrossing.push_back(bx);
2282  ret.event.push_back(event);
2283 
2284  simhit_hitIdx[simHitIndex].push_back(clusterKey);
2285  simhit_hitType[simHitIndex].push_back(static_cast<int>(hitType));
2286  }
2287  }
2288  if(!foundSimHit) {
2289  // In case we didn't find a simhit because of filtered-out
2290  // electron SimHit, just ignore the missing SimHit.
2291  if(foundElectron)
2292  continue;
2293 
2294  auto ex = cms::Exception("LogicError") << "Did not find SimHit for reco hit DetId " << hitId.rawId()
2295  << " for TP " << trackingParticle.key() << " bx:event " << bx << ":" << event
2296  << ".\nFound SimHits from detectors ";
2297  for(auto ip = range.first; ip != range.second; ++ip) {
2298  TrackPSimHitRef TPhit = ip->second;
2299  DetId dId = DetId(TPhit->detUnitId());
2300  ex << dId.rawId() << " ";
2301  }
2302  if(trackingParticle->eventId().event() != 0) {
2303  ex << "\nSince this is a TrackingParticle from pileup, check that you're running the pileup mixing in playback mode.";
2304  }
2305  throw ex;
2306  }
2307  }
2308  }
2309 
2310  return ret;
2311 }
type
Definition: HCALResponse.h:21
Phase2TrackerCluster1D const & phase2OTCluster() const
std::vector< std::vector< int > > simhit_hitIdx
static bool simHitTPAssociationListGreater(SimHitTPPair i, SimHitTPPair j)
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:50
key_type key() const
Accessor for product key.
Definition: Ref.h:263
ProductID id() const
Accessor for product ID.
Definition: Ref.h:257
std::vector< std::vector< int > > simhit_hitType
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
range equal_range(const OmniClusterRef &key) const
T min(T a, T b)
Definition: MathUtil.h:58
Definition: DetId.h:18
edm::Ref< edm::PSimHitContainer > TrackPSimHitRef
Definition: event.py:1
static bool TrackingNtuple::tpHitIndexListLess ( const TPHitIndex i,
const TPHitIndex j 
)
inlinestaticprivate

Definition at line 510 of file TrackingNtuple.cc.

References TrackingNtuple::TPHitIndex::tpKey.

Referenced by fillTrackingParticles().

510 { return (i.tpKey < j.tpKey); }
static bool TrackingNtuple::tpHitIndexListLessSort ( const TPHitIndex i,
const TPHitIndex j 
)
inlinestaticprivate

Definition at line 511 of file TrackingNtuple.cc.

References TrackingNtuple::TPHitIndex::detId, RecoMET_Cosmics_cff::fillTracks, iEvent, edm::isNotFinite(), TrackingNtuple::TPHitIndex::tof, TrackingNtuple::TPHitIndex::tpKey, trackingTruthProducer_cfi::tracker, l1t::tracks, and electrons_cff::vertices.

Referenced by analyze().

511  {
512  if(i.tpKey == j.tpKey) {
513  if(edm::isNotFinite(i.tof) && edm::isNotFinite(j.tof)) {
514  return i.detId < j.detId;
515  }
516  return i.tof < j.tof; // works as intended if either one is NaN
517  }
518  return i.tpKey < j.tpKey;
519  }
constexpr bool isNotFinite(T x)
Definition: isFinite.h:9

Member Data Documentation

edm::EDGetTokenT<reco::BeamSpot> TrackingNtuple::beamSpotToken_
private

Definition at line 664 of file TrackingNtuple.cc.

float TrackingNtuple::bsp_sigmax
private

Definition at line 1193 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillBeamSpot(), and TrackingNtuple().

float TrackingNtuple::bsp_sigmay
private

Definition at line 1194 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillBeamSpot(), and TrackingNtuple().

float TrackingNtuple::bsp_sigmaz
private

Definition at line 1195 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillBeamSpot(), and TrackingNtuple().

float TrackingNtuple::bsp_x
private

Definition at line 1190 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillBeamSpot(), and TrackingNtuple().

float TrackingNtuple::bsp_y
private

Definition at line 1191 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillBeamSpot(), and TrackingNtuple().

float TrackingNtuple::bsp_z
private

Definition at line 1192 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillBeamSpot(), and TrackingNtuple().

std::string TrackingNtuple::builderName_
private

Definition at line 675 of file TrackingNtuple.cc.

edm::EDGetTokenT<ClusterTPAssociation> TrackingNtuple::clusterTPMapToken_
private

Definition at line 657 of file TrackingNtuple.cc.

edm::EventNumber_t TrackingNtuple::ev_event
private

Definition at line 963 of file TrackingNtuple.cc.

edm::LuminosityBlockNumber_t TrackingNtuple::ev_lumi
private

Definition at line 962 of file TrackingNtuple.cc.

edm::RunNumber_t TrackingNtuple::ev_run
private

Definition at line 961 of file TrackingNtuple.cc.

std::vector<float> TrackingNtuple::glu_bbxi
private

Definition at line 1142 of file TrackingNtuple.cc.

Referenced by addStripMatchedHit(), clearVariables(), and TrackingNtuple().

DetIdStrip TrackingNtuple::glu_detId
private

Definition at line 1128 of file TrackingNtuple.cc.

Referenced by addStripMatchedHit(), clearVariables(), and TrackingNtuple().

std::vector<short> TrackingNtuple::glu_isBarrel
private

Definition at line 1127 of file TrackingNtuple.cc.

Referenced by addStripMatchedHit(), clearVariables(), and TrackingNtuple().

std::vector<int> TrackingNtuple::glu_monoIdx
private

Definition at line 1129 of file TrackingNtuple.cc.

Referenced by addStripMatchedHit(), clearVariables(), and TrackingNtuple().

std::vector<float> TrackingNtuple::glu_radL
private

Definition at line 1141 of file TrackingNtuple.cc.

Referenced by addStripMatchedHit(), clearVariables(), and TrackingNtuple().

std::vector<std::vector<int> > TrackingNtuple::glu_seeIdx
private

Definition at line 1131 of file TrackingNtuple.cc.

Referenced by addStripMatchedHit(), clearVariables(), fillSeeds(), and TrackingNtuple().

std::vector<int> TrackingNtuple::glu_stereoIdx
private

Definition at line 1130 of file TrackingNtuple.cc.

Referenced by addStripMatchedHit(), clearVariables(), and TrackingNtuple().

std::vector<float> TrackingNtuple::glu_x
private

Definition at line 1132 of file TrackingNtuple.cc.

Referenced by addStripMatchedHit(), clearVariables(), and TrackingNtuple().

std::vector<float> TrackingNtuple::glu_xx
private

Definition at line 1135 of file TrackingNtuple.cc.

Referenced by addStripMatchedHit(), clearVariables(), and TrackingNtuple().

std::vector<float> TrackingNtuple::glu_xy
private

Definition at line 1136 of file TrackingNtuple.cc.

Referenced by addStripMatchedHit(), clearVariables(), and TrackingNtuple().

std::vector<float> TrackingNtuple::glu_y
private

Definition at line 1133 of file TrackingNtuple.cc.

Referenced by addStripMatchedHit(), clearVariables(), and TrackingNtuple().

std::vector<float> TrackingNtuple::glu_yy
private

Definition at line 1137 of file TrackingNtuple.cc.

Referenced by addStripMatchedHit(), clearVariables(), and TrackingNtuple().

std::vector<float> TrackingNtuple::glu_yz
private

Definition at line 1138 of file TrackingNtuple.cc.

Referenced by addStripMatchedHit(), clearVariables(), and TrackingNtuple().

std::vector<float> TrackingNtuple::glu_z
private

Definition at line 1134 of file TrackingNtuple.cc.

Referenced by addStripMatchedHit(), clearVariables(), and TrackingNtuple().

std::vector<float> TrackingNtuple::glu_zx
private

Definition at line 1140 of file TrackingNtuple.cc.

Referenced by addStripMatchedHit(), clearVariables(), and TrackingNtuple().

std::vector<float> TrackingNtuple::glu_zz
private

Definition at line 1139 of file TrackingNtuple.cc.

Referenced by addStripMatchedHit(), clearVariables(), and TrackingNtuple().

const bool TrackingNtuple::includeAllHits_
private

Definition at line 678 of file TrackingNtuple.cc.

const bool TrackingNtuple::includeMVA_
private

Definition at line 679 of file TrackingNtuple.cc.

bool TrackingNtuple::includePhase2OTHits_
private

Definition at line 663 of file TrackingNtuple.cc.

const bool TrackingNtuple::includeSeeds_
private

Definition at line 677 of file TrackingNtuple.cc.

bool TrackingNtuple::includeStripHits_
private

Definition at line 663 of file TrackingNtuple.cc.

const bool TrackingNtuple::includeTrackingParticles_
private

Definition at line 680 of file TrackingNtuple.cc.

DetIdAll TrackingNtuple::inv_detId
private

Definition at line 1169 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillTracks(), and TrackingNtuple().

DetIdAllPhase2 TrackingNtuple::inv_detId_phase2
private

Definition at line 1170 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillTracks(), and TrackingNtuple().

std::vector<short> TrackingNtuple::inv_isBarrel
private

Definition at line 1168 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillTracks(), and TrackingNtuple().

std::vector<unsigned short> TrackingNtuple::inv_type
private

Definition at line 1171 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillTracks(), and TrackingNtuple().

std::vector<std::tuple<edm::EDGetTokenT<MVACollection>, edm::EDGetTokenT<QualityMaskCollection> > > TrackingNtuple::mvaQualityCollectionTokens_
private

Definition at line 654 of file TrackingNtuple.cc.

std::string TrackingNtuple::parametersDefinerName_
private

Definition at line 676 of file TrackingNtuple.cc.

std::vector<float> TrackingNtuple::ph2_bbxi
private

Definition at line 1163 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillPhase2OTHits(), and TrackingNtuple().

DetIdPhase2OT TrackingNtuple::ph2_detId
private

Definition at line 1147 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillPhase2OTHits(), and TrackingNtuple().

std::vector<short> TrackingNtuple::ph2_isBarrel
private

Definition at line 1146 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillPhase2OTHits(), and TrackingNtuple().

std::vector<float> TrackingNtuple::ph2_radL
private

Definition at line 1162 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillPhase2OTHits(), and TrackingNtuple().

std::vector<std::vector<int> > TrackingNtuple::ph2_seeIdx
private

Definition at line 1149 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillPhase2OTHits(), fillSeeds(), and TrackingNtuple().

std::vector<std::vector<int> > TrackingNtuple::ph2_simHitIdx
private

Definition at line 1150 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillPhase2OTHits(), and TrackingNtuple().

std::vector<unsigned short> TrackingNtuple::ph2_simType
private

Definition at line 1152 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillPhase2OTHits(), and TrackingNtuple().

std::vector<std::vector<int> > TrackingNtuple::ph2_trkIdx
private

Definition at line 1148 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillPhase2OTHits(), fillTracks(), and TrackingNtuple().

std::vector<float> TrackingNtuple::ph2_x
private

Definition at line 1153 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillPhase2OTHits(), and TrackingNtuple().

std::vector<float> TrackingNtuple::ph2_xx
private

Definition at line 1156 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillPhase2OTHits(), and TrackingNtuple().

std::vector<float> TrackingNtuple::ph2_xy
private

Definition at line 1157 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillPhase2OTHits(), and TrackingNtuple().

std::vector<float> TrackingNtuple::ph2_y
private

Definition at line 1154 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillPhase2OTHits(), and TrackingNtuple().

std::vector<float> TrackingNtuple::ph2_yy
private

Definition at line 1158 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillPhase2OTHits(), and TrackingNtuple().

std::vector<float> TrackingNtuple::ph2_yz
private

Definition at line 1159 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillPhase2OTHits(), and TrackingNtuple().

std::vector<float> TrackingNtuple::ph2_z
private

Definition at line 1155 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillPhase2OTHits(), and TrackingNtuple().

std::vector<float> TrackingNtuple::ph2_zx
private

Definition at line 1161 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillPhase2OTHits(), and TrackingNtuple().

std::vector<float> TrackingNtuple::ph2_zz
private

Definition at line 1160 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillPhase2OTHits(), and TrackingNtuple().

edm::EDGetTokenT<Phase2TrackerRecHit1DCollectionNew> TrackingNtuple::phase2OTRecHitToken_
private

Definition at line 669 of file TrackingNtuple.cc.

std::vector<float> TrackingNtuple::pix_bbxi
private

Definition at line 1102 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillPixelHits(), and TrackingNtuple().

std::vector<std::vector<float> > TrackingNtuple::pix_chargeFraction
private

Definition at line 1090 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillPixelHits(), and TrackingNtuple().

DetIdPixel TrackingNtuple::pix_detId
private

Definition at line 1086 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillPixelHits(), and TrackingNtuple().

std::vector<short> TrackingNtuple::pix_isBarrel
private

Definition at line 1085 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillPixelHits(), and TrackingNtuple().

std::vector<float> TrackingNtuple::pix_radL
private

Definition at line 1101 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillPixelHits(), and TrackingNtuple().

std::vector<std::vector<int> > TrackingNtuple::pix_seeIdx
private

Definition at line 1088 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillPixelHits(), fillSeeds(), and TrackingNtuple().

std::vector<std::vector<int> > TrackingNtuple::pix_simHitIdx
private

Definition at line 1089 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillPixelHits(), and TrackingNtuple().

std::vector<unsigned short> TrackingNtuple::pix_simType
private

Definition at line 1091 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillPixelHits(), and TrackingNtuple().

std::vector<std::vector<int> > TrackingNtuple::pix_trkIdx
private

Definition at line 1087 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillPixelHits(), fillTracks(), and TrackingNtuple().

std::vector<float> TrackingNtuple::pix_x
private

Definition at line 1092 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillPixelHits(), and TrackingNtuple().

std::vector<float> TrackingNtuple::pix_xx
private

Definition at line 1095 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillPixelHits(), and TrackingNtuple().

std::vector<float> TrackingNtuple::pix_xy
private

Definition at line 1096 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillPixelHits(), and TrackingNtuple().

std::vector<float> TrackingNtuple::pix_y
private

Definition at line 1093 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillPixelHits(), and TrackingNtuple().

std::vector<float> TrackingNtuple::pix_yy
private

Definition at line 1097 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillPixelHits(), and TrackingNtuple().

std::vector<float> TrackingNtuple::pix_yz
private

Definition at line 1098 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillPixelHits(), and TrackingNtuple().

std::vector<float> TrackingNtuple::pix_z
private

Definition at line 1094 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillPixelHits(), and TrackingNtuple().

std::vector<float> TrackingNtuple::pix_zx
private

Definition at line 1100 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillPixelHits(), and TrackingNtuple().

std::vector<float> TrackingNtuple::pix_zz
private

Definition at line 1099 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillPixelHits(), and TrackingNtuple().

edm::EDGetTokenT<SiPixelRecHitCollection> TrackingNtuple::pixelRecHitToken_
private

Definition at line 665 of file TrackingNtuple.cc.

edm::EDGetTokenT<edm::DetSetVector<PixelDigiSimLink> > TrackingNtuple::pixelSimLinkToken_
private

Definition at line 660 of file TrackingNtuple.cc.

std::vector<unsigned int> TrackingNtuple::see_algo
private

Definition at line 1227 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillSeeds(), and TrackingNtuple().

std::vector<int> TrackingNtuple::see_bestFromFirstHitSimTrkIdx
private

Definition at line 1234 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillSeeds(), and TrackingNtuple().

std::vector<float> TrackingNtuple::see_bestFromFirstHitSimTrkShareFrac
private

Definition at line 1235 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillSeeds(), and TrackingNtuple().

std::vector<int> TrackingNtuple::see_bestSimTrkIdx
private

Definition at line 1232 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillSeeds(), and TrackingNtuple().

std::vector<float> TrackingNtuple::see_bestSimTrkShareFrac
private

Definition at line 1233 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillSeeds(), and TrackingNtuple().

std::vector<float> TrackingNtuple::see_chi2
private

Definition at line 1213 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillSeeds(), and TrackingNtuple().

std::vector<float> TrackingNtuple::see_dxy
private

Definition at line 1206 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillSeeds(), and TrackingNtuple().

std::vector<float> TrackingNtuple::see_dxyErr
private

Definition at line 1211 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillSeeds(), and TrackingNtuple().

std::vector<float> TrackingNtuple::see_dz
private

Definition at line 1207 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillSeeds(), and TrackingNtuple().

std::vector<float> TrackingNtuple::see_dzErr
private

Definition at line 1212 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillSeeds(), and TrackingNtuple().

std::vector<float> TrackingNtuple::see_eta
private

Definition at line 1204 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillSeeds(), and TrackingNtuple().

std::vector<float> TrackingNtuple::see_etaErr
private

Definition at line 1209 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillSeeds(), and TrackingNtuple().

std::vector<short> TrackingNtuple::see_fitok
private

Definition at line 1199 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillSeeds(), and TrackingNtuple().

std::vector<std::vector<int> > TrackingNtuple::see_hitIdx
private

Definition at line 1238 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillSeeds(), and TrackingNtuple().

std::vector<std::vector<int> > TrackingNtuple::see_hitType
private

Definition at line 1239 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillSeeds(), and TrackingNtuple().

std::vector<short> TrackingNtuple::see_isTrue
private

Definition at line 1231 of file TrackingNtuple.cc.

Referenced by fillSeeds(), and TrackingNtuple().

std::vector<unsigned short> TrackingNtuple::see_nCands
private

Definition at line 1229 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillSeeds(), and TrackingNtuple().

std::vector<unsigned int> TrackingNtuple::see_nCluster
private

Definition at line 1226 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillSeeds(), and TrackingNtuple().

std::vector<unsigned int> TrackingNtuple::see_nGlued
private

Definition at line 1223 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillSeeds(), and TrackingNtuple().

std::vector<unsigned int> TrackingNtuple::see_nPhase2OT
private

Definition at line 1225 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillSeeds(), and TrackingNtuple().

std::vector<unsigned int> TrackingNtuple::see_nPixel
private

Definition at line 1222 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillSeeds(), and TrackingNtuple().

std::vector<unsigned int> TrackingNtuple::see_nStrip
private

Definition at line 1224 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillSeeds(), and TrackingNtuple().

std::vector<unsigned int> TrackingNtuple::see_nValid
private

Definition at line 1221 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillSeeds(), and TrackingNtuple().

std::vector<unsigned int> TrackingNtuple::see_offset
private

Definition at line 1241 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillSeeds(), and TrackingNtuple().

std::vector<float> TrackingNtuple::see_phi
private

Definition at line 1205 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillSeeds(), and TrackingNtuple().

std::vector<float> TrackingNtuple::see_phiErr
private

Definition at line 1210 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillSeeds(), and TrackingNtuple().

std::vector<float> TrackingNtuple::see_pt
private

Definition at line 1203 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillSeeds(), and TrackingNtuple().

std::vector<float> TrackingNtuple::see_ptErr
private

Definition at line 1208 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillSeeds(), and TrackingNtuple().

std::vector<float> TrackingNtuple::see_px
private

Definition at line 1200 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillSeeds(), and TrackingNtuple().

std::vector<float> TrackingNtuple::see_py
private

Definition at line 1201 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillSeeds(), and TrackingNtuple().

std::vector<float> TrackingNtuple::see_pz
private

Definition at line 1202 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillSeeds(), and TrackingNtuple().

std::vector<int> TrackingNtuple::see_q
private

Definition at line 1220 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillSeeds(), and TrackingNtuple().

std::vector<std::vector<int> > TrackingNtuple::see_simTrkIdx
private

Definition at line 1237 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillSeeds(), and TrackingNtuple().

std::vector<std::vector<float> > TrackingNtuple::see_simTrkShareFrac
private

Definition at line 1236 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillSeeds(), and TrackingNtuple().

std::vector<float> TrackingNtuple::see_statePt
private

Definition at line 1214 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillSeeds(), and TrackingNtuple().

std::vector<float> TrackingNtuple::see_stateTrajPx
private

Definition at line 1217 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillSeeds(), and TrackingNtuple().

std::vector<float> TrackingNtuple::see_stateTrajPy
private

Definition at line 1218 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillSeeds(), and TrackingNtuple().

std::vector<float> TrackingNtuple::see_stateTrajPz
private

Definition at line 1219 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillSeeds(), and TrackingNtuple().

std::vector<float> TrackingNtuple::see_stateTrajX
private

Definition at line 1215 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillSeeds(), and TrackingNtuple().

std::vector<float> TrackingNtuple::see_stateTrajY
private

Definition at line 1216 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillSeeds(), and TrackingNtuple().

std::vector<unsigned short> TrackingNtuple::see_stopReason
private

Definition at line 1228 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillSeeds(), and TrackingNtuple().

std::vector<int> TrackingNtuple::see_trkIdx
private

Definition at line 1230 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillSeeds(), fillTracks(), and TrackingNtuple().

std::vector<edm::EDGetTokenT<std::vector<SeedStopInfo> > > TrackingNtuple::seedStopInfoTokens_
private

Definition at line 652 of file TrackingNtuple.cc.

std::vector<edm::EDGetTokenT<edm::View<reco::Track> > > TrackingNtuple::seedTokens_
private

Definition at line 651 of file TrackingNtuple.cc.

std::vector<int> TrackingNtuple::sim_bunchCrossing
private

Definition at line 1046 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillTrackingParticles(), and TrackingNtuple().

std::vector<std::vector<int> > TrackingNtuple::sim_decayVtxIdx
private

Definition at line 1080 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillTrackingParticles(), and TrackingNtuple().

std::vector<float> TrackingNtuple::sim_eta
private

Definition at line 1054 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillTrackingParticles(), and TrackingNtuple().

std::vector<int> TrackingNtuple::sim_event
private

Definition at line 1045 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillTrackingParticles(), and TrackingNtuple().

std::vector<std::vector<int> > TrackingNtuple::sim_genPdgIds
private

Definition at line 1048 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillTrackingParticles(), and TrackingNtuple().

std::vector<int> TrackingNtuple::sim_isFromBHadron
private

Definition at line 1049 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillTrackingParticles(), and TrackingNtuple().

std::vector<unsigned int> TrackingNtuple::sim_n3DLay
private

Definition at line 1070 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillTrackingParticles(), and TrackingNtuple().

std::vector<unsigned int> TrackingNtuple::sim_nLay
private

Definition at line 1068 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillTrackingParticles(), and TrackingNtuple().

std::vector<unsigned int> TrackingNtuple::sim_nPixel
private

Definition at line 1066 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillTrackingParticles(), and TrackingNtuple().

std::vector<unsigned int> TrackingNtuple::sim_nPixelLay
private

Definition at line 1069 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillTrackingParticles(), and TrackingNtuple().

std::vector<unsigned int> TrackingNtuple::sim_nRecoClusters
private

Definition at line 1074 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillTrackingParticles(), and TrackingNtuple().

std::vector<unsigned int> TrackingNtuple::sim_nStrip
private

Definition at line 1067 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillTrackingParticles(), and TrackingNtuple().

std::vector<unsigned int> TrackingNtuple::sim_nTrackerHits
private

Definition at line 1072 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillTrackingParticles(), and TrackingNtuple().

std::vector<unsigned int> TrackingNtuple::sim_nValid
private

Definition at line 1065 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillTrackingParticles(), and TrackingNtuple().

std::vector<int> TrackingNtuple::sim_parentVtxIdx
private

Definition at line 1079 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillTrackingParticles(), and TrackingNtuple().

std::vector<float> TrackingNtuple::sim_pca_cotTheta
private

Definition at line 1059 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillTrackingParticles(), and TrackingNtuple().

std::vector<float> TrackingNtuple::sim_pca_dxy
private

Definition at line 1061 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillTrackingParticles(), and TrackingNtuple().

std::vector<float> TrackingNtuple::sim_pca_dz
private

Definition at line 1062 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillTrackingParticles(), and TrackingNtuple().

std::vector<float> TrackingNtuple::sim_pca_eta
private

Definition at line 1057 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillTrackingParticles(), and TrackingNtuple().

std::vector<float> TrackingNtuple::sim_pca_lambda
private

Definition at line 1058 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillTrackingParticles(), and TrackingNtuple().

std::vector<float> TrackingNtuple::sim_pca_phi
private

Definition at line 1060 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillTrackingParticles(), and TrackingNtuple().

std::vector<float> TrackingNtuple::sim_pca_pt
private

Definition at line 1056 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillTrackingParticles(), and TrackingNtuple().

std::vector<int> TrackingNtuple::sim_pdgId
private

Definition at line 1047 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillTrackingParticles(), and TrackingNtuple().

std::vector<float> TrackingNtuple::sim_phi
private

Definition at line 1055 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillTrackingParticles(), and TrackingNtuple().

std::vector<float> TrackingNtuple::sim_pt
private

Definition at line 1053 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillTrackingParticles(), and TrackingNtuple().

std::vector<float> TrackingNtuple::sim_px
private

Definition at line 1050 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillTrackingParticles(), and TrackingNtuple().

std::vector<float> TrackingNtuple::sim_py
private

Definition at line 1051 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillTrackingParticles(), and TrackingNtuple().

std::vector<float> TrackingNtuple::sim_pz
private

Definition at line 1052 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillTrackingParticles(), and TrackingNtuple().

std::vector<int> TrackingNtuple::sim_q
private

Definition at line 1063 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillTrackingParticles(), and TrackingNtuple().

std::vector<std::vector<int> > TrackingNtuple::sim_seedIdx
private
std::vector<std::vector<int> > TrackingNtuple::sim_simHitIdx
private

Definition at line 1081 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillTrackingParticles(), and TrackingNtuple().

std::vector<std::vector<int> > TrackingNtuple::sim_trkIdx
private

Definition at line 1076 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillTrackingParticles(), and TrackingNtuple().

std::vector<std::vector<float> > TrackingNtuple::sim_trkShareFrac
private

Definition at line 1077 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillTrackingParticles(), and TrackingNtuple().

DetIdAll TrackingNtuple::simhit_detId
private
DetIdAllPhase2 TrackingNtuple::simhit_detId_phase2
private
std::vector<float> TrackingNtuple::simhit_eloss
private
std::vector<std::vector<int> > TrackingNtuple::simhit_hitIdx
private

Definition at line 1186 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillSimHits(), matchCluster(), and TrackingNtuple().

std::vector<std::vector<int> > TrackingNtuple::simhit_hitType
private
std::vector<int> TrackingNtuple::simhit_particle
private
std::vector<short> TrackingNtuple::simhit_process
private
std::vector<int> TrackingNtuple::simhit_simTrkIdx
private

Definition at line 1185 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillSimHits(), and TrackingNtuple().

std::vector<float> TrackingNtuple::simhit_tof
private

Definition at line 1183 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillSimHits(), and TrackingNtuple().

std::vector<float> TrackingNtuple::simhit_x
private
std::vector<float> TrackingNtuple::simhit_y
private
std::vector<float> TrackingNtuple::simhit_z
private
edm::EDGetTokenT<SimHitTPAssociationProducer::SimHitTPAssociationList> TrackingNtuple::simHitTPMapToken_
private

Definition at line 658 of file TrackingNtuple.cc.

std::vector<int> TrackingNtuple::simpv_idx
private

Definition at line 1270 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillTrackingVertices(), and TrackingNtuple().

std::vector<int> TrackingNtuple::simvtx_bunchCrossing
private

Definition at line 1263 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillTrackingVertices(), and TrackingNtuple().

std::vector<std::vector<int> > TrackingNtuple::simvtx_daughterSimIdx
private

Definition at line 1269 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillTrackingVertices(), and TrackingNtuple().

std::vector<int> TrackingNtuple::simvtx_event
private

Definition at line 1262 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillTrackingVertices(), and TrackingNtuple().

std::vector<unsigned int> TrackingNtuple::simvtx_processType
private

Definition at line 1264 of file TrackingNtuple.cc.

Referenced by fillTrackingVertices(), and TrackingNtuple().

std::vector<std::vector<int> > TrackingNtuple::simvtx_sourceSimIdx
private

Definition at line 1268 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillTrackingVertices(), and TrackingNtuple().

std::vector<float> TrackingNtuple::simvtx_x
private

Definition at line 1265 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillTrackingVertices(), and TrackingNtuple().

std::vector<float> TrackingNtuple::simvtx_y
private

Definition at line 1266 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillTrackingVertices(), and TrackingNtuple().

std::vector<float> TrackingNtuple::simvtx_z
private

Definition at line 1267 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillTrackingVertices(), and TrackingNtuple().

edm::EDGetTokenT<edm::DetSetVector<PixelDigiSimLink> > TrackingNtuple::siphase2OTSimLinksToken_
private

Definition at line 662 of file TrackingNtuple.cc.

std::vector<float> TrackingNtuple::str_bbxi
private

Definition at line 1123 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillStripRphiStereoHits(), and TrackingNtuple().

std::vector<std::vector<float> > TrackingNtuple::str_chargeFraction
private

Definition at line 1111 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillStripRphiStereoHits(), and TrackingNtuple().

DetIdStrip TrackingNtuple::str_detId
private

Definition at line 1107 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillStripRphiStereoHits(), and TrackingNtuple().

std::vector<short> TrackingNtuple::str_isBarrel
private

Definition at line 1106 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillStripRphiStereoHits(), and TrackingNtuple().

std::vector<float> TrackingNtuple::str_radL
private

Definition at line 1122 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillStripRphiStereoHits(), and TrackingNtuple().

std::vector<std::vector<int> > TrackingNtuple::str_seeIdx
private
std::vector<std::vector<int> > TrackingNtuple::str_simHitIdx
private

Definition at line 1110 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillStripRphiStereoHits(), and TrackingNtuple().

std::vector<unsigned short> TrackingNtuple::str_simType
private

Definition at line 1112 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillStripRphiStereoHits(), and TrackingNtuple().

std::vector<std::vector<int> > TrackingNtuple::str_trkIdx
private
std::vector<float> TrackingNtuple::str_x
private

Definition at line 1113 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillStripRphiStereoHits(), and TrackingNtuple().

std::vector<float> TrackingNtuple::str_xx
private

Definition at line 1116 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillStripRphiStereoHits(), and TrackingNtuple().

std::vector<float> TrackingNtuple::str_xy
private

Definition at line 1117 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillStripRphiStereoHits(), and TrackingNtuple().

std::vector<float> TrackingNtuple::str_y
private

Definition at line 1114 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillStripRphiStereoHits(), and TrackingNtuple().

std::vector<float> TrackingNtuple::str_yy
private

Definition at line 1118 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillStripRphiStereoHits(), and TrackingNtuple().

std::vector<float> TrackingNtuple::str_yz
private

Definition at line 1119 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillStripRphiStereoHits(), and TrackingNtuple().

std::vector<float> TrackingNtuple::str_z
private

Definition at line 1115 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillStripRphiStereoHits(), and TrackingNtuple().

std::vector<float> TrackingNtuple::str_zx
private

Definition at line 1121 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillStripRphiStereoHits(), and TrackingNtuple().

std::vector<float> TrackingNtuple::str_zz
private

Definition at line 1120 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillStripRphiStereoHits(), and TrackingNtuple().

edm::EDGetTokenT<SiStripMatchedRecHit2DCollection> TrackingNtuple::stripMatchedRecHitToken_
private

Definition at line 668 of file TrackingNtuple.cc.

edm::EDGetTokenT<SiStripRecHit2DCollection> TrackingNtuple::stripRphiRecHitToken_
private

Definition at line 666 of file TrackingNtuple.cc.

edm::EDGetTokenT<edm::DetSetVector<StripDigiSimLink> > TrackingNtuple::stripSimLinkToken_
private

Definition at line 661 of file TrackingNtuple.cc.

edm::EDGetTokenT<SiStripRecHit2DCollection> TrackingNtuple::stripStereoRecHitToken_
private

Definition at line 667 of file TrackingNtuple.cc.

TTree* TrackingNtuple::t
private

Definition at line 684 of file TrackingNtuple.cc.

edm::EDGetTokenT<edm::ValueMap<unsigned int> > TrackingNtuple::tpNLayersToken_
private

Definition at line 672 of file TrackingNtuple.cc.

edm::EDGetTokenT<edm::ValueMap<unsigned int> > TrackingNtuple::tpNPixelLayersToken_
private

Definition at line 673 of file TrackingNtuple.cc.

edm::EDGetTokenT<edm::ValueMap<unsigned int> > TrackingNtuple::tpNStripStereoLayersToken_
private

Definition at line 674 of file TrackingNtuple.cc.

HistoryBase TrackingNtuple::tracer_
private

Definition at line 682 of file TrackingNtuple.cc.

edm::EDGetTokenT<reco::TrackToTrackingParticleAssociator> TrackingNtuple::trackAssociatorToken_
private

Definition at line 659 of file TrackingNtuple.cc.

edm::EDGetTokenT<TrackingParticleRefVector> TrackingNtuple::trackingParticleRefToken_
private

Definition at line 656 of file TrackingNtuple.cc.

edm::EDGetTokenT<TrackingParticleCollection> TrackingNtuple::trackingParticleToken_
private

Definition at line 655 of file TrackingNtuple.cc.

edm::EDGetTokenT<TrackingVertexCollection> TrackingNtuple::trackingVertexToken_
private

Definition at line 671 of file TrackingNtuple.cc.

edm::EDGetTokenT<edm::View<reco::Track> > TrackingNtuple::trackToken_
private

Definition at line 653 of file TrackingNtuple.cc.

std::vector<unsigned int> TrackingNtuple::trk_algo
private

Definition at line 1019 of file TrackingNtuple.cc.

std::vector<decltype(reco::TrackBase().algoMaskUL())> TrackingNtuple::trk_algoMask
private

Definition at line 1021 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillTracks(), and TrackingNtuple().

std::vector<int> TrackingNtuple::trk_bestFromFirstHitSimTrkIdx
private

Definition at line 1032 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillTracks(), and TrackingNtuple().

std::vector<float> TrackingNtuple::trk_bestFromFirstHitSimTrkNChi2
private

Definition at line 1036 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillTracks(), and TrackingNtuple().

std::vector<float> TrackingNtuple::trk_bestFromFirstHitSimTrkShareFrac
private

Definition at line 1033 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillTracks(), and TrackingNtuple().

std::vector<float> TrackingNtuple::trk_bestFromFirstHitSimTrkShareFracSimClusterDenom
private

Definition at line 1035 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillTracks(), and TrackingNtuple().

std::vector<float> TrackingNtuple::trk_bestFromFirstHitSimTrkShareFracSimDenom
private

Definition at line 1034 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillTracks(), and TrackingNtuple().

std::vector<int> TrackingNtuple::trk_bestSimTrkIdx
private

Definition at line 1027 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillTracks(), and TrackingNtuple().

std::vector<float> TrackingNtuple::trk_bestSimTrkNChi2
private

Definition at line 1031 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillTracks(), and TrackingNtuple().

std::vector<float> TrackingNtuple::trk_bestSimTrkShareFrac
private

Definition at line 1028 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillTracks(), and TrackingNtuple().

std::vector<float> TrackingNtuple::trk_bestSimTrkShareFracSimClusterDenom
private

Definition at line 1030 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillTracks(), and TrackingNtuple().

std::vector<float> TrackingNtuple::trk_bestSimTrkShareFracSimDenom
private

Definition at line 1029 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillTracks(), and TrackingNtuple().

std::vector<float> TrackingNtuple::trk_cotTheta
private

Definition at line 982 of file TrackingNtuple.cc.

std::vector<float> TrackingNtuple::trk_dxy
private

Definition at line 984 of file TrackingNtuple.cc.

std::vector<float> TrackingNtuple::trk_dxyClosestPV
private

Definition at line 988 of file TrackingNtuple.cc.

std::vector<float> TrackingNtuple::trk_dxyErr
private

Definition at line 994 of file TrackingNtuple.cc.

std::vector<float> TrackingNtuple::trk_dxyPV
private

Definition at line 986 of file TrackingNtuple.cc.

std::vector<float> TrackingNtuple::trk_dz
private

Definition at line 985 of file TrackingNtuple.cc.

std::vector<float> TrackingNtuple::trk_dzClosestPV
private

Definition at line 989 of file TrackingNtuple.cc.

std::vector<float> TrackingNtuple::trk_dzErr
private

Definition at line 995 of file TrackingNtuple.cc.

std::vector<float> TrackingNtuple::trk_dzPV
private

Definition at line 987 of file TrackingNtuple.cc.

std::vector<float> TrackingNtuple::trk_eta
private

Definition at line 980 of file TrackingNtuple.cc.

std::vector<float> TrackingNtuple::trk_etaErr
private

Definition at line 991 of file TrackingNtuple.cc.

std::vector<std::vector<int> > TrackingNtuple::trk_hitIdx
private

Definition at line 1040 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillTracks(), and TrackingNtuple().

std::vector<std::vector<int> > TrackingNtuple::trk_hitType
private

Definition at line 1041 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillTracks(), and TrackingNtuple().

std::vector<float> TrackingNtuple::trk_inner_pt
private

Definition at line 975 of file TrackingNtuple.cc.

std::vector<float> TrackingNtuple::trk_inner_px
private

Definition at line 972 of file TrackingNtuple.cc.

std::vector<float> TrackingNtuple::trk_inner_py
private

Definition at line 973 of file TrackingNtuple.cc.

std::vector<float> TrackingNtuple::trk_inner_pz
private

Definition at line 974 of file TrackingNtuple.cc.

std::vector<short> TrackingNtuple::trk_isHP
private

Definition at line 1023 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillTracks(), and TrackingNtuple().

std::vector<short> TrackingNtuple::trk_isTrue
private

Definition at line 1026 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillTracks(), and TrackingNtuple().

std::vector<float> TrackingNtuple::trk_lambda
private

Definition at line 981 of file TrackingNtuple.cc.

std::vector<float> TrackingNtuple::trk_lambdaErr
private

Definition at line 992 of file TrackingNtuple.cc.

std::vector<std::vector<float> > TrackingNtuple::trk_mvas
private

Definition at line 1002 of file TrackingNtuple.cc.

std::vector<unsigned int> TrackingNtuple::trk_n3DLay
private

Definition at line 1016 of file TrackingNtuple.cc.

std::vector<float> TrackingNtuple::trk_nChi2
private

Definition at line 999 of file TrackingNtuple.cc.

std::vector<float> TrackingNtuple::trk_nChi2_1Dmod
private

Definition at line 1000 of file TrackingNtuple.cc.

std::vector<unsigned int> TrackingNtuple::trk_nCluster
private

Definition at line 1018 of file TrackingNtuple.cc.

std::vector<float> TrackingNtuple::trk_ndof
private

Definition at line 1001 of file TrackingNtuple.cc.

std::vector<unsigned int> TrackingNtuple::trk_nInactive
private

Definition at line 1007 of file TrackingNtuple.cc.

std::vector<unsigned int> TrackingNtuple::trk_nInnerInactive
private

Definition at line 1013 of file TrackingNtuple.cc.

std::vector<unsigned int> TrackingNtuple::trk_nInnerLost
private

Definition at line 1011 of file TrackingNtuple.cc.

std::vector<unsigned int> TrackingNtuple::trk_nLost
private

Definition at line 1006 of file TrackingNtuple.cc.

std::vector<unsigned int> TrackingNtuple::trk_nLostLay
private

Definition at line 1017 of file TrackingNtuple.cc.

std::vector<unsigned int> TrackingNtuple::trk_nOuterInactive
private

Definition at line 1012 of file TrackingNtuple.cc.

std::vector<unsigned int> TrackingNtuple::trk_nOuterLost
private

Definition at line 1010 of file TrackingNtuple.cc.

std::vector<unsigned int> TrackingNtuple::trk_nPixel
private

Definition at line 1008 of file TrackingNtuple.cc.

std::vector<unsigned int> TrackingNtuple::trk_nPixelLay
private

Definition at line 1014 of file TrackingNtuple.cc.

std::vector<unsigned int> TrackingNtuple::trk_nStrip
private

Definition at line 1009 of file TrackingNtuple.cc.

std::vector<unsigned int> TrackingNtuple::trk_nStripLay
private

Definition at line 1015 of file TrackingNtuple.cc.

std::vector<unsigned int> TrackingNtuple::trk_nValid
private

Definition at line 1005 of file TrackingNtuple.cc.

std::vector<unsigned int> TrackingNtuple::trk_originalAlgo
private

Definition at line 1020 of file TrackingNtuple.cc.

std::vector<float> TrackingNtuple::trk_outer_pt
private

Definition at line 979 of file TrackingNtuple.cc.

std::vector<float> TrackingNtuple::trk_outer_px
private

Definition at line 976 of file TrackingNtuple.cc.

std::vector<float> TrackingNtuple::trk_outer_py
private

Definition at line 977 of file TrackingNtuple.cc.

std::vector<float> TrackingNtuple::trk_outer_pz
private

Definition at line 978 of file TrackingNtuple.cc.

std::vector<float> TrackingNtuple::trk_phi
private

Definition at line 983 of file TrackingNtuple.cc.

std::vector<float> TrackingNtuple::trk_phiErr
private

Definition at line 993 of file TrackingNtuple.cc.

std::vector<float> TrackingNtuple::trk_pt
private

Definition at line 971 of file TrackingNtuple.cc.

std::vector<float> TrackingNtuple::trk_ptErr
private

Definition at line 990 of file TrackingNtuple.cc.

std::vector<float> TrackingNtuple::trk_px
private

Definition at line 968 of file TrackingNtuple.cc.

std::vector<float> TrackingNtuple::trk_py
private

Definition at line 969 of file TrackingNtuple.cc.

std::vector<float> TrackingNtuple::trk_pz
private

Definition at line 970 of file TrackingNtuple.cc.

std::vector<int> TrackingNtuple::trk_q
private

Definition at line 1004 of file TrackingNtuple.cc.

std::vector<std::vector<unsigned short> > TrackingNtuple::trk_qualityMasks
private

Definition at line 1003 of file TrackingNtuple.cc.

std::vector<float> TrackingNtuple::trk_refpoint_x
private

Definition at line 996 of file TrackingNtuple.cc.

std::vector<float> TrackingNtuple::trk_refpoint_y
private

Definition at line 997 of file TrackingNtuple.cc.

std::vector<float> TrackingNtuple::trk_refpoint_z
private

Definition at line 998 of file TrackingNtuple.cc.

std::vector<int> TrackingNtuple::trk_seedIdx
private

Definition at line 1024 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillTracks(), and TrackingNtuple().

std::vector<std::vector<int> > TrackingNtuple::trk_simTrkIdx
private

Definition at line 1039 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillTracks(), and TrackingNtuple().

std::vector<std::vector<float> > TrackingNtuple::trk_simTrkNChi2
private

Definition at line 1038 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillTracks(), and TrackingNtuple().

std::vector<std::vector<float> > TrackingNtuple::trk_simTrkShareFrac
private

Definition at line 1037 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillTracks(), and TrackingNtuple().

std::vector<unsigned short> TrackingNtuple::trk_stopReason
private

Definition at line 1022 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillTracks(), and TrackingNtuple().

std::vector<int> TrackingNtuple::trk_vtxIdx
private

Definition at line 1025 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillTracks(), fillVertices(), and TrackingNtuple().

edm::EDGetTokenT<reco::VertexCollection> TrackingNtuple::vertexToken_
private

Definition at line 670 of file TrackingNtuple.cc.

std::vector<float> TrackingNtuple::vtx_chi2
private

Definition at line 1254 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillVertices(), and TrackingNtuple().

std::vector<short> TrackingNtuple::vtx_fake
private

Definition at line 1255 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillVertices(), and TrackingNtuple().

std::vector<float> TrackingNtuple::vtx_ndof
private

Definition at line 1253 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillVertices(), and TrackingNtuple().

std::vector<std::vector<int> > TrackingNtuple::vtx_trkIdx
private

Definition at line 1257 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillVertices(), and TrackingNtuple().

std::vector<short> TrackingNtuple::vtx_valid
private

Definition at line 1256 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillVertices(), and TrackingNtuple().

std::vector<float> TrackingNtuple::vtx_x
private

Definition at line 1247 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillVertices(), and TrackingNtuple().

std::vector<float> TrackingNtuple::vtx_xErr
private

Definition at line 1250 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillVertices(), and TrackingNtuple().

std::vector<float> TrackingNtuple::vtx_y
private

Definition at line 1248 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillVertices(), and TrackingNtuple().

std::vector<float> TrackingNtuple::vtx_yErr
private

Definition at line 1251 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillVertices(), and TrackingNtuple().

std::vector<float> TrackingNtuple::vtx_z
private

Definition at line 1249 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillVertices(), and TrackingNtuple().

std::vector<float> TrackingNtuple::vtx_zErr
private

Definition at line 1252 of file TrackingNtuple.cc.

Referenced by clearVariables(), fillVertices(), and TrackingNtuple().