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

struct  SimHitData
 
struct  TPHitIndex
 

Public Member Functions

 TrackingNtuple (const edm::ParameterSet &)
 
 ~TrackingNtuple ()
 
- 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
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 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 & itemsToGetFromEvent () 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

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
}
 
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

virtual 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 TrackingParticleRefVector &tpCollection, const TrackingVertexRefKeyToIndex &tvKeyToIndex, const reco::TrackToTrackingParticleAssociator &associatorByHits, const std::vector< TPHitIndex > &tpHitList)
 
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::TrackToTrackingParticleAssociator &associatorByHits, const TransientTrackingRecHitBuilder &theTTRHBuilder, const TrackerTopology &tTopo, const std::set< edm::ProductID > &hitProductIds, const std::map< edm::ProductID, size_t > &seedToCollIndex)
 
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
 
std::vector< unsigned int > glu_det
 
std::vector< unsigned int > glu_detId
 
std::vector< short > glu_isBarrel
 
std::vector< unsigned int > glu_lay
 
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_
 
bool includePhase2OTHits_
 
const bool includeSeeds_
 
bool includeStripHits_
 
std::vector< unsigned short > inv_det
 
std::vector< unsigned int > inv_detId
 
std::vector< short > inv_isBarrel
 
std::vector< unsigned short > inv_lay
 
std::vector< unsigned short > inv_type
 
std::string parametersDefinerName_
 
std::vector< float > ph2_bbxi
 
std::vector< unsigned short > ph2_det
 
std::vector< unsigned int > ph2_detId
 
std::vector< short > ph2_isBarrel
 
std::vector< unsigned short > ph2_lay
 
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
 
std::vector< unsigned short > pix_det
 
std::vector< unsigned int > pix_detId
 
std::vector< short > pix_isBarrel
 
std::vector< unsigned short > pix_lay
 
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< 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< int > see_trkIdx
 
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< 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< float > > sim_shareFrac
 
std::vector< std::vector< int > > sim_simHitIdx
 
std::vector< std::vector< int > > sim_trkIdx
 
std::vector< unsigned short > simhit_det
 
std::vector< unsigned int > simhit_detId
 
std::vector< float > simhit_eloss
 
std::vector< std::vector< int > > simhit_hitIdx
 
std::vector< std::vector< int > > simhit_hitType
 
std::vector< unsigned short > simhit_lay
 
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
 
std::vector< unsigned short > str_det
 
std::vector< unsigned int > str_detId
 
std::vector< short > str_isBarrel
 
std::vector< short > str_isStereo
 
std::vector< unsigned short > str_lay
 
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_
 
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_dxyErr
 
std::vector< float > trk_dz
 
std::vector< float > trk_dzErr
 
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< float > trk_lambda
 
std::vector< float > trk_lambdaErr
 
std::vector< unsigned int > trk_n3DLay
 
std::vector< float > trk_nChi2
 
std::vector< unsigned int > trk_nInnerLost
 
std::vector< unsigned int > trk_nInvalid
 
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< 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 int > 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 264 of file TrackingNtuple.cc.

Member Typedef Documentation

Definition at line 282 of file TrackingNtuple.cc.

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

Definition at line 283 of file TrackingNtuple.cc.

Definition at line 279 of file TrackingNtuple.cc.

Definition at line 280 of file TrackingNtuple.cc.

Definition at line 281 of file TrackingNtuple.cc.

Member Enumeration Documentation

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

Definition at line 298 of file TrackingNtuple.cc.

298  {
299  Signal = 0,
300  ITPileup = 1,
301  OOTPileup = 2,
302  Noise = 3,
303  Unknown = 99
304  };
Definition: vlib.h:39
enum TrackingNtuple::HitType
strongprivate
Enumerator
Pixel 
Strip 
Glued 
Invalid 
Phase2OT 
Unknown 

Definition at line 285 of file TrackingNtuple.cc.

285  {
286  Pixel = 0,
287  Strip = 1,
288  Glued = 2,
289  Invalid = 3,
290  Phase2OT = 4,
291  Unknown = 99
292  };

Constructor & Destructor Documentation

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

Definition at line 739 of file TrackingNtuple.cc.

References beamSpotToken_, bsp_sigmax, bsp_sigmay, bsp_sigmaz, bsp_x, bsp_y, bsp_z, builderName_, clusterTPMapToken_, edm::EDConsumerBase::consumes(), glu_bbxi, glu_det, glu_detId, glu_isBarrel, glu_lay, 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, includeAllHits_, includePhase2OTHits_, includeSeeds_, includeStripHits_, inv_det, inv_detId, inv_isBarrel, inv_lay, inv_type, TFileService::kSharedResource, edm::InputTag::label(), TFileService::make(), parametersDefinerName_, ph2_bbxi, ph2_det, ph2_detId, ph2_isBarrel, ph2_lay, 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, phase2OTRecHitToken_, pix_bbxi, pix_chargeFraction, pix_det, pix_detId, pix_isBarrel, pix_lay, 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, pixelRecHitToken_, pixelSimLinkToken_, see_algo, see_chi2, see_dxy, see_dxyErr, see_dz, see_dzErr, see_eta, see_etaErr, see_fitok, see_hitIdx, see_hitType, 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_trkIdx, sim_bunchCrossing, sim_decayVtxIdx, sim_eta, sim_event, 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_det, simhit_detId, simhit_eloss, simhit_hitIdx, simhit_hitType, simhit_lay, simhit_particle, simhit_process, simhit_simTrkIdx, simhit_tof, simhit_x, simhit_y, simhit_z, simHitTPMapToken_, simpv_idx, simvtx_bunchCrossing, simvtx_daughterSimIdx, simvtx_event, simvtx_processType, simvtx_sourceSimIdx, simvtx_x, simvtx_y, simvtx_z, siphase2OTSimLinksToken_, str_bbxi, str_chargeFraction, str_det, str_detId, str_isBarrel, str_isStereo, str_lay, 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, stripMatchedRecHitToken_, stripRphiRecHitToken_, stripSimLinkToken_, stripStereoRecHitToken_, GlobalPosition_Frontier_DevDB_cff::tag, tpNLayersToken_, tpNPixelLayersToken_, tpNStripStereoLayersToken_, MuonAssociatorByHits_cfi::tpTag, trackAssociatorToken_, trackingVertexToken_, trackToken_, trk_algoMask, trk_hitIdx, trk_hitType, trk_isHP, trk_seedIdx, trk_shareFrac, trk_simTrkIdx, trk_stopReason, trk_vtxIdx, vertexToken_, vtx_chi2, vtx_fake, vtx_ndof, vtx_trkIdx, vtx_valid, vtx_x, vtx_xErr, vtx_y, vtx_yErr, vtx_z, and vtx_zErr.

739  :
740  seedTokens_(edm::vector_transform(iConfig.getUntrackedParameter<std::vector<edm::InputTag> >("seedTracks"), [&](const edm::InputTag& tag) {
741  return consumes<edm::View<reco::Track> >(tag);
742  })),
744  clusterTPMapToken_(consumes<ClusterTPAssociation>(iConfig.getUntrackedParameter<edm::InputTag>("clusterTPMap"))),
745  simHitTPMapToken_(consumes<SimHitTPAssociationProducer::SimHitTPAssociationList>(iConfig.getUntrackedParameter<edm::InputTag>("simHitTPMap"))),
746  trackAssociatorToken_(consumes<reco::TrackToTrackingParticleAssociator>(iConfig.getUntrackedParameter<edm::InputTag>("trackAssociator"))),
750  includeStripHits_(iConfig.getUntrackedParameter<edm::InputTag>("stripDigiSimLink").label() != ""),
751  includePhase2OTHits_(iConfig.getUntrackedParameter<edm::InputTag>("phase2OTSimLink").label() != ""),
752  beamSpotToken_(consumes<reco::BeamSpot>(iConfig.getUntrackedParameter<edm::InputTag>("beamSpot"))),
753  pixelRecHitToken_(consumes<SiPixelRecHitCollection>(iConfig.getUntrackedParameter<edm::InputTag>("pixelRecHits"))),
754  stripRphiRecHitToken_(consumes<SiStripRecHit2DCollection>(iConfig.getUntrackedParameter<edm::InputTag>("stripRphiRecHits"))),
755  stripStereoRecHitToken_(consumes<SiStripRecHit2DCollection>(iConfig.getUntrackedParameter<edm::InputTag>("stripStereoRecHits"))),
756  stripMatchedRecHitToken_(consumes<SiStripMatchedRecHit2DCollection>(iConfig.getUntrackedParameter<edm::InputTag>("stripMatchedRecHits"))),
757  phase2OTRecHitToken_(consumes<Phase2TrackerRecHit1DCollectionNew>(iConfig.getUntrackedParameter<edm::InputTag>("phase2OTRecHits"))),
758  vertexToken_(consumes<reco::VertexCollection>(iConfig.getUntrackedParameter<edm::InputTag>("vertices"))),
759  trackingVertexToken_(consumes<TrackingVertexCollection>(iConfig.getUntrackedParameter<edm::InputTag>("trackingVertices"))),
763  builderName_(iConfig.getUntrackedParameter<std::string>("TTRHBuilder")),
764  parametersDefinerName_(iConfig.getUntrackedParameter<std::string>("parametersDefiner")),
765  includeSeeds_(iConfig.getUntrackedParameter<bool>("includeSeeds")),
766  includeAllHits_(iConfig.getUntrackedParameter<bool>("includeAllHits"))
767 {
768  const bool tpRef = iConfig.getUntrackedParameter<bool>("trackingParticlesRef");
769  const auto tpTag = iConfig.getUntrackedParameter<edm::InputTag>("trackingParticles");
770  if(tpRef) {
771  trackingParticleRefToken_ = consumes<TrackingParticleRefVector>(tpTag);
772  }
773  else {
774  trackingParticleToken_ = consumes<TrackingParticleCollection>(tpTag);
775  }
776 
777  usesResource(TFileService::kSharedResource);
779  t = fs->make<TTree>("tree","tree");
780 
781  t->Branch("event" , &ev_event);
782  t->Branch("lumi" , &ev_lumi);
783  t->Branch("run" , &ev_run);
784 
785  //tracks
786  t->Branch("trk_px" , &trk_px);
787  t->Branch("trk_py" , &trk_py);
788  t->Branch("trk_pz" , &trk_pz);
789  t->Branch("trk_pt" , &trk_pt);
790  t->Branch("trk_inner_px" , &trk_inner_px);
791  t->Branch("trk_inner_py" , &trk_inner_py);
792  t->Branch("trk_inner_pz" , &trk_inner_pz);
793  t->Branch("trk_inner_pt" , &trk_inner_pt);
794  t->Branch("trk_outer_px" , &trk_outer_px);
795  t->Branch("trk_outer_py" , &trk_outer_py);
796  t->Branch("trk_outer_pz" , &trk_outer_pz);
797  t->Branch("trk_outer_pt" , &trk_outer_pt);
798  t->Branch("trk_eta" , &trk_eta);
799  t->Branch("trk_lambda" , &trk_lambda);
800  t->Branch("trk_cotTheta" , &trk_cotTheta);
801  t->Branch("trk_phi" , &trk_phi);
802  t->Branch("trk_dxy" , &trk_dxy );
803  t->Branch("trk_dz" , &trk_dz );
804  t->Branch("trk_ptErr" , &trk_ptErr );
805  t->Branch("trk_etaErr" , &trk_etaErr );
806  t->Branch("trk_lambdaErr", &trk_lambdaErr);
807  t->Branch("trk_phiErr" , &trk_phiErr );
808  t->Branch("trk_dxyErr" , &trk_dxyErr );
809  t->Branch("trk_dzErr" , &trk_dzErr );
810  t->Branch("trk_refpoint_x", &trk_refpoint_x);
811  t->Branch("trk_refpoint_y", &trk_refpoint_y);
812  t->Branch("trk_refpoint_z", &trk_refpoint_z);
813  t->Branch("trk_nChi2" , &trk_nChi2);
814  t->Branch("trk_q" , &trk_q);
815  t->Branch("trk_nValid" , &trk_nValid );
816  t->Branch("trk_nInvalid" , &trk_nInvalid);
817  t->Branch("trk_nPixel" , &trk_nPixel );
818  t->Branch("trk_nStrip" , &trk_nStrip );
819  t->Branch("trk_nPixelLay", &trk_nPixelLay);
820  t->Branch("trk_nStripLay", &trk_nStripLay);
821  t->Branch("trk_n3DLay" , &trk_n3DLay );
822  t->Branch("trk_nOuterLost", &trk_nOuterLost );
823  t->Branch("trk_nInnerLost", &trk_nInnerLost );
824  t->Branch("trk_algo" , &trk_algo );
825  t->Branch("trk_originalAlgo", &trk_originalAlgo);
826  t->Branch("trk_algoMask" , &trk_algoMask);
827  t->Branch("trk_stopReason", &trk_stopReason);
828  t->Branch("trk_isHP" , &trk_isHP );
829  if(includeSeeds_) {
830  t->Branch("trk_seedIdx" , &trk_seedIdx );
831  }
832  t->Branch("trk_vtxIdx" , &trk_vtxIdx);
833  t->Branch("trk_shareFrac", &trk_shareFrac);
834  t->Branch("trk_simTrkIdx", &trk_simTrkIdx );
835  if(includeAllHits_) {
836  t->Branch("trk_hitIdx" , &trk_hitIdx);
837  t->Branch("trk_hitType", &trk_hitType);
838  }
839  //sim tracks
840  t->Branch("sim_event" , &sim_event );
841  t->Branch("sim_bunchCrossing", &sim_bunchCrossing);
842  t->Branch("sim_pdgId" , &sim_pdgId );
843  t->Branch("sim_px" , &sim_px );
844  t->Branch("sim_py" , &sim_py );
845  t->Branch("sim_pz" , &sim_pz );
846  t->Branch("sim_pt" , &sim_pt );
847  t->Branch("sim_eta" , &sim_eta );
848  t->Branch("sim_phi" , &sim_phi );
849  t->Branch("sim_pca_pt" , &sim_pca_pt );
850  t->Branch("sim_pca_eta" , &sim_pca_eta );
851  t->Branch("sim_pca_lambda", &sim_pca_lambda);
852  t->Branch("sim_pca_cotTheta", &sim_pca_cotTheta);
853  t->Branch("sim_pca_phi" , &sim_pca_phi );
854  t->Branch("sim_pca_dxy" , &sim_pca_dxy );
855  t->Branch("sim_pca_dz" , &sim_pca_dz );
856  t->Branch("sim_q" , &sim_q );
857  t->Branch("sim_nValid" , &sim_nValid );
858  t->Branch("sim_nPixel" , &sim_nPixel );
859  t->Branch("sim_nStrip" , &sim_nStrip );
860  t->Branch("sim_nLay" , &sim_nLay );
861  t->Branch("sim_nPixelLay", &sim_nPixelLay);
862  t->Branch("sim_n3DLay" , &sim_n3DLay );
863  t->Branch("sim_trkIdx" , &sim_trkIdx );
864  t->Branch("sim_shareFrac", &sim_shareFrac);
865  t->Branch("sim_parentVtxIdx", &sim_parentVtxIdx);
866  t->Branch("sim_decayVtxIdx", &sim_decayVtxIdx);
867  if(includeAllHits_) {
868  t->Branch("sim_simHitIdx" , &sim_simHitIdx );
869  }
870  if(includeAllHits_) {
871  //pixels
872  t->Branch("pix_isBarrel" , &pix_isBarrel );
873  t->Branch("pix_det" , &pix_det );
874  t->Branch("pix_lay" , &pix_lay );
875  t->Branch("pix_detId" , &pix_detId );
876  t->Branch("pix_trkIdx" , &pix_trkIdx );
877  if(includeSeeds_) {
878  t->Branch("pix_seeIdx" , &pix_seeIdx );
879  }
880  t->Branch("pix_simHitIdx" , &pix_simHitIdx);
881  t->Branch("pix_chargeFraction", &pix_chargeFraction);
882  t->Branch("pix_simType", &pix_simType);
883  t->Branch("pix_x" , &pix_x );
884  t->Branch("pix_y" , &pix_y );
885  t->Branch("pix_z" , &pix_z );
886  t->Branch("pix_xx" , &pix_xx );
887  t->Branch("pix_xy" , &pix_xy );
888  t->Branch("pix_yy" , &pix_yy );
889  t->Branch("pix_yz" , &pix_yz );
890  t->Branch("pix_zz" , &pix_zz );
891  t->Branch("pix_zx" , &pix_zx );
892  t->Branch("pix_radL" , &pix_radL );
893  t->Branch("pix_bbxi" , &pix_bbxi );
894  t->Branch("pix_bbxi" , &pix_bbxi );
895  //strips
896  if(includeStripHits_){
897  t->Branch("str_isBarrel" , &str_isBarrel );
898  t->Branch("str_isStereo" , &str_isStereo );
899  t->Branch("str_det" , &str_det );
900  t->Branch("str_lay" , &str_lay );
901  t->Branch("str_detId" , &str_detId );
902  t->Branch("str_trkIdx" , &str_trkIdx );
903  if(includeSeeds_) {
904  t->Branch("str_seeIdx" , &str_seeIdx );
905  }
906  t->Branch("str_simHitIdx" , &str_simHitIdx);
907  t->Branch("str_chargeFraction", &str_chargeFraction);
908  t->Branch("str_simType", &str_simType);
909  t->Branch("str_x" , &str_x );
910  t->Branch("str_y" , &str_y );
911  t->Branch("str_z" , &str_z );
912  t->Branch("str_xx" , &str_xx );
913  t->Branch("str_xy" , &str_xy );
914  t->Branch("str_yy" , &str_yy );
915  t->Branch("str_yz" , &str_yz );
916  t->Branch("str_zz" , &str_zz );
917  t->Branch("str_zx" , &str_zx );
918  t->Branch("str_radL" , &str_radL );
919  t->Branch("str_bbxi" , &str_bbxi );
920  //matched hits
921  t->Branch("glu_isBarrel" , &glu_isBarrel );
922  t->Branch("glu_det" , &glu_det );
923  t->Branch("glu_lay" , &glu_lay );
924  t->Branch("glu_detId" , &glu_detId );
925  t->Branch("glu_monoIdx" , &glu_monoIdx );
926  t->Branch("glu_stereoIdx" , &glu_stereoIdx);
927  if(includeSeeds_) {
928  t->Branch("glu_seeIdx" , &glu_seeIdx );
929  }
930  t->Branch("glu_x" , &glu_x );
931  t->Branch("glu_y" , &glu_y );
932  t->Branch("glu_z" , &glu_z );
933  t->Branch("glu_xx" , &glu_xx );
934  t->Branch("glu_xy" , &glu_xy );
935  t->Branch("glu_yy" , &glu_yy );
936  t->Branch("glu_yz" , &glu_yz );
937  t->Branch("glu_zz" , &glu_zz );
938  t->Branch("glu_zx" , &glu_zx );
939  t->Branch("glu_radL" , &glu_radL );
940  t->Branch("glu_bbxi" , &glu_bbxi );
941  }
942  //phase2 OT
944  t->Branch("ph2_isBarrel" , &ph2_isBarrel );
945  t->Branch("ph2_det" , &ph2_det );
946  t->Branch("ph2_lay" , &ph2_lay );
947  t->Branch("ph2_detId" , &ph2_detId );
948  t->Branch("ph2_trkIdx" , &ph2_trkIdx );
949  if(includeSeeds_) {
950  t->Branch("ph2_seeIdx" , &ph2_seeIdx );
951  }
952  t->Branch("ph2_simHitIdx" , &ph2_simHitIdx);
953  t->Branch("ph2_simType", &ph2_simType);
954  t->Branch("ph2_x" , &ph2_x );
955  t->Branch("ph2_y" , &ph2_y );
956  t->Branch("ph2_z" , &ph2_z );
957  t->Branch("ph2_xx" , &ph2_xx );
958  t->Branch("ph2_xy" , &ph2_xy );
959  t->Branch("ph2_yy" , &ph2_yy );
960  t->Branch("ph2_yz" , &ph2_yz );
961  t->Branch("ph2_zz" , &ph2_zz );
962  t->Branch("ph2_zx" , &ph2_zx );
963  t->Branch("ph2_radL" , &ph2_radL );
964  t->Branch("ph2_bbxi" , &ph2_bbxi );
965  t->Branch("ph2_bbxi" , &ph2_bbxi );
966  }
967  //invalid hits
968  t->Branch("inv_isBarrel" , &inv_isBarrel );
969  t->Branch("inv_det" , &inv_det );
970  t->Branch("inv_lay" , &inv_lay );
971  t->Branch("inv_detId" , &inv_detId );
972  t->Branch("inv_type" , &inv_type );
973  //simhits
974  t->Branch("simhit_det" , &simhit_det);
975  t->Branch("simhit_lay" , &simhit_lay);
976  t->Branch("simhit_detId" , &simhit_detId);
977  t->Branch("simhit_x" , &simhit_x);
978  t->Branch("simhit_y" , &simhit_y);
979  t->Branch("simhit_z" , &simhit_z);
980  t->Branch("simhit_particle", &simhit_particle);
981  t->Branch("simhit_process" , &simhit_process);
982  t->Branch("simhit_eloss" , &simhit_eloss);
983  t->Branch("simhit_tof" , &simhit_tof);
984  //t->Branch("simhit_simTrackId", &simhit_simTrackId);
985  t->Branch("simhit_simTrkIdx", &simhit_simTrkIdx);
986  t->Branch("simhit_hitIdx" , &simhit_hitIdx);
987  t->Branch("simhit_hitType" , &simhit_hitType);
988  }
989  //beam spot
990  t->Branch("bsp_x" , &bsp_x , "bsp_x/F");
991  t->Branch("bsp_y" , &bsp_y , "bsp_y/F");
992  t->Branch("bsp_z" , &bsp_z , "bsp_z/F");
993  t->Branch("bsp_sigmax" , &bsp_sigmax , "bsp_sigmax/F");
994  t->Branch("bsp_sigmay" , &bsp_sigmay , "bsp_sigmay/F");
995  t->Branch("bsp_sigmaz" , &bsp_sigmaz , "bsp_sigmaz/F");
996  if(includeSeeds_) {
997  //seeds
998  t->Branch("see_fitok" , &see_fitok );
999  t->Branch("see_px" , &see_px );
1000  t->Branch("see_py" , &see_py );
1001  t->Branch("see_pz" , &see_pz );
1002  t->Branch("see_pt" , &see_pt );
1003  t->Branch("see_eta" , &see_eta );
1004  t->Branch("see_phi" , &see_phi );
1005  t->Branch("see_dxy" , &see_dxy );
1006  t->Branch("see_dz" , &see_dz );
1007  t->Branch("see_ptErr" , &see_ptErr );
1008  t->Branch("see_etaErr" , &see_etaErr );
1009  t->Branch("see_phiErr" , &see_phiErr );
1010  t->Branch("see_dxyErr" , &see_dxyErr );
1011  t->Branch("see_dzErr" , &see_dzErr );
1012  t->Branch("see_chi2" , &see_chi2 );
1013  t->Branch("see_q" , &see_q );
1014  t->Branch("see_nValid" , &see_nValid );
1015  t->Branch("see_nPixel" , &see_nPixel );
1016  t->Branch("see_nGlued" , &see_nGlued );
1017  t->Branch("see_nStrip" , &see_nStrip );
1018  t->Branch("see_nPhase2OT", &see_nPhase2OT);
1019  t->Branch("see_algo" , &see_algo );
1020  t->Branch("see_trkIdx" , &see_trkIdx );
1021  t->Branch("see_shareFrac", &see_shareFrac);
1022  t->Branch("see_simTrkIdx", &see_simTrkIdx );
1023  if(includeAllHits_) {
1024  t->Branch("see_hitIdx" , &see_hitIdx );
1025  t->Branch("see_hitType", &see_hitType );
1026  }
1027  //seed algo offset
1028  t->Branch("see_offset" , &see_offset );
1029  }
1030 
1031  //vertices
1032  t->Branch("vtx_x" , &vtx_x);
1033  t->Branch("vtx_y" , &vtx_y);
1034  t->Branch("vtx_z" , &vtx_z);
1035  t->Branch("vtx_xErr" , &vtx_xErr);
1036  t->Branch("vtx_yErr" , &vtx_yErr);
1037  t->Branch("vtx_zErr" , &vtx_zErr);
1038  t->Branch("vtx_ndof" , &vtx_ndof);
1039  t->Branch("vtx_chi2" , &vtx_chi2);
1040  t->Branch("vtx_fake" , &vtx_fake);
1041  t->Branch("vtx_valid" , &vtx_valid);
1042  t->Branch("vtx_trkIdx" , &vtx_trkIdx);
1043 
1044  // tracking vertices
1045  t->Branch("simvtx_event" , &simvtx_event );
1046  t->Branch("simvtx_bunchCrossing", &simvtx_bunchCrossing);
1047  t->Branch("simvtx_processType", &simvtx_processType);
1048  t->Branch("simvtx_x" , &simvtx_x);
1049  t->Branch("simvtx_y" , &simvtx_y);
1050  t->Branch("simvtx_z" , &simvtx_z);
1051  t->Branch("simvtx_sourceSimIdx", &simvtx_sourceSimIdx);
1052  t->Branch("simvtx_daughterSimIdx", &simvtx_daughterSimIdx);
1053 
1054  t->Branch("simpv_idx" , &simpv_idx);
1055 
1056  //t->Branch("" , &);
1057 }
std::vector< unsigned short > str_lay
std::vector< float > sim_pca_dz
edm::LuminosityBlockNumber_t ev_lumi
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
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
edm::EDGetTokenT< SiStripRecHit2DCollection > stripRphiRecHitToken_
std::vector< short > ph2_isBarrel
std::vector< float > trk_phi
std::vector< float > sim_pca_cotTheta
std::vector< float > sim_pca_dxy
std::vector< unsigned int > trk_nOuterLost
std::vector< float > glu_xy
std::vector< std::vector< int > > ph2_seeIdx
std::vector< float > glu_radL
std::vector< float > trk_inner_pz
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< unsigned int > glu_lay
std::vector< float > see_phiErr
std::vector< std::vector< int > > simhit_hitIdx
std::vector< unsigned short > inv_lay
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 > pix_zx
std::vector< float > sim_phi
std::vector< std::vector< int > > trk_simTrkIdx
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< unsigned int > glu_det
std::vector< float > trk_inner_py
std::vector< float > see_px
std::vector< float > see_chi2
std::vector< float > glu_z
edm::EDGetTokenT< edm::View< reco::Track > > trackToken_
std::vector< float > trk_outer_px
std::vector< std::vector< int > > trk_hitType
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< unsigned short > simhit_det
std::vector< unsigned int > inv_detId
std::vector< int > simhit_simTrkIdx
std::vector< std::vector< float > > sim_shareFrac
std::vector< short > str_isStereo
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< float > ph2_zx
std::vector< int > simpv_idx
edm::EDGetTokenT< edm::DetSetVector< PixelDigiSimLink > > pixelSimLinkToken_
std::vector< unsigned int > trk_stopReason
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 > 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< 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< unsigned short > ph2_lay
std::vector< float > trk_lambdaErr
edm::EDGetTokenT< SiPixelRecHitCollection > pixelRecHitToken_
std::vector< float > ph2_y
std::vector< unsigned short > pix_lay
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< unsigned short > pix_det
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< 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
std::vector< float > sim_pca_pt
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_
std::vector< float > trk_dz
std::vector< float > trk_ptErr
std::vector< unsigned int > simhit_detId
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 > 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
std::vector< unsigned short > inv_det
std::vector< unsigned short > ph2_det
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< unsigned short > simhit_lay
std::vector< float > trk_py
std::vector< std::vector< int > > pix_simHitIdx
std::vector< float > trk_nChi2
std::vector< unsigned short > str_det
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< unsigned int > ph2_detId
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
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< std::vector< int > > str_simHitIdx
std::string builderName_
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< 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< 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
std::vector< unsigned int > trk_nValid
std::vector< float > trk_inner_px
std::vector< float > vtx_zErr
std::vector< unsigned int > pix_detId
std::vector< float > simhit_eloss
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 > glu_detId
std::vector< unsigned int > sim_nStrip
std::vector< unsigned int > str_detId
TrackingNtuple::~TrackingNtuple ( )

Definition at line 1060 of file TrackingNtuple.cc.

1060  {
1061  // do anything here that needs to be done at desctruction time
1062  // (e.g. close files, deallocate resources etc.)
1063 }

Member Function Documentation

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

Definition at line 1321 of file TrackingNtuple.cc.

References EncodedEventId::bunchCrossing(), clearVariables(), edm::EventID::event(), TrackingVertex::eventId(), fillBeamSpot(), fillPhase2OTHits(), fillPixelHits(), fillSeeds(), fillSimHits(), fillStripMatchedHits(), fillStripRphiStereoHits(), fillTrackingParticles(), fillTrackingVertices(), fillTracks(), fillVertices(), edm::EventSetup::get(), edm::Event::getByToken(), 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 primaryVertexAssociation_cfi::vertices.

1321  {
1322 
1323  using namespace edm;
1324  using namespace reco;
1325  using namespace std;
1326 
1328  iSetup.get<IdealMagneticFieldRecord>().get(theMF);
1329 
1331  iSetup.get<TransientRecHitRecord>().get(builderName_,theTTRHBuilder);
1332 
1333  edm::ESHandle<TrackerTopology> tTopoHandle;
1334  iSetup.get<TrackerTopologyRcd>().get(tTopoHandle);
1335  const TrackerTopology& tTopo = *tTopoHandle;
1336 
1337  edm::ESHandle<TrackerGeometry> geometryHandle;
1338  iSetup.get<TrackerDigiGeometryRecord>().get(geometryHandle);
1339  const TrackerGeometry &tracker = *geometryHandle;
1340 
1342  iEvent.getByToken(trackAssociatorToken_, theAssociator);
1343  const reco::TrackToTrackingParticleAssociator& associatorByHits = *theAssociator;
1344 
1345  LogDebug("TrackingNtuple") << "Analyzing new event";
1346 
1347  //initialize tree variables
1348  clearVariables();
1349 
1350  // FIXME: we really need to move to edm::View for reading the
1351  // TrackingParticles... Unfortunately it has non-trivial
1352  // consequences on the associator/association interfaces etc.
1354  TrackingParticleRefKeySet tmpTPkeys;
1355  const TrackingParticleRefVector *tmpTPptr = nullptr;
1357  edm::Handle<TrackingParticleRefVector> TPCollectionHRefVector;
1358 
1360  iEvent.getByToken(trackingParticleToken_, TPCollectionH);
1361  for(size_t i=0, size=TPCollectionH->size(); i<size; ++i) {
1362  tmpTP.push_back(TrackingParticleRef(TPCollectionH, i));
1363  }
1364  tmpTPptr = &tmpTP;
1365  }
1366  else {
1367  iEvent.getByToken(trackingParticleRefToken_, TPCollectionHRefVector);
1368  tmpTPptr = TPCollectionHRefVector.product();
1369  for(const auto& ref: *tmpTPptr) {
1370  tmpTPkeys.insert(ref.key());
1371  }
1372  }
1373  const TrackingParticleRefVector& tpCollection = *tmpTPptr;
1374 
1375  // Fill mapping from Ref::key() to index
1376  TrackingParticleRefKeyToIndex tpKeyToIndex;
1377  for(size_t i=0; i<tpCollection.size(); ++i) {
1378  tpKeyToIndex[tpCollection[i].key()] = i;
1379  }
1380 
1381  // tracking vertices
1383  iEvent.getByToken(trackingVertexToken_, htv);
1384  const TrackingVertexCollection& tvs = *htv;
1385 
1386  // Fill mapping from Ref::key() to index
1387  TrackingVertexRefVector tvRefs;
1388  TrackingVertexRefKeyToIndex tvKeyToIndex;
1389  for(size_t i=0; i<tvs.size(); ++i) {
1390  const TrackingVertex& v = tvs[i];
1391  if(v.eventId().bunchCrossing() != 0) // Ignore OOTPU; would be better to not to hardcode?
1392  continue;
1393  tvKeyToIndex[i] = tvRefs.size();
1394  tvRefs.push_back(TrackingVertexRef(htv, i));
1395  }
1396 
1397  //get association maps, etc.
1398  Handle<ClusterTPAssociation> pCluster2TPListH;
1399  iEvent.getByToken(clusterTPMapToken_, pCluster2TPListH);
1400  const ClusterTPAssociation& clusterToTPMap = *pCluster2TPListH;
1402  iEvent.getByToken(simHitTPMapToken_, simHitsTPAssoc);
1403 
1404  // SimHit key -> index mapping
1405  SimHitRefKeyToIndex simHitRefKeyToIndex;
1406 
1407  //make a list to link TrackingParticles to its simhits
1408  std::vector<TPHitIndex> tpHitList;
1409 
1410  std::set<edm::ProductID> hitProductIds;
1411  std::map<edm::ProductID, size_t> seedCollToOffset;
1412 
1413  ev_run = iEvent.id().run();
1414  ev_lumi = iEvent.id().luminosityBlock();
1415  ev_event = iEvent.id().event();
1416 
1417  // Digi->Sim links for pixels and strips
1418  edm::Handle<edm::DetSetVector<PixelDigiSimLink> > pixelDigiSimLinksHandle;
1419  iEvent.getByToken(pixelSimLinkToken_, pixelDigiSimLinksHandle);
1420  const auto& pixelDigiSimLinks = *pixelDigiSimLinksHandle;
1421 
1422  edm::Handle<edm::DetSetVector<StripDigiSimLink> > stripDigiSimLinksHandle;
1423  iEvent.getByToken(stripSimLinkToken_, stripDigiSimLinksHandle);
1424 
1425  // Phase2 OT DigiSimLink
1426  edm::Handle<edm::DetSetVector<PixelDigiSimLink> > siphase2OTSimLinksHandle;
1427  iEvent.getByToken(siphase2OTSimLinksToken_, siphase2OTSimLinksHandle);
1428 
1429  //beamspot
1430  Handle<reco::BeamSpot> recoBeamSpotHandle;
1431  iEvent.getByToken(beamSpotToken_, recoBeamSpotHandle);
1432  BeamSpot const & bs = *recoBeamSpotHandle;
1433  fillBeamSpot(bs);
1434 
1435 
1436  //prapare list to link matched hits to collection
1437  vector<pair<int,int> > monoStereoClusterList;
1438  if(includeAllHits_) {
1439  // simhits
1440  fillSimHits(tracker, tpKeyToIndex, *simHitsTPAssoc, tTopo, simHitRefKeyToIndex, tpHitList);
1441 
1442  //pixel hits
1443  fillPixelHits(iEvent, clusterToTPMap, tpKeyToIndex, *simHitsTPAssoc, pixelDigiSimLinks, *theTTRHBuilder, tTopo, simHitRefKeyToIndex, hitProductIds);
1444 
1445  //strip hits
1446  if(includeStripHits_){
1447  LogDebug("TrackingNtuple") << "foundStripSimLink" ;
1448  const auto& stripDigiSimLinks = *stripDigiSimLinksHandle;
1449  fillStripRphiStereoHits(iEvent, clusterToTPMap, tpKeyToIndex, *simHitsTPAssoc, stripDigiSimLinks, *theTTRHBuilder, tTopo, simHitRefKeyToIndex, hitProductIds);
1450 
1451  //matched hits
1452  fillStripMatchedHits(iEvent, *theTTRHBuilder, tTopo, monoStereoClusterList);
1453  }
1454 
1456  LogDebug("TrackingNtuple") << "foundPhase2OTSimLinks" ;
1457  const auto& phase2OTSimLinks = *siphase2OTSimLinksHandle;
1458  fillPhase2OTHits(iEvent, clusterToTPMap, tpKeyToIndex, *simHitsTPAssoc, phase2OTSimLinks, *theTTRHBuilder, tTopo, simHitRefKeyToIndex, hitProductIds);
1459  }
1460  }
1461 
1462  //seeds
1463  if(includeSeeds_) {
1464  fillSeeds(iEvent, tpCollection, tpKeyToIndex, bs, associatorByHits, *theTTRHBuilder, theMF.product(), monoStereoClusterList, hitProductIds, seedCollToOffset);
1465  }
1466 
1467  //tracks
1468  edm::Handle<edm::View<reco::Track> > tracksHandle;
1469  iEvent.getByToken(trackToken_, tracksHandle);
1470  const edm::View<reco::Track>& tracks = *tracksHandle;
1471  // The associator interfaces really need to be fixed...
1473  for(edm::View<Track>::size_type i=0; i<tracks.size(); ++i) {
1474  trackRefs.push_back(tracks.refAt(i));
1475  }
1476  fillTracks(trackRefs, tpCollection, tpKeyToIndex, bs, associatorByHits, *theTTRHBuilder, tTopo, hitProductIds, seedCollToOffset);
1477 
1478  //tracking particles
1479  //sort association maps with simHits
1480  std::sort( tpHitList.begin(), tpHitList.end(), tpHitIndexListLessSort );
1481  fillTrackingParticles(iEvent, iSetup, trackRefs, tpCollection, tvKeyToIndex, associatorByHits, tpHitList);
1482 
1483  // vertices
1485  iEvent.getByToken(vertexToken_, vertices);
1486  fillVertices(*vertices, trackRefs);
1487 
1488  // tracking vertices
1489  fillTrackingVertices(tvRefs, tpKeyToIndex);
1490 
1491  t->Fill();
1492 
1493 }
#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:85
void fillTrackingVertices(const TrackingVertexRefVector &trackingVertices, const TrackingParticleRefKeyToIndex &tpKeyToIndex)
int i
Definition: DBlmapReader.cc:9
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:457
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)
void fillTracks(const edm::RefToBaseVector< reco::Track > &tracks, const TrackingParticleRefVector &tpCollection, const TrackingParticleRefKeyToIndex &tpKeyToIndex, const reco::BeamSpot &bs, const reco::TrackToTrackingParticleAssociator &associatorByHits, const TransientTrackingRecHitBuilder &theTTRHBuilder, const TrackerTopology &tTopo, const std::set< edm::ProductID > &hitProductIds, const std::map< edm::ProductID, size_t > &seedToCollIndex)
TrackingParticleRefKeyToIndex TrackingVertexRefKeyToIndex
size_type size() const
void fillTrackingParticles(const edm::Event &iEvent, const edm::EventSetup &iSetup, const edm::RefToBaseVector< reco::Track > &tracks, const TrackingParticleRefVector &tpCollection, const TrackingVertexRefKeyToIndex &tvKeyToIndex, const reco::TrackToTrackingParticleAssociator &associatorByHits, const std::vector< TPHitIndex > &tpHitList)
LuminosityBlockNumber_t luminosityBlock() const
Definition: EventID.h:40
void fillPhase2OTHits(const edm::Event &iEvent, const ClusterTPAssociation &clusterToTPMap, const TrackingParticleRefKeyToIndex &tpKeyToIndex, const SimHitTPAssociationProducer::SimHitTPAssociationList &simHitsTPAssoc, const edm::DetSetVector< PixelDigiSimLink > &digiSimLink, const TransientTrackingRecHitBuilder &theTTRHBuilder, const TrackerTopology &tTopo, const SimHitRefKeyToIndex &simHitRefKeyToIndex, std::set< edm::ProductID > &hitProductIds)
edm::EDGetTokenT< edm::DetSetVector< PixelDigiSimLink > > pixelSimLinkToken_
RefToBase< value_type > refAt(size_type i) const
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
std::vector< TrackingVertex > TrackingVertexCollection
const T & get() const
Definition: EventSetup.h:56
const bool includeAllHits_
edm::EventID id() const
Definition: EventBase.h:58
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 1069 of file TrackingNtuple.cc.

References bsp_sigmax, bsp_sigmay, bsp_sigmaz, bsp_x, bsp_y, bsp_z, glu_bbxi, glu_det, glu_detId, glu_isBarrel, glu_lay, 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_det, inv_detId, inv_isBarrel, inv_lay, inv_type, ph2_bbxi, ph2_det, ph2_detId, ph2_isBarrel, ph2_lay, 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_det, pix_detId, pix_isBarrel, pix_lay, 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_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_trkIdx, sim_bunchCrossing, sim_decayVtxIdx, sim_eta, sim_event, 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_det, simhit_detId, simhit_eloss, simhit_hitIdx, simhit_hitType, simhit_lay, 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_det, str_detId, str_isBarrel, str_isStereo, str_lay, 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_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().

1069  {
1070 
1071  ev_run = 0;
1072  ev_lumi = 0;
1073  ev_event = 0;
1074 
1075  //tracks
1076  trk_px .clear();
1077  trk_py .clear();
1078  trk_pz .clear();
1079  trk_pt .clear();
1080  trk_inner_px .clear();
1081  trk_inner_py .clear();
1082  trk_inner_pz .clear();
1083  trk_inner_pt .clear();
1084  trk_outer_px .clear();
1085  trk_outer_py .clear();
1086  trk_outer_pz .clear();
1087  trk_outer_pt .clear();
1088  trk_eta .clear();
1089  trk_lambda .clear();
1090  trk_cotTheta .clear();
1091  trk_phi .clear();
1092  trk_dxy .clear();
1093  trk_dz .clear();
1094  trk_ptErr .clear();
1095  trk_etaErr .clear();
1096  trk_lambdaErr.clear();
1097  trk_phiErr .clear();
1098  trk_dxyErr .clear();
1099  trk_dzErr .clear();
1100  trk_refpoint_x.clear();
1101  trk_refpoint_y.clear();
1102  trk_refpoint_z.clear();
1103  trk_nChi2 .clear();
1104  trk_q .clear();
1105  trk_nValid .clear();
1106  trk_nInvalid .clear();
1107  trk_nPixel .clear();
1108  trk_nStrip .clear();
1109  trk_nPixelLay.clear();
1110  trk_nStripLay.clear();
1111  trk_n3DLay .clear();
1112  trk_nOuterLost.clear();
1113  trk_nInnerLost.clear();
1114  trk_algo .clear();
1115  trk_originalAlgo.clear();
1116  trk_algoMask .clear();
1117  trk_stopReason.clear();
1118  trk_isHP .clear();
1119  trk_seedIdx .clear();
1120  trk_vtxIdx .clear();
1121  trk_shareFrac.clear();
1122  trk_simTrkIdx.clear();
1123  trk_hitIdx .clear();
1124  trk_hitType .clear();
1125  //sim tracks
1126  sim_event .clear();
1127  sim_bunchCrossing.clear();
1128  sim_pdgId .clear();
1129  sim_px .clear();
1130  sim_py .clear();
1131  sim_pz .clear();
1132  sim_pt .clear();
1133  sim_eta .clear();
1134  sim_phi .clear();
1135  sim_pca_pt .clear();
1136  sim_pca_eta .clear();
1137  sim_pca_lambda.clear();
1138  sim_pca_cotTheta.clear();
1139  sim_pca_phi .clear();
1140  sim_pca_dxy .clear();
1141  sim_pca_dz .clear();
1142  sim_q .clear();
1143  sim_nValid .clear();
1144  sim_nPixel .clear();
1145  sim_nStrip .clear();
1146  sim_nLay .clear();
1147  sim_nPixelLay.clear();
1148  sim_n3DLay .clear();
1149  sim_trkIdx .clear();
1150  sim_shareFrac.clear();
1151  sim_parentVtxIdx.clear();
1152  sim_decayVtxIdx.clear();
1153  sim_simHitIdx .clear();
1154  //pixels
1155  pix_isBarrel .clear();
1156  pix_det .clear();
1157  pix_lay .clear();
1158  pix_detId .clear();
1159  pix_trkIdx .clear();
1160  pix_seeIdx .clear();
1161  pix_simHitIdx.clear();
1162  pix_chargeFraction.clear();
1163  pix_simType.clear();
1164  pix_x .clear();
1165  pix_y .clear();
1166  pix_z .clear();
1167  pix_xx .clear();
1168  pix_xy .clear();
1169  pix_yy .clear();
1170  pix_yz .clear();
1171  pix_zz .clear();
1172  pix_zx .clear();
1173  pix_radL .clear();
1174  pix_bbxi .clear();
1175  //strips
1176  str_isBarrel .clear();
1177  str_isStereo .clear();
1178  str_det .clear();
1179  str_lay .clear();
1180  str_detId .clear();
1181  str_trkIdx .clear();
1182  str_seeIdx .clear();
1183  str_simHitIdx.clear();
1184  str_chargeFraction.clear();
1185  str_simType.clear();
1186  str_x .clear();
1187  str_y .clear();
1188  str_z .clear();
1189  str_xx .clear();
1190  str_xy .clear();
1191  str_yy .clear();
1192  str_yz .clear();
1193  str_zz .clear();
1194  str_zx .clear();
1195  str_radL .clear();
1196  str_bbxi .clear();
1197  //matched hits
1198  glu_isBarrel .clear();
1199  glu_det .clear();
1200  glu_lay .clear();
1201  glu_detId .clear();
1202  glu_monoIdx .clear();
1203  glu_stereoIdx.clear();
1204  glu_seeIdx .clear();
1205  glu_x .clear();
1206  glu_y .clear();
1207  glu_z .clear();
1208  glu_xx .clear();
1209  glu_xy .clear();
1210  glu_yy .clear();
1211  glu_yz .clear();
1212  glu_zz .clear();
1213  glu_zx .clear();
1214  glu_radL .clear();
1215  glu_bbxi .clear();
1216  //phase2 OT
1217  ph2_isBarrel .clear();
1218  ph2_det .clear();
1219  ph2_lay .clear();
1220  ph2_detId .clear();
1221  ph2_trkIdx .clear();
1222  ph2_seeIdx .clear();
1223  ph2_simHitIdx.clear();
1224  ph2_simType.clear();
1225  ph2_x .clear();
1226  ph2_y .clear();
1227  ph2_z .clear();
1228  ph2_xx .clear();
1229  ph2_xy .clear();
1230  ph2_yy .clear();
1231  ph2_yz .clear();
1232  ph2_zz .clear();
1233  ph2_zx .clear();
1234  ph2_radL .clear();
1235  ph2_bbxi .clear();
1236  //invalid hits
1237  inv_isBarrel .clear();
1238  inv_det .clear();
1239  inv_lay .clear();
1240  inv_detId .clear();
1241  inv_type .clear();
1242  // simhits
1243  simhit_det.clear();
1244  simhit_lay.clear();
1245  simhit_detId.clear();
1246  simhit_x.clear();
1247  simhit_y.clear();
1248  simhit_z.clear();
1249  simhit_particle.clear();
1250  simhit_process.clear();
1251  simhit_eloss.clear();
1252  simhit_tof.clear();
1253  //simhit_simTrackId.clear();
1254  simhit_simTrkIdx.clear();
1255  simhit_hitIdx.clear();
1256  simhit_hitType.clear();
1257  //beamspot
1258  bsp_x = -9999.;
1259  bsp_y = -9999.;
1260  bsp_z = -9999.;
1261  bsp_sigmax = -9999.;
1262  bsp_sigmay = -9999.;
1263  bsp_sigmaz = -9999.;
1264  //seeds
1265  see_fitok .clear();
1266  see_px .clear();
1267  see_py .clear();
1268  see_pz .clear();
1269  see_pt .clear();
1270  see_eta .clear();
1271  see_phi .clear();
1272  see_dxy .clear();
1273  see_dz .clear();
1274  see_ptErr .clear();
1275  see_etaErr .clear();
1276  see_phiErr .clear();
1277  see_dxyErr .clear();
1278  see_dzErr .clear();
1279  see_chi2 .clear();
1280  see_q .clear();
1281  see_nValid .clear();
1282  see_nPixel .clear();
1283  see_nGlued .clear();
1284  see_nStrip .clear();
1285  see_nPhase2OT.clear();
1286  see_algo .clear();
1287  see_trkIdx .clear();
1288  see_shareFrac.clear();
1289  see_simTrkIdx.clear();
1290  see_hitIdx .clear();
1291  see_hitType .clear();
1292  //seed algo offset
1293  see_offset.clear();
1294 
1295  // vertices
1296  vtx_x.clear();
1297  vtx_y.clear();
1298  vtx_z.clear();
1299  vtx_xErr.clear();
1300  vtx_yErr.clear();
1301  vtx_zErr.clear();
1302  vtx_ndof.clear();
1303  vtx_chi2.clear();
1304  vtx_fake.clear();
1305  vtx_valid.clear();
1306  vtx_trkIdx.clear();
1307 
1308  // Tracking vertices
1309  simvtx_event.clear();
1310  simvtx_bunchCrossing.clear();
1311  simvtx_x.clear();
1312  simvtx_y.clear();
1313  simvtx_z.clear();
1314  simvtx_sourceSimIdx.clear();
1315  simvtx_daughterSimIdx.clear();
1316  simpv_idx.clear();
1317 }
std::vector< unsigned short > str_lay
std::vector< float > sim_pca_dz
edm::LuminosityBlockNumber_t ev_lumi
std::vector< unsigned int > sim_nLay
std::vector< float > ph2_radL
std::vector< short > see_fitok
std::vector< short > vtx_fake
std::vector< float > simvtx_z
std::vector< std::vector< int > > see_hitType
std::vector< short > ph2_isBarrel
std::vector< float > trk_phi
std::vector< float > sim_pca_cotTheta
std::vector< float > sim_pca_dxy
std::vector< unsigned int > trk_nOuterLost
std::vector< float > glu_xy
std::vector< std::vector< int > > ph2_seeIdx
std::vector< float > glu_radL
std::vector< float > trk_inner_pz
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< unsigned int > glu_lay
std::vector< float > see_phiErr
std::vector< std::vector< int > > simhit_hitIdx
std::vector< unsigned short > inv_lay
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 > pix_zx
std::vector< float > sim_phi
std::vector< std::vector< int > > trk_simTrkIdx
std::vector< float > trk_dxyErr
std::vector< float > str_yz
std::vector< float > trk_pt
std::vector< float > glu_x
std::vector< unsigned int > glu_det
std::vector< float > trk_inner_py
std::vector< float > see_px
std::vector< float > see_chi2
std::vector< float > glu_z
std::vector< float > trk_outer_px
std::vector< std::vector< int > > trk_hitType
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< unsigned short > simhit_det
std::vector< unsigned int > inv_detId
std::vector< int > simhit_simTrkIdx
std::vector< std::vector< float > > sim_shareFrac
std::vector< short > str_isStereo
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< float > ph2_zx
std::vector< int > simpv_idx
std::vector< unsigned int > trk_stopReason
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< 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< unsigned short > ph2_lay
std::vector< float > trk_lambdaErr
std::vector< float > ph2_y
std::vector< unsigned short > pix_lay
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< unsigned short > pix_det
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< 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
std::vector< float > sim_pca_pt
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
std::vector< float > trk_dz
std::vector< float > trk_ptErr
std::vector< unsigned int > simhit_detId
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 > 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
std::vector< unsigned short > inv_det
std::vector< unsigned short > ph2_det
edm::EventNumber_t ev_event
std::vector< float > ph2_x
std::vector< int > glu_stereoIdx
std::vector< unsigned short > simhit_lay
std::vector< float > trk_py
std::vector< std::vector< int > > pix_simHitIdx
std::vector< float > trk_nChi2
std::vector< unsigned short > str_det
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< unsigned int > ph2_detId
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< std::vector< int > > str_simHitIdx
std::vector< float > glu_xx
std::vector< unsigned int > trk_nPixelLay
std::vector< float > simhit_x
std::vector< float > simvtx_y
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< 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
std::vector< unsigned int > trk_nValid
std::vector< float > trk_inner_px
std::vector< float > vtx_zErr
std::vector< unsigned int > pix_detId
std::vector< float > simhit_eloss
std::vector< float > vtx_chi2
std::vector< int > simvtx_bunchCrossing
std::vector< float > str_bbxi
std::vector< float > see_dz
std::vector< unsigned int > glu_detId
std::vector< unsigned int > sim_nStrip
std::vector< unsigned int > str_detId
void TrackingNtuple::fillBeamSpot ( const reco::BeamSpot bs)
private

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

1495  {
1496  bsp_x = bs.x0();
1497  bsp_y = bs.y0();
1498  bsp_z = bs.x0();
1499  bsp_sigmax = bs.BeamWidthX();
1500  bsp_sigmay = bs.BeamWidthY();
1501  bsp_sigmaz = bs.sigmaZ();
1502 }
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 2598 of file TrackingNtuple.cc.

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

2598  {
2599  //The following says we do not know what parameters are allowed so do no validation
2600  // Please change this to state exactly what you do use, even if it is no parameters
2602  desc.addUntracked<std::vector<edm::InputTag> >("seedTracks", std::vector<edm::InputTag>{
2603  edm::InputTag("seedTracksinitialStepSeeds"),
2604  edm::InputTag("seedTracksdetachedTripletStepSeeds"),
2605  edm::InputTag("seedTrackspixelPairStepSeeds"),
2606  edm::InputTag("seedTrackslowPtTripletStepSeeds"),
2607  edm::InputTag("seedTracksmixedTripletStepSeeds"),
2608  edm::InputTag("seedTrackspixelLessStepSeeds"),
2609  edm::InputTag("seedTrackstobTecStepSeeds"),
2610  edm::InputTag("seedTracksjetCoreRegionalStepSeeds"),
2611  edm::InputTag("seedTracksmuonSeededSeedsInOut"),
2612  edm::InputTag("seedTracksmuonSeededSeedsOutIn")
2613  });
2614  desc.addUntracked<edm::InputTag>("tracks", edm::InputTag("generalTracks"));
2615  desc.addUntracked<edm::InputTag>("trackingParticles", edm::InputTag("mix", "MergedTrackTruth"));
2616  desc.addUntracked<bool>("trackingParticlesRef", false);
2617  desc.addUntracked<edm::InputTag>("clusterTPMap", edm::InputTag("tpClusterProducer"));
2618  desc.addUntracked<edm::InputTag>("simHitTPMap", edm::InputTag("simHitTPAssocProducer"));
2619  desc.addUntracked<edm::InputTag>("trackAssociator", edm::InputTag("quickTrackAssociatorByHits"));
2620  desc.addUntracked<edm::InputTag>("pixelDigiSimLink", edm::InputTag("simSiPixelDigis"));
2621  desc.addUntracked<edm::InputTag>("stripDigiSimLink", edm::InputTag("simSiStripDigis"));
2622  desc.addUntracked<edm::InputTag>("phase2OTSimLink", edm::InputTag(""));
2623  desc.addUntracked<edm::InputTag>("beamSpot", edm::InputTag("offlineBeamSpot"));
2624  desc.addUntracked<edm::InputTag>("pixelRecHits", edm::InputTag("siPixelRecHits"));
2625  desc.addUntracked<edm::InputTag>("stripRphiRecHits", edm::InputTag("siStripMatchedRecHits", "rphiRecHit"));
2626  desc.addUntracked<edm::InputTag>("stripStereoRecHits", edm::InputTag("siStripMatchedRecHits", "stereoRecHit"));
2627  desc.addUntracked<edm::InputTag>("stripMatchedRecHits", edm::InputTag("siStripMatchedRecHits", "matchedRecHit"));
2628  desc.addUntracked<edm::InputTag>("phase2OTRecHits", edm::InputTag("siPhase2RecHits"));
2629  desc.addUntracked<edm::InputTag>("vertices", edm::InputTag("offlinePrimaryVertices"));
2630  desc.addUntracked<edm::InputTag>("trackingVertices", edm::InputTag("mix", "MergedTrackTruth"));
2631  desc.addUntracked<edm::InputTag>("trackingParticleNlayers", edm::InputTag("trackingParticleNumberOfLayersProducer", "trackerLayers"));
2632  desc.addUntracked<edm::InputTag>("trackingParticleNpixellayers", edm::InputTag("trackingParticleNumberOfLayersProducer", "pixelLayers"));
2633  desc.addUntracked<edm::InputTag>("trackingParticleNstripstereolayers", edm::InputTag("trackingParticleNumberOfLayersProducer", "stripStereoLayers"));
2634  desc.addUntracked<std::string>("TTRHBuilder", "WithTrackAngle");
2635  desc.addUntracked<std::string>("parametersDefiner", "LhcParametersDefinerForTP");
2636  desc.addUntracked<bool>("includeSeeds", false);
2637  desc.addUntracked<bool>("includeAllHits", false);
2638  descriptions.add("trackingNtuple",desc);
2639 }
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 1916 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_det, ph2_detId, ph2_isBarrel, ph2_lay, 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().

1925  {
1927  iEvent.getByToken(phase2OTRecHitToken_, phase2OTHits);
1928  for (auto it = phase2OTHits->begin(); it!=phase2OTHits->end(); it++ ) {
1929  const DetId hitId = it->detId();
1930  for (auto hit = it->begin(); hit!=it->end(); hit++ ) {
1931  TransientTrackingRecHit::RecHitPointer ttrh = theTTRHBuilder.build(&*hit);
1932 
1933  hitProductIds.insert(hit->cluster().id());
1934 
1935  const int key = hit->cluster().key();
1936  const int lay = tTopo.layer(hitId);
1937  SimHitData simHitData = matchCluster(hit->firstClusterRef(), hitId, key, ttrh,
1938  clusterToTPMap, tpKeyToIndex, simHitsTPAssoc, digiSimLink, simHitRefKeyToIndex, HitType::Phase2OT);
1939 
1940  ph2_isBarrel .push_back( hitId.subdetId()==1 );
1941  ph2_det .push_back( hitId.subdetId() );
1942  ph2_lay .push_back( lay );
1943  ph2_detId .push_back( hitId.rawId() );
1944  ph2_trkIdx .emplace_back(); // filled in fillTracks
1945  ph2_seeIdx .emplace_back(); // filled in fillSeeds
1946  ph2_simHitIdx.push_back( simHitData.matchingSimHit );
1947  ph2_simType.push_back( static_cast<int>(simHitData.type) );
1948  ph2_x .push_back( ttrh->globalPosition().x() );
1949  ph2_y .push_back( ttrh->globalPosition().y() );
1950  ph2_z .push_back( ttrh->globalPosition().z() );
1951  ph2_xx .push_back( ttrh->globalPositionError().cxx() );
1952  ph2_xy .push_back( ttrh->globalPositionError().cyx() );
1953  ph2_yy .push_back( ttrh->globalPositionError().cyy() );
1954  ph2_yz .push_back( ttrh->globalPositionError().czy() );
1955  ph2_zz .push_back( ttrh->globalPositionError().czz() );
1956  ph2_zx .push_back( ttrh->globalPositionError().czx() );
1957  ph2_radL .push_back( ttrh->surface()->mediumProperties().radLen() );
1958  ph2_bbxi .push_back( ttrh->surface()->mediumProperties().xi() );
1959 
1960  LogTrace("TrackingNtuple") << "phase2 OT cluster=" << key
1961  << " subdId=" << hitId.subdetId()
1962  << " lay=" << lay
1963  << " rawId=" << hitId.rawId()
1964  << " pos =" << ttrh->globalPosition()
1965  << " nMatchingSimHit=" << simHitData.matchingSimHit.size();
1966 
1967  if(!simHitData.matchingSimHit.empty()) {
1968  const auto simHitIdx = simHitData.matchingSimHit[0];
1969  LogTrace("TrackingNtuple") << " firstMatchingSimHit=" << simHitIdx
1970  << " simHitPos=" << GlobalPoint(simhit_x[simHitIdx], simhit_y[simHitIdx], simhit_z[simHitIdx])
1971  << " energyLoss=" << simhit_eloss[simHitIdx]
1972  << " particleType=" << simhit_particle[simHitIdx]
1973  << " processType=" << simhit_process[simHitIdx]
1974  << " bunchCrossing=" << simHitData.bunchCrossing[0]
1975  << " event=" << simHitData.event[0];
1976  }
1977  }
1978  }
1979 }
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:457
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< unsigned short > ph2_lay
std::vector< float > ph2_y
std::vector< float > ph2_xy
std::vector< std::vector< int > > ph2_simHitIdx
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
std::vector< unsigned short > ph2_det
Definition: DetId.h:18
std::vector< float > ph2_x
std::vector< unsigned int > ph2_detId
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 1715 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_det, pix_detId, pix_isBarrel, pix_lay, 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().

1724  {
1726  iEvent.getByToken(pixelRecHitToken_, pixelHits);
1727  for (auto it = pixelHits->begin(); it!=pixelHits->end(); it++ ) {
1728  const DetId hitId = it->detId();
1729  for (auto hit = it->begin(); hit!=it->end(); hit++ ) {
1730  TransientTrackingRecHit::RecHitPointer ttrh = theTTRHBuilder.build(&*hit);
1731 
1732  hitProductIds.insert(hit->cluster().id());
1733 
1734  const int key = hit->cluster().key();
1735  const int lay = tTopo.layer(hitId);
1736  SimHitData simHitData = matchCluster(hit->firstClusterRef(), hitId, key, ttrh,
1737  clusterToTPMap, tpKeyToIndex, simHitsTPAssoc, digiSimLink, simHitRefKeyToIndex, HitType::Pixel);
1738 
1739  pix_isBarrel .push_back( hitId.subdetId()==1 );
1740  pix_det .push_back( hitId.subdetId() );
1741  pix_lay .push_back( lay );
1742  pix_detId .push_back( hitId.rawId() );
1743  pix_trkIdx .emplace_back(); // filled in fillTracks
1744  pix_seeIdx .emplace_back(); // filled in fillSeeds
1745  pix_simHitIdx.push_back( simHitData.matchingSimHit );
1746  pix_simType.push_back( static_cast<int>(simHitData.type) );
1747  pix_x .push_back( ttrh->globalPosition().x() );
1748  pix_y .push_back( ttrh->globalPosition().y() );
1749  pix_z .push_back( ttrh->globalPosition().z() );
1750  pix_xx .push_back( ttrh->globalPositionError().cxx() );
1751  pix_xy .push_back( ttrh->globalPositionError().cyx() );
1752  pix_yy .push_back( ttrh->globalPositionError().cyy() );
1753  pix_yz .push_back( ttrh->globalPositionError().czy() );
1754  pix_zz .push_back( ttrh->globalPositionError().czz() );
1755  pix_zx .push_back( ttrh->globalPositionError().czx() );
1756  pix_chargeFraction.push_back( simHitData.chargeFraction );
1757  pix_radL .push_back( ttrh->surface()->mediumProperties().radLen() );
1758  pix_bbxi .push_back( ttrh->surface()->mediumProperties().xi() );
1759  LogTrace("TrackingNtuple") << "pixHit cluster=" << key
1760  << " subdId=" << hitId.subdetId()
1761  << " lay=" << lay
1762  << " rawId=" << hitId.rawId()
1763  << " pos =" << ttrh->globalPosition()
1764  << " nMatchingSimHit=" << simHitData.matchingSimHit.size();
1765  if(!simHitData.matchingSimHit.empty()) {
1766  const auto simHitIdx = simHitData.matchingSimHit[0];
1767  LogTrace("TrackingNtuple") << " firstMatchingSimHit=" << simHitIdx
1768  << " simHitPos=" << GlobalPoint(simhit_x[simHitIdx], simhit_y[simHitIdx], simhit_z[simHitIdx])
1769  << " energyLoss=" << simhit_eloss[simHitIdx]
1770  << " particleType=" << simhit_particle[simHitIdx]
1771  << " processType=" << simhit_process[simHitIdx]
1772  << " bunchCrossing=" << simHitData.bunchCrossing[0]
1773  << " event=" << simHitData.event[0];
1774  }
1775  }
1776  }
1777 }
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:457
std::vector< unsigned short > pix_simType
std::vector< float > pix_zx
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
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< unsigned short > pix_lay
std::vector< short > pix_isBarrel
std::vector< float > pix_z
std::vector< unsigned short > pix_det
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< unsigned int > pix_detId
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 1982 of file TrackingNtuple.cc.

References patPFMETCorrections_cff::algo, reco::TrackBase::algoByName(), reco::TrackToTrackingParticleAssociator::associateRecoToSim(), TransientTrackingRecHitBuilder::build(), ALCARECOTkAlJpsiMuMu_cff::charge, HiEvtPlane_cfi::chi2, RZLine::chi2(), OmniClusterRef::cluster_phase2OT(), OmniClusterRef::cluster_pixel(), KineDebug3::count(), declareDynArray, SoftLeptonByDistance_cfi::distance, edm::AssociationMap< Tag >::end(), stringResolutionProvider_cfi::eta, Exception, spr::find(), edm::AssociationMap< Tag >::find(), BaseTrackerRecHit::firstClusterRef(), edm::Event::getByToken(), glu_seeIdx, Glued, runTauDisplay::gp, i, hcalTTPDigis_cfi::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(), 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_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_trkIdx, SurveyInfoScenario_cff::seed, trackingNtuple_cff::seedTracks, SiStripMatchedRecHit2D::stereoClusterRef(), str_seeIdx, Strip, StripSubdetector::TEC, StripSubdetector::TIB, StripSubdetector::TID, StripSubdetector::TOB, and trackFromSeedFitFailed().

Referenced by analyze().

1992  {
1993  TSCBLBuilderNoMaterial tscblBuilder;
1994  for(const auto& seedToken: seedTokens_) {
1995  edm::Handle<edm::View<reco::Track> > seedTracksHandle;
1996  iEvent.getByToken(seedToken, seedTracksHandle);
1997  const auto& seedTracks = *seedTracksHandle;
1998 
1999  if(seedTracks.empty())
2000  continue;
2001 
2002  // The associator interfaces really need to be fixed...
2003  edm::RefToBaseVector<reco::Track> seedTrackRefs;
2004  for(edm::View<reco::Track>::size_type i=0; i<seedTracks.size(); ++i) {
2005  seedTrackRefs.push_back(seedTracks.refAt(i));
2006  }
2007  reco::RecoToSimCollection recSimColl = associatorByHits.associateRecoToSim(seedTrackRefs, tpCollection);
2008 
2010  labelsForToken(seedToken, labels);
2011  TString label = labels.module;
2012  //format label to match algoName
2013  label.ReplaceAll("seedTracks", "");
2014  label.ReplaceAll("Seeds","");
2015  label.ReplaceAll("muonSeeded","muonSeededStep");
2016  int algo = reco::TrackBase::algoByName(label.Data());
2017 
2018  edm::ProductID id = seedTracks[0].seedRef().id();
2019  auto inserted = seedCollToOffset.emplace(id, see_fitok.size());
2020  if(!inserted.second)
2021  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.";
2022  see_offset.push_back(see_fitok.size());
2023 
2024  LogTrace("TrackingNtuple") << "NEW SEED LABEL: " << label << " size: " << seedTracks.size() << " algo=" << algo
2025  << " ProductID " << id;
2026 
2027  for(const auto& seedTrackRef: seedTrackRefs) {
2028 
2029  const auto& seedTrack = *seedTrackRef;
2030  const auto& seedRef = seedTrack.seedRef();
2031  const auto& seed = *seedRef;
2032 
2033  if(seedRef.id() != id)
2034  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 << ".";
2035 
2036  std::vector<float> sharedFraction;
2037  std::vector<int> tpIdx;
2038  auto foundTPs = recSimColl.find(seedTrackRef);
2039  if (foundTPs != recSimColl.end()) {
2040  for(const auto tpQuality: foundTPs->val) {
2041  sharedFraction.push_back(tpQuality.second);
2042  tpIdx.push_back( tpKeyToIndex.at( tpQuality.first.key() ) );
2043  }
2044  }
2045 
2046 
2047  const bool seedFitOk = !trackFromSeedFitFailed(seedTrack);
2048  const int charge = seedTrack.charge();
2049  const float pt = seedFitOk ? seedTrack.pt() : 0;
2050  const float eta = seedFitOk ? seedTrack.eta() : 0;
2051  const float phi = seedFitOk ? seedTrack.phi() : 0;
2052  const int nHits = seedTrack.numberOfValidHits();
2053 
2054  const auto seedIndex = see_fitok.size();
2055 
2056  see_fitok .push_back(seedFitOk);
2057 
2058  see_px .push_back( seedFitOk ? seedTrack.px() : 0 );
2059  see_py .push_back( seedFitOk ? seedTrack.py() : 0 );
2060  see_pz .push_back( seedFitOk ? seedTrack.pz() : 0 );
2061  see_pt .push_back( pt );
2062  see_eta .push_back( eta );
2063  see_phi .push_back( phi );
2064  see_q .push_back( charge );
2065  see_nValid .push_back( nHits );
2066 
2067  see_dxy .push_back( seedFitOk ? seedTrack.dxy(bs.position()) : 0);
2068  see_dz .push_back( seedFitOk ? seedTrack.dz(bs.position()) : 0);
2069  see_ptErr .push_back( seedFitOk ? seedTrack.ptError() : 0);
2070  see_etaErr .push_back( seedFitOk ? seedTrack.etaError() : 0);
2071  see_phiErr .push_back( seedFitOk ? seedTrack.phiError() : 0);
2072  see_dxyErr .push_back( seedFitOk ? seedTrack.dxyError() : 0);
2073  see_dzErr .push_back( seedFitOk ? seedTrack.dzError() : 0);
2074  see_algo .push_back( algo );
2075 
2076  see_trkIdx .push_back(-1); // to be set correctly in fillTracks
2077  see_shareFrac.push_back( sharedFraction );
2078  see_simTrkIdx.push_back( tpIdx );
2079 
2081  /*
2082  TransientTrackingRecHit::RecHitPointer lastRecHit = theTTRHBuilder.build(&*(seed.recHits().second-1));
2083  TrajectoryStateOnSurface state = trajectoryStateTransform::transientState( itSeed->startingState(), lastRecHit->surface(), theMF);
2084  float pt = state.globalParameters().momentum().perp();
2085  float eta = state.globalParameters().momentum().eta();
2086  float phi = state.globalParameters().momentum().phi();
2087  see_px .push_back( state.globalParameters().momentum().x() );
2088  see_py .push_back( state.globalParameters().momentum().y() );
2089  see_pz .push_back( state.globalParameters().momentum().z() );
2090  */
2091 
2092  std::vector<int> hitIdx;
2093  std::vector<int> hitType;
2094 
2095  for (auto hit=seed.recHits().first; hit!=seed.recHits().second; ++hit) {
2097  int subid = recHit->geographicalId().subdetId();
2098  if (subid == (int) PixelSubdetector::PixelBarrel || subid == (int) PixelSubdetector::PixelEndcap) {
2099  const BaseTrackerRecHit* bhit = dynamic_cast<const BaseTrackerRecHit*>(&*recHit);
2100  const auto& clusterRef = bhit->firstClusterRef();
2101  const auto clusterKey = clusterRef.cluster_pixel().key();
2102  if(includeAllHits_) {
2103  checkProductID(hitProductIds, clusterRef.id(), "seed");
2104  pix_seeIdx[clusterKey].push_back(seedIndex);
2105  }
2106  hitIdx.push_back( clusterKey );
2107  hitType.push_back( static_cast<int>(HitType::Pixel) );
2108  } else if (subid == (int) StripSubdetector::TOB || subid == (int) StripSubdetector::TID ||
2109  subid == (int) StripSubdetector::TIB || subid == (int) StripSubdetector::TEC) {
2110  if (trackerHitRTTI::isMatched(*recHit)) {
2111  const SiStripMatchedRecHit2D * matchedHit = dynamic_cast<const SiStripMatchedRecHit2D *>(&*recHit);
2112  if(includeAllHits_) {
2113  checkProductID(hitProductIds, matchedHit->monoClusterRef().id(), "seed");
2114  checkProductID(hitProductIds, matchedHit->stereoClusterRef().id(), "seed");
2115  }
2116  int monoIdx = matchedHit->monoClusterRef().key();
2117  int stereoIdx = matchedHit->stereoClusterRef().key();
2118 
2119  std::vector<std::pair<int,int> >::const_iterator pos = find( monoStereoClusterList.begin(), monoStereoClusterList.end(), std::make_pair(monoIdx,stereoIdx) );
2120  const auto gluedIndex = std::distance(monoStereoClusterList.begin(), pos);
2121  if(includeAllHits_) glu_seeIdx[gluedIndex].push_back(seedIndex);
2122  hitIdx.push_back( gluedIndex );
2123  hitType.push_back( static_cast<int>(HitType::Glued) );
2124  } else {
2125  const BaseTrackerRecHit* bhit = dynamic_cast<const BaseTrackerRecHit*>(&*recHit);
2126  const auto& clusterRef = bhit->firstClusterRef();
2127  unsigned int clusterKey;
2128  if(clusterRef.isPhase2()){
2129  clusterKey = clusterRef.cluster_phase2OT().key();
2130  } else {
2131  clusterKey = clusterRef.cluster_strip().key();
2132  }
2133 
2134  if(includeAllHits_) {
2135  checkProductID(hitProductIds, clusterRef.id(), "seed");
2136  if(clusterRef.isPhase2()){
2137  ph2_seeIdx[clusterKey].push_back(seedIndex);
2138  } else {
2139  str_seeIdx[clusterKey].push_back(seedIndex);
2140  }
2141  }
2142 
2143  hitIdx.push_back( clusterKey );
2144  if(clusterRef.isPhase2()){
2145  hitType.push_back( static_cast<int>(HitType::Phase2OT) );
2146  } else {
2147  hitType.push_back( static_cast<int>(HitType::Strip) );
2148  }
2149  }
2150  } else {
2151  LogTrace("TrackingNtuple") << " not pixel and not Strip detector";
2152  }
2153  }
2154  see_hitIdx .push_back( hitIdx );
2155  see_hitType .push_back( hitType );
2156  see_nPixel .push_back( std::count(hitType.begin(), hitType.end(), static_cast<int>(HitType::Pixel)) );
2157  see_nGlued .push_back( std::count(hitType.begin(), hitType.end(), static_cast<int>(HitType::Glued)) );
2158  see_nStrip .push_back( std::count(hitType.begin(), hitType.end(), static_cast<int>(HitType::Strip)) );
2159  see_nPhase2OT.push_back( std::count(hitType.begin(), hitType.end(), static_cast<int>(HitType::Phase2OT)) );
2160  //the part below is not strictly needed
2161  float chi2 = -1;
2162  if (nHits==2) {
2163  TransientTrackingRecHit::RecHitPointer recHit0 = theTTRHBuilder.build(&*(seed.recHits().first));
2164  TransientTrackingRecHit::RecHitPointer recHit1 = theTTRHBuilder.build(&*(seed.recHits().first+1));
2165  std::vector<GlobalPoint> gp(2);
2166  std::vector<GlobalError> ge(2);
2167  gp[0] = recHit0->globalPosition();
2168  ge[0] = recHit0->globalPositionError();
2169  gp[1] = recHit1->globalPosition();
2170  ge[1] = recHit1->globalPositionError();
2171  LogTrace("TrackingNtuple") << "seed " << seedTrackRef.key()
2172  << " pt=" << pt << " eta=" << eta << " phi=" << phi << " q=" << charge
2173  << " - PAIR - ids: " << recHit0->geographicalId().rawId() << " " << recHit1->geographicalId().rawId()
2174  << " hitpos: " << gp[0] << " " << gp[1]
2175  << " trans0: " << (recHit0->transientHits().size()>1 ? recHit0->transientHits()[0]->globalPosition() : GlobalPoint(0,0,0))
2176  << " " << (recHit0->transientHits().size()>1 ? recHit0->transientHits()[1]->globalPosition() : GlobalPoint(0,0,0))
2177  << " trans1: " << (recHit1->transientHits().size()>1 ? recHit1->transientHits()[0]->globalPosition() : GlobalPoint(0,0,0))
2178  << " " << (recHit1->transientHits().size()>1 ? recHit1->transientHits()[1]->globalPosition() : GlobalPoint(0,0,0))
2179  << " eta,phi: " << gp[0].eta() << "," << gp[0].phi();
2180  } else if (nHits==3) {
2181  TransientTrackingRecHit::RecHitPointer recHit0 = theTTRHBuilder.build(&*(seed.recHits().first));
2182  TransientTrackingRecHit::RecHitPointer recHit1 = theTTRHBuilder.build(&*(seed.recHits().first+1));
2183  TransientTrackingRecHit::RecHitPointer recHit2 = theTTRHBuilder.build(&*(seed.recHits().first+2));
2186  declareDynArray(bool,4, bl);
2187  gp[0] = recHit0->globalPosition();
2188  ge[0] = recHit0->globalPositionError();
2189  int subid0 = recHit0->geographicalId().subdetId();
2190  bl[0] = (subid0 == StripSubdetector::TIB || subid0 == StripSubdetector::TOB || subid0 == (int) PixelSubdetector::PixelBarrel);
2191  gp[1] = recHit1->globalPosition();
2192  ge[1] = recHit1->globalPositionError();
2193  int subid1 = recHit1->geographicalId().subdetId();
2194  bl[1] = (subid1 == StripSubdetector::TIB || subid1 == StripSubdetector::TOB || subid1 == (int) PixelSubdetector::PixelBarrel);
2195  gp[2] = recHit2->globalPosition();
2196  ge[2] = recHit2->globalPositionError();
2197  int subid2 = recHit2->geographicalId().subdetId();
2198  bl[2] = (subid2 == StripSubdetector::TIB || subid2 == StripSubdetector::TOB || subid2 == (int) PixelSubdetector::PixelBarrel);
2199  RZLine rzLine(gp,ge,bl);
2200  float seed_chi2 = rzLine.chi2();
2201  //float seed_pt = state.globalParameters().momentum().perp();
2202  float seed_pt = pt;
2203  LogTrace("TrackingNtuple") << "seed " << seedTrackRef.key()
2204  << " pt=" << pt << " eta=" << eta << " phi=" << phi << " q=" << charge
2205  << " - TRIPLET - ids: " << recHit0->geographicalId().rawId() << " " << recHit1->geographicalId().rawId() << " " << recHit2->geographicalId().rawId()
2206  << " hitpos: " << gp[0] << " " << gp[1] << " " << gp[2]
2207  << " trans0: " << (recHit0->transientHits().size()>1 ? recHit0->transientHits()[0]->globalPosition() : GlobalPoint(0,0,0))
2208  << " " << (recHit0->transientHits().size()>1 ? recHit0->transientHits()[1]->globalPosition() : GlobalPoint(0,0,0))
2209  << " trans1: " << (recHit1->transientHits().size()>1 ? recHit1->transientHits()[0]->globalPosition() : GlobalPoint(0,0,0))
2210  << " " << (recHit1->transientHits().size()>1 ? recHit1->transientHits()[1]->globalPosition() : GlobalPoint(0,0,0))
2211  << " trans2: " << (recHit2->transientHits().size()>1 ? recHit2->transientHits()[0]->globalPosition() : GlobalPoint(0,0,0))
2212  << " " << (recHit2->transientHits().size()>1 ? recHit2->transientHits()[1]->globalPosition() : GlobalPoint(0,0,0))
2213  << " local: " << recHit2->localPosition()
2214  //<< " tsos pos, mom: " << state.globalPosition()<<" "<<state.globalMomentum()
2215  << " eta,phi: " << gp[0].eta() << "," << gp[0].phi()
2216  << " pt,chi2: " << seed_pt << "," << seed_chi2;
2217  chi2 = seed_chi2;
2218  }
2219  see_chi2 .push_back( chi2 );
2220  }
2221  }
2222 }
unsigned int size_type
Definition: View.h:85
std::vector< short > see_fitok
Phase2Cluster1DRef cluster_phase2OT() const
std::vector< std::vector< int > > see_hitType
int i
Definition: DBlmapReader.cc:9
std::vector< std::vector< int > > ph2_seeIdx
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:457
std::vector< unsigned int > see_nStrip
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
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
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:264
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
std::vector< std::vector< int > > pix_seeIdx
ClusterPixelRef cluster_pixel() const
std::vector< float > see_etaErr
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
std::vector< float > see_phi
OmniClusterRef const & monoClusterRef() const
char const * module
Definition: ProductLabels.h:5
std::vector< float > see_pz
#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
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
const Point & position() const
position
Definition: BeamSpot.h:62
#define declareDynArray(T, n, x)
Definition: DynArray.h:59
std::vector< unsigned int > see_offset
std::vector< int > see_trkIdx
unsigned int key() const
std::vector< std::vector< int > > see_hitIdx
std::vector< unsigned int > see_nPixel
std::vector< float > see_eta
std::vector< float > see_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 1619 of file TrackingNtuple.cc.

References funct::abs(), trackingPlots::assoc, DetId::det(), Exception, TrackerGeometry::idToDetUnit(), TrackerTopology::layer(), LogTrace, TrackingParticle::pdgId(), DetId::rawId(), simhit_det, simhit_detId, simhit_eloss, simhit_hitIdx, simhit_hitType, simhit_lay, simhit_particle, simhit_process, simhit_simTrkIdx, simhit_tof, simhit_x, simhit_y, simhit_z, SimHitTPAssociationProducer::simHitTPAssociationListGreater(), simTrackMatching_cfi::simTrack, DetId::subdetId(), and DetId::Tracker.

Referenced by analyze().

1624  {
1625 
1626  for(const auto& assoc: simHitsTPAssoc) {
1627  auto tpKey = assoc.first.key();
1628 
1629  // SimHitTPAssociationList can contain more TrackingParticles than
1630  // what are given to this EDAnalyzer, so we can filter those out here.
1631  auto found = tpKeyToIndex.find(tpKey);
1632  if(found == tpKeyToIndex.end())
1633  continue;
1634  const auto tpIndex = found->second;
1635 
1636  // skip non-tracker simhits (mostly muons)
1637  const auto& simhit = *(assoc.second);
1638  auto detId = DetId(simhit.detUnitId());
1639  if(detId.det() != DetId::Tracker) continue;
1640 
1641  // Skip electron SimHits for non-electron TrackingParticles to
1642  // filter out delta rays. The delta ray hits just confuse. If we
1643  // need them later, let's add them as a separate "collection" of
1644  // hits of a TP
1645  const TrackingParticle& tp = *(assoc.first);
1646  if(std::abs(simhit.particleType()) == 11 && std::abs(tp.pdgId()) != 11) continue;
1647 
1648  auto simHitKey = std::make_pair(assoc.second.key(), assoc.second.id());
1649 
1650  if(simHitRefKeyToIndex.find(simHitKey) != simHitRefKeyToIndex.end()) {
1651  for(const auto& assoc2: simHitsTPAssoc) {
1652  if(std::make_pair(assoc2.second.key(), assoc2.second.id()) == simHitKey) {
1653 
1654 #ifdef EDM_ML_DEBUG
1655  auto range1 = std::equal_range(simHitsTPAssoc.begin(), simHitsTPAssoc.end(),
1656  std::make_pair(assoc.first, TrackPSimHitRef()),
1658  auto range2 = std::equal_range(simHitsTPAssoc.begin(), simHitsTPAssoc.end(),
1659  std::make_pair(assoc2.first, TrackPSimHitRef()),
1661 
1662  LogTrace("TrackingNtuple") << "Earlier TP " << assoc2.first.key() << " SimTrack Ids";
1663  for(const auto& simTrack: assoc2.first->g4Tracks()) {
1664  edm::LogPrint("TrackingNtuple") << " SimTrack " << simTrack.trackId() << " BX:event " << simTrack.eventId().bunchCrossing() << ":" << simTrack.eventId().event();
1665  }
1666  for(auto iHit = range2.first; iHit != range2.second; ++iHit) {
1667  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();
1668  }
1669  LogTrace("TrackingNtuple") << "Current TP " << assoc.first.key() << " SimTrack Ids";
1670  for(const auto& simTrack: assoc.first->g4Tracks()) {
1671  edm::LogPrint("TrackingNtuple") << " SimTrack " << simTrack.trackId() << " BX:event " << simTrack.eventId().bunchCrossing() << ":" << simTrack.eventId().event();
1672  }
1673  for(auto iHit = range1.first; iHit != range1.second; ++iHit) {
1674  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();
1675  }
1676 #endif
1677 
1678  throw cms::Exception("LogicError") << "Got second time the SimHit " << simHitKey.first << " of " << simHitKey.second << ", first time with TrackingParticle " << assoc2.first.key() << ", now with " << tpKey;
1679  }
1680  }
1681  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!";
1682  }
1683 
1684  auto det = tracker.idToDetUnit(detId);
1685  if(!det)
1686  throw cms::Exception("LogicError") << "Did not find a det unit for DetId " << simhit.detUnitId() << " from tracker geometry";
1687 
1688  const auto pos = det->surface().toGlobal(simhit.localPosition());
1689  const float tof = simhit.timeOfFlight();
1690 
1691  const auto simHitIndex = simhit_detId.size();
1692  simHitRefKeyToIndex[simHitKey] = simHitIndex;
1693 
1694  simhit_det.push_back(detId.subdetId());
1695  simhit_lay.push_back(tTopo.layer(detId));
1696  simhit_detId.push_back(detId.rawId());
1697  simhit_x.push_back(pos.x());
1698  simhit_y.push_back(pos.y());
1699  simhit_z.push_back(pos.z());
1700  simhit_particle.push_back(simhit.particleType());
1701  simhit_process.push_back(simhit.processType());
1702  simhit_eloss.push_back(simhit.energyLoss());
1703  simhit_tof.push_back(tof);
1704  //simhit_simTrackId.push_back(simhit.trackId());
1705 
1706  simhit_simTrkIdx.push_back(tpIndex);
1707 
1708  simhit_hitIdx.emplace_back(); // filled in matchCluster
1709  simhit_hitType.emplace_back(); // filled in matchCluster
1710 
1711  tpHitList.emplace_back(tpKey, simHitIndex, tof, simhit.detUnitId());
1712  }
1713 }
const TrackerGeomDet * idToDetUnit(DetId) const
Return the pointer to the GeomDetUnit corresponding to a given DetId.
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< unsigned short > simhit_det
std::vector< int > simhit_simTrkIdx
std::vector< float > simhit_z
simTrack
per collection params
std::vector< std::vector< int > > simhit_hitType
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
std::vector< unsigned int > simhit_detId
#define LogTrace(id)
Definition: DetId.h:18
std::vector< unsigned short > simhit_lay
unsigned int layer(const DetId &id) const
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
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 1874 of file TrackingNtuple.cc.

References edmNew::DetSetVector< T >::begin(), TransientTrackingRecHitBuilder::build(), edmNew::DetSetVector< T >::end(), edm::Event::getByToken(), glu_bbxi, glu_det, glu_detId, glu_isBarrel, glu_lay, 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().

1878  {
1880  iEvent.getByToken(stripMatchedRecHitToken_, matchedHits);
1881  for (auto it = matchedHits->begin(); it!=matchedHits->end(); it++ ) {
1882  const DetId hitId = it->detId();
1883  for (auto hit = it->begin(); hit!=it->end(); hit++ ) {
1884  TransientTrackingRecHit::RecHitPointer ttrh = theTTRHBuilder.build(&*hit);
1885  const int lay = tTopo.layer(hitId);
1886  monoStereoClusterList.emplace_back(hit->monoHit().cluster().key(),hit->stereoHit().cluster().key());
1887  glu_isBarrel .push_back( (hitId.subdetId()==StripSubdetector::TIB || hitId.subdetId()==StripSubdetector::TOB) );
1888  glu_det .push_back( hitId.subdetId() );
1889  glu_lay .push_back( tTopo.layer(hitId) );
1890  glu_detId .push_back( hitId.rawId() );
1891  glu_monoIdx .push_back( hit->monoHit().cluster().key() );
1892  glu_stereoIdx.push_back( hit->stereoHit().cluster().key() );
1893  glu_seeIdx .emplace_back(); // filled in fillSeeds
1894  glu_x .push_back( ttrh->globalPosition().x() );
1895  glu_y .push_back( ttrh->globalPosition().y() );
1896  glu_z .push_back( ttrh->globalPosition().z() );
1897  glu_xx .push_back( ttrh->globalPositionError().cxx() );
1898  glu_xy .push_back( ttrh->globalPositionError().cyx() );
1899  glu_yy .push_back( ttrh->globalPositionError().cyy() );
1900  glu_yz .push_back( ttrh->globalPositionError().czy() );
1901  glu_zz .push_back( ttrh->globalPositionError().czz() );
1902  glu_zx .push_back( ttrh->globalPositionError().czx() );
1903  glu_radL .push_back( ttrh->surface()->mediumProperties().radLen() );
1904  glu_bbxi .push_back( ttrh->surface()->mediumProperties().xi() );
1905  LogTrace("TrackingNtuple") << "stripMatchedHit"
1906  << " cluster0=" << hit->stereoHit().cluster().key()
1907  << " cluster1=" << hit->monoHit().cluster().key()
1908  << " subdId=" << hitId.subdetId()
1909  << " lay=" << lay
1910  << " rawId=" << hitId.rawId()
1911  << " pos =" << ttrh->globalPosition();
1912  }
1913  }
1914 }
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
std::vector< unsigned int > glu_lay
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:457
std::vector< float > glu_x
std::vector< unsigned int > glu_det
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
const_iterator begin(bool update=false) const
std::vector< unsigned int > glu_detId
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 1780 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_det, str_detId, str_isBarrel, str_isStereo, str_lay, 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().

1789  {
1790  //index strip hit branches by cluster index
1792  iEvent.getByToken(stripRphiRecHitToken_, rphiHits);
1794  iEvent.getByToken(stripStereoRecHitToken_, stereoHits);
1795  int totalStripHits = rphiHits->dataSize()+stereoHits->dataSize();
1796  str_isBarrel .resize(totalStripHits);
1797  str_isStereo .resize(totalStripHits);
1798  str_det .resize(totalStripHits);
1799  str_lay .resize(totalStripHits);
1800  str_detId .resize(totalStripHits);
1801  str_trkIdx .resize(totalStripHits); // filled in fillTracks
1802  str_seeIdx .resize(totalStripHits); // filled in fillSeeds
1803  str_simHitIdx.resize(totalStripHits);
1804  str_simType .resize(totalStripHits);
1805  str_x .resize(totalStripHits);
1806  str_y .resize(totalStripHits);
1807  str_z .resize(totalStripHits);
1808  str_xx .resize(totalStripHits);
1809  str_xy .resize(totalStripHits);
1810  str_yy .resize(totalStripHits);
1811  str_yz .resize(totalStripHits);
1812  str_zz .resize(totalStripHits);
1813  str_zx .resize(totalStripHits);
1814  str_chargeFraction.resize(totalStripHits);
1815  str_radL .resize(totalStripHits);
1816  str_bbxi .resize(totalStripHits);
1817 
1818  auto fill = [&](const SiStripRecHit2DCollection& hits, const char *name, bool isStereo) {
1819  for(const auto& detset: hits) {
1820  const DetId hitId = detset.detId();
1821  for(const auto& hit: detset) {
1822  TransientTrackingRecHit::RecHitPointer ttrh = theTTRHBuilder.build(&hit);
1823 
1824  hitProductIds.insert(hit.cluster().id());
1825 
1826  const int key = hit.cluster().key();
1827  const int lay = tTopo.layer(hitId);
1828  SimHitData simHitData = matchCluster(hit.firstClusterRef(), hitId, key, ttrh,
1829  clusterToTPMap, tpKeyToIndex, simHitsTPAssoc, digiSimLink, simHitRefKeyToIndex, HitType::Strip);
1831  str_isStereo [key] = isStereo;
1832  str_det [key] = hitId.subdetId();
1833  str_lay [key] = lay;
1834  str_detId [key] = hitId.rawId();
1835  str_simHitIdx[key] = simHitData.matchingSimHit;
1836  str_simType [key] = static_cast<int>(simHitData.type);
1837  str_x [key] = ttrh->globalPosition().x();
1838  str_y [key] = ttrh->globalPosition().y();
1839  str_z [key] = ttrh->globalPosition().z();
1840  str_xx [key] = ttrh->globalPositionError().cxx();
1841  str_xy [key] = ttrh->globalPositionError().cyx();
1842  str_yy [key] = ttrh->globalPositionError().cyy();
1843  str_yz [key] = ttrh->globalPositionError().czy();
1844  str_zz [key] = ttrh->globalPositionError().czz();
1845  str_zx [key] = ttrh->globalPositionError().czx();
1846  str_chargeFraction[key] = simHitData.chargeFraction;
1847  str_radL [key] = ttrh->surface()->mediumProperties().radLen();
1848  str_bbxi [key] = ttrh->surface()->mediumProperties().xi();
1849  LogTrace("TrackingNtuple") << name << " cluster=" << key
1850  << " subdId=" << hitId.subdetId()
1851  << " lay=" << lay
1852  << " rawId=" << hitId.rawId()
1853  << " pos =" << ttrh->globalPosition()
1854  << " nMatchingSimHit=" << simHitData.matchingSimHit.size();
1855  if(!simHitData.matchingSimHit.empty()) {
1856  const auto simHitIdx = simHitData.matchingSimHit[0];
1857  LogTrace("TrackingNtuple") << " firstMatchingSimHit=" << simHitIdx
1858  << " simHitPos=" << GlobalPoint(simhit_x[simHitIdx], simhit_y[simHitIdx], simhit_z[simHitIdx])
1859  << " simHitPos=" << GlobalPoint(simhit_x[simHitIdx], simhit_y[simHitIdx], simhit_z[simHitIdx])
1860  << " energyLoss=" << simhit_eloss[simHitIdx]
1861  << " particleType=" << simhit_particle[simHitIdx]
1862  << " processType=" << simhit_process[simHitIdx]
1863  << " bunchCrossing=" << simHitData.bunchCrossing[0]
1864  << " event=" << simHitData.event[0];
1865  }
1866  }
1867  }
1868  };
1869 
1870  fill(*rphiHits, "stripRPhiHit", false);
1871  fill(*stereoHits, "stripStereoHit", true);
1872 }
std::vector< unsigned short > str_lay
edm::EDGetTokenT< SiStripRecHit2DCollection > stripRphiRecHitToken_
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:457
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< short > str_isStereo
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< unsigned short > str_det
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
std::vector< unsigned int > str_detId
void TrackingNtuple::fillTrackingParticles ( const edm::Event iEvent,
const edm::EventSetup iSetup,
const edm::RefToBaseVector< reco::Track > &  tracks,
const TrackingParticleRefVector tpCollection,
const TrackingVertexRefKeyToIndex tvKeyToIndex,
const reco::TrackToTrackingParticleAssociator associatorByHits,
const std::vector< TPHitIndex > &  tpHitList 
)
private

Definition at line 2406 of file TrackingNtuple.cc.

References reco::TrackToTrackingParticleAssociator::associateSimToReco(), funct::cos(), edm::AssociationMap< Tag >::end(), Exception, edm::AssociationMap< Tag >::find(), edm::EventSetup::get(), edm::Event::getByToken(), LogTrace, M_PI, ParametersDefinerForTP::momentum(), MuonTrackValidator_cfi::parametersDefiner, PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, edm::ESHandle< T >::product(), sim_bunchCrossing, sim_decayVtxIdx, sim_eta, sim_event, 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_hitType, funct::sin(), 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().

2412  {
2413  edm::ESHandle<ParametersDefinerForTP> parametersDefinerH;
2414  iSetup.get<TrackAssociatorRecord>().get(parametersDefinerName_, parametersDefinerH);
2415  const ParametersDefinerForTP *parametersDefiner = parametersDefinerH.product();
2416 
2417  // Number of 3D layers for TPs
2419  iEvent.getByToken(tpNLayersToken_, tpNLayersH);
2420  const auto& nLayers_tPCeff = *tpNLayersH;
2421 
2422  iEvent.getByToken(tpNPixelLayersToken_, tpNLayersH);
2423  const auto& nPixelLayers_tPCeff = *tpNLayersH;
2424 
2425  iEvent.getByToken(tpNStripStereoLayersToken_, tpNLayersH);
2426  const auto& nStripMonoAndStereoLayers_tPCeff = *tpNLayersH;
2427 
2428  reco::SimToRecoCollection simRecColl = associatorByHits.associateSimToReco(tracks, tpCollection);
2429 
2430  for(const TrackingParticleRef& tp: tpCollection) {
2431  LogTrace("TrackingNtuple") << "tracking particle pt=" << tp->pt() << " eta=" << tp->eta() << " phi=" << tp->phi();
2432  bool isRecoMatched = false;
2433  std::vector<int> tkIdx;
2434  std::vector<float> sharedFraction;
2435  auto foundTracks = simRecColl.find(tp);
2436  if(foundTracks != simRecColl.end()) {
2437  isRecoMatched = true;
2438  for(const auto trackQuality: foundTracks->val) {
2439  sharedFraction.push_back(trackQuality.second);
2440  tkIdx.push_back(trackQuality.first.key());
2441  }
2442  }
2443  LogTrace("TrackingNtuple") << "matched to tracks = " << make_VectorPrinter(tkIdx) << " isRecoMatched=" << isRecoMatched;
2444  sim_event .push_back(tp->eventId().event());
2445  sim_bunchCrossing.push_back(tp->eventId().bunchCrossing());
2446  sim_pdgId .push_back(tp->pdgId());
2447  sim_px .push_back(tp->px());
2448  sim_py .push_back(tp->py());
2449  sim_pz .push_back(tp->pz());
2450  sim_pt .push_back(tp->pt());
2451  sim_eta .push_back(tp->eta());
2452  sim_phi .push_back(tp->phi());
2453  sim_q .push_back(tp->charge());
2454  sim_trkIdx .push_back(tkIdx);
2455  sim_shareFrac.push_back(sharedFraction);
2456  sim_parentVtxIdx.push_back( tvKeyToIndex.at(tp->parentVertex().key()) );
2457  std::vector<int> decayIdx;
2458  for(const auto& v: tp->decayVertices())
2459  decayIdx.push_back( tvKeyToIndex.at(v.key()) );
2460  sim_decayVtxIdx.push_back(decayIdx);
2461 
2462  //Calcualte the impact parameters w.r.t. PCA
2463  TrackingParticle::Vector momentum = parametersDefiner->momentum(iEvent,iSetup,tp);
2464  TrackingParticle::Point vertex = parametersDefiner->vertex(iEvent,iSetup,tp);
2465  float dxySim = (-vertex.x()*sin(momentum.phi())+vertex.y()*cos(momentum.phi()));
2466  float dzSim = vertex.z() - (vertex.x()*momentum.x()+vertex.y()*momentum.y())/sqrt(momentum.perp2())
2467  * momentum.z()/sqrt(momentum.perp2());
2468  const double lambdaSim = M_PI/2 - momentum.theta();
2469  sim_pca_pt .push_back(std::sqrt(momentum.perp2()));
2470  sim_pca_eta .push_back(momentum.Eta());
2471  sim_pca_lambda .push_back(lambdaSim);
2472  sim_pca_cotTheta .push_back(1/tan(M_PI*0.5-lambdaSim));
2473  sim_pca_phi .push_back(momentum.phi());
2474  sim_pca_dxy .push_back(dxySim);
2475  sim_pca_dz .push_back(dzSim);
2476 
2477  std::vector<int> hitIdx;
2478  int nPixel=0, nStrip=0;
2479  auto rangeHit = std::equal_range(tpHitList.begin(), tpHitList.end(), TPHitIndex(tp.key()), tpHitIndexListLess);
2480  for(auto ip = rangeHit.first; ip != rangeHit.second; ++ip) {
2481  auto type = HitType::Unknown;
2482  if(!simhit_hitType[ip->simHitIdx].empty())
2483  type = static_cast<HitType>(simhit_hitType[ip->simHitIdx][0]);
2484  LogTrace("TrackingNtuple") << "simhit=" << ip->simHitIdx << " type=" << static_cast<int>(type);
2485  hitIdx.push_back(ip->simHitIdx);
2486  const auto detid = DetId(simhit_detId[ip->simHitIdx]);
2487  if(detid.det() != DetId::Tracker) {
2488  throw cms::Exception("LogicError") << "Encountered SimHit for TP " << tp.key() << " with DetId " << detid.rawId() << " whose det() is not Tracker but " << detid.det();
2489  }
2490  const auto subdet = detid.subdetId();
2491  switch(subdet) {
2494  ++nPixel;
2495  break;
2496  case StripSubdetector::TIB:
2497  case StripSubdetector::TID:
2498  case StripSubdetector::TOB:
2499  case StripSubdetector::TEC:
2500  ++nStrip;
2501  break;
2502  default:
2503  throw cms::Exception("LogicError") << "Encountered SimHit for TP " << tp.key() << " with DetId " << detid.rawId() << " whose subdet is not recognized, is " << subdet;
2504  };
2505  }
2506  sim_nValid .push_back( hitIdx.size() );
2507  sim_nPixel .push_back( nPixel );
2508  sim_nStrip .push_back( nStrip );
2509 
2510  const auto nSimLayers = nLayers_tPCeff[tp];
2511  const auto nSimPixelLayers = nPixelLayers_tPCeff[tp];
2512  const auto nSimStripMonoAndStereoLayers = nStripMonoAndStereoLayers_tPCeff[tp];
2513  sim_nLay .push_back( nSimLayers );
2514  sim_nPixelLay.push_back( nSimPixelLayers );
2515  sim_n3DLay .push_back( nSimPixelLayers+nSimStripMonoAndStereoLayers );
2516 
2517  sim_simHitIdx.push_back(hitIdx);
2518  }
2519 }
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:457
std::vector< float > sim_phi
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
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
edm::EDGetTokenT< edm::ValueMap< unsigned int > > tpNStripStereoLayersToken_
std::string parametersDefinerName_
std::vector< float > sim_pca_phi
T sqrt(T t)
Definition: SSEVec.h:18
std::vector< float > sim_eta
std::vector< int > sim_pdgId
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
std::vector< std::vector< int > > simhit_hitType
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 > simhit_detId
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
const T & get() const
Definition: EventSetup.h:56
std::vector< unsigned int > sim_nPixel
edm::EDGetTokenT< edm::ValueMap< unsigned int > > tpNLayersToken_
std::vector< float > sim_pca_eta
edm::EDGetTokenT< edm::ValueMap< unsigned int > > tpNPixelLayersToken_
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
std::vector< float > sim_pt
T const * product() const
Definition: ESHandle.h:86
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::fillTrackingVertices ( const TrackingVertexRefVector trackingVertices,
const TrackingParticleRefKeyToIndex tpKeyToIndex 
)
private

Definition at line 2553 of file TrackingNtuple.cc.

References EncodedEventId::bunchCrossing(), TrackingVertex::daughterTracks(), EncodedEventId::event(), TrackingVertex::eventId(), lumiContext::fill, TrackingVertex::g4Vertices(), training_settings::idx, hpstanc_transforms::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().

2555  {
2556  int current_event = -1;
2557  for(const auto& ref: trackingVertices) {
2558  const TrackingVertex v = *ref;
2559  if(v.eventId().event() != current_event) {
2560  // next PV
2561  current_event = v.eventId().event();
2562  simpv_idx.push_back(simvtx_x.size());
2563  }
2564 
2565  unsigned int processType = std::numeric_limits<unsigned int>::max();
2566  if(!v.g4Vertices().empty()) {
2567  processType = v.g4Vertices()[0].processType();
2568  }
2569 
2570  simvtx_event.push_back(v.eventId().event());
2571  simvtx_bunchCrossing.push_back(v.eventId().bunchCrossing());
2572  simvtx_processType.push_back(processType);
2573 
2574  simvtx_x.push_back(v.position().x());
2575  simvtx_y.push_back(v.position().y());
2576  simvtx_z.push_back(v.position().z());
2577 
2578  auto fill = [&](const TrackingParticleRefVector& tps, std::vector<int>& idx) {
2579  for(const auto& tpRef: tps) {
2580  auto found = tpKeyToIndex.find(tpRef.key());
2581  if(found != tpKeyToIndex.end()) {
2582  idx.push_back(tpRef.key());
2583  }
2584  }
2585  };
2586 
2587  std::vector<int> sourceIdx;
2588  std::vector<int> daughterIdx;
2589  fill(v.sourceTracks(), sourceIdx);
2590  fill(v.daughterTracks(), daughterIdx);
2591 
2592  simvtx_sourceSimIdx.push_back(sourceIdx);
2593  simvtx_daughterSimIdx.push_back(daughterIdx);
2594  }
2595 }
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::TrackToTrackingParticleAssociator associatorByHits,
const TransientTrackingRecHitBuilder theTTRHBuilder,
const TrackerTopology tTopo,
const std::set< edm::ProductID > &  hitProductIds,
const std::map< edm::ProductID, size_t > &  seedToCollIndex 
)
private

Definition at line 2224 of file TrackingNtuple.cc.

References reco::TrackBase::algoName(), reco::TrackToTrackingParticleAssociator::associateRecoToSim(), TransientTrackingRecHitBuilder::build(), ALCARECOTkAlJpsiMuMu_cff::charge, HiEvtPlane_cfi::chi2, OmniClusterRef::cluster_pixel(), DetId::det(), SoftLeptonByDistance_cfi::distance, edm::AssociationMap< Tag >::end(), stringResolutionProvider_cfi::eta, Exception, edm::AssociationMap< Tag >::find(), BaseTrackerRecHit::firstClusterRef(), reco::TrackBase::highPurity, AnalysisDataFormats_SUSYBSMObjects::hp, i, inv_det, inv_detId, inv_isBarrel, inv_lay, inv_type, Invalid, 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, 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, trk_algoMask, trk_hitIdx, trk_hitType, trk_isHP, trk_seedIdx, trk_shareFrac, trk_simTrkIdx, trk_stopReason, and trk_vtxIdx.

Referenced by analyze().

2233  {
2234  reco::RecoToSimCollection recSimColl = associatorByHits.associateRecoToSim(tracks, tpCollection);
2236  labelsForToken(trackToken_, labels);
2237  LogTrace("TrackingNtuple") << "NEW TRACK LABEL: " << labels.module;
2238  for(size_t iTrack = 0; iTrack<tracks.size(); ++iTrack) {
2239  const auto& itTrack = tracks[iTrack];
2240  int nSimHits = 0;
2241  bool isSimMatched = false;
2242  std::vector<float> sharedFraction;
2243  std::vector<int> tpIdx;
2244  auto foundTPs = recSimColl.find(itTrack);
2245  if (foundTPs != recSimColl.end()) {
2246  if (!foundTPs->val.empty()) {
2247  nSimHits = foundTPs->val[0].first->numberOfTrackerHits();
2248  isSimMatched = true;
2249  }
2250  for(const auto tpQuality: foundTPs->val) {
2251  sharedFraction.push_back(tpQuality.second);
2252  tpIdx.push_back( tpKeyToIndex.at( tpQuality.first.key() ) );
2253  }
2254  }
2255  int charge = itTrack->charge();
2256  float pt = itTrack->pt();
2257  float eta = itTrack->eta();
2258  const double lambda = itTrack->lambda();
2259  float chi2 = itTrack->normalizedChi2();
2260  float phi = itTrack->phi();
2261  int nHits = itTrack->numberOfValidHits();
2262  const reco::HitPattern& hp = itTrack->hitPattern();
2263  trk_px .push_back(itTrack->px());
2264  trk_py .push_back(itTrack->py());
2265  trk_pz .push_back(itTrack->pz());
2266  trk_pt .push_back(pt);
2267  trk_inner_px.push_back(itTrack->innerMomentum().x());
2268  trk_inner_py.push_back(itTrack->innerMomentum().y());
2269  trk_inner_pz.push_back(itTrack->innerMomentum().z());
2270  trk_inner_pt.push_back(itTrack->innerMomentum().rho());
2271  trk_outer_px.push_back(itTrack->outerMomentum().x());
2272  trk_outer_py.push_back(itTrack->outerMomentum().y());
2273  trk_outer_pz.push_back(itTrack->outerMomentum().z());
2274  trk_outer_pt.push_back(itTrack->outerMomentum().rho());
2275  trk_eta .push_back(eta);
2276  trk_lambda .push_back(lambda);
2277  trk_cotTheta .push_back(1/tan(M_PI*0.5-lambda));
2278  trk_phi .push_back(phi);
2279  trk_dxy .push_back(itTrack->dxy(bs.position()));
2280  trk_dz .push_back(itTrack->dz(bs.position()));
2281  trk_ptErr .push_back(itTrack->ptError());
2282  trk_etaErr .push_back(itTrack->etaError());
2283  trk_lambdaErr.push_back(itTrack->lambdaError());
2284  trk_phiErr .push_back(itTrack->phiError());
2285  trk_dxyErr .push_back(itTrack->dxyError());
2286  trk_dzErr .push_back(itTrack->dzError());
2287  trk_refpoint_x.push_back(itTrack->vx());
2288  trk_refpoint_y.push_back(itTrack->vy());
2289  trk_refpoint_z.push_back(itTrack->vz());
2290  trk_nChi2 .push_back( itTrack->normalizedChi2());
2291  trk_shareFrac.push_back(sharedFraction);
2292  trk_q .push_back(charge);
2293  trk_nValid .push_back(hp.numberOfValidHits());
2295  trk_nPixel .push_back(hp.numberOfValidPixelHits());
2296  trk_nStrip .push_back(hp.numberOfValidStripHits());
2297  trk_nPixelLay.push_back(hp.pixelLayersWithMeasurement());
2298  trk_nStripLay.push_back(hp.stripLayersWithMeasurement());
2302  trk_algo .push_back(itTrack->algo());
2303  trk_originalAlgo.push_back(itTrack->originalAlgo());
2304  trk_algoMask .push_back(itTrack->algoMaskUL());
2305  trk_stopReason.push_back(itTrack->stopReason());
2306  trk_isHP .push_back(itTrack->quality(reco::TrackBase::highPurity));
2307  if(includeSeeds_) {
2308  auto offset = seedCollToOffset.find(itTrack->seedRef().id());
2309  if(offset == seedCollToOffset.end()) {
2310  throw cms::Exception("Configuration") << "Track algo '" << reco::TrackBase::algoName(itTrack->algo())
2311  << "' originalAlgo '" << reco::TrackBase::algoName(itTrack->originalAlgo())
2312  << "' refers to seed collection " << itTrack->seedRef().id()
2313  << ", but that seed collection is not given as an input. The following collections were given as an input " << make_ProductIDMapPrinter(seedCollToOffset);
2314  }
2315 
2316  const auto seedIndex = offset->second + itTrack->seedRef().key();
2317  trk_seedIdx .push_back(seedIndex);
2318  if(see_trkIdx[seedIndex] != -1) {
2319  throw cms::Exception("LogicError") << "Track index has already been set for seed " << seedIndex << " to " << see_trkIdx[seedIndex] << "; was trying to set it to " << iTrack;
2320  }
2321  see_trkIdx[seedIndex] = iTrack;
2322  }
2323  trk_vtxIdx .push_back(-1); // to be set correctly in fillVertices
2324  trk_simTrkIdx.push_back(tpIdx);
2325  LogTrace("TrackingNtuple") << "Track #" << itTrack.key() << " with q=" << charge
2326  << ", pT=" << pt << " GeV, eta: " << eta << ", phi: " << phi
2327  << ", chi2=" << chi2
2328  << ", Nhits=" << nHits
2329  << ", algo=" << itTrack->algoName(itTrack->algo()).c_str()
2330  << " hp=" << itTrack->quality(reco::TrackBase::highPurity)
2331  << " seed#=" << itTrack->seedRef().key()
2332  << " simMatch=" << isSimMatched
2333  << " nSimHits=" << nSimHits
2334  << " sharedFraction=" << (sharedFraction.empty()?-1:sharedFraction[0])
2335  << " tpIdx=" << (tpIdx.empty()?-1:tpIdx[0]);
2336  std::vector<int> hitIdx;
2337  std::vector<int> hitType;
2338 
2339  for(auto i=itTrack->recHitsBegin(); i!=itTrack->recHitsEnd(); i++) {
2340  TransientTrackingRecHit::RecHitPointer hit=theTTRHBuilder.build(&**i );
2341  DetId hitId = hit->geographicalId();
2342  LogTrace("TrackingNtuple") << "hit #" << std::distance(itTrack->recHitsBegin(), i) << " subdet=" << hitId.subdetId();
2343  if(hitId.det() != DetId::Tracker)
2344  continue;
2345 
2346  LogTrace("TrackingNtuple") << " " << subdetstring(hitId.subdetId()) << " " << tTopo.layer(hitId);
2347 
2348  if (hit->isValid()) {
2349  //ugly... but works
2350  const BaseTrackerRecHit* bhit = dynamic_cast<const BaseTrackerRecHit*>(&*hit);
2351  const auto& clusterRef = bhit->firstClusterRef();
2352  unsigned int clusterKey;
2353  if(clusterRef.isPixel()){
2354  clusterKey = clusterRef.cluster_pixel().key();
2355  } else if(clusterRef.isPhase2()){
2356  clusterKey = clusterRef.cluster_phase2OT().key();
2357  } else {
2358  clusterKey = clusterRef.cluster_strip().key();
2359  }
2360 
2361  LogTrace("TrackingNtuple") << " id: " << hitId.rawId() << " - globalPos =" << hit->globalPosition()
2362  << " cluster=" << clusterKey
2363  << " clusterRef ID=" << clusterRef.id()
2364  << " eta,phi: " << hit->globalPosition().eta() << "," << hit->globalPosition().phi();
2365  if(includeAllHits_) {
2366  checkProductID(hitProductIds, clusterRef.id(), "track");
2367  if(clusterRef.isPixel()){
2368  pix_trkIdx[clusterKey].push_back(iTrack);
2369  } else if(clusterRef.isPhase2()){
2370  ph2_trkIdx[clusterKey].push_back(iTrack);
2371  } else {
2372  str_trkIdx[clusterKey].push_back(iTrack);
2373  }
2374 
2375  }
2376 
2377  hitIdx.push_back(clusterKey);
2378  if(clusterRef.isPixel()){
2379  hitType.push_back( static_cast<int>(HitType::Pixel));
2380  } else if(clusterRef.isPhase2()){
2381  hitType.push_back( static_cast<int>(HitType::Phase2OT));
2382  } else {
2383  hitType.push_back( static_cast<int>(HitType::Strip));
2384  }
2385  } else {
2386  LogTrace("TrackingNtuple") << " - invalid hit";
2387 
2388  hitIdx.push_back( inv_isBarrel.size() );
2389  hitType.push_back( static_cast<int>(HitType::Invalid) );
2390 
2391  inv_isBarrel.push_back( hitId.subdetId()==1 );
2392  inv_det .push_back( hitId.subdetId() );
2393  inv_lay .push_back( tTopo.layer(hitId) );
2394  inv_detId .push_back( hitId.rawId() );
2395  inv_type .push_back( hit->getType() );
2396 
2397  }
2398  }
2399 
2400  trk_hitIdx.push_back(hitIdx);
2401  trk_hitType.push_back(hitType);
2402  }
2403 }
int i
Definition: DBlmapReader.cc:9
std::vector< float > trk_phi
std::vector< unsigned int > trk_nOuterLost
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< unsigned short > inv_lay
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_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
std::vector< unsigned int > inv_detId
key_type key() const
Accessor for product key.
Definition: Ref.h:264
int pixelLayersWithMeasurement() const
Definition: HitPattern.cc:499
std::vector< float > trk_refpoint_x
std::vector< unsigned int > trk_stopReason
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_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
std::vector< int > trk_seedIdx
std::vector< std::vector< int > > pix_trkIdx
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
std::vector< unsigned int > trk_n3DLay
std::vector< float > trk_outer_pt
const bool includeSeeds_
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
std::vector< unsigned short > inv_det
Definition: DetId.h:18
std::vector< float > trk_py
std::vector< float > trk_nChi2
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::string algoName() const
Definition: TrackBase.h:503
int stripLayersWithMeasurement() const
Definition: HitPattern.h:1035
std::vector< short > trk_isHP
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_
std::vector< float > trk_outer_pz
virtual OmniClusterRef const & firstClusterRef() const =0
int numberOfValidPixelHits() const
Definition: HitPattern.h:838
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 2521 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().

2522  {
2523  for(size_t iVertex=0, size=vertices.size(); iVertex<size; ++iVertex) {
2524  const reco::Vertex& vertex = vertices[iVertex];
2525  vtx_x.push_back(vertex.x());
2526  vtx_y.push_back(vertex.y());
2527  vtx_z.push_back(vertex.z());
2528  vtx_xErr.push_back(vertex.xError());
2529  vtx_yErr.push_back(vertex.yError());
2530  vtx_zErr.push_back(vertex.zError());
2531  vtx_chi2.push_back(vertex.chi2());
2532  vtx_ndof.push_back(vertex.ndof());
2533  vtx_fake.push_back(vertex.isFake());
2534  vtx_valid.push_back(vertex.isValid());
2535 
2536  std::vector<int> trkIdx;
2537  for(auto iTrack = vertex.tracks_begin(); iTrack != vertex.tracks_end(); ++iTrack) {
2538  // Ignore link if vertex was fit from a track collection different from the input
2539  if(iTrack->id() != tracks.id())
2540  continue;
2541 
2542  trkIdx.push_back(iTrack->key());
2543 
2544  if(trk_vtxIdx[iTrack->key()] != -1) {
2545  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;
2546  }
2547  trk_vtxIdx[iTrack->key()] = iVertex;
2548  }
2549  vtx_trkIdx.push_back(trkIdx);
2550  }
2551 }
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 1517 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().

1526  {
1527  SimHitData ret;
1528 
1529  std::map<unsigned int, double> simTrackIdToChargeFraction;
1530  if(hitType == HitType::Phase2OT) simTrackIdToChargeFraction = chargeFraction(cluster.phase2OTCluster(), hitId, digiSimLinks);
1531  else simTrackIdToChargeFraction = chargeFraction(GetCluster<SimLink>::call(cluster), hitId, digiSimLinks);
1532 
1533  ret.type = HitSimType::Noise;
1534  auto range = clusterToTPMap.equal_range( cluster );
1535  if( range.first != range.second ) {
1536  for( auto ip=range.first; ip != range.second; ++ip ) {
1537  const TrackingParticleRef& trackingParticle = ip->second;
1538 
1539  // Find out if the cluster is from signal/ITPU/OOTPU
1540  const auto event = trackingParticle->eventId().event();
1541  const auto bx = trackingParticle->eventId().bunchCrossing();
1543  if(bx == 0) {
1544  type = (event == 0 ? HitSimType::Signal : HitSimType::ITPileup);
1545  }
1546  ret.type = static_cast<HitSimType>(std::min(static_cast<int>(ret.type), static_cast<int>(type)));
1547 
1548  // Limit to only input TrackingParticles (usually signal+ITPU)
1549  auto tpIndex = tpKeyToIndex.find(trackingParticle.key());
1550  if( tpIndex == tpKeyToIndex.end())
1551  continue;
1552 
1553  //now get the corresponding sim hit
1554  std::pair<TrackingParticleRef, TrackPSimHitRef> simHitTPpairWithDummyTP(trackingParticle,TrackPSimHitRef());
1555  //SimHit is dummy: for simHitTPAssociationListGreater sorting only the TP is needed
1556  auto range = std::equal_range(simHitsTPAssoc.begin(), simHitsTPAssoc.end(),
1558  int simHitKey = -1;
1559  bool foundElectron = false;
1560  edm::ProductID simHitID;
1561  for(auto ip = range.first; ip != range.second; ++ip) {
1562  TrackPSimHitRef TPhit = ip->second;
1563  DetId dId = DetId(TPhit->detUnitId());
1564  if (dId.rawId()==hitId.rawId()) {
1565  // skip electron SimHits for non-electron TPs also here
1566  if(std::abs(TPhit->particleType()) == 11 && std::abs(trackingParticle->pdgId()) != 11) {
1567  foundElectron = true;
1568  continue;
1569  }
1570 
1571  simHitKey = TPhit.key();
1572  simHitID = TPhit.id();
1573  break;
1574  }
1575  }
1576  if(simHitKey < 0) {
1577  // In case we didn't find a simhit because of filtered-out
1578  // electron SimHit, just ignore the missing SimHit.
1579  if(foundElectron)
1580  continue;
1581 
1582  auto ex = cms::Exception("LogicError") << "Did not find SimHit for reco hit DetId " << hitId.rawId()
1583  << " for TP " << trackingParticle.key() << " bx:event " << bx << ":" << event
1584  << ".\nFound SimHits from detectors ";
1585  for(auto ip = range.first; ip != range.second; ++ip) {
1586  TrackPSimHitRef TPhit = ip->second;
1587  DetId dId = DetId(TPhit->detUnitId());
1588  ex << dId.rawId() << " ";
1589  }
1590  if(trackingParticle->eventId().event() != 0) {
1591  ex << "\nSince this is a TrackingParticle from pileup, check that you're running the pileup mixing in playback mode.";
1592  }
1593  throw ex;
1594  }
1595  auto simHitIndex = simHitRefKeyToIndex.at(std::make_pair(simHitKey, simHitID));
1596  ret.matchingSimHit.push_back(simHitIndex);
1597 
1598  double chargeFraction = 0.;
1599  for(const SimTrack& simtrk: trackingParticle->g4Tracks()) {
1600  auto found = simTrackIdToChargeFraction.find(simtrk.trackId());
1601  if(found != simTrackIdToChargeFraction.end()) {
1602  chargeFraction += found->second;
1603  }
1604  }
1605  ret.chargeFraction.push_back(chargeFraction);
1606 
1607  // only for debug prints
1608  ret.bunchCrossing.push_back(bx);
1609  ret.event.push_back(event);
1610 
1611  simhit_hitIdx[simHitIndex].push_back(clusterKey);
1612  simhit_hitType[simHitIndex].push_back(static_cast<int>(hitType));
1613  }
1614  }
1615 
1616  return ret;
1617 }
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:264
ProductID id() const
Accessor for product ID.
Definition: Ref.h:258
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 313 of file TrackingNtuple.cc.

References TrackingNtuple::TPHitIndex::tpKey.

Referenced by fillTrackingParticles().

313 { return (i.tpKey < j.tpKey); }
int i
Definition: DBlmapReader.cc:9
int j
Definition: DBlmapReader.cc:9
static bool TrackingNtuple::tpHitIndexListLessSort ( const TPHitIndex i,
const TPHitIndex j 
)
inlinestaticprivate

Definition at line 314 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 primaryVertexAssociation_cfi::vertices.

Referenced by analyze().

314  {
315  if(i.tpKey == j.tpKey) {
316  if(edm::isNotFinite(i.tof) && edm::isNotFinite(j.tof)) {
317  return i.detId < j.detId;
318  }
319  return i.tof < j.tof; // works as intended if either one is NaN
320  }
321  return i.tpKey < j.tpKey;
322  }
int i
Definition: DBlmapReader.cc:9
bool isNotFinite(T x)
Definition: isFinite.h:10
int j
Definition: DBlmapReader.cc:9

Member Data Documentation

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

Definition at line 443 of file TrackingNtuple.cc.

Referenced by TrackingNtuple().

float TrackingNtuple::bsp_sigmax
private

Definition at line 670 of file TrackingNtuple.cc.

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

float TrackingNtuple::bsp_sigmay
private

Definition at line 671 of file TrackingNtuple.cc.

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

float TrackingNtuple::bsp_sigmaz
private

Definition at line 672 of file TrackingNtuple.cc.

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

float TrackingNtuple::bsp_x
private

Definition at line 667 of file TrackingNtuple.cc.

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

float TrackingNtuple::bsp_y
private

Definition at line 668 of file TrackingNtuple.cc.

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

float TrackingNtuple::bsp_z
private

Definition at line 669 of file TrackingNtuple.cc.

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

std::string TrackingNtuple::builderName_
private

Definition at line 454 of file TrackingNtuple.cc.

Referenced by TrackingNtuple().

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

Definition at line 436 of file TrackingNtuple.cc.

Referenced by TrackingNtuple().

edm::EventNumber_t TrackingNtuple::ev_event
private

Definition at line 463 of file TrackingNtuple.cc.

edm::LuminosityBlockNumber_t TrackingNtuple::ev_lumi
private

Definition at line 462 of file TrackingNtuple.cc.

edm::RunNumber_t TrackingNtuple::ev_run
private

Definition at line 461 of file TrackingNtuple.cc.

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

Definition at line 615 of file TrackingNtuple.cc.

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

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

Definition at line 599 of file TrackingNtuple.cc.

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

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

Definition at line 601 of file TrackingNtuple.cc.

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

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

Definition at line 598 of file TrackingNtuple.cc.

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

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

Definition at line 600 of file TrackingNtuple.cc.

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

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

Definition at line 602 of file TrackingNtuple.cc.

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

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

Definition at line 614 of file TrackingNtuple.cc.

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

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

Definition at line 604 of file TrackingNtuple.cc.

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

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

Definition at line 603 of file TrackingNtuple.cc.

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

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

Definition at line 605 of file TrackingNtuple.cc.

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

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

Definition at line 608 of file TrackingNtuple.cc.

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

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

Definition at line 609 of file TrackingNtuple.cc.

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

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

Definition at line 606 of file TrackingNtuple.cc.

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

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

Definition at line 610 of file TrackingNtuple.cc.

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

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

Definition at line 611 of file TrackingNtuple.cc.

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

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

Definition at line 607 of file TrackingNtuple.cc.

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

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

Definition at line 613 of file TrackingNtuple.cc.

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

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

Definition at line 612 of file TrackingNtuple.cc.

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

const bool TrackingNtuple::includeAllHits_
private

Definition at line 457 of file TrackingNtuple.cc.

Referenced by TrackingNtuple().

bool TrackingNtuple::includePhase2OTHits_
private

Definition at line 442 of file TrackingNtuple.cc.

Referenced by TrackingNtuple().

const bool TrackingNtuple::includeSeeds_
private

Definition at line 456 of file TrackingNtuple.cc.

Referenced by TrackingNtuple().

bool TrackingNtuple::includeStripHits_
private

Definition at line 442 of file TrackingNtuple.cc.

Referenced by TrackingNtuple().

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

Definition at line 644 of file TrackingNtuple.cc.

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

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

Definition at line 646 of file TrackingNtuple.cc.

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

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

Definition at line 643 of file TrackingNtuple.cc.

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

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

Definition at line 645 of file TrackingNtuple.cc.

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

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

Definition at line 647 of file TrackingNtuple.cc.

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

std::string TrackingNtuple::parametersDefinerName_
private

Definition at line 455 of file TrackingNtuple.cc.

Referenced by TrackingNtuple().

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

Definition at line 638 of file TrackingNtuple.cc.

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

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

Definition at line 620 of file TrackingNtuple.cc.

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

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

Definition at line 622 of file TrackingNtuple.cc.

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

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

Definition at line 619 of file TrackingNtuple.cc.

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

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

Definition at line 621 of file TrackingNtuple.cc.

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

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

Definition at line 637 of file TrackingNtuple.cc.

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

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

Definition at line 624 of file TrackingNtuple.cc.

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

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

Definition at line 625 of file TrackingNtuple.cc.

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

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

Definition at line 627 of file TrackingNtuple.cc.

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

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

Definition at line 623 of file TrackingNtuple.cc.

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

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

Definition at line 628 of file TrackingNtuple.cc.

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

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

Definition at line 631 of file TrackingNtuple.cc.

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

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

Definition at line 632 of file TrackingNtuple.cc.

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

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

Definition at line 629 of file TrackingNtuple.cc.

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

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

Definition at line 633 of file TrackingNtuple.cc.

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

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

Definition at line 634 of file TrackingNtuple.cc.

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

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

Definition at line 630 of file TrackingNtuple.cc.

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

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

Definition at line 636 of file TrackingNtuple.cc.

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

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

Definition at line 635 of file TrackingNtuple.cc.

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

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

Definition at line 448 of file TrackingNtuple.cc.

Referenced by TrackingNtuple().

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

Definition at line 570 of file TrackingNtuple.cc.

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

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

Definition at line 558 of file TrackingNtuple.cc.

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

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

Definition at line 552 of file TrackingNtuple.cc.

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

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

Definition at line 554 of file TrackingNtuple.cc.

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

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

Definition at line 551 of file TrackingNtuple.cc.

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

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

Definition at line 553 of file TrackingNtuple.cc.

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

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

Definition at line 569 of file TrackingNtuple.cc.

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

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

Definition at line 556 of file TrackingNtuple.cc.

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

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

Definition at line 557 of file TrackingNtuple.cc.

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

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

Definition at line 559 of file TrackingNtuple.cc.

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

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

Definition at line 555 of file TrackingNtuple.cc.

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

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

Definition at line 560 of file TrackingNtuple.cc.

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

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

Definition at line 563 of file TrackingNtuple.cc.

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

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

Definition at line 564 of file TrackingNtuple.cc.

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

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

Definition at line 561 of file TrackingNtuple.cc.

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

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

Definition at line 565 of file TrackingNtuple.cc.

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

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

Definition at line 566 of file TrackingNtuple.cc.

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

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

Definition at line 562 of file TrackingNtuple.cc.

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

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

Definition at line 568 of file TrackingNtuple.cc.

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

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

Definition at line 567 of file TrackingNtuple.cc.

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

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

Definition at line 444 of file TrackingNtuple.cc.

Referenced by TrackingNtuple().

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

Definition at line 439 of file TrackingNtuple.cc.

Referenced by TrackingNtuple().

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

Definition at line 697 of file TrackingNtuple.cc.

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

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

Definition at line 690 of file TrackingNtuple.cc.

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

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

Definition at line 683 of file TrackingNtuple.cc.

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

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

Definition at line 688 of file TrackingNtuple.cc.

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

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

Definition at line 684 of file TrackingNtuple.cc.

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

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

Definition at line 689 of file TrackingNtuple.cc.

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

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

Definition at line 681 of file TrackingNtuple.cc.

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

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

Definition at line 686 of file TrackingNtuple.cc.

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

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

Definition at line 676 of file TrackingNtuple.cc.

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

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

Definition at line 701 of file TrackingNtuple.cc.

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

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

Definition at line 702 of file TrackingNtuple.cc.

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

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

Definition at line 694 of file TrackingNtuple.cc.

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

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

Definition at line 696 of file TrackingNtuple.cc.

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

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

Definition at line 693 of file TrackingNtuple.cc.

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

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

Definition at line 695 of file TrackingNtuple.cc.

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

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

Definition at line 692 of file TrackingNtuple.cc.

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

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

Definition at line 704 of file TrackingNtuple.cc.

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

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

Definition at line 682 of file TrackingNtuple.cc.

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

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

Definition at line 687 of file TrackingNtuple.cc.

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

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

Definition at line 680 of file TrackingNtuple.cc.

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

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

Definition at line 685 of file TrackingNtuple.cc.

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

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

Definition at line 677 of file TrackingNtuple.cc.

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

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

Definition at line 678 of file TrackingNtuple.cc.

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

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

Definition at line 679 of file TrackingNtuple.cc.

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

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

Definition at line 691 of file TrackingNtuple.cc.

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

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

Definition at line 699 of file TrackingNtuple.cc.

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

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

Definition at line 700 of file TrackingNtuple.cc.

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

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

Definition at line 698 of file TrackingNtuple.cc.

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

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

Definition at line 432 of file TrackingNtuple.cc.

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

Definition at line 521 of file TrackingNtuple.cc.

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

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

Definition at line 546 of file TrackingNtuple.cc.

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

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

Definition at line 527 of file TrackingNtuple.cc.

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

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

Definition at line 520 of file TrackingNtuple.cc.

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

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

Definition at line 542 of file TrackingNtuple.cc.

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

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

Definition at line 540 of file TrackingNtuple.cc.

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

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

Definition at line 538 of file TrackingNtuple.cc.

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

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

Definition at line 541 of file TrackingNtuple.cc.

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

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

Definition at line 539 of file TrackingNtuple.cc.

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

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

Definition at line 537 of file TrackingNtuple.cc.

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

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

Definition at line 545 of file TrackingNtuple.cc.

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

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

Definition at line 532 of file TrackingNtuple.cc.

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

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

Definition at line 534 of file TrackingNtuple.cc.

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

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

Definition at line 535 of file TrackingNtuple.cc.

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

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

Definition at line 530 of file TrackingNtuple.cc.

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

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

Definition at line 531 of file TrackingNtuple.cc.

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

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

Definition at line 533 of file TrackingNtuple.cc.

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

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

Definition at line 529 of file TrackingNtuple.cc.

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

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

Definition at line 522 of file TrackingNtuple.cc.

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

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

Definition at line 528 of file TrackingNtuple.cc.

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

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

Definition at line 526 of file TrackingNtuple.cc.

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

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

Definition at line 523 of file TrackingNtuple.cc.

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

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

Definition at line 524 of file TrackingNtuple.cc.

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

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

Definition at line 525 of file TrackingNtuple.cc.

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

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

Definition at line 536 of file TrackingNtuple.cc.

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

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

Definition at line 544 of file TrackingNtuple.cc.

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

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

Definition at line 547 of file TrackingNtuple.cc.

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

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

Definition at line 543 of file TrackingNtuple.cc.

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

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

Definition at line 651 of file TrackingNtuple.cc.

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

std::vector<unsigned int> TrackingNtuple::simhit_detId
private
std::vector<float> TrackingNtuple::simhit_eloss
private
std::vector<std::vector<int> > TrackingNtuple::simhit_hitIdx
private

Definition at line 663 of file TrackingNtuple.cc.

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

std::vector<std::vector<int> > TrackingNtuple::simhit_hitType
private
std::vector<unsigned short> TrackingNtuple::simhit_lay
private

Definition at line 652 of file TrackingNtuple.cc.

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

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

Definition at line 662 of file TrackingNtuple.cc.

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

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

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

Referenced by TrackingNtuple().

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

Definition at line 733 of file TrackingNtuple.cc.

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

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

Definition at line 726 of file TrackingNtuple.cc.

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

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

Definition at line 732 of file TrackingNtuple.cc.

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

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

Definition at line 725 of file TrackingNtuple.cc.

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

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

Definition at line 727 of file TrackingNtuple.cc.

Referenced by fillTrackingVertices(), and TrackingNtuple().

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

Definition at line 731 of file TrackingNtuple.cc.

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

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

Definition at line 728 of file TrackingNtuple.cc.

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

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

Definition at line 729 of file TrackingNtuple.cc.

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

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

Definition at line 730 of file TrackingNtuple.cc.

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

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

Definition at line 441 of file TrackingNtuple.cc.

Referenced by TrackingNtuple().

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

Definition at line 594 of file TrackingNtuple.cc.

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

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

Definition at line 582 of file TrackingNtuple.cc.

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

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

Definition at line 576 of file TrackingNtuple.cc.

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

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

Definition at line 578 of file TrackingNtuple.cc.

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

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

Definition at line 574 of file TrackingNtuple.cc.

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

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

Definition at line 575 of file TrackingNtuple.cc.

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

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

Definition at line 577 of file TrackingNtuple.cc.

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

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

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

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

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

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

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

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

Definition at line 587 of file TrackingNtuple.cc.

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

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

Definition at line 588 of file TrackingNtuple.cc.

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

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

Definition at line 585 of file TrackingNtuple.cc.

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

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

Definition at line 589 of file TrackingNtuple.cc.

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

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

Definition at line 590 of file TrackingNtuple.cc.

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

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

Definition at line 586 of file TrackingNtuple.cc.

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

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

Definition at line 592 of file TrackingNtuple.cc.

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

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

Definition at line 591 of file TrackingNtuple.cc.

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

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

Definition at line 447 of file TrackingNtuple.cc.

Referenced by TrackingNtuple().

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

Definition at line 445 of file TrackingNtuple.cc.

Referenced by TrackingNtuple().

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

Definition at line 440 of file TrackingNtuple.cc.

Referenced by TrackingNtuple().

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

Definition at line 446 of file TrackingNtuple.cc.

Referenced by TrackingNtuple().

TTree* TrackingNtuple::t
private

Definition at line 459 of file TrackingNtuple.cc.

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

Definition at line 451 of file TrackingNtuple.cc.

Referenced by TrackingNtuple().

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

Definition at line 452 of file TrackingNtuple.cc.

Referenced by TrackingNtuple().

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

Definition at line 453 of file TrackingNtuple.cc.

Referenced by TrackingNtuple().

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

Definition at line 438 of file TrackingNtuple.cc.

Referenced by TrackingNtuple().

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

Definition at line 435 of file TrackingNtuple.cc.

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

Definition at line 434 of file TrackingNtuple.cc.

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

Definition at line 450 of file TrackingNtuple.cc.

Referenced by TrackingNtuple().

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

Definition at line 433 of file TrackingNtuple.cc.

Referenced by TrackingNtuple().

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

Definition at line 506 of file TrackingNtuple.cc.

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

Definition at line 508 of file TrackingNtuple.cc.

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

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

Definition at line 482 of file TrackingNtuple.cc.

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

Definition at line 484 of file TrackingNtuple.cc.

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

Definition at line 490 of file TrackingNtuple.cc.

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

Definition at line 485 of file TrackingNtuple.cc.

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

Definition at line 491 of file TrackingNtuple.cc.

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

Definition at line 480 of file TrackingNtuple.cc.

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

Definition at line 487 of file TrackingNtuple.cc.

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

Definition at line 515 of file TrackingNtuple.cc.

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

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

Definition at line 516 of file TrackingNtuple.cc.

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

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

Definition at line 475 of file TrackingNtuple.cc.

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

Definition at line 472 of file TrackingNtuple.cc.

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

Definition at line 473 of file TrackingNtuple.cc.

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

Definition at line 474 of file TrackingNtuple.cc.

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

Definition at line 510 of file TrackingNtuple.cc.

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

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

Definition at line 481 of file TrackingNtuple.cc.

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

Definition at line 488 of file TrackingNtuple.cc.

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

Definition at line 503 of file TrackingNtuple.cc.

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

Definition at line 495 of file TrackingNtuple.cc.

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

Definition at line 505 of file TrackingNtuple.cc.

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

Definition at line 498 of file TrackingNtuple.cc.

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

Definition at line 504 of file TrackingNtuple.cc.

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

Definition at line 499 of file TrackingNtuple.cc.

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

Definition at line 501 of file TrackingNtuple.cc.

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

Definition at line 500 of file TrackingNtuple.cc.

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

Definition at line 502 of file TrackingNtuple.cc.

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

Definition at line 497 of file TrackingNtuple.cc.

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

Definition at line 507 of file TrackingNtuple.cc.

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

Definition at line 479 of file TrackingNtuple.cc.

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

Definition at line 476 of file TrackingNtuple.cc.

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

Definition at line 477 of file TrackingNtuple.cc.

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

Definition at line 478 of file TrackingNtuple.cc.

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

Definition at line 483 of file TrackingNtuple.cc.

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

Definition at line 489 of file TrackingNtuple.cc.

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

Definition at line 471 of file TrackingNtuple.cc.

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

Definition at line 486 of file TrackingNtuple.cc.

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

Definition at line 468 of file TrackingNtuple.cc.

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

Definition at line 469 of file TrackingNtuple.cc.

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

Definition at line 470 of file TrackingNtuple.cc.

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

Definition at line 496 of file TrackingNtuple.cc.

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

Definition at line 492 of file TrackingNtuple.cc.

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

Definition at line 493 of file TrackingNtuple.cc.

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

Definition at line 494 of file TrackingNtuple.cc.

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

Definition at line 511 of file TrackingNtuple.cc.

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

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

Definition at line 513 of file TrackingNtuple.cc.

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

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

Definition at line 514 of file TrackingNtuple.cc.

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

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

Definition at line 509 of file TrackingNtuple.cc.

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

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

Definition at line 512 of file TrackingNtuple.cc.

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

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

Definition at line 449 of file TrackingNtuple.cc.

Referenced by TrackingNtuple().

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

Definition at line 717 of file TrackingNtuple.cc.

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

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

Definition at line 718 of file TrackingNtuple.cc.

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

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

Definition at line 716 of file TrackingNtuple.cc.

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

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

Definition at line 720 of file TrackingNtuple.cc.

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

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

Definition at line 719 of file TrackingNtuple.cc.

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

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

Definition at line 710 of file TrackingNtuple.cc.

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

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

Definition at line 713 of file TrackingNtuple.cc.

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

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

Definition at line 711 of file TrackingNtuple.cc.

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

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

Definition at line 714 of file TrackingNtuple.cc.

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

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

Definition at line 712 of file TrackingNtuple.cc.

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

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

Definition at line 715 of file TrackingNtuple.cc.

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