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_
 
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_
 
MonitorElementmeSimPVT_
 
MonitorElementmeSimPVTvsZ_
 
MonitorElementmeSimPVZ_
 
MonitorElementmeSimVerNumber_
 
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_
 
MonitorElementmeVtxTrackMult_
 
MonitorElementmeVtxTrackRecLVMult_
 
MonitorElementmeVtxTrackRecLVW_
 
MonitorElementmeVtxTrackRecLVWnt_
 
MonitorElementmeVtxTrackW_
 
MonitorElementmeVtxTrackWnt_
 
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 525 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_.

526  : folder_(iConfig.getParameter<std::string>("folder")),
527  use_only_charged_tracks_(iConfig.getParameter<bool>("useOnlyChargedTracks")),
528  optionalPlots_(iConfig.getUntrackedParameter<bool>("optionalPlots")),
529  use3dNoTime_(iConfig.getParameter<bool>("use3dNoTime")),
530  minProbHeavy_(iConfig.getParameter<double>("minProbHeavy")),
531  trackweightTh_(iConfig.getParameter<double>("trackweightTh")),
532  mvaTh_(iConfig.getParameter<double>("mvaTh")),
533  pdtToken_(esConsumes<HepPDT::ParticleDataTable, edm::DefaultRecord>()) {
534  vecPileupSummaryInfoToken_ = consumes<std::vector<PileupSummaryInfo>>(edm::InputTag(std::string("addPileupInfo")));
536  consumes<TrackingParticleCollection>(iConfig.getParameter<edm::InputTag>("SimTag"));
537  trackingVertexCollectionToken_ = consumes<TrackingVertexCollection>(iConfig.getParameter<edm::InputTag>("SimTag"));
539  consumes<reco::SimToRecoCollection>(iConfig.getParameter<edm::InputTag>("TPtoRecoTrackAssoc"));
541  consumes<reco::RecoToSimCollection>(iConfig.getParameter<edm::InputTag>("TPtoRecoTrackAssoc"));
542  RecTrackToken_ = consumes<reco::TrackCollection>(iConfig.getParameter<edm::InputTag>("mtdTracks"));
543  RecBeamSpotToken_ = consumes<reco::BeamSpot>(iConfig.getParameter<edm::InputTag>("offlineBS"));
544  Rec4DVerToken_ = consumes<edm::View<reco::Vertex>>(iConfig.getParameter<edm::InputTag>("offline4DPV"));
545  trackAssocToken_ = consumes<edm::ValueMap<int>>(iConfig.getParameter<edm::InputTag>("trackAssocSrc"));
546  pathLengthToken_ = consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("pathLengthSrc"));
547  momentumToken_ = consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("momentumSrc"));
548  timeToken_ = consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("timeSrc"));
549  t0PidToken_ = consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("t0PID"));
550  sigmat0PidToken_ = consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("sigmat0PID"));
551  t0SafePidToken_ = consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("t0SafePID"));
552  sigmat0SafePidToken_ = consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("sigmat0SafePID"));
553  trackMVAQualToken_ = consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("trackMVAQual"));
554  tmtdToken_ = consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("tmtd"));
555  tofPiToken_ = consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("tofPi"));
556  tofKToken_ = consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("tofK"));
557  tofPToken_ = consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("tofP"));
558  probPiToken_ = consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("probPi"));
559  probKToken_ = consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("probK"));
560  probPToken_ = consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("probP"));
561 }
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_
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 563 of file Primary4DVertexValidation.cc.

563 {}

Member Function Documentation

◆ analyze()

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

Reimplemented from DQMEDAnalyzer.

Definition at line 1978 of file Primary4DVertexValidation.cc.

References funct::abs(), gather_cfg::cout, PVValHelper::d3D, deltaZcut_, dt, PVValHelper::dz, l1ctLayer1_cff::dZ, dqm::impl::MonitorElement::Fill(), edm::EventSetup::getHandle(), getMatchedTP(), getRecoPVs(), getSimPVs(), getWosWnt(), caHitNtupletGeneratorKernels::iev, iEvent, isParticle(), edm::HandleBase::isValid(), ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::iv, LogTrace, EgHLTOffHistBins_cfi::mass, matchReco2Sim(), WZElectronSkims53X_cff::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_, meRecPVT_, meRecPVZ_, meRecVerNumber_, meSecTrackRecLVRelSumWos_, meSecTrackRecLVRelSumWosvsSumWos_, meSecTrackRecLVSumWos_, meSecTrackRelSumWos_, meSecTrackRelSumWosvsSumWos_, meSecTrackSumWos_, meSimPosInSimOrigCollection_, meSimPVT_, meSimPVTvsZ_, meSimPVZ_, meSimVerNumber_, 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_, meVtxTrackMult_, meVtxTrackRecLVMult_, meVtxTrackRecLVW_, meVtxTrackRecLVWnt_, meVtxTrackW_, meVtxTrackWnt_, 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, and bphysicsOniaDQM_cfi::vertex.

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

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

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

2750  {
2752 
2753  desc.add<std::string>("folder", "MTD/Vertices");
2754  desc.add<edm::InputTag>("TPtoRecoTrackAssoc", edm::InputTag("trackingParticleRecoTrackAsssociation"));
2755  desc.add<edm::InputTag>("mtdTracks", edm::InputTag("trackExtenderWithMTD"));
2756  desc.add<edm::InputTag>("SimTag", edm::InputTag("mix", "MergedTrackTruth"));
2757  desc.add<edm::InputTag>("offlineBS", edm::InputTag("offlineBeamSpot"));
2758  desc.add<edm::InputTag>("offline4DPV", edm::InputTag("offlinePrimaryVertices4D"));
2759  desc.add<edm::InputTag>("trackAssocSrc", edm::InputTag("trackExtenderWithMTD:generalTrackassoc"))
2760  ->setComment("Association between General and MTD Extended tracks");
2761  desc.add<edm::InputTag>("pathLengthSrc", edm::InputTag("trackExtenderWithMTD:generalTrackPathLength"));
2762  desc.add<edm::InputTag>("momentumSrc", edm::InputTag("trackExtenderWithMTD:generalTrackp"));
2763  desc.add<edm::InputTag>("tmtd", edm::InputTag("trackExtenderWithMTD:generalTracktmtd"));
2764  desc.add<edm::InputTag>("timeSrc", edm::InputTag("trackExtenderWithMTD:generalTracktmtd"));
2765  desc.add<edm::InputTag>("sigmaSrc", edm::InputTag("trackExtenderWithMTD:generalTracksigmatmtd"));
2766  desc.add<edm::InputTag>("t0PID", edm::InputTag("tofPID:t0"));
2767  desc.add<edm::InputTag>("sigmat0PID", edm::InputTag("tofPID:sigmat0"));
2768  desc.add<edm::InputTag>("t0SafePID", edm::InputTag("tofPID:t0safe"));
2769  desc.add<edm::InputTag>("sigmat0SafePID", edm::InputTag("tofPID:sigmat0safe"));
2770  desc.add<edm::InputTag>("trackMVAQual", edm::InputTag("mtdTrackQualityMVA:mtdQualMVA"));
2771  desc.add<edm::InputTag>("tofPi", edm::InputTag("trackExtenderWithMTD:generalTrackTofPi"));
2772  desc.add<edm::InputTag>("tofK", edm::InputTag("trackExtenderWithMTD:generalTrackTofK"));
2773  desc.add<edm::InputTag>("tofP", edm::InputTag("trackExtenderWithMTD:generalTrackTofP"));
2774  desc.add<edm::InputTag>("probPi", edm::InputTag("tofPID:probPi"));
2775  desc.add<edm::InputTag>("probK", edm::InputTag("tofPID:probK"));
2776  desc.add<edm::InputTag>("probP", edm::InputTag("tofPID:probP"));
2777  desc.add<bool>("useOnlyChargedTracks", true);
2778  desc.addUntracked<bool>("optionalPlots", false);
2779  desc.add<bool>("use3dNoTime", false);
2780  desc.add<double>("trackweightTh", 0.5);
2781  desc.add<double>("mvaTh", 0.8);
2782  desc.add<double>("minProbHeavy", 0.75);
2783  descriptions.add("vertices4DValid", desc);
2784 }
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 1399 of file Primary4DVertexValidation.cc.

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

Referenced by analyze(), and matchReco2Sim().

1400  {
1401  auto found = r2s_->find(recoTrack);
1402 
1403  // reco track not matched to any TP (fake tracks)
1404  if (found == r2s_->end())
1405  return std::make_pair(nullptr, -1);
1406 
1407  // matched TP equal to any TP of a given sim vertex
1408  for (const auto& tp : found->val) {
1409  if (std::find_if(vsim->daughterTracks_begin(), vsim->daughterTracks_end(), [&](const TrackingParticleRef& vtp) {
1410  return tp.first == vtp;
1411  }) != vsim->daughterTracks_end())
1412  return std::make_pair(&tp.first, 0);
1413  // matched TP not associated to any daughter track of a given sim vertex but having the same eventID (track from secondary vtx)
1414  else if (tp.first->eventId().bunchCrossing() == vsim->eventId().bunchCrossing() &&
1415  tp.first->eventId().event() == vsim->eventId().event()) {
1416  return std::make_pair(&tp.first, 1);
1417  }
1418  // matched TP not associated to any sim vertex of a given simulated event (PU track)
1419  else {
1420  return std::make_pair(&tp.first, 2);
1421  }
1422  }
1423 
1424  // reco track not matched to any TP from vertex
1425  return std::make_pair(nullptr, -1);
1426 }
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 1690 of file Primary4DVertexValidation.cc.

References funct::abs(), HLT_2024v14_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().

1691  {
1692  std::vector<Primary4DVertexValidation::recoPrimaryVertex> recopv;
1693  int r = -1;
1694  for (auto v = tVC->begin(); v != tVC->end(); ++v) {
1695  r++;
1696  // Skip junk vertices
1697  if (std::abs(v->z()) > 1000)
1698  continue;
1699  if (v->isFake() || !v->isValid())
1700  continue;
1701 
1702  recoPrimaryVertex sv(v->position().x(), v->position().y(), v->position().z());
1703  sv.recVtx = &(*v);
1704  sv.recVtxRef = reco::VertexBaseRef(tVC, std::distance(tVC->begin(), v));
1705 
1706  sv.OriginalIndex = r;
1707  sv.ndof = v->ndof();
1708  // this is a new vertex, add it to the list of reco-vertices
1709  recopv.push_back(sv);
1710  Primary4DVertexValidation::recoPrimaryVertex* vp = &recopv.back();
1711 
1712  // Loop over daughter track(s)
1713  for (auto iTrack = v->tracks_begin(); iTrack != v->tracks_end(); ++iTrack) {
1714  auto momentum = (*(*iTrack)).innerMomentum();
1715  if (momentum.mag2() == 0)
1716  momentum = (*(*iTrack)).momentum();
1717  vp->pt += std::sqrt(momentum.perp2());
1718  vp->ptsq += (momentum.perp2());
1719  vp->nRecoTrk++;
1720 
1721  auto matched = r2s_->find(*iTrack);
1722  if (matched != r2s_->end()) {
1723  vp->num_matched_sim_tracks++;
1724  }
1725 
1726  } // End of for loop on daughters reconstructed tracks
1727  } // End of for loop on tracking vertices
1728 
1729  // In case of no reco vertices, break here
1730  if (recopv.empty())
1731  return recopv;
1732 
1733  // Now compute the closest distance in z between all reconstructed vertex
1734  // first initialize
1735  auto prev_z = recopv.back().z;
1736  for (recoPrimaryVertex& vreco : recopv) {
1737  vreco.closest_vertex_distance_z = std::abs(vreco.z - prev_z);
1738  prev_z = vreco.z;
1739  }
1740  for (std::vector<recoPrimaryVertex>::iterator vreco = recopv.begin(); vreco != recopv.end(); vreco++) {
1741  std::vector<recoPrimaryVertex>::iterator vreco2 = vreco;
1742  vreco2++;
1743  for (; vreco2 != recopv.end(); vreco2++) {
1744  double distance = std::abs(vreco->z - vreco2->z);
1745  // need both to be complete
1746  vreco->closest_vertex_distance_z = std::min(vreco->closest_vertex_distance_z, distance);
1747  vreco2->closest_vertex_distance_z = std::min(vreco2->closest_vertex_distance_z, distance);
1748  }
1749  }
1750  return recopv;
1751 }
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 1588 of file Primary4DVertexValidation.cc.

References funct::abs(), cms::cuda::assert(), Primary4DVertexValidation::simPrimaryVertex::average_match_quality, HLT_2024v14_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().

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

1568  {
1569  double dz2_beam = pow((*BS).BeamWidthX() * cos(recoTrk->phi()) / tan(recoTrk->theta()), 2) +
1570  pow((*BS).BeamWidthY() * sin(recoTrk->phi()) / tan(recoTrk->theta()), 2);
1571  double dz2 =
1572  pow(recoTrk->dzError(), 2) + dz2_beam + pow(0.0020, 2); // added 20 um, some tracks have crazy small resolutions
1573  wos = recoVtx.trackWeight(recoTrk) / dz2;
1574  wnt = recoVtx.trackWeight(recoTrk) *
1575  std::min(recoTrk->pt(), 1.0); // pt-weighted number of tracks (downweights pt < 1 GeV tracks)
1576 
1577  // If tracks have time information, give more weight to tracks with good resolution
1578  if (sigmat0[recoTrk] > 0 && mtdQualMVA[recoTrk] > mvaTh_) {
1579  double sigmaZ = (*BS).sigmaZ();
1580  double sigmaT = sigmaZ / c_; // c in cm/ns
1581  wos = wos / erf(sigmat0[recoTrk] / sigmaT);
1582  }
1583 }
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 1532 of file Primary4DVertexValidation.cc.

References edm::isNotFinite(), and minProbHeavy_.

Referenced by analyze().

1542  {
1543  no_PIDtype = 0;
1544  no_PID = false;
1545  is_Pi = false;
1546  is_K = false;
1547  is_P = false;
1548  if (probPi[recoTrack] == -1) {
1549  no_PIDtype = 1;
1550  } else if (edm::isNotFinite(probPi[recoTrack])) {
1551  no_PIDtype = 2;
1552  } else if (probPi[recoTrack] == 1 && probK[recoTrack] == 0 && probP[recoTrack] == 0 &&
1553  sigmat0[recoTrack] < sigmat0Safe[recoTrack]) {
1554  no_PIDtype = 3;
1555  }
1556  no_PID = no_PIDtype > 0;
1557  is_Pi = !no_PID && 1. - probPi[recoTrack] < minProbHeavy_;
1558  is_K = !no_PID && !is_Pi && probK[recoTrack] > probP[recoTrack];
1559  is_P = !no_PID && !is_Pi && !is_K;
1560 }
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 1754 of file Primary4DVertexValidation.cc.

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

Referenced by analyze().

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

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

1382  {
1383  auto found = r2s_->find(recoTrack);
1384 
1385  // reco track not matched to any TP
1386  if (found == r2s_->end())
1387  return false;
1388 
1390  for (const auto& tp : found->val) {
1391  if (tp.first->eventId().bunchCrossing() == 0 && tp.first->eventId().event() == 0)
1392  return true;
1393  }
1394 
1395  // reco track not matched to any TP from signal vertex
1396  return false;
1397 }
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 1459 of file Primary4DVertexValidation.cc.

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

Referenced by analyze().

1467  {
1468  double sum_PtJets = 0;
1469  n_Jets = 0;
1470  sum_EtJets = 0;
1471  sum_Pt2Jets = 0;
1472  met_Pt = 0;
1473  sum_PzJets = 0;
1474  auto met = LorentzVector(0, 0, 0, 0);
1475  std::vector<fastjet::PseudoJet> fjInputs_;
1476  fjInputs_.clear();
1477  size_t countScale0 = 0;
1478  for (size_t i = 0; i < reco_Tracks.size(); i++) {
1479  const auto recotr = reco_Tracks[i];
1480  const auto mass = mass_Tracks[i];
1481  float scale = 1.;
1482  if (recotr.charge() == 0) {
1483  continue;
1484  }
1485  // skip PU tracks in jet definition if skip_PU is required
1486  if (skip_Tracks == "skip_PU" && category_Tracks[i] == 2) {
1487  continue;
1488  }
1489  // skip fake tracks in jet definition if skip_Fake is required
1490  if (skip_Tracks == "skip_Fake" && category_Tracks[i] == -1) {
1491  continue;
1492  }
1493  if (recotr.pt() != 0) {
1494  scale = (recotr.pt() - recotr.ptError()) / recotr.pt();
1495  }
1496  if (edm::isNotFinite(scale)) {
1497  edm::LogWarning("Primary4DVertexValidation") << "Scaling is NAN ignoring this recotrack" << std::endl;
1498  scale = 0;
1499  }
1500  if (scale < 0) {
1501  scale = 0;
1502  countScale0++;
1503  }
1504  if (scale != 0) {
1505  fjInputs_.push_back(fastjet::PseudoJet(recotr.px() * scale,
1506  recotr.py() * scale,
1507  recotr.pz() * scale,
1508  std::sqrt(recotr.p() * recotr.p() + mass * mass) * scale));
1509  }
1510  }
1511  fastjet::ClusterSequence sequence(fjInputs_, fastjet::JetDefinition(fastjet::antikt_algorithm, 0.4));
1512  auto jets = fastjet::sorted_by_pt(sequence.inclusive_jets(0));
1513  for (const auto& pj : jets) {
1514  auto p4 = LorentzVector(pj.px(), pj.py(), pj.pz(), pj.e());
1515  sum_EtJets += std::sqrt(p4.e() * p4.e() - p4.P() * p4.P() + p4.pt() * p4.pt());
1516  sum_PtJets += p4.pt();
1517  sum_Pt2Jets += (p4.pt() * p4.pt() * 0.8 * 0.8);
1518  met += p4;
1519  sum_PzJets += p4.pz();
1520  n_Jets++;
1521  }
1522  met_Pt = met.pt();
1523  double metAbove = met_Pt - 2 * std::sqrt(sum_PtJets);
1524  if (metAbove > 0) {
1525  sum_Pt2Jets += (metAbove * metAbove);
1526  }
1527  if (countScale0 == reco_Tracks.size()) {
1528  sum_Pt2Jets = countScale0 * 0.01; //leave some epsilon value to sort vertices with unknown pt
1529  }
1530 }
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 2786 of file Primary4DVertexValidation.cc.

References LogTrace, simUnit_, AlCaHLTBitMon_QueryRunRegistry::string, cmsswSequenceInfo::tp, trk, and L1BJetProducer_cff::vtx.

Referenced by analyze().

2789  {
2790  std::string strTrk;
2791  switch (categ) {
2792  case 0:
2793  strTrk = "Reco_Track:";
2794  break;
2795  case 1:
2796  strTrk = "SecRecoTrk:";
2797  break;
2798  case 2:
2799  strTrk = "PU_RecoTrk:";
2800  break;
2801  }
2802  LogTrace("Primary4DVertexValidation") << strTrk << " w =" << std::setw(6) << std::setprecision(2)
2803  << vtx.trackWeight(trk) << " pt =" << std::setw(6) << std::setprecision(2)
2804  << trk->pt() << " eta =" << std::setw(6) << std::setprecision(2) << trk->eta()
2805  << " MatchedTP: Pt =" << std::setw(6) << std::setprecision(2) << tp->pt()
2806  << " eta =" << std::setw(6) << std::setprecision(2) << tp->eta()
2807  << " Parent vtx: z =" << std::setw(8) << std::setprecision(4)
2808  << tp->parentVertex()->position().z() << " t =" << std::setw(8)
2809  << std::setprecision(4) << tp->parentVertex()->position().t() * simUnit_
2810  << " BX =" << tp->parentVertex()->eventId().bunchCrossing()
2811  << " ev =" << tp->parentVertex()->eventId().event() << std::endl;
2812 }
Trktree trk
Definition: Trktree.cc:2
#define LogTrace(id)

◆ printSimVtxRecoVtxInfo()

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

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

2816  {
2817  LogTrace("Primary4DVertexValidation") << "Sim vtx (x,y,z,t) = (" << std::setprecision(4) << simpVtx.x << ","
2818  << std::setprecision(4) << simpVtx.y << "," << std::setprecision(4) << simpVtx.z
2819  << "," << std::setprecision(4) << simpVtx.t * simUnit_ << ")"
2820  << " Simvtx.rec = " << simpVtx.rec;
2821  LogTrace("Primary4DVertexValidation") << "Sim vtx: pt = " << std::setprecision(4) << simpVtx.pt
2822  << " ptsq = " << std::setprecision(6) << simpVtx.ptsq
2823  << " nGenTrk = " << simpVtx.nGenTrk
2824  << " nmatch recotrks = " << simpVtx.num_matched_reco_tracks;
2825  LogTrace("Primary4DVertexValidation") << "Reco vtx (x,y,z) = (" << std::setprecision(4) << recopVtx.x << ","
2826  << std::setprecision(4) << recopVtx.y << "," << std::setprecision(4)
2827  << recopVtx.z << ")"
2828  << " Recovtx.sim = " << recopVtx.sim;
2829  LogTrace("Primary4DVertexValidation") << "Reco vtx: pt = " << std::setprecision(4) << recopVtx.pt
2830  << " ptsq = " << std::setprecision(6) << recopVtx.ptsq
2831  << " nrecotrks = " << recopVtx.nRecoTrk
2832  << " nmatch simtrks = " << recopVtx.num_matched_sim_tracks;
2833  LogTrace("Primary4DVertexValidation") << "wnt " << recopVtx.sumwnt << " wos = " << recopVtx.sumwos;
2834  for (auto iTP = simpVtx.sim_vertex->daughterTracks_begin(); iTP != simpVtx.sim_vertex->daughterTracks_end(); ++iTP) {
2835  if (use_only_charged_tracks_ && (**iTP).charge() == 0) {
2836  continue;
2837  }
2838  LogTrace("Primary4DVertexValidation")
2839  << "Daughter track of sim vertex: pt =" << std::setw(6) << std::setprecision(2) << (*iTP)->pt()
2840  << " eta =" << std::setw(6) << std::setprecision(2) << (*iTP)->eta();
2841  }
2842 }
#define LogTrace(id)

◆ select()

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

Definition at line 1440 of file Primary4DVertexValidation.cc.

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

Referenced by analyze().

1440  {
1441  /* level
1442  0 !isFake && ndof>4 (default)
1443  1 !isFake && ndof>4 && prob > 0.01
1444  2 !isFake && ndof>4 && prob > 0.01 && ptmax2 > 0.4
1445  */
1446  if (v.isFake())
1447  return false;
1448  if ((level == 0) && (v.ndof() > selNdof_))
1449  return true;
1450  /*if ((level == 1) && (v.ndof() > selNdof_) && (vertex_pxy(v) > 0.01))
1451  return true;
1452  if ((level == 2) && (v.ndof() > selNdof_) && (vertex_pxy(v) > 0.01) && (vertex_ptmax2(v) > 0.4))
1453  return true;
1454  if ((level == 3) && (v.ndof() > selNdof_) && (vertex_ptmax2(v) < 0.4))
1455  return true;*/
1456  return false;
1457 }

◆ timeFromTrueMass()

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

Definition at line 1428 of file Primary4DVertexValidation.cc.

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

Referenced by analyze().

1428  {
1429  if (time > 0 && pathlength > 0 && mass > 0) {
1430  double gammasq = 1. + momentum * momentum / (mass * mass);
1431  double v = c_ * std::sqrt(1. - 1. / gammasq); // cm / ns
1432  double t_est = time - (pathlength / v);
1433 
1434  return t_est;
1435  } else {
1436  return -1;
1437  }
1438 }
T sqrt(T t)
Definition: SSEVec.h:23

◆ trkRecSel()

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

Definition at line 2861 of file Primary4DVertexValidation.cc.

References funct::abs(), etacutREC_, match(), pTcut_, and trk.

Referenced by analyze().

2861  {
2862  bool match = false;
2863  match = std::abs(trk.eta()) <= etacutREC_ && trk.pt() > pTcut_;
2864  return match;
2865 }
static constexpr double etacutREC_
Trktree trk
Definition: Trktree.cc:2
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

◆ trkTPSelLV()

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

Definition at line 2844 of file Primary4DVertexValidation.cc.

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

Referenced by analyze().

2844  {
2845  bool match = false;
2846  if (tp.status() != 1) {
2847  return match;
2848  }
2849 
2850  auto x_pv = tp.parentVertex()->position().x();
2851  auto y_pv = tp.parentVertex()->position().y();
2852  auto z_pv = tp.parentVertex()->position().z();
2853 
2854  auto r_pv = std::sqrt(x_pv * x_pv + y_pv * y_pv);
2855 
2856  match =
2857  tp.charge() != 0 && std::abs(tp.eta()) < etacutGEN_ && tp.pt() > pTcut_ && r_pv < rBTL_ && std::abs(z_pv) < zETL_;
2858  return match;
2859 }
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().

◆ 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 492 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meBarrelPIDp_

MonitorElement* Primary4DVertexValidation::meBarrelPIDp_
private

Definition at line 489 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meBarrelTrueKAsK_

MonitorElement* Primary4DVertexValidation::meBarrelTrueKAsK_
private

Definition at line 510 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meBarrelTrueKAsP_

MonitorElement* Primary4DVertexValidation::meBarrelTrueKAsP_
private

Definition at line 511 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meBarrelTrueKAsPi_

MonitorElement* Primary4DVertexValidation::meBarrelTrueKAsPi_
private

Definition at line 509 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meBarrelTrueKNoPID_

MonitorElement* Primary4DVertexValidation::meBarrelTrueKNoPID_
private

Definition at line 496 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meBarrelTruePAsK_

MonitorElement* Primary4DVertexValidation::meBarrelTruePAsK_
private

Definition at line 517 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meBarrelTruePAsP_

MonitorElement* Primary4DVertexValidation::meBarrelTruePAsP_
private

Definition at line 518 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meBarrelTruePAsPi_

MonitorElement* Primary4DVertexValidation::meBarrelTruePAsPi_
private

Definition at line 516 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meBarrelTruePiAsK_

MonitorElement* Primary4DVertexValidation::meBarrelTruePiAsK_
private

Definition at line 503 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meBarrelTruePiAsP_

MonitorElement* Primary4DVertexValidation::meBarrelTruePiAsP_
private

Definition at line 504 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meBarrelTruePiAsPi_

MonitorElement* Primary4DVertexValidation::meBarrelTruePiAsPi_
private

Definition at line 502 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meBarrelTruePiNoPID_

MonitorElement* Primary4DVertexValidation::meBarrelTruePiNoPID_
private

Definition at line 495 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meBarrelTruePNoPID_

MonitorElement* Primary4DVertexValidation::meBarrelTruePNoPID_
private

Definition at line 497 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meDeltaTfakefake_

MonitorElement* Primary4DVertexValidation::meDeltaTfakefake_
private

Definition at line 362 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meDeltaTfakereal_

MonitorElement* Primary4DVertexValidation::meDeltaTfakereal_
private

Definition at line 363 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meDeltaTrealreal_

MonitorElement* Primary4DVertexValidation::meDeltaTrealreal_
private

Definition at line 361 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meDeltaZfakefake_

MonitorElement* Primary4DVertexValidation::meDeltaZfakefake_
private

Definition at line 359 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meDeltaZfakereal_

MonitorElement* Primary4DVertexValidation::meDeltaZfakereal_
private

Definition at line 360 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meDeltaZrealreal_

MonitorElement* Primary4DVertexValidation::meDeltaZrealreal_
private

Definition at line 358 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meEndcapNoPIDtype_

MonitorElement* Primary4DVertexValidation::meEndcapNoPIDtype_
private

Definition at line 493 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meEndcapPIDp_

MonitorElement* Primary4DVertexValidation::meEndcapPIDp_
private

Definition at line 490 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meEndcapTrueKAsK_

MonitorElement* Primary4DVertexValidation::meEndcapTrueKAsK_
private

Definition at line 513 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meEndcapTrueKAsP_

MonitorElement* Primary4DVertexValidation::meEndcapTrueKAsP_
private

Definition at line 514 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meEndcapTrueKAsPi_

MonitorElement* Primary4DVertexValidation::meEndcapTrueKAsPi_
private

Definition at line 512 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meEndcapTrueKNoPID_

MonitorElement* Primary4DVertexValidation::meEndcapTrueKNoPID_
private

Definition at line 499 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meEndcapTruePAsK_

MonitorElement* Primary4DVertexValidation::meEndcapTruePAsK_
private

Definition at line 520 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meEndcapTruePAsP_

MonitorElement* Primary4DVertexValidation::meEndcapTruePAsP_
private

Definition at line 521 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meEndcapTruePAsPi_

MonitorElement* Primary4DVertexValidation::meEndcapTruePAsPi_
private

Definition at line 519 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meEndcapTruePiAsK_

MonitorElement* Primary4DVertexValidation::meEndcapTruePiAsK_
private

Definition at line 506 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meEndcapTruePiAsP_

MonitorElement* Primary4DVertexValidation::meEndcapTruePiAsP_
private

Definition at line 507 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meEndcapTruePiAsPi_

MonitorElement* Primary4DVertexValidation::meEndcapTruePiAsPi_
private

Definition at line 505 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meEndcapTruePiNoPID_

MonitorElement* Primary4DVertexValidation::meEndcapTruePiNoPID_
private

Definition at line 498 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meEndcapTruePNoPID_

MonitorElement* Primary4DVertexValidation::meEndcapTruePNoPID_
private

Definition at line 500 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meFakeTrackRecLVRelMult_

MonitorElement* Primary4DVertexValidation::meFakeTrackRecLVRelMult_
private

Definition at line 412 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meFakeTrackRecLVRelMultvsMult_

MonitorElement* Primary4DVertexValidation::meFakeTrackRecLVRelMultvsMult_
private

Definition at line 427 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meFakeTrackRecLVRelSumWos_

MonitorElement* Primary4DVertexValidation::meFakeTrackRecLVRelSumWos_
private

Definition at line 419 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meFakeTrackRecLVRelSumWosvsSumWos_

MonitorElement* Primary4DVertexValidation::meFakeTrackRecLVRelSumWosvsSumWos_
private

Definition at line 431 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meFakeTrackRelMult_

MonitorElement* Primary4DVertexValidation::meFakeTrackRelMult_
private

Definition at line 387 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meFakeTrackRelMultvsMult_

MonitorElement* Primary4DVertexValidation::meFakeTrackRelMultvsMult_
private

Definition at line 402 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meFakeTrackRelSumWos_

MonitorElement* Primary4DVertexValidation::meFakeTrackRelSumWos_
private

Definition at line 394 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meFakeTrackRelSumWosvsSumWos_

MonitorElement* Primary4DVertexValidation::meFakeTrackRelSumWosvsSumWos_
private

Definition at line 405 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meJetsFakeRelSumPt2_

MonitorElement* Primary4DVertexValidation::meJetsFakeRelSumPt2_
private

Definition at line 443 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meJetsFakeRelSumPt2vsSumPt2_

MonitorElement* Primary4DVertexValidation::meJetsFakeRelSumPt2vsSumPt2_
private

Definition at line 450 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meJetsPUHt_

MonitorElement* Primary4DVertexValidation::meJetsPUHt_
private

Definition at line 436 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meJetsPUMetPt_

MonitorElement* Primary4DVertexValidation::meJetsPUMetPt_
private

Definition at line 438 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meJetsPUMult_

MonitorElement* Primary4DVertexValidation::meJetsPUMult_
private

Definition at line 435 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meJetsPURelHt_

MonitorElement* Primary4DVertexValidation::meJetsPURelHt_
private

Definition at line 441 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meJetsPURelHtvsHt_

MonitorElement* Primary4DVertexValidation::meJetsPURelHtvsHt_
private

Definition at line 448 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meJetsPURelMetPt_

MonitorElement* Primary4DVertexValidation::meJetsPURelMetPt_
private

Definition at line 444 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meJetsPURelMetPtvsMetPt_

MonitorElement* Primary4DVertexValidation::meJetsPURelMetPtvsMetPt_
private

Definition at line 451 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meJetsPURelMult_

MonitorElement* Primary4DVertexValidation::meJetsPURelMult_
private

Definition at line 440 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meJetsPURelMultvsMult_

MonitorElement* Primary4DVertexValidation::meJetsPURelMultvsMult_
private

Definition at line 447 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meJetsPURelSumPt2_

MonitorElement* Primary4DVertexValidation::meJetsPURelSumPt2_
private

Definition at line 442 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meJetsPURelSumPt2vsSumPt2_

MonitorElement* Primary4DVertexValidation::meJetsPURelSumPt2vsSumPt2_
private

Definition at line 449 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meJetsPURelSumPz_

MonitorElement* Primary4DVertexValidation::meJetsPURelSumPz_
private

Definition at line 445 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meJetsPURelSumPzvsSumPz_

MonitorElement* Primary4DVertexValidation::meJetsPURelSumPzvsSumPz_
private

Definition at line 452 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meJetsPUSumPt2_

MonitorElement* Primary4DVertexValidation::meJetsPUSumPt2_
private

Definition at line 437 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meJetsPUSumPz_

MonitorElement* Primary4DVertexValidation::meJetsPUSumPz_
private

Definition at line 439 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meJetsRecLVFakeRelSumPt2_

MonitorElement* Primary4DVertexValidation::meJetsRecLVFakeRelSumPt2_
private

Definition at line 462 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meJetsRecLVFakeRelSumPt2vsSumPt2_

MonitorElement* Primary4DVertexValidation::meJetsRecLVFakeRelSumPt2vsSumPt2_
private

Definition at line 469 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meJetsRecLVPUHt_

MonitorElement* Primary4DVertexValidation::meJetsRecLVPUHt_
private

Definition at line 455 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meJetsRecLVPUMetPt_

MonitorElement* Primary4DVertexValidation::meJetsRecLVPUMetPt_
private

Definition at line 457 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meJetsRecLVPUMult_

MonitorElement* Primary4DVertexValidation::meJetsRecLVPUMult_
private

Definition at line 454 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meJetsRecLVPURelHt_

MonitorElement* Primary4DVertexValidation::meJetsRecLVPURelHt_
private

Definition at line 460 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meJetsRecLVPURelHtvsHt_

MonitorElement* Primary4DVertexValidation::meJetsRecLVPURelHtvsHt_
private

Definition at line 467 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meJetsRecLVPURelMetPt_

MonitorElement* Primary4DVertexValidation::meJetsRecLVPURelMetPt_
private

Definition at line 463 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meJetsRecLVPURelMetPtvsMetPt_

MonitorElement* Primary4DVertexValidation::meJetsRecLVPURelMetPtvsMetPt_
private

Definition at line 470 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meJetsRecLVPURelMult_

MonitorElement* Primary4DVertexValidation::meJetsRecLVPURelMult_
private

Definition at line 459 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meJetsRecLVPURelMultvsMult_

MonitorElement* Primary4DVertexValidation::meJetsRecLVPURelMultvsMult_
private

Definition at line 466 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meJetsRecLVPURelSumPt2_

MonitorElement* Primary4DVertexValidation::meJetsRecLVPURelSumPt2_
private

Definition at line 461 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meJetsRecLVPURelSumPt2vsSumPt2_

MonitorElement* Primary4DVertexValidation::meJetsRecLVPURelSumPt2vsSumPt2_
private

Definition at line 468 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meJetsRecLVPURelSumPz_

MonitorElement* Primary4DVertexValidation::meJetsRecLVPURelSumPz_
private

Definition at line 464 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meJetsRecLVPURelSumPzvsSumPz_

MonitorElement* Primary4DVertexValidation::meJetsRecLVPURelSumPzvsSumPz_
private

Definition at line 471 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meJetsRecLVPUSumPt2_

MonitorElement* Primary4DVertexValidation::meJetsRecLVPUSumPt2_
private

Definition at line 456 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meJetsRecLVPUSumPz_

MonitorElement* Primary4DVertexValidation::meJetsRecLVPUSumPz_
private

Definition at line 458 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meMatchQual_

MonitorElement* Primary4DVertexValidation::meMatchQual_
private

Definition at line 357 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUTrackMult_

MonitorElement* Primary4DVertexValidation::mePUTrackMult_
private

Definition at line 385 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUTrackRecLVMult_

MonitorElement* Primary4DVertexValidation::mePUTrackRecLVMult_
private

Definition at line 410 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUTrackRecLVRelMult_

MonitorElement* Primary4DVertexValidation::mePUTrackRecLVRelMult_
private

Definition at line 411 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUTrackRecLVRelMultvsMult_

MonitorElement* Primary4DVertexValidation::mePUTrackRecLVRelMultvsMult_
private

Definition at line 426 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUTrackRecLVRelSumPt2_

MonitorElement* Primary4DVertexValidation::mePUTrackRecLVRelSumPt2_
private

Definition at line 424 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUTrackRecLVRelSumPt2vsSumPt2_

MonitorElement* Primary4DVertexValidation::mePUTrackRecLVRelSumPt2vsSumPt2_
private

Definition at line 433 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUTrackRecLVRelSumPt_

MonitorElement* Primary4DVertexValidation::mePUTrackRecLVRelSumPt_
private

Definition at line 422 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUTrackRecLVRelSumPtvsSumPt_

MonitorElement* Primary4DVertexValidation::mePUTrackRecLVRelSumPtvsSumPt_
private

Definition at line 432 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUTrackRecLVRelSumWnt_

MonitorElement* Primary4DVertexValidation::mePUTrackRecLVRelSumWnt_
private

Definition at line 414 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUTrackRecLVRelSumWntvsSumWnt_

MonitorElement* Primary4DVertexValidation::mePUTrackRecLVRelSumWntvsSumWnt_
private

Definition at line 428 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUTrackRecLVRelSumWos_

MonitorElement* Primary4DVertexValidation::mePUTrackRecLVRelSumWos_
private

Definition at line 416 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUTrackRecLVRelSumWosvsSumWos_

MonitorElement* Primary4DVertexValidation::mePUTrackRecLVRelSumWosvsSumWos_
private

Definition at line 429 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUTrackRecLVSumPt2_

MonitorElement* Primary4DVertexValidation::mePUTrackRecLVSumPt2_
private

Definition at line 423 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUTrackRecLVSumPt_

MonitorElement* Primary4DVertexValidation::mePUTrackRecLVSumPt_
private

Definition at line 421 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUTrackRecLVSumWnt_

MonitorElement* Primary4DVertexValidation::mePUTrackRecLVSumWnt_
private

Definition at line 413 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUTrackRecLVSumWos_

MonitorElement* Primary4DVertexValidation::mePUTrackRecLVSumWos_
private

Definition at line 415 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUTrackRecLVWnt_

MonitorElement* Primary4DVertexValidation::mePUTrackRecLVWnt_
private

Definition at line 420 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUTrackRelMult_

MonitorElement* Primary4DVertexValidation::mePUTrackRelMult_
private

Definition at line 386 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUTrackRelMultvsMult_

MonitorElement* Primary4DVertexValidation::mePUTrackRelMultvsMult_
private

Definition at line 401 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUTrackRelSumPt2_

MonitorElement* Primary4DVertexValidation::mePUTrackRelSumPt2_
private

Definition at line 399 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUTrackRelSumPt2vsSumPt2_

MonitorElement* Primary4DVertexValidation::mePUTrackRelSumPt2vsSumPt2_
private

Definition at line 408 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUTrackRelSumPt_

MonitorElement* Primary4DVertexValidation::mePUTrackRelSumPt_
private

Definition at line 397 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUTrackRelSumPtvsSumPt_

MonitorElement* Primary4DVertexValidation::mePUTrackRelSumPtvsSumPt_
private

Definition at line 407 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUTrackRelSumWnt_

MonitorElement* Primary4DVertexValidation::mePUTrackRelSumWnt_
private

Definition at line 389 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUTrackRelSumWntvsSumWnt_

MonitorElement* Primary4DVertexValidation::mePUTrackRelSumWntvsSumWnt_
private

Definition at line 403 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUTrackRelSumWos_

MonitorElement* Primary4DVertexValidation::mePUTrackRelSumWos_
private

Definition at line 391 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUTrackRelSumWosvsSumWos_

MonitorElement* Primary4DVertexValidation::mePUTrackRelSumWosvsSumWos_
private

Definition at line 404 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUTrackSumPt2_

MonitorElement* Primary4DVertexValidation::mePUTrackSumPt2_
private

Definition at line 398 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUTrackSumPt_

MonitorElement* Primary4DVertexValidation::mePUTrackSumPt_
private

Definition at line 396 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUTrackSumWnt_

MonitorElement* Primary4DVertexValidation::mePUTrackSumWnt_
private

Definition at line 388 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUTrackSumWos_

MonitorElement* Primary4DVertexValidation::mePUTrackSumWos_
private

Definition at line 390 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUTrackWnt_

MonitorElement* Primary4DVertexValidation::mePUTrackWnt_
private

Definition at line 395 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUvsFakeV_

MonitorElement* Primary4DVertexValidation::mePUvsFakeV_
private

Definition at line 354 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUvsOtherFakeV_

MonitorElement* Primary4DVertexValidation::mePUvsOtherFakeV_
private

Definition at line 355 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUvsRealV_

MonitorElement* Primary4DVertexValidation::mePUvsRealV_
private

Definition at line 353 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mePUvsSplitV_

MonitorElement* Primary4DVertexValidation::mePUvsSplitV_
private

Definition at line 356 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meRecoPosInRecoOrigCollection_

MonitorElement* Primary4DVertexValidation::meRecoPosInRecoOrigCollection_
private

Definition at line 365 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meRecoPosInSimCollection_

MonitorElement* Primary4DVertexValidation::meRecoPosInSimCollection_
private

Definition at line 364 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meRecoPVPosSignal_

MonitorElement* Primary4DVertexValidation::meRecoPVPosSignal_
private

Definition at line 367 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meRecoPVPosSignalNotHighestPt_

MonitorElement* Primary4DVertexValidation::meRecoPVPosSignalNotHighestPt_
private

Definition at line 368 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meRecoVtxVsLineDensity_

MonitorElement* Primary4DVertexValidation::meRecoVtxVsLineDensity_
private

Definition at line 369 of file Primary4DVertexValidation.cc.

◆ meRecPVT_

MonitorElement* Primary4DVertexValidation::meRecPVT_
private

Definition at line 372 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meRecPVZ_

MonitorElement* Primary4DVertexValidation::meRecPVZ_
private

Definition at line 371 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meRecVerNumber_

MonitorElement* Primary4DVertexValidation::meRecVerNumber_
private

Definition at line 370 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meSecTrackRecLVRelSumWos_

MonitorElement* Primary4DVertexValidation::meSecTrackRecLVRelSumWos_
private

Definition at line 418 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meSecTrackRecLVRelSumWosvsSumWos_

MonitorElement* Primary4DVertexValidation::meSecTrackRecLVRelSumWosvsSumWos_
private

Definition at line 430 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meSecTrackRecLVSumWos_

MonitorElement* Primary4DVertexValidation::meSecTrackRecLVSumWos_
private

Definition at line 417 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meSecTrackRelSumWos_

MonitorElement* Primary4DVertexValidation::meSecTrackRelSumWos_
private

Definition at line 393 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meSecTrackRelSumWosvsSumWos_

MonitorElement* Primary4DVertexValidation::meSecTrackRelSumWosvsSumWos_
private

Definition at line 406 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meSecTrackSumWos_

MonitorElement* Primary4DVertexValidation::meSecTrackSumWos_
private

Definition at line 392 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meSimPosInSimOrigCollection_

MonitorElement* Primary4DVertexValidation::meSimPosInSimOrigCollection_
private

Definition at line 366 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meSimPVT_

MonitorElement* Primary4DVertexValidation::meSimPVT_
private

Definition at line 375 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meSimPVTvsZ_

MonitorElement* Primary4DVertexValidation::meSimPVTvsZ_
private

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

◆ meSimVerNumber_

MonitorElement* Primary4DVertexValidation::meSimVerNumber_
private

Definition at line 373 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTimePull_

MonitorElement* Primary4DVertexValidation::meTimePull_
private

Definition at line 350 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTimeRes_

MonitorElement* Primary4DVertexValidation::meTimeRes_
private

Definition at line 349 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTimeSignalPull_

MonitorElement* Primary4DVertexValidation::meTimeSignalPull_
private

Definition at line 352 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTimeSignalRes_

MonitorElement* Primary4DVertexValidation::meTimeSignalRes_
private

Definition at line 351 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTrack3DposRes_

MonitorElement* Primary4DVertexValidation::meTrack3DposRes_[3]
private

Definition at line 348 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTrackEffEtaTot_

MonitorElement* Primary4DVertexValidation::meTrackEffEtaTot_
private

Definition at line 334 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTrackEffPtTot_

MonitorElement* Primary4DVertexValidation::meTrackEffPtTot_
private

Definition at line 331 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTrackMatchedTPEffEtaMtd_

MonitorElement* Primary4DVertexValidation::meTrackMatchedTPEffEtaMtd_
private

Definition at line 336 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTrackMatchedTPEffEtaTot_

MonitorElement* Primary4DVertexValidation::meTrackMatchedTPEffEtaTot_
private

Definition at line 335 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTrackMatchedTPEffPtMtd_

MonitorElement* Primary4DVertexValidation::meTrackMatchedTPEffPtMtd_
private

Definition at line 333 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTrackMatchedTPEffPtTot_

MonitorElement* Primary4DVertexValidation::meTrackMatchedTPEffPtTot_
private

Definition at line 332 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTrackMatchedTPPullTot_

MonitorElement* Primary4DVertexValidation::meTrackMatchedTPPullTot_
private

Definition at line 338 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTrackMatchedTPResTot_

MonitorElement* Primary4DVertexValidation::meTrackMatchedTPResTot_
private

Definition at line 337 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTrackMatchedTPZposResTot_

MonitorElement* Primary4DVertexValidation::meTrackMatchedTPZposResTot_
private

Definition at line 345 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTrackPull_

MonitorElement* Primary4DVertexValidation::meTrackPull_[3]
private

Definition at line 342 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTrackPullHighP_

MonitorElement* Primary4DVertexValidation::meTrackPullHighP_[3]
private

Definition at line 482 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTrackPullHighPTot_

MonitorElement* Primary4DVertexValidation::meTrackPullHighPTot_
private

Definition at line 477 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTrackPullLowP_

MonitorElement* Primary4DVertexValidation::meTrackPullLowP_[3]
private

Definition at line 481 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTrackPullLowPTot_

MonitorElement* Primary4DVertexValidation::meTrackPullLowPTot_
private

Definition at line 476 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTrackPullTot_

MonitorElement* Primary4DVertexValidation::meTrackPullTot_
private

Definition at line 340 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTrackRes_

MonitorElement* Primary4DVertexValidation::meTrackRes_[3]
private

Definition at line 341 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTrackResHighP_

MonitorElement* Primary4DVertexValidation::meTrackResHighP_[3]
private

Definition at line 480 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTrackResHighPTot_

MonitorElement* Primary4DVertexValidation::meTrackResHighPTot_
private

Definition at line 475 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTrackResLowP_

MonitorElement* Primary4DVertexValidation::meTrackResLowP_[3]
private

Definition at line 479 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTrackResLowPTot_

MonitorElement* Primary4DVertexValidation::meTrackResLowPTot_
private

Definition at line 474 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTrackResMass_

MonitorElement* Primary4DVertexValidation::meTrackResMass_[3]
private

Definition at line 343 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTrackResMassPions_

MonitorElement* Primary4DVertexValidation::meTrackResMassPions_[3]
private

Definition at line 486 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTrackResMassProtons_

MonitorElement* Primary4DVertexValidation::meTrackResMassProtons_[3]
private

Definition at line 484 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTrackResMassTrue_

MonitorElement* Primary4DVertexValidation::meTrackResMassTrue_[3]
private

Definition at line 344 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTrackResMassTruePions_

MonitorElement* Primary4DVertexValidation::meTrackResMassTruePions_[3]
private

Definition at line 487 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTrackResMassTrueProtons_

MonitorElement* Primary4DVertexValidation::meTrackResMassTrueProtons_[3]
private

Definition at line 485 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTrackResTot_

MonitorElement* Primary4DVertexValidation::meTrackResTot_
private

Definition at line 339 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTrackZposRes_

MonitorElement* Primary4DVertexValidation::meTrackZposRes_[3]
private

Definition at line 347 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTrackZposResTot_

MonitorElement* Primary4DVertexValidation::meTrackZposResTot_
private

Definition at line 346 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meVtxTrackMult_

MonitorElement* Primary4DVertexValidation::meVtxTrackMult_
private

Definition at line 378 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meVtxTrackRecLVMult_

MonitorElement* Primary4DVertexValidation::meVtxTrackRecLVMult_
private

Definition at line 381 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meVtxTrackRecLVW_

MonitorElement* Primary4DVertexValidation::meVtxTrackRecLVW_
private

Definition at line 382 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meVtxTrackRecLVWnt_

MonitorElement* Primary4DVertexValidation::meVtxTrackRecLVWnt_
private

Definition at line 383 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meVtxTrackW_

MonitorElement* Primary4DVertexValidation::meVtxTrackW_
private

Definition at line 379 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meVtxTrackWnt_

MonitorElement* Primary4DVertexValidation::meVtxTrackWnt_
private

Definition at line 380 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 312 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 311 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and Primary4DVertexValidation().

◆ pdtToken_

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

Definition at line 328 of file Primary4DVertexValidation.cc.

Referenced by analyze().

◆ probKToken_

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

Definition at line 326 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and Primary4DVertexValidation().

◆ probPiToken_

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

Definition at line 325 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and Primary4DVertexValidation().

◆ probPToken_

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

Definition at line 327 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 308 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and Primary4DVertexValidation().

◆ RecBeamSpotToken_

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

Definition at line 307 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and Primary4DVertexValidation().

◆ recoToSimAssociationToken_

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

Definition at line 306 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and Primary4DVertexValidation().

◆ RecTrackToken_

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

Definition at line 299 of file Primary4DVertexValidation.cc.

Referenced by Primary4DVertexValidation().

◆ s2r_

const reco::SimToRecoCollection* Primary4DVertexValidation::s2r_
private

Definition at line 297 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 316 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and Primary4DVertexValidation().

◆ sigmat0SafePidToken_

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

Definition at line 318 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and Primary4DVertexValidation().

◆ simToRecoAssociationToken_

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

Definition at line 305 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 315 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and Primary4DVertexValidation().

◆ t0SafePidToken_

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

Definition at line 317 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and Primary4DVertexValidation().

◆ timeToken_

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

Definition at line 313 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and Primary4DVertexValidation().

◆ tmtdToken_

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

Definition at line 321 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and Primary4DVertexValidation().

◆ tofKToken_

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

Definition at line 323 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and Primary4DVertexValidation().

◆ tofPiToken_

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

Definition at line 322 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and Primary4DVertexValidation().

◆ tofPToken_

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

Definition at line 324 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 310 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and Primary4DVertexValidation().

◆ trackingParticleCollectionToken_

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

Definition at line 303 of file Primary4DVertexValidation.cc.

Referenced by analyze(), and Primary4DVertexValidation().

◆ trackingVertexCollectionToken_

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

Definition at line 304 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 319 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 301 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().