CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes
Primary4DVertexValidation Class Reference
Inheritance diagram for Primary4DVertexValidation:
DQMEDAnalyzer edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >

Classes

struct  recoPrimaryVertex
 
struct  simPrimaryVertex
 

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void bookHistograms (DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override
 
 Primary4DVertexValidation (const edm::ParameterSet &)
 
 ~Primary4DVertexValidation () override
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
void endLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static void globalEndJob (DQMEDAnalyzerGlobalCache const *)
 
static void globalEndLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup, LuminosityBlockContext const *context)
 
static void globalEndRunProduce (edm::Run &run, edm::EventSetup const &setup, RunContext const *context)
 
static std::unique_ptr< DQMEDAnalyzerGlobalCacheinitializeGlobalCache (edm::ParameterSet const &)
 

Private Types

typedef math::XYZTLorentzVector LorentzVector
 

Private Member Functions

std::pair< const edm::Ref< std::vector< TrackingParticle > > *, int > getMatchedTP (const reco::TrackBaseRef &, const TrackingVertexRef &)
 
std::vector< Primary4DVertexValidation::recoPrimaryVertexgetRecoPVs (const edm::Handle< edm::View< reco::Vertex >> &)
 
std::vector< Primary4DVertexValidation::simPrimaryVertexgetSimPVs (const edm::Handle< TrackingVertexCollection > &)
 
void getWosWnt (const reco::Vertex &, const reco::TrackBaseRef &, const edm::ValueMap< float > &, const edm::ValueMap< float > &, const edm::Handle< reco::BeamSpot > &, double &, double &)
 
void isParticle (const reco::TrackBaseRef &, const edm::ValueMap< float > &, const edm::ValueMap< float > &, const edm::ValueMap< float > &, const edm::ValueMap< float > &, const edm::ValueMap< float > &, unsigned int &, bool &, bool &, bool &, bool &)
 
void matchReco2Sim (std::vector< recoPrimaryVertex > &, std::vector< simPrimaryVertex > &, const edm::ValueMap< float > &, const edm::ValueMap< float > &, const edm::Handle< reco::BeamSpot > &)
 
bool matchRecoTrack2SimSignal (const reco::TrackBaseRef &)
 
void observablesFromJets (const std::vector< reco::Track > &, const std::vector< double > &, const std::vector< int > &, const std::string &, unsigned int &, double &, double &, double &, double &)
 
void printMatchedRecoTrackInfo (const reco::Vertex &, const reco::TrackBaseRef &, const TrackingParticleRef &, const unsigned int &)
 
void printSimVtxRecoVtxInfo (const struct Primary4DVertexValidation::simPrimaryVertex &, const struct Primary4DVertexValidation::recoPrimaryVertex &)
 
bool select (const reco::Vertex &, int level=0)
 
double timeFromTrueMass (double, double, double, double)
 
const bool trkRecSel (const reco::TrackBase &)
 
const bool trkTPSelLV (const TrackingParticle &)
 

Private Attributes

const std::string folder_
 
const std::vector< double > lineDensityPar_
 
MonitorElementmeBarrelNoPIDtype_
 
MonitorElementmeBarrelPIDp_
 
MonitorElementmeBarrelTrueKAsK_
 
MonitorElementmeBarrelTrueKAsP_
 
MonitorElementmeBarrelTrueKAsPi_
 
MonitorElementmeBarrelTrueKNoPID_
 
MonitorElementmeBarrelTruePAsK_
 
MonitorElementmeBarrelTruePAsP_
 
MonitorElementmeBarrelTruePAsPi_
 
MonitorElementmeBarrelTruePiAsK_
 
MonitorElementmeBarrelTruePiAsP_
 
MonitorElementmeBarrelTruePiAsPi_
 
MonitorElementmeBarrelTruePiNoPID_
 
MonitorElementmeBarrelTruePNoPID_
 
MonitorElementmeDeltaTfakefake_
 
MonitorElementmeDeltaTfakereal_
 
MonitorElementmeDeltaTrealreal_
 
MonitorElementmeDeltaZfakefake_
 
MonitorElementmeDeltaZfakereal_
 
MonitorElementmeDeltaZrealreal_
 
MonitorElementmeEndcapNoPIDtype_
 
MonitorElementmeEndcapPIDp_
 
MonitorElementmeEndcapTrueKAsK_
 
MonitorElementmeEndcapTrueKAsP_
 
MonitorElementmeEndcapTrueKAsPi_
 
MonitorElementmeEndcapTrueKNoPID_
 
MonitorElementmeEndcapTruePAsK_
 
MonitorElementmeEndcapTruePAsP_
 
MonitorElementmeEndcapTruePAsPi_
 
MonitorElementmeEndcapTruePiAsK_
 
MonitorElementmeEndcapTruePiAsP_
 
MonitorElementmeEndcapTruePiAsPi_
 
MonitorElementmeEndcapTruePiNoPID_
 
MonitorElementmeEndcapTruePNoPID_
 
MonitorElementmeFakeTrackRecLVRelMult_
 
MonitorElementmeFakeTrackRecLVRelMultvsMult_
 
MonitorElementmeFakeTrackRecLVRelSumWos_
 
MonitorElementmeFakeTrackRecLVRelSumWosvsSumWos_
 
MonitorElementmeFakeTrackRelMult_
 
MonitorElementmeFakeTrackRelMultvsMult_
 
MonitorElementmeFakeTrackRelSumWos_
 
MonitorElementmeFakeTrackRelSumWosvsSumWos_
 
MonitorElementmeJetsFakeRelSumPt2_
 
MonitorElementmeJetsFakeRelSumPt2vsSumPt2_
 
MonitorElementmeJetsPUHt_
 
MonitorElementmeJetsPUMetPt_
 
MonitorElementmeJetsPUMult_
 
MonitorElementmeJetsPURelHt_
 
MonitorElementmeJetsPURelHtvsHt_
 
MonitorElementmeJetsPURelMetPt_
 
MonitorElementmeJetsPURelMetPtvsMetPt_
 
MonitorElementmeJetsPURelMult_
 
MonitorElementmeJetsPURelMultvsMult_
 
MonitorElementmeJetsPURelSumPt2_
 
MonitorElementmeJetsPURelSumPt2vsSumPt2_
 
MonitorElementmeJetsPURelSumPz_
 
MonitorElementmeJetsPURelSumPzvsSumPz_
 
MonitorElementmeJetsPUSumPt2_
 
MonitorElementmeJetsPUSumPz_
 
MonitorElementmeJetsRecLVFakeRelSumPt2_
 
MonitorElementmeJetsRecLVFakeRelSumPt2vsSumPt2_
 
MonitorElementmeJetsRecLVPUHt_
 
MonitorElementmeJetsRecLVPUMetPt_
 
MonitorElementmeJetsRecLVPUMult_
 
MonitorElementmeJetsRecLVPURelHt_
 
MonitorElementmeJetsRecLVPURelHtvsHt_
 
MonitorElementmeJetsRecLVPURelMetPt_
 
MonitorElementmeJetsRecLVPURelMetPtvsMetPt_
 
MonitorElementmeJetsRecLVPURelMult_
 
MonitorElementmeJetsRecLVPURelMultvsMult_
 
MonitorElementmeJetsRecLVPURelSumPt2_
 
MonitorElementmeJetsRecLVPURelSumPt2vsSumPt2_
 
MonitorElementmeJetsRecLVPURelSumPz_
 
MonitorElementmeJetsRecLVPURelSumPzvsSumPz_
 
MonitorElementmeJetsRecLVPUSumPt2_
 
MonitorElementmeJetsRecLVPUSumPz_
 
MonitorElementmeMatchQual_
 
MonitorElementmePUTrackMult_
 
MonitorElementmePUTrackRecLVMult_
 
MonitorElementmePUTrackRecLVRelMult_
 
MonitorElementmePUTrackRecLVRelMultvsMult_
 
MonitorElementmePUTrackRecLVRelSumPt2_
 
MonitorElementmePUTrackRecLVRelSumPt2vsSumPt2_
 
MonitorElementmePUTrackRecLVRelSumPt_
 
MonitorElementmePUTrackRecLVRelSumPtvsSumPt_
 
MonitorElementmePUTrackRecLVRelSumWnt_
 
MonitorElementmePUTrackRecLVRelSumWntvsSumWnt_
 
MonitorElementmePUTrackRecLVRelSumWos_
 
MonitorElementmePUTrackRecLVRelSumWosvsSumWos_
 
MonitorElementmePUTrackRecLVSumPt2_
 
MonitorElementmePUTrackRecLVSumPt_
 
MonitorElementmePUTrackRecLVSumWnt_
 
MonitorElementmePUTrackRecLVSumWos_
 
MonitorElementmePUTrackRecLVWnt_
 
MonitorElementmePUTrackRelMult_
 
MonitorElementmePUTrackRelMultvsMult_
 
MonitorElementmePUTrackRelSumPt2_
 
MonitorElementmePUTrackRelSumPt2vsSumPt2_
 
MonitorElementmePUTrackRelSumPt_
 
MonitorElementmePUTrackRelSumPtvsSumPt_
 
MonitorElementmePUTrackRelSumWnt_
 
MonitorElementmePUTrackRelSumWntvsSumWnt_
 
MonitorElementmePUTrackRelSumWos_
 
MonitorElementmePUTrackRelSumWosvsSumWos_
 
MonitorElementmePUTrackSumPt2_
 
MonitorElementmePUTrackSumPt_
 
MonitorElementmePUTrackSumWnt_
 
MonitorElementmePUTrackSumWos_
 
MonitorElementmePUTrackWnt_
 
MonitorElementmePUvsFakeV_
 
MonitorElementmePUvsOtherFakeV_
 
MonitorElementmePUvsRealV_
 
MonitorElementmePUvsSplitV_
 
MonitorElementmeRecoPosInRecoOrigCollection_
 
MonitorElementmeRecoPosInSimCollection_
 
MonitorElementmeRecoPVPosSignal_
 
MonitorElementmeRecoPVPosSignalNotHighestPt_
 
MonitorElementmeRecoVtxVsLineDensity_
 
MonitorElementmeRecPVT_
 
MonitorElementmeRecPVZ_
 
MonitorElementmeRecVerNumber_
 
MonitorElementmeSecTrackRecLVRelSumWos_
 
MonitorElementmeSecTrackRecLVRelSumWosvsSumWos_
 
MonitorElementmeSecTrackRecLVSumWos_
 
MonitorElementmeSecTrackRelSumWos_
 
MonitorElementmeSecTrackRelSumWosvsSumWos_
 
MonitorElementmeSecTrackSumWos_
 
MonitorElementmeSimPosInSimOrigCollection_
 
MonitorElementmeSimPVZ_
 
MonitorElementmeTimePull_
 
MonitorElementmeTimeRes_
 
MonitorElementmeTimeSignalPull_
 
MonitorElementmeTimeSignalRes_
 
MonitorElementmeTrack3DposRes_ [3]
 
MonitorElementmeTrackEffEtaTot_
 
MonitorElementmeTrackEffPtTot_
 
MonitorElementmeTrackMatchedTPEffEtaMtd_
 
MonitorElementmeTrackMatchedTPEffEtaTot_
 
MonitorElementmeTrackMatchedTPEffPtMtd_
 
MonitorElementmeTrackMatchedTPEffPtTot_
 
MonitorElementmeTrackMatchedTPPullTot_
 
MonitorElementmeTrackMatchedTPResTot_
 
MonitorElementmeTrackMatchedTPZposResTot_
 
MonitorElementmeTrackPull_ [3]
 
MonitorElementmeTrackPullHighP_ [3]
 
MonitorElementmeTrackPullHighPTot_
 
MonitorElementmeTrackPullLowP_ [3]
 
MonitorElementmeTrackPullLowPTot_
 
MonitorElementmeTrackPullTot_
 
MonitorElementmeTrackRes_ [3]
 
MonitorElementmeTrackResHighP_ [3]
 
MonitorElementmeTrackResHighPTot_
 
MonitorElementmeTrackResLowP_ [3]
 
MonitorElementmeTrackResLowPTot_
 
MonitorElementmeTrackResMass_ [3]
 
MonitorElementmeTrackResMassPions_ [3]
 
MonitorElementmeTrackResMassProtons_ [3]
 
MonitorElementmeTrackResMassTrue_ [3]
 
MonitorElementmeTrackResMassTruePions_ [3]
 
MonitorElementmeTrackResMassTrueProtons_ [3]
 
MonitorElementmeTrackResTot_
 
MonitorElementmeTrackZposRes_ [3]
 
MonitorElementmeTrackZposResTot_
 
const double minProbHeavy_
 
edm::EDGetTokenT< edm::ValueMap< float > > momentumToken_
 
const double mvaTh_
 
bool optionalPlots_
 
edm::EDGetTokenT< edm::ValueMap< float > > pathLengthToken_
 
edm::ESGetToken< HepPDT::ParticleDataTable, edm::DefaultRecordpdtToken_
 
edm::EDGetTokenT< edm::ValueMap< float > > probKToken_
 
edm::EDGetTokenT< edm::ValueMap< float > > probPiToken_
 
edm::EDGetTokenT< edm::ValueMap< float > > probPToken_
 
const reco::RecoToSimCollectionr2s_
 
edm::EDGetTokenT< edm::View< reco::Vertex > > Rec4DVerToken_
 
edm::EDGetTokenT< reco::BeamSpotRecBeamSpotToken_
 
edm::EDGetTokenT< reco::RecoToSimCollectionrecoToSimAssociationToken_
 
edm::EDGetTokenT< reco::TrackCollectionRecTrackToken_
 
const reco::SimToRecoCollections2r_
 
edm::EDGetTokenT< edm::ValueMap< float > > sigmat0PidToken_
 
edm::EDGetTokenT< edm::ValueMap< float > > sigmat0SafePidToken_
 
edm::EDGetTokenT< reco::SimToRecoCollectionsimToRecoAssociationToken_
 
edm::EDGetTokenT< edm::ValueMap< float > > t0PidToken_
 
edm::EDGetTokenT< edm::ValueMap< float > > t0SafePidToken_
 
edm::EDGetTokenT< edm::ValueMap< float > > timeToken_
 
edm::EDGetTokenT< edm::ValueMap< float > > tmtdToken_
 
edm::EDGetTokenT< edm::ValueMap< float > > tofKToken_
 
edm::EDGetTokenT< edm::ValueMap< float > > tofPiToken_
 
edm::EDGetTokenT< edm::ValueMap< float > > tofPToken_
 
edm::EDGetTokenT< edm::ValueMap< int > > trackAssocToken_
 
edm::EDGetTokenT< TrackingParticleCollectiontrackingParticleCollectionToken_
 
edm::EDGetTokenT< TrackingVertexCollectiontrackingVertexCollectionToken_
 
edm::EDGetTokenT< edm::ValueMap< float > > trackMVAQualToken_
 
const double trackweightTh_
 
bool use3dNoTime_
 
bool use_only_charged_tracks_
 
edm::EDGetTokenT< std::vector< PileupSummaryInfo > > vecPileupSummaryInfoToken_
 

Static Private Attributes

static constexpr double c_ = 2.99792458e1
 
static constexpr float c_cm_ns = geant_units::operators::convertMmToCm(CLHEP::c_light)
 
static constexpr double deltaZcut_ = 0.1
 
static constexpr double etacutGEN_ = 4.
 
static constexpr double etacutREC_ = 3.
 
static constexpr double maxRank_ = 8.
 
static constexpr double maxTry_ = 10.
 
static constexpr double minThrMetPt_ = 1.e-3
 
static constexpr double minThrSumPt2_ = 1.e-3
 
static constexpr double minThrSumPt_ = 0.01
 
static constexpr double minThrSumPz_ = 1.e-4
 
static constexpr double minThrSumWnt_ = 0.01
 
static constexpr double minThrSumWos_ = 0.1
 
static constexpr double mvaH_ = 0.8
 
static constexpr double mvaL_ = 0.5
 
static constexpr unsigned int NOT_MATCHED = 66666
 
static constexpr double pTcut_ = 0.7
 
static constexpr double rBTL_ = 110.0
 
static constexpr double selNdof_ = 4.
 
static constexpr double simUnit_ = 1e9
 
static constexpr double tol_ = 1.e-4
 
static constexpr double trackMaxBtlEta_ = 1.5
 
static constexpr double trackMaxEtlEta_ = 3.
 
static constexpr double trackMinEtlEta_ = 1.6
 
static constexpr double zETL_ = 290.0
 
static constexpr double zWosMatchMax_ = 1.
 

Additional Inherited Members

- Public Types inherited from DQMEDAnalyzer
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 
- Protected Member Functions inherited from DQMEDAnalyzer
uint64_t meId () const
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 
unsigned int streamId_
 

Detailed Description

Definition at line 66 of file Primary4DVertexValidation.cc.

Member Typedef Documentation

◆ LorentzVector

Definition at line 67 of file Primary4DVertexValidation.cc.

Constructor & Destructor Documentation

◆ Primary4DVertexValidation()

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

Definition at line 516 of file Primary4DVertexValidation.cc.

References edm::ParameterSet::getParameter(), ProducerED_cfi::InputTag, momentumToken_, pathLengthToken_, probKToken_, probPiToken_, probPToken_, Rec4DVerToken_, RecBeamSpotToken_, recoToSimAssociationToken_, RecTrackToken_, sigmat0PidToken_, sigmat0SafePidToken_, simToRecoAssociationToken_, AlCaHLTBitMon_QueryRunRegistry::string, t0PidToken_, t0SafePidToken_, timeToken_, tmtdToken_, tofKToken_, tofPiToken_, tofPToken_, trackAssocToken_, trackingParticleCollectionToken_, trackingVertexCollectionToken_, trackMVAQualToken_, and vecPileupSummaryInfoToken_.

517  : folder_(iConfig.getParameter<std::string>("folder")),
518  use_only_charged_tracks_(iConfig.getParameter<bool>("useOnlyChargedTracks")),
519  optionalPlots_(iConfig.getUntrackedParameter<bool>("optionalPlots")),
520  use3dNoTime_(iConfig.getParameter<bool>("use3dNoTime")),
521  minProbHeavy_(iConfig.getParameter<double>("minProbHeavy")),
522  trackweightTh_(iConfig.getParameter<double>("trackweightTh")),
523  mvaTh_(iConfig.getParameter<double>("mvaTh")),
524  lineDensityPar_(iConfig.getParameter<std::vector<double>>("lineDensityPar")),
525  pdtToken_(esConsumes<HepPDT::ParticleDataTable, edm::DefaultRecord>()) {
526  vecPileupSummaryInfoToken_ = consumes<std::vector<PileupSummaryInfo>>(edm::InputTag(std::string("addPileupInfo")));
528  consumes<TrackingParticleCollection>(iConfig.getParameter<edm::InputTag>("SimTag"));
529  trackingVertexCollectionToken_ = consumes<TrackingVertexCollection>(iConfig.getParameter<edm::InputTag>("SimTag"));
531  consumes<reco::SimToRecoCollection>(iConfig.getParameter<edm::InputTag>("TPtoRecoTrackAssoc"));
533  consumes<reco::RecoToSimCollection>(iConfig.getParameter<edm::InputTag>("TPtoRecoTrackAssoc"));
534  RecTrackToken_ = consumes<reco::TrackCollection>(iConfig.getParameter<edm::InputTag>("mtdTracks"));
535  RecBeamSpotToken_ = consumes<reco::BeamSpot>(iConfig.getParameter<edm::InputTag>("offlineBS"));
536  Rec4DVerToken_ = consumes<edm::View<reco::Vertex>>(iConfig.getParameter<edm::InputTag>("offline4DPV"));
537  trackAssocToken_ = consumes<edm::ValueMap<int>>(iConfig.getParameter<edm::InputTag>("trackAssocSrc"));
538  pathLengthToken_ = consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("pathLengthSrc"));
539  momentumToken_ = consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("momentumSrc"));
540  timeToken_ = consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("timeSrc"));
541  t0PidToken_ = consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("t0PID"));
542  sigmat0PidToken_ = consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("sigmat0PID"));
543  t0SafePidToken_ = consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("t0SafePID"));
544  sigmat0SafePidToken_ = consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("sigmat0SafePID"));
545  trackMVAQualToken_ = consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("trackMVAQual"));
546  tmtdToken_ = consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("tmtd"));
547  tofPiToken_ = consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("tofPi"));
548  tofKToken_ = consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("tofK"));
549  tofPToken_ = consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("tofP"));
550  probPiToken_ = consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("probPi"));
551  probKToken_ = consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("probK"));
552  probPToken_ = consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("probP"));
553 }
edm::EDGetTokenT< edm::View< reco::Vertex > > Rec4DVerToken_
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
edm::EDGetTokenT< TrackingVertexCollection > trackingVertexCollectionToken_
edm::EDGetTokenT< TrackingParticleCollection > trackingParticleCollectionToken_
edm::EDGetTokenT< edm::ValueMap< float > > sigmat0SafePidToken_
edm::EDGetTokenT< reco::BeamSpot > RecBeamSpotToken_
edm::EDGetTokenT< edm::ValueMap< float > > probKToken_
edm::EDGetTokenT< edm::ValueMap< float > > sigmat0PidToken_
edm::EDGetTokenT< edm::ValueMap< float > > timeToken_
T getUntrackedParameter(std::string const &, T const &) const
edm::EDGetTokenT< edm::ValueMap< float > > probPiToken_
edm::EDGetTokenT< edm::ValueMap< float > > probPToken_
edm::EDGetTokenT< edm::ValueMap< float > > momentumToken_
edm::EDGetTokenT< edm::ValueMap< float > > tofKToken_
edm::EDGetTokenT< reco::TrackCollection > RecTrackToken_
const std::vector< double > lineDensityPar_
edm::EDGetTokenT< std::vector< PileupSummaryInfo > > vecPileupSummaryInfoToken_
edm::EDGetTokenT< edm::ValueMap< float > > t0PidToken_
edm::EDGetTokenT< reco::SimToRecoCollection > simToRecoAssociationToken_
edm::EDGetTokenT< edm::ValueMap< int > > trackAssocToken_
edm::EDGetTokenT< edm::ValueMap< float > > tofPiToken_
edm::EDGetTokenT< reco::RecoToSimCollection > recoToSimAssociationToken_
edm::ESGetToken< HepPDT::ParticleDataTable, edm::DefaultRecord > pdtToken_
edm::EDGetTokenT< edm::ValueMap< float > > t0SafePidToken_
edm::EDGetTokenT< edm::ValueMap< float > > tmtdToken_
edm::EDGetTokenT< edm::ValueMap< float > > tofPToken_
edm::EDGetTokenT< edm::ValueMap< float > > trackMVAQualToken_
edm::EDGetTokenT< edm::ValueMap< float > > pathLengthToken_

◆ ~Primary4DVertexValidation()

Primary4DVertexValidation::~Primary4DVertexValidation ( )
override

Definition at line 555 of file Primary4DVertexValidation.cc.

555 {}

Member Function Documentation

◆ analyze()

void Primary4DVertexValidation::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overridevirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 1961 of file Primary4DVertexValidation.cc.

References funct::abs(), gather_cfg::cout, PVValHelper::d3D, deltaZcut_, dt, PVValHelper::dz, l1ctLayer1_cff::dZ, JetChargeProducer_cfi::exp, dqm::impl::MonitorElement::Fill(), edm::EventSetup::getHandle(), getMatchedTP(), getRecoPVs(), getSimPVs(), getWosWnt(), caHitNtupletGeneratorKernels::iev, iEvent, edm::isNotFinite(), isParticle(), edm::HandleBase::isValid(), ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::iv, lineDensityPar_, LogTrace, EgHLTOffHistBins_cfi::mass, matchReco2Sim(), SiStripPI::max, meBarrelNoPIDtype_, meBarrelPIDp_, meBarrelTrueKAsK_, meBarrelTrueKAsP_, meBarrelTrueKAsPi_, meBarrelTrueKNoPID_, meBarrelTruePAsK_, meBarrelTruePAsP_, meBarrelTruePAsPi_, meBarrelTruePiAsK_, meBarrelTruePiAsP_, meBarrelTruePiAsPi_, meBarrelTruePiNoPID_, meBarrelTruePNoPID_, meDeltaTfakefake_, meDeltaTfakereal_, meDeltaTrealreal_, meDeltaZfakefake_, meDeltaZfakereal_, meDeltaZrealreal_, meEndcapNoPIDtype_, meEndcapPIDp_, meEndcapTrueKAsK_, meEndcapTrueKAsP_, meEndcapTrueKAsPi_, meEndcapTrueKNoPID_, meEndcapTruePAsK_, meEndcapTruePAsP_, meEndcapTruePAsPi_, meEndcapTruePiAsK_, meEndcapTruePiAsP_, meEndcapTruePiAsPi_, meEndcapTruePiNoPID_, meEndcapTruePNoPID_, meFakeTrackRecLVRelMult_, meFakeTrackRecLVRelMultvsMult_, meFakeTrackRecLVRelSumWos_, meFakeTrackRecLVRelSumWosvsSumWos_, meFakeTrackRelMult_, meFakeTrackRelMultvsMult_, meFakeTrackRelSumWos_, meFakeTrackRelSumWosvsSumWos_, meJetsFakeRelSumPt2_, meJetsFakeRelSumPt2vsSumPt2_, meJetsPUHt_, meJetsPUMetPt_, meJetsPUMult_, meJetsPURelHt_, meJetsPURelHtvsHt_, meJetsPURelMetPt_, meJetsPURelMetPtvsMetPt_, meJetsPURelMult_, meJetsPURelMultvsMult_, meJetsPURelSumPt2_, meJetsPURelSumPt2vsSumPt2_, meJetsPURelSumPz_, meJetsPURelSumPzvsSumPz_, meJetsPUSumPt2_, meJetsPUSumPz_, meJetsRecLVFakeRelSumPt2_, meJetsRecLVFakeRelSumPt2vsSumPt2_, meJetsRecLVPUHt_, meJetsRecLVPUMetPt_, meJetsRecLVPUMult_, meJetsRecLVPURelHt_, meJetsRecLVPURelHtvsHt_, meJetsRecLVPURelMetPt_, meJetsRecLVPURelMetPtvsMetPt_, meJetsRecLVPURelMult_, meJetsRecLVPURelMultvsMult_, meJetsRecLVPURelSumPt2_, meJetsRecLVPURelSumPt2vsSumPt2_, meJetsRecLVPURelSumPz_, meJetsRecLVPURelSumPzvsSumPz_, meJetsRecLVPUSumPt2_, meJetsRecLVPUSumPz_, meMatchQual_, mePUTrackMult_, mePUTrackRecLVMult_, mePUTrackRecLVRelMult_, mePUTrackRecLVRelMultvsMult_, mePUTrackRecLVRelSumPt2_, mePUTrackRecLVRelSumPt2vsSumPt2_, mePUTrackRecLVRelSumPt_, mePUTrackRecLVRelSumPtvsSumPt_, mePUTrackRecLVRelSumWnt_, mePUTrackRecLVRelSumWntvsSumWnt_, mePUTrackRecLVRelSumWos_, mePUTrackRecLVRelSumWosvsSumWos_, mePUTrackRecLVSumPt2_, mePUTrackRecLVSumPt_, mePUTrackRecLVSumWnt_, mePUTrackRecLVSumWos_, mePUTrackRecLVWnt_, mePUTrackRelMult_, mePUTrackRelMultvsMult_, mePUTrackRelSumPt2_, mePUTrackRelSumPt2vsSumPt2_, mePUTrackRelSumPt_, mePUTrackRelSumPtvsSumPt_, mePUTrackRelSumWnt_, mePUTrackRelSumWntvsSumWnt_, mePUTrackRelSumWos_, mePUTrackRelSumWosvsSumWos_, mePUTrackSumPt2_, mePUTrackSumPt_, mePUTrackSumWnt_, mePUTrackSumWos_, mePUTrackWnt_, mePUvsFakeV_, mePUvsOtherFakeV_, mePUvsRealV_, mePUvsSplitV_, meRecoPosInRecoOrigCollection_, meRecoPosInSimCollection_, meRecoPVPosSignal_, meRecoPVPosSignalNotHighestPt_, meRecoVtxVsLineDensity_, meRecPVT_, meRecPVZ_, meRecVerNumber_, meSecTrackRecLVRelSumWos_, meSecTrackRecLVRelSumWosvsSumWos_, meSecTrackRecLVSumWos_, meSecTrackRelSumWos_, meSecTrackRelSumWosvsSumWos_, meSecTrackSumWos_, meSimPosInSimOrigCollection_, meSimPVZ_, meTimePull_, meTimeRes_, meTimeSignalPull_, meTimeSignalRes_, meTrack3DposRes_, meTrackEffEtaTot_, meTrackEffPtTot_, meTrackMatchedTPEffEtaMtd_, meTrackMatchedTPEffEtaTot_, meTrackMatchedTPEffPtMtd_, meTrackMatchedTPEffPtTot_, meTrackMatchedTPPullTot_, meTrackMatchedTPResTot_, meTrackMatchedTPZposResTot_, meTrackPull_, meTrackPullHighP_, meTrackPullHighPTot_, meTrackPullLowP_, meTrackPullLowPTot_, meTrackPullTot_, meTrackRes_, meTrackResHighP_, meTrackResHighPTot_, meTrackResLowP_, meTrackResLowPTot_, meTrackResMass_, meTrackResMassPions_, meTrackResMassProtons_, meTrackResMassTrue_, meTrackResMassTruePions_, meTrackResMassTrueProtons_, meTrackResTot_, meTrackZposRes_, meTrackZposResTot_, minThrMetPt_, minThrSumPt2_, minThrSumPt_, minThrSumPz_, minThrSumWnt_, minThrSumWos_, momentumToken_, mvaH_, mvaL_, nJets, NOT_MATCHED, nt, observablesFromJets(), optionalPlots_, LHEGenericFilter_cfi::ParticleID, genfragment_ptgun_cfg::PartID, pathLengthToken_, pdtToken_, printMatchedRecoTrackInfo(), printSimVtxRecoVtxInfo(), probKToken_, probPiToken_, probPToken_, edm::Handle< T >::product(), Primary4DVertexValidation::simPrimaryVertex::ptsq, r2s_, Rec4DVerToken_, RecBeamSpotToken_, recoToSimAssociationToken_, s2r_, select(), selNdof_, sigmat0PidToken_, sigmat0SafePidToken_, simToRecoAssociationToken_, simUnit_, submitPVValidationJobs::split(), mathSSE::sqrt(), TtFullHadEvtBuilder_cfi::sumPt, t0PidToken_, t0SafePidToken_, hcalRecHitTable_cff::time, timeFromTrueMass(), timeToken_, tmtdToken_, tofKToken_, tofPiToken_, tofPToken_, tol_, trackAssocToken_, trackingParticleCollectionToken_, trackingVertexCollectionToken_, trackMaxBtlEta_, trackMaxEtlEta_, trackMinEtlEta_, trackMVAQualToken_, trackweightTh_, trkRecSel(), trkTPSelLV(), use3dNoTime_, vecPileupSummaryInfoToken_, trackerHitRTTI::vector, bphysicsOniaDQM_cfi::vertex, and z.

1961  {
1962  using edm::Handle;
1963  using edm::View;
1964  using std::cout;
1965  using std::endl;
1966  using std::vector;
1967  using namespace reco;
1968 
1969  std::vector<float> pileUpInfo_z;
1970 
1971  // get the pileup information
1973  if (iEvent.getByToken(vecPileupSummaryInfoToken_, puinfoH)) {
1974  for (auto const& pu_info : *puinfoH.product()) {
1975  if (pu_info.getBunchCrossing() == 0) {
1976  pileUpInfo_z = pu_info.getPU_zpositions();
1977  break;
1978  }
1979  }
1980  }
1981 
1983  iEvent.getByToken(trackingParticleCollectionToken_, TPCollectionH);
1984  if (!TPCollectionH.isValid())
1985  edm::LogWarning("Primary4DVertexValidation") << "TPCollectionH is not valid";
1986 
1988  iEvent.getByToken(trackingVertexCollectionToken_, TVCollectionH);
1989  if (!TVCollectionH.isValid())
1990  edm::LogWarning("Primary4DVertexValidation") << "TVCollectionH is not valid";
1991 
1993  iEvent.getByToken(simToRecoAssociationToken_, simToRecoH);
1994  if (simToRecoH.isValid())
1995  s2r_ = simToRecoH.product();
1996  else
1997  edm::LogWarning("Primary4DVertexValidation") << "simToRecoH is not valid";
1998 
2000  iEvent.getByToken(recoToSimAssociationToken_, recoToSimH);
2001  if (recoToSimH.isValid())
2002  r2s_ = recoToSimH.product();
2003  else
2004  edm::LogWarning("Primary4DVertexValidation") << "recoToSimH is not valid";
2005 
2006  edm::Handle<reco::BeamSpot> BeamSpotH;
2007  iEvent.getByToken(RecBeamSpotToken_, BeamSpotH);
2008  if (!BeamSpotH.isValid())
2009  edm::LogWarning("Primary4DVertexValidation") << "BeamSpotH is not valid";
2010 
2011  std::vector<simPrimaryVertex> simpv; // a list of simulated primary MC vertices
2012  simpv = getSimPVs(TVCollectionH);
2013  // this bool check if first vertex in that with highest pT
2014  bool signal_is_highest_pt =
2015  std::max_element(simpv.begin(), simpv.end(), [](const simPrimaryVertex& lhs, const simPrimaryVertex& rhs) {
2016  return lhs.ptsq < rhs.ptsq;
2017  }) == simpv.begin();
2018 
2019  std::vector<recoPrimaryVertex> recopv; // a list of reconstructed primary MC vertices
2021  iEvent.getByToken(Rec4DVerToken_, recVtxs);
2022  if (!recVtxs.isValid())
2023  edm::LogWarning("Primary4DVertexValidation") << "recVtxs is not valid";
2024  recopv = getRecoPVs(recVtxs);
2025 
2026  const auto& trackAssoc = iEvent.get(trackAssocToken_);
2027  const auto& pathLength = iEvent.get(pathLengthToken_);
2028  const auto& momentum = iEvent.get(momentumToken_);
2029  const auto& time = iEvent.get(timeToken_);
2030  const auto& t0Pid = iEvent.get(t0PidToken_);
2031  const auto& sigmat0 = iEvent.get(sigmat0PidToken_);
2032  const auto& t0Safe = iEvent.get(t0SafePidToken_);
2033  const auto& sigmat0Safe = iEvent.get(sigmat0SafePidToken_);
2034  const auto& mtdQualMVA = iEvent.get(trackMVAQualToken_);
2035  const auto& tMtd = iEvent.get(tmtdToken_);
2036  const auto& tofPi = iEvent.get(tofPiToken_);
2037  const auto& tofK = iEvent.get(tofKToken_);
2038  const auto& tofP = iEvent.get(tofPToken_);
2039  const auto& probPi = iEvent.get(probPiToken_);
2040  const auto& probK = iEvent.get(probKToken_);
2041  const auto& probP = iEvent.get(probPToken_);
2042  const auto& fPDGTable = iSetup.getHandle(pdtToken_);
2043 
2044  // I have simPV and recoPV collections
2045  matchReco2Sim(recopv, simpv, sigmat0Safe, mtdQualMVA, BeamSpotH);
2046 
2047  // Loop on tracks
2048  for (unsigned int iv = 0; iv < recopv.size(); iv++) {
2049  if (recopv.at(iv).ndof > selNdof_) {
2050  const reco::Vertex* vertex = recopv.at(iv).recVtx;
2051 
2052  for (unsigned int iev = 0; iev < simpv.size(); iev++) {
2053  auto vsim = simpv.at(iev).sim_vertex;
2054 
2055  bool selectedVtxMatching = recopv.at(iv).sim == iev && simpv.at(iev).rec == iv;
2056  bool selectedLV = simpv.at(iev).eventId.bunchCrossing() == 0 && simpv.at(iev).eventId.event() == 0 &&
2057  recopv.at(iv).OriginalIndex == 0;
2058  bool selectedLVMatching = selectedVtxMatching && selectedLV; // bool for reco vtx leading match
2059  if (selectedLVMatching && !recopv.at(iv).is_signal()) {
2060  edm::LogWarning("Primary4DVertexValidation")
2061  << "Reco vtx leading match inconsistent: BX/ID " << simpv.at(iev).eventId.bunchCrossing() << " "
2062  << simpv.at(iev).eventId.event();
2063  }
2064 #ifdef EDM_ML_DEBUG
2065  if (selectedLVMatching) {
2066  printSimVtxRecoVtxInfo(simpv.at(iev), recopv.at(iv));
2067  }
2068 #endif
2069  double vzsim = simpv.at(iev).z;
2070  double vtsim = simpv.at(iev).t * simUnit_;
2071 
2072  double wnt = 0, wos = 0;
2073  double PUsumWnt = 0, PUsumWos = 0, SecsumWos = 0, FakesumWos = 0, PUsumPt = 0, PUsumPt2 = 0;
2074  double sumWnt = 0, sumWos = 0, sumPt = 0, sumPt2 = 0;
2075  unsigned int nt = 0, PUnt = 0, Fakent = 0;
2076 
2077  std::vector<double> massVector;
2078  std::vector<reco::Track> recotracks;
2079  std::vector<int> categoryVector;
2080  double sumEtJets = 0, sumPt2Jets = 0, metPt = 0, sumPzJets = 0;
2081  double sumEtJetsnoPU = 0, sumPt2JetsnoPU = 0, metPtnoPU = 0, sumPzJetsnoPU = 0;
2082  double sumEtJetsnoFake = 0, sumPt2JetsnoFake = 0, metPtnoFake = 0, sumPzJetsnoFake = 0;
2083  unsigned int nJets = 0, nJetsnoPU = 0, nJetsnoFake = 0;
2084  for (auto iTrack = vertex->tracks_begin(); iTrack != vertex->tracks_end(); ++iTrack) {
2085  if (trackAssoc[*iTrack] == -1) {
2086  edm::LogWarning("mtdTracks") << "Extended track not associated";
2087  continue;
2088  }
2089 
2090  if (vertex->trackWeight(*iTrack) < trackweightTh_)
2091  continue;
2092  bool noCrack = std::abs((*iTrack)->eta()) < trackMaxBtlEta_ || std::abs((*iTrack)->eta()) > trackMinEtlEta_;
2093 
2094  bool selectRecoTrk = trkRecSel(**iTrack);
2095  if (selectedLVMatching && selectRecoTrk) {
2096  if (noCrack) {
2097  meTrackEffPtTot_->Fill((*iTrack)->pt());
2098  }
2099  meTrackEffEtaTot_->Fill(std::abs((*iTrack)->eta()));
2100  }
2101 
2102  auto tp_info = getMatchedTP(*iTrack, vsim).first;
2103  int matchCategory = getMatchedTP(*iTrack, vsim).second;
2104 
2105  // PU, fake and secondary tracks
2106  if (selectedVtxMatching) {
2107  unsigned int no_PIDtype = 0;
2108  bool no_PID, is_Pi, is_K, is_P;
2109  int PartID = 211; // pion
2110  isParticle(*iTrack, sigmat0, sigmat0Safe, probPi, probK, probP, no_PIDtype, no_PID, is_Pi, is_K, is_P);
2111  if (!use3dNoTime_) {
2112  if (no_PID || is_Pi) {
2113  PartID = 211;
2114  } else if (is_K) {
2115  PartID = 321;
2116  } else if (is_P) {
2117  PartID = 2212;
2118  }
2119  }
2120  const HepPDT::ParticleData* PData = fPDGTable->particle(HepPDT::ParticleID(abs(PartID)));
2121  double mass = PData->mass().value();
2122  massVector.push_back(mass);
2123  recotracks.push_back(**iTrack);
2124  getWosWnt(*vertex, *iTrack, sigmat0Safe, mtdQualMVA, BeamSpotH, wos, wnt);
2125  // reco track matched to any TP
2126  if (tp_info != nullptr) {
2127 #ifdef EDM_ML_DEBUG
2128  if (selectedLV) {
2129  printMatchedRecoTrackInfo(*vertex, *iTrack, *tp_info, matchCategory);
2130  }
2131 #endif
2132  // matched TP not associated to any daughter track of a given sim vertex but having the same eventID (track from secondary vtx)
2133  if (matchCategory == 1) {
2134  categoryVector.push_back(matchCategory);
2135  SecsumWos += wos;
2136  }
2137  // matched TP not associated to any sim vertex of a given simulated event (PU track)
2138  if (matchCategory == 2) {
2139  if (optionalPlots_) {
2140  mePUTrackWnt_->Fill(wnt);
2141  if (selectedLV) {
2142  mePUTrackRecLVWnt_->Fill(wnt);
2143  }
2144  }
2145  PUsumWnt += wnt;
2146  PUsumWos += wos;
2147  PUsumPt += (*iTrack)->pt();
2148  PUsumPt2 += ((*iTrack)->pt() * (*iTrack)->pt());
2149  PUnt++;
2150  categoryVector.push_back(2);
2151  }
2152  }
2153  // reco track not matched to any TP (fake tracks)
2154  else {
2155  categoryVector.push_back(matchCategory);
2156  FakesumWos += wos;
2157  Fakent++;
2158  }
2159  nt++;
2160  sumWnt += wnt;
2161  sumWos += wos;
2162  sumPt += (*iTrack)->pt();
2163  sumPt2 += ((*iTrack)->pt() * (*iTrack)->pt());
2164  }
2165 
2166  // matched TP equal to any TP of a given sim vertex
2167  if (tp_info != nullptr && matchCategory == 0) {
2168  categoryVector.push_back(matchCategory);
2169  double mass = (*tp_info)->mass();
2170  double tsim = (*tp_info)->parentVertex()->position().t() * simUnit_;
2171  double tEst = timeFromTrueMass(mass, pathLength[*iTrack], momentum[*iTrack], time[*iTrack]);
2172 
2173  double xsim = (*tp_info)->parentVertex()->position().x();
2174  double ysim = (*tp_info)->parentVertex()->position().y();
2175  double zsim = (*tp_info)->parentVertex()->position().z();
2176  double xPCA = (*iTrack)->vx();
2177  double yPCA = (*iTrack)->vy();
2178  double zPCA = (*iTrack)->vz();
2179 
2180  double dZ = zPCA - zsim;
2181  double d3D = std::sqrt((xPCA - xsim) * (xPCA - xsim) + (yPCA - ysim) * (yPCA - ysim) + dZ * dZ);
2182  // orient d3D according to the projection of RECO - SIM onto simulated momentum
2183  if ((xPCA - xsim) * ((*tp_info)->px()) + (yPCA - ysim) * ((*tp_info)->py()) + dZ * ((*tp_info)->pz()) <
2184  0.) {
2185  d3D = -d3D;
2186  }
2187 
2188  // select TPs associated to the signal event
2189  bool selectTP = trkTPSelLV(**tp_info);
2190 
2191  if (selectedLVMatching && selectRecoTrk && selectTP) {
2192  meTrackMatchedTPZposResTot_->Fill((*iTrack)->vz() - vzsim);
2193  if (noCrack) {
2194  meTrackMatchedTPEffPtTot_->Fill((*iTrack)->pt());
2195  }
2196  meTrackMatchedTPEffEtaTot_->Fill(std::abs((*iTrack)->eta()));
2197  }
2198 
2199  if (sigmat0Safe[*iTrack] == -1)
2200  continue;
2201 
2202  if (selectedLVMatching && selectRecoTrk && selectTP) {
2203  meTrackMatchedTPResTot_->Fill(t0Safe[*iTrack] - vtsim);
2204  meTrackMatchedTPPullTot_->Fill((t0Safe[*iTrack] - vtsim) / sigmat0Safe[*iTrack]);
2205  if (noCrack) {
2206  meTrackMatchedTPEffPtMtd_->Fill((*iTrack)->pt());
2207  }
2208  meTrackMatchedTPEffEtaMtd_->Fill(std::abs((*iTrack)->eta()));
2209 
2210  unsigned int noPIDtype = 0;
2211  bool noPID = false, isPi = false, isK = false, isP = false;
2212  isParticle(*iTrack, sigmat0, sigmat0Safe, probPi, probK, probP, noPIDtype, noPID, isPi, isK, isP);
2213 
2214  if ((isPi && std::abs(tMtd[*iTrack] - tofPi[*iTrack] - t0Pid[*iTrack]) > tol_) ||
2215  (isK && std::abs(tMtd[*iTrack] - tofK[*iTrack] - t0Pid[*iTrack]) > tol_) ||
2216  (isP && std::abs(tMtd[*iTrack] - tofP[*iTrack] - t0Pid[*iTrack]) > tol_)) {
2217  edm::LogWarning("Primary4DVertexValidation")
2218  << "No match between mass hyp. and time: " << std::abs((*tp_info)->pdgId()) << " mass hyp pi/k/p "
2219  << isPi << " " << isK << " " << isP << " t0/t0safe " << t0Pid[*iTrack] << " " << t0Safe[*iTrack]
2220  << " tMtd - tof pi/K/p " << tMtd[*iTrack] - tofPi[*iTrack] << " " << tMtd[*iTrack] - tofK[*iTrack]
2221  << " " << tMtd[*iTrack] - tofP[*iTrack] << " Prob pi/K/p " << probPi[*iTrack] << " "
2222  << probK[*iTrack] << " " << probP[*iTrack];
2223  }
2224 
2225  if (std::abs((*iTrack)->eta()) < trackMaxBtlEta_) {
2226  meBarrelPIDp_->Fill((*iTrack)->p());
2227  meBarrelNoPIDtype_->Fill(noPIDtype + 0.5);
2228  if (std::abs((*tp_info)->pdgId()) == 211) {
2229  if (noPID) {
2230  meBarrelTruePiNoPID_->Fill((*iTrack)->p());
2231  } else if (isPi) {
2232  meBarrelTruePiAsPi_->Fill((*iTrack)->p());
2233  } else if (isK) {
2234  meBarrelTruePiAsK_->Fill((*iTrack)->p());
2235  } else if (isP) {
2236  meBarrelTruePiAsP_->Fill((*iTrack)->p());
2237  } else {
2238  edm::LogWarning("Primary4DVertexValidation")
2239  << "No PID class: " << std::abs((*tp_info)->pdgId()) << " t0/t0safe " << t0Pid[*iTrack] << " "
2240  << t0Safe[*iTrack] << " Prob pi/K/p " << probPi[*iTrack] << " " << probK[*iTrack] << " "
2241  << probP[*iTrack];
2242  }
2243  } else if (std::abs((*tp_info)->pdgId()) == 321) {
2244  if (noPID) {
2245  meBarrelTrueKNoPID_->Fill((*iTrack)->p());
2246  } else if (isPi) {
2247  meBarrelTrueKAsPi_->Fill((*iTrack)->p());
2248  } else if (isK) {
2249  meBarrelTrueKAsK_->Fill((*iTrack)->p());
2250  } else if (isP) {
2251  meBarrelTrueKAsP_->Fill((*iTrack)->p());
2252  } else {
2253  edm::LogWarning("Primary4DVertexValidation")
2254  << "No PID class: " << std::abs((*tp_info)->pdgId()) << " t0/t0safe " << t0Pid[*iTrack] << " "
2255  << t0Safe[*iTrack] << " Prob pi/K/p " << probPi[*iTrack] << " " << probK[*iTrack] << " "
2256  << probP[*iTrack];
2257  }
2258  } else if (std::abs((*tp_info)->pdgId()) == 2212) {
2259  if (noPID) {
2260  meBarrelTruePNoPID_->Fill((*iTrack)->p());
2261  } else if (isPi) {
2262  meBarrelTruePAsPi_->Fill((*iTrack)->p());
2263  } else if (isK) {
2264  meBarrelTruePAsK_->Fill((*iTrack)->p());
2265  } else if (isP) {
2266  meBarrelTruePAsP_->Fill((*iTrack)->p());
2267  } else {
2268  edm::LogWarning("Primary4DVertexValidation")
2269  << "No PID class: " << std::abs((*tp_info)->pdgId()) << " t0/t0safe " << t0Pid[*iTrack] << " "
2270  << t0Safe[*iTrack] << " Prob pi/K/p " << probPi[*iTrack] << " " << probK[*iTrack] << " "
2271  << probP[*iTrack];
2272  }
2273  }
2274  } else if (std::abs((*iTrack)->eta()) > trackMinEtlEta_ && std::abs((*iTrack)->eta()) < trackMaxEtlEta_) {
2275  meEndcapPIDp_->Fill((*iTrack)->p());
2276  meEndcapNoPIDtype_->Fill(noPIDtype + 0.5);
2277  if (std::abs((*tp_info)->pdgId()) == 211) {
2278  if (noPID) {
2279  meEndcapTruePiNoPID_->Fill((*iTrack)->p());
2280  } else if (isPi) {
2281  meEndcapTruePiAsPi_->Fill((*iTrack)->p());
2282  } else if (isK) {
2283  meEndcapTruePiAsK_->Fill((*iTrack)->p());
2284  } else if (isP) {
2285  meEndcapTruePiAsP_->Fill((*iTrack)->p());
2286  } else {
2287  edm::LogWarning("Primary4DVertexValidation")
2288  << "No PID class: " << std::abs((*tp_info)->pdgId()) << " t0/t0safe " << t0Pid[*iTrack] << " "
2289  << t0Safe[*iTrack] << " Prob pi/K/p " << probPi[*iTrack] << " " << probK[*iTrack] << " "
2290  << probP[*iTrack];
2291  }
2292  } else if (std::abs((*tp_info)->pdgId()) == 321) {
2293  if (noPID) {
2294  meEndcapTrueKNoPID_->Fill((*iTrack)->p());
2295  } else if (isPi) {
2296  meEndcapTrueKAsPi_->Fill((*iTrack)->p());
2297  } else if (isK) {
2298  meEndcapTrueKAsK_->Fill((*iTrack)->p());
2299  } else if (isP) {
2300  meEndcapTrueKAsP_->Fill((*iTrack)->p());
2301  } else {
2302  edm::LogWarning("Primary4DVertexValidation")
2303  << "No PID class: " << std::abs((*tp_info)->pdgId()) << " t0/t0safe " << t0Pid[*iTrack] << " "
2304  << t0Safe[*iTrack] << " Prob pi/K/p " << probPi[*iTrack] << " " << probK[*iTrack] << " "
2305  << probP[*iTrack];
2306  }
2307  } else if (std::abs((*tp_info)->pdgId()) == 2212) {
2308  if (noPID) {
2309  meEndcapTruePNoPID_->Fill((*iTrack)->p());
2310  } else if (isPi) {
2311  meEndcapTruePAsPi_->Fill((*iTrack)->p());
2312  } else if (isK) {
2313  meEndcapTruePAsK_->Fill((*iTrack)->p());
2314  } else if (isP) {
2315  meEndcapTruePAsP_->Fill((*iTrack)->p());
2316  } else {
2317  edm::LogWarning("Primary4DVertexValidation")
2318  << "No PID class: " << std::abs((*tp_info)->pdgId()) << " t0/t0safe " << t0Pid[*iTrack] << " "
2319  << t0Safe[*iTrack] << " Prob pi/K/p " << probPi[*iTrack] << " " << probK[*iTrack] << " "
2320  << probP[*iTrack];
2321  }
2322  }
2323  }
2324  }
2325  meTrackResTot_->Fill(t0Safe[*iTrack] - tsim);
2326  meTrackPullTot_->Fill((t0Safe[*iTrack] - tsim) / sigmat0Safe[*iTrack]);
2328  if ((*iTrack)->p() <= 2) {
2329  meTrackResLowPTot_->Fill(t0Safe[*iTrack] - tsim);
2330  meTrackPullLowPTot_->Fill((t0Safe[*iTrack] - tsim) / sigmat0Safe[*iTrack]);
2331  } else {
2332  meTrackResHighPTot_->Fill(t0Safe[*iTrack] - tsim);
2333  meTrackPullHighPTot_->Fill((t0Safe[*iTrack] - tsim) / sigmat0Safe[*iTrack]);
2334  }
2335 
2336  if (mtdQualMVA[(*iTrack)] < mvaL_) {
2337  meTrackZposRes_[0]->Fill(dZ);
2338  meTrack3DposRes_[0]->Fill(d3D);
2339  meTrackRes_[0]->Fill(t0Safe[*iTrack] - tsim);
2340  meTrackPull_[0]->Fill((t0Safe[*iTrack] - tsim) / sigmat0Safe[*iTrack]);
2341 
2342  if (optionalPlots_) {
2343  meTrackResMass_[0]->Fill(t0Safe[*iTrack] - tEst);
2344  meTrackResMassTrue_[0]->Fill(tEst - tsim);
2345  }
2346 
2347  if ((*iTrack)->p() <= 2) {
2348  meTrackResLowP_[0]->Fill(t0Safe[*iTrack] - tsim);
2349  meTrackPullLowP_[0]->Fill((t0Safe[*iTrack] - tsim) / sigmat0Safe[*iTrack]);
2350  } else if ((*iTrack)->p() > 2) {
2351  meTrackResHighP_[0]->Fill(t0Safe[*iTrack] - tsim);
2352  meTrackPullHighP_[0]->Fill((t0Safe[*iTrack] - tsim) / sigmat0Safe[*iTrack]);
2353  }
2354 
2355  if (optionalPlots_) {
2356  if (std::abs((*tp_info)->pdgId()) == 2212) {
2357  meTrackResMassProtons_[0]->Fill(t0Safe[*iTrack] - tEst);
2358  meTrackResMassTrueProtons_[0]->Fill(tEst - tsim);
2359  } else if (std::abs((*tp_info)->pdgId()) == 211) {
2360  meTrackResMassPions_[0]->Fill(t0Safe[*iTrack] - tEst);
2361  meTrackResMassTruePions_[0]->Fill(tEst - tsim);
2362  }
2363  }
2364 
2365  } else if (mtdQualMVA[(*iTrack)] > mvaL_ && mtdQualMVA[(*iTrack)] < mvaH_) {
2366  meTrackZposRes_[1]->Fill(dZ);
2367  meTrack3DposRes_[1]->Fill(d3D);
2368  meTrackRes_[1]->Fill(t0Safe[*iTrack] - tsim);
2369  meTrackPull_[1]->Fill((t0Safe[*iTrack] - tsim) / sigmat0Safe[*iTrack]);
2370 
2371  if (optionalPlots_) {
2372  meTrackResMass_[1]->Fill(t0Safe[*iTrack] - tEst);
2373  meTrackResMassTrue_[1]->Fill(tEst - tsim);
2374  }
2375 
2376  if ((*iTrack)->p() <= 2) {
2377  meTrackResLowP_[1]->Fill(t0Safe[*iTrack] - tsim);
2378  meTrackPullLowP_[1]->Fill((t0Safe[*iTrack] - tsim) / sigmat0Safe[*iTrack]);
2379  } else if ((*iTrack)->p() > 2) {
2380  meTrackResHighP_[1]->Fill(t0Safe[*iTrack] - tsim);
2381  meTrackPullHighP_[1]->Fill((t0Safe[*iTrack] - tsim) / sigmat0Safe[*iTrack]);
2382  }
2383 
2384  if (optionalPlots_) {
2385  if (std::abs((*tp_info)->pdgId()) == 2212) {
2386  meTrackResMassProtons_[1]->Fill(t0Safe[*iTrack] - tEst);
2387  meTrackResMassTrueProtons_[1]->Fill(tEst - tsim);
2388  } else if (std::abs((*tp_info)->pdgId()) == 211) {
2389  meTrackResMassPions_[1]->Fill(t0Safe[*iTrack] - tEst);
2390  meTrackResMassTruePions_[1]->Fill(tEst - tsim);
2391  }
2392  }
2393 
2394  } else if (mtdQualMVA[(*iTrack)] > mvaH_) {
2395  meTrackZposRes_[2]->Fill(dZ);
2396  meTrack3DposRes_[2]->Fill(d3D);
2397  meTrackRes_[2]->Fill(t0Safe[*iTrack] - tsim);
2398  meTrackPull_[2]->Fill((t0Safe[*iTrack] - tsim) / sigmat0Safe[*iTrack]);
2399 
2400  if (optionalPlots_) {
2401  meTrackResMass_[2]->Fill(t0Safe[*iTrack] - tEst);
2402  meTrackResMassTrue_[2]->Fill(tEst - tsim);
2403  }
2404 
2405  if ((*iTrack)->p() <= 2) {
2406  meTrackResLowP_[2]->Fill(t0Safe[*iTrack] - tsim);
2407  meTrackPullLowP_[2]->Fill((t0Safe[*iTrack] - tsim) / sigmat0Safe[*iTrack]);
2408  } else if ((*iTrack)->p() > 2) {
2409  meTrackResHighP_[2]->Fill(t0Safe[*iTrack] - tsim);
2410  meTrackPullHighP_[2]->Fill((t0Safe[*iTrack] - tsim) / sigmat0Safe[*iTrack]);
2411  }
2412 
2413  if (optionalPlots_) {
2414  if (std::abs((*tp_info)->pdgId()) == 2212) {
2415  meTrackResMassProtons_[2]->Fill(t0Safe[*iTrack] - tEst);
2416  meTrackResMassTrueProtons_[2]->Fill(tEst - tsim);
2417  } else if (std::abs((*tp_info)->pdgId()) == 211) {
2418  meTrackResMassPions_[2]->Fill(t0Safe[*iTrack] - tEst);
2419  meTrackResMassTruePions_[2]->Fill(tEst - tsim);
2420  }
2421  }
2422  }
2423  } // if tp_info != nullptr && MatchCategory == 0
2424  } // loop on reco tracks
2425  if (selectedVtxMatching) {
2426  mePUTrackRelMult_->Fill(static_cast<double>(PUnt) / nt);
2427  meFakeTrackRelMult_->Fill(static_cast<double>(Fakent) / nt);
2428  mePUTrackRelSumWnt_->Fill(PUsumWnt / sumWnt);
2429  mePUTrackRelSumWos_->Fill(PUsumWos / sumWos);
2430  meSecTrackRelSumWos_->Fill(SecsumWos / sumWos);
2431  meFakeTrackRelSumWos_->Fill(FakesumWos / sumWos);
2432  mePUTrackRelSumPt_->Fill(PUsumPt / sumPt);
2433  mePUTrackRelSumPt2_->Fill(PUsumPt2 / sumPt2);
2434 
2436  recotracks, massVector, categoryVector, "use_allTracks", nJets, sumEtJets, sumPt2Jets, metPt, sumPzJets);
2437  observablesFromJets(recotracks,
2438  massVector,
2439  categoryVector,
2440  "skip_Fake",
2441  nJetsnoFake,
2442  sumEtJetsnoFake,
2443  sumPt2JetsnoFake,
2444  metPtnoFake,
2445  sumPzJetsnoFake);
2446  observablesFromJets(recotracks,
2447  massVector,
2448  categoryVector,
2449  "skip_PU",
2450  nJetsnoPU,
2451  sumEtJetsnoPU,
2452  sumPt2JetsnoPU,
2453  metPtnoPU,
2454  sumPzJetsnoPU);
2455 
2456  meJetsPURelMult_->Fill(static_cast<double>(nJets - nJetsnoPU) / nJets);
2457  meJetsPURelHt_->Fill((sumEtJets - sumEtJetsnoPU) / sumEtJets);
2458  meJetsPURelSumPt2_->Fill((sumPt2Jets - sumPt2JetsnoPU) / sumPt2Jets);
2459  meJetsFakeRelSumPt2_->Fill((sumPt2Jets - sumPt2JetsnoFake) / sumPt2Jets);
2460  meJetsPURelMetPt_->Fill((metPt - metPtnoPU) / metPt);
2461  meJetsPURelSumPz_->Fill((sumPzJets - sumPzJetsnoPU) / sumPzJets);
2462 
2463  if (optionalPlots_) {
2464  mePUTrackMult_->Fill(PUnt);
2465  mePUTrackSumWnt_->Fill(log10(std::max(minThrSumWnt_, PUsumWnt)));
2466  mePUTrackSumWos_->Fill(log10(std::max(minThrSumWos_, PUsumWos)));
2467  meSecTrackSumWos_->Fill(log10(std::max(minThrSumWos_, SecsumWos)));
2468  mePUTrackSumPt_->Fill(log10(std::max(minThrSumPt_, PUsumPt)));
2469  mePUTrackSumPt2_->Fill(log10(std::max(minThrSumPt2_, PUsumPt2)));
2470 
2471  mePUTrackRelMultvsMult_->Fill(nt, static_cast<double>(PUnt) / nt);
2472  meFakeTrackRelMultvsMult_->Fill(nt, static_cast<double>(Fakent) / nt);
2473  mePUTrackRelSumWntvsSumWnt_->Fill(log10(std::max(minThrSumWnt_, sumWnt)), PUsumWnt / sumWnt);
2474  mePUTrackRelSumWosvsSumWos_->Fill(log10(std::max(minThrSumWos_, sumWos)), PUsumWos / sumWos);
2475  meSecTrackRelSumWosvsSumWos_->Fill(log10(std::max(minThrSumWos_, sumWos)), SecsumWos / sumWos);
2476  meFakeTrackRelSumWosvsSumWos_->Fill(log10(std::max(minThrSumWos_, sumWos)), FakesumWos / sumWos);
2478  mePUTrackRelSumPt2vsSumPt2_->Fill(log10(std::max(minThrSumPt2_, sumPt2)), PUsumPt2 / sumPt2);
2479 
2480  meJetsPUMult_->Fill(nJets - nJetsnoPU);
2481  meJetsPUHt_->Fill(log10(std::max(minThrSumPt_, sumEtJets - sumEtJetsnoPU)));
2482  meJetsPUSumPt2_->Fill(log10(std::max(minThrSumPt2_, sumPt2Jets - sumPt2JetsnoPU)));
2483  meJetsPUMetPt_->Fill(log10(std::max(minThrMetPt_, metPt - metPtnoPU)));
2484  meJetsPUSumPz_->Fill(log10(std::max(minThrSumPz_, std::abs(sumPzJets - sumPzJetsnoPU))));
2485 
2486  meJetsPURelMultvsMult_->Fill(nJets, static_cast<double>(nJets - nJetsnoPU) / nJets);
2487  meJetsPURelHtvsHt_->Fill(log10(std::max(minThrSumPt_, sumEtJets)), (sumEtJets - sumEtJetsnoPU) / sumEtJets);
2489  (sumPt2Jets - sumPt2JetsnoPU) / sumPt2Jets);
2491  (sumPt2Jets - sumPt2JetsnoFake) / sumPt2Jets);
2492  meJetsPURelMetPtvsMetPt_->Fill(log10(std::max(minThrMetPt_, metPt)), (metPt - metPtnoPU) / metPt);
2494  (sumPzJets - sumPzJetsnoPU) / sumPzJets);
2495  }
2496  if (selectedLV) {
2497  mePUTrackRecLVRelMult_->Fill(static_cast<double>(PUnt) / nt);
2498  meFakeTrackRecLVRelMult_->Fill(static_cast<double>(Fakent) / nt);
2499  mePUTrackRecLVRelSumWnt_->Fill(PUsumWnt / sumWnt);
2500  mePUTrackRecLVRelSumWos_->Fill(PUsumWos / sumWos);
2501  meSecTrackRecLVRelSumWos_->Fill(SecsumWos / sumWos);
2502  meFakeTrackRecLVRelSumWos_->Fill(FakesumWos / sumWos);
2503  mePUTrackRecLVRelSumPt_->Fill(PUsumPt / sumPt);
2504  mePUTrackRecLVRelSumPt2_->Fill(PUsumPt2 / sumPt2);
2505 
2506  meJetsRecLVPURelMult_->Fill(static_cast<double>(nJets - nJetsnoPU) / nJets);
2507  meJetsRecLVPURelHt_->Fill((sumEtJets - sumEtJetsnoPU) / sumEtJets);
2508  meJetsRecLVPURelSumPt2_->Fill((sumPt2Jets - sumPt2JetsnoPU) / sumPt2Jets);
2509  meJetsRecLVFakeRelSumPt2_->Fill((sumPt2Jets - sumPt2JetsnoFake) / sumPt2Jets);
2510  meJetsRecLVPURelMetPt_->Fill((metPt - metPtnoPU) / metPt);
2511  meJetsRecLVPURelSumPz_->Fill((sumPzJets - sumPzJetsnoPU) / sumPzJets);
2512 
2513  LogTrace("Primary4DVertexValidation")
2514  << "#PUTrks = " << PUnt << " #Trks = " << nt << " PURelMult = " << std::setprecision(3)
2515  << static_cast<double>(PUnt) / nt;
2516  LogTrace("Primary4DVertexValidation")
2517  << "PUsumWnt = " << std::setprecision(3) << PUsumWnt << " sumWnt = " << std::setprecision(3) << sumWnt
2518  << " PURelsumWnt = " << std::setprecision(3) << PUsumWnt / sumWnt;
2519  LogTrace("Primary4DVertexValidation")
2520  << "PUsumWos = " << std::setprecision(3) << PUsumWos << " sumWos = " << std::setprecision(3) << sumWos
2521  << " PURelsumWos = " << std::setprecision(3) << PUsumWos / sumWos;
2522  LogTrace("Primary4DVertexValidation")
2523  << "PuSumPt = " << std::setprecision(3) << PUsumPt << " SumPt = " << std::setprecision(4) << sumPt
2524  << " PURelSumPt = " << std::setprecision(3) << PUsumPt / sumPt;
2525  LogTrace("Primary4DVertexValidation")
2526  << "PuSumPt2 = " << std::setprecision(3) << PUsumPt2 << " SumPt2 = " << std::setprecision(4) << sumPt2
2527  << " PURelSumPt2 = " << std::setprecision(3) << PUsumPt2 / sumPt2;
2528  if (optionalPlots_) {
2529  mePUTrackRecLVMult_->Fill(PUnt);
2530  mePUTrackRecLVSumWnt_->Fill(log10(std::max(minThrSumWnt_, PUsumWnt)));
2531  mePUTrackRecLVSumWos_->Fill(log10(std::max(minThrSumWos_, PUsumWos)));
2532  meSecTrackRecLVSumWos_->Fill(log10(std::max(minThrSumWos_, PUsumWos)));
2533  mePUTrackRecLVSumPt_->Fill(log10(std::max(minThrSumPt_, PUsumPt)));
2534  mePUTrackRecLVSumPt2_->Fill(log10(std::max(minThrSumPt2_, PUsumPt2)));
2535 
2536  mePUTrackRecLVRelMultvsMult_->Fill(nt, static_cast<double>(PUnt) / nt);
2537  meFakeTrackRecLVRelMultvsMult_->Fill(nt, static_cast<double>(Fakent) / nt);
2538  mePUTrackRecLVRelSumWntvsSumWnt_->Fill(log10(std::max(minThrSumWnt_, sumWnt)), PUsumWnt / sumWnt);
2539  mePUTrackRecLVRelSumWosvsSumWos_->Fill(log10(std::max(minThrSumWos_, sumWos)), PUsumWos / sumWos);
2540  meSecTrackRecLVRelSumWosvsSumWos_->Fill(log10(std::max(minThrSumWos_, sumWos)), SecsumWos / sumWos);
2541  meFakeTrackRecLVRelSumWosvsSumWos_->Fill(log10(std::max(minThrSumWos_, sumWos)), FakesumWos / sumWos);
2543  mePUTrackRecLVRelSumPt2vsSumPt2_->Fill(log10(std::max(minThrSumPt2_, sumPt2)), PUsumPt2 / sumPt2);
2544 
2545  meJetsRecLVPUMult_->Fill(nJets - nJetsnoPU);
2546  meJetsRecLVPUHt_->Fill(log10(std::max(minThrSumPt_, sumEtJets - sumEtJetsnoPU)));
2547  meJetsRecLVPUSumPt2_->Fill(log10(std::max(minThrSumPt2_, sumPt2Jets - sumPt2JetsnoPU)));
2548  meJetsRecLVPUMetPt_->Fill(log10(std::max(minThrMetPt_, metPt - metPtnoPU)));
2549  meJetsRecLVPUSumPz_->Fill(log10(std::max(minThrSumPz_, std::abs(sumPzJets - sumPzJetsnoPU))));
2550 
2551  meJetsRecLVPURelMultvsMult_->Fill(nJets, static_cast<double>(nJets - nJetsnoPU) / nJets);
2552  meJetsRecLVPURelHtvsHt_->Fill(log10(std::max(minThrSumPt_, sumEtJets)),
2553  (sumEtJets - sumEtJetsnoPU) / sumEtJets);
2555  (sumPt2Jets - sumPt2JetsnoPU) / sumPt2Jets);
2557  (sumPt2Jets - sumPt2JetsnoFake) / sumPt2Jets);
2558  meJetsRecLVPURelMetPtvsMetPt_->Fill(log10(std::max(minThrMetPt_, metPt)), (metPt - metPtnoPU) / metPt);
2560  (sumPzJets - sumPzJetsnoPU) / sumPzJets);
2561  }
2562  }
2563  }
2564  } // loop on simpv
2565  } // ndof
2566  } // loop on recopv
2567 
2568  int real = 0;
2569  int fake = 0;
2570  int other_fake = 0;
2571  int split = 0;
2572 
2573  auto puLineDensity = [&](double z) {
2574  // gaussian parameterization of line density vs z, z in cm, parameters in mm
2575  double argl = (z * 10. - lineDensityPar_[1]) / lineDensityPar_[2];
2576  return lineDensityPar_[0] * exp(-0.5 * argl * argl);
2577  };
2578 
2579  meRecVerNumber_->Fill(recopv.size());
2580  for (unsigned int ir = 0; ir < recopv.size(); ir++) {
2581  if (recopv.at(ir).ndof > selNdof_) {
2582  meRecoVtxVsLineDensity_->Fill(puLineDensity(recopv.at(ir).z));
2583  meRecPVZ_->Fill(recopv.at(ir).z, 1. / puLineDensity(recopv.at(ir).z));
2584  if (recopv.at(ir).recVtx->tError() > 0.) {
2585  meRecPVT_->Fill(recopv.at(ir).recVtx->t());
2586  }
2587  LogTrace("Primary4DVertexValidation") << "************* IR: " << ir;
2588  LogTrace("Primary4DVertexValidation")
2589  << "z: " << recopv.at(ir).z << " corresponding to line density: " << puLineDensity(recopv.at(ir).z);
2590  LogTrace("Primary4DVertexValidation") << "is_real: " << recopv.at(ir).is_real();
2591  LogTrace("Primary4DVertexValidation") << "is_fake: " << recopv.at(ir).is_fake();
2592  LogTrace("Primary4DVertexValidation") << "is_signal: " << recopv.at(ir).is_signal();
2593  LogTrace("Primary4DVertexValidation") << "split_from: " << recopv.at(ir).split_from();
2594  LogTrace("Primary4DVertexValidation") << "other fake: " << recopv.at(ir).other_fake();
2595  if (recopv.at(ir).is_real()) {
2596  real++;
2597  }
2598  if (recopv.at(ir).is_fake()) {
2599  fake++;
2600  }
2601  if (recopv.at(ir).other_fake()) {
2602  other_fake++;
2603  }
2604  if (recopv.at(ir).split_from() != -1) {
2605  split++;
2606  }
2607  } // ndof
2608  }
2609 
2610  LogTrace("Primary4DVertexValidation") << "is_real: " << real;
2611  LogTrace("Primary4DVertexValidation") << "is_fake: " << fake;
2612  LogTrace("Primary4DVertexValidation") << "split_from: " << split;
2613  LogTrace("Primary4DVertexValidation") << "other fake: " << other_fake;
2614  mePUvsRealV_->Fill(simpv.size(), real);
2615  mePUvsFakeV_->Fill(simpv.size(), fake);
2616  mePUvsOtherFakeV_->Fill(simpv.size(), other_fake);
2617  mePUvsSplitV_->Fill(simpv.size(), split);
2618 
2619  // fill vertices histograms here in a new loop
2620  for (unsigned int is = 0; is < simpv.size(); is++) {
2621  // protect against particle guns with very displaced vertices
2622  if (edm::isNotFinite(1. / puLineDensity(simpv.at(is).z))) {
2623  continue;
2624  }
2625  meSimPVZ_->Fill(simpv.at(is).z, 1. / puLineDensity(simpv.at(is).z));
2626  if (is == 0 && optionalPlots_) {
2627  meSimPosInSimOrigCollection_->Fill(simpv.at(is).OriginalIndex);
2628  }
2629 
2630  if (simpv.at(is).rec == NOT_MATCHED) {
2631  LogTrace("Primary4DVertexValidation") << "sim vertex: " << is << " is not matched with any reco";
2632  continue;
2633  }
2634 
2635  for (unsigned int ir = 0; ir < recopv.size(); ir++) {
2636  if (recopv.at(ir).ndof > selNdof_) {
2637  if (recopv.at(ir).sim == is && simpv.at(is).rec == ir) {
2638  meTimeRes_->Fill(recopv.at(ir).recVtx->t() - simpv.at(is).t * simUnit_);
2639  meTimePull_->Fill((recopv.at(ir).recVtx->t() - simpv.at(is).t * simUnit_) / recopv.at(ir).recVtx->tError());
2640  meMatchQual_->Fill(recopv.at(ir).matchQuality - 0.5);
2641  if (ir == 0) { // signal vertex plots
2642  meTimeSignalRes_->Fill(recopv.at(ir).recVtx->t() - simpv.at(is).t * simUnit_);
2643  meTimeSignalPull_->Fill((recopv.at(ir).recVtx->t() - simpv.at(is).t * simUnit_) /
2644  recopv.at(ir).recVtx->tError());
2645  if (optionalPlots_) {
2646  meRecoPosInSimCollection_->Fill(recopv.at(ir).sim);
2647  meRecoPosInRecoOrigCollection_->Fill(recopv.at(ir).OriginalIndex);
2648  }
2649  }
2650  if (simpv.at(is).eventId.bunchCrossing() == 0 && simpv.at(is).eventId.event() == 0) {
2651  if (!recopv.at(ir).is_signal()) {
2652  edm::LogWarning("Primary4DVertexValidation")
2653  << "Reco vtx leading match inconsistent: BX/ID " << simpv.at(is).eventId.bunchCrossing() << " "
2654  << simpv.at(is).eventId.event();
2655  }
2657  recopv.at(ir).OriginalIndex); // position in reco vtx correction associated to sim signal
2658  if (!signal_is_highest_pt) {
2660  recopv.at(ir).OriginalIndex); // position in reco vtx correction associated to sim signal
2661  }
2662  }
2663  LogTrace("Primary4DVertexValidation") << "*** Matching RECO: " << ir << "with SIM: " << is << " ***";
2664  LogTrace("Primary4DVertexValidation") << "Match Quality is " << recopv.at(ir).matchQuality;
2665  LogTrace("Primary4DVertexValidation") << "****";
2666  }
2667  } // ndof
2668  }
2669  }
2670 
2671  // dz histos
2672  for (unsigned int iv = 0; iv < recVtxs->size() - 1; iv++) {
2673  if (recVtxs->at(iv).ndof() > selNdof_) {
2674  double mindistance_realreal = 1e10;
2675 
2676  for (unsigned int jv = iv; jv < recVtxs->size(); jv++) {
2677  if ((!(jv == iv)) && select(recVtxs->at(jv))) {
2678  double dz = recVtxs->at(iv).z() - recVtxs->at(jv).z();
2679  double dtsigma = std::sqrt(recVtxs->at(iv).covariance(3, 3) + recVtxs->at(jv).covariance(3, 3));
2680  double dt = (std::abs(dz) <= deltaZcut_ && dtsigma > 0.)
2681  ? (recVtxs->at(iv).t() - recVtxs->at(jv).t()) / dtsigma
2682  : -9999.;
2683  if (recopv.at(iv).is_real() && recopv.at(jv).is_real()) {
2685  if (dt != -9999.) {
2687  }
2688  if (std::abs(dz) < std::abs(mindistance_realreal)) {
2689  mindistance_realreal = dz;
2690  }
2691  } else if (recopv.at(iv).is_fake() && recopv.at(jv).is_fake()) {
2693  if (dt != -9999.) {
2695  }
2696  }
2697  }
2698  }
2699 
2700  double mindistance_fakereal = 1e10;
2701  double mindistance_realfake = 1e10;
2702  for (unsigned int jv = 0; jv < recVtxs->size(); jv++) {
2703  if ((!(jv == iv)) && select(recVtxs->at(jv))) {
2704  double dz = recVtxs->at(iv).z() - recVtxs->at(jv).z();
2705  double dtsigma = std::sqrt(recVtxs->at(iv).covariance(3, 3) + recVtxs->at(jv).covariance(3, 3));
2706  double dt = (std::abs(dz) <= deltaZcut_ && dtsigma > 0.)
2707  ? (recVtxs->at(iv).t() - recVtxs->at(jv).t()) / dtsigma
2708  : -9999.;
2709  if (recopv.at(iv).is_fake() && recopv.at(jv).is_real()) {
2711  if (dt != -9999.) {
2713  }
2714  if (std::abs(dz) < std::abs(mindistance_fakereal)) {
2715  mindistance_fakereal = dz;
2716  }
2717  }
2718 
2719  if (recopv.at(iv).is_real() && recopv.at(jv).is_fake() && (std::abs(dz) < std::abs(mindistance_realfake))) {
2720  mindistance_realfake = dz;
2721  }
2722  }
2723  }
2724  } // ndof
2725  }
2726 
2727 } // end of analyze
static constexpr double trackMaxBtlEta_
float dt
Definition: AMPTWrapper.h:136
edm::EDGetTokenT< edm::View< reco::Vertex > > Rec4DVerToken_
edm::EDGetTokenT< TrackingVertexCollection > trackingVertexCollectionToken_
static constexpr double trackMaxEtlEta_
MonitorElement * mePUTrackRecLVRelSumWntvsSumWnt_
edm::EDGetTokenT< TrackingParticleCollection > trackingParticleCollectionToken_
edm::EDGetTokenT< edm::ValueMap< float > > sigmat0SafePidToken_
std::vector< Primary4DVertexValidation::simPrimaryVertex > getSimPVs(const edm::Handle< TrackingVertexCollection > &)
edm::EDGetTokenT< reco::BeamSpot > RecBeamSpotToken_
constexpr bool isNotFinite(T x)
Definition: isFinite.h:9
const bool trkTPSelLV(const TrackingParticle &)
const bool trkRecSel(const reco::TrackBase &)
bool select(const reco::Vertex &, int level=0)
void matchReco2Sim(std::vector< recoPrimaryVertex > &, std::vector< simPrimaryVertex > &, const edm::ValueMap< float > &, const edm::ValueMap< float > &, const edm::Handle< reco::BeamSpot > &)
void observablesFromJets(const std::vector< reco::Track > &, const std::vector< double > &, const std::vector< int > &, const std::string &, unsigned int &, double &, double &, double &, double &)
edm::EDGetTokenT< edm::ValueMap< float > > probKToken_
T const * product() const
Definition: Handle.h:70
TkSoAView< TrackerTraits > HitToTuple< TrackerTraits > const *__restrict__ int32_t int32_t int iev
edm::EDGetTokenT< edm::ValueMap< float > > sigmat0PidToken_
static constexpr double minThrSumWos_
MonitorElement * meFakeTrackRecLVRelSumWosvsSumWos_
MonitorElement * meJetsRecLVPURelSumPt2vsSumPt2_
static constexpr int nJets
edm::EDGetTokenT< edm::ValueMap< float > > timeToken_
std::vector< Primary4DVertexValidation::recoPrimaryVertex > getRecoPVs(const edm::Handle< edm::View< reco::Vertex >> &)
static constexpr double trackMinEtlEta_
#define LogTrace(id)
MonitorElement * meTrackResMassProtons_[3]
MonitorElement * meTrackResMassTrueProtons_[3]
void Fill(long long x)
double timeFromTrueMass(double, double, double, double)
int iEvent
Definition: GenABIO.cc:224
MonitorElement * meSecTrackRecLVRelSumWosvsSumWos_
T sqrt(T t)
Definition: SSEVec.h:23
edm::EDGetTokenT< edm::ValueMap< float > > probPiToken_
static constexpr double minThrMetPt_
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
MonitorElement * mePUTrackRecLVRelSumPt2vsSumPt2_
edm::EDGetTokenT< edm::ValueMap< float > > probPToken_
MonitorElement * meJetsRecLVFakeRelSumPt2vsSumPt2_
edm::EDGetTokenT< edm::ValueMap< float > > momentumToken_
MonitorElement * meTrackResMassTruePions_[3]
edm::EDGetTokenT< edm::ValueMap< float > > tofKToken_
const std::vector< double > lineDensityPar_
HepPDT::ParticleData ParticleData
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:130
const reco::RecoToSimCollection * r2s_
edm::EDGetTokenT< std::vector< PileupSummaryInfo > > vecPileupSummaryInfoToken_
int nt
Definition: AMPTWrapper.h:42
static constexpr double deltaZcut_
edm::EDGetTokenT< edm::ValueMap< float > > t0PidToken_
static constexpr unsigned int NOT_MATCHED
edm::EDGetTokenT< reco::SimToRecoCollection > simToRecoAssociationToken_
edm::EDGetTokenT< edm::ValueMap< int > > trackAssocToken_
static constexpr double minThrSumPz_
void isParticle(const reco::TrackBaseRef &, const edm::ValueMap< float > &, const edm::ValueMap< float > &, const edm::ValueMap< float > &, const edm::ValueMap< float > &, const edm::ValueMap< float > &, unsigned int &, bool &, bool &, bool &, bool &)
static constexpr double minThrSumPt2_
bool isValid() const
Definition: HandleBase.h:70
void printSimVtxRecoVtxInfo(const struct Primary4DVertexValidation::simPrimaryVertex &, const struct Primary4DVertexValidation::recoPrimaryVertex &)
std::pair< const edm::Ref< std::vector< TrackingParticle > > *, int > getMatchedTP(const reco::TrackBaseRef &, const TrackingVertexRef &)
fixed size matrix
const reco::SimToRecoCollection * s2r_
edm::EDGetTokenT< edm::ValueMap< float > > tofPiToken_
edm::EDGetTokenT< reco::RecoToSimCollection > recoToSimAssociationToken_
edm::ESGetToken< HepPDT::ParticleDataTable, edm::DefaultRecord > pdtToken_
Log< level::Warning, false > LogWarning
edm::EDGetTokenT< edm::ValueMap< float > > t0SafePidToken_
edm::EDGetTokenT< edm::ValueMap< float > > tmtdToken_
MonitorElement * mePUTrackRecLVRelSumWosvsSumWos_
static constexpr double minThrSumPt_
edm::EDGetTokenT< edm::ValueMap< float > > tofPToken_
static constexpr double minThrSumWnt_
void getWosWnt(const reco::Vertex &, const reco::TrackBaseRef &, const edm::ValueMap< float > &, const edm::ValueMap< float > &, const edm::Handle< reco::BeamSpot > &, double &, double &)
edm::EDGetTokenT< edm::ValueMap< float > > trackMVAQualToken_
void printMatchedRecoTrackInfo(const reco::Vertex &, const reco::TrackBaseRef &, const TrackingParticleRef &, const unsigned int &)
edm::EDGetTokenT< edm::ValueMap< float > > pathLengthToken_

◆ bookHistograms()

void Primary4DVertexValidation::bookHistograms ( DQMStore::IBooker i,
edm::Run const &  iRun,
edm::EventSetup const &  iSetup 
)
overridevirtual

Implements DQMEDAnalyzer.

Definition at line 560 of file Primary4DVertexValidation.cc.

References dqm::implementation::IBooker::book1D(), dqm::implementation::IBooker::bookProfile(), folder_, meBarrelNoPIDtype_, meBarrelPIDp_, meBarrelTrueKAsK_, meBarrelTrueKAsP_, meBarrelTrueKAsPi_, meBarrelTrueKNoPID_, meBarrelTruePAsK_, meBarrelTruePAsP_, meBarrelTruePAsPi_, meBarrelTruePiAsK_, meBarrelTruePiAsP_, meBarrelTruePiAsPi_, meBarrelTruePiNoPID_, meBarrelTruePNoPID_, meDeltaTfakefake_, meDeltaTfakereal_, meDeltaTrealreal_, meDeltaZfakefake_, meDeltaZfakereal_, meDeltaZrealreal_, meEndcapNoPIDtype_, meEndcapPIDp_, meEndcapTrueKAsK_, meEndcapTrueKAsP_, meEndcapTrueKAsPi_, meEndcapTrueKNoPID_, meEndcapTruePAsK_, meEndcapTruePAsP_, meEndcapTruePAsPi_, meEndcapTruePiAsK_, meEndcapTruePiAsP_, meEndcapTruePiAsPi_, meEndcapTruePiNoPID_, meEndcapTruePNoPID_, meFakeTrackRecLVRelMult_, meFakeTrackRecLVRelMultvsMult_, meFakeTrackRecLVRelSumWos_, meFakeTrackRecLVRelSumWosvsSumWos_, meFakeTrackRelMult_, meFakeTrackRelMultvsMult_, meFakeTrackRelSumWos_, meFakeTrackRelSumWosvsSumWos_, meJetsFakeRelSumPt2_, meJetsFakeRelSumPt2vsSumPt2_, meJetsPUHt_, meJetsPUMetPt_, meJetsPUMult_, meJetsPURelHt_, meJetsPURelHtvsHt_, meJetsPURelMetPt_, meJetsPURelMetPtvsMetPt_, meJetsPURelMult_, meJetsPURelMultvsMult_, meJetsPURelSumPt2_, meJetsPURelSumPt2vsSumPt2_, meJetsPURelSumPz_, meJetsPURelSumPzvsSumPz_, meJetsPUSumPt2_, meJetsPUSumPz_, meJetsRecLVFakeRelSumPt2_, meJetsRecLVFakeRelSumPt2vsSumPt2_, meJetsRecLVPUHt_, meJetsRecLVPUMetPt_, meJetsRecLVPUMult_, meJetsRecLVPURelHt_, meJetsRecLVPURelHtvsHt_, meJetsRecLVPURelMetPt_, meJetsRecLVPURelMetPtvsMetPt_, meJetsRecLVPURelMult_, meJetsRecLVPURelMultvsMult_, meJetsRecLVPURelSumPt2_, meJetsRecLVPURelSumPt2vsSumPt2_, meJetsRecLVPURelSumPz_, meJetsRecLVPURelSumPzvsSumPz_, meJetsRecLVPUSumPt2_, meJetsRecLVPUSumPz_, meMatchQual_, mePUTrackMult_, mePUTrackRecLVMult_, mePUTrackRecLVRelMult_, mePUTrackRecLVRelMultvsMult_, mePUTrackRecLVRelSumPt2_, mePUTrackRecLVRelSumPt2vsSumPt2_, mePUTrackRecLVRelSumPt_, mePUTrackRecLVRelSumPtvsSumPt_, mePUTrackRecLVRelSumWnt_, mePUTrackRecLVRelSumWntvsSumWnt_, mePUTrackRecLVRelSumWos_, mePUTrackRecLVRelSumWosvsSumWos_, mePUTrackRecLVSumPt2_, mePUTrackRecLVSumPt_, mePUTrackRecLVSumWnt_, mePUTrackRecLVSumWos_, mePUTrackRecLVWnt_, mePUTrackRelMult_, mePUTrackRelMultvsMult_, mePUTrackRelSumPt2_, mePUTrackRelSumPt2vsSumPt2_, mePUTrackRelSumPt_, mePUTrackRelSumPtvsSumPt_, mePUTrackRelSumWnt_, mePUTrackRelSumWntvsSumWnt_, mePUTrackRelSumWos_, mePUTrackRelSumWosvsSumWos_, mePUTrackSumPt2_, mePUTrackSumPt_, mePUTrackSumWnt_, mePUTrackSumWos_, mePUTrackWnt_, mePUvsFakeV_, mePUvsOtherFakeV_, mePUvsRealV_, mePUvsSplitV_, meRecoPosInRecoOrigCollection_, meRecoPosInSimCollection_, meRecoPVPosSignal_, meRecoPVPosSignalNotHighestPt_, meRecoVtxVsLineDensity_, meRecPVT_, meRecPVZ_, meRecVerNumber_, meSecTrackRecLVRelSumWos_, meSecTrackRecLVRelSumWosvsSumWos_, meSecTrackRecLVSumWos_, meSecTrackRelSumWos_, meSecTrackRelSumWosvsSumWos_, meSecTrackSumWos_, meSimPosInSimOrigCollection_, meSimPVZ_, meTimePull_, meTimeRes_, meTimeSignalPull_, meTimeSignalRes_, meTrack3DposRes_, meTrackEffEtaTot_, meTrackEffPtTot_, meTrackMatchedTPEffEtaMtd_, meTrackMatchedTPEffEtaTot_, meTrackMatchedTPEffPtMtd_, meTrackMatchedTPEffPtTot_, meTrackMatchedTPPullTot_, meTrackMatchedTPResTot_, meTrackMatchedTPZposResTot_, meTrackPull_, meTrackPullHighP_, meTrackPullHighPTot_, meTrackPullLowP_, meTrackPullLowPTot_, meTrackPullTot_, meTrackRes_, meTrackResHighP_, meTrackResHighPTot_, meTrackResLowP_, meTrackResLowPTot_, meTrackResMass_, meTrackResMassPions_, meTrackResMassProtons_, meTrackResMassTrue_, meTrackResMassTruePions_, meTrackResMassTrueProtons_, meTrackResTot_, meTrackZposRes_, meTrackZposResTot_, optionalPlots_, and dqm::implementation::NavigatorBase::setCurrentFolder().

562  {
563  ibook.setCurrentFolder(folder_);
564  // --- histograms booking
565  meTrackEffPtTot_ = ibook.book1D("EffPtTot", "Pt of tracks associated to LV; track pt [GeV] ", 110, 0., 11.);
566  meTrackEffEtaTot_ = ibook.book1D("EffEtaTot", "Eta of tracks associated to LV; track eta ", 66, 0., 3.3);
568  ibook.book1D("MatchedTPEffPtTot", "Pt of tracks associated to LV matched to TP; track pt [GeV] ", 110, 0., 11.);
569  meTrackMatchedTPEffPtMtd_ = ibook.book1D(
570  "MatchedTPEffPtMtd", "Pt of tracks associated to LV matched to TP with time; track pt [GeV] ", 110, 0., 11.);
572  ibook.book1D("MatchedTPEffEtaTot", "Eta of tracks associated to LV matched to TP; track eta ", 66, 0., 3.3);
573  meTrackMatchedTPEffEtaMtd_ = ibook.book1D(
574  "MatchedTPEffEtaMtd", "Eta of tracks associated to LV matched to TP with time; track eta ", 66, 0., 3.3);
576  ibook.book1D("MatchedTPTrackRes",
577  "t_{rec} - t_{sim} for tracks associated to LV matched to TP; t_{rec} - t_{sim} [ns] ",
578  120,
579  -0.15,
580  0.15);
581  meTrackResTot_ = ibook.book1D("TrackRes", "t_{rec} - t_{sim} for tracks; t_{rec} - t_{sim} [ns] ", 120, -0.15, 0.15);
582  meTrackRes_[0] = ibook.book1D(
583  "TrackRes-LowMVA", "t_{rec} - t_{sim} for tracks with MVA < 0.5; t_{rec} - t_{sim} [ns] ", 100, -1., 1.);
584  meTrackRes_[1] = ibook.book1D(
585  "TrackRes-MediumMVA", "t_{rec} - t_{sim} for tracks with 0.5 < MVA < 0.8; t_{rec} - t_{sim} [ns] ", 100, -1., 1.);
586  meTrackRes_[2] = ibook.book1D(
587  "TrackRes-HighMVA", "t_{rec} - t_{sim} for tracks with MVA > 0.8; t_{rec} - t_{sim} [ns] ", 100, -1., 1.);
588  if (optionalPlots_) {
589  meTrackResMass_[0] = ibook.book1D(
590  "TrackResMass-LowMVA", "t_{rec} - t_{est} for tracks with MVA < 0.5; t_{rec} - t_{est} [ns] ", 100, -1., 1.);
591  meTrackResMass_[1] = ibook.book1D("TrackResMass-MediumMVA",
592  "t_{rec} - t_{est} for tracks with 0.5 < MVA < 0.8; t_{rec} - t_{est} [ns] ",
593  100,
594  -1.,
595  1.);
596  meTrackResMass_[2] = ibook.book1D(
597  "TrackResMass-HighMVA", "t_{rec} - t_{est} for tracks with MVA > 0.8; t_{rec} - t_{est} [ns] ", 100, -1., 1.);
598  meTrackResMassTrue_[0] = ibook.book1D(
599  "TrackResMassTrue-LowMVA", "t_{est} - t_{sim} for tracks with MVA < 0.5; t_{est} - t_{sim} [ns] ", 100, -1., 1.);
600  meTrackResMassTrue_[1] = ibook.book1D("TrackResMassTrue-MediumMVA",
601  "t_{est} - t_{sim} for tracks with 0.5 < MVA < 0.8; t_{est} - t_{sim} [ns] ",
602  100,
603  -1.,
604  1.);
605  meTrackResMassTrue_[2] = ibook.book1D("TrackResMassTrue-HighMVA",
606  "t_{est} - t_{sim} for tracks with MVA > 0.8; t_{est} - t_{sim} [ns] ",
607  100,
608  -1.,
609  1.);
610  }
611  meTrackMatchedTPPullTot_ = ibook.book1D(
612  "MatchedTPTrackPull", "Pull for tracks associated to LV matched to TP; (t_{rec}-t_{sim})/#sigma_{t}", 50, -5., 5.);
613  meTrackPullTot_ = ibook.book1D("TrackPull", "Pull for tracks; (t_{rec}-t_{sim})/#sigma_{t}", 100, -10., 10.);
614  meTrackPull_[0] =
615  ibook.book1D("TrackPull-LowMVA", "Pull for tracks with MVA < 0.5; (t_{rec}-t_{sim})/#sigma_{t}", 100, -10., 10.);
616  meTrackPull_[1] = ibook.book1D(
617  "TrackPull-MediumMVA", "Pull for tracks with 0.5 < MVA < 0.8; (t_{rec}-t_{sim})/#sigma_{t}", 100, -10., 10.);
618  meTrackPull_[2] =
619  ibook.book1D("TrackPull-HighMVA", "Pull for tracks with MVA > 0.8; (t_{rec}-t_{sim})/#sigma_{t}", 100, -10., 10.);
621  ibook.book1D("MatchedTPTrackZposResTot",
622  "Z_{PCA} - Z_{sim} for tracks associated to LV matched to TP;Z_{PCA} - Z_{sim} [cm] ",
623  50,
624  -0.1,
625  0.1);
627  ibook.book1D("TrackZposResTot", "Z_{PCA} - Z_{sim} for tracks;Z_{PCA} - Z_{sim} [cm] ", 50, -0.5, 0.5);
628  meTrackZposRes_[0] = ibook.book1D(
629  "TrackZposRes-LowMVA", "Z_{PCA} - Z_{sim} for tracks with MVA < 0.5;Z_{PCA} - Z_{sim} [cm] ", 50, -0.5, 0.5);
630  meTrackZposRes_[1] = ibook.book1D("TrackZposRes-MediumMVA",
631  "Z_{PCA} - Z_{sim} for tracks with 0.5 < MVA < 0.8 ;Z_{PCA} - Z_{sim} [cm] ",
632  50,
633  -0.5,
634  0.5);
635  meTrackZposRes_[2] = ibook.book1D(
636  "TrackZposRes-HighMVA", "Z_{PCA} - Z_{sim} for tracks with MVA > 0.8 ;Z_{PCA} - Z_{sim} [cm] ", 50, -0.5, 0.5);
637  meTrack3DposRes_[0] =
638  ibook.book1D("Track3DposRes-LowMVA",
639  "3dPos_{PCA} - 3dPos_{sim} for tracks with MVA < 0.5 ;3dPos_{PCA} - 3dPos_{sim} [cm] ",
640  50,
641  -0.5,
642  0.5);
643  meTrack3DposRes_[1] =
644  ibook.book1D("Track3DposRes-MediumMVA",
645  "3dPos_{PCA} - 3dPos_{sim} for tracks with 0.5 < MVA < 0.8 ;3dPos_{PCA} - 3dPos_{sim} [cm] ",
646  50,
647  -0.5,
648  0.5);
649  meTrack3DposRes_[2] =
650  ibook.book1D("Track3DposRes-HighMVA",
651  "3dPos_{PCA} - 3dPos_{sim} for tracks with MVA > 0.8;3dPos_{PCA} - 3dPos_{sim} [cm] ",
652  50,
653  -0.5,
654  0.5);
655  meTimeRes_ = ibook.book1D("TimeRes", "t_{rec} - t_{sim} ;t_{rec} - t_{sim} [ns] ", 40, -0.2, 0.2);
656  meTimePull_ = ibook.book1D("TimePull", "Pull; t_{rec} - t_{sim}/#sigma_{t rec}", 100, -10., 10.);
658  ibook.book1D("TimeSignalRes", "t_{rec} - t_{sim} for signal ;t_{rec} - t_{sim} [ns] ", 40, -0.2, 0.2);
660  ibook.book1D("TimeSignalPull", "Pull for signal; t_{rec} - t_{sim}/#sigma_{t rec}", 100, -10., 10.);
661  mePUvsRealV_ =
662  ibook.bookProfile("PUvsReal", "#PU vertices vs #real matched vertices;#PU;#real ", 100, 0, 300, 100, 0, 200);
663  mePUvsFakeV_ =
664  ibook.bookProfile("PUvsFake", "#PU vertices vs #fake matched vertices;#PU;#fake ", 100, 0, 300, 100, 0, 20);
665  mePUvsOtherFakeV_ = ibook.bookProfile(
666  "PUvsOtherFake", "#PU vertices vs #other fake matched vertices;#PU;#other fake ", 100, 0, 300, 100, 0, 20);
667  mePUvsSplitV_ =
668  ibook.bookProfile("PUvsSplit", "#PU vertices vs #split matched vertices;#PU;#split ", 100, 0, 300, 100, 0, 20);
669  meMatchQual_ = ibook.book1D("MatchQuality", "RECO-SIM vertex match quality; ", 8, 0, 8.);
670  meDeltaZrealreal_ = ibook.book1D("DeltaZrealreal", "#Delta Z real-real; |#Delta Z (r-r)| [cm]", 100, 0, 0.5);
671  meDeltaZfakefake_ = ibook.book1D("DeltaZfakefake", "#Delta Z fake-fake; |#Delta Z (f-f)| [cm]", 100, 0, 0.5);
672  meDeltaZfakereal_ = ibook.book1D("DeltaZfakereal", "#Delta Z fake-real; |#Delta Z (f-r)| [cm]", 100, 0, 0.5);
673  meDeltaTrealreal_ = ibook.book1D("DeltaTrealreal", "#Delta T real-real; |#Delta T (r-r)| [sigma]", 60, 0., 30.);
674  meDeltaTfakefake_ = ibook.book1D("DeltaTfakefake", "#Delta T fake-fake; |#Delta T (f-f)| [sigma]", 60, 0., 30.);
675  meDeltaTfakereal_ = ibook.book1D("DeltaTfakereal", "#Delta T fake-real; |#Delta T (f-r)| [sigma]", 60, 0., 30.);
676  if (optionalPlots_) {
677  meRecoPosInSimCollection_ = ibook.book1D(
678  "RecoPosInSimCollection", "Sim signal vertex index associated to Reco signal vertex; Sim PV index", 200, 0, 200);
680  ibook.book1D("RecoPosInRecoOrigCollection", "Reco signal index in OrigCollection; Reco index", 200, 0, 200);
682  ibook.book1D("SimPosInSimOrigCollection", "Sim signal index in OrigCollection; Sim index", 200, 0, 200);
683  }
685  ibook.book1D("RecoPVPosSignal", "Position in reco collection of PV associated to sim signal", 20, 0, 20);
687  ibook.book1D("RecoPVPosSignalNotHighestPt",
688  "Position in reco collection of PV associated to sim signal not highest Pt",
689  20,
690  0,
691  20);
693  ibook.book1D("RecoVtxVsLineDensity", "#Reco vertices/mm/event; line density [#vtx/mm/event]", 160, 0., 4.);
694  meRecVerNumber_ = ibook.book1D("RecVerNumber", "RECO Vertex Number: Number of vertices", 50, 0, 250);
695  meRecPVZ_ = ibook.book1D("recPVZ", "Weighted #Rec vertices/mm", 400, -20., 20.);
696  meRecPVT_ = ibook.book1D("recPVT", "#Rec vertices/10 ps", 200, -1., 1.);
697  meSimPVZ_ = ibook.book1D("simPVZ", "Weighted #Sim vertices/mm", 400, -20., 20.);
698 
699  mePUTrackRelMult_ = ibook.book1D(
700  "PUTrackRelMult", "Relative multiplicity of PU tracks for matched vertices; #PUTrks/#Trks", 50, 0., 1.);
701  meFakeTrackRelMult_ = ibook.book1D(
702  "FakeTrackRelMult", "Relative multiplicity of fake tracks for matched vertices; #fakeTrks/#Trks", 50, 0., 1.);
704  ibook.book1D("PUTrackRelSumWnt",
705  "Relative Sum of wnt of PU tracks for matched vertices; PUSumW*min(Pt, 1.)/SumW*min(Pt, 1.)",
706  50,
707  0.,
708  1.);
709  mePUTrackRelSumWos_ = ibook.book1D(
710  "PUTrackRelSumWos", "Relative Sum of wos of PU tracks for matched vertices; PUSumWos/SumWos", 50, 0., 1.);
712  ibook.book1D("SecTrackRelSumWos",
713  "Relative Sum of wos of tracks from secondary vtx for matched vertices; SecSumWos/SumWos",
714  50,
715  0.,
716  1.);
717  meFakeTrackRelSumWos_ = ibook.book1D(
718  "FakeTrackRelSumWos", "Relative Sum of wos of fake tracks for matched vertices; FakeSumWos/SumWos", 50, 0., 1.);
719  mePUTrackRelSumPt_ = ibook.book1D(
720  "PUTrackRelSumPt", "Relative Sum of Pt of PU tracks for matched vertices; PUSumPt/SumPt", 50, 0., 1.);
721  mePUTrackRelSumPt2_ = ibook.book1D(
722  "PUTrackRelSumPt2", "Relative Sum of Pt2 for PU tracks for matched vertices; PUSumPt2/SumPt2", 50, 0., 1.);
723  mePUTrackRecLVRelMult_ = ibook.book1D(
724  "PUTrackRecLVRelMult", "Relative multiplicity of PU tracks for matched LV; #PUTrks/#Trks", 50, 0., 1.);
725  meFakeTrackRecLVRelMult_ = ibook.book1D(
726  "FakeTrackRecLVRelMult", "Relative multiplicity of fake tracks for matched LV; #FakeTrks/#Trks", 50, 0., 1.);
728  ibook.book1D("PUTrackRecLVRelSumWnt",
729  "Relative Sum of Wnt of PU tracks for matched LV; PUSumW*min(Pt, 1.)/SumW*min(Pt, 1.)",
730  50,
731  0.,
732  1.);
733  mePUTrackRecLVRelSumWos_ = ibook.book1D(
734  "PUTrackRecLVRelSumWos", "Relative Sum of Wos of PU tracks for matched LV; PUSumWos/SumWos", 50, 0., 1.);
736  ibook.book1D("SecTrackRecLVRelSumWos",
737  "Relative Sum of wos of tracks from secondary vtx for matched LV; SecSumWos/SumWos",
738  50,
739  0.,
740  1.);
741  meFakeTrackRecLVRelSumWos_ = ibook.book1D(
742  "FakeTrackRecLVRelSumWos", "Relative Sum of wos of fake tracks for matched LV; FakeSumWos/SumWos", 50, 0., 1.);
744  ibook.book1D("PUTrackRecLVRelSumPt", "Relative Sum of Pt of PU tracks for matched LV; PUSumPt/SumPt", 50, 0., 1.);
745  mePUTrackRecLVRelSumPt2_ = ibook.book1D(
746  "PUTrackRecLVRelSumPt2", "Relative Sum of Pt2 of PU tracks for matched LV; PUSumPt2/SumPt2", 50, 0., 1.);
747 
748  if (optionalPlots_) {
749  mePUTrackMult_ = ibook.book1D("PUTrackMult", "Number of PU tracks for matched vertices; #PUTrks", 50, 0., 100.);
750  mePUTrackWnt_ = ibook.book1D("PUTrackWnt", "Wnt of PU tracks for matched vertices; PUTrkW*min(Pt, 1.)", 50, 0., 1.);
751  mePUTrackSumWnt_ = ibook.book1D(
752  "PUTrackSumWnt", "Sum of wnt of PU tracks for matched vertices; log10(PUSumW*min(Pt, 1.))", 50, -2., 3.);
754  ibook.book1D("PUTrackSumWos", "Sum of wos of PU tracks for matched vertices; log10(PUSumWos)", 50, -1., 7.);
755  meSecTrackSumWos_ = ibook.book1D(
756  "SecTrackSumWos", "Sum of wos of tracks from secondary vtx for matched vertices; log10(SecSumWos)", 50, -1., 7.);
758  ibook.book1D("PUTrackSumPt", "Sum of Pt of PU tracks for matched vertices; log10(PUSumPt)", 50, -2., 3.);
760  ibook.book1D("PUTrackSumPt2", "Sum of Pt2 of PU tracks for matched vertices; log10(PUSumPt2)", 50, -3., 3.);
761 
763  ibook.bookProfile("PUTrackRelMultvsMult",
764  "Relative PU multiplicity vs Number of tracks for matched vertices; #Trks; #PUTrks/#Trks",
765  50,
766  0.,
767  200.,
768  0.,
769  1.,
770  "s");
771  meFakeTrackRelMultvsMult_ = ibook.bookProfile(
772  "FakeTrackRelMultvsMult",
773  "Relative multiplicity of fake tracks vs Number of tracks for matched vertices; #Trks; #FakeTrks/#Trks",
774  50,
775  0.,
776  200.,
777  0.,
778  1.,
779  "s");
781  ibook.bookProfile("PUTrackRelSumWntvsSumWnt",
782  "Relative PU Sum of Wnt vs Sum of Wnt of tracks for matched vertices; log10(SumW*min(Pt, "
783  "1.)); PUSumW*min(Pt, 1.)/SumW*min(Pt, 1.)",
784  50,
785  0.,
786  2.5,
787  0.,
788  1.,
789  "s");
790  mePUTrackRelSumWosvsSumWos_ = ibook.bookProfile(
791  "PUTrackRelSumWosvsSumWos",
792  "Relative PU Sum of Wos vs Sum of Wos of tracks for matched vertices; log10(SumWos); PUSumWos/SumWos",
793  50,
794  2.5,
795  7.,
796  0.,
797  1.,
798  "s");
799  meSecTrackRelSumWosvsSumWos_ = ibook.bookProfile("SecTrackRelSumWosvsSumWos",
800  "Relative Sum of Wos of tracks from secondary vtx vs Sum of Wos "
801  "of tracks for matched vertices; log10(SumWos); SecSumWos/SumWos",
802  50,
803  2.,
804  7.,
805  0.,
806  1.,
807  "s");
808  meFakeTrackRelSumWosvsSumWos_ = ibook.bookProfile("FakeTrackRelSumWosvsSumWos",
809  "Relative Sum of Wos of fake tracks vs Sum of Wos of tracks for "
810  "matched vertices; log10(SumWos); FakeSumWos/SumWos",
811  50,
812  2.5,
813  7.5,
814  0.,
815  1.,
816  "s");
817  mePUTrackRelSumPtvsSumPt_ = ibook.bookProfile(
818  "PUTrackRelSumPtvsSumPt",
819  "Relative PU Sum of Pt vs Sum of Pt of tracks for matched vertices; log10(SumPt); PUSumPt/SumPt",
820  50,
821  0.,
822  3.,
823  0.,
824  1.,
825  "s");
826  mePUTrackRelSumPt2vsSumPt2_ = ibook.bookProfile(
827  "PUTrackRelSumPt2vsSumPt2",
828  "Relative PU Sum of Pt2 vs Sum of Pt2 of tracks for matched vertices; log10(SumPt2); PUSumPt2/SumPt2",
829  50,
830  0.,
831  4.,
832  0.,
833  1.,
834  "s");
835 
836  mePUTrackRecLVMult_ = ibook.book1D("PUTrackRecLVMult", "Number of PU tracks for matched LV; #PUTrks", 50, 0., 100.);
838  ibook.book1D("PUTrackRecLVWnt", "Wnt of PU tracks for matched LV; PUTrkW*min(Pt, 1.)", 50, 0., 1.);
839  mePUTrackRecLVSumWnt_ = ibook.book1D(
840  "PUTrackRecLVSumWnt", "Sum of wnt of PU tracks for matched LV; log10(PUSumW*min(Pt, 1.))", 50, -2., 3.);
842  ibook.book1D("PUTrackRecLVSumWos", "Sum of wos of PU tracks for matched LV; log10(PUSumWos)", 50, -1., 7.);
843  meSecTrackRecLVSumWos_ = ibook.book1D(
844  "SecTrackRecLVSumWos", "Sum of wos of tracks from secondary vtx for matched LV; log10(SecSumWos)", 50, -1., 7.);
846  ibook.book1D("PUTrackRecLVSumPt", "Sum of Pt of PU tracks for matched LV; log10(PUSumPt)", 50, -2., 3.);
848  ibook.book1D("PUTrackRecLVSumPt2", "Sum of Pt2 of PU tracks for matched LV; log10(PUSumPt2)", 50, -3., 3.);
849 
851  ibook.bookProfile("PUTrackRecLVRelMultvsMult",
852  "Relative PU multiplicity vs Number of tracks for matched LV; #Trks; #PUTrks/#Trks",
853  50,
854  0.,
855  200.,
856  0.,
857  1.,
858  "s");
859  meFakeTrackRecLVRelMultvsMult_ = ibook.bookProfile(
860  "FakeTrackRecLVRelMultvsMult",
861  "Relative multiplicity of fake tracks vs Number of tracks for matched LV; #Trks; #FakeTrks/#Trks",
862  50,
863  0.,
864  200.,
865  0.,
866  1.,
867  "s");
869  ibook.bookProfile("PUTrackRecLVRelSumWntvsSumWnt",
870  "Relative PU Sum of Wnt vs Sum of Wnt of tracks for matched LV; log10(SumW*min(Pt, 1.)); "
871  "PUSumW*min(Pt, 1.)/SumW*min(Pt, 1.)",
872  50,
873  1.,
874  2.3,
875  0.,
876  1.,
877  "s");
878  mePUTrackRecLVRelSumWosvsSumWos_ = ibook.bookProfile(
879  "PUTrackRecLVRelSumWosvsSumWos",
880  "Relative PU Sum of Wos vs Sum of Wos of tracks for matched vertices; log10(SumWos); PUSumWos/SumWos",
881  50,
882  5.5,
883  7.,
884  0.,
885  1.,
886  "s");
888  ibook.bookProfile("SecTrackRecLVRelSumWosvsSumWos",
889  "Relative Sum of Wos of tracks from secondary vtx vs Sum of Wos of tracks for matched "
890  "vertices; log10(SumWos); SecSumWos/SumWos",
891  50,
892  5.5,
893  7.,
894  0.,
895  1.,
896  "s");
897  meFakeTrackRecLVRelSumWosvsSumWos_ = ibook.bookProfile("FakeTrackRecLVRelSumWosvsSumWos",
898  "Relative Sum of Wos of fake tracks vs Sum of Wos of tracks "
899  "for matched vertices; log10(SumWos); FakeSumWos/SumWos",
900  50,
901  5.5,
902  7.,
903  0.,
904  1.,
905  "s");
907  ibook.bookProfile("PUTrackRecLVRelSumPtvsSumPt",
908  "Relative PU Sum of Pt vs Sum of Pt of tracks for matched LV; log10(SumPt); PUSumPt/SumPt",
909  50,
910  1.4,
911  3.,
912  0.,
913  1.,
914  "s");
916  ibook.bookProfile("PUTrackRecLVRelSumPt2vsSumPt2",
917  "Relative PU Sum of Pt2 vs Sum of tracks for matched LV; log10(SumPt2); PUSumPt2/SumPt2",
918  50,
919  2.,
920  4.,
921  0.,
922  1.,
923  "s");
924  }
925 
927  ibook.book1D("JetsPURelMult",
928  "Relative contribution of PU to jet multiplicity for matched vertices; (#Jets-#JetsNoPU)/#Jets",
929  50,
930  0.,
931  1.);
933  ibook.book1D("JetsPURelHt",
934  "Relative contribution of PU to scalar sum of Et of jets for matched vertices; (Ht-HtNoPU)/HT",
935  50,
936  0.,
937  1.);
939  ibook.book1D("JetsPURelSumPt2",
940  "Relative contribution of PU to sum of Pt2 of jets for matched vertices; (SumPt2-SumPt2NoPU)/SumPt2",
941  50,
942  0.,
943  1.);
944  meJetsFakeRelSumPt2_ = ibook.book1D(
945  "JetsFakeRelSumPt2",
946  "Relative contribution of fake tracks to sum of Pt2 of jets for matched vertices; (SumPt2-SumPt2NoFake)/SumPt2",
947  50,
948  0.,
949  1.);
951  ibook.book1D("JetsPURelMetPt",
952  "Relative contribution of PU to Missing Transverse Energy for matched vertices; (Met-MetNoPU)/Met",
953  50,
954  -1.,
955  1.);
957  ibook.book1D("JetsPURelSumPz",
958  "Relative contribution of PU to sum of Pz of jets for matched vertices; (SumPz-SumPzNoPU)/SumPz",
959  50,
960  -1.,
961  1.);
962 
964  ibook.book1D("JetsRecLVPURelMult",
965  "Relative contribution of PU to jet multiplicity for matched LV; (#Jets-#JetsNoPU)/#Jets",
966  50,
967  0.,
968  1.);
970  ibook.book1D("JetsRecLVPURelHt",
971  "Relative contribution of PU to scalar sum of Et of jets for matched LV; (Ht-HtNoPU)/HT",
972  50,
973  0.,
974  1.);
976  ibook.book1D("JetsRecLVPURelSumPt2",
977  "Relative contribution of PU to sum of Pt2 of jets for matched LV; (SumPt2-SumPt2NoPU)/SumPt2",
978  50,
979  0.,
980  1.);
981  meJetsRecLVFakeRelSumPt2_ = ibook.book1D(
982  "JetsRecLVFakeRelSumPt2",
983  "Relative contribution of fake tracks to sum of Pt2 of jets for matched LV; (SumPt2-SumPt2NoFake)/SumPt2",
984  50,
985  0.,
986  1.);
988  ibook.book1D("JetsRecLVPURelMetPt",
989  "Relative contribution of PU to Missing Transverse Energy for matched LV; (Met-MetNoPU)/Met",
990  50,
991  -1.,
992  1.);
994  ibook.book1D("JetsRecLVPURelSumPz",
995  "Relative contribution of PU to sum of Pz of jets for matched LV; (SumPz-SumPzNoPU)/SumPz",
996  50,
997  -1.,
998  1.);
999 
1000  if (optionalPlots_) {
1001  meJetsPUMult_ = ibook.book1D(
1002  "JetsPUMult", "Contribution of PU to jet multiplicity for matched vertices; #Jets-#JetsNoPU", 50, 0., 100.);
1003  meJetsPUHt_ = ibook.book1D("JetsPUHt",
1004  "Contribution of PU to scalar sum of Et of jets for matched vertices; log10(Ht-HtNoPU)",
1005  50,
1006  -2.,
1007  3.);
1008  meJetsPUSumPt2_ =
1009  ibook.book1D("JetsPUSumPt2",
1010  "Contribution of PU to sum of Pt2 of jets for matched vertices; log10(sumPt2-SumPt2NoPU)",
1011  50,
1012  -3.,
1013  3.);
1014  meJetsPUMetPt_ =
1015  ibook.book1D("JetsPUMetPt",
1016  "Contribution of PU to Missing Transverse Energy for matched vertices; log10(Met-MetNoPU)",
1017  50,
1018  -3.,
1019  2.);
1020  meJetsPUSumPz_ =
1021  ibook.book1D("JetsPUSumPz",
1022  "Contribution of PU to sum of Pz of jets for matched vertices; log10(abs(SumPz-SumPzNoPU))",
1023  50,
1024  -4.,
1025  3.);
1026 
1027  meJetsPURelMultvsMult_ = ibook.bookProfile("JetsPURelMultvsMult",
1028  "Relative contribution of PU to jet multiplicity vs number of jets for "
1029  "matched vertices; #Jets; (#Jets-#JetsNoPU)/#Jets",
1030  50,
1031  0.,
1032  120.,
1033  0.,
1034  1.,
1035  "s");
1036  meJetsPURelHtvsHt_ = ibook.bookProfile("JetsPURelHtvsHt",
1037  "Relative contribution of PU to scalar sum of Et of jets vs scalar sum of "
1038  "Et for matched vertices; log10(Ht); (Ht-HtNoPU)/HT",
1039  50,
1040  0.,
1041  3.,
1042  0.,
1043  1.,
1044  "s");
1045  meJetsPURelSumPt2vsSumPt2_ = ibook.bookProfile("JetsPURelSumPt2vsSumPt2",
1046  "Relative contribution of PU to sum of Pt2 of jets vs sum of Pt2 "
1047  "for matched vertices; log10(SumPt2); (SumPt2-SumPt2NoPU)/SumPt2",
1048  50,
1049  -1.,
1050  4.,
1051  0.,
1052  1.,
1053  "s");
1055  ibook.bookProfile("JetsFakeRelSumPt2vsSumPt2",
1056  "Relative contribution of fake tracks to sum of Pt2 of jets vs sum of Pt2 for matched "
1057  "vertices; log10(SumPt2); (SumPt2-SumPt2NoFake)/SumPt2",
1058  50,
1059  -1.,
1060  4.,
1061  0.,
1062  1.,
1063  "s");
1064  meJetsPURelMetPtvsMetPt_ = ibook.bookProfile("JetsPURelMetPtvsMetPt",
1065  "Relative contribution of PU to Missing Transverse Energy vs MET for "
1066  "matched vertices; log10(Met); (Met-MetNoPU)/Met",
1067  50,
1068  -1.,
1069  2.,
1070  -1.,
1071  1.,
1072  "s");
1073  meJetsPURelSumPzvsSumPz_ = ibook.bookProfile("JetsPURelSumPzvsSumPz",
1074  "Relative contribution of PU to sum of Pz of jets vs Sum of Pz for "
1075  "matched vertices; log10(abs SumPz); (SumPz-SumPzNoPU)/SumPz",
1076  50,
1077  -2.,
1078  3.,
1079  -1.,
1080  1.,
1081  "s");
1082 
1083  meJetsRecLVPUMult_ = ibook.book1D(
1084  "JetsRecLVPUMult", "Contribution of PU to jet multiplicity for matched LV; #Jets-#JetsNoPU", 50, 0., 100.);
1085  meJetsRecLVPUHt_ = ibook.book1D(
1086  "JetsRecLVPUHt", "Contribution of PU to scalar sum of Et of jets for matched LV; log10(Ht-HtNoPU)", 50, -2., 3.);
1088  ibook.book1D("JetsRecLVPUSumPt2",
1089  "Contribution of PU to sum of Pt2 of jets for matched LV; log10(sumPt2-SumPt2NoPU)",
1090  50,
1091  -3.,
1092  3.);
1094  ibook.book1D("JetsRecLVPUMetPt",
1095  "Contribution of PU to Missing Transverse Energy for matched LV; log10(Met-MetNoPU)",
1096  50,
1097  -3.,
1098  2.);
1100  ibook.book1D("JetsRecLVPUSumPz",
1101  "Contribution of PU to sum of Pz of jets for matched LV; log10(abs(SumPz-SumPzNoPU))",
1102  50,
1103  -4.,
1104  3.);
1105 
1106  meJetsRecLVPURelMultvsMult_ = ibook.bookProfile("JetsRecLVPURelMultvsMult",
1107  "Relative contribution of PU to jet multiplicity vs number of jets "
1108  "for matched vertices; #Jets; (#Jets-#JetsNoPU)/#Jets",
1109  50,
1110  0.,
1111  120.,
1112  0.,
1113  1.,
1114  "s");
1115  meJetsRecLVPURelHtvsHt_ = ibook.bookProfile("JetsRecLVPURelHtvsHt",
1116  "Relative contribution of PU to scalar sum of Et of jets vs scalar sum "
1117  "of Et for matched vertices; log10(Ht); (Ht-HtNoPU)/HT",
1118  50,
1119  1.5,
1120  3.,
1121  0.,
1122  1.,
1123  "s");
1125  ibook.bookProfile("JetsRecLVPURelSumPt2vsSumPt2",
1126  "Relative contribution of PU to sum of Pt2 of jets vs sum of Pt2 for matched vertices; "
1127  "log10(SumPt2); (SumPt2-SumPt2NoPU)/SumPt2",
1128  50,
1129  2.,
1130  5.,
1131  0.,
1132  1.,
1133  "s");
1135  ibook.bookProfile("JetsRecLVFakeRelSumPt2vsSumPt2",
1136  "Relative contribution of fake tracks to sum of Pt2 of jets vs sum of Pt2 for matched "
1137  "vertices; log10(SumPt2); (SumPt2-SumPt2NoFake)/SumPt2",
1138  50,
1139  2.,
1140  5.,
1141  0.,
1142  1.,
1143  "s");
1144  meJetsRecLVPURelMetPtvsMetPt_ = ibook.bookProfile("JetsRecLVPURelMetPtvsMetPt",
1145  "Relative contribution of PU to Missing Transverse Energy vs MET "
1146  "for matched vertices; log10(Met); (Met-MetNoPU)/Met",
1147  50,
1148  0.,
1149  2.5,
1150  -1.,
1151  1.,
1152  "s");
1153  meJetsRecLVPURelSumPzvsSumPz_ = ibook.bookProfile("JetsRecLVPURelSumPzvsSumPz",
1154  "Relative contribution of PU to sum of Pz of jets vs Sum of Pz "
1155  "for matched vertices; log10(abs SumPz); (SumPz-SumPzNoPU)/SumPz",
1156  50,
1157  0.5,
1158  3.5,
1159  -1.,
1160  1.,
1161  "s");
1162  }
1163 
1164  // some tests
1165  meTrackResLowPTot_ = ibook.book1D(
1166  "TrackResLowP", "t_{rec} - t_{sim} for tracks with p < 2 GeV; t_{rec} - t_{sim} [ns] ", 70, -0.15, 0.15);
1167  meTrackResLowP_[0] =
1168  ibook.book1D("TrackResLowP-LowMVA",
1169  "t_{rec} - t_{sim} for tracks with MVA < 0.5 and p < 2 GeV; t_{rec} - t_{sim} [ns] ",
1170  100,
1171  -1.,
1172  1.);
1173  meTrackResLowP_[1] =
1174  ibook.book1D("TrackResLowP-MediumMVA",
1175  "t_{rec} - t_{sim} for tracks with 0.5 < MVA < 0.8 and p < 2 GeV; t_{rec} - t_{sim} [ns] ",
1176  100,
1177  -1.,
1178  1.);
1179  meTrackResLowP_[2] =
1180  ibook.book1D("TrackResLowP-HighMVA",
1181  "t_{rec} - t_{sim} for tracks with MVA > 0.8 and p < 2 GeV; t_{rec} - t_{sim} [ns] ",
1182  100,
1183  -1.,
1184  1.);
1185  meTrackResHighPTot_ = ibook.book1D(
1186  "TrackResHighP", "t_{rec} - t_{sim} for tracks with p > 2 GeV; t_{rec} - t_{sim} [ns] ", 70, -0.15, 0.15);
1187  meTrackResHighP_[0] =
1188  ibook.book1D("TrackResHighP-LowMVA",
1189  "t_{rec} - t_{sim} for tracks with MVA < 0.5 and p > 2 GeV; t_{rec} - t_{sim} [ns] ",
1190  100,
1191  -1.,
1192  1.);
1193  meTrackResHighP_[1] =
1194  ibook.book1D("TrackResHighP-MediumMVA",
1195  "t_{rec} - t_{sim} for tracks with 0.5 < MVA < 0.8 and p > 2 GeV; t_{rec} - t_{sim} [ns] ",
1196  100,
1197  -1.,
1198  1.);
1199  meTrackResHighP_[2] =
1200  ibook.book1D("TrackResHighP-HighMVA",
1201  "t_{rec} - t_{sim} for tracks with MVA > 0.8 and p > 2 GeV; t_{rec} - t_{sim} [ns] ",
1202  100,
1203  -1.,
1204  1.);
1206  ibook.book1D("TrackPullLowP", "Pull for tracks with p < 2 GeV; (t_{rec}-t_{sim})/#sigma_{t}", 100, -10., 10.);
1207  meTrackPullLowP_[0] = ibook.book1D("TrackPullLowP-LowMVA",
1208  "Pull for tracks with MVA < 0.5 and p < 2 GeV; (t_{rec}-t_{sim})/#sigma_{t}",
1209  100,
1210  -10.,
1211  10.);
1212  meTrackPullLowP_[1] = ibook.book1D("TrackPullLowP-MediumMVA",
1213  "Pull for tracks with 0.5 < MVA < 0.8 and p < 2 GeV; (t_{rec}-t_{sim})/#sigma_{t}",
1214  100,
1215  -10.,
1216  10.);
1217  meTrackPullLowP_[2] = ibook.book1D("TrackPullLowP-HighMVA",
1218  "Pull for tracks with MVA > 0.8 and p < 2 GeV; (t_{rec}-t_{sim})/#sigma_{t}",
1219  100,
1220  -10.,
1221  10.);
1223  ibook.book1D("TrackPullHighP", "Pull for tracks with p > 2 GeV; (t_{rec}-t_{sim})/#sigma_{t}", 100, -10., 10.);
1224  meTrackPullHighP_[0] = ibook.book1D("TrackPullHighP-LowMVA",
1225  "Pull for tracks with MVA < 0.5 and p > 2 GeV; (t_{rec}-t_{sim})/#sigma_{t}",
1226  100,
1227  -10.,
1228  10.);
1229  meTrackPullHighP_[1] =
1230  ibook.book1D("TrackPullHighP-MediumMVA",
1231  "Pull for tracks with 0.5 < MVA < 0.8 and p > 2 GeV; (t_{rec}-t_{sim})/#sigma_{t}",
1232  100,
1233  -10.,
1234  10.);
1235  meTrackPullHighP_[2] = ibook.book1D("TrackPullHighP-HighMVA",
1236  "Pull for tracks with MVA > 0.8 and p > 2 GeV; (t_{rec}-t_{sim})/#sigma_{t}",
1237  100,
1238  -10.,
1239  10.);
1240  if (optionalPlots_) {
1242  ibook.book1D("TrackResMass-Protons-LowMVA",
1243  "t_{rec} - t_{est} for proton tracks with MVA < 0.5; t_{rec} - t_{est} [ns] ",
1244  100,
1245  -1.,
1246  1.);
1248  ibook.book1D("TrackResMass-Protons-MediumMVA",
1249  "t_{rec} - t_{est} for proton tracks with 0.5 < MVA < 0.8; t_{rec} - t_{est} [ns] ",
1250  100,
1251  -1.,
1252  1.);
1254  ibook.book1D("TrackResMass-Protons-HighMVA",
1255  "t_{rec} - t_{est} for proton tracks with MVA > 0.8; t_{rec} - t_{est} [ns] ",
1256  100,
1257  -1.,
1258  1.);
1260  ibook.book1D("TrackResMassTrue-Protons-LowMVA",
1261  "t_{est} - t_{sim} for proton tracks with MVA < 0.5; t_{est} - t_{sim} [ns] ",
1262  100,
1263  -1.,
1264  1.);
1266  ibook.book1D("TrackResMassTrue-Protons-MediumMVA",
1267  "t_{est} - t_{sim} for proton tracks with 0.5 < MVA < 0.8; t_{est} - t_{sim} [ns] ",
1268  100,
1269  -1.,
1270  1.);
1272  ibook.book1D("TrackResMassTrue-Protons-HighMVA",
1273  "t_{est} - t_{sim} for proton tracks with MVA > 0.8; t_{est} - t_{sim} [ns] ",
1274  100,
1275  -1.,
1276  1.);
1277 
1278  meTrackResMassPions_[0] = ibook.book1D("TrackResMass-Pions-LowMVA",
1279  "t_{rec} - t_{est} for pion tracks with MVA < 0.5; t_{rec} - t_{est} [ns] ",
1280  100,
1281  -1.,
1282  1.);
1284  ibook.book1D("TrackResMass-Pions-MediumMVA",
1285  "t_{rec} - t_{est} for pion tracks with 0.5 < MVA < 0.8; t_{rec} - t_{est} [ns] ",
1286  100,
1287  -1.,
1288  1.);
1289  meTrackResMassPions_[2] = ibook.book1D("TrackResMass-Pions-HighMVA",
1290  "t_{rec} - t_{est} for pion tracks with MVA > 0.8; t_{rec} - t_{est} [ns] ",
1291  100,
1292  -1.,
1293  1.);
1295  ibook.book1D("TrackResMassTrue-Pions-LowMVA",
1296  "t_{est} - t_{sim} for pion tracks with MVA < 0.5; t_{est} - t_{sim} [ns] ",
1297  100,
1298  -1.,
1299  1.);
1301  ibook.book1D("TrackResMassTrue-Pions-MediumMVA",
1302  "t_{est} - t_{sim} for pion tracks with 0.5 < MVA < 0.8; t_{est} - t_{sim} [ns] ",
1303  100,
1304  -1.,
1305  1.);
1307  ibook.book1D("TrackResMassTrue-Pions-HighMVA",
1308  "t_{est} - t_{sim} for pion tracks with MVA > 0.8; t_{est} - t_{sim} [ns] ",
1309  100,
1310  -1.,
1311  1.);
1312  }
1313 
1314  meBarrelPIDp_ = ibook.book1D("BarrelPIDp", "PID track MTD momentum spectrum, |eta| < 1.5;p [GeV]", 25, 0., 10.);
1315  meEndcapPIDp_ = ibook.book1D("EndcapPIDp", "PID track with MTD momentum spectrum, |eta| > 1.6;p [GeV]", 25, 0., 10.);
1316 
1317  meBarrelNoPIDtype_ = ibook.book1D("BarrelNoPIDtype", "Barrel PID failure category", 4, 0., 4.);
1318  meEndcapNoPIDtype_ = ibook.book1D("EndcapNoPIDtype", "Endcap PID failure category", 4, 0., 4.);
1319 
1321  ibook.book1D("BarrelTruePiNoPID", "True pi NoPID momentum spectrum, |eta| < 1.5;p [GeV]", 25, 0., 10.);
1323  ibook.book1D("BarrelTrueKNoPID", "True k NoPID momentum spectrum, |eta| < 1.5;p [GeV]", 25, 0., 10.);
1325  ibook.book1D("BarrelTruePNoPID", "True p NoPID momentum spectrum, |eta| < 1.5;p [GeV]", 25, 0., 10.);
1327  ibook.book1D("EndcapTruePiNoPID", "True pi NoPID momentum spectrum, |eta| > 1.6;p [GeV]", 25, 0., 10.);
1329  ibook.book1D("EndcapTrueKNoPID", "True k NoPID momentum spectrum, |eta| > 1.6;p [GeV]", 25, 0., 10.);
1331  ibook.book1D("EndcapTruePNoPID", "True p NoPID momentum spectrum, |eta| > 1.6;p [GeV]", 25, 0., 10.);
1332 
1334  ibook.book1D("BarrelTruePiAsPi", "True pi as pi momentum spectrum, |eta| < 1.5;p [GeV]", 25, 0., 10.);
1336  ibook.book1D("BarrelTruePiAsK", "True pi as k momentum spectrum, |eta| < 1.5;p [GeV]", 25, 0., 10.);
1338  ibook.book1D("BarrelTruePiAsP", "True pi as p momentum spectrum, |eta| < 1.5;p [GeV]", 25, 0., 10.);
1340  ibook.book1D("EndcapTruePiAsPi", "True pi as pi momentum spectrum, |eta| > 1.6;p [GeV]", 25, 0., 10.);
1342  ibook.book1D("EndcapTruePiAsK", "True pi as k momentum spectrum, |eta| > 1.6;p [GeV]", 25, 0., 10.);
1344  ibook.book1D("EndcapTruePiAsP", "True pi as p momentum spectrum, |eta| > 1.6;p [GeV]", 25, 0., 10.);
1345 
1347  ibook.book1D("BarrelTrueKAsPi", "True k as pi momentum spectrum, |eta| < 1.5;p [GeV]", 25, 0., 10.);
1348  meBarrelTrueKAsK_ = ibook.book1D("BarrelTrueKAsK", "True k as k momentum spectrum, |eta| < 1.5;p [GeV]", 25, 0., 10.);
1349  meBarrelTrueKAsP_ = ibook.book1D("BarrelTrueKAsP", "True k as p momentum spectrum, |eta| < 1.5;p [GeV]", 25, 0., 10.);
1351  ibook.book1D("EndcapTrueKAsPi", "True k as pi momentum spectrum, |eta| > 1.6;p [GeV]", 25, 0., 10.);
1352  meEndcapTrueKAsK_ = ibook.book1D("EndcapTrueKAsK", "True k as k momentum spectrum, |eta| > 1.6;p [GeV]", 25, 0., 10.);
1353  meEndcapTrueKAsP_ = ibook.book1D("EndcapTrueKAsP", "True k as p momentum spectrum, |eta| > 1.6;p [GeV]", 25, 0., 10.);
1354 
1356  ibook.book1D("BarrelTruePAsPi", "True p as pi momentum spectrum, |eta| < 1.5;p [GeV]", 25, 0., 10.);
1357  meBarrelTruePAsK_ = ibook.book1D("BarrelTruePAsK", "True p as k momentum spectrum, |eta| < 1.5;p [GeV]", 25, 0., 10.);
1358  meBarrelTruePAsP_ = ibook.book1D("BarrelTruePAsP", "True p as p momentum spectrum, |eta| < 1.5;p [GeV]", 25, 0., 10.);
1360  ibook.book1D("EndcapTruePAsPi", "True p as pi momentum spectrum, |eta| > 1.6;p [GeV]", 25, 0., 10.);
1361  meEndcapTruePAsK_ = ibook.book1D("EndcapTruePAsK", "True p as k momentum spectrum, |eta| > 1.6;p [GeV]", 25, 0., 10.);
1362  meEndcapTruePAsP_ = ibook.book1D("EndcapTruePAsP", "True p as p momentum spectrum, |eta| > 1.6;p [GeV]", 25, 0., 10.);
1363 }
MonitorElement * mePUTrackRecLVRelSumWntvsSumWnt_
MonitorElement * meFakeTrackRecLVRelSumWosvsSumWos_
MonitorElement * meJetsRecLVPURelSumPt2vsSumPt2_
MonitorElement * meTrackResMassProtons_[3]
MonitorElement * meTrackResMassTrueProtons_[3]
MonitorElement * meSecTrackRecLVRelSumWosvsSumWos_
MonitorElement * mePUTrackRecLVRelSumPt2vsSumPt2_
MonitorElement * meJetsRecLVFakeRelSumPt2vsSumPt2_
MonitorElement * meTrackResMassTruePions_[3]
MonitorElement * mePUTrackRecLVRelSumWosvsSumWos_

◆ fillDescriptions()

void Primary4DVertexValidation::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 2729 of file Primary4DVertexValidation.cc.

References edm::ConfigurationDescriptions::add(), submitPVResolutionJobs::desc, ProducerED_cfi::InputTag, and AlCaHLTBitMon_QueryRunRegistry::string.

2729  {
2731 
2732  desc.add<std::string>("folder", "MTD/Vertices");
2733  desc.add<edm::InputTag>("TPtoRecoTrackAssoc", edm::InputTag("trackingParticleRecoTrackAsssociation"));
2734  desc.add<edm::InputTag>("mtdTracks", edm::InputTag("trackExtenderWithMTD"));
2735  desc.add<edm::InputTag>("SimTag", edm::InputTag("mix", "MergedTrackTruth"));
2736  desc.add<edm::InputTag>("offlineBS", edm::InputTag("offlineBeamSpot"));
2737  desc.add<edm::InputTag>("offline4DPV", edm::InputTag("offlinePrimaryVertices4D"));
2738  desc.add<edm::InputTag>("trackAssocSrc", edm::InputTag("trackExtenderWithMTD:generalTrackassoc"))
2739  ->setComment("Association between General and MTD Extended tracks");
2740  desc.add<edm::InputTag>("pathLengthSrc", edm::InputTag("trackExtenderWithMTD:generalTrackPathLength"));
2741  desc.add<edm::InputTag>("momentumSrc", edm::InputTag("trackExtenderWithMTD:generalTrackp"));
2742  desc.add<edm::InputTag>("tmtd", edm::InputTag("trackExtenderWithMTD:generalTracktmtd"));
2743  desc.add<edm::InputTag>("timeSrc", edm::InputTag("trackExtenderWithMTD:generalTracktmtd"));
2744  desc.add<edm::InputTag>("sigmaSrc", edm::InputTag("trackExtenderWithMTD:generalTracksigmatmtd"));
2745  desc.add<edm::InputTag>("t0PID", edm::InputTag("tofPID:t0"));
2746  desc.add<edm::InputTag>("sigmat0PID", edm::InputTag("tofPID:sigmat0"));
2747  desc.add<edm::InputTag>("t0SafePID", edm::InputTag("tofPID:t0safe"));
2748  desc.add<edm::InputTag>("sigmat0SafePID", edm::InputTag("tofPID:sigmat0safe"));
2749  desc.add<edm::InputTag>("trackMVAQual", edm::InputTag("mtdTrackQualityMVA:mtdQualMVA"));
2750  desc.add<edm::InputTag>("tofPi", edm::InputTag("trackExtenderWithMTD:generalTrackTofPi"));
2751  desc.add<edm::InputTag>("tofK", edm::InputTag("trackExtenderWithMTD:generalTrackTofK"));
2752  desc.add<edm::InputTag>("tofP", edm::InputTag("trackExtenderWithMTD:generalTrackTofP"));
2753  desc.add<edm::InputTag>("probPi", edm::InputTag("tofPID:probPi"));
2754  desc.add<edm::InputTag>("probK", edm::InputTag("tofPID:probK"));
2755  desc.add<edm::InputTag>("probP", edm::InputTag("tofPID:probP"));
2756  desc.add<bool>("useOnlyChargedTracks", true);
2757  desc.addUntracked<bool>("optionalPlots", false);
2758  desc.add<bool>("use3dNoTime", false);
2759  desc.add<double>("trackweightTh", 0.5);
2760  desc.add<double>("mvaTh", 0.8);
2761  desc.add<double>("minProbHeavy", 0.75);
2762 
2763  //lineDensity parameters have been obtained by fitting the distribution of the z position of the vertices,
2764  //using a 200k single mu ptGun sample (gaussian fit)
2765  std::vector<double> lDP;
2766  lDP.push_back(1.87);
2767  lDP.push_back(0.);
2768  lDP.push_back(42.5);
2769  desc.add<std::vector<double>>("lineDensityPar", lDP);
2770  descriptions.add("vertices4DValid", desc);
2771 }
void add(std::string const &label, ParameterSetDescription const &psetDescription)

◆ getMatchedTP()

std::pair< const edm::Ref< std::vector< TrackingParticle > > *, int > Primary4DVertexValidation::getMatchedTP ( const reco::TrackBaseRef recoTrack,
const TrackingVertexRef vsim 
)
private

Definition at line 1382 of file Primary4DVertexValidation.cc.

References edm::AssociationMap< Tag >::end(), edm::AssociationMap< Tag >::find(), newFWLiteAna::found, r2s_, and cmsswSequenceInfo::tp.

Referenced by analyze(), and matchReco2Sim().

1383  {
1384  auto found = r2s_->find(recoTrack);
1385 
1386  // reco track not matched to any TP (fake tracks)
1387  if (found == r2s_->end())
1388  return std::make_pair(nullptr, -1);
1389 
1390  // matched TP equal to any TP of a given sim vertex
1391  for (const auto& tp : found->val) {
1392  if (std::find_if(vsim->daughterTracks_begin(), vsim->daughterTracks_end(), [&](const TrackingParticleRef& vtp) {
1393  return tp.first == vtp;
1394  }) != vsim->daughterTracks_end())
1395  return std::make_pair(&tp.first, 0);
1396  // matched TP not associated to any daughter track of a given sim vertex but having the same eventID (track from secondary vtx)
1397  else if (tp.first->eventId().bunchCrossing() == vsim->eventId().bunchCrossing() &&
1398  tp.first->eventId().event() == vsim->eventId().event()) {
1399  return std::make_pair(&tp.first, 1);
1400  }
1401  // matched TP not associated to any sim vertex of a given simulated event (PU track)
1402  else {
1403  return std::make_pair(&tp.first, 2);
1404  }
1405  }
1406 
1407  // reco track not matched to any TP from vertex
1408  return std::make_pair(nullptr, -1);
1409 }
const_iterator find(const key_type &k) const
find element with specified reference key
const_iterator end() const
last iterator over the map (read only)
const reco::RecoToSimCollection * r2s_

◆ getRecoPVs()

std::vector< Primary4DVertexValidation::recoPrimaryVertex > Primary4DVertexValidation::getRecoPVs ( const edm::Handle< edm::View< reco::Vertex >> &  tVC)
private

Definition at line 1673 of file Primary4DVertexValidation.cc.

References funct::abs(), HLT_2024v13_cff::distance, edm::AssociationMap< Tag >::end(), edm::AssociationMap< Tag >::find(), muonTagProbeFilters_cff::matched, SiStripPI::min, Primary4DVertexValidation::recoPrimaryVertex::nRecoTrk, Primary4DVertexValidation::recoPrimaryVertex::num_matched_sim_tracks, Primary4DVertexValidation::recoPrimaryVertex::pt, Primary4DVertexValidation::recoPrimaryVertex::ptsq, alignCSCRings::r, r2s_, mathSSE::sqrt(), pfDeepBoostedJetPreprocessParams_cfi::sv, and findQualityFiles::v.

Referenced by analyze().

1674  {
1675  std::vector<Primary4DVertexValidation::recoPrimaryVertex> recopv;
1676  int r = -1;
1677  for (auto v = tVC->begin(); v != tVC->end(); ++v) {
1678  r++;
1679  // Skip junk vertices
1680  if (std::abs(v->z()) > 1000)
1681  continue;
1682  if (v->isFake() || !v->isValid())
1683  continue;
1684 
1685  recoPrimaryVertex sv(v->position().x(), v->position().y(), v->position().z());
1686  sv.recVtx = &(*v);
1687  sv.recVtxRef = reco::VertexBaseRef(tVC, std::distance(tVC->begin(), v));
1688 
1689  sv.OriginalIndex = r;
1690  sv.ndof = v->ndof();
1691  // this is a new vertex, add it to the list of reco-vertices
1692  recopv.push_back(sv);
1693  Primary4DVertexValidation::recoPrimaryVertex* vp = &recopv.back();
1694 
1695  // Loop over daughter track(s)
1696  for (auto iTrack = v->tracks_begin(); iTrack != v->tracks_end(); ++iTrack) {
1697  auto momentum = (*(*iTrack)).innerMomentum();
1698  if (momentum.mag2() == 0)
1699  momentum = (*(*iTrack)).momentum();
1700  vp->pt += std::sqrt(momentum.perp2());
1701  vp->ptsq += (momentum.perp2());
1702  vp->nRecoTrk++;
1703 
1704  auto matched = r2s_->find(*iTrack);
1705  if (matched != r2s_->end()) {
1706  vp->num_matched_sim_tracks++;
1707  }
1708 
1709  } // End of for loop on daughters reconstructed tracks
1710  } // End of for loop on tracking vertices
1711 
1712  // In case of no reco vertices, break here
1713  if (recopv.empty())
1714  return recopv;
1715 
1716  // Now compute the closest distance in z between all reconstructed vertex
1717  // first initialize
1718  auto prev_z = recopv.back().z;
1719  for (recoPrimaryVertex& vreco : recopv) {
1720  vreco.closest_vertex_distance_z = std::abs(vreco.z - prev_z);
1721  prev_z = vreco.z;
1722  }
1723  for (std::vector<recoPrimaryVertex>::iterator vreco = recopv.begin(); vreco != recopv.end(); vreco++) {
1724  std::vector<recoPrimaryVertex>::iterator vreco2 = vreco;
1725  vreco2++;
1726  for (; vreco2 != recopv.end(); vreco2++) {
1727  double distance = std::abs(vreco->z - vreco2->z);
1728  // need both to be complete
1729  vreco->closest_vertex_distance_z = std::min(vreco->closest_vertex_distance_z, distance);
1730  vreco2->closest_vertex_distance_z = std::min(vreco2->closest_vertex_distance_z, distance);
1731  }
1732  }
1733  return recopv;
1734 }
edm::RefToBase< reco::Vertex > VertexBaseRef
persistent reference to a Vertex, using views
Definition: VertexFwd.h:21
const_iterator find(const key_type &k) const
find element with specified reference key
const_iterator end() const
last iterator over the map (read only)
T sqrt(T t)
Definition: SSEVec.h:23
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const reco::RecoToSimCollection * r2s_

◆ getSimPVs()

std::vector< Primary4DVertexValidation::simPrimaryVertex > Primary4DVertexValidation::getSimPVs ( const edm::Handle< TrackingVertexCollection > &  tVC)
private

Definition at line 1571 of file Primary4DVertexValidation.cc.

References funct::abs(), cms::cuda::assert(), Primary4DVertexValidation::simPrimaryVertex::average_match_quality, HLT_2024v13_cff::distance, MillePedeFileConverter_cfg::e, edm::AssociationMap< Tag >::end(), edm::AssociationMap< Tag >::find(), LogTrace, SiStripPI::min, Primary4DVertexValidation::simPrimaryVertex::nGenTrk, Primary4DVertexValidation::simPrimaryVertex::num_matched_reco_tracks, Primary4DVertexValidation::simPrimaryVertex::pt, Primary4DVertexValidation::simPrimaryVertex::ptot, Primary4DVertexValidation::simPrimaryVertex::ptsq, alignCSCRings::s, s2r_, pfDeepBoostedJetPreprocessParams_cfi::sv, use_only_charged_tracks_, findQualityFiles::v, and V0Monitor_cff::v0.

Referenced by analyze().

1572  {
1573  std::vector<Primary4DVertexValidation::simPrimaryVertex> simpv;
1574  int current_event = -1;
1575  int s = -1;
1576  for (TrackingVertexCollection::const_iterator v = tVC->begin(); v != tVC->end(); ++v) {
1577  // We keep only the first vertex from all the events at BX=0.
1578  if (v->eventId().bunchCrossing() != 0)
1579  continue;
1580  if (v->eventId().event() != current_event) {
1581  current_event = v->eventId().event();
1582  } else {
1583  continue;
1584  }
1585  s++;
1586  if (std::abs(v->position().z()) > 1000)
1587  continue; // skip junk vertices
1588 
1589  // could be a new vertex, check all primaries found so far to avoid multiple entries
1590  simPrimaryVertex sv(v->position().x(), v->position().y(), v->position().z(), v->position().t());
1591  sv.eventId = v->eventId();
1592  sv.sim_vertex = TrackingVertexRef(tVC, std::distance(tVC->begin(), v));
1593  sv.OriginalIndex = s;
1594 
1595  for (TrackingParticleRefVector::iterator iTrack = v->daughterTracks_begin(); iTrack != v->daughterTracks_end();
1596  ++iTrack) {
1597  assert((**iTrack).eventId().bunchCrossing() == 0);
1598  }
1599  simPrimaryVertex* vp = nullptr; // will become non-NULL if a vertex is found and then point to it
1600  for (std::vector<simPrimaryVertex>::iterator v0 = simpv.begin(); v0 != simpv.end(); v0++) {
1601  if ((sv.eventId == v0->eventId) && (std::abs(sv.x - v0->x) < 1e-5) && (std::abs(sv.y - v0->y) < 1e-5) &&
1602  (std::abs(sv.z - v0->z) < 1e-5)) {
1603  vp = &(*v0);
1604  break;
1605  }
1606  }
1607  if (!vp) {
1608  // this is a new vertex, add it to the list of sim-vertices
1609  simpv.push_back(sv);
1610  vp = &simpv.back();
1611  }
1612 
1613  // Loop over daughter track(s) as Tracking Particles
1614  for (TrackingVertex::tp_iterator iTP = v->daughterTracks_begin(); iTP != v->daughterTracks_end(); ++iTP) {
1615  auto momentum = (*(*iTP)).momentum();
1616  const reco::Track* matched_best_reco_track = nullptr;
1617  double match_quality = -1;
1618  if (use_only_charged_tracks_ && (**iTP).charge() == 0)
1619  continue;
1620  if (s2r_->find(*iTP) != s2r_->end()) {
1621  matched_best_reco_track = (*s2r_)[*iTP][0].first.get();
1622  match_quality = (*s2r_)[*iTP][0].second;
1623  }
1624 
1625  vp->ptot.setPx(vp->ptot.x() + momentum.x());
1626  vp->ptot.setPy(vp->ptot.y() + momentum.y());
1627  vp->ptot.setPz(vp->ptot.z() + momentum.z());
1628  vp->ptot.setE(vp->ptot.e() + (**iTP).energy());
1629  vp->pt += (**iTP).pt();
1630  vp->ptsq += ((**iTP).pt() * (**iTP).pt());
1631  vp->nGenTrk++;
1632 
1633  if (matched_best_reco_track) {
1634  vp->num_matched_reco_tracks++;
1635  vp->average_match_quality += match_quality;
1636  }
1637  } // End of for loop on daughters sim-particles
1638  if (vp->num_matched_reco_tracks) {
1639  vp->average_match_quality /= static_cast<float>(vp->num_matched_reco_tracks);
1640  }
1641  LogTrace("Primary4DVertexValidation")
1642  << "average number of associated tracks: " << vp->num_matched_reco_tracks / static_cast<float>(vp->nGenTrk)
1643  << " with average quality: " << vp->average_match_quality;
1644  } // End of for loop on tracking vertices
1645 
1646  // In case of no simulated vertices, break here
1647  if (simpv.empty())
1648  return simpv;
1649 
1650  // Now compute the closest distance in z between all simulated vertex
1651  // first initialize
1652  auto prev_z = simpv.back().z;
1653  for (simPrimaryVertex& vsim : simpv) {
1654  vsim.closest_vertex_distance_z = std::abs(vsim.z - prev_z);
1655  prev_z = vsim.z;
1656  }
1657  // then calculate
1658  for (std::vector<simPrimaryVertex>::iterator vsim = simpv.begin(); vsim != simpv.end(); vsim++) {
1659  std::vector<simPrimaryVertex>::iterator vsim2 = vsim;
1660  vsim2++;
1661  for (; vsim2 != simpv.end(); vsim2++) {
1662  double distance = std::abs(vsim->z - vsim2->z);
1663  // need both to be complete
1664  vsim->closest_vertex_distance_z = std::min(vsim->closest_vertex_distance_z, distance);
1665  vsim2->closest_vertex_distance_z = std::min(vsim2->closest_vertex_distance_z, distance);
1666  }
1667  }
1668  return simpv;
1669 }
assert(be >=bs)
const_iterator find(const key_type &k) const
find element with specified reference key
#define LogTrace(id)
const_iterator end() const
last iterator over the map (read only)
double pt() const
track transverse momentum
Definition: TrackBase.h:637
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
edm::Ref< TrackingVertexCollection > TrackingVertexRef
const reco::SimToRecoCollection * s2r_

◆ getWosWnt()

void Primary4DVertexValidation::getWosWnt ( const reco::Vertex recoVtx,
const reco::TrackBaseRef recoTrk,
const edm::ValueMap< float > &  sigmat0,
const edm::ValueMap< float > &  mtdQualMVA,
const edm::Handle< reco::BeamSpot > &  BS,
double &  wos,
double &  wnt 
)
private

Definition at line 1545 of file Primary4DVertexValidation.cc.

References c_, funct::cos(), reco::TrackBase::dzError(), SiStripPI::min, mvaTh_, reco::TrackBase::phi(), funct::pow(), reco::TrackBase::pt(), beamSpotPI::sigmaZ, funct::sin(), funct::tan(), reco::TrackBase::theta(), and reco::Vertex::trackWeight().

Referenced by analyze(), and matchReco2Sim().

1551  {
1552  double dz2_beam = pow((*BS).BeamWidthX() * cos(recoTrk->phi()) / tan(recoTrk->theta()), 2) +
1553  pow((*BS).BeamWidthY() * sin(recoTrk->phi()) / tan(recoTrk->theta()), 2);
1554  double dz2 =
1555  pow(recoTrk->dzError(), 2) + dz2_beam + pow(0.0020, 2); // added 20 um, some tracks have crazy small resolutions
1556  wos = recoVtx.trackWeight(recoTrk) / dz2;
1557  wnt = recoVtx.trackWeight(recoTrk) *
1558  std::min(recoTrk->pt(), 1.0); // pt-weighted number of tracks (downweights pt < 1 GeV tracks)
1559 
1560  // If tracks have time information, give more weight to tracks with good resolution
1561  if (sigmat0[recoTrk] > 0 && mtdQualMVA[recoTrk] > mvaTh_) {
1562  double sigmaZ = (*BS).sigmaZ();
1563  double sigmaT = sigmaZ / c_; // c in cm/ns
1564  wos = wos / erf(sigmat0[recoTrk] / sigmaT);
1565  }
1566 }
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
double pt() const
track transverse momentum
Definition: TrackBase.h:637
double dzError() const
error on dz
Definition: TrackBase.h:778
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
float trackWeight(const TREF &r) const
returns the weight with which a Track has contributed to the vertex-fit.
Definition: Vertex.h:97
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
double phi() const
azimuthal angle of momentum vector
Definition: TrackBase.h:649
double theta() const
polar angle
Definition: TrackBase.h:602
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29

◆ isParticle()

void Primary4DVertexValidation::isParticle ( const reco::TrackBaseRef recoTrack,
const edm::ValueMap< float > &  sigmat0,
const edm::ValueMap< float > &  sigmat0Safe,
const edm::ValueMap< float > &  probPi,
const edm::ValueMap< float > &  probK,
const edm::ValueMap< float > &  probP,
unsigned int &  no_PIDtype,
bool &  no_PID,
bool &  is_Pi,
bool &  is_K,
bool &  is_P 
)
private

Definition at line 1515 of file Primary4DVertexValidation.cc.

References edm::isNotFinite(), and minProbHeavy_.

Referenced by analyze().

1525  {
1526  no_PIDtype = 0;
1527  no_PID = false;
1528  is_Pi = false;
1529  is_K = false;
1530  is_P = false;
1531  if (probPi[recoTrack] == -1) {
1532  no_PIDtype = 1;
1533  } else if (edm::isNotFinite(probPi[recoTrack])) {
1534  no_PIDtype = 2;
1535  } else if (probPi[recoTrack] == 1 && probK[recoTrack] == 0 && probP[recoTrack] == 0 &&
1536  sigmat0[recoTrack] < sigmat0Safe[recoTrack]) {
1537  no_PIDtype = 3;
1538  }
1539  no_PID = no_PIDtype > 0;
1540  is_Pi = !no_PID && 1. - probPi[recoTrack] < minProbHeavy_;
1541  is_K = !no_PID && !is_Pi && probK[recoTrack] > probP[recoTrack];
1542  is_P = !no_PID && !is_Pi && !is_K;
1543 }
constexpr bool isNotFinite(T x)
Definition: isFinite.h:9

◆ matchReco2Sim()

void Primary4DVertexValidation::matchReco2Sim ( std::vector< recoPrimaryVertex > &  recopv,
std::vector< simPrimaryVertex > &  simpv,
const edm::ValueMap< float > &  sigmat0,
const edm::ValueMap< float > &  MVA,
const edm::Handle< reco::BeamSpot > &  BS 
)
private

Definition at line 1737 of file Primary4DVertexValidation.cc.

References funct::abs(), cms::cuda::assert(), dqmdumpme::first, getMatchedTP(), getWosWnt(), mps_fire::i, caHitNtupletGeneratorKernels::iev, ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::iv, dqmdumpme::k, LogTrace, maxRank_, maxTry_, NOT_MATCHED, edm::second(), pfDeepBoostedJetPreprocessParams_cfi::sv, trackweightTh_, bphysicsOniaDQM_cfi::vertex, and zWosMatchMax_.

Referenced by analyze().

1741  {
1742  // Initialization (clear wos and wnt)
1743  for (auto vv : simpv) {
1744  vv.wnt.clear();
1745  vv.wos.clear();
1746  }
1747  for (auto rv : recopv) {
1748  rv.wnt.clear();
1749  rv.wos.clear();
1750  }
1751 
1752  // Filling infos for matching rec and sim vertices
1753  for (unsigned int iv = 0; iv < recopv.size(); iv++) {
1754  const reco::Vertex* vertex = recopv.at(iv).recVtx;
1755  LogTrace("Primary4DVertexValidation") << "iv (rec): " << iv;
1756 
1757  for (unsigned int iev = 0; iev < simpv.size(); iev++) {
1758  double wnt = 0;
1759  double wos = 0;
1760  double evwnt = 0; // weighted number of tracks from sim event iev in the current recvtx
1761  double evwos = 0; // weight over sigma**2 of sim event iev in the current recvtx
1762  unsigned int evnt = 0; // number of tracks from sim event iev in the current recvtx
1763 
1764  for (auto iTrack = vertex->tracks_begin(); iTrack != vertex->tracks_end(); ++iTrack) {
1765  if (vertex->trackWeight(*iTrack) < trackweightTh_) {
1766  continue;
1767  }
1768 
1769  auto tp_info = getMatchedTP(*iTrack, simpv.at(iev).sim_vertex).first;
1770  int matchCategory = getMatchedTP(*iTrack, simpv.at(iev).sim_vertex).second;
1771  // matched TP equal to any TP of a given sim vertex
1772  if (tp_info != nullptr && matchCategory == 0) {
1773  getWosWnt(*vertex, *iTrack, MVA, sigmat0, BS, wos, wnt);
1774  simpv.at(iev).addTrack(iv, wos, wnt);
1775  recopv.at(iv).addTrack(iev, wos, wnt);
1776  evwos += wos;
1777  evwnt += wnt;
1778  evnt++;
1779  }
1780  } // RecoTracks loop
1781 
1782  // require 2 tracks for a wos-match
1783  if ((evwos > 0) && (evwos > recopv.at(iv).maxwos) && (evnt > 1)) {
1784  recopv.at(iv).wosmatch = iev;
1785  recopv.at(iv).maxwos = evwos;
1786  recopv.at(iv).maxwosnt = evnt;
1787  LogTrace("Primary4DVertexValidation") << "dominating sim event (iev): " << iev << " evwos = " << evwos;
1788  }
1789 
1790  // weighted track counting match, require at least one track
1791  if ((evnt > 0) && (evwnt > recopv.at(iv).maxwnt)) {
1792  recopv.at(iv).wntmatch = iev;
1793  recopv.at(iv).maxwnt = evwnt;
1794  }
1795  } // TrackingVertex loop
1796  if (recopv.at(iv).maxwos > 0) {
1797  simpv.at(recopv.at(iv).wosmatch).wos_dominated_recv.push_back(iv);
1798  simpv.at(recopv.at(iv).wosmatch).nwosmatch++; // count the rec vertices dominated by a sim vertex using wos
1799  assert(iv < recopv.size());
1800  }
1801  LogTrace("Primary4DVertexValidation") << "largest contribution to wos: wosmatch (iev) = " << recopv.at(iv).wosmatch
1802  << " maxwos = " << recopv.at(iv).maxwos;
1803  if (recopv.at(iv).maxwnt > 0) {
1804  simpv.at(recopv.at(iv).wntmatch).nwntmatch++; // count the rec vertices dominated by a sim vertex using wnt
1805  }
1806  } // RecoPrimaryVertex
1807 
1808  // reset
1809  for (auto& vrec : recopv) {
1810  vrec.sim = NOT_MATCHED;
1811  vrec.matchQuality = 0;
1812  }
1813  unsigned int iev = 0;
1814  for (auto& vv : simpv) {
1815  LogTrace("Primary4DVertexValidation") << "iev (sim): " << iev;
1816  LogTrace("Primary4DVertexValidation") << "wos_dominated_recv.size: " << vv.wos_dominated_recv.size();
1817  for (unsigned int i = 0; i < vv.wos_dominated_recv.size(); i++) {
1818  auto recov = vv.wos_dominated_recv.at(i);
1819  LogTrace("Primary4DVertexValidation")
1820  << "index of reco vertex: " << recov << " that has a wos: " << vv.wos.at(recov) << " at position " << i;
1821  }
1822  vv.rec = NOT_MATCHED;
1823  vv.matchQuality = 0;
1824  iev++;
1825  }
1826  // after filling infos, goes for the sim-reco match
1827  // this tries a one-to-one match, taking simPV with highest wos if there are > 1 simPV candidates
1828  for (unsigned int rank = 1; rank < maxRank_; rank++) {
1829  for (unsigned int iev = 0; iev < simpv.size(); iev++) { //loop on SimPV
1830  if (simpv.at(iev).rec != NOT_MATCHED) {
1831  continue; // only sim vertices not already matched
1832  }
1833  if (simpv.at(iev).nwosmatch == 0) {
1834  continue; // the sim vertex does not dominate any reco vertex
1835  }
1836  if (simpv.at(iev).nwosmatch > rank) {
1837  continue; // start with sim vertices dominating one rec vertex (rank 1), then go with the ones dominating more
1838  }
1839  unsigned int iv = NOT_MATCHED; // select a rec vertex index
1840  for (unsigned int k = 0; k < simpv.at(iev).wos_dominated_recv.size(); k++) {
1841  unsigned int rec = simpv.at(iev).wos_dominated_recv.at(k); //candidate rec vertex index
1842  auto vrec = recopv.at(rec);
1843  if (vrec.sim != NOT_MATCHED) {
1844  continue; // already matched
1845  }
1846  if (std::abs(simpv.at(iev).z - vrec.z) > zWosMatchMax_) {
1847  continue; // insanely far away
1848  }
1849  if ((iv == NOT_MATCHED) || simpv.at(iev).wos.at(rec) > simpv.at(iev).wos.at(iv)) {
1850  iv = rec;
1851  }
1852  }
1853  // if a viable candidate was found, make the link
1854  if (iv !=
1855  NOT_MATCHED) { // if the rec vertex has already been associated is possible that iv remains NOT_MATCHED at this point
1856  recopv.at(iv).sim = iev;
1857  simpv.at(iev).rec = iv;
1858  recopv.at(iv).matchQuality = rank;
1859  simpv.at(iev).matchQuality = rank;
1860  }
1861  } // iev
1862  } // rank
1863 
1864  // Reco vertices that are not necessarily dominated by a sim vertex, or whose dominating sim-vertex
1865  // has been matched already to another overlapping reco vertex, can still be associated to a specific
1866  // sim vertex (without being classified as dominating).
1867  // In terms of fitting 1d-distributions, this corresponds to a small peak close to a much larger nearby peak
1868  unsigned int ntry = 0;
1869  while (ntry++ < maxTry_) {
1870  unsigned nmatch = 0;
1871  for (unsigned int iev = 0; iev < simpv.size(); iev++) {
1872  if ((simpv.at(iev).rec != NOT_MATCHED) || (simpv.at(iev).wos.empty())) {
1873  continue;
1874  }
1875  // find a rec vertex for the NOT_MATCHED sim vertex
1876  unsigned int rec = NOT_MATCHED;
1877  for (auto rv : simpv.at(iev).wos) {
1878  if ((rec == NOT_MATCHED) || (rv.second > simpv.at(iev).wos.at(rec))) {
1879  rec = rv.first;
1880  }
1881  }
1882 
1883  if (rec == NOT_MATCHED) { // try with wnt match
1884  for (auto rv : simpv.at(iev).wnt) {
1885  if ((rec == NOT_MATCHED) || (rv.second > simpv.at(iev).wnt.at(rec))) {
1886  rec = rv.first;
1887  }
1888  }
1889  }
1890 
1891  if (rec == NOT_MATCHED) {
1892  continue; // should not happen
1893  }
1894  if (recopv.at(rec).sim != NOT_MATCHED) {
1895  continue; // already gone
1896  }
1897 
1898  // check if the rec vertex can be matched
1899  unsigned int rec2sim = NOT_MATCHED;
1900  for (auto sv : recopv.at(rec).wos) {
1901  if (simpv.at(sv.first).rec != NOT_MATCHED) {
1902  continue; // already used
1903  }
1904  if ((rec2sim == NOT_MATCHED) || (sv.second > recopv.at(rec).wos.at(rec2sim))) {
1905  rec2sim = sv.first;
1906  }
1907  }
1908  if (iev == rec2sim) {
1909  // do the match and assign lowest quality (i.e. max rank)
1910  recopv.at(rec).sim = iev;
1911  recopv.at(rec).matchQuality = maxRank_;
1912  simpv.at(iev).rec = rec;
1913  simpv.at(iev).matchQuality = maxRank_;
1914  nmatch++;
1915  }
1916  } // sim loop
1917  if (nmatch == 0) {
1918  break;
1919  }
1920  } // ntry
1921 
1922 // Debugging
1923 #ifdef EDM_ML_DEBUG
1924  unsigned int nmatch_tot = 0, n_dzgtsz = 0;
1925  unsigned int n_rank1 = 0, n_rank2 = 0, n_rank3 = 0, n_rank8 = 0;
1926 
1927  for (unsigned int iev = 0; iev < simpv.size(); iev++) { //loop on SimPV
1928  if (simpv.at(iev).rec != NOT_MATCHED) {
1929  unsigned int rec = simpv.at(iev).rec;
1930  unsigned int wosmatch = recopv.at(rec).wosmatch;
1931  LogTrace("Primary4DVertexValidation")
1932  << "Final match: iev (sim) = " << std::setw(4) << iev << " sim.rec = " << std::setw(4) << rec
1933  << " rec.wosmatch = " << std::setw(5) << wosmatch << " dZ/sigmaZ = " << std::setw(6) << std::setprecision(2)
1934  << std::abs((recopv.at(rec).z - simpv.at(iev).z) / recopv.at(rec).recVtx->zError())
1935  << " match qual = " << std::setw(1) << recopv.at(rec).matchQuality;
1936  nmatch_tot++;
1937  if (std::abs((recopv.at(rec).z - simpv.at(iev).z) / recopv.at(rec).recVtx->zError()) > 3.) {
1938  n_dzgtsz++;
1939  }
1940  if (recopv.at(rec).matchQuality == 1) {
1941  n_rank1++;
1942  }
1943  if (recopv.at(rec).matchQuality == 2) {
1944  n_rank2++;
1945  }
1946  if (recopv.at(rec).matchQuality == 3) {
1947  n_rank3++;
1948  }
1949  if (recopv.at(rec).matchQuality == 8) {
1950  n_rank8++;
1951  }
1952  }
1953  }
1954  LogTrace("Primary4DVertexValidation") << "n_sim = " << simpv.size() << " n_rec = " << recopv.size()
1955  << " nmatch_tot = " << nmatch_tot << " n(dZ>sigmaZ) = " << n_dzgtsz
1956  << " n_rank1 = " << n_rank1 << " n_rank2 = " << n_rank2
1957  << " n_rank3 = " << n_rank3 << " n_rank8 = " << n_rank8;
1958 #endif
1959 }
TkSoAView< TrackerTraits > HitToTuple< TrackerTraits > const *__restrict__ int32_t int32_t int iev
assert(be >=bs)
#define LogTrace(id)
U second(std::pair< T, U > const &p)
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
static constexpr unsigned int NOT_MATCHED
std::pair< const edm::Ref< std::vector< TrackingParticle > > *, int > getMatchedTP(const reco::TrackBaseRef &, const TrackingVertexRef &)
static constexpr double zWosMatchMax_
void getWosWnt(const reco::Vertex &, const reco::TrackBaseRef &, const edm::ValueMap< float > &, const edm::ValueMap< float > &, const edm::Handle< reco::BeamSpot > &, double &, double &)

◆ matchRecoTrack2SimSignal()

bool Primary4DVertexValidation::matchRecoTrack2SimSignal ( const reco::TrackBaseRef recoTrack)
private

Definition at line 1365 of file Primary4DVertexValidation.cc.

References edm::AssociationMap< Tag >::end(), edm::AssociationMap< Tag >::find(), newFWLiteAna::found, r2s_, and cmsswSequenceInfo::tp.

1365  {
1366  auto found = r2s_->find(recoTrack);
1367 
1368  // reco track not matched to any TP
1369  if (found == r2s_->end())
1370  return false;
1371 
1373  for (const auto& tp : found->val) {
1374  if (tp.first->eventId().bunchCrossing() == 0 && tp.first->eventId().event() == 0)
1375  return true;
1376  }
1377 
1378  // reco track not matched to any TP from signal vertex
1379  return false;
1380 }
const_iterator find(const key_type &k) const
find element with specified reference key
const_iterator end() const
last iterator over the map (read only)
const reco::RecoToSimCollection * r2s_

◆ observablesFromJets()

void Primary4DVertexValidation::observablesFromJets ( const std::vector< reco::Track > &  reco_Tracks,
const std::vector< double > &  mass_Tracks,
const std::vector< int > &  category_Tracks,
const std::string &  skip_Tracks,
unsigned int &  n_Jets,
double &  sum_EtJets,
double &  sum_Pt2Jets,
double &  met_Pt,
double &  sum_PzJets 
)
private

Definition at line 1442 of file Primary4DVertexValidation.cc.

References mps_fire::i, edm::isNotFinite(), PDWG_EXODelayedJetMET_cff::jets, EgHLTOffHistBins_cfi::mass, BTaggingMonitor_cfi::met, l1tEGammaCrystalsEmulatorProducer_cfi::scale, and mathSSE::sqrt().

Referenced by analyze().

1450  {
1451  double sum_PtJets = 0;
1452  n_Jets = 0;
1453  sum_EtJets = 0;
1454  sum_Pt2Jets = 0;
1455  met_Pt = 0;
1456  sum_PzJets = 0;
1457  auto met = LorentzVector(0, 0, 0, 0);
1458  std::vector<fastjet::PseudoJet> fjInputs_;
1459  fjInputs_.clear();
1460  size_t countScale0 = 0;
1461  for (size_t i = 0; i < reco_Tracks.size(); i++) {
1462  const auto recotr = reco_Tracks[i];
1463  const auto mass = mass_Tracks[i];
1464  float scale = 1.;
1465  if (recotr.charge() == 0) {
1466  continue;
1467  }
1468  // skip PU tracks in jet definition if skip_PU is required
1469  if (skip_Tracks == "skip_PU" && category_Tracks[i] == 2) {
1470  continue;
1471  }
1472  // skip fake tracks in jet definition if skip_Fake is required
1473  if (skip_Tracks == "skip_Fake" && category_Tracks[i] == -1) {
1474  continue;
1475  }
1476  if (recotr.pt() != 0) {
1477  scale = (recotr.pt() - recotr.ptError()) / recotr.pt();
1478  }
1479  if (edm::isNotFinite(scale)) {
1480  edm::LogWarning("Primary4DVertexValidation") << "Scaling is NAN ignoring this recotrack" << std::endl;
1481  scale = 0;
1482  }
1483  if (scale < 0) {
1484  scale = 0;
1485  countScale0++;
1486  }
1487  if (scale != 0) {
1488  fjInputs_.push_back(fastjet::PseudoJet(recotr.px() * scale,
1489  recotr.py() * scale,
1490  recotr.pz() * scale,
1491  std::sqrt(recotr.p() * recotr.p() + mass * mass) * scale));
1492  }
1493  }
1494  fastjet::ClusterSequence sequence(fjInputs_, fastjet::JetDefinition(fastjet::antikt_algorithm, 0.4));
1495  auto jets = fastjet::sorted_by_pt(sequence.inclusive_jets(0));
1496  for (const auto& pj : jets) {
1497  auto p4 = LorentzVector(pj.px(), pj.py(), pj.pz(), pj.e());
1498  sum_EtJets += std::sqrt(p4.e() * p4.e() - p4.P() * p4.P() + p4.pt() * p4.pt());
1499  sum_PtJets += p4.pt();
1500  sum_Pt2Jets += (p4.pt() * p4.pt() * 0.8 * 0.8);
1501  met += p4;
1502  sum_PzJets += p4.pz();
1503  n_Jets++;
1504  }
1505  met_Pt = met.pt();
1506  double metAbove = met_Pt - 2 * std::sqrt(sum_PtJets);
1507  if (metAbove > 0) {
1508  sum_Pt2Jets += (metAbove * metAbove);
1509  }
1510  if (countScale0 == reco_Tracks.size()) {
1511  sum_Pt2Jets = countScale0 * 0.01; //leave some epsilon value to sort vertices with unknown pt
1512  }
1513 }
constexpr bool isNotFinite(T x)
Definition: isFinite.h:9
math::XYZTLorentzVector LorentzVector
T sqrt(T t)
Definition: SSEVec.h:23
Log< level::Warning, false > LogWarning

◆ printMatchedRecoTrackInfo()

void Primary4DVertexValidation::printMatchedRecoTrackInfo ( const reco::Vertex vtx,
const reco::TrackBaseRef trk,
const TrackingParticleRef tp,
const unsigned int &  categ 
)
private

Definition at line 2773 of file Primary4DVertexValidation.cc.

References reco::TrackBase::eta(), LogTrace, reco::TrackBase::pt(), simUnit_, AlCaHLTBitMon_QueryRunRegistry::string, cmsswSequenceInfo::tp, and L1BJetProducer_cff::vtx.

Referenced by analyze().

2776  {
2777  std::string strTrk;
2778  switch (categ) {
2779  case 0:
2780  strTrk = "Reco_Track:";
2781  break;
2782  case 1:
2783  strTrk = "SecRecoTrk:";
2784  break;
2785  case 2:
2786  strTrk = "PU_RecoTrk:";
2787  break;
2788  }
2789  LogTrace("Primary4DVertexValidation") << strTrk << " w =" << std::setw(6) << std::setprecision(2)
2790  << vtx.trackWeight(trk) << " pt =" << std::setw(6) << std::setprecision(2)
2791  << trk->pt() << " eta =" << std::setw(6) << std::setprecision(2) << trk->eta()
2792  << " MatchedTP: Pt =" << std::setw(6) << std::setprecision(2) << tp->pt()
2793  << " eta =" << std::setw(6) << std::setprecision(2) << tp->eta()
2794  << " Parent vtx: z =" << std::setw(8) << std::setprecision(4)
2795  << tp->parentVertex()->position().z() << " t =" << std::setw(8)
2796  << std::setprecision(4) << tp->parentVertex()->position().t() * simUnit_
2797  << " BX =" << tp->parentVertex()->eventId().bunchCrossing()
2798  << " ev =" << tp->parentVertex()->eventId().event() << std::endl;
2799 }
#define LogTrace(id)
double pt() const
track transverse momentum
Definition: TrackBase.h:637
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:652

◆ printSimVtxRecoVtxInfo()

void Primary4DVertexValidation::printSimVtxRecoVtxInfo ( const struct Primary4DVertexValidation::simPrimaryVertex simpVtx,
const struct Primary4DVertexValidation::recoPrimaryVertex recopVtx 
)
private

Definition at line 2801 of file Primary4DVertexValidation.cc.

References LogTrace, Primary4DVertexValidation::simPrimaryVertex::nGenTrk, Primary4DVertexValidation::recoPrimaryVertex::nRecoTrk, Primary4DVertexValidation::simPrimaryVertex::num_matched_reco_tracks, Primary4DVertexValidation::recoPrimaryVertex::num_matched_sim_tracks, Primary4DVertexValidation::simPrimaryVertex::pt, Primary4DVertexValidation::recoPrimaryVertex::pt, Primary4DVertexValidation::simPrimaryVertex::ptsq, Primary4DVertexValidation::recoPrimaryVertex::ptsq, Primary4DVertexValidation::simPrimaryVertex::rec, Primary4DVertexValidation::recoPrimaryVertex::sim, Primary4DVertexValidation::simPrimaryVertex::sim_vertex, simUnit_, Primary4DVertexValidation::recoPrimaryVertex::sumwnt, Primary4DVertexValidation::recoPrimaryVertex::sumwos, Primary4DVertexValidation::simPrimaryVertex::t, use_only_charged_tracks_, Primary4DVertexValidation::simPrimaryVertex::x, Primary4DVertexValidation::recoPrimaryVertex::x, Primary4DVertexValidation::simPrimaryVertex::y, Primary4DVertexValidation::recoPrimaryVertex::y, Primary4DVertexValidation::simPrimaryVertex::z, and Primary4DVertexValidation::recoPrimaryVertex::z.

Referenced by analyze().

2803  {
2804  LogTrace("Primary4DVertexValidation") << "Sim vtx (x,y,z,t) = (" << std::setprecision(4) << simpVtx.x << ","
2805  << std::setprecision(4) << simpVtx.y << "," << std::setprecision(4) << simpVtx.z
2806  << "," << std::setprecision(4) << simpVtx.t * simUnit_ << ")"
2807  << " Simvtx.rec = " << simpVtx.rec;
2808  LogTrace("Primary4DVertexValidation") << "Sim vtx: pt = " << std::setprecision(4) << simpVtx.pt
2809  << " ptsq = " << std::setprecision(6) << simpVtx.ptsq
2810  << " nGenTrk = " << simpVtx.nGenTrk
2811  << " nmatch recotrks = " << simpVtx.num_matched_reco_tracks;
2812  LogTrace("Primary4DVertexValidation") << "Reco vtx (x,y,z) = (" << std::setprecision(4) << recopVtx.x << ","
2813  << std::setprecision(4) << recopVtx.y << "," << std::setprecision(4)
2814  << recopVtx.z << ")"
2815  << " Recovtx.sim = " << recopVtx.sim;
2816  LogTrace("Primary4DVertexValidation") << "Reco vtx: pt = " << std::setprecision(4) << recopVtx.pt
2817  << " ptsq = " << std::setprecision(6) << recopVtx.ptsq
2818  << " nrecotrks = " << recopVtx.nRecoTrk
2819  << " nmatch simtrks = " << recopVtx.num_matched_sim_tracks;
2820  LogTrace("Primary4DVertexValidation") << "wnt " << recopVtx.sumwnt << " wos = " << recopVtx.sumwos;
2821  for (auto iTP = simpVtx.sim_vertex->daughterTracks_begin(); iTP != simpVtx.sim_vertex->daughterTracks_end(); ++iTP) {
2822  if (use_only_charged_tracks_ && (**iTP).charge() == 0) {
2823  continue;
2824  }
2825  LogTrace("Primary4DVertexValidation")
2826  << "Daughter track of sim vertex: pt =" << std::setw(6) << std::setprecision(2) << (*iTP)->pt()
2827  << " eta =" << std::setw(6) << std::setprecision(2) << (*iTP)->eta();
2828  }
2829 }
#define LogTrace(id)

◆ select()

bool Primary4DVertexValidation::select ( const reco::Vertex v,
int  level = 0 
)
private

Definition at line 1423 of file Primary4DVertexValidation.cc.

References personalPlayback::level, selNdof_, and findQualityFiles::v.

Referenced by analyze().

1423  {
1424  /* level
1425  0 !isFake && ndof>4 (default)
1426  1 !isFake && ndof>4 && prob > 0.01
1427  2 !isFake && ndof>4 && prob > 0.01 && ptmax2 > 0.4
1428  */
1429  if (v.isFake())
1430  return false;
1431  if ((level == 0) && (v.ndof() > selNdof_))
1432  return true;
1433  /*if ((level == 1) && (v.ndof() > selNdof_) && (vertex_pxy(v) > 0.01))
1434  return true;
1435  if ((level == 2) && (v.ndof() > selNdof_) && (vertex_pxy(v) > 0.01) && (vertex_ptmax2(v) > 0.4))
1436  return true;
1437  if ((level == 3) && (v.ndof() > selNdof_) && (vertex_ptmax2(v) < 0.4))
1438  return true;*/
1439  return false;
1440 }

◆ timeFromTrueMass()

double Primary4DVertexValidation::timeFromTrueMass ( double  mass,
double  pathlength,
double  momentum,
double  time 
)
private

Definition at line 1411 of file Primary4DVertexValidation.cc.

References c_, EgHLTOffHistBins_cfi::mass, mathSSE::sqrt(), hcalRecHitTable_cff::time, and findQualityFiles::v.

Referenced by analyze().

1411  {
1412  if (time > 0 && pathlength > 0 && mass > 0) {
1413  double gammasq = 1. + momentum * momentum / (mass * mass);
1414  double v = c_ * std::sqrt(1. - 1. / gammasq); // cm / ns
1415  double t_est = time - (pathlength / v);
1416 
1417  return t_est;
1418  } else {
1419  return -1;
1420  }
1421 }
T sqrt(T t)
Definition: SSEVec.h:23

◆ trkRecSel()

const bool Primary4DVertexValidation::trkRecSel ( const reco::TrackBase trk)
private

Definition at line 2848 of file Primary4DVertexValidation.cc.

References funct::abs(), reco::TrackBase::eta(), etacutREC_, match(), reco::TrackBase::pt(), and pTcut_.

Referenced by analyze().

2848  {
2849  bool match = false;
2850  match = std::abs(trk.eta()) <= etacutREC_ && trk.pt() > pTcut_;
2851  return match;
2852 }
static constexpr double etacutREC_
double pt() const
track transverse momentum
Definition: TrackBase.h:637
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:652
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
Definition: Utils.h:10

◆ trkTPSelLV()

const bool Primary4DVertexValidation::trkTPSelLV ( const TrackingParticle tp)
private

Definition at line 2831 of file Primary4DVertexValidation.cc.

References funct::abs(), etacutGEN_, match(), pTcut_, rBTL_, mathSSE::sqrt(), cmsswSequenceInfo::tp, and zETL_.

Referenced by analyze().

2831  {
2832  bool match = false;
2833  if (tp.status() != 1) {
2834  return match;
2835  }
2836 
2837  auto x_pv = tp.parentVertex()->position().x();
2838  auto y_pv = tp.parentVertex()->position().y();
2839  auto z_pv = tp.parentVertex()->position().z();
2840 
2841  auto r_pv = std::sqrt(x_pv * x_pv + y_pv * y_pv);
2842 
2843  match =
2844  tp.charge() != 0 && std::abs(tp.eta()) < etacutGEN_ && tp.pt() > pTcut_ && r_pv < rBTL_ && std::abs(z_pv) < zETL_;
2845  return match;
2846 }
static constexpr double etacutGEN_
T sqrt(T t)
Definition: SSEVec.h:23
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
Definition: Utils.h:10

Member Data Documentation

◆ c_

constexpr double Primary4DVertexValidation::c_ = 2.99792458e1
staticprivate

Definition at line 263 of file Primary4DVertexValidation.cc.

Referenced by getWosWnt(), and timeFromTrueMass().

◆ c_cm_ns

constexpr float Primary4DVertexValidation::c_cm_ns = geant_units::operators::convertMmToCm(CLHEP::c_light)
staticprivate

Definition at line 287 of file Primary4DVertexValidation.cc.

◆ deltaZcut_

constexpr double Primary4DVertexValidation::deltaZcut_ = 0.1
staticprivate

Definition at line 273 of file Primary4DVertexValidation.cc.

Referenced by analyze().

◆ etacutGEN_

constexpr double Primary4DVertexValidation::etacutGEN_ = 4.
staticprivate

Definition at line 270 of file Primary4DVertexValidation.cc.

Referenced by trkTPSelLV().

◆ etacutREC_

constexpr double Primary4DVertexValidation::etacutREC_ = 3.
staticprivate

Definition at line 271 of file Primary4DVertexValidation.cc.

Referenced by trkRecSel().

◆ folder_

const std::string Primary4DVertexValidation::folder_
private

Definition at line 260 of file Primary4DVertexValidation.cc.

Referenced by bookHistograms().

◆ lineDensityPar_

const std::vector<double> Primary4DVertexValidation::lineDensityPar_
private

Definition at line 296 of file Primary4DVertexValidation.cc.

Referenced by analyze().

◆ maxRank_

constexpr double Primary4DVertexValidation::maxRank_ = 8.
staticprivate

Definition at line 267 of file Primary4DVertexValidation.cc.

Referenced by matchReco2Sim().

◆ maxTry_

constexpr double Primary4DVertexValidation::maxTry_ = 10.
staticprivate

Definition at line 268 of file Primary4DVertexValidation.cc.

Referenced by matchReco2Sim().

◆ meBarrelNoPIDtype_

MonitorElement* Primary4DVertexValidation::meBarrelNoPIDtype_
private

Definition at line 483 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meBarrelPIDp_

MonitorElement* Primary4DVertexValidation::meBarrelPIDp_
private

Definition at line 480 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meBarrelTrueKAsK_

MonitorElement* Primary4DVertexValidation::meBarrelTrueKAsK_
private

Definition at line 501 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meBarrelTrueKAsP_

MonitorElement* Primary4DVertexValidation::meBarrelTrueKAsP_
private

Definition at line 502 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meBarrelTrueKAsPi_

MonitorElement* Primary4DVertexValidation::meBarrelTrueKAsPi_
private

Definition at line 500 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meBarrelTrueKNoPID_

MonitorElement* Primary4DVertexValidation::meBarrelTrueKNoPID_
private

Definition at line 487 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meBarrelTruePAsK_

MonitorElement* Primary4DVertexValidation::meBarrelTruePAsK_
private

Definition at line 508 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meBarrelTruePAsP_

MonitorElement* Primary4DVertexValidation::meBarrelTruePAsP_
private

Definition at line 509 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meBarrelTruePAsPi_

MonitorElement* Primary4DVertexValidation::meBarrelTruePAsPi_
private

Definition at line 507 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meBarrelTruePiAsK_

MonitorElement* Primary4DVertexValidation::meBarrelTruePiAsK_
private

Definition at line 494 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meBarrelTruePiAsP_

MonitorElement* Primary4DVertexValidation::meBarrelTruePiAsP_
private

Definition at line 495 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meBarrelTruePiAsPi_

MonitorElement* Primary4DVertexValidation::meBarrelTruePiAsPi_
private

Definition at line 493 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meBarrelTruePiNoPID_

MonitorElement* Primary4DVertexValidation::meBarrelTruePiNoPID_
private

Definition at line 486 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meBarrelTruePNoPID_

MonitorElement* Primary4DVertexValidation::meBarrelTruePNoPID_
private

Definition at line 488 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meDeltaTfakefake_

MonitorElement* Primary4DVertexValidation::meDeltaTfakefake_
private

Definition at line 363 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meDeltaTfakereal_

MonitorElement* Primary4DVertexValidation::meDeltaTfakereal_
private

Definition at line 364 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meDeltaTrealreal_

MonitorElement* Primary4DVertexValidation::meDeltaTrealreal_
private

Definition at line 362 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meDeltaZfakefake_

MonitorElement* Primary4DVertexValidation::meDeltaZfakefake_
private

Definition at line 360 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meDeltaZfakereal_

MonitorElement* Primary4DVertexValidation::meDeltaZfakereal_
private

Definition at line 361 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meDeltaZrealreal_

MonitorElement* Primary4DVertexValidation::meDeltaZrealreal_
private

Definition at line 359 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meEndcapNoPIDtype_

MonitorElement* Primary4DVertexValidation::meEndcapNoPIDtype_
private

Definition at line 484 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meEndcapPIDp_

MonitorElement* Primary4DVertexValidation::meEndcapPIDp_
private

Definition at line 481 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meEndcapTrueKAsK_

MonitorElement* Primary4DVertexValidation::meEndcapTrueKAsK_
private

Definition at line 504 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meEndcapTrueKAsP_

MonitorElement* Primary4DVertexValidation::meEndcapTrueKAsP_
private

Definition at line 505 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meEndcapTrueKAsPi_

MonitorElement* Primary4DVertexValidation::meEndcapTrueKAsPi_
private

Definition at line 503 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meEndcapTrueKNoPID_

MonitorElement* Primary4DVertexValidation::meEndcapTrueKNoPID_
private

Definition at line 490 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meEndcapTruePAsK_

MonitorElement* Primary4DVertexValidation::meEndcapTruePAsK_
private

Definition at line 511 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meEndcapTruePAsP_

MonitorElement* Primary4DVertexValidation::meEndcapTruePAsP_
private

Definition at line 512 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meEndcapTruePAsPi_

MonitorElement* Primary4DVertexValidation::meEndcapTruePAsPi_
private

Definition at line 510 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meEndcapTruePiAsK_

MonitorElement* Primary4DVertexValidation::meEndcapTruePiAsK_
private

Definition at line 497 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meEndcapTruePiAsP_

MonitorElement* Primary4DVertexValidation::meEndcapTruePiAsP_
private

Definition at line 498 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meEndcapTruePiAsPi_

MonitorElement* Primary4DVertexValidation::meEndcapTruePiAsPi_
private

Definition at line 496 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meEndcapTruePiNoPID_

MonitorElement* Primary4DVertexValidation::meEndcapTruePiNoPID_
private

Definition at line 489 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meEndcapTruePNoPID_

MonitorElement* Primary4DVertexValidation::meEndcapTruePNoPID_
private

Definition at line 491 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meFakeTrackRecLVRelMult_

MonitorElement* Primary4DVertexValidation::meFakeTrackRecLVRelMult_
private

Definition at line 403 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meFakeTrackRecLVRelMultvsMult_

MonitorElement* Primary4DVertexValidation::meFakeTrackRecLVRelMultvsMult_
private

Definition at line 418 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meFakeTrackRecLVRelSumWos_

MonitorElement* Primary4DVertexValidation::meFakeTrackRecLVRelSumWos_
private

Definition at line 410 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meFakeTrackRecLVRelSumWosvsSumWos_

MonitorElement* Primary4DVertexValidation::meFakeTrackRecLVRelSumWosvsSumWos_
private

Definition at line 422 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meFakeTrackRelMult_

MonitorElement* Primary4DVertexValidation::meFakeTrackRelMult_
private

Definition at line 378 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meFakeTrackRelMultvsMult_

MonitorElement* Primary4DVertexValidation::meFakeTrackRelMultvsMult_
private

Definition at line 393 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meFakeTrackRelSumWos_

MonitorElement* Primary4DVertexValidation::meFakeTrackRelSumWos_
private

Definition at line 385 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meFakeTrackRelSumWosvsSumWos_

MonitorElement* Primary4DVertexValidation::meFakeTrackRelSumWosvsSumWos_
private

Definition at line 396 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meJetsFakeRelSumPt2_

MonitorElement* Primary4DVertexValidation::meJetsFakeRelSumPt2_
private

Definition at line 434 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meJetsFakeRelSumPt2vsSumPt2_

MonitorElement* Primary4DVertexValidation::meJetsFakeRelSumPt2vsSumPt2_
private

Definition at line 441 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meJetsPUHt_

MonitorElement* Primary4DVertexValidation::meJetsPUHt_
private

Definition at line 427 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meJetsPUMetPt_

MonitorElement* Primary4DVertexValidation::meJetsPUMetPt_
private

Definition at line 429 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meJetsPUMult_

MonitorElement* Primary4DVertexValidation::meJetsPUMult_
private

Definition at line 426 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meJetsPURelHt_

MonitorElement* Primary4DVertexValidation::meJetsPURelHt_
private

Definition at line 432 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meJetsPURelHtvsHt_

MonitorElement* Primary4DVertexValidation::meJetsPURelHtvsHt_
private

Definition at line 439 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meJetsPURelMetPt_

MonitorElement* Primary4DVertexValidation::meJetsPURelMetPt_
private

Definition at line 435 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meJetsPURelMetPtvsMetPt_

MonitorElement* Primary4DVertexValidation::meJetsPURelMetPtvsMetPt_
private

Definition at line 442 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meJetsPURelMult_

MonitorElement* Primary4DVertexValidation::meJetsPURelMult_
private

Definition at line 431 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meJetsPURelMultvsMult_

MonitorElement* Primary4DVertexValidation::meJetsPURelMultvsMult_
private

Definition at line 438 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meJetsPURelSumPt2_

MonitorElement* Primary4DVertexValidation::meJetsPURelSumPt2_
private

Definition at line 433 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meJetsPURelSumPt2vsSumPt2_

MonitorElement* Primary4DVertexValidation::meJetsPURelSumPt2vsSumPt2_
private

Definition at line 440 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meJetsPURelSumPz_

MonitorElement* Primary4DVertexValidation::meJetsPURelSumPz_
private

Definition at line 436 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meJetsPURelSumPzvsSumPz_

MonitorElement* Primary4DVertexValidation::meJetsPURelSumPzvsSumPz_
private

Definition at line 443 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meJetsPUSumPt2_

MonitorElement* Primary4DVertexValidation::meJetsPUSumPt2_
private

Definition at line 428 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meJetsPUSumPz_

MonitorElement* Primary4DVertexValidation::meJetsPUSumPz_
private

Definition at line 430 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meJetsRecLVFakeRelSumPt2_

MonitorElement* Primary4DVertexValidation::meJetsRecLVFakeRelSumPt2_
private

Definition at line 453 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meJetsRecLVFakeRelSumPt2vsSumPt2_

MonitorElement* Primary4DVertexValidation::meJetsRecLVFakeRelSumPt2vsSumPt2_
private

Definition at line 460 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meJetsRecLVPUHt_

MonitorElement* Primary4DVertexValidation::meJetsRecLVPUHt_
private

Definition at line 446 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meJetsRecLVPUMetPt_

MonitorElement* Primary4DVertexValidation::meJetsRecLVPUMetPt_
private

Definition at line 448 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meJetsRecLVPUMult_

MonitorElement* Primary4DVertexValidation::meJetsRecLVPUMult_
private

Definition at line 445 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meJetsRecLVPURelHt_

MonitorElement* Primary4DVertexValidation::meJetsRecLVPURelHt_
private

Definition at line 451 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meJetsRecLVPURelHtvsHt_

MonitorElement* Primary4DVertexValidation::meJetsRecLVPURelHtvsHt_
private

Definition at line 458 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meJetsRecLVPURelMetPt_

MonitorElement* Primary4DVertexValidation::meJetsRecLVPURelMetPt_
private

Definition at line 454 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meJetsRecLVPURelMetPtvsMetPt_

MonitorElement* Primary4DVertexValidation::meJetsRecLVPURelMetPtvsMetPt_
private

Definition at line 461 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meJetsRecLVPURelMult_

MonitorElement* Primary4DVertexValidation::meJetsRecLVPURelMult_
private

Definition at line 450 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meJetsRecLVPURelMultvsMult_

MonitorElement* Primary4DVertexValidation::meJetsRecLVPURelMultvsMult_
private

Definition at line 457 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meJetsRecLVPURelSumPt2_

MonitorElement* Primary4DVertexValidation::meJetsRecLVPURelSumPt2_
private

Definition at line 452 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meJetsRecLVPURelSumPt2vsSumPt2_

MonitorElement* Primary4DVertexValidation::meJetsRecLVPURelSumPt2vsSumPt2_
private

Definition at line 459 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meJetsRecLVPURelSumPz_

MonitorElement* Primary4DVertexValidation::meJetsRecLVPURelSumPz_
private

Definition at line 455 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meJetsRecLVPURelSumPzvsSumPz_

MonitorElement* Primary4DVertexValidation::meJetsRecLVPURelSumPzvsSumPz_
private

Definition at line 462 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meJetsRecLVPUSumPt2_

MonitorElement* Primary4DVertexValidation::meJetsRecLVPUSumPt2_
private

Definition at line 447 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meJetsRecLVPUSumPz_

MonitorElement* Primary4DVertexValidation::meJetsRecLVPUSumPz_
private

Definition at line 449 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meMatchQual_

MonitorElement* Primary4DVertexValidation::meMatchQual_
private

Definition at line 358 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUTrackMult_

MonitorElement* Primary4DVertexValidation::mePUTrackMult_
private

Definition at line 376 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUTrackRecLVMult_

MonitorElement* Primary4DVertexValidation::mePUTrackRecLVMult_
private

Definition at line 401 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUTrackRecLVRelMult_

MonitorElement* Primary4DVertexValidation::mePUTrackRecLVRelMult_
private

Definition at line 402 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUTrackRecLVRelMultvsMult_

MonitorElement* Primary4DVertexValidation::mePUTrackRecLVRelMultvsMult_
private

Definition at line 417 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUTrackRecLVRelSumPt2_

MonitorElement* Primary4DVertexValidation::mePUTrackRecLVRelSumPt2_
private

Definition at line 415 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUTrackRecLVRelSumPt2vsSumPt2_

MonitorElement* Primary4DVertexValidation::mePUTrackRecLVRelSumPt2vsSumPt2_
private

Definition at line 424 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUTrackRecLVRelSumPt_

MonitorElement* Primary4DVertexValidation::mePUTrackRecLVRelSumPt_
private

Definition at line 413 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUTrackRecLVRelSumPtvsSumPt_

MonitorElement* Primary4DVertexValidation::mePUTrackRecLVRelSumPtvsSumPt_
private

Definition at line 423 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUTrackRecLVRelSumWnt_

MonitorElement* Primary4DVertexValidation::mePUTrackRecLVRelSumWnt_
private

Definition at line 405 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUTrackRecLVRelSumWntvsSumWnt_

MonitorElement* Primary4DVertexValidation::mePUTrackRecLVRelSumWntvsSumWnt_
private

Definition at line 419 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUTrackRecLVRelSumWos_

MonitorElement* Primary4DVertexValidation::mePUTrackRecLVRelSumWos_
private

Definition at line 407 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUTrackRecLVRelSumWosvsSumWos_

MonitorElement* Primary4DVertexValidation::mePUTrackRecLVRelSumWosvsSumWos_
private

Definition at line 420 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUTrackRecLVSumPt2_

MonitorElement* Primary4DVertexValidation::mePUTrackRecLVSumPt2_
private

Definition at line 414 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUTrackRecLVSumPt_

MonitorElement* Primary4DVertexValidation::mePUTrackRecLVSumPt_
private

Definition at line 412 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUTrackRecLVSumWnt_

MonitorElement* Primary4DVertexValidation::mePUTrackRecLVSumWnt_
private

Definition at line 404 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUTrackRecLVSumWos_

MonitorElement* Primary4DVertexValidation::mePUTrackRecLVSumWos_
private

Definition at line 406 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUTrackRecLVWnt_

MonitorElement* Primary4DVertexValidation::mePUTrackRecLVWnt_
private

Definition at line 411 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUTrackRelMult_

MonitorElement* Primary4DVertexValidation::mePUTrackRelMult_
private

Definition at line 377 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUTrackRelMultvsMult_

MonitorElement* Primary4DVertexValidation::mePUTrackRelMultvsMult_
private

Definition at line 392 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUTrackRelSumPt2_

MonitorElement* Primary4DVertexValidation::mePUTrackRelSumPt2_
private

Definition at line 390 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUTrackRelSumPt2vsSumPt2_

MonitorElement* Primary4DVertexValidation::mePUTrackRelSumPt2vsSumPt2_
private

Definition at line 399 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUTrackRelSumPt_

MonitorElement* Primary4DVertexValidation::mePUTrackRelSumPt_
private

Definition at line 388 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUTrackRelSumPtvsSumPt_

MonitorElement* Primary4DVertexValidation::mePUTrackRelSumPtvsSumPt_
private

Definition at line 398 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUTrackRelSumWnt_

MonitorElement* Primary4DVertexValidation::mePUTrackRelSumWnt_
private

Definition at line 380 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUTrackRelSumWntvsSumWnt_

MonitorElement* Primary4DVertexValidation::mePUTrackRelSumWntvsSumWnt_
private

Definition at line 394 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUTrackRelSumWos_

MonitorElement* Primary4DVertexValidation::mePUTrackRelSumWos_
private

Definition at line 382 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUTrackRelSumWosvsSumWos_

MonitorElement* Primary4DVertexValidation::mePUTrackRelSumWosvsSumWos_
private

Definition at line 395 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUTrackSumPt2_

MonitorElement* Primary4DVertexValidation::mePUTrackSumPt2_
private

Definition at line 389 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUTrackSumPt_

MonitorElement* Primary4DVertexValidation::mePUTrackSumPt_
private

Definition at line 387 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUTrackSumWnt_

MonitorElement* Primary4DVertexValidation::mePUTrackSumWnt_
private

Definition at line 379 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUTrackSumWos_

MonitorElement* Primary4DVertexValidation::mePUTrackSumWos_
private

Definition at line 381 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUTrackWnt_

MonitorElement* Primary4DVertexValidation::mePUTrackWnt_
private

Definition at line 386 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUvsFakeV_

MonitorElement* Primary4DVertexValidation::mePUvsFakeV_
private

Definition at line 355 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUvsOtherFakeV_

MonitorElement* Primary4DVertexValidation::mePUvsOtherFakeV_
private

Definition at line 356 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUvsRealV_

MonitorElement* Primary4DVertexValidation::mePUvsRealV_
private

Definition at line 354 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUvsSplitV_

MonitorElement* Primary4DVertexValidation::mePUvsSplitV_
private

Definition at line 357 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meRecoPosInRecoOrigCollection_

MonitorElement* Primary4DVertexValidation::meRecoPosInRecoOrigCollection_
private

Definition at line 366 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meRecoPosInSimCollection_

MonitorElement* Primary4DVertexValidation::meRecoPosInSimCollection_
private

Definition at line 365 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meRecoPVPosSignal_

MonitorElement* Primary4DVertexValidation::meRecoPVPosSignal_
private

Definition at line 368 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meRecoPVPosSignalNotHighestPt_

MonitorElement* Primary4DVertexValidation::meRecoPVPosSignalNotHighestPt_
private

Definition at line 369 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meRecoVtxVsLineDensity_

MonitorElement* Primary4DVertexValidation::meRecoVtxVsLineDensity_
private

Definition at line 370 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meRecPVT_

MonitorElement* Primary4DVertexValidation::meRecPVT_
private

Definition at line 373 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meRecPVZ_

MonitorElement* Primary4DVertexValidation::meRecPVZ_
private

Definition at line 372 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meRecVerNumber_

MonitorElement* Primary4DVertexValidation::meRecVerNumber_
private

Definition at line 371 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meSecTrackRecLVRelSumWos_

MonitorElement* Primary4DVertexValidation::meSecTrackRecLVRelSumWos_
private

Definition at line 409 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meSecTrackRecLVRelSumWosvsSumWos_

MonitorElement* Primary4DVertexValidation::meSecTrackRecLVRelSumWosvsSumWos_
private

Definition at line 421 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meSecTrackRecLVSumWos_

MonitorElement* Primary4DVertexValidation::meSecTrackRecLVSumWos_
private

Definition at line 408 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meSecTrackRelSumWos_

MonitorElement* Primary4DVertexValidation::meSecTrackRelSumWos_
private

Definition at line 384 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meSecTrackRelSumWosvsSumWos_

MonitorElement* Primary4DVertexValidation::meSecTrackRelSumWosvsSumWos_
private

Definition at line 397 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meSecTrackSumWos_

MonitorElement* Primary4DVertexValidation::meSecTrackSumWos_
private

Definition at line 383 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meSimPosInSimOrigCollection_

MonitorElement* Primary4DVertexValidation::meSimPosInSimOrigCollection_
private

Definition at line 367 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meSimPVZ_

MonitorElement* Primary4DVertexValidation::meSimPVZ_
private

Definition at line 374 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTimePull_

MonitorElement* Primary4DVertexValidation::meTimePull_
private

Definition at line 351 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTimeRes_

MonitorElement* Primary4DVertexValidation::meTimeRes_
private

Definition at line 350 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTimeSignalPull_

MonitorElement* Primary4DVertexValidation::meTimeSignalPull_
private

Definition at line 353 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTimeSignalRes_

MonitorElement* Primary4DVertexValidation::meTimeSignalRes_
private

Definition at line 352 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTrack3DposRes_

MonitorElement* Primary4DVertexValidation::meTrack3DposRes_[3]
private

Definition at line 349 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTrackEffEtaTot_

MonitorElement* Primary4DVertexValidation::meTrackEffEtaTot_
private

Definition at line 335 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTrackEffPtTot_

MonitorElement* Primary4DVertexValidation::meTrackEffPtTot_
private

Definition at line 332 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTrackMatchedTPEffEtaMtd_

MonitorElement* Primary4DVertexValidation::meTrackMatchedTPEffEtaMtd_
private

Definition at line 337 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTrackMatchedTPEffEtaTot_

MonitorElement* Primary4DVertexValidation::meTrackMatchedTPEffEtaTot_
private

Definition at line 336 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTrackMatchedTPEffPtMtd_

MonitorElement* Primary4DVertexValidation::meTrackMatchedTPEffPtMtd_
private

Definition at line 334 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTrackMatchedTPEffPtTot_

MonitorElement* Primary4DVertexValidation::meTrackMatchedTPEffPtTot_
private

Definition at line 333 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTrackMatchedTPPullTot_

MonitorElement* Primary4DVertexValidation::meTrackMatchedTPPullTot_
private

Definition at line 339 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTrackMatchedTPResTot_

MonitorElement* Primary4DVertexValidation::meTrackMatchedTPResTot_
private

Definition at line 338 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTrackMatchedTPZposResTot_

MonitorElement* Primary4DVertexValidation::meTrackMatchedTPZposResTot_
private

Definition at line 346 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTrackPull_

MonitorElement* Primary4DVertexValidation::meTrackPull_[3]
private

Definition at line 343 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTrackPullHighP_

MonitorElement* Primary4DVertexValidation::meTrackPullHighP_[3]
private

Definition at line 473 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTrackPullHighPTot_

MonitorElement* Primary4DVertexValidation::meTrackPullHighPTot_
private

Definition at line 468 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTrackPullLowP_

MonitorElement* Primary4DVertexValidation::meTrackPullLowP_[3]
private

Definition at line 472 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTrackPullLowPTot_

MonitorElement* Primary4DVertexValidation::meTrackPullLowPTot_
private

Definition at line 467 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTrackPullTot_

MonitorElement* Primary4DVertexValidation::meTrackPullTot_
private

Definition at line 341 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTrackRes_

MonitorElement* Primary4DVertexValidation::meTrackRes_[3]
private

Definition at line 342 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTrackResHighP_

MonitorElement* Primary4DVertexValidation::meTrackResHighP_[3]
private

Definition at line 471 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTrackResHighPTot_

MonitorElement* Primary4DVertexValidation::meTrackResHighPTot_
private

Definition at line 466 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTrackResLowP_

MonitorElement* Primary4DVertexValidation::meTrackResLowP_[3]
private

Definition at line 470 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTrackResLowPTot_

MonitorElement* Primary4DVertexValidation::meTrackResLowPTot_
private

Definition at line 465 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTrackResMass_

MonitorElement* Primary4DVertexValidation::meTrackResMass_[3]
private

Definition at line 344 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTrackResMassPions_

MonitorElement* Primary4DVertexValidation::meTrackResMassPions_[3]
private

Definition at line 477 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTrackResMassProtons_

MonitorElement* Primary4DVertexValidation::meTrackResMassProtons_[3]
private

Definition at line 475 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTrackResMassTrue_

MonitorElement* Primary4DVertexValidation::meTrackResMassTrue_[3]
private

Definition at line 345 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTrackResMassTruePions_

MonitorElement* Primary4DVertexValidation::meTrackResMassTruePions_[3]
private

Definition at line 478 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTrackResMassTrueProtons_

MonitorElement* Primary4DVertexValidation::meTrackResMassTrueProtons_[3]
private

Definition at line 476 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTrackResTot_

MonitorElement* Primary4DVertexValidation::meTrackResTot_
private

Definition at line 340 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTrackZposRes_

MonitorElement* Primary4DVertexValidation::meTrackZposRes_[3]
private

Definition at line 348 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTrackZposResTot_

MonitorElement* Primary4DVertexValidation::meTrackZposResTot_
private

Definition at line 347 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ minProbHeavy_

const double Primary4DVertexValidation::minProbHeavy_
private

Definition at line 293 of file Primary4DVertexValidation.cc.

Referenced by isParticle().

◆ minThrMetPt_

constexpr double Primary4DVertexValidation::minThrMetPt_ = 1.e-3
staticprivate

Definition at line 282 of file Primary4DVertexValidation.cc.

Referenced by analyze().

◆ minThrSumPt2_

constexpr double Primary4DVertexValidation::minThrSumPt2_ = 1.e-3
staticprivate

Definition at line 281 of file Primary4DVertexValidation.cc.

Referenced by analyze().

◆ minThrSumPt_

constexpr double Primary4DVertexValidation::minThrSumPt_ = 0.01
staticprivate

Definition at line 280 of file Primary4DVertexValidation.cc.

Referenced by analyze().

◆ minThrSumPz_

constexpr double Primary4DVertexValidation::minThrSumPz_ = 1.e-4
staticprivate

Definition at line 283 of file Primary4DVertexValidation.cc.

Referenced by analyze().

◆ minThrSumWnt_

constexpr double Primary4DVertexValidation::minThrSumWnt_ = 0.01
staticprivate

Definition at line 278 of file Primary4DVertexValidation.cc.

Referenced by analyze().

◆ minThrSumWos_

constexpr double Primary4DVertexValidation::minThrSumWos_ = 0.1
staticprivate

Definition at line 279 of file Primary4DVertexValidation.cc.

Referenced by analyze().

◆ momentumToken_

edm::EDGetTokenT<edm::ValueMap<float> > Primary4DVertexValidation::momentumToken_
private

Definition at line 313 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and Primary4DVertexValidation().

◆ mvaH_

constexpr double Primary4DVertexValidation::mvaH_ = 0.8
staticprivate

Definition at line 265 of file Primary4DVertexValidation.cc.

Referenced by analyze().

◆ mvaL_

constexpr double Primary4DVertexValidation::mvaL_ = 0.5
staticprivate

Definition at line 264 of file Primary4DVertexValidation.cc.

Referenced by analyze().

◆ mvaTh_

const double Primary4DVertexValidation::mvaTh_
private

Definition at line 295 of file Primary4DVertexValidation.cc.

Referenced by getWosWnt().

◆ NOT_MATCHED

constexpr unsigned int Primary4DVertexValidation::NOT_MATCHED = 66666
staticprivate

Definition at line 261 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and matchReco2Sim().

◆ optionalPlots_

bool Primary4DVertexValidation::optionalPlots_
private

Definition at line 290 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ pathLengthToken_

edm::EDGetTokenT<edm::ValueMap<float> > Primary4DVertexValidation::pathLengthToken_
private

Definition at line 312 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and Primary4DVertexValidation().

◆ pdtToken_

edm::ESGetToken<HepPDT::ParticleDataTable, edm::DefaultRecord> Primary4DVertexValidation::pdtToken_
private

Definition at line 329 of file Primary4DVertexValidation.cc.

Referenced by analyze().

◆ probKToken_

edm::EDGetTokenT<edm::ValueMap<float> > Primary4DVertexValidation::probKToken_
private

Definition at line 327 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and Primary4DVertexValidation().

◆ probPiToken_

edm::EDGetTokenT<edm::ValueMap<float> > Primary4DVertexValidation::probPiToken_
private

Definition at line 326 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and Primary4DVertexValidation().

◆ probPToken_

edm::EDGetTokenT<edm::ValueMap<float> > Primary4DVertexValidation::probPToken_
private

Definition at line 328 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and Primary4DVertexValidation().

◆ pTcut_

constexpr double Primary4DVertexValidation::pTcut_ = 0.7
staticprivate

Definition at line 272 of file Primary4DVertexValidation.cc.

Referenced by trkRecSel(), and trkTPSelLV().

◆ r2s_

const reco::RecoToSimCollection* Primary4DVertexValidation::r2s_
private

◆ rBTL_

constexpr double Primary4DVertexValidation::rBTL_ = 110.0
staticprivate

Definition at line 284 of file Primary4DVertexValidation.cc.

Referenced by trkTPSelLV().

◆ Rec4DVerToken_

edm::EDGetTokenT<edm::View<reco::Vertex> > Primary4DVertexValidation::Rec4DVerToken_
private

Definition at line 309 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and Primary4DVertexValidation().

◆ RecBeamSpotToken_

edm::EDGetTokenT<reco::BeamSpot> Primary4DVertexValidation::RecBeamSpotToken_
private

Definition at line 308 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and Primary4DVertexValidation().

◆ recoToSimAssociationToken_

edm::EDGetTokenT<reco::RecoToSimCollection> Primary4DVertexValidation::recoToSimAssociationToken_
private

Definition at line 307 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and Primary4DVertexValidation().

◆ RecTrackToken_

edm::EDGetTokenT<reco::TrackCollection> Primary4DVertexValidation::RecTrackToken_
private

Definition at line 300 of file Primary4DVertexValidation.cc.

Referenced by Primary4DVertexValidation().

◆ s2r_

const reco::SimToRecoCollection* Primary4DVertexValidation::s2r_
private

Definition at line 298 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and getSimPVs().

◆ selNdof_

constexpr double Primary4DVertexValidation::selNdof_ = 4.
staticprivate

Definition at line 266 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and select().

◆ sigmat0PidToken_

edm::EDGetTokenT<edm::ValueMap<float> > Primary4DVertexValidation::sigmat0PidToken_
private

Definition at line 317 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and Primary4DVertexValidation().

◆ sigmat0SafePidToken_

edm::EDGetTokenT<edm::ValueMap<float> > Primary4DVertexValidation::sigmat0SafePidToken_
private

Definition at line 319 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and Primary4DVertexValidation().

◆ simToRecoAssociationToken_

edm::EDGetTokenT<reco::SimToRecoCollection> Primary4DVertexValidation::simToRecoAssociationToken_
private

Definition at line 306 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and Primary4DVertexValidation().

◆ simUnit_

constexpr double Primary4DVertexValidation::simUnit_ = 1e9
staticprivate

◆ t0PidToken_

edm::EDGetTokenT<edm::ValueMap<float> > Primary4DVertexValidation::t0PidToken_
private

Definition at line 316 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and Primary4DVertexValidation().

◆ t0SafePidToken_

edm::EDGetTokenT<edm::ValueMap<float> > Primary4DVertexValidation::t0SafePidToken_
private

Definition at line 318 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and Primary4DVertexValidation().

◆ timeToken_

edm::EDGetTokenT<edm::ValueMap<float> > Primary4DVertexValidation::timeToken_
private

Definition at line 314 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and Primary4DVertexValidation().

◆ tmtdToken_

edm::EDGetTokenT<edm::ValueMap<float> > Primary4DVertexValidation::tmtdToken_
private

Definition at line 322 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and Primary4DVertexValidation().

◆ tofKToken_

edm::EDGetTokenT<edm::ValueMap<float> > Primary4DVertexValidation::tofKToken_
private

Definition at line 324 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and Primary4DVertexValidation().

◆ tofPiToken_

edm::EDGetTokenT<edm::ValueMap<float> > Primary4DVertexValidation::tofPiToken_
private

Definition at line 323 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and Primary4DVertexValidation().

◆ tofPToken_

edm::EDGetTokenT<edm::ValueMap<float> > Primary4DVertexValidation::tofPToken_
private

Definition at line 325 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and Primary4DVertexValidation().

◆ tol_

constexpr double Primary4DVertexValidation::tol_ = 1.e-4
staticprivate

Definition at line 277 of file Primary4DVertexValidation.cc.

Referenced by analyze().

◆ trackAssocToken_

edm::EDGetTokenT<edm::ValueMap<int> > Primary4DVertexValidation::trackAssocToken_
private

Definition at line 311 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and Primary4DVertexValidation().

◆ trackingParticleCollectionToken_

edm::EDGetTokenT<TrackingParticleCollection> Primary4DVertexValidation::trackingParticleCollectionToken_
private

Definition at line 304 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and Primary4DVertexValidation().

◆ trackingVertexCollectionToken_

edm::EDGetTokenT<TrackingVertexCollection> Primary4DVertexValidation::trackingVertexCollectionToken_
private

Definition at line 305 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and Primary4DVertexValidation().

◆ trackMaxBtlEta_

constexpr double Primary4DVertexValidation::trackMaxBtlEta_ = 1.5
staticprivate

Definition at line 274 of file Primary4DVertexValidation.cc.

Referenced by analyze().

◆ trackMaxEtlEta_

constexpr double Primary4DVertexValidation::trackMaxEtlEta_ = 3.
staticprivate

Definition at line 276 of file Primary4DVertexValidation.cc.

Referenced by analyze().

◆ trackMinEtlEta_

constexpr double Primary4DVertexValidation::trackMinEtlEta_ = 1.6
staticprivate

Definition at line 275 of file Primary4DVertexValidation.cc.

Referenced by analyze().

◆ trackMVAQualToken_

edm::EDGetTokenT<edm::ValueMap<float> > Primary4DVertexValidation::trackMVAQualToken_
private

Definition at line 320 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and Primary4DVertexValidation().

◆ trackweightTh_

const double Primary4DVertexValidation::trackweightTh_
private

Definition at line 294 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and matchReco2Sim().

◆ use3dNoTime_

bool Primary4DVertexValidation::use3dNoTime_
private

Definition at line 291 of file Primary4DVertexValidation.cc.

Referenced by analyze().

◆ use_only_charged_tracks_

bool Primary4DVertexValidation::use_only_charged_tracks_
private

Definition at line 289 of file Primary4DVertexValidation.cc.

Referenced by getSimPVs(), and printSimVtxRecoVtxInfo().

◆ vecPileupSummaryInfoToken_

edm::EDGetTokenT<std::vector<PileupSummaryInfo> > Primary4DVertexValidation::vecPileupSummaryInfoToken_
private

Definition at line 302 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and Primary4DVertexValidation().

◆ zETL_

constexpr double Primary4DVertexValidation::zETL_ = 290.0
staticprivate

Definition at line 285 of file Primary4DVertexValidation.cc.

Referenced by trkTPSelLV().

◆ zWosMatchMax_

constexpr double Primary4DVertexValidation::zWosMatchMax_ = 1.
staticprivate

Definition at line 269 of file Primary4DVertexValidation.cc.

Referenced by matchReco2Sim().