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
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () 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
 
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
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
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 >
 
typedef std::pair< TrackPSimHitRef::key_type, edm::ProductIDSimHitFullKey
 
typedef std::map< SimHitFullKey, size_t > SimHitRefKeyToIndex
 
typedef std::unordered_set< reco::RecoToSimCollection::index_typeTrackingParticleRefKeySet
 
typedef std::unordered_map< reco::RecoToSimCollection::index_type, size_t > TrackingParticleRefKeyToIndex
 
typedef TrackingParticleRefKeyToIndex TrackingVertexRefKeyToIndex
 

Private Member Functions

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 TransientTrackingRecHitBuilder &theTTRHBuilder, const MagneticField *theMF, const 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)
 
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 reco::BeamSpot &bs, const reco::VertexCollection &vertices, const reco::TrackToTrackingParticleAssociator &associatorByHits, 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< 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_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< float > > see_shareFrac
 
std::vector< std::vector< int > > see_simTrkIdx
 
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_nStrip
 
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< float > > sim_shareFrac
 
std::vector< std::vector< int > > sim_simHitIdx
 
std::vector< std::vector< int > > sim_trkIdx
 
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< 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< float > trk_ndof
 
std::vector< unsigned int > trk_nInnerLost
 
std::vector< unsigned int > trk_nInvalid
 
std::vector< unsigned int > trk_nLostLay
 
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< float > > trk_shareFrac
 
std::vector< std::vector< int > > trk_simTrkIdx
 
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 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 334 of file TrackingNtuple.cc.

Member Typedef Documentation

Definition at line 821 of file TrackingNtuple.cc.

Definition at line 822 of file TrackingNtuple.cc.

Definition at line 820 of file TrackingNtuple.cc.

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

Definition at line 818 of file TrackingNtuple.cc.

Definition at line 819 of file TrackingNtuple.cc.

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

Definition at line 376 of file TrackingNtuple.cc.

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

Definition at line 377 of file TrackingNtuple.cc.

Definition at line 352 of file TrackingNtuple.cc.

typedef std::map<SimHitFullKey, size_t> TrackingNtuple::SimHitRefKeyToIndex
private

Definition at line 353 of file TrackingNtuple.cc.

Definition at line 349 of file TrackingNtuple.cc.

Definition at line 350 of file TrackingNtuple.cc.

Definition at line 351 of file TrackingNtuple.cc.

Member Enumeration Documentation

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

Definition at line 368 of file TrackingNtuple.cc.

368  {
369  Signal = 0,
370  ITPileup = 1,
371  OOTPileup = 2,
372  Noise = 3,
373  Unknown = 99
374  };
Definition: vlib.h:39
enum TrackingNtuple::HitType
strongprivate
Enumerator
Pixel 
Strip 
Glued 
Invalid 
Phase2OT 
Unknown 

Definition at line 355 of file TrackingNtuple.cc.

355  {
356  Pixel = 0,
357  Strip = 1,
358  Glued = 2,
359  Invalid = 3,
360  Phase2OT = 4,
361  Unknown = 99
362  };

Constructor & Destructor Documentation

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

Definition at line 1114 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_chi2, see_dxy, see_dxyErr, see_dz, see_dzErr, see_eta, see_etaErr, see_fitok, see_hitIdx, see_hitType, see_isTrue, see_nCands, 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_shareFrac, see_simTrkIdx, 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_nStrip, 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_shareFrac, sim_simHitIdx, sim_trkIdx, 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_hitIdx, trk_hitType, trk_isHP, trk_isTrue, trk_seedIdx, trk_shareFrac, trk_simTrkIdx, 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.

1114  :
1116  clusterTPMapToken_(consumes<ClusterTPAssociation>(iConfig.getUntrackedParameter<edm::InputTag>("clusterTPMap"))),
1117  simHitTPMapToken_(consumes<SimHitTPAssociationProducer::SimHitTPAssociationList>(iConfig.getUntrackedParameter<edm::InputTag>("simHitTPMap"))),
1118  trackAssociatorToken_(consumes<reco::TrackToTrackingParticleAssociator>(iConfig.getUntrackedParameter<edm::InputTag>("trackAssociator"))),
1122  includeStripHits_(iConfig.getUntrackedParameter<edm::InputTag>("stripDigiSimLink").label() != ""),
1123  includePhase2OTHits_(iConfig.getUntrackedParameter<edm::InputTag>("phase2OTSimLink").label() != ""),
1124  beamSpotToken_(consumes<reco::BeamSpot>(iConfig.getUntrackedParameter<edm::InputTag>("beamSpot"))),
1125  pixelRecHitToken_(consumes<SiPixelRecHitCollection>(iConfig.getUntrackedParameter<edm::InputTag>("pixelRecHits"))),
1126  stripRphiRecHitToken_(consumes<SiStripRecHit2DCollection>(iConfig.getUntrackedParameter<edm::InputTag>("stripRphiRecHits"))),
1127  stripStereoRecHitToken_(consumes<SiStripRecHit2DCollection>(iConfig.getUntrackedParameter<edm::InputTag>("stripStereoRecHits"))),
1128  stripMatchedRecHitToken_(consumes<SiStripMatchedRecHit2DCollection>(iConfig.getUntrackedParameter<edm::InputTag>("stripMatchedRecHits"))),
1129  phase2OTRecHitToken_(consumes<Phase2TrackerRecHit1DCollectionNew>(iConfig.getUntrackedParameter<edm::InputTag>("phase2OTRecHits"))),
1130  vertexToken_(consumes<reco::VertexCollection>(iConfig.getUntrackedParameter<edm::InputTag>("vertices"))),
1131  trackingVertexToken_(consumes<TrackingVertexCollection>(iConfig.getUntrackedParameter<edm::InputTag>("trackingVertices"))),
1134  tpNStripStereoLayersToken_(consumes<edm::ValueMap<unsigned int> >(iConfig.getUntrackedParameter<edm::InputTag>("trackingParticleNstripstereolayers"))),
1135  builderName_(iConfig.getUntrackedParameter<std::string>("TTRHBuilder")),
1136  parametersDefinerName_(iConfig.getUntrackedParameter<std::string>("parametersDefiner")),
1137  includeSeeds_(iConfig.getUntrackedParameter<bool>("includeSeeds")),
1138  includeAllHits_(iConfig.getUntrackedParameter<bool>("includeAllHits")),
1139  includeMVA_(iConfig.getUntrackedParameter<bool>("includeMVA")),
1140  includeTrackingParticles_(iConfig.getUntrackedParameter<bool>("includeTrackingParticles"))
1141 {
1142  if(includeSeeds_) {
1143  seedTokens_ = edm::vector_transform(iConfig.getUntrackedParameter<std::vector<edm::InputTag> >("seedTracks"), [&](const edm::InputTag& tag) {
1144  return consumes<edm::View<reco::Track> >(tag);
1145  });
1146  seedStopInfoTokens_ = edm::vector_transform(iConfig.getUntrackedParameter<std::vector<edm::InputTag> >("trackCandidates"), [&](const edm::InputTag& tag) {
1147  return consumes<std::vector<SeedStopInfo> >(tag);
1148  });
1149  if(seedTokens_.size() != seedStopInfoTokens_.size()) {
1150  throw cms::Exception("Configuration") << "Got " << seedTokens_.size() << " seed collections, but " << seedStopInfoTokens_.size() << " track candidate collections";
1151  }
1152  }
1153 
1154  if(includeAllHits_) {
1156  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)";
1157  }
1159  throw cms::Exception("Configuration") << "Neither stripDigiSimLink or phase2OTSimLink are set, please set either one.";
1160  }
1161  }
1162 
1163  const bool tpRef = iConfig.getUntrackedParameter<bool>("trackingParticlesRef");
1164  const auto tpTag = iConfig.getUntrackedParameter<edm::InputTag>("trackingParticles");
1165  if(tpRef) {
1166  trackingParticleRefToken_ = consumes<TrackingParticleRefVector>(tpTag);
1167  }
1168  else {
1169  trackingParticleToken_ = consumes<TrackingParticleCollection>(tpTag);
1170  }
1171 
1172  tracer_.depth(-2); // as in SimTracker/TrackHistory/src/TrackClassifier.cc
1173 
1174  if(includeMVA_) {
1175  mvaQualityCollectionTokens_ = edm::vector_transform(iConfig.getUntrackedParameter<std::vector<std::string> >("trackMVAs"),
1176  [&](const std::string& tag) {
1177  return std::make_tuple(consumes<MVACollection>(edm::InputTag(tag, "MVAValues")),
1178  consumes<QualityMaskCollection>(edm::InputTag(tag, "QualityMasks")));
1179  });
1180  }
1181 
1182  usesResource(TFileService::kSharedResource);
1184  t = fs->make<TTree>("tree","tree");
1185 
1186  t->Branch("event" , &ev_event);
1187  t->Branch("lumi" , &ev_lumi);
1188  t->Branch("run" , &ev_run);
1189 
1190  //tracks
1191  t->Branch("trk_px" , &trk_px);
1192  t->Branch("trk_py" , &trk_py);
1193  t->Branch("trk_pz" , &trk_pz);
1194  t->Branch("trk_pt" , &trk_pt);
1195  t->Branch("trk_inner_px" , &trk_inner_px);
1196  t->Branch("trk_inner_py" , &trk_inner_py);
1197  t->Branch("trk_inner_pz" , &trk_inner_pz);
1198  t->Branch("trk_inner_pt" , &trk_inner_pt);
1199  t->Branch("trk_outer_px" , &trk_outer_px);
1200  t->Branch("trk_outer_py" , &trk_outer_py);
1201  t->Branch("trk_outer_pz" , &trk_outer_pz);
1202  t->Branch("trk_outer_pt" , &trk_outer_pt);
1203  t->Branch("trk_eta" , &trk_eta);
1204  t->Branch("trk_lambda" , &trk_lambda);
1205  t->Branch("trk_cotTheta" , &trk_cotTheta);
1206  t->Branch("trk_phi" , &trk_phi);
1207  t->Branch("trk_dxy" , &trk_dxy );
1208  t->Branch("trk_dz" , &trk_dz );
1209  t->Branch("trk_dxyPV" , &trk_dxyPV );
1210  t->Branch("trk_dzPV" , &trk_dzPV );
1211  t->Branch("trk_dxyClosestPV", &trk_dxyClosestPV );
1212  t->Branch("trk_dzClosestPV", &trk_dzClosestPV );
1213  t->Branch("trk_ptErr" , &trk_ptErr );
1214  t->Branch("trk_etaErr" , &trk_etaErr );
1215  t->Branch("trk_lambdaErr", &trk_lambdaErr);
1216  t->Branch("trk_phiErr" , &trk_phiErr );
1217  t->Branch("trk_dxyErr" , &trk_dxyErr );
1218  t->Branch("trk_dzErr" , &trk_dzErr );
1219  t->Branch("trk_refpoint_x", &trk_refpoint_x);
1220  t->Branch("trk_refpoint_y", &trk_refpoint_y);
1221  t->Branch("trk_refpoint_z", &trk_refpoint_z);
1222  t->Branch("trk_nChi2" , &trk_nChi2);
1223  t->Branch("trk_nChi2_1Dmod", &trk_nChi2_1Dmod);
1224  t->Branch("trk_ndof" , &trk_ndof);
1225  if(includeMVA_) {
1226  trk_mvas.resize(mvaQualityCollectionTokens_.size());
1228  if(!trk_mvas.empty()) {
1229  t->Branch("trk_mva" , &(trk_mvas[0]));
1230  t->Branch("trk_qualityMask", &(trk_qualityMasks[0]));
1231  for(size_t i=1; i<trk_mvas.size(); ++i) {
1232  t->Branch(("trk_mva"+std::to_string(i+1)).c_str(), &(trk_mvas[i]));
1233  t->Branch(("trk_qualityMask"+std::to_string(i+1)).c_str(), &(trk_qualityMasks[i]));
1234  }
1235  }
1236  }
1237  t->Branch("trk_q" , &trk_q);
1238  t->Branch("trk_nValid" , &trk_nValid );
1239  t->Branch("trk_nInvalid" , &trk_nInvalid);
1240  t->Branch("trk_nPixel" , &trk_nPixel );
1241  t->Branch("trk_nStrip" , &trk_nStrip );
1242  t->Branch("trk_nOuterLost", &trk_nOuterLost );
1243  t->Branch("trk_nInnerLost", &trk_nInnerLost );
1244  t->Branch("trk_nPixelLay", &trk_nPixelLay);
1245  t->Branch("trk_nStripLay", &trk_nStripLay);
1246  t->Branch("trk_n3DLay" , &trk_n3DLay );
1247  t->Branch("trk_nLostLay" , &trk_nLostLay );
1248  t->Branch("trk_algo" , &trk_algo );
1249  t->Branch("trk_originalAlgo", &trk_originalAlgo);
1250  t->Branch("trk_algoMask" , &trk_algoMask);
1251  t->Branch("trk_stopReason", &trk_stopReason);
1252  t->Branch("trk_isHP" , &trk_isHP );
1253  if(includeSeeds_) {
1254  t->Branch("trk_seedIdx" , &trk_seedIdx );
1255  }
1256  t->Branch("trk_vtxIdx" , &trk_vtxIdx);
1258  t->Branch("trk_shareFrac", &trk_shareFrac);
1259  t->Branch("trk_simTrkIdx", &trk_simTrkIdx );
1260  }
1261  else {
1262  t->Branch("trk_isTrue", &trk_isTrue);
1263  }
1264  if(includeAllHits_) {
1265  t->Branch("trk_hitIdx" , &trk_hitIdx);
1266  t->Branch("trk_hitType", &trk_hitType);
1267  }
1269  //sim tracks
1270  t->Branch("sim_event" , &sim_event );
1271  t->Branch("sim_bunchCrossing", &sim_bunchCrossing);
1272  t->Branch("sim_pdgId" , &sim_pdgId );
1273  t->Branch("sim_genPdgIds", &sim_genPdgIds);
1274  t->Branch("sim_isFromBHadron", &sim_isFromBHadron);
1275  t->Branch("sim_px" , &sim_px );
1276  t->Branch("sim_py" , &sim_py );
1277  t->Branch("sim_pz" , &sim_pz );
1278  t->Branch("sim_pt" , &sim_pt );
1279  t->Branch("sim_eta" , &sim_eta );
1280  t->Branch("sim_phi" , &sim_phi );
1281  t->Branch("sim_pca_pt" , &sim_pca_pt );
1282  t->Branch("sim_pca_eta" , &sim_pca_eta );
1283  t->Branch("sim_pca_lambda", &sim_pca_lambda);
1284  t->Branch("sim_pca_cotTheta", &sim_pca_cotTheta);
1285  t->Branch("sim_pca_phi" , &sim_pca_phi );
1286  t->Branch("sim_pca_dxy" , &sim_pca_dxy );
1287  t->Branch("sim_pca_dz" , &sim_pca_dz );
1288  t->Branch("sim_q" , &sim_q );
1289  t->Branch("sim_nValid" , &sim_nValid );
1290  t->Branch("sim_nPixel" , &sim_nPixel );
1291  t->Branch("sim_nStrip" , &sim_nStrip );
1292  t->Branch("sim_nLay" , &sim_nLay );
1293  t->Branch("sim_nPixelLay", &sim_nPixelLay);
1294  t->Branch("sim_n3DLay" , &sim_n3DLay );
1295  t->Branch("sim_trkIdx" , &sim_trkIdx );
1296  t->Branch("sim_shareFrac", &sim_shareFrac);
1297  if(includeSeeds_) {
1298  t->Branch("sim_seedIdx" , &sim_seedIdx );
1299  }
1300  t->Branch("sim_parentVtxIdx", &sim_parentVtxIdx);
1301  t->Branch("sim_decayVtxIdx", &sim_decayVtxIdx);
1302  if(includeAllHits_) {
1303  t->Branch("sim_simHitIdx" , &sim_simHitIdx );
1304  }
1305  }
1306  if(includeAllHits_) {
1307  //pixels
1308  t->Branch("pix_isBarrel" , &pix_isBarrel );
1309  pix_detId.book("pix", t);
1310  t->Branch("pix_trkIdx" , &pix_trkIdx );
1311  if(includeSeeds_) {
1312  t->Branch("pix_seeIdx" , &pix_seeIdx );
1313  }
1314  t->Branch("pix_simHitIdx" , &pix_simHitIdx);
1315  t->Branch("pix_chargeFraction", &pix_chargeFraction);
1316  t->Branch("pix_simType", &pix_simType);
1317  t->Branch("pix_x" , &pix_x );
1318  t->Branch("pix_y" , &pix_y );
1319  t->Branch("pix_z" , &pix_z );
1320  t->Branch("pix_xx" , &pix_xx );
1321  t->Branch("pix_xy" , &pix_xy );
1322  t->Branch("pix_yy" , &pix_yy );
1323  t->Branch("pix_yz" , &pix_yz );
1324  t->Branch("pix_zz" , &pix_zz );
1325  t->Branch("pix_zx" , &pix_zx );
1326  t->Branch("pix_radL" , &pix_radL );
1327  t->Branch("pix_bbxi" , &pix_bbxi );
1328  t->Branch("pix_bbxi" , &pix_bbxi );
1329  //strips
1330  if(includeStripHits_){
1331  t->Branch("str_isBarrel" , &str_isBarrel );
1332  str_detId.book("str", t);
1333  t->Branch("str_trkIdx" , &str_trkIdx );
1334  if(includeSeeds_) {
1335  t->Branch("str_seeIdx" , &str_seeIdx );
1336  }
1337  t->Branch("str_simHitIdx" , &str_simHitIdx);
1338  t->Branch("str_chargeFraction", &str_chargeFraction);
1339  t->Branch("str_simType", &str_simType);
1340  t->Branch("str_x" , &str_x );
1341  t->Branch("str_y" , &str_y );
1342  t->Branch("str_z" , &str_z );
1343  t->Branch("str_xx" , &str_xx );
1344  t->Branch("str_xy" , &str_xy );
1345  t->Branch("str_yy" , &str_yy );
1346  t->Branch("str_yz" , &str_yz );
1347  t->Branch("str_zz" , &str_zz );
1348  t->Branch("str_zx" , &str_zx );
1349  t->Branch("str_radL" , &str_radL );
1350  t->Branch("str_bbxi" , &str_bbxi );
1351  //matched hits
1352  t->Branch("glu_isBarrel" , &glu_isBarrel );
1353  glu_detId.book("glu", t);
1354  t->Branch("glu_monoIdx" , &glu_monoIdx );
1355  t->Branch("glu_stereoIdx" , &glu_stereoIdx);
1356  if(includeSeeds_) {
1357  t->Branch("glu_seeIdx" , &glu_seeIdx );
1358  }
1359  t->Branch("glu_x" , &glu_x );
1360  t->Branch("glu_y" , &glu_y );
1361  t->Branch("glu_z" , &glu_z );
1362  t->Branch("glu_xx" , &glu_xx );
1363  t->Branch("glu_xy" , &glu_xy );
1364  t->Branch("glu_yy" , &glu_yy );
1365  t->Branch("glu_yz" , &glu_yz );
1366  t->Branch("glu_zz" , &glu_zz );
1367  t->Branch("glu_zx" , &glu_zx );
1368  t->Branch("glu_radL" , &glu_radL );
1369  t->Branch("glu_bbxi" , &glu_bbxi );
1370  }
1371  //phase2 OT
1373  t->Branch("ph2_isBarrel" , &ph2_isBarrel );
1374  ph2_detId.book("ph2", t);
1375  t->Branch("ph2_trkIdx" , &ph2_trkIdx );
1376  if(includeSeeds_) {
1377  t->Branch("ph2_seeIdx" , &ph2_seeIdx );
1378  }
1379  t->Branch("ph2_simHitIdx" , &ph2_simHitIdx);
1380  t->Branch("ph2_simType", &ph2_simType);
1381  t->Branch("ph2_x" , &ph2_x );
1382  t->Branch("ph2_y" , &ph2_y );
1383  t->Branch("ph2_z" , &ph2_z );
1384  t->Branch("ph2_xx" , &ph2_xx );
1385  t->Branch("ph2_xy" , &ph2_xy );
1386  t->Branch("ph2_yy" , &ph2_yy );
1387  t->Branch("ph2_yz" , &ph2_yz );
1388  t->Branch("ph2_zz" , &ph2_zz );
1389  t->Branch("ph2_zx" , &ph2_zx );
1390  t->Branch("ph2_radL" , &ph2_radL );
1391  t->Branch("ph2_bbxi" , &ph2_bbxi );
1392  t->Branch("ph2_bbxi" , &ph2_bbxi );
1393  }
1394  //invalid hits
1395  t->Branch("inv_isBarrel" , &inv_isBarrel );
1396  if(includeStripHits_) inv_detId.book("inv", t);
1397  else inv_detId_phase2.book("inv", t);
1398  t->Branch("inv_type" , &inv_type );
1399  //simhits
1400  if(includeStripHits_) simhit_detId.book("simhit", t);
1401  else simhit_detId_phase2.book("simhit", t);
1402  t->Branch("simhit_x" , &simhit_x);
1403  t->Branch("simhit_y" , &simhit_y);
1404  t->Branch("simhit_z" , &simhit_z);
1405  t->Branch("simhit_particle", &simhit_particle);
1406  t->Branch("simhit_process" , &simhit_process);
1407  t->Branch("simhit_eloss" , &simhit_eloss);
1408  t->Branch("simhit_tof" , &simhit_tof);
1409  //t->Branch("simhit_simTrackId", &simhit_simTrackId);
1410  t->Branch("simhit_simTrkIdx", &simhit_simTrkIdx);
1411  t->Branch("simhit_hitIdx" , &simhit_hitIdx);
1412  t->Branch("simhit_hitType" , &simhit_hitType);
1413  }
1414  //beam spot
1415  t->Branch("bsp_x" , &bsp_x , "bsp_x/F");
1416  t->Branch("bsp_y" , &bsp_y , "bsp_y/F");
1417  t->Branch("bsp_z" , &bsp_z , "bsp_z/F");
1418  t->Branch("bsp_sigmax" , &bsp_sigmax , "bsp_sigmax/F");
1419  t->Branch("bsp_sigmay" , &bsp_sigmay , "bsp_sigmay/F");
1420  t->Branch("bsp_sigmaz" , &bsp_sigmaz , "bsp_sigmaz/F");
1421  if(includeSeeds_) {
1422  //seeds
1423  t->Branch("see_fitok" , &see_fitok );
1424  t->Branch("see_px" , &see_px );
1425  t->Branch("see_py" , &see_py );
1426  t->Branch("see_pz" , &see_pz );
1427  t->Branch("see_pt" , &see_pt );
1428  t->Branch("see_eta" , &see_eta );
1429  t->Branch("see_phi" , &see_phi );
1430  t->Branch("see_dxy" , &see_dxy );
1431  t->Branch("see_dz" , &see_dz );
1432  t->Branch("see_ptErr" , &see_ptErr );
1433  t->Branch("see_etaErr" , &see_etaErr );
1434  t->Branch("see_phiErr" , &see_phiErr );
1435  t->Branch("see_dxyErr" , &see_dxyErr );
1436  t->Branch("see_dzErr" , &see_dzErr );
1437  t->Branch("see_chi2" , &see_chi2 );
1438  t->Branch("see_statePt" , &see_statePt );
1439  t->Branch("see_stateTrajX", &see_stateTrajX);
1440  t->Branch("see_stateTrajY", &see_stateTrajY);
1441  t->Branch("see_stateTrajPx", &see_stateTrajPx);
1442  t->Branch("see_stateTrajPy", &see_stateTrajPy);
1443  t->Branch("see_stateTrajPz", &see_stateTrajPz);
1444  t->Branch("see_q" , &see_q );
1445  t->Branch("see_nValid" , &see_nValid );
1446  t->Branch("see_nPixel" , &see_nPixel );
1447  t->Branch("see_nGlued" , &see_nGlued );
1448  t->Branch("see_nStrip" , &see_nStrip );
1449  t->Branch("see_nPhase2OT", &see_nPhase2OT);
1450  t->Branch("see_algo" , &see_algo );
1451  t->Branch("see_stopReason", &see_stopReason);
1452  t->Branch("see_nCands" , &see_nCands );
1453  t->Branch("see_trkIdx" , &see_trkIdx );
1455  t->Branch("see_shareFrac", &see_shareFrac);
1456  t->Branch("see_simTrkIdx", &see_simTrkIdx );
1457  }
1458  else {
1459  t->Branch("see_isTrue", &see_isTrue);
1460  }
1461  if(includeAllHits_) {
1462  t->Branch("see_hitIdx" , &see_hitIdx );
1463  t->Branch("see_hitType", &see_hitType );
1464  }
1465  //seed algo offset
1466  t->Branch("see_offset" , &see_offset );
1467  }
1468 
1469  //vertices
1470  t->Branch("vtx_x" , &vtx_x);
1471  t->Branch("vtx_y" , &vtx_y);
1472  t->Branch("vtx_z" , &vtx_z);
1473  t->Branch("vtx_xErr" , &vtx_xErr);
1474  t->Branch("vtx_yErr" , &vtx_yErr);
1475  t->Branch("vtx_zErr" , &vtx_zErr);
1476  t->Branch("vtx_ndof" , &vtx_ndof);
1477  t->Branch("vtx_chi2" , &vtx_chi2);
1478  t->Branch("vtx_fake" , &vtx_fake);
1479  t->Branch("vtx_valid" , &vtx_valid);
1480  t->Branch("vtx_trkIdx" , &vtx_trkIdx);
1481 
1482  // tracking vertices
1483  t->Branch("simvtx_event" , &simvtx_event );
1484  t->Branch("simvtx_bunchCrossing", &simvtx_bunchCrossing);
1485  t->Branch("simvtx_processType", &simvtx_processType);
1486  t->Branch("simvtx_x" , &simvtx_x);
1487  t->Branch("simvtx_y" , &simvtx_y);
1488  t->Branch("simvtx_z" , &simvtx_z);
1489  t->Branch("simvtx_sourceSimIdx", &simvtx_sourceSimIdx);
1490  t->Branch("simvtx_daughterSimIdx", &simvtx_daughterSimIdx);
1491 
1492  t->Branch("simpv_idx" , &simpv_idx);
1493 
1494  //t->Branch("" , &);
1495 }
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
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< 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< 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< 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
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< 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< std::vector< float > > sim_shareFrac
std::vector< unsigned short > trk_stopReason
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 > 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 > > 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 > see_etaErr
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
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
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_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< float > ph2_xy
std::vector< float > vtx_y
std::vector< float > pix_z
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< edm::EDGetTokenT< edm::View< reco::Track > > > seedTokens_
edm::EDGetTokenT< SimHitTPAssociationProducer::SimHitTPAssociationList > simHitTPMapToken_
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 > 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< std::vector< float > > trk_shareFrac
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
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< std::vector< int > > trk_hitIdx
std::string const & label() const
Definition: InputTag.h:36
std::vector< std::vector< float > > see_shareFrac
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:53
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< 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< unsigned int > trk_nInvalid
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< float > trk_inner_px
DetIdStrip glu_detId
std::vector< float > vtx_zErr
std::vector< float > simhit_eloss
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 1498 of file TrackingNtuple.cc.

1498  {
1499  // do anything here that needs to be done at desctruction time
1500  // (e.g. close files, deallocate resources etc.)
1501 }

Member Function Documentation

void TrackingNtuple::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 1775 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::ESHandle< 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.

1775  {
1776 
1777  using namespace edm;
1778  using namespace reco;
1779  using namespace std;
1780 
1782  iSetup.get<IdealMagneticFieldRecord>().get(theMF);
1783 
1785  iSetup.get<TransientRecHitRecord>().get(builderName_,theTTRHBuilder);
1786 
1787  edm::ESHandle<TrackerTopology> tTopoHandle;
1788  iSetup.get<TrackerTopologyRcd>().get(tTopoHandle);
1789  const TrackerTopology& tTopo = *tTopoHandle;
1790 
1791  edm::ESHandle<TrackerGeometry> geometryHandle;
1792  iSetup.get<TrackerDigiGeometryRecord>().get(geometryHandle);
1793  const TrackerGeometry &tracker = *geometryHandle;
1794 
1796  iEvent.getByToken(trackAssociatorToken_, theAssociator);
1797  const reco::TrackToTrackingParticleAssociator& associatorByHits = *theAssociator;
1798 
1799  LogDebug("TrackingNtuple") << "Analyzing new event";
1800 
1801  //initialize tree variables
1802  clearVariables();
1803 
1804  // FIXME: we really need to move to edm::View for reading the
1805  // TrackingParticles... Unfortunately it has non-trivial
1806  // consequences on the associator/association interfaces etc.
1808  TrackingParticleRefKeySet tmpTPkeys;
1809  const TrackingParticleRefVector *tmpTPptr = nullptr;
1811  edm::Handle<TrackingParticleRefVector> TPCollectionHRefVector;
1812 
1814  iEvent.getByToken(trackingParticleToken_, TPCollectionH);
1815  for(size_t i=0, size=TPCollectionH->size(); i<size; ++i) {
1816  tmpTP.push_back(TrackingParticleRef(TPCollectionH, i));
1817  }
1818  tmpTPptr = &tmpTP;
1819  }
1820  else {
1821  iEvent.getByToken(trackingParticleRefToken_, TPCollectionHRefVector);
1822  tmpTPptr = TPCollectionHRefVector.product();
1823  for(const auto& ref: *tmpTPptr) {
1824  tmpTPkeys.insert(ref.key());
1825  }
1826  }
1827  const TrackingParticleRefVector& tpCollection = *tmpTPptr;
1828 
1829  // Fill mapping from Ref::key() to index
1830  TrackingParticleRefKeyToIndex tpKeyToIndex;
1831  for(size_t i=0; i<tpCollection.size(); ++i) {
1832  tpKeyToIndex[tpCollection[i].key()] = i;
1833  }
1834 
1835  // tracking vertices
1837  iEvent.getByToken(trackingVertexToken_, htv);
1838  const TrackingVertexCollection& tvs = *htv;
1839 
1840  // Fill mapping from Ref::key() to index
1841  TrackingVertexRefVector tvRefs;
1842  TrackingVertexRefKeyToIndex tvKeyToIndex;
1843  for(size_t i=0; i<tvs.size(); ++i) {
1844  const TrackingVertex& v = tvs[i];
1845  if(v.eventId().bunchCrossing() != 0) // Ignore OOTPU; would be better to not to hardcode?
1846  continue;
1847  tvKeyToIndex[i] = tvRefs.size();
1848  tvRefs.push_back(TrackingVertexRef(htv, i));
1849  }
1850 
1851  //get association maps, etc.
1852  Handle<ClusterTPAssociation> pCluster2TPListH;
1853  iEvent.getByToken(clusterTPMapToken_, pCluster2TPListH);
1854  const ClusterTPAssociation& clusterToTPMap = *pCluster2TPListH;
1856  iEvent.getByToken(simHitTPMapToken_, simHitsTPAssoc);
1857 
1858  // SimHit key -> index mapping
1859  SimHitRefKeyToIndex simHitRefKeyToIndex;
1860 
1861  //make a list to link TrackingParticles to its simhits
1862  std::vector<TPHitIndex> tpHitList;
1863 
1864  std::set<edm::ProductID> hitProductIds;
1865  std::map<edm::ProductID, size_t> seedCollToOffset;
1866 
1867  ev_run = iEvent.id().run();
1868  ev_lumi = iEvent.id().luminosityBlock();
1869  ev_event = iEvent.id().event();
1870 
1871  // Digi->Sim links for pixels and strips
1872  edm::Handle<edm::DetSetVector<PixelDigiSimLink> > pixelDigiSimLinksHandle;
1873  iEvent.getByToken(pixelSimLinkToken_, pixelDigiSimLinksHandle);
1874  const auto& pixelDigiSimLinks = *pixelDigiSimLinksHandle;
1875 
1876  edm::Handle<edm::DetSetVector<StripDigiSimLink> > stripDigiSimLinksHandle;
1877  iEvent.getByToken(stripSimLinkToken_, stripDigiSimLinksHandle);
1878 
1879  // Phase2 OT DigiSimLink
1880  edm::Handle<edm::DetSetVector<PixelDigiSimLink> > siphase2OTSimLinksHandle;
1881  iEvent.getByToken(siphase2OTSimLinksToken_, siphase2OTSimLinksHandle);
1882 
1883  //beamspot
1884  Handle<reco::BeamSpot> recoBeamSpotHandle;
1885  iEvent.getByToken(beamSpotToken_, recoBeamSpotHandle);
1886  BeamSpot const & bs = *recoBeamSpotHandle;
1887  fillBeamSpot(bs);
1888 
1889 
1890  //prapare list to link matched hits to collection
1891  vector<pair<int,int> > monoStereoClusterList;
1892  if(includeAllHits_) {
1893  // simhits
1894  fillSimHits(tracker, tpKeyToIndex, *simHitsTPAssoc, tTopo, simHitRefKeyToIndex, tpHitList);
1895 
1896  //pixel hits
1897  fillPixelHits(iEvent, clusterToTPMap, tpKeyToIndex, *simHitsTPAssoc, pixelDigiSimLinks, *theTTRHBuilder, tTopo, simHitRefKeyToIndex, hitProductIds);
1898 
1899  //strip hits
1900  if(includeStripHits_){
1901  LogDebug("TrackingNtuple") << "foundStripSimLink" ;
1902  const auto& stripDigiSimLinks = *stripDigiSimLinksHandle;
1903  fillStripRphiStereoHits(iEvent, clusterToTPMap, tpKeyToIndex, *simHitsTPAssoc, stripDigiSimLinks, *theTTRHBuilder, tTopo, simHitRefKeyToIndex, hitProductIds);
1904 
1905  //matched hits
1906  fillStripMatchedHits(iEvent, *theTTRHBuilder, tTopo, monoStereoClusterList);
1907  }
1908 
1910  LogDebug("TrackingNtuple") << "foundPhase2OTSimLinks" ;
1911  const auto& phase2OTSimLinks = *siphase2OTSimLinksHandle;
1912  fillPhase2OTHits(iEvent, clusterToTPMap, tpKeyToIndex, *simHitsTPAssoc, phase2OTSimLinks, *theTTRHBuilder, tTopo, simHitRefKeyToIndex, hitProductIds);
1913  }
1914  }
1915 
1916  //seeds
1917  if(includeSeeds_) {
1918  fillSeeds(iEvent, tpCollection, tpKeyToIndex, bs, associatorByHits, *theTTRHBuilder, theMF.product(), monoStereoClusterList, hitProductIds, seedCollToOffset);
1919  }
1920 
1921  //tracks
1922  edm::Handle<edm::View<reco::Track> > tracksHandle;
1923  iEvent.getByToken(trackToken_, tracksHandle);
1924  const edm::View<reco::Track>& tracks = *tracksHandle;
1925  // The associator interfaces really need to be fixed...
1927  for(edm::View<Track>::size_type i=0; i<tracks.size(); ++i) {
1928  trackRefs.push_back(tracks.refAt(i));
1929  }
1930  std::vector<const MVACollection *> mvaColls;
1931  std::vector<const QualityMaskCollection *> qualColls;
1932  if(includeMVA_) {
1935 
1936  for(const auto& tokenTpl: mvaQualityCollectionTokens_) {
1937  iEvent.getByToken(std::get<0>(tokenTpl), hmva);
1938  iEvent.getByToken(std::get<1>(tokenTpl), hqual);
1939 
1940  mvaColls.push_back(hmva.product());
1941  qualColls.push_back(hqual.product());
1942  if(mvaColls.back()->size() != tracks.size()) {
1943  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.";
1944  }
1945  if(qualColls.back()->size() != tracks.size()) {
1946  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.";
1947  }
1948  }
1949  }
1950 
1952  iEvent.getByToken(vertexToken_, vertices);
1953 
1954  fillTracks(trackRefs, tpCollection, tpKeyToIndex, bs, *vertices, associatorByHits, *theTTRHBuilder, tTopo, hitProductIds, seedCollToOffset, mvaColls, qualColls);
1955 
1956  //tracking particles
1957  //sort association maps with simHits
1958  std::sort( tpHitList.begin(), tpHitList.end(), tpHitIndexListLessSort );
1959  fillTrackingParticles(iEvent, iSetup, trackRefs, bs, tpCollection, tvKeyToIndex, associatorByHits, tpHitList);
1960 
1961  // vertices
1962  fillVertices(*vertices, trackRefs);
1963 
1964  // tracking vertices
1965  fillTrackingVertices(tvRefs, tpKeyToIndex);
1966 
1967  t->Fill();
1968 
1969 }
#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)
std::unordered_map< reco::RecoToSimCollection::index_type, size_t > TrackingParticleRefKeyToIndex
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:508
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)
TrackingParticleRefKeyToIndex TrackingVertexRefKeyToIndex
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_
void fillTracks(const edm::RefToBaseVector< reco::Track > &tracks, const TrackingParticleRefVector &tpCollection, const TrackingParticleRefKeyToIndex &tpKeyToIndex, const reco::BeamSpot &bs, const reco::VertexCollection &vertices, const reco::TrackToTrackingParticleAssociator &associatorByHits, 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)
RefToBase< value_type > refAt(size_type i) const
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)
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
edm::EDGetTokenT< TrackingVertexCollection > trackingVertexToken_
static bool tpHitIndexListLessSort(const TPHitIndex &i, const TPHitIndex &j)
const bool includeSeeds_
void fillSimHits(const TrackerGeometry &tracker, const TrackingParticleRefKeyToIndex &tpKeyToIndex, const SimHitTPAssociationProducer::SimHitTPAssociationList &simHitsTPAssoc, const TrackerTopology &tTopo, SimHitRefKeyToIndex &simHitRefKeyToIndex, std::vector< TPHitIndex > &tpHitList)
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:81
const bool includeMVA_
std::vector< TrackingVertex > TrackingVertexCollection
const T & get() const
Definition: EventSetup.h:55
const bool includeAllHits_
edm::EventID id() const
Definition: EventBase.h:60
const EncodedEventId & eventId() const
edm::EDGetTokenT< ClusterTPAssociation > clusterTPMapToken_
fixed size matrix
HLT enums.
void push_back(const RefToBase< T > &)
std::map< SimHitFullKey, size_t > SimHitRefKeyToIndex
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:73
void fillVertices(const reco::VertexCollection &vertices, const edm::RefToBaseVector< reco::Track > &tracks)
std::unordered_set< reco::RecoToSimCollection::index_type > TrackingParticleRefKeySet
T const * product() const
Definition: ESHandle.h:86
edm::Ref< TrackingParticleCollection > TrackingParticleRef
void fillSeeds(const edm::Event &iEvent, const TrackingParticleRefVector &tpCollection, const TrackingParticleRefKeyToIndex &tpKeyToIndex, const reco::BeamSpot &bs, const reco::TrackToTrackingParticleAssociator &associatorByHits, const TransientTrackingRecHitBuilder &theTTRHBuilder, const MagneticField *theMF, const std::vector< std::pair< int, int > > &monoStereoClusterList, const std::set< edm::ProductID > &hitProductIds, std::map< edm::ProductID, size_t > &seedToCollIndex)
edm::EDGetTokenT< edm::DetSetVector< StripDigiSimLink > > stripSimLinkToken_
void TrackingNtuple::clearVariables ( )
private

Definition at line 1507 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_chi2, see_dxy, see_dxyErr, see_dz, see_dzErr, see_eta, see_etaErr, see_fitok, see_hitIdx, see_hitType, see_nCands, 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_shareFrac, see_simTrkIdx, 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_nStrip, 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_shareFrac, sim_simHitIdx, sim_trkIdx, 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_hitIdx, trk_hitType, trk_isHP, trk_isTrue, trk_seedIdx, trk_shareFrac, trk_simTrkIdx, 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().

1507  {
1508 
1509  ev_run = 0;
1510  ev_lumi = 0;
1511  ev_event = 0;
1512 
1513  //tracks
1514  trk_px .clear();
1515  trk_py .clear();
1516  trk_pz .clear();
1517  trk_pt .clear();
1518  trk_inner_px .clear();
1519  trk_inner_py .clear();
1520  trk_inner_pz .clear();
1521  trk_inner_pt .clear();
1522  trk_outer_px .clear();
1523  trk_outer_py .clear();
1524  trk_outer_pz .clear();
1525  trk_outer_pt .clear();
1526  trk_eta .clear();
1527  trk_lambda .clear();
1528  trk_cotTheta .clear();
1529  trk_phi .clear();
1530  trk_dxy .clear();
1531  trk_dz .clear();
1532  trk_dxyPV .clear();
1533  trk_dzPV .clear();
1534  trk_dxyClosestPV.clear();
1535  trk_dzClosestPV.clear();
1536  trk_ptErr .clear();
1537  trk_etaErr .clear();
1538  trk_lambdaErr.clear();
1539  trk_phiErr .clear();
1540  trk_dxyErr .clear();
1541  trk_dzErr .clear();
1542  trk_refpoint_x.clear();
1543  trk_refpoint_y.clear();
1544  trk_refpoint_z.clear();
1545  trk_nChi2 .clear();
1546  trk_nChi2_1Dmod.clear();
1547  trk_ndof .clear();
1548  for(auto& mva: trk_mvas) {
1549  mva.clear();
1550  }
1551  for(auto& mask: trk_qualityMasks) {
1552  mask.clear();
1553  }
1554  trk_q .clear();
1555  trk_nValid .clear();
1556  trk_nInvalid .clear();
1557  trk_nPixel .clear();
1558  trk_nStrip .clear();
1559  trk_nOuterLost.clear();
1560  trk_nInnerLost.clear();
1561  trk_nPixelLay.clear();
1562  trk_nStripLay.clear();
1563  trk_n3DLay .clear();
1564  trk_nLostLay .clear();
1565  trk_algo .clear();
1566  trk_originalAlgo.clear();
1567  trk_algoMask .clear();
1568  trk_stopReason.clear();
1569  trk_isHP .clear();
1570  trk_seedIdx .clear();
1571  trk_vtxIdx .clear();
1572  trk_isTrue .clear();
1573  trk_shareFrac.clear();
1574  trk_simTrkIdx.clear();
1575  trk_hitIdx .clear();
1576  trk_hitType .clear();
1577  //sim tracks
1578  sim_event .clear();
1579  sim_bunchCrossing.clear();
1580  sim_pdgId .clear();
1581  sim_genPdgIds.clear();
1582  sim_isFromBHadron.clear();
1583  sim_px .clear();
1584  sim_py .clear();
1585  sim_pz .clear();
1586  sim_pt .clear();
1587  sim_eta .clear();
1588  sim_phi .clear();
1589  sim_pca_pt .clear();
1590  sim_pca_eta .clear();
1591  sim_pca_lambda.clear();
1592  sim_pca_cotTheta.clear();
1593  sim_pca_phi .clear();
1594  sim_pca_dxy .clear();
1595  sim_pca_dz .clear();
1596  sim_q .clear();
1597  sim_nValid .clear();
1598  sim_nPixel .clear();
1599  sim_nStrip .clear();
1600  sim_nLay .clear();
1601  sim_nPixelLay.clear();
1602  sim_n3DLay .clear();
1603  sim_trkIdx .clear();
1604  sim_seedIdx .clear();
1605  sim_shareFrac.clear();
1606  sim_parentVtxIdx.clear();
1607  sim_decayVtxIdx.clear();
1608  sim_simHitIdx .clear();
1609  //pixels
1610  pix_isBarrel .clear();
1611  pix_detId .clear();
1612  pix_trkIdx .clear();
1613  pix_seeIdx .clear();
1614  pix_simHitIdx.clear();
1615  pix_chargeFraction.clear();
1616  pix_simType.clear();
1617  pix_x .clear();
1618  pix_y .clear();
1619  pix_z .clear();
1620  pix_xx .clear();
1621  pix_xy .clear();
1622  pix_yy .clear();
1623  pix_yz .clear();
1624  pix_zz .clear();
1625  pix_zx .clear();
1626  pix_radL .clear();
1627  pix_bbxi .clear();
1628  //strips
1629  str_isBarrel .clear();
1630  str_detId .clear();
1631  str_trkIdx .clear();
1632  str_seeIdx .clear();
1633  str_simHitIdx.clear();
1634  str_chargeFraction.clear();
1635  str_simType.clear();
1636  str_x .clear();
1637  str_y .clear();
1638  str_z .clear();
1639  str_xx .clear();
1640  str_xy .clear();
1641  str_yy .clear();
1642  str_yz .clear();
1643  str_zz .clear();
1644  str_zx .clear();
1645  str_radL .clear();
1646  str_bbxi .clear();
1647  //matched hits
1648  glu_isBarrel .clear();
1649  glu_detId .clear();
1650  glu_monoIdx .clear();
1651  glu_stereoIdx.clear();
1652  glu_seeIdx .clear();
1653  glu_x .clear();
1654  glu_y .clear();
1655  glu_z .clear();
1656  glu_xx .clear();
1657  glu_xy .clear();
1658  glu_yy .clear();
1659  glu_yz .clear();
1660  glu_zz .clear();
1661  glu_zx .clear();
1662  glu_radL .clear();
1663  glu_bbxi .clear();
1664  //phase2 OT
1665  ph2_isBarrel .clear();
1666  ph2_detId .clear();
1667  ph2_trkIdx .clear();
1668  ph2_seeIdx .clear();
1669  ph2_simHitIdx.clear();
1670  ph2_simType.clear();
1671  ph2_x .clear();
1672  ph2_y .clear();
1673  ph2_z .clear();
1674  ph2_xx .clear();
1675  ph2_xy .clear();
1676  ph2_yy .clear();
1677  ph2_yz .clear();
1678  ph2_zz .clear();
1679  ph2_zx .clear();
1680  ph2_radL .clear();
1681  ph2_bbxi .clear();
1682  //invalid hits
1683  inv_isBarrel .clear();
1684  inv_detId .clear();
1685  inv_detId_phase2.clear();
1686  inv_type .clear();
1687  // simhits
1688  simhit_detId.clear();
1689  simhit_detId_phase2.clear();
1690  simhit_x.clear();
1691  simhit_y.clear();
1692  simhit_z.clear();
1693  simhit_particle.clear();
1694  simhit_process.clear();
1695  simhit_eloss.clear();
1696  simhit_tof.clear();
1697  //simhit_simTrackId.clear();
1698  simhit_simTrkIdx.clear();
1699  simhit_hitIdx.clear();
1700  simhit_hitType.clear();
1701  //beamspot
1702  bsp_x = -9999.;
1703  bsp_y = -9999.;
1704  bsp_z = -9999.;
1705  bsp_sigmax = -9999.;
1706  bsp_sigmay = -9999.;
1707  bsp_sigmaz = -9999.;
1708  //seeds
1709  see_fitok .clear();
1710  see_px .clear();
1711  see_py .clear();
1712  see_pz .clear();
1713  see_pt .clear();
1714  see_eta .clear();
1715  see_phi .clear();
1716  see_dxy .clear();
1717  see_dz .clear();
1718  see_ptErr .clear();
1719  see_etaErr .clear();
1720  see_phiErr .clear();
1721  see_dxyErr .clear();
1722  see_dzErr .clear();
1723  see_chi2 .clear();
1724  see_statePt.clear();
1725  see_stateTrajX.clear();
1726  see_stateTrajY.clear();
1727  see_stateTrajPx.clear();
1728  see_stateTrajPy.clear();
1729  see_stateTrajPz.clear();
1730  see_q .clear();
1731  see_nValid .clear();
1732  see_nPixel .clear();
1733  see_nGlued .clear();
1734  see_nStrip .clear();
1735  see_nPhase2OT.clear();
1736  see_algo .clear();
1737  see_stopReason.clear();
1738  see_nCands .clear();
1739  see_trkIdx .clear();
1741  see_shareFrac.clear();
1742  see_simTrkIdx.clear();
1743  }
1744  see_hitIdx .clear();
1745  see_hitType .clear();
1746  //seed algo offset
1747  see_offset.clear();
1748 
1749  // vertices
1750  vtx_x.clear();
1751  vtx_y.clear();
1752  vtx_z.clear();
1753  vtx_xErr.clear();
1754  vtx_yErr.clear();
1755  vtx_zErr.clear();
1756  vtx_ndof.clear();
1757  vtx_chi2.clear();
1758  vtx_fake.clear();
1759  vtx_valid.clear();
1760  vtx_trkIdx.clear();
1761 
1762  // Tracking vertices
1763  simvtx_event.clear();
1764  simvtx_bunchCrossing.clear();
1765  simvtx_x.clear();
1766  simvtx_y.clear();
1767  simvtx_z.clear();
1768  simvtx_sourceSimIdx.clear();
1769  simvtx_daughterSimIdx.clear();
1770  simpv_idx.clear();
1771 }
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< short > see_fitok
std::vector< short > vtx_fake
std::vector< float > simvtx_z
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< 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< 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
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< 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< std::vector< float > > sim_shareFrac
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 > > 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 > see_etaErr
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< 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< float > ph2_y
std::vector< std::vector< int > > simvtx_sourceSimIdx
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< float > ph2_xy
std::vector< float > vtx_y
std::vector< float > pix_z
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< 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 > 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
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< 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< std::vector< float > > trk_shareFrac
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< std::vector< int > > trk_hitIdx
std::vector< std::vector< float > > see_shareFrac
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< 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< unsigned int > trk_nInvalid
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< float > trk_inner_px
DetIdStrip glu_detId
std::vector< float > vtx_zErr
std::vector< float > simhit_eloss
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 1971 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().

1971  {
1972  bsp_x = bs.x0();
1973  bsp_y = bs.y0();
1974  bsp_z = bs.x0();
1975  bsp_sigmax = bs.BeamWidthX();
1976  bsp_sigmay = bs.BeamWidthY();
1977  bsp_sigmaz = bs.sigmaZ();
1978 }
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 3180 of file TrackingNtuple.cc.

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

3180  {
3181  //The following says we do not know what parameters are allowed so do no validation
3182  // Please change this to state exactly what you do use, even if it is no parameters
3184  desc.addUntracked<std::vector<edm::InputTag> >("seedTracks", std::vector<edm::InputTag>{
3185  edm::InputTag("seedTracksinitialStepSeeds"),
3186  edm::InputTag("seedTracksdetachedTripletStepSeeds"),
3187  edm::InputTag("seedTrackspixelPairStepSeeds"),
3188  edm::InputTag("seedTrackslowPtTripletStepSeeds"),
3189  edm::InputTag("seedTracksmixedTripletStepSeeds"),
3190  edm::InputTag("seedTrackspixelLessStepSeeds"),
3191  edm::InputTag("seedTrackstobTecStepSeeds"),
3192  edm::InputTag("seedTracksjetCoreRegionalStepSeeds"),
3193  edm::InputTag("seedTracksmuonSeededSeedsInOut"),
3194  edm::InputTag("seedTracksmuonSeededSeedsOutIn")
3195  });
3196  desc.addUntracked<std::vector<edm::InputTag> >("trackCandidates", std::vector<edm::InputTag>{
3197  edm::InputTag("initialStepTrackCandidates"),
3198  edm::InputTag("detachedTripletStepTrackCandidates"),
3199  edm::InputTag("pixelPairStepTrackCandidates"),
3200  edm::InputTag("lowPtTripletStepTrackCandidates"),
3201  edm::InputTag("mixedTripletStepTrackCandidates"),
3202  edm::InputTag("pixelLessStepTrackCandidates"),
3203  edm::InputTag("tobTecStepTrackCandidates"),
3204  edm::InputTag("jetCoreRegionalStepTrackCandidates"),
3205  edm::InputTag("muonSeededTrackCandidatesInOut"),
3206  edm::InputTag("muonSeededTrackCandidatesOutIn")
3207  });
3208  desc.addUntracked<edm::InputTag>("tracks", edm::InputTag("generalTracks"));
3209  desc.addUntracked<std::vector<std::string> >("trackMVAs", std::vector<std::string>{{"generalTracks"}});
3210  desc.addUntracked<edm::InputTag>("trackingParticles", edm::InputTag("mix", "MergedTrackTruth"));
3211  desc.addUntracked<bool>("trackingParticlesRef", false);
3212  desc.addUntracked<edm::InputTag>("clusterTPMap", edm::InputTag("tpClusterProducer"));
3213  desc.addUntracked<edm::InputTag>("simHitTPMap", edm::InputTag("simHitTPAssocProducer"));
3214  desc.addUntracked<edm::InputTag>("trackAssociator", edm::InputTag("quickTrackAssociatorByHits"));
3215  desc.addUntracked<edm::InputTag>("pixelDigiSimLink", edm::InputTag("simSiPixelDigis"));
3216  desc.addUntracked<edm::InputTag>("stripDigiSimLink", edm::InputTag("simSiStripDigis"));
3217  desc.addUntracked<edm::InputTag>("phase2OTSimLink", edm::InputTag(""));
3218  desc.addUntracked<edm::InputTag>("beamSpot", edm::InputTag("offlineBeamSpot"));
3219  desc.addUntracked<edm::InputTag>("pixelRecHits", edm::InputTag("siPixelRecHits"));
3220  desc.addUntracked<edm::InputTag>("stripRphiRecHits", edm::InputTag("siStripMatchedRecHits", "rphiRecHit"));
3221  desc.addUntracked<edm::InputTag>("stripStereoRecHits", edm::InputTag("siStripMatchedRecHits", "stereoRecHit"));
3222  desc.addUntracked<edm::InputTag>("stripMatchedRecHits", edm::InputTag("siStripMatchedRecHits", "matchedRecHit"));
3223  desc.addUntracked<edm::InputTag>("phase2OTRecHits", edm::InputTag("siPhase2RecHits"));
3224  desc.addUntracked<edm::InputTag>("vertices", edm::InputTag("offlinePrimaryVertices"));
3225  desc.addUntracked<edm::InputTag>("trackingVertices", edm::InputTag("mix", "MergedTrackTruth"));
3226  desc.addUntracked<edm::InputTag>("trackingParticleNlayers", edm::InputTag("trackingParticleNumberOfLayersProducer", "trackerLayers"));
3227  desc.addUntracked<edm::InputTag>("trackingParticleNpixellayers", edm::InputTag("trackingParticleNumberOfLayersProducer", "pixelLayers"));
3228  desc.addUntracked<edm::InputTag>("trackingParticleNstripstereolayers", edm::InputTag("trackingParticleNumberOfLayersProducer", "stripStereoLayers"));
3229  desc.addUntracked<std::string>("TTRHBuilder", "WithTrackAngle");
3230  desc.addUntracked<std::string>("parametersDefiner", "LhcParametersDefinerForTP");
3231  desc.addUntracked<bool>("includeSeeds", false);
3232  desc.addUntracked<bool>("includeAllHits", false);
3233  desc.addUntracked<bool>("includeMVA", true);
3234  desc.addUntracked<bool>("includeTrackingParticles", true);
3235  descriptions.add("trackingNtuple",desc);
3236 }
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 2381 of file TrackingNtuple.cc.

References edmNew::DetSetVector< T >::begin(), TransientTrackingRecHitBuilder::build(), TrackingNtuple::SimHitData::bunchCrossing, edmNew::DetSetVector< T >::end(), TrackingNtuple::SimHitData::event, edm::Event::getByToken(), hit::id, 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().

2390  {
2392  iEvent.getByToken(phase2OTRecHitToken_, phase2OTHits);
2393  for (auto it = phase2OTHits->begin(); it!=phase2OTHits->end(); it++ ) {
2394  const DetId hitId = it->detId();
2395  for (auto hit = it->begin(); hit!=it->end(); hit++ ) {
2396  TransientTrackingRecHit::RecHitPointer ttrh = theTTRHBuilder.build(&*hit);
2397 
2398  hitProductIds.insert(hit->cluster().id());
2399 
2400  const int key = hit->cluster().key();
2401  const int lay = tTopo.layer(hitId);
2402  SimHitData simHitData = matchCluster(hit->firstClusterRef(), hitId, key, ttrh,
2403  clusterToTPMap, tpKeyToIndex, simHitsTPAssoc, digiSimLink, simHitRefKeyToIndex, HitType::Phase2OT);
2404 
2405  ph2_isBarrel .push_back( hitId.subdetId()==1 );
2406  ph2_detId .push_back( tTopo, hitId );
2407  ph2_trkIdx .emplace_back(); // filled in fillTracks
2408  ph2_seeIdx .emplace_back(); // filled in fillSeeds
2409  ph2_simHitIdx.push_back( simHitData.matchingSimHit );
2410  ph2_simType.push_back( static_cast<int>(simHitData.type) );
2411  ph2_x .push_back( ttrh->globalPosition().x() );
2412  ph2_y .push_back( ttrh->globalPosition().y() );
2413  ph2_z .push_back( ttrh->globalPosition().z() );
2414  ph2_xx .push_back( ttrh->globalPositionError().cxx() );
2415  ph2_xy .push_back( ttrh->globalPositionError().cyx() );
2416  ph2_yy .push_back( ttrh->globalPositionError().cyy() );
2417  ph2_yz .push_back( ttrh->globalPositionError().czy() );
2418  ph2_zz .push_back( ttrh->globalPositionError().czz() );
2419  ph2_zx .push_back( ttrh->globalPositionError().czx() );
2420  ph2_radL .push_back( ttrh->surface()->mediumProperties().radLen() );
2421  ph2_bbxi .push_back( ttrh->surface()->mediumProperties().xi() );
2422 
2423  LogTrace("TrackingNtuple") << "phase2 OT cluster=" << key
2424  << " subdId=" << hitId.subdetId()
2425  << " lay=" << lay
2426  << " rawId=" << hitId.rawId()
2427  << " pos =" << ttrh->globalPosition()
2428  << " nMatchingSimHit=" << simHitData.matchingSimHit.size();
2429 
2430  if(!simHitData.matchingSimHit.empty()) {
2431  const auto simHitIdx = simHitData.matchingSimHit[0];
2432  LogTrace("TrackingNtuple") << " firstMatchingSimHit=" << simHitIdx
2433  << " simHitPos=" << GlobalPoint(simhit_x[simHitIdx], simhit_y[simHitIdx], simhit_z[simHitIdx])
2434  << " energyLoss=" << simhit_eloss[simHitIdx]
2435  << " particleType=" << simhit_particle[simHitIdx]
2436  << " processType=" << simhit_process[simHitIdx]
2437  << " bunchCrossing=" << simHitData.bunchCrossing[0]
2438  << " event=" << simHitData.event[0];
2439  }
2440  }
2441  }
2442 }
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:508
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
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
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
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
std::vector< std::vector< int > > ph2_simHitIdx
DetIdPhase2OT ph2_detId
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:37
#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 2190 of file TrackingNtuple.cc.

References edmNew::DetSetVector< T >::begin(), TransientTrackingRecHitBuilder::build(), TrackingNtuple::SimHitData::bunchCrossing, TrackingNtuple::SimHitData::chargeFraction, edmNew::DetSetVector< T >::end(), TrackingNtuple::SimHitData::event, edm::Event::getByToken(), hit::id, 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().

2199  {
2201  iEvent.getByToken(pixelRecHitToken_, pixelHits);
2202  for (auto it = pixelHits->begin(); it!=pixelHits->end(); it++ ) {
2203  const DetId hitId = it->detId();
2204  for (auto hit = it->begin(); hit!=it->end(); hit++ ) {
2205  TransientTrackingRecHit::RecHitPointer ttrh = theTTRHBuilder.build(&*hit);
2206 
2207  hitProductIds.insert(hit->cluster().id());
2208 
2209  const int key = hit->cluster().key();
2210  const int lay = tTopo.layer(hitId);
2211  SimHitData simHitData = matchCluster(hit->firstClusterRef(), hitId, key, ttrh,
2212  clusterToTPMap, tpKeyToIndex, simHitsTPAssoc, digiSimLink, simHitRefKeyToIndex, HitType::Pixel);
2213 
2214  pix_isBarrel .push_back( hitId.subdetId()==1 );
2215  pix_detId .push_back( tTopo, hitId );
2216  pix_trkIdx .emplace_back(); // filled in fillTracks
2217  pix_seeIdx .emplace_back(); // filled in fillSeeds
2218  pix_simHitIdx.push_back( simHitData.matchingSimHit );
2219  pix_simType.push_back( static_cast<int>(simHitData.type) );
2220  pix_x .push_back( ttrh->globalPosition().x() );
2221  pix_y .push_back( ttrh->globalPosition().y() );
2222  pix_z .push_back( ttrh->globalPosition().z() );
2223  pix_xx .push_back( ttrh->globalPositionError().cxx() );
2224  pix_xy .push_back( ttrh->globalPositionError().cyx() );
2225  pix_yy .push_back( ttrh->globalPositionError().cyy() );
2226  pix_yz .push_back( ttrh->globalPositionError().czy() );
2227  pix_zz .push_back( ttrh->globalPositionError().czz() );
2228  pix_zx .push_back( ttrh->globalPositionError().czx() );
2229  pix_chargeFraction.push_back( simHitData.chargeFraction );
2230  pix_radL .push_back( ttrh->surface()->mediumProperties().radLen() );
2231  pix_bbxi .push_back( ttrh->surface()->mediumProperties().xi() );
2232  LogTrace("TrackingNtuple") << "pixHit cluster=" << key
2233  << " subdId=" << hitId.subdetId()
2234  << " lay=" << lay
2235  << " rawId=" << hitId.rawId()
2236  << " pos =" << ttrh->globalPosition()
2237  << " nMatchingSimHit=" << simHitData.matchingSimHit.size();
2238  if(!simHitData.matchingSimHit.empty()) {
2239  const auto simHitIdx = simHitData.matchingSimHit[0];
2240  LogTrace("TrackingNtuple") << " firstMatchingSimHit=" << simHitIdx
2241  << " simHitPos=" << GlobalPoint(simhit_x[simHitIdx], simhit_y[simHitIdx], simhit_z[simHitIdx])
2242  << " energyLoss=" << simhit_eloss[simHitIdx]
2243  << " particleType=" << simhit_particle[simHitIdx]
2244  << " processType=" << simhit_process[simHitIdx]
2245  << " bunchCrossing=" << simHitData.bunchCrossing[0]
2246  << " event=" << simHitData.event[0];
2247  }
2248  }
2249  }
2250 }
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:508
std::vector< unsigned short > pix_simType
std::vector< float > pix_zx
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
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
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
std::vector< float > simhit_z
edm::EDGetTokenT< SiPixelRecHitCollection > pixelRecHitToken_
std::vector< short > pix_isBarrel
std::vector< float > pix_z
std::vector< float > pix_yz
std::vector< std::vector< float > > pix_chargeFraction
std::vector< std::vector< int > > pix_trkIdx
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:37
#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 TransientTrackingRecHitBuilder theTTRHBuilder,
const MagneticField theMF,
const 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 2445 of file TrackingNtuple.cc.

References 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, mps_fire::i, triggerObjects_cff::id, OmniClusterRef::id(), createfilelist::int, trackerHitRTTI::isMatched(), OmniClusterRef::key(), edm::Ref< C, T, F >::key(), diffTwoXMLs::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_chi2, see_dxy, see_dxyErr, see_dz, see_dzErr, see_eta, see_etaErr, see_fitok, see_hitIdx, see_hitType, see_isTrue, see_nCands, 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_shareFrac, see_simTrkIdx, 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().

2455  {
2456  TSCBLBuilderNoMaterial tscblBuilder;
2457  for(size_t iColl=0; iColl < seedTokens_.size(); ++iColl) {
2458  const auto& seedToken = seedTokens_[iColl];
2459 
2460  edm::Handle<edm::View<reco::Track> > seedTracksHandle;
2461  iEvent.getByToken(seedToken, seedTracksHandle);
2462  const auto& seedTracks = *seedTracksHandle;
2463 
2464  if(seedTracks.empty())
2465  continue;
2466 
2468  labelsForToken(seedToken, labels);
2469 
2470  const auto& seedStopInfoToken = seedStopInfoTokens_[iColl];
2471  edm::Handle<std::vector<SeedStopInfo> > seedStopInfoHandle;
2472  iEvent.getByToken(seedStopInfoToken, seedStopInfoHandle);
2473  const auto& seedStopInfos = *seedStopInfoHandle;
2474  if(seedTracks.size() != seedStopInfos.size()) {
2476  labelsForToken(seedStopInfoToken, labels2);
2477 
2478  throw cms::Exception("LogicError") << "Got " << seedTracks.size() << " seeds, but " << seedStopInfos.size() << " seed stopping infos for collections " << labels.module << ", " << labels2.module;
2479  }
2480 
2481  // The associator interfaces really need to be fixed...
2482  edm::RefToBaseVector<reco::Track> seedTrackRefs;
2483  for(edm::View<reco::Track>::size_type i=0; i<seedTracks.size(); ++i) {
2484  seedTrackRefs.push_back(seedTracks.refAt(i));
2485  }
2486  reco::RecoToSimCollection recSimColl = associatorByHits.associateRecoToSim(seedTrackRefs, tpCollection);
2487  reco::SimToRecoCollection simRecColl = associatorByHits.associateSimToReco(seedTrackRefs, tpCollection);
2488 
2489  TString label = labels.module;
2490  //format label to match algoName
2491  label.ReplaceAll("seedTracks", "");
2492  label.ReplaceAll("Seeds","");
2493  label.ReplaceAll("muonSeeded","muonSeededStep");
2494  int algo = reco::TrackBase::algoByName(label.Data());
2495 
2496  edm::ProductID id = seedTracks[0].seedRef().id();
2497  const auto offset = see_fitok.size();
2498  auto inserted = seedCollToOffset.emplace(id, offset);
2499  if(!inserted.second)
2500  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.";
2501  see_offset.push_back(offset);
2502 
2503  LogTrace("TrackingNtuple") << "NEW SEED LABEL: " << label << " size: " << seedTracks.size() << " algo=" << algo
2504  << " ProductID " << id;
2505 
2506  for(size_t iSeed=0; iSeed < seedTrackRefs.size(); ++iSeed) {
2507  const auto& seedTrackRef = seedTrackRefs[iSeed];
2508  const auto& seedTrack = *seedTrackRef;
2509  const auto& seedRef = seedTrack.seedRef();
2510  const auto& seed = *seedRef;
2511 
2512  const auto seedStopInfo = seedStopInfos[iSeed];
2513 
2514  if(seedRef.id() != id)
2515  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 << ".";
2516 
2517  std::vector<float> sharedFraction;
2518  std::vector<int> tpIdx;
2519  auto foundTPs = recSimColl.find(seedTrackRef);
2520  if (foundTPs != recSimColl.end()) {
2521  for(const auto tpQuality: foundTPs->val) {
2522  sharedFraction.push_back(tpQuality.second);
2523  tpIdx.push_back( tpKeyToIndex.at( tpQuality.first.key() ) );
2524  }
2525  }
2526 
2527 
2528  const bool seedFitOk = !trackFromSeedFitFailed(seedTrack);
2529  const int charge = seedTrack.charge();
2530  const float pt = seedFitOk ? seedTrack.pt() : 0;
2531  const float eta = seedFitOk ? seedTrack.eta() : 0;
2532  const float phi = seedFitOk ? seedTrack.phi() : 0;
2533  const int nHits = seedTrack.numberOfValidHits();
2534 
2535  const auto seedIndex = see_fitok.size();
2536 
2537  see_fitok .push_back(seedFitOk);
2538 
2539  see_px .push_back( seedFitOk ? seedTrack.px() : 0 );
2540  see_py .push_back( seedFitOk ? seedTrack.py() : 0 );
2541  see_pz .push_back( seedFitOk ? seedTrack.pz() : 0 );
2542  see_pt .push_back( pt );
2543  see_eta .push_back( eta );
2544  see_phi .push_back( phi );
2545  see_q .push_back( charge );
2546  see_nValid .push_back( nHits );
2547 
2548  see_dxy .push_back( seedFitOk ? seedTrack.dxy(bs.position()) : 0);
2549  see_dz .push_back( seedFitOk ? seedTrack.dz(bs.position()) : 0);
2550  see_ptErr .push_back( seedFitOk ? seedTrack.ptError() : 0);
2551  see_etaErr .push_back( seedFitOk ? seedTrack.etaError() : 0);
2552  see_phiErr .push_back( seedFitOk ? seedTrack.phiError() : 0);
2553  see_dxyErr .push_back( seedFitOk ? seedTrack.dxyError() : 0);
2554  see_dzErr .push_back( seedFitOk ? seedTrack.dzError() : 0);
2555  see_algo .push_back( algo );
2556  see_stopReason.push_back( seedStopInfo.stopReasonUC() );
2557  see_nCands .push_back( seedStopInfo.candidatesPerSeed() );
2558 
2559  const auto& state = seedTrack.seedRef()->startingState();
2560  const auto& pos = state.parameters().position();
2561  const auto& mom = state.parameters().momentum();
2562  see_statePt.push_back(state.pt());
2563  see_stateTrajX.push_back(pos.x());
2564  see_stateTrajY.push_back(pos.y());
2565  see_stateTrajPx.push_back(mom.x());
2566  see_stateTrajPy.push_back(mom.y());
2567  see_stateTrajPz.push_back(mom.z());
2568 
2569  see_trkIdx .push_back(-1); // to be set correctly in fillTracks
2571  see_shareFrac.push_back( sharedFraction );
2572  see_simTrkIdx.push_back( tpIdx );
2573  }
2574  else {
2575  see_isTrue.push_back(!tpIdx.empty());
2576  }
2577 
2579  /*
2580  TransientTrackingRecHit::RecHitPointer lastRecHit = theTTRHBuilder.build(&*(seed.recHits().second-1));
2581  TrajectoryStateOnSurface state = trajectoryStateTransform::transientState( itSeed->startingState(), lastRecHit->surface(), theMF);
2582  float pt = state.globalParameters().momentum().perp();
2583  float eta = state.globalParameters().momentum().eta();
2584  float phi = state.globalParameters().momentum().phi();
2585  see_px .push_back( state.globalParameters().momentum().x() );
2586  see_py .push_back( state.globalParameters().momentum().y() );
2587  see_pz .push_back( state.globalParameters().momentum().z() );
2588  */
2589 
2590  std::vector<int> hitIdx;
2591  std::vector<int> hitType;
2592 
2593  for (auto hit=seed.recHits().first; hit!=seed.recHits().second; ++hit) {
2595  int subid = recHit->geographicalId().subdetId();
2596  if (subid == (int) PixelSubdetector::PixelBarrel || subid == (int) PixelSubdetector::PixelEndcap) {
2597  const BaseTrackerRecHit* bhit = dynamic_cast<const BaseTrackerRecHit*>(&*recHit);
2598  const auto& clusterRef = bhit->firstClusterRef();
2599  const auto clusterKey = clusterRef.cluster_pixel().key();
2600  if(includeAllHits_) {
2601  checkProductID(hitProductIds, clusterRef.id(), "seed");
2602  pix_seeIdx[clusterKey].push_back(seedIndex);
2603  }
2604  hitIdx.push_back( clusterKey );
2605  hitType.push_back( static_cast<int>(HitType::Pixel) );
2606  } else if (subid == (int) StripSubdetector::TOB || subid == (int) StripSubdetector::TID ||
2607  subid == (int) StripSubdetector::TIB || subid == (int) StripSubdetector::TEC) {
2608  if (trackerHitRTTI::isMatched(*recHit)) {
2609  const SiStripMatchedRecHit2D * matchedHit = dynamic_cast<const SiStripMatchedRecHit2D *>(&*recHit);
2610  if(includeAllHits_) {
2611  checkProductID(hitProductIds, matchedHit->monoClusterRef().id(), "seed");
2612  checkProductID(hitProductIds, matchedHit->stereoClusterRef().id(), "seed");
2613  }
2614  int monoIdx = matchedHit->monoClusterRef().key();
2615  int stereoIdx = matchedHit->stereoClusterRef().key();
2616 
2617  std::vector<std::pair<int,int> >::const_iterator pos = find( monoStereoClusterList.begin(), monoStereoClusterList.end(), std::make_pair(monoIdx,stereoIdx) );
2618  const auto gluedIndex = std::distance(monoStereoClusterList.begin(), pos);
2619  if(includeAllHits_) glu_seeIdx[gluedIndex].push_back(seedIndex);
2620  hitIdx.push_back( gluedIndex );
2621  hitType.push_back( static_cast<int>(HitType::Glued) );
2622  } else {
2623  const BaseTrackerRecHit* bhit = dynamic_cast<const BaseTrackerRecHit*>(&*recHit);
2624  const auto& clusterRef = bhit->firstClusterRef();
2625  unsigned int clusterKey;
2626  if(clusterRef.isPhase2()){
2627  clusterKey = clusterRef.cluster_phase2OT().key();
2628  } else {
2629  clusterKey = clusterRef.cluster_strip().key();
2630  }
2631 
2632  if(includeAllHits_) {
2633  checkProductID(hitProductIds, clusterRef.id(), "seed");
2634  if(clusterRef.isPhase2()){
2635  ph2_seeIdx[clusterKey].push_back(seedIndex);
2636  } else {
2637  str_seeIdx[clusterKey].push_back(seedIndex);
2638  }
2639  }
2640 
2641  hitIdx.push_back( clusterKey );
2642  if(clusterRef.isPhase2()){
2643  hitType.push_back( static_cast<int>(HitType::Phase2OT) );
2644  } else {
2645  hitType.push_back( static_cast<int>(HitType::Strip) );
2646  }
2647  }
2648  } else {
2649  LogTrace("TrackingNtuple") << " not pixel and not Strip detector";
2650  }
2651  }
2652  see_hitIdx .push_back( hitIdx );
2653  see_hitType .push_back( hitType );
2654  see_nPixel .push_back( std::count(hitType.begin(), hitType.end(), static_cast<int>(HitType::Pixel)) );
2655  see_nGlued .push_back( std::count(hitType.begin(), hitType.end(), static_cast<int>(HitType::Glued)) );
2656  see_nStrip .push_back( std::count(hitType.begin(), hitType.end(), static_cast<int>(HitType::Strip)) );
2657  see_nPhase2OT.push_back( std::count(hitType.begin(), hitType.end(), static_cast<int>(HitType::Phase2OT)) );
2658  //the part below is not strictly needed
2659  float chi2 = -1;
2660  if (nHits==2) {
2661  TransientTrackingRecHit::RecHitPointer recHit0 = theTTRHBuilder.build(&*(seed.recHits().first));
2662  TransientTrackingRecHit::RecHitPointer recHit1 = theTTRHBuilder.build(&*(seed.recHits().first+1));
2663  std::vector<GlobalPoint> gp(2);
2664  std::vector<GlobalError> ge(2);
2665  gp[0] = recHit0->globalPosition();
2666  ge[0] = recHit0->globalPositionError();
2667  gp[1] = recHit1->globalPosition();
2668  ge[1] = recHit1->globalPositionError();
2669  LogTrace("TrackingNtuple") << "seed " << seedTrackRef.key()
2670  << " pt=" << pt << " eta=" << eta << " phi=" << phi << " q=" << charge
2671  << " - PAIR - ids: " << recHit0->geographicalId().rawId() << " " << recHit1->geographicalId().rawId()
2672  << " hitpos: " << gp[0] << " " << gp[1]
2673  << " trans0: " << (recHit0->transientHits().size()>1 ? recHit0->transientHits()[0]->globalPosition() : GlobalPoint(0,0,0))
2674  << " " << (recHit0->transientHits().size()>1 ? recHit0->transientHits()[1]->globalPosition() : GlobalPoint(0,0,0))
2675  << " trans1: " << (recHit1->transientHits().size()>1 ? recHit1->transientHits()[0]->globalPosition() : GlobalPoint(0,0,0))
2676  << " " << (recHit1->transientHits().size()>1 ? recHit1->transientHits()[1]->globalPosition() : GlobalPoint(0,0,0))
2677  << " eta,phi: " << gp[0].eta() << "," << gp[0].phi();
2678  } else if (nHits==3) {
2679  TransientTrackingRecHit::RecHitPointer recHit0 = theTTRHBuilder.build(&*(seed.recHits().first));
2680  TransientTrackingRecHit::RecHitPointer recHit1 = theTTRHBuilder.build(&*(seed.recHits().first+1));
2681  TransientTrackingRecHit::RecHitPointer recHit2 = theTTRHBuilder.build(&*(seed.recHits().first+2));
2684  declareDynArray(bool,4, bl);
2685  gp[0] = recHit0->globalPosition();
2686  ge[0] = recHit0->globalPositionError();
2687  int subid0 = recHit0->geographicalId().subdetId();
2688  bl[0] = (subid0 == StripSubdetector::TIB || subid0 == StripSubdetector::TOB || subid0 == (int) PixelSubdetector::PixelBarrel);
2689  gp[1] = recHit1->globalPosition();
2690  ge[1] = recHit1->globalPositionError();
2691  int subid1 = recHit1->geographicalId().subdetId();
2692  bl[1] = (subid1 == StripSubdetector::TIB || subid1 == StripSubdetector::TOB || subid1 == (int) PixelSubdetector::PixelBarrel);
2693  gp[2] = recHit2->globalPosition();
2694  ge[2] = recHit2->globalPositionError();
2695  int subid2 = recHit2->geographicalId().subdetId();
2696  bl[2] = (subid2 == StripSubdetector::TIB || subid2 == StripSubdetector::TOB || subid2 == (int) PixelSubdetector::PixelBarrel);
2697  RZLine rzLine(gp,ge,bl);
2698  float seed_chi2 = rzLine.chi2();
2699  //float seed_pt = state.globalParameters().momentum().perp();
2700  float seed_pt = pt;
2701  LogTrace("TrackingNtuple") << "seed " << seedTrackRef.key()
2702  << " pt=" << pt << " eta=" << eta << " phi=" << phi << " q=" << charge
2703  << " - TRIPLET - ids: " << recHit0->geographicalId().rawId() << " " << recHit1->geographicalId().rawId() << " " << recHit2->geographicalId().rawId()
2704  << " hitpos: " << gp[0] << " " << gp[1] << " " << gp[2]
2705  << " trans0: " << (recHit0->transientHits().size()>1 ? recHit0->transientHits()[0]->globalPosition() : GlobalPoint(0,0,0))
2706  << " " << (recHit0->transientHits().size()>1 ? recHit0->transientHits()[1]->globalPosition() : GlobalPoint(0,0,0))
2707  << " trans1: " << (recHit1->transientHits().size()>1 ? recHit1->transientHits()[0]->globalPosition() : GlobalPoint(0,0,0))
2708  << " " << (recHit1->transientHits().size()>1 ? recHit1->transientHits()[1]->globalPosition() : GlobalPoint(0,0,0))
2709  << " trans2: " << (recHit2->transientHits().size()>1 ? recHit2->transientHits()[0]->globalPosition() : GlobalPoint(0,0,0))
2710  << " " << (recHit2->transientHits().size()>1 ? recHit2->transientHits()[1]->globalPosition() : GlobalPoint(0,0,0))
2711  << " local: " << recHit2->localPosition()
2712  //<< " tsos pos, mom: " << state.globalPosition()<<" "<<state.globalMomentum()
2713  << " eta,phi: " << gp[0].eta() << "," << gp[0].phi()
2714  << " pt,chi2: " << seed_pt << "," << seed_chi2;
2715  chi2 = seed_chi2;
2716  }
2717  see_chi2 .push_back( chi2 );
2718  }
2719 
2720  fillTrackingParticlesForSeeds(tpCollection, simRecColl, tpKeyToIndex, offset);
2721  }
2722 }
unsigned int size_type
Definition: View.h:90
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:508
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
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
std::vector< unsigned short > see_stopReason
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:265
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
void fillTrackingParticlesForSeeds(const TrackingParticleRefVector &tpCollection, const reco::SimToRecoCollection &simRecColl, const TrackingParticleRefKeyToIndex &tpKeyToIndex, const unsigned int seedOffset)
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
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
reco::RecoToSimCollection associateRecoToSim(const edm::Handle< edm::View< reco::Track > > &tCH, const edm::Handle< TrackingParticleCollection > &tPCH) const
compare reco to sim the handle of reco::Track and TrackingParticle collections
std::vector< float > see_ptErr
void labelsForToken(EDGetToken iToken, Labels &oLabels) const
std::vector< std::vector< float > > see_shareFrac
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:137
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
reco::SimToRecoCollection associateSimToReco(const edm::Handle< edm::View< reco::Track > > &tCH, const edm::Handle< TrackingParticleCollection > &tPCH) const
compare reco to sim the handle of reco::Track and TrackingParticle collections
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_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 2095 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(), simTrackMatching_cfi::simTrack, and DetId::Tracker.

Referenced by analyze().

2100  {
2101 
2102  for(const auto& assoc: simHitsTPAssoc) {
2103  auto tpKey = assoc.first.key();
2104 
2105  // SimHitTPAssociationList can contain more TrackingParticles than
2106  // what are given to this EDAnalyzer, so we can filter those out here.
2107  auto found = tpKeyToIndex.find(tpKey);
2108  if(found == tpKeyToIndex.end())
2109  continue;
2110  const auto tpIndex = found->second;
2111 
2112  // skip non-tracker simhits (mostly muons)
2113  const auto& simhit = *(assoc.second);
2114  auto detId = DetId(simhit.detUnitId());
2115  if(detId.det() != DetId::Tracker) continue;
2116 
2117  // Skip electron SimHits for non-electron TrackingParticles to
2118  // filter out delta rays. The delta ray hits just confuse. If we
2119  // need them later, let's add them as a separate "collection" of
2120  // hits of a TP
2121  const TrackingParticle& tp = *(assoc.first);
2122  if(std::abs(simhit.particleType()) == 11 && std::abs(tp.pdgId()) != 11) continue;
2123 
2124  auto simHitKey = std::make_pair(assoc.second.key(), assoc.second.id());
2125 
2126  if(simHitRefKeyToIndex.find(simHitKey) != simHitRefKeyToIndex.end()) {
2127  for(const auto& assoc2: simHitsTPAssoc) {
2128  if(std::make_pair(assoc2.second.key(), assoc2.second.id()) == simHitKey) {
2129 
2130 #ifdef EDM_ML_DEBUG
2131  auto range1 = std::equal_range(simHitsTPAssoc.begin(), simHitsTPAssoc.end(),
2132  std::make_pair(assoc.first, TrackPSimHitRef()),
2134  auto range2 = std::equal_range(simHitsTPAssoc.begin(), simHitsTPAssoc.end(),
2135  std::make_pair(assoc2.first, TrackPSimHitRef()),
2137 
2138  LogTrace("TrackingNtuple") << "Earlier TP " << assoc2.first.key() << " SimTrack Ids";
2139  for(const auto& simTrack: assoc2.first->g4Tracks()) {
2140  edm::LogPrint("TrackingNtuple") << " SimTrack " << simTrack.trackId() << " BX:event " << simTrack.eventId().bunchCrossing() << ":" << simTrack.eventId().event();
2141  }
2142  for(auto iHit = range2.first; iHit != range2.second; ++iHit) {
2143  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();
2144  }
2145  LogTrace("TrackingNtuple") << "Current TP " << assoc.first.key() << " SimTrack Ids";
2146  for(const auto& simTrack: assoc.first->g4Tracks()) {
2147  edm::LogPrint("TrackingNtuple") << " SimTrack " << simTrack.trackId() << " BX:event " << simTrack.eventId().bunchCrossing() << ":" << simTrack.eventId().event();
2148  }
2149  for(auto iHit = range1.first; iHit != range1.second; ++iHit) {
2150  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();
2151  }
2152 #endif
2153 
2154  throw cms::Exception("LogicError") << "Got second time the SimHit " << simHitKey.first << " of " << simHitKey.second << ", first time with TrackingParticle " << assoc2.first.key() << ", now with " << tpKey;
2155  }
2156  }
2157  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!";
2158  }
2159 
2160  auto det = tracker.idToDetUnit(detId);
2161  if(!det)
2162  throw cms::Exception("LogicError") << "Did not find a det unit for DetId " << simhit.detUnitId() << " from tracker geometry";
2163 
2164  const auto pos = det->surface().toGlobal(simhit.localPosition());
2165  const float tof = simhit.timeOfFlight();
2166 
2167  const auto simHitIndex = simhit_x.size();
2168  simHitRefKeyToIndex[simHitKey] = simHitIndex;
2169 
2170  if(includeStripHits_) simhit_detId.push_back(tTopo, detId);
2171  else simhit_detId_phase2.push_back(tTopo, detId);
2172  simhit_x.push_back(pos.x());
2173  simhit_y.push_back(pos.y());
2174  simhit_z.push_back(pos.z());
2175  simhit_particle.push_back(simhit.particleType());
2176  simhit_process.push_back(simhit.processType());
2177  simhit_eloss.push_back(simhit.energyLoss());
2178  simhit_tof.push_back(tof);
2179  //simhit_simTrackId.push_back(simhit.trackId());
2180 
2181  simhit_simTrkIdx.push_back(tpIndex);
2182 
2183  simhit_hitIdx.emplace_back(); // filled in matchCluster
2184  simhit_hitType.emplace_back(); // filled in matchCluster
2185 
2186  tpHitList.emplace_back(tpKey, simHitIndex, tof, simhit.detUnitId());
2187  }
2188 }
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.
simTrack
per collection params
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 2341 of file TrackingNtuple.cc.

References edmNew::DetSetVector< T >::begin(), TransientTrackingRecHitBuilder::build(), edmNew::DetSetVector< T >::end(), edm::Event::getByToken(), 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, TrackerTopology::layer(), LogTrace, DetId::rawId(), DetId::subdetId(), StripSubdetector::TIB, and StripSubdetector::TOB.

Referenced by analyze().

2345  {
2347  iEvent.getByToken(stripMatchedRecHitToken_, matchedHits);
2348  for (auto it = matchedHits->begin(); it!=matchedHits->end(); it++ ) {
2349  const DetId hitId = it->detId();
2350  for (auto hit = it->begin(); hit!=it->end(); hit++ ) {
2351  TransientTrackingRecHit::RecHitPointer ttrh = theTTRHBuilder.build(&*hit);
2352  const int lay = tTopo.layer(hitId);
2353  monoStereoClusterList.emplace_back(hit->monoHit().cluster().key(),hit->stereoHit().cluster().key());
2354  glu_isBarrel .push_back( (hitId.subdetId()==StripSubdetector::TIB || hitId.subdetId()==StripSubdetector::TOB) );
2355  glu_detId .push_back( tTopo, hitId );
2356  glu_monoIdx .push_back( hit->monoHit().cluster().key() );
2357  glu_stereoIdx.push_back( hit->stereoHit().cluster().key() );
2358  glu_seeIdx .emplace_back(); // filled in fillSeeds
2359  glu_x .push_back( ttrh->globalPosition().x() );
2360  glu_y .push_back( ttrh->globalPosition().y() );
2361  glu_z .push_back( ttrh->globalPosition().z() );
2362  glu_xx .push_back( ttrh->globalPositionError().cxx() );
2363  glu_xy .push_back( ttrh->globalPositionError().cyx() );
2364  glu_yy .push_back( ttrh->globalPositionError().cyy() );
2365  glu_yz .push_back( ttrh->globalPositionError().czy() );
2366  glu_zz .push_back( ttrh->globalPositionError().czz() );
2367  glu_zx .push_back( ttrh->globalPositionError().czx() );
2368  glu_radL .push_back( ttrh->surface()->mediumProperties().radLen() );
2369  glu_bbxi .push_back( ttrh->surface()->mediumProperties().xi() );
2370  LogTrace("TrackingNtuple") << "stripMatchedHit"
2371  << " cluster0=" << hit->stereoHit().cluster().key()
2372  << " cluster1=" << hit->monoHit().cluster().key()
2373  << " subdId=" << hitId.subdetId()
2374  << " lay=" << lay
2375  << " rawId=" << hitId.rawId()
2376  << " pos =" << ttrh->globalPosition();
2377  }
2378  }
2379 }
edm::EDGetTokenT< SiStripMatchedRecHit2DCollection > stripMatchedRecHitToken_
const_iterator end(bool update=false) const
std::vector< float > glu_xy
std::vector< float > glu_radL
std::vector< int > glu_monoIdx
std::vector< short > glu_isBarrel
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:508
std::vector< float > glu_x
std::vector< float > glu_z
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
std::vector< float > glu_y
std::vector< float > glu_yz
std::vector< float > glu_yy
std::vector< std::vector< int > > glu_seeIdx
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:37
#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
Definition: DetId.h:18
std::vector< int > glu_stereoIdx
unsigned int layer(const DetId &id) const
std::vector< float > glu_bbxi
std::vector< float > glu_xx
DetIdStrip glu_detId
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 2253 of file TrackingNtuple.cc.

References TransientTrackingRecHitBuilder::build(), TrackingNtuple::SimHitData::bunchCrossing, TrackingNtuple::SimHitData::chargeFraction, edmNew::DetSetVector< T >::dataSize(), TrackingNtuple::SimHitData::event, lumiContext::fill, edm::Event::getByToken(), hfClusterShapes_cfi::hits, hit::id, 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().

2262  {
2263  //index strip hit branches by cluster index
2265  iEvent.getByToken(stripRphiRecHitToken_, rphiHits);
2267  iEvent.getByToken(stripStereoRecHitToken_, stereoHits);
2268  int totalStripHits = rphiHits->dataSize()+stereoHits->dataSize();
2269  str_isBarrel .resize(totalStripHits);
2270  str_detId .resize(totalStripHits);
2271  str_trkIdx .resize(totalStripHits); // filled in fillTracks
2272  str_seeIdx .resize(totalStripHits); // filled in fillSeeds
2273  str_simHitIdx.resize(totalStripHits);
2274  str_simType .resize(totalStripHits);
2275  str_x .resize(totalStripHits);
2276  str_y .resize(totalStripHits);
2277  str_z .resize(totalStripHits);
2278  str_xx .resize(totalStripHits);
2279  str_xy .resize(totalStripHits);
2280  str_yy .resize(totalStripHits);
2281  str_yz .resize(totalStripHits);
2282  str_zz .resize(totalStripHits);
2283  str_zx .resize(totalStripHits);
2284  str_chargeFraction.resize(totalStripHits);
2285  str_radL .resize(totalStripHits);
2286  str_bbxi .resize(totalStripHits);
2287 
2288  auto fill = [&](const SiStripRecHit2DCollection& hits, const char *name) {
2289  for(const auto& detset: hits) {
2290  const DetId hitId = detset.detId();
2291  for(const auto& hit: detset) {
2292  TransientTrackingRecHit::RecHitPointer ttrh = theTTRHBuilder.build(&hit);
2293 
2294  hitProductIds.insert(hit.cluster().id());
2295 
2296  const int key = hit.cluster().key();
2297  const int lay = tTopo.layer(hitId);
2298  SimHitData simHitData = matchCluster(hit.firstClusterRef(), hitId, key, ttrh,
2299  clusterToTPMap, tpKeyToIndex, simHitsTPAssoc, digiSimLink, simHitRefKeyToIndex, HitType::Strip);
2301  str_detId.set(key, tTopo, hitId);
2302  str_simHitIdx[key] = simHitData.matchingSimHit;
2303  str_simType [key] = static_cast<int>(simHitData.type);
2304  str_x [key] = ttrh->globalPosition().x();
2305  str_y [key] = ttrh->globalPosition().y();
2306  str_z [key] = ttrh->globalPosition().z();
2307  str_xx [key] = ttrh->globalPositionError().cxx();
2308  str_xy [key] = ttrh->globalPositionError().cyx();
2309  str_yy [key] = ttrh->globalPositionError().cyy();
2310  str_yz [key] = ttrh->globalPositionError().czy();
2311  str_zz [key] = ttrh->globalPositionError().czz();
2312  str_zx [key] = ttrh->globalPositionError().czx();
2313  str_chargeFraction[key] = simHitData.chargeFraction;
2314  str_radL [key] = ttrh->surface()->mediumProperties().radLen();
2315  str_bbxi [key] = ttrh->surface()->mediumProperties().xi();
2316  LogTrace("TrackingNtuple") << name << " cluster=" << key
2317  << " subdId=" << hitId.subdetId()
2318  << " lay=" << lay
2319  << " rawId=" << hitId.rawId()
2320  << " pos =" << ttrh->globalPosition()
2321  << " nMatchingSimHit=" << simHitData.matchingSimHit.size();
2322  if(!simHitData.matchingSimHit.empty()) {
2323  const auto simHitIdx = simHitData.matchingSimHit[0];
2324  LogTrace("TrackingNtuple") << " firstMatchingSimHit=" << simHitIdx
2325  << " simHitPos=" << GlobalPoint(simhit_x[simHitIdx], simhit_y[simHitIdx], simhit_z[simHitIdx])
2326  << " simHitPos=" << GlobalPoint(simhit_x[simHitIdx], simhit_y[simHitIdx], simhit_z[simHitIdx])
2327  << " energyLoss=" << simhit_eloss[simHitIdx]
2328  << " particleType=" << simhit_particle[simHitIdx]
2329  << " processType=" << simhit_process[simHitIdx]
2330  << " bunchCrossing=" << simHitData.bunchCrossing[0]
2331  << " event=" << simHitData.event[0];
2332  }
2333  }
2334  }
2335  };
2336 
2337  fill(*rphiHits, "stripRPhiHit");
2338  fill(*stereoHits, "stripStereoHit");
2339 }
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:508
edm::EDGetTokenT< SiStripRecHit2DCollection > stripStereoRecHitToken_
std::vector< float > str_yz
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
std::vector< short > simhit_process
std::vector< std::vector< int > > str_seeIdx
std::vector< float > str_radL
std::vector< unsigned short > str_simType
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
std::vector< float > simhit_z
std::vector< float > str_y
std::vector< float > str_zz
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:37
#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 
)
private

Definition at line 2944 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_nStrip, 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_shareFrac, sim_simHitIdx, sim_trkIdx, 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().

2951  {
2952  edm::ESHandle<ParametersDefinerForTP> parametersDefinerH;
2953  iSetup.get<TrackAssociatorRecord>().get(parametersDefinerName_, parametersDefinerH);
2954  const ParametersDefinerForTP *parametersDefiner = parametersDefinerH.product();
2955 
2956  // Number of 3D layers for TPs
2958  iEvent.getByToken(tpNLayersToken_, tpNLayersH);
2959  const auto& nLayers_tPCeff = *tpNLayersH;
2960 
2961  iEvent.getByToken(tpNPixelLayersToken_, tpNLayersH);
2962  const auto& nPixelLayers_tPCeff = *tpNLayersH;
2963 
2964  iEvent.getByToken(tpNStripStereoLayersToken_, tpNLayersH);
2965  const auto& nStripMonoAndStereoLayers_tPCeff = *tpNLayersH;
2966 
2967  reco::SimToRecoCollection simRecColl = associatorByHits.associateSimToReco(tracks, tpCollection);
2968 
2969  for(const TrackingParticleRef& tp: tpCollection) {
2970  LogTrace("TrackingNtuple") << "tracking particle pt=" << tp->pt() << " eta=" << tp->eta() << " phi=" << tp->phi();
2971  bool isRecoMatched = false;
2972  std::vector<int> tkIdx;
2973  std::vector<float> sharedFraction;
2974  auto foundTracks = simRecColl.find(tp);
2975  if(foundTracks != simRecColl.end()) {
2976  isRecoMatched = true;
2977  for(const auto trackQuality: foundTracks->val) {
2978  sharedFraction.push_back(trackQuality.second);
2979  tkIdx.push_back(trackQuality.first.key());
2980  }
2981  }
2982 
2983  sim_genPdgIds.emplace_back();
2984  for(const auto& genRef: tp->genParticles()) {
2985  if(genRef.isNonnull())
2986  sim_genPdgIds.back().push_back(genRef->pdgId());
2987  }
2988 
2989  bool isFromBHadron = false;
2990  // Logic is similar to SimTracker/TrackHistory
2991  if(tracer_.evaluate(tp)) { // ignore TP if history can not be traced
2992  // following is from TrackClassifier::processesAtGenerator()
2993  HistoryBase::RecoGenParticleTrail const & recoGenParticleTrail = tracer_.recoGenParticleTrail();
2994  for(const auto& particle: recoGenParticleTrail) {
2995  HepPDT::ParticleID particleID(particle->pdgId());
2996  if(particleID.hasBottom()) {
2997  isFromBHadron = true;
2998  break;
2999  }
3000  }
3001  }
3002 
3003  LogTrace("TrackingNtuple") << "matched to tracks = " << make_VectorPrinter(tkIdx) << " isRecoMatched=" << isRecoMatched;
3004  sim_event .push_back(tp->eventId().event());
3005  sim_bunchCrossing.push_back(tp->eventId().bunchCrossing());
3006  sim_pdgId .push_back(tp->pdgId());
3007  sim_isFromBHadron.push_back(isFromBHadron);
3008  sim_px .push_back(tp->px());
3009  sim_py .push_back(tp->py());
3010  sim_pz .push_back(tp->pz());
3011  sim_pt .push_back(tp->pt());
3012  sim_eta .push_back(tp->eta());
3013  sim_phi .push_back(tp->phi());
3014  sim_q .push_back(tp->charge());
3015  sim_trkIdx .push_back(tkIdx);
3016  sim_shareFrac.push_back(sharedFraction);
3017  sim_parentVtxIdx.push_back( tvKeyToIndex.at(tp->parentVertex().key()) );
3018  std::vector<int> decayIdx;
3019  for(const auto& v: tp->decayVertices())
3020  decayIdx.push_back( tvKeyToIndex.at(v.key()) );
3021  sim_decayVtxIdx.push_back(decayIdx);
3022 
3023  //Calcualte the impact parameters w.r.t. PCA
3024  TrackingParticle::Vector momentum = parametersDefiner->momentum(iEvent,iSetup,tp);
3025  TrackingParticle::Point vertex = parametersDefiner->vertex(iEvent,iSetup,tp);
3026  auto dxySim = TrackingParticleIP::dxy(vertex, momentum, bs.position());
3027  auto dzSim = TrackingParticleIP::dz(vertex, momentum, bs.position());
3028  const double lambdaSim = M_PI/2 - momentum.theta();
3029  sim_pca_pt .push_back(std::sqrt(momentum.perp2()));
3030  sim_pca_eta .push_back(momentum.Eta());
3031  sim_pca_lambda .push_back(lambdaSim);
3032  sim_pca_cotTheta .push_back(1/tan(M_PI*0.5-lambdaSim));
3033  sim_pca_phi .push_back(momentum.phi());
3034  sim_pca_dxy .push_back(dxySim);
3035  sim_pca_dz .push_back(dzSim);
3036 
3037  std::vector<int> hitIdx;
3038  int nPixel=0, nStrip=0;
3039  auto rangeHit = std::equal_range(tpHitList.begin(), tpHitList.end(), TPHitIndex(tp.key()), tpHitIndexListLess);
3040  for(auto ip = rangeHit.first; ip != rangeHit.second; ++ip) {
3041  auto type = HitType::Unknown;
3042  if(!simhit_hitType[ip->simHitIdx].empty())
3043  type = static_cast<HitType>(simhit_hitType[ip->simHitIdx][0]);
3044  LogTrace("TrackingNtuple") << "simhit=" << ip->simHitIdx << " type=" << static_cast<int>(type);
3045  hitIdx.push_back(ip->simHitIdx);
3046  const auto detid = DetId(includeStripHits_ ? simhit_detId[ip->simHitIdx] : simhit_detId_phase2[ip->simHitIdx]);
3047  if(detid.det() != DetId::Tracker) {
3048  throw cms::Exception("LogicError") << "Encountered SimHit for TP " << tp.key() << " with DetId " << detid.rawId() << " whose det() is not Tracker but " << detid.det();
3049  }
3050  const auto subdet = detid.subdetId();
3051  switch(subdet) {
3054  ++nPixel;
3055  break;
3056  case StripSubdetector::TIB:
3057  case StripSubdetector::TID:
3058  case StripSubdetector::TOB:
3059  case StripSubdetector::TEC:
3060  ++nStrip;
3061  break;
3062  default:
3063  throw cms::Exception("LogicError") << "Encountered SimHit for TP " << tp.key() << " with DetId " << detid.rawId() << " whose subdet is not recognized, is " << subdet;
3064  };
3065  }
3066  sim_nValid .push_back( hitIdx.size() );
3067  sim_nPixel .push_back( nPixel );
3068  sim_nStrip .push_back( nStrip );
3069 
3070  const auto nSimLayers = nLayers_tPCeff[tp];
3071  const auto nSimPixelLayers = nPixelLayers_tPCeff[tp];
3072  const auto nSimStripMonoAndStereoLayers = nStripMonoAndStereoLayers_tPCeff[tp];
3073  sim_nLay .push_back( nSimLayers );
3074  sim_nPixelLay.push_back( nSimPixelLayers );
3075  sim_n3DLay .push_back( nSimPixelLayers+nSimStripMonoAndStereoLayers );
3076 
3077  sim_simHitIdx.push_back(hitIdx);
3078  }
3079 }
std::vector< float > sim_pca_dz
std::vector< unsigned int > sim_nLay
type
Definition: HCALResponse.h:21
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:508
std::vector< float > sim_phi
const_iterator find(const key_type &k) const
find element with specified reference key
std::vector< std::vector< float > > sim_shareFrac
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< 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:21
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)
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_
const T & get() const
Definition: EventSetup.h:55
std::vector< unsigned int > sim_nPixel
bool evaluate(TrackingParticleRef tpr)
Evaluate track history using a TrackingParticleRef.
Definition: HistoryBase.h:122
auto dxy(const T_Vertex &vertex, const T_Momentum &momentum, const T_Point &point)
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
reco::SimToRecoCollection associateSimToReco(const edm::Handle< edm::View< reco::Track > > &tCH, const edm::Handle< TrackingParticleCollection > &tPCH) const
compare reco to sim the handle of reco::Track and TrackingParticle collections
math::XYZVectorD Vector
point in the space
RecoGenParticleTrail const & recoGenParticleTrail() const
Return all reco::GenParticle in the history.
Definition: HistoryBase.h:83
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 3082 of file TrackingNtuple.cc.

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

Referenced by fillSeeds().

3085  {
3086  if(sim_seedIdx.empty()) // first call
3087  sim_seedIdx.resize(tpCollection.size());
3088 
3089  for(const auto& keyVal: simRecColl) {
3090  const auto& tpRef = keyVal.key;
3091  auto found = tpKeyToIndex.find(tpRef.key());
3092  if(found == tpKeyToIndex.end())
3093  throw cms::Exception("Assert") << __FILE__ << ":" << __LINE__ << " fillTrackingParticlesForSeeds: tpRef.key() " << tpRef.key() << " not found from tpKeyToIndex. tpKeyToIndex size " << tpKeyToIndex.size();
3094  const auto tpIndex = found->second;
3095  for(const auto& pair: keyVal.val) {
3096  const auto& seedRef = pair.first->seedRef();
3097  sim_seedIdx[tpIndex].push_back(seedOffset + seedRef.key());
3098  }
3099  }
3100 }
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 3135 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().

3137  {
3138  int current_event = -1;
3139  for(const auto& ref: trackingVertices) {
3140  const TrackingVertex v = *ref;
3141  if(v.eventId().event() != current_event) {
3142  // next PV
3143  current_event = v.eventId().event();
3144  simpv_idx.push_back(simvtx_x.size());
3145  }
3146 
3147  unsigned int processType = std::numeric_limits<unsigned int>::max();
3148  if(!v.g4Vertices().empty()) {
3149  processType = v.g4Vertices()[0].processType();
3150  }
3151 
3152  simvtx_event.push_back(v.eventId().event());
3153  simvtx_bunchCrossing.push_back(v.eventId().bunchCrossing());
3154  simvtx_processType.push_back(processType);
3155 
3156  simvtx_x.push_back(v.position().x());
3157  simvtx_y.push_back(v.position().y());
3158  simvtx_z.push_back(v.position().z());
3159 
3160  auto fill = [&](const TrackingParticleRefVector& tps, std::vector<int>& idx) {
3161  for(const auto& tpRef: tps) {
3162  auto found = tpKeyToIndex.find(tpRef.key());
3163  if(found != tpKeyToIndex.end()) {
3164  idx.push_back(found->second);
3165  }
3166  }
3167  };
3168 
3169  std::vector<int> sourceIdx;
3170  std::vector<int> daughterIdx;
3171  fill(v.sourceTracks(), sourceIdx);
3172  fill(v.daughterTracks(), daughterIdx);
3173 
3174  simvtx_sourceSimIdx.push_back(sourceIdx);
3175  simvtx_daughterSimIdx.push_back(daughterIdx);
3176  }
3177 }
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 reco::BeamSpot bs,
const reco::VertexCollection vertices,
const reco::TrackToTrackingParticleAssociator associatorByHits,
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 2724 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, 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, DetId::Tracker, reco::HitPattern::trackerLayersWithoutMeasurement(), trk_algoMask, trk_hitIdx, trk_hitType, trk_isHP, trk_isTrue, trk_seedIdx, trk_shareFrac, trk_simTrkIdx, trk_stopReason, and trk_vtxIdx.

Referenced by analyze().

2736  {
2737  reco::RecoToSimCollection recSimColl = associatorByHits.associateRecoToSim(tracks, tpCollection);
2739  labelsForToken(trackToken_, labels);
2740  LogTrace("TrackingNtuple") << "NEW TRACK LABEL: " << labels.module;
2741 
2742  auto pvPosition = vertices[0].position();
2743 
2744  for(size_t iTrack = 0; iTrack<tracks.size(); ++iTrack) {
2745  const auto& itTrack = tracks[iTrack];
2746  int nSimHits = 0;
2747  bool isSimMatched = false;
2748  std::vector<float> sharedFraction;
2749  std::vector<int> tpIdx;
2750  auto foundTPs = recSimColl.find(itTrack);
2751  if (foundTPs != recSimColl.end()) {
2752  if (!foundTPs->val.empty()) {
2753  nSimHits = foundTPs->val[0].first->numberOfTrackerHits();
2754  isSimMatched = true;
2755  }
2756  for(const auto tpQuality: foundTPs->val) {
2757  sharedFraction.push_back(tpQuality.second);
2758  tpIdx.push_back( tpKeyToIndex.at( tpQuality.first.key() ) );
2759  }
2760  }
2761  int charge = itTrack->charge();
2762  float pt = itTrack->pt();
2763  float eta = itTrack->eta();
2764  const double lambda = itTrack->lambda();
2765  float chi2 = itTrack->normalizedChi2();
2766  float ndof = itTrack->ndof();
2767  float phi = itTrack->phi();
2768  int nHits = itTrack->numberOfValidHits();
2769  const reco::HitPattern& hp = itTrack->hitPattern();
2770 
2771  float chi2_1Dmod = chi2;
2772  int count1dhits = 0;
2773  for(auto iHit = itTrack->recHitsBegin(), iEnd=itTrack->recHitsEnd(); iHit != iEnd; ++iHit) {
2774  const TrackingRecHit& hit = **iHit;
2775  if(hit.isValid() && typeid(hit) == typeid(SiStripRecHit1D))
2776  ++count1dhits;
2777  }
2778  if(count1dhits > 0) {
2779  chi2_1Dmod = (chi2+count1dhits)/(ndof+count1dhits);
2780  }
2781 
2782  Point bestPV = getBestVertex(*itTrack, vertices);
2783 
2784  trk_px .push_back(itTrack->px());
2785  trk_py .push_back(itTrack->py());
2786  trk_pz .push_back(itTrack->pz());
2787  trk_pt .push_back(pt);
2788  trk_inner_px.push_back(itTrack->innerMomentum().x());
2789  trk_inner_py.push_back(itTrack->innerMomentum().y());
2790  trk_inner_pz.push_back(itTrack->innerMomentum().z());
2791  trk_inner_pt.push_back(itTrack->innerMomentum().rho());
2792  trk_outer_px.push_back(itTrack->outerMomentum().x());
2793  trk_outer_py.push_back(itTrack->outerMomentum().y());
2794  trk_outer_pz.push_back(itTrack->outerMomentum().z());
2795  trk_outer_pt.push_back(itTrack->outerMomentum().rho());
2796  trk_eta .push_back(eta);
2797  trk_lambda .push_back(lambda);
2798  trk_cotTheta .push_back(1/tan(M_PI*0.5-lambda));
2799  trk_phi .push_back(phi);
2800  trk_dxy .push_back(itTrack->dxy(bs.position()));
2801  trk_dz .push_back(itTrack->dz(bs.position()));
2802  trk_dxyPV .push_back(itTrack->dxy(pvPosition));
2803  trk_dzPV .push_back(itTrack->dz(pvPosition));
2804  trk_dxyClosestPV.push_back(itTrack->dxy(bestPV));
2805  trk_dzClosestPV .push_back(itTrack->dz(bestPV));
2806  trk_ptErr .push_back(itTrack->ptError());
2807  trk_etaErr .push_back(itTrack->etaError());
2808  trk_lambdaErr.push_back(itTrack->lambdaError());
2809  trk_phiErr .push_back(itTrack->phiError());
2810  trk_dxyErr .push_back(itTrack->dxyError());
2811  trk_dzErr .push_back(itTrack->dzError());
2812  trk_refpoint_x.push_back(itTrack->vx());
2813  trk_refpoint_y.push_back(itTrack->vy());
2814  trk_refpoint_z.push_back(itTrack->vz());
2815  trk_nChi2 .push_back(chi2);
2816  trk_nChi2_1Dmod.push_back(chi2_1Dmod);
2817  trk_ndof .push_back(ndof);
2818  trk_q .push_back(charge);
2819  trk_nValid .push_back(hp.numberOfValidHits());
2821  trk_nPixel .push_back(hp.numberOfValidPixelHits());
2822  trk_nStrip .push_back(hp.numberOfValidStripHits());
2825  trk_nPixelLay.push_back(hp.pixelLayersWithMeasurement());
2826  trk_nStripLay.push_back(hp.stripLayersWithMeasurement());
2829  trk_algo .push_back(itTrack->algo());
2830  trk_originalAlgo.push_back(itTrack->originalAlgo());
2831  trk_algoMask .push_back(itTrack->algoMaskUL());
2832  trk_stopReason.push_back(itTrack->stopReason());
2833  trk_isHP .push_back(itTrack->quality(reco::TrackBase::highPurity));
2834  if(includeMVA_) {
2835  for(size_t i=0; i<trk_mvas.size(); ++i) {
2836  trk_mvas [i].push_back( (*(mvaColls [i]))[iTrack] );
2837  trk_qualityMasks[i].push_back( (*(qualColls[i]))[iTrack] );
2838  }
2839  }
2840  if(includeSeeds_) {
2841  auto offset = seedCollToOffset.find(itTrack->seedRef().id());
2842  if(offset == seedCollToOffset.end()) {
2843  throw cms::Exception("Configuration") << "Track algo '" << reco::TrackBase::algoName(itTrack->algo())
2844  << "' originalAlgo '" << reco::TrackBase::algoName(itTrack->originalAlgo())
2845  << "' refers to seed collection " << itTrack->seedRef().id()
2846  << ", but that seed collection is not given as an input. The following collections were given as an input " << make_ProductIDMapPrinter(seedCollToOffset);
2847  }
2848 
2849  const auto seedIndex = offset->second + itTrack->seedRef().key();
2850  trk_seedIdx .push_back(seedIndex);
2851  if(see_trkIdx[seedIndex] != -1) {
2852  throw cms::Exception("LogicError") << "Track index has already been set for seed " << seedIndex << " to " << see_trkIdx[seedIndex] << "; was trying to set it to " << iTrack;
2853  }
2854  see_trkIdx[seedIndex] = iTrack;
2855  }
2856  trk_vtxIdx .push_back(-1); // to be set correctly in fillVertices
2858  trk_simTrkIdx.push_back(tpIdx);
2859  trk_shareFrac.push_back(sharedFraction);
2860  }
2861  else {
2862  trk_isTrue.push_back(!tpIdx.empty());
2863  }
2864  LogTrace("TrackingNtuple") << "Track #" << itTrack.key() << " with q=" << charge
2865  << ", pT=" << pt << " GeV, eta: " << eta << ", phi: " << phi
2866  << ", chi2=" << chi2
2867  << ", Nhits=" << nHits
2868  << ", algo=" << itTrack->algoName(itTrack->algo()).c_str()
2869  << " hp=" << itTrack->quality(reco::TrackBase::highPurity)
2870  << " seed#=" << itTrack->seedRef().key()
2871  << " simMatch=" << isSimMatched
2872  << " nSimHits=" << nSimHits
2873  << " sharedFraction=" << (sharedFraction.empty()?-1:sharedFraction[0])
2874  << " tpIdx=" << (tpIdx.empty()?-1:tpIdx[0]);
2875  std::vector<int> hitIdx;
2876  std::vector<int> hitType;
2877 
2878  for(auto i=itTrack->recHitsBegin(); i!=itTrack->recHitsEnd(); i++) {
2879  TransientTrackingRecHit::RecHitPointer hit=theTTRHBuilder.build(&**i );
2880  DetId hitId = hit->geographicalId();
2881  LogTrace("TrackingNtuple") << "hit #" << std::distance(itTrack->recHitsBegin(), i) << " subdet=" << hitId.subdetId();
2882  if(hitId.det() != DetId::Tracker)
2883  continue;
2884 
2885  LogTrace("TrackingNtuple") << " " << subdetstring(hitId.subdetId()) << " " << tTopo.layer(hitId);
2886 
2887  if (hit->isValid()) {
2888  //ugly... but works
2889  const BaseTrackerRecHit* bhit = dynamic_cast<const BaseTrackerRecHit*>(&*hit);
2890  const auto& clusterRef = bhit->firstClusterRef();
2891  unsigned int clusterKey;
2892  if(clusterRef.isPixel()){
2893  clusterKey = clusterRef.cluster_pixel().key();
2894  } else if(clusterRef.isPhase2()){
2895  clusterKey = clusterRef.cluster_phase2OT().key();
2896  } else {
2897  clusterKey = clusterRef.cluster_strip().key();
2898  }
2899 
2900  LogTrace("TrackingNtuple") << " id: " << hitId.rawId() << " - globalPos =" << hit->globalPosition()
2901  << " cluster=" << clusterKey
2902  << " clusterRef ID=" << clusterRef.id()
2903  << " eta,phi: " << hit->globalPosition().eta() << "," << hit->globalPosition().phi();
2904  if(includeAllHits_) {
2905  checkProductID(hitProductIds, clusterRef.id(), "track");
2906  if(clusterRef.isPixel()){
2907  pix_trkIdx[clusterKey].push_back(iTrack);
2908  } else if(clusterRef.isPhase2()){
2909  ph2_trkIdx[clusterKey].push_back(iTrack);
2910  } else {
2911  str_trkIdx[clusterKey].push_back(iTrack);
2912  }
2913 
2914  }
2915 
2916  hitIdx.push_back(clusterKey);
2917  if(clusterRef.isPixel()){
2918  hitType.push_back( static_cast<int>(HitType::Pixel));
2919  } else if(clusterRef.isPhase2()){
2920  hitType.push_back( static_cast<int>(HitType::Phase2OT));
2921  } else {
2922  hitType.push_back( static_cast<int>(HitType::Strip));
2923  }
2924  } else {
2925  LogTrace("TrackingNtuple") << " - invalid hit";
2926 
2927  hitIdx.push_back( inv_isBarrel.size() );
2928  hitType.push_back( static_cast<int>(HitType::Invalid) );
2929 
2930  inv_isBarrel.push_back( hitId.subdetId()==1 );
2931  if(includeStripHits_) inv_detId.push_back( tTopo, hitId );
2932  else inv_detId_phase2.push_back( tTopo, hitId );
2933  inv_type .push_back( hit->getType() );
2934 
2935  }
2936  }
2937 
2938  trk_hitIdx.push_back(hitIdx);
2939  trk_hitType.push_back(hitType);
2940  }
2941 }
std::vector< float > trk_nChi2_1Dmod
std::vector< float > trk_dxyPV
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
const_iterator end() const
last iterator over the map (read only)
std::vector< float > trk_cotTheta
std::vector< float > trk_px
std::vector< unsigned short > inv_type
std::vector< std::vector< int > > trk_simTrkIdx
int numberOfValidHits() const
Definition: HitPattern.h:823
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_
std::vector< float > trk_outer_px
std::vector< std::vector< int > > trk_hitType
std::vector< std::vector< int > > ph2_trkIdx
int numberOfValidStripHits() const
Definition: HitPattern.h:853
std::vector< float > trk_inner_pt
key_type key() const
Accessor for product key.
Definition: Ref.h:265
std::vector< unsigned short > trk_stopReason
int pixelLayersWithMeasurement() const
Definition: HitPattern.cc:499
std::vector< float > trk_refpoint_x
std::vector< std::vector< float > > trk_mvas
int numberOfLostTrackerHits(HitCategory category) const
Definition: HitPattern.h:907
ClusterPixelRef cluster_pixel() const
std::vector< short > inv_isBarrel
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
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:341
std::vector< float > trk_etaErr
std::vector< unsigned int > trk_algo
susybsm::HSCParticleRefProd hp
Definition: classes.h:27
std::vector< unsigned int > trk_originalAlgo
std::vector< unsigned int > trk_nInnerLost
std::vector< float > trk_refpoint_z
math::XYZPoint Point
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< 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
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:37
char const * module
Definition: ProductLabels.h:5
std::vector< float > trk_phiErr
std::vector< float > trk_lambda
#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
#define M_PI
std::vector< std::vector< float > > trk_shareFrac
Definition: DetId.h:18
std::vector< float > trk_py
std::vector< float > trk_nChi2
std::vector< std::vector< unsigned short > > trk_qualityMasks
reco::RecoToSimCollection associateRecoToSim(const edm::Handle< edm::View< reco::Track > > &tCH, const edm::Handle< TrackingParticleCollection > &tPCH) const
compare reco to sim the handle of reco::Track and TrackingParticle collections
const bool includeMVA_
std::string algoName() const
Definition: TrackBase.h:508
int stripLayersWithMeasurement() const
Definition: HitPattern.h:1035
std::vector< short > trk_isHP
bool isValid() const
int numberOfLostHits(HitCategory category) const
Definition: HitPattern.h:902
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:535
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:8
std::vector< float > trk_dxyClosestPV
int numberOfValidPixelHits() const
Definition: HitPattern.h:838
std::vector< float > trk_ndof
std::vector< unsigned int > trk_nPixelLay
const Point & position() const
position
Definition: BeamSpot.h:62
std::vector< int > see_trkIdx
Detector det() const
get the detector field from this detid
Definition: DetId.h:35
std::vector< float > trk_dxy
std::vector< unsigned int > trk_nInvalid
std::vector< decltype(reco::TrackBase().algoMaskUL())> trk_algoMask
std::vector< unsigned int > trk_nValid
std::vector< float > trk_inner_px
void TrackingNtuple::fillVertices ( const reco::VertexCollection vertices,
const edm::RefToBaseVector< reco::Track > &  tracks 
)
private

Definition at line 3103 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().

3104  {
3105  for(size_t iVertex=0, size=vertices.size(); iVertex<size; ++iVertex) {
3106  const reco::Vertex& vertex = vertices[iVertex];
3107  vtx_x.push_back(vertex.x());
3108  vtx_y.push_back(vertex.y());
3109  vtx_z.push_back(vertex.z());
3110  vtx_xErr.push_back(vertex.xError());
3111  vtx_yErr.push_back(vertex.yError());
3112  vtx_zErr.push_back(vertex.zError());
3113  vtx_chi2.push_back(vertex.chi2());
3114  vtx_ndof.push_back(vertex.ndof());
3115  vtx_fake.push_back(vertex.isFake());
3116  vtx_valid.push_back(vertex.isValid());
3117 
3118  std::vector<int> trkIdx;
3119  for(auto iTrack = vertex.tracks_begin(); iTrack != vertex.tracks_end(); ++iTrack) {
3120  // Ignore link if vertex was fit from a track collection different from the input
3121  if(iTrack->id() != tracks.id())
3122  continue;
3123 
3124  trkIdx.push_back(iTrack->key());
3125 
3126  if(trk_vtxIdx[iTrack->key()] != -1) {
3127  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;
3128  }
3129  trk_vtxIdx[iTrack->key()] = iVertex;
3130  }
3131  vtx_trkIdx.push_back(trkIdx);
3132  }
3133 }
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 1993 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().

2002  {
2003  SimHitData ret;
2004 
2005  std::map<unsigned int, double> simTrackIdToChargeFraction;
2006  if(hitType == HitType::Phase2OT) simTrackIdToChargeFraction = chargeFraction(cluster.phase2OTCluster(), hitId, digiSimLinks);
2007  else simTrackIdToChargeFraction = chargeFraction(GetCluster<SimLink>::call(cluster), hitId, digiSimLinks);
2008 
2009  ret.type = HitSimType::Noise;
2010  auto range = clusterToTPMap.equal_range( cluster );
2011  if( range.first != range.second ) {
2012  for( auto ip=range.first; ip != range.second; ++ip ) {
2013  const TrackingParticleRef& trackingParticle = ip->second;
2014 
2015  // Find out if the cluster is from signal/ITPU/OOTPU
2016  const auto event = trackingParticle->eventId().event();
2017  const auto bx = trackingParticle->eventId().bunchCrossing();
2019  if(bx == 0) {
2020  type = (event == 0 ? HitSimType::Signal : HitSimType::ITPileup);
2021  }
2022  ret.type = static_cast<HitSimType>(std::min(static_cast<int>(ret.type), static_cast<int>(type)));
2023 
2024  // Limit to only input TrackingParticles (usually signal+ITPU)
2025  auto tpIndex = tpKeyToIndex.find(trackingParticle.key());
2026  if( tpIndex == tpKeyToIndex.end())
2027  continue;
2028 
2029  //now get the corresponding sim hit
2030  std::pair<TrackingParticleRef, TrackPSimHitRef> simHitTPpairWithDummyTP(trackingParticle,TrackPSimHitRef());
2031  //SimHit is dummy: for simHitTPAssociationListGreater sorting only the TP is needed
2032  auto range = std::equal_range(simHitsTPAssoc.begin(), simHitsTPAssoc.end(),
2034  int simHitKey = -1;
2035  bool foundElectron = false;
2036  edm::ProductID simHitID;
2037  for(auto ip = range.first; ip != range.second; ++ip) {
2038  TrackPSimHitRef TPhit = ip->second;
2039  DetId dId = DetId(TPhit->detUnitId());
2040  if (dId.rawId()==hitId.rawId()) {
2041  // skip electron SimHits for non-electron TPs also here
2042  if(std::abs(TPhit->particleType()) == 11 && std::abs(trackingParticle->pdgId()) != 11) {
2043  foundElectron = true;
2044  continue;
2045  }
2046 
2047  simHitKey = TPhit.key();
2048  simHitID = TPhit.id();
2049  break;
2050  }
2051  }
2052  if(simHitKey < 0) {
2053  // In case we didn't find a simhit because of filtered-out
2054  // electron SimHit, just ignore the missing SimHit.
2055  if(foundElectron)
2056  continue;
2057 
2058  auto ex = cms::Exception("LogicError") << "Did not find SimHit for reco hit DetId " << hitId.rawId()
2059  << " for TP " << trackingParticle.key() << " bx:event " << bx << ":" << event
2060  << ".\nFound SimHits from detectors ";
2061  for(auto ip = range.first; ip != range.second; ++ip) {
2062  TrackPSimHitRef TPhit = ip->second;
2063  DetId dId = DetId(TPhit->detUnitId());
2064  ex << dId.rawId() << " ";
2065  }
2066  if(trackingParticle->eventId().event() != 0) {
2067  ex << "\nSince this is a TrackingParticle from pileup, check that you're running the pileup mixing in playback mode.";
2068  }
2069  throw ex;
2070  }
2071  auto simHitIndex = simHitRefKeyToIndex.at(std::make_pair(simHitKey, simHitID));
2072  ret.matchingSimHit.push_back(simHitIndex);
2073 
2074  double chargeFraction = 0.;
2075  for(const SimTrack& simtrk: trackingParticle->g4Tracks()) {
2076  auto found = simTrackIdToChargeFraction.find(simtrk.trackId());
2077  if(found != simTrackIdToChargeFraction.end()) {
2078  chargeFraction += found->second;
2079  }
2080  }
2081  ret.chargeFraction.push_back(chargeFraction);
2082 
2083  // only for debug prints
2084  ret.bunchCrossing.push_back(bx);
2085  ret.event.push_back(event);
2086 
2087  simhit_hitIdx[simHitIndex].push_back(clusterKey);
2088  simhit_hitType[simHitIndex].push_back(static_cast<int>(hitType));
2089  }
2090  }
2091 
2092  return ret;
2093 }
type
Definition: HCALResponse.h:21
Phase2TrackerCluster1D const & phase2OTCluster() const
std::vector< std::vector< int > > simhit_hitIdx
static bool simHitTPAssociationListGreater(SimHitTPPair i, SimHitTPPair j)
key_type key() const
Accessor for product key.
Definition: Ref.h:265
ProductID id() const
Accessor for product ID.
Definition: Ref.h:259
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
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 386 of file TrackingNtuple.cc.

References TrackingNtuple::TPHitIndex::tpKey.

Referenced by fillTrackingParticles().

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

Definition at line 387 of file TrackingNtuple.cc.

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

Referenced by analyze().

387  {
388  if(i.tpKey == j.tpKey) {
389  if(edm::isNotFinite(i.tof) && edm::isNotFinite(j.tof)) {
390  return i.detId < j.detId;
391  }
392  return i.tof < j.tof; // works as intended if either one is NaN
393  }
394  return i.tpKey < j.tpKey;
395  }
bool isNotFinite(T x)
Definition: isFinite.h:10

Member Data Documentation

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

Definition at line 528 of file TrackingNtuple.cc.

float TrackingNtuple::bsp_sigmax
private

Definition at line 1036 of file TrackingNtuple.cc.

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

float TrackingNtuple::bsp_sigmay
private

Definition at line 1037 of file TrackingNtuple.cc.

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

float TrackingNtuple::bsp_sigmaz
private

Definition at line 1038 of file TrackingNtuple.cc.

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

float TrackingNtuple::bsp_x
private

Definition at line 1033 of file TrackingNtuple.cc.

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

float TrackingNtuple::bsp_y
private

Definition at line 1034 of file TrackingNtuple.cc.

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

float TrackingNtuple::bsp_z
private

Definition at line 1035 of file TrackingNtuple.cc.

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

std::string TrackingNtuple::builderName_
private

Definition at line 539 of file TrackingNtuple.cc.

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

Definition at line 521 of file TrackingNtuple.cc.

edm::EventNumber_t TrackingNtuple::ev_event
private

Definition at line 827 of file TrackingNtuple.cc.

edm::LuminosityBlockNumber_t TrackingNtuple::ev_lumi
private

Definition at line 826 of file TrackingNtuple.cc.

edm::RunNumber_t TrackingNtuple::ev_run
private

Definition at line 825 of file TrackingNtuple.cc.

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

Definition at line 985 of file TrackingNtuple.cc.

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

DetIdStrip TrackingNtuple::glu_detId
private

Definition at line 971 of file TrackingNtuple.cc.

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

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

Definition at line 970 of file TrackingNtuple.cc.

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

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

Definition at line 972 of file TrackingNtuple.cc.

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

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

Definition at line 984 of file TrackingNtuple.cc.

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

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

Definition at line 974 of file TrackingNtuple.cc.

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

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

Definition at line 973 of file TrackingNtuple.cc.

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

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

Definition at line 975 of file TrackingNtuple.cc.

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

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

Definition at line 978 of file TrackingNtuple.cc.

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

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

Definition at line 979 of file TrackingNtuple.cc.

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

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

Definition at line 976 of file TrackingNtuple.cc.

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

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

Definition at line 980 of file TrackingNtuple.cc.

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

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

Definition at line 981 of file TrackingNtuple.cc.

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

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

Definition at line 977 of file TrackingNtuple.cc.

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

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

Definition at line 983 of file TrackingNtuple.cc.

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

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

Definition at line 982 of file TrackingNtuple.cc.

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

const bool TrackingNtuple::includeAllHits_
private

Definition at line 542 of file TrackingNtuple.cc.

const bool TrackingNtuple::includeMVA_
private

Definition at line 543 of file TrackingNtuple.cc.

bool TrackingNtuple::includePhase2OTHits_
private

Definition at line 527 of file TrackingNtuple.cc.

const bool TrackingNtuple::includeSeeds_
private

Definition at line 541 of file TrackingNtuple.cc.

bool TrackingNtuple::includeStripHits_
private

Definition at line 527 of file TrackingNtuple.cc.

const bool TrackingNtuple::includeTrackingParticles_
private

Definition at line 544 of file TrackingNtuple.cc.

DetIdAll TrackingNtuple::inv_detId
private

Definition at line 1012 of file TrackingNtuple.cc.

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

DetIdAllPhase2 TrackingNtuple::inv_detId_phase2
private

Definition at line 1013 of file TrackingNtuple.cc.

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

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

Definition at line 1011 of file TrackingNtuple.cc.

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

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

Definition at line 1014 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 518 of file TrackingNtuple.cc.

std::string TrackingNtuple::parametersDefinerName_
private

Definition at line 540 of file TrackingNtuple.cc.

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

Definition at line 1006 of file TrackingNtuple.cc.

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

DetIdPhase2OT TrackingNtuple::ph2_detId
private

Definition at line 990 of file TrackingNtuple.cc.

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

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

Definition at line 989 of file TrackingNtuple.cc.

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

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

Definition at line 1005 of file TrackingNtuple.cc.

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

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

Definition at line 992 of file TrackingNtuple.cc.

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

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

Definition at line 993 of file TrackingNtuple.cc.

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

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

Definition at line 995 of file TrackingNtuple.cc.

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

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

Definition at line 991 of file TrackingNtuple.cc.

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

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

Definition at line 996 of file TrackingNtuple.cc.

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

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

Definition at line 999 of file TrackingNtuple.cc.

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

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

Definition at line 1000 of file TrackingNtuple.cc.

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

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

Definition at line 997 of file TrackingNtuple.cc.

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

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

Definition at line 1001 of file TrackingNtuple.cc.

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

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

Definition at line 1002 of file TrackingNtuple.cc.

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

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

Definition at line 998 of file TrackingNtuple.cc.

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

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

Definition at line 1004 of file TrackingNtuple.cc.

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

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

Definition at line 1003 of file TrackingNtuple.cc.

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

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

Definition at line 533 of file TrackingNtuple.cc.

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

Definition at line 945 of file TrackingNtuple.cc.

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

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

Definition at line 933 of file TrackingNtuple.cc.

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

DetIdPixel TrackingNtuple::pix_detId
private

Definition at line 929 of file TrackingNtuple.cc.

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

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

Definition at line 928 of file TrackingNtuple.cc.

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

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

Definition at line 944 of file TrackingNtuple.cc.

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

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

Definition at line 931 of file TrackingNtuple.cc.

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

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

Definition at line 932 of file TrackingNtuple.cc.

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

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

Definition at line 934 of file TrackingNtuple.cc.

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

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

Definition at line 930 of file TrackingNtuple.cc.

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

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

Definition at line 935 of file TrackingNtuple.cc.

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

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

Definition at line 938 of file TrackingNtuple.cc.

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

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

Definition at line 939 of file TrackingNtuple.cc.

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

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

Definition at line 936 of file TrackingNtuple.cc.

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

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

Definition at line 940 of file TrackingNtuple.cc.

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

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

Definition at line 941 of file TrackingNtuple.cc.

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

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

Definition at line 937 of file TrackingNtuple.cc.

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

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

Definition at line 943 of file TrackingNtuple.cc.

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

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

Definition at line 942 of file TrackingNtuple.cc.

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

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

Definition at line 529 of file TrackingNtuple.cc.

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

Definition at line 524 of file TrackingNtuple.cc.

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

Definition at line 1069 of file TrackingNtuple.cc.

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

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

Definition at line 1056 of file TrackingNtuple.cc.

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

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

Definition at line 1049 of file TrackingNtuple.cc.

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

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

Definition at line 1054 of file TrackingNtuple.cc.

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

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

Definition at line 1050 of file TrackingNtuple.cc.

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

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

Definition at line 1055 of file TrackingNtuple.cc.

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

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

Definition at line 1047 of file TrackingNtuple.cc.

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

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

Definition at line 1052 of file TrackingNtuple.cc.

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

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

Definition at line 1042 of file TrackingNtuple.cc.

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

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

Definition at line 1076 of file TrackingNtuple.cc.

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

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

Definition at line 1077 of file TrackingNtuple.cc.

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

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

Definition at line 1073 of file TrackingNtuple.cc.

Referenced by fillSeeds(), and TrackingNtuple().

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

Definition at line 1071 of file TrackingNtuple.cc.

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

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

Definition at line 1066 of file TrackingNtuple.cc.

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

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

Definition at line 1068 of file TrackingNtuple.cc.

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

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

Definition at line 1065 of file TrackingNtuple.cc.

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

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

Definition at line 1067 of file TrackingNtuple.cc.

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

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

Definition at line 1064 of file TrackingNtuple.cc.

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

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

Definition at line 1079 of file TrackingNtuple.cc.

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

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

Definition at line 1048 of file TrackingNtuple.cc.

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

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

Definition at line 1053 of file TrackingNtuple.cc.

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

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

Definition at line 1046 of file TrackingNtuple.cc.

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

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

Definition at line 1051 of file TrackingNtuple.cc.

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

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

Definition at line 1043 of file TrackingNtuple.cc.

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

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

Definition at line 1044 of file TrackingNtuple.cc.

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

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

Definition at line 1045 of file TrackingNtuple.cc.

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

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

Definition at line 1063 of file TrackingNtuple.cc.

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

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

Definition at line 1074 of file TrackingNtuple.cc.

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

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

Definition at line 1075 of file TrackingNtuple.cc.

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

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

Definition at line 1057 of file TrackingNtuple.cc.

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

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

Definition at line 1060 of file TrackingNtuple.cc.

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

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

Definition at line 1061 of file TrackingNtuple.cc.

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

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

Definition at line 1062 of file TrackingNtuple.cc.

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

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

Definition at line 1058 of file TrackingNtuple.cc.

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

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

Definition at line 1059 of file TrackingNtuple.cc.

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

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

Definition at line 1070 of file TrackingNtuple.cc.

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

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

Definition at line 1072 of file TrackingNtuple.cc.

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

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

Definition at line 516 of file TrackingNtuple.cc.

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

Definition at line 515 of file TrackingNtuple.cc.

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

Definition at line 895 of file TrackingNtuple.cc.

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

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

Definition at line 923 of file TrackingNtuple.cc.

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

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

Definition at line 903 of file TrackingNtuple.cc.

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

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

Definition at line 894 of file TrackingNtuple.cc.

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

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

Definition at line 897 of file TrackingNtuple.cc.

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

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

Definition at line 898 of file TrackingNtuple.cc.

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

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

Definition at line 918 of file TrackingNtuple.cc.

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

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

Definition at line 916 of file TrackingNtuple.cc.

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

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

Definition at line 914 of file TrackingNtuple.cc.

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

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

Definition at line 917 of file TrackingNtuple.cc.

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

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

Definition at line 915 of file TrackingNtuple.cc.

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

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

Definition at line 913 of file TrackingNtuple.cc.

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

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

Definition at line 922 of file TrackingNtuple.cc.

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

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

Definition at line 908 of file TrackingNtuple.cc.

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

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

Definition at line 910 of file TrackingNtuple.cc.

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

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

Definition at line 911 of file TrackingNtuple.cc.

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

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

Definition at line 906 of file TrackingNtuple.cc.

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

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

Definition at line 907 of file TrackingNtuple.cc.

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

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

Definition at line 909 of file TrackingNtuple.cc.

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

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

Definition at line 905 of file TrackingNtuple.cc.

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

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

Definition at line 896 of file TrackingNtuple.cc.

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

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

Definition at line 904 of file TrackingNtuple.cc.

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

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

Definition at line 902 of file TrackingNtuple.cc.

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

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

Definition at line 899 of file TrackingNtuple.cc.

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

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

Definition at line 900 of file TrackingNtuple.cc.

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

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

Definition at line 901 of file TrackingNtuple.cc.

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

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

Definition at line 912 of file TrackingNtuple.cc.

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

std::vector<std::vector<int> > TrackingNtuple::sim_seedIdx
private
std::vector<std::vector<float> > TrackingNtuple::sim_shareFrac
private

Definition at line 920 of file TrackingNtuple.cc.

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

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

Definition at line 924 of file TrackingNtuple.cc.

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

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

Definition at line 919 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 1029 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 1028 of file TrackingNtuple.cc.

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

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

Definition at line 1026 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 522 of file TrackingNtuple.cc.

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

Definition at line 1108 of file TrackingNtuple.cc.

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

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

Definition at line 1101 of file TrackingNtuple.cc.

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

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

Definition at line 1107 of file TrackingNtuple.cc.

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

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

Definition at line 1100 of file TrackingNtuple.cc.

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

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

Definition at line 1102 of file TrackingNtuple.cc.

Referenced by fillTrackingVertices(), and TrackingNtuple().

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

Definition at line 1106 of file TrackingNtuple.cc.

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

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

Definition at line 1103 of file TrackingNtuple.cc.

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

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

Definition at line 1104 of file TrackingNtuple.cc.

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

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

Definition at line 1105 of file TrackingNtuple.cc.

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

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

Definition at line 526 of file TrackingNtuple.cc.

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

Definition at line 966 of file TrackingNtuple.cc.

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

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

Definition at line 954 of file TrackingNtuple.cc.

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

DetIdStrip TrackingNtuple::str_detId
private

Definition at line 950 of file TrackingNtuple.cc.

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

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

Definition at line 949 of file TrackingNtuple.cc.

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

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

Definition at line 965 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 953 of file TrackingNtuple.cc.

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

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

Definition at line 955 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 956 of file TrackingNtuple.cc.

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

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

Definition at line 959 of file TrackingNtuple.cc.

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

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

Definition at line 960 of file TrackingNtuple.cc.

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

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

Definition at line 957 of file TrackingNtuple.cc.

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

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

Definition at line 961 of file TrackingNtuple.cc.

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

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

Definition at line 962 of file TrackingNtuple.cc.

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

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

Definition at line 958 of file TrackingNtuple.cc.

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

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

Definition at line 964 of file TrackingNtuple.cc.

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

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

Definition at line 963 of file TrackingNtuple.cc.

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

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

Definition at line 532 of file TrackingNtuple.cc.

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

Definition at line 530 of file TrackingNtuple.cc.

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

Definition at line 525 of file TrackingNtuple.cc.

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

Definition at line 531 of file TrackingNtuple.cc.

TTree* TrackingNtuple::t
private

Definition at line 548 of file TrackingNtuple.cc.

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

Definition at line 536 of file TrackingNtuple.cc.

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

Definition at line 537 of file TrackingNtuple.cc.

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

Definition at line 538 of file TrackingNtuple.cc.

HistoryBase TrackingNtuple::tracer_
private

Definition at line 546 of file TrackingNtuple.cc.

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

Definition at line 523 of file TrackingNtuple.cc.

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

Definition at line 520 of file TrackingNtuple.cc.

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

Definition at line 519 of file TrackingNtuple.cc.

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

Definition at line 535 of file TrackingNtuple.cc.

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

Definition at line 517 of file TrackingNtuple.cc.

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

Definition at line 879 of file TrackingNtuple.cc.

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

Definition at line 881 of file TrackingNtuple.cc.

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

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

Definition at line 846 of file TrackingNtuple.cc.

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

Definition at line 848 of file TrackingNtuple.cc.

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

Definition at line 852 of file TrackingNtuple.cc.

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

Definition at line 858 of file TrackingNtuple.cc.

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

Definition at line 850 of file TrackingNtuple.cc.

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

Definition at line 849 of file TrackingNtuple.cc.

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

Definition at line 853 of file TrackingNtuple.cc.

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

Definition at line 859 of file TrackingNtuple.cc.

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

Definition at line 851 of file TrackingNtuple.cc.

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

Definition at line 844 of file TrackingNtuple.cc.

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

Definition at line 855 of file TrackingNtuple.cc.

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

Definition at line 889 of file TrackingNtuple.cc.

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

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

Definition at line 890 of file TrackingNtuple.cc.

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

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

Definition at line 839 of file TrackingNtuple.cc.

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

Definition at line 836 of file TrackingNtuple.cc.

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

Definition at line 837 of file TrackingNtuple.cc.

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

Definition at line 838 of file TrackingNtuple.cc.

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

Definition at line 883 of file TrackingNtuple.cc.

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

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

Definition at line 886 of file TrackingNtuple.cc.

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

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

Definition at line 845 of file TrackingNtuple.cc.

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

Definition at line 856 of file TrackingNtuple.cc.

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

Definition at line 866 of file TrackingNtuple.cc.

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

Definition at line 877 of file TrackingNtuple.cc.

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

Definition at line 863 of file TrackingNtuple.cc.

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

Definition at line 864 of file TrackingNtuple.cc.

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

Definition at line 865 of file TrackingNtuple.cc.

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

Definition at line 874 of file TrackingNtuple.cc.

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

Definition at line 870 of file TrackingNtuple.cc.

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

Definition at line 878 of file TrackingNtuple.cc.

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

Definition at line 873 of file TrackingNtuple.cc.

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

Definition at line 871 of file TrackingNtuple.cc.

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

Definition at line 875 of file TrackingNtuple.cc.

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

Definition at line 872 of file TrackingNtuple.cc.

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

Definition at line 876 of file TrackingNtuple.cc.

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

Definition at line 869 of file TrackingNtuple.cc.

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

Definition at line 880 of file TrackingNtuple.cc.

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

Definition at line 843 of file TrackingNtuple.cc.

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

Definition at line 840 of file TrackingNtuple.cc.

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

Definition at line 841 of file TrackingNtuple.cc.

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

Definition at line 842 of file TrackingNtuple.cc.

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

Definition at line 847 of file TrackingNtuple.cc.

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

Definition at line 857 of file TrackingNtuple.cc.

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

Definition at line 835 of file TrackingNtuple.cc.

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

Definition at line 854 of file TrackingNtuple.cc.

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

Definition at line 832 of file TrackingNtuple.cc.

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

Definition at line 833 of file TrackingNtuple.cc.

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

Definition at line 834 of file TrackingNtuple.cc.

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

Definition at line 868 of file TrackingNtuple.cc.

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

Definition at line 867 of file TrackingNtuple.cc.

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

Definition at line 860 of file TrackingNtuple.cc.

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

Definition at line 861 of file TrackingNtuple.cc.

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

Definition at line 862 of file TrackingNtuple.cc.

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

Definition at line 884 of file TrackingNtuple.cc.

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

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

Definition at line 887 of file TrackingNtuple.cc.

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

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

Definition at line 888 of file TrackingNtuple.cc.

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

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

Definition at line 882 of file TrackingNtuple.cc.

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

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

Definition at line 885 of file TrackingNtuple.cc.

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

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

Definition at line 534 of file TrackingNtuple.cc.

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

Definition at line 1092 of file TrackingNtuple.cc.

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

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

Definition at line 1093 of file TrackingNtuple.cc.

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

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

Definition at line 1091 of file TrackingNtuple.cc.

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

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

Definition at line 1095 of file TrackingNtuple.cc.

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

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

Definition at line 1094 of file TrackingNtuple.cc.

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

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

Definition at line 1085 of file TrackingNtuple.cc.

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

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

Definition at line 1088 of file TrackingNtuple.cc.

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

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

Definition at line 1086 of file TrackingNtuple.cc.

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

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

Definition at line 1089 of file TrackingNtuple.cc.

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

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

Definition at line 1087 of file TrackingNtuple.cc.

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

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

Definition at line 1090 of file TrackingNtuple.cc.

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