CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Protected Attributes | Private Types | Private Member Functions | Private Attributes
MultiTrackValidator Class Reference

#include <MultiTrackValidator.h>

Inheritance diagram for MultiTrackValidator:
DQMGlobalEDAnalyzer< MultiTrackValidatorHistograms > DQMGlobalEDAnalyzerBase< MultiTrackValidatorHistograms, Args... > edm::global::EDProducer< edm::RunCache< MultiTrackValidatorHistograms >, edm::EndRunProducer, edm::Accumulator, Args... > edm::global::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper MultiTrackValidatorGenPs

Public Types

using Histograms = MultiTrackValidatorHistograms
 
- Public Types inherited from DQMGlobalEDAnalyzerBase< MultiTrackValidatorHistograms, Args... >
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::global::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > >
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 

Public Member Functions

void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &, Histograms &) const override
 Method called to book the DQM histograms. More...
 
void dqmAnalyze (const edm::Event &, const edm::EventSetup &, const Histograms &) const override
 Method called once per event. More...
 
 MultiTrackValidator (const edm::ParameterSet &pset)
 Constructor. More...
 
 ~MultiTrackValidator () override
 Destructor. More...
 
- Public Member Functions inherited from DQMGlobalEDAnalyzer< MultiTrackValidatorHistograms >
virtual void dqmEndRun (edm::Run const &, edm::EventSetup const &, MultiTrackValidatorHistograms const &) const
 
void globalEndRunProduce (edm::Run &run, edm::EventSetup const &setup) const final
 
- Public Member Functions inherited from DQMGlobalEDAnalyzerBase< MultiTrackValidatorHistograms, Args... >
void accumulate (edm::StreamID id, edm::Event const &event, edm::EventSetup const &setup) const final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &, MultiTrackValidatorHistograms &) const
 
 DQMGlobalEDAnalyzerBase ()
 
std::shared_ptr< MultiTrackValidatorHistogramsglobalBeginRun (edm::Run const &run, edm::EventSetup const &setup) const final
 
void globalEndRun (edm::Run const &, edm::EventSetup const &) const final
 
- Public Member Functions inherited from edm::global::EDProducer< edm::RunCache< MultiTrackValidatorHistograms >, edm::EndRunProducer, edm::Accumulator, Args... >
 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
 
EDProduceroperator= (const EDProducer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
bool wantsStreamLuminosityBlocks () const final
 
bool wantsStreamRuns () const final
 
- Public Member Functions inherited from edm::global::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
std::vector< bool > const & recordProvenanceList () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const * > *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Protected Attributes

std::vector< edm::InputTagassociators
 
edm::EDGetTokenT< reco::BeamSpotbsSrc
 
const bool calculateDrSingleCollection_
 
const bool dodEdxPlots_
 
const bool doMVAPlots_
 
const bool doPlotsOnlyForTruePV_
 
const bool doPVAssociationPlots_
 
const bool doRecoTrackPlots_
 
std::vector< bool > doResolutionPlots_
 
const bool doSeedPlots_
 
const bool doSimPlots_
 
const bool doSimTrackPlots_
 
const bool doSummaryPlots_
 
std::unique_ptr< MTVHistoProducerAlgoForTrackerhistoProducerAlgo_
 
const bool ignoremissingtkcollection_
 
std::vector< edm::InputTaglabel
 
edm::EDGetTokenT< std::vector< PileupSummaryInfo > > label_pileupinfo
 
edm::EDGetTokenT< TrackingParticleCollectionlabel_tp_effic
 
edm::EDGetTokenT< TrackingParticleRefVectorlabel_tp_effic_refvector
 
edm::EDGetTokenT< TrackingParticleCollectionlabel_tp_fake
 
edm::EDGetTokenT< TrackingParticleRefVectorlabel_tp_fake_refvector
 
edm::EDGetTokenT< TrackingVertexCollectionlabel_tv
 
std::vector< edm::EDGetTokenT< edm::View< reco::Track > > > labelToken
 
std::vector< edm::EDGetTokenT< edm::View< TrajectorySeed > > > labelTokenSeed
 
edm::EDGetTokenT< edm::ValueMap< reco::DeDxData > > m_dEdx1Tag
 
edm::EDGetTokenT< edm::ValueMap< reco::DeDxData > > m_dEdx2Tag
 
std::string parametersDefiner
 
const bool parametersDefinerIsCosmic_
 
std::vector< edm::EDGetTokenT< std::vector< PSimHit > > > simHitTokens_
 
const edm::ESGetToken< ParametersDefinerForTP, TrackAssociatorRecordtpDefinerEsToken
 
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcdtTopoEsToken
 
const bool useAssociators_
 
- Protected Attributes inherited from DQMGlobalEDAnalyzerBase< MultiTrackValidatorHistograms, Args... >
DQMStoredqmstore_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Private Types

using MVACollection = std::vector< float >
 
using QualityMaskCollection = std::vector< unsigned char >
 

Private Member Functions

const reco::Vertex::PointgetRecoPVPosition (const edm::Event &event, const edm::Handle< TrackingVertexCollection > &htv) const
 
const TrackingVertex::LorentzVectorgetSimPVPosition (const edm::Handle< TrackingVertexCollection > &htv) const
 
size_t tpDR (const TrackingParticleRefVector &tPCeff, const std::vector< size_t > &selected_tPCeff, DynArray< float > &dR_tPCeff, DynArray< float > &dR_tPCeff_jet, const edm::View< reco::Candidate > *cores) const
 
void tpParametersAndSelection (const Histograms &histograms, const TrackingParticleRefVector &tPCeff, const ParametersDefinerForTP &parametersDefinerTP, const edm::Event &event, const edm::EventSetup &setup, const reco::BeamSpot &bs, std::vector< std::tuple< TrackingParticle::Vector, TrackingParticle::Point >> &momVert_tPCeff, std::vector< size_t > &selected_tPCeff) const
 
void trackDR (const edm::View< reco::Track > &trackCollection, const edm::View< reco::Track > &trackCollectionDr, DynArray< float > &dR_trk, DynArray< float > &dR_trk_jet, const edm::View< reco::Candidate > *cores) const
 

Private Attributes

edm::EDGetTokenT< SimHitTPAssociationProducer::SimHitTPAssociationList_simHitTpMapTag
 
std::vector< edm::EDGetTokenT< reco::RecoToSimCollection > > associatormapRtSs
 
std::vector< edm::EDGetTokenT< reco::SimToRecoCollection > > associatormapStRs
 
std::vector< edm::EDGetTokenT< reco::TrackToTrackingParticleAssociator > > associatorTokens
 
edm::EDGetTokenT< edm::View< reco::Candidate > > cores_
 
CosmicTrackingParticleSelector cosmictpSelector
 
std::string dirName_
 
TrackingParticleSelector dRtpSelector
 
std::unique_ptr< RecoTrackSelectorBasedRTrackSelector
 
edm::EDGetTokenT< edm::View< reco::Track > > labelTokenForDrCalculation
 
std::vector< std::vector< std::tuple< edm::EDGetTokenT< MVACollection >, edm::EDGetTokenT< QualityMaskCollection > > > > mvaQualityCollectionTokens_
 
double ptMinJet_
 
edm::EDGetTokenT< edm::View< reco::Vertex > > recoVertexToken_
 
const double simPVMaxZ_
 
edm::EDGetTokenT< edm::ValueMap< unsigned int > > tpNLayersToken_
 
edm::EDGetTokenT< edm::ValueMap< unsigned int > > tpNPixelLayersToken_
 
edm::EDGetTokenT< edm::ValueMap< unsigned int > > tpNStripStereoLayersToken_
 
TrackingParticleSelector tpSelector
 
bool useGsf
 
edm::EDGetTokenT< reco::VertexToTrackingVertexAssociatorvertexAssociatorToken_
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::global::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from DQMGlobalEDAnalyzerBase< MultiTrackValidatorHistograms, Args... >
uint64_t meId (edm::Run const &run) const
 
- Protected Member Functions inherited from edm::ProducerBase
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 declare what type of product will make and with which optional label More...
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Detailed Description

Class that prodecs histrograms to validate Track Reconstruction performances

Author
cerati

Definition at line 40 of file MultiTrackValidator.h.

Member Typedef Documentation

◆ Histograms

Definition at line 42 of file MultiTrackValidator.h.

◆ MVACollection

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

Definition at line 132 of file MultiTrackValidator.h.

◆ QualityMaskCollection

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

Definition at line 133 of file MultiTrackValidator.h.

Constructor & Destructor Documentation

◆ MultiTrackValidator()

MultiTrackValidator::MultiTrackValidator ( const edm::ParameterSet pset)

Constructor.

Definition at line 49 of file MultiTrackValidator.cc.

51  parametersDefiner(pset.getParameter<std::string>("parametersDefiner")),
53  parametersDefinerIsCosmic_(parametersDefiner == "CosmicParametersDefinerForTP"),
54  associators(pset.getUntrackedParameter<std::vector<edm::InputTag>>("associators")),
55  label(pset.getParameter<std::vector<edm::InputTag>>("label")),
56  ignoremissingtkcollection_(pset.getUntrackedParameter<bool>("ignoremissingtrackcollection", false)),
57  useAssociators_(pset.getParameter<bool>("UseAssociators")),
58  calculateDrSingleCollection_(pset.getUntrackedParameter<bool>("calculateDrSingleCollection")),
59  doPlotsOnlyForTruePV_(pset.getUntrackedParameter<bool>("doPlotsOnlyForTruePV")),
60  doSummaryPlots_(pset.getUntrackedParameter<bool>("doSummaryPlots")),
61  doSimPlots_(pset.getUntrackedParameter<bool>("doSimPlots")),
62  doSimTrackPlots_(pset.getUntrackedParameter<bool>("doSimTrackPlots")),
63  doRecoTrackPlots_(pset.getUntrackedParameter<bool>("doRecoTrackPlots")),
64  dodEdxPlots_(pset.getUntrackedParameter<bool>("dodEdxPlots")),
65  doPVAssociationPlots_(pset.getUntrackedParameter<bool>("doPVAssociationPlots")),
66  doSeedPlots_(pset.getUntrackedParameter<bool>("doSeedPlots")),
67  doMVAPlots_(pset.getUntrackedParameter<bool>("doMVAPlots")),
68  simPVMaxZ_(pset.getUntrackedParameter<double>("simPVMaxZ")) {
69  if (not(pset.getParameter<edm::InputTag>("cores").label().empty())) {
70  cores_ = consumes<edm::View<reco::Candidate>>(pset.getParameter<edm::InputTag>("cores"));
71  }
72  if (label.empty()) {
73  // Disable prefetching of everything if there are no track collections
74  return;
75  }
76 
77  const edm::InputTag& label_tp_effic_tag = pset.getParameter<edm::InputTag>("label_tp_effic");
78  const edm::InputTag& label_tp_fake_tag = pset.getParameter<edm::InputTag>("label_tp_fake");
79 
80  if (pset.getParameter<bool>("label_tp_effic_refvector")) {
81  label_tp_effic_refvector = consumes<TrackingParticleRefVector>(label_tp_effic_tag);
82  } else {
83  label_tp_effic = consumes<TrackingParticleCollection>(label_tp_effic_tag);
84  }
85  if (pset.getParameter<bool>("label_tp_fake_refvector")) {
86  label_tp_fake_refvector = consumes<TrackingParticleRefVector>(label_tp_fake_tag);
87  } else {
88  label_tp_fake = consumes<TrackingParticleCollection>(label_tp_fake_tag);
89  }
90  label_pileupinfo = consumes<std::vector<PileupSummaryInfo>>(pset.getParameter<edm::InputTag>("label_pileupinfo"));
91  for (const auto& tag : pset.getParameter<std::vector<edm::InputTag>>("sim")) {
92  simHitTokens_.push_back(consumes<std::vector<PSimHit>>(tag));
93  }
94 
95  std::vector<edm::InputTag> doResolutionPlotsForLabels =
96  pset.getParameter<std::vector<edm::InputTag>>("doResolutionPlotsForLabels");
97  doResolutionPlots_.reserve(label.size());
98  for (auto& itag : label) {
99  labelToken.push_back(consumes<edm::View<reco::Track>>(itag));
100  const bool doResol = doResolutionPlotsForLabels.empty() ||
103  doResolutionPlots_.push_back(doResol);
104  }
105  { // check for duplicates
106  auto labelTmp = edm::vector_transform(label, [&](const edm::InputTag& tag) { return tag.label(); });
107  std::sort(begin(labelTmp), end(labelTmp));
109  const std::string* prev = &empty;
110  for (const std::string& l : labelTmp) {
111  if (l == *prev) {
112  throw cms::Exception("Configuration") << "Duplicate InputTag in labels: " << l;
113  }
114  prev = &l;
115  }
116  }
117 
118  edm::InputTag beamSpotTag = pset.getParameter<edm::InputTag>("beamSpot");
119  bsSrc = consumes<reco::BeamSpot>(beamSpotTag);
120 
121  ParameterSet psetForHistoProducerAlgo = pset.getParameter<ParameterSet>("histoProducerAlgoBlock");
122  histoProducerAlgo_ = std::make_unique<MTVHistoProducerAlgoForTracker>(psetForHistoProducerAlgo, doSeedPlots_);
123 
124  dirName_ = pset.getParameter<std::string>("dirName");
125 
126  tpNLayersToken_ = consumes<edm::ValueMap<unsigned int>>(pset.getParameter<edm::InputTag>("label_tp_nlayers"));
128  consumes<edm::ValueMap<unsigned int>>(pset.getParameter<edm::InputTag>("label_tp_npixellayers"));
130  consumes<edm::ValueMap<unsigned int>>(pset.getParameter<edm::InputTag>("label_tp_nstripstereolayers"));
131 
132  if (dodEdxPlots_) {
133  m_dEdx1Tag = consumes<edm::ValueMap<reco::DeDxData>>(pset.getParameter<edm::InputTag>("dEdx1Tag"));
134  m_dEdx2Tag = consumes<edm::ValueMap<reco::DeDxData>>(pset.getParameter<edm::InputTag>("dEdx2Tag"));
135  }
136 
137  label_tv = consumes<TrackingVertexCollection>(pset.getParameter<edm::InputTag>("label_tv"));
139  recoVertexToken_ = consumes<edm::View<reco::Vertex>>(pset.getUntrackedParameter<edm::InputTag>("label_vertex"));
141  consumes<reco::VertexToTrackingVertexAssociator>(pset.getUntrackedParameter<edm::InputTag>("vertexAssociator"));
142  }
143 
144  if (doMVAPlots_) {
146  auto mvaPSet = pset.getUntrackedParameter<edm::ParameterSet>("mvaLabels");
147  for (size_t iIter = 0; iIter < labelToken.size(); ++iIter) {
150  if (mvaPSet.exists(labels.module)) {
152  mvaPSet.getUntrackedParameter<std::vector<std::string>>(labels.module), [&](const std::string& tag) {
153  return std::make_tuple(consumes<MVACollection>(edm::InputTag(tag, "MVAValues")),
154  consumes<QualityMaskCollection>(edm::InputTag(tag, "QualityMasks")));
155  });
156  }
157  }
158  }
159 
160  tpSelector = TrackingParticleSelector(pset.getParameter<double>("ptMinTP"),
161  pset.getParameter<double>("ptMaxTP"),
162  pset.getParameter<double>("minRapidityTP"),
163  pset.getParameter<double>("maxRapidityTP"),
164  pset.getParameter<double>("tipTP"),
165  pset.getParameter<double>("lipTP"),
166  pset.getParameter<int>("minHitTP"),
167  pset.getParameter<bool>("signalOnlyTP"),
168  pset.getParameter<bool>("intimeOnlyTP"),
169  pset.getParameter<bool>("chargedOnlyTP"),
170  pset.getParameter<bool>("stableOnlyTP"),
171  pset.getParameter<std::vector<int>>("pdgIdTP"),
172  pset.getParameter<bool>("invertRapidityCutTP"));
173 
174  cosmictpSelector = CosmicTrackingParticleSelector(pset.getParameter<double>("ptMinTP"),
175  pset.getParameter<double>("minRapidityTP"),
176  pset.getParameter<double>("maxRapidityTP"),
177  pset.getParameter<double>("tipTP"),
178  pset.getParameter<double>("lipTP"),
179  pset.getParameter<int>("minHitTP"),
180  pset.getParameter<bool>("chargedOnlyTP"),
181  pset.getParameter<std::vector<int>>("pdgIdTP"));
182 
183  ParameterSet psetVsPhi = psetForHistoProducerAlgo.getParameter<ParameterSet>("TpSelectorForEfficiencyVsPhi");
184  dRtpSelector = TrackingParticleSelector(psetVsPhi.getParameter<double>("ptMin"),
185  psetVsPhi.getParameter<double>("ptMax"),
186  psetVsPhi.getParameter<double>("minRapidity"),
187  psetVsPhi.getParameter<double>("maxRapidity"),
188  psetVsPhi.getParameter<double>("tip"),
189  psetVsPhi.getParameter<double>("lip"),
190  psetVsPhi.getParameter<int>("minHit"),
191  psetVsPhi.getParameter<bool>("signalOnly"),
192  psetVsPhi.getParameter<bool>("intimeOnly"),
193  psetVsPhi.getParameter<bool>("chargedOnly"),
194  psetVsPhi.getParameter<bool>("stableOnly"),
195  psetVsPhi.getParameter<std::vector<int>>("pdgId"),
196  psetVsPhi.getParameter<bool>("invertRapidityCut"));
197 
199 
200  useGsf = pset.getParameter<bool>("useGsf");
201 
202  _simHitTpMapTag = mayConsume<SimHitTPAssociationProducer::SimHitTPAssociationList>(
203  pset.getParameter<edm::InputTag>("simHitTpMapTag"));
204 
207  consumes<edm::View<reco::Track>>(pset.getParameter<edm::InputTag>("trackCollectionForDrCalculation"));
208  }
209 
210  if (useAssociators_) {
211  for (auto const& src : associators) {
212  associatorTokens.push_back(consumes<reco::TrackToTrackingParticleAssociator>(src));
213  }
214  } else {
215  for (auto const& src : associators) {
216  associatormapStRs.push_back(consumes<reco::SimToRecoCollection>(src));
217  associatormapRtSs.push_back(consumes<reco::RecoToSimCollection>(src));
218  }
219  }
220 }

References _simHitTpMapTag, associatormapRtSs, associatormapStRs, associators, associatorTokens, AlignmentProducer_cff::beamSpotTag, bsSrc, calculateDrSingleCollection_, edm::EDConsumerBase::consumes(), cores_, cosmictpSelector, dirName_, dodEdxPlots_, doMVAPlots_, doPlotsOnlyForTruePV_, doPVAssociationPlots_, doResolutionPlots_, MultiTrackValidator_cfi::doResolutionPlotsForLabels, doSeedPlots_, dRtpSelector, dRTrackSelector, relativeConstraints::empty, mps_fire::end, Exception, spr::find(), edm::ParameterSet::getParameter(), histoProducerAlgo_, cmsLHEtoEOSManager::l, edm::InputTag::label(), label, label_pileupinfo, label_tp_effic, label_tp_effic_refvector, label_tp_fake, label_tp_fake_refvector, label_tv, SummaryClient_cfi::labels, edm::EDConsumerBase::labelsForToken(), labelToken, labelTokenForDrCalculation, m_dEdx1Tag, m_dEdx2Tag, MTVHistoProducerAlgoForTracker::makeRecoTrackSelectorFromTPSelectorParameters(), mvaQualityCollectionTokens_, muonDTDigis_cfi::pset, recoVertexToken_, simHitTokens_, jetUpdater_cfi::sort, TrackRefitter_38T_cff::src, AlCaHLTBitMon_QueryRunRegistry::string, makeGlobalPositionRcd_cfg::tag, tpNLayersToken_, tpNPixelLayersToken_, tpNStripStereoLayersToken_, tpSelector, useAssociators_, useGsf, edm::vector_transform(), and vertexAssociatorToken_.

◆ ~MultiTrackValidator()

MultiTrackValidator::~MultiTrackValidator ( )
override

Destructor.

Definition at line 222 of file MultiTrackValidator.cc.

222 {}

Member Function Documentation

◆ bookHistograms()

void MultiTrackValidator::bookHistograms ( DQMStore::IBooker ibook,
edm::Run const &  ,
edm::EventSetup const &  setup,
Histograms histograms 
) const
overridevirtual

Method called to book the DQM histograms.

Implements DQMGlobalEDAnalyzerBase< MultiTrackValidatorHistograms, Args... >.

Definition at line 224 of file MultiTrackValidator.cc.

227  {
228  if (label.empty()) {
229  // Disable histogram booking if there are no track collections
230  return;
231  }
232 
233  const auto minColl = -0.5;
234  const auto maxColl = label.size() - 0.5;
235  const auto nintColl = label.size();
236 
237  auto binLabels = [&](dqm::reco::MonitorElement* me) {
238  for (size_t i = 0; i < label.size(); ++i) {
239  me->setBinLabel(i + 1, label[i].label());
240  }
241  me->disableAlphanumeric();
242  return me;
243  };
244 
245  //Booking histograms concerning with simulated tracks
246  if (doSimPlots_) {
247  ibook.cd();
248  ibook.setCurrentFolder(dirName_ + "simulation");
249 
250  histoProducerAlgo_->bookSimHistos(ibook, histograms.histoProducerAlgo);
251 
252  ibook.cd();
253  ibook.setCurrentFolder(dirName_);
254  }
255 
256  for (unsigned int ww = 0; ww < associators.size(); ww++) {
257  ibook.cd();
258  // FIXME: these need to be moved to a subdirectory whose name depends on the associator
259  ibook.setCurrentFolder(dirName_);
260 
261  if (doSummaryPlots_) {
262  if (doSimTrackPlots_) {
263  histograms.h_assoc_coll.push_back(
264  binLabels(ibook.book1D("num_assoc(simToReco)_coll",
265  "N of associated (simToReco) tracks vs track collection",
266  nintColl,
267  minColl,
268  maxColl)));
269  histograms.h_simul_coll.push_back(binLabels(
270  ibook.book1D("num_simul_coll", "N of simulated tracks vs track collection", nintColl, minColl, maxColl)));
271  }
272  if (doRecoTrackPlots_) {
273  histograms.h_reco_coll.push_back(binLabels(
274  ibook.book1D("num_reco_coll", "N of reco track vs track collection", nintColl, minColl, maxColl)));
275  histograms.h_assoc2_coll.push_back(
276  binLabels(ibook.book1D("num_assoc(recoToSim)_coll",
277  "N of associated (recoToSim) tracks vs track collection",
278  nintColl,
279  minColl,
280  maxColl)));
281  histograms.h_looper_coll.push_back(
282  binLabels(ibook.book1D("num_duplicate_coll",
283  "N of associated (recoToSim) looper tracks vs track collection",
284  nintColl,
285  minColl,
286  maxColl)));
287  histograms.h_pileup_coll.push_back(
288  binLabels(ibook.book1D("num_pileup_coll",
289  "N of associated (recoToSim) pileup tracks vs track collection",
290  nintColl,
291  minColl,
292  maxColl)));
293  }
294  }
295 
296  for (unsigned int www = 0; www < label.size(); www++) {
297  ibook.cd();
298  InputTag algo = label[www];
299  string dirName = dirName_;
300  if (!algo.process().empty())
301  dirName += algo.process() + "_";
302  if (!algo.label().empty())
303  dirName += algo.label() + "_";
304  if (!algo.instance().empty())
305  dirName += algo.instance() + "_";
306  if (dirName.find("Tracks") < dirName.length()) {
307  dirName.replace(dirName.find("Tracks"), 6, "");
308  }
309  string assoc = associators[ww].label();
310  if (assoc.find("Track") < assoc.length()) {
311  assoc.replace(assoc.find("Track"), 5, "");
312  }
313  dirName += assoc;
314  std::replace(dirName.begin(), dirName.end(), ':', '_');
315 
316  ibook.setCurrentFolder(dirName);
317 
318  const bool doResolutionPlots = doResolutionPlots_[www];
319 
320  if (doSimTrackPlots_) {
321  histoProducerAlgo_->bookSimTrackHistos(ibook, histograms.histoProducerAlgo, doResolutionPlots);
323  histoProducerAlgo_->bookSimTrackPVAssociationHistos(ibook, histograms.histoProducerAlgo);
324  }
325 
326  //Booking histograms concerning with reconstructed tracks
327  if (doRecoTrackPlots_) {
328  histoProducerAlgo_->bookRecoHistos(ibook, histograms.histoProducerAlgo, doResolutionPlots);
329  if (dodEdxPlots_)
330  histoProducerAlgo_->bookRecodEdxHistos(ibook, histograms.histoProducerAlgo);
332  histoProducerAlgo_->bookRecoPVAssociationHistos(ibook, histograms.histoProducerAlgo);
333  if (doMVAPlots_)
334  histoProducerAlgo_->bookMVAHistos(
335  ibook, histograms.histoProducerAlgo, mvaQualityCollectionTokens_[www].size());
336  }
337 
338  if (doSeedPlots_) {
339  histoProducerAlgo_->bookSeedHistos(ibook, histograms.histoProducerAlgo);
340  }
341  } //end loop www
342  } // end loop ww
343 }

References trackingPlots::assoc, associators, dqm::implementation::IBooker::book1D(), dqm::implementation::NavigatorBase::cd(), TrackerOfflineValidation_Dqm_cff::dirName, dirName_, dodEdxPlots_, doMVAPlots_, doPVAssociationPlots_, doRecoTrackPlots_, doResolutionPlots_, doSeedPlots_, doSimPlots_, doSimTrackPlots_, doSummaryPlots_, histoProducerAlgo_, mps_fire::i, label, hlt_dqm_clientPB-live_cfg::me, mvaQualityCollectionTokens_, python.rootplot.root2matplotlib::replace(), and dqm::implementation::NavigatorBase::setCurrentFolder().

◆ dqmAnalyze()

void MultiTrackValidator::dqmAnalyze ( const edm::Event event,
const edm::EventSetup setup,
const Histograms histograms 
) const
overridevirtual

Method called once per event.

Implements DQMGlobalEDAnalyzerBase< MultiTrackValidatorHistograms, Args... >.

Reimplemented in MultiTrackValidatorGenPs.

Definition at line 575 of file MultiTrackValidator.cc.

577  {
578  if (label.empty()) {
579  // Disable if there are no track collections
580  return;
581  }
582 
583  using namespace reco;
584 
585  LogDebug("TrackValidator") << "\n===================================================="
586  << "\n"
587  << "Analyzing new event"
588  << "\n"
589  << "====================================================\n"
590  << "\n";
591 
592  const auto& parametersDefinerTPHandle = setup.getHandle(tpDefinerEsToken);
593  //Since we modify the object, we must clone it
594  auto parametersDefinerTP = parametersDefinerTPHandle->clone();
595 
596  const TrackerTopology& ttopo = setup.getData(tTopoEsToken);
597 
598  // FIXME: we really need to move to edm::View for reading the
599  // TrackingParticles... Unfortunately it has non-trivial
600  // consequences on the associator/association interfaces etc.
601  TrackingParticleRefVector tmpTPeff;
602  TrackingParticleRefVector tmpTPfake;
603  const TrackingParticleRefVector* tmpTPeffPtr = nullptr;
604  const TrackingParticleRefVector* tmpTPfakePtr = nullptr;
605 
607  edm::Handle<TrackingParticleRefVector> TPCollectionHeffRefVector;
608 
609  const bool tp_effic_refvector = label_tp_effic.isUninitialized();
610  if (!tp_effic_refvector) {
611  event.getByToken(label_tp_effic, TPCollectionHeff);
612  tmpTPeff.reserve(TPCollectionHeff->size());
613  for (size_t i = 0, size = TPCollectionHeff->size(); i < size; ++i) {
614  tmpTPeff.push_back(TrackingParticleRef(TPCollectionHeff, i));
615  }
616  tmpTPeffPtr = &tmpTPeff;
617  } else {
618  event.getByToken(label_tp_effic_refvector, TPCollectionHeffRefVector);
619  tmpTPeffPtr = TPCollectionHeffRefVector.product();
620  }
622  edm::Handle<TrackingParticleCollection> TPCollectionHfake;
623  event.getByToken(label_tp_fake, TPCollectionHfake);
624  tmpTPfake.reserve(TPCollectionHfake->size());
625  for (size_t i = 0, size = TPCollectionHfake->size(); i < size; ++i) {
626  tmpTPfake.push_back(TrackingParticleRef(TPCollectionHfake, i));
627  }
628  tmpTPfakePtr = &tmpTPfake;
629  } else {
630  edm::Handle<TrackingParticleRefVector> TPCollectionHfakeRefVector;
631  event.getByToken(label_tp_fake_refvector, TPCollectionHfakeRefVector);
632  tmpTPfakePtr = TPCollectionHfakeRefVector.product();
633  }
634 
635  TrackingParticleRefVector const& tPCeff = *tmpTPeffPtr;
636  TrackingParticleRefVector const& tPCfake = *tmpTPfakePtr;
637 
638 #ifdef EDM_ML_DEBUG
639  ensureEffIsSubsetOfFake(tPCeff, tPCfake);
640 #endif
641 
644  //warning: make sure the TP collection used in the map is the same used in the MTV!
645  event.getByToken(_simHitTpMapTag, simHitsTPAssoc);
646  parametersDefinerTP->initEvent(simHitsTPAssoc);
647  cosmictpSelector.initEvent(simHitsTPAssoc);
648  }
649 
650  // Find the sim PV and tak its position
652  event.getByToken(label_tv, htv);
653  const TrackingVertex::LorentzVector* theSimPVPosition = getSimPVPosition(htv);
654  if (simPVMaxZ_ >= 0) {
655  if (!theSimPVPosition)
656  return;
657  if (std::abs(theSimPVPosition->z()) > simPVMaxZ_)
658  return;
659  }
660 
661  // Check, when necessary, if reco PV matches to sim PV
662  const reco::Vertex::Point* thePVposition = nullptr;
664  thePVposition = getRecoPVPosition(event, htv);
665  if (doPlotsOnlyForTruePV_ && !thePVposition)
666  return;
667 
668  // Rest of the code assumes that if thePVposition is non-null, the
669  // PV-association histograms get filled. In above, the "nullness"
670  // is used to deliver the information if the reco PV is matched to
671  // the sim PV.
673  thePVposition = nullptr;
674  }
675 
676  edm::Handle<reco::BeamSpot> recoBeamSpotHandle;
677  event.getByToken(bsSrc, recoBeamSpotHandle);
678  reco::BeamSpot const& bs = *recoBeamSpotHandle;
679 
681  event.getByToken(label_pileupinfo, puinfoH);
682  PileupSummaryInfo puinfo;
683 
684  for (unsigned int puinfo_ite = 0; puinfo_ite < (*puinfoH).size(); ++puinfo_ite) {
685  if ((*puinfoH)[puinfo_ite].getBunchCrossing() == 0) {
686  puinfo = (*puinfoH)[puinfo_ite];
687  break;
688  }
689  }
690 
691  // Number of 3D layers for TPs
693  event.getByToken(tpNLayersToken_, tpNLayersH);
694  const auto& nLayers_tPCeff = *tpNLayersH;
695 
696  event.getByToken(tpNPixelLayersToken_, tpNLayersH);
697  const auto& nPixelLayers_tPCeff = *tpNLayersH;
698 
699  event.getByToken(tpNStripStereoLayersToken_, tpNLayersH);
700  const auto& nStripMonoAndStereoLayers_tPCeff = *tpNLayersH;
701 
702  // Precalculate TP selection (for efficiency), and momentum and vertex wrt PCA
703  //
704  // TODO: ParametersDefinerForTP ESProduct needs to be changed to
705  // EDProduct because of consumes.
706  //
707  // In principle, we could just precalculate the momentum and vertex
708  // wrt PCA for all TPs for once and put that to the event. To avoid
709  // repetitive calculations those should be calculated only once for
710  // each TP. That would imply that we should access TPs via Refs
711  // (i.e. View) in here, since, in general, the eff and fake TP
712  // collections can be different (and at least HI seems to use that
713  // feature). This would further imply that the
714  // RecoToSimCollection/SimToRecoCollection should be changed to use
715  // View<TP> instead of vector<TP>, and migrate everything.
716  //
717  // Or we could take only one input TP collection, and do another
718  // TP-selection to obtain the "fake" collection like we already do
719  // for "efficiency" TPs.
720  std::vector<size_t> selected_tPCeff;
721  std::vector<std::tuple<TrackingParticle::Vector, TrackingParticle::Point>> momVert_tPCeff;
722  tpParametersAndSelection(histograms, tPCeff, *parametersDefinerTP, event, setup, bs, momVert_tPCeff, selected_tPCeff);
723 
724  //calculate dR for TPs
725  declareDynArray(float, tPCeff.size(), dR_tPCeff);
726 
727  //calculate dR_jet for TPs
728  const edm::View<reco::Candidate>* coresVector = nullptr;
729  if (not cores_.isUninitialized()) {
731  event.getByToken(cores_, cores);
732  if (cores.isValid()) {
733  coresVector = cores.product();
734  }
735  }
736  declareDynArray(float, tPCeff.size(), dR_tPCeff_jet);
737 
738  size_t n_selTP_dr = tpDR(tPCeff, selected_tPCeff, dR_tPCeff, dR_tPCeff_jet, coresVector);
739 
743  }
744 
745  // dE/dx
746  // at some point this could be generalized, with a vector of tags and a corresponding vector of Handles
747  // I'm writing the interface such to take vectors of ValueMaps
748  std::vector<const edm::ValueMap<reco::DeDxData>*> v_dEdx;
749  if (dodEdxPlots_) {
752  event.getByToken(m_dEdx1Tag, dEdx1Handle);
753  event.getByToken(m_dEdx2Tag, dEdx2Handle);
754  v_dEdx.push_back(dEdx1Handle.product());
755  v_dEdx.push_back(dEdx2Handle.product());
756  }
757 
758  std::vector<const MVACollection*> mvaCollections;
759  std::vector<const QualityMaskCollection*> qualityMaskCollections;
760  std::vector<float> mvaValues;
761 
762  int w = 0; //counter counting the number of sets of histograms
763  for (unsigned int ww = 0; ww < associators.size(); ww++) {
764  // run value filtering of recoToSim map already here as it depends only on the association, not track collection
765  reco::SimToRecoCollection const* simRecCollPFull = nullptr;
766  reco::RecoToSimCollection const* recSimCollP = nullptr;
767  reco::RecoToSimCollection recSimCollL;
768  if (!useAssociators_) {
769  Handle<reco::SimToRecoCollection> simtorecoCollectionH;
770  event.getByToken(associatormapStRs[ww], simtorecoCollectionH);
771  simRecCollPFull = simtorecoCollectionH.product();
772 
773  Handle<reco::RecoToSimCollection> recotosimCollectionH;
774  event.getByToken(associatormapRtSs[ww], recotosimCollectionH);
775  recSimCollP = recotosimCollectionH.product();
776 
777  // We need to filter the associations of the fake-TrackingParticle
778  // collection only from RecoToSim collection, otherwise the
779  // RecoToSim histograms get false entries
780  recSimCollL = associationMapFilterValues(*recSimCollP, tPCfake);
781  recSimCollP = &recSimCollL;
782  }
783 
784  for (unsigned int www = 0; www < label.size();
785  www++, w++) { // need to increment w here, since there are many continues in the loop body
786  //
787  //get collections from the event
788  //
789  edm::Handle<View<Track>> trackCollectionHandle;
790  if (!event.getByToken(labelToken[www], trackCollectionHandle) && ignoremissingtkcollection_)
791  continue;
792  const edm::View<Track>& trackCollection = *trackCollectionHandle;
793 
794  reco::SimToRecoCollection const* simRecCollP = nullptr;
795  reco::SimToRecoCollection simRecCollL;
796 
797  //associate tracks
798  LogTrace("TrackValidator") << "Analyzing " << label[www] << " with " << associators[ww] << "\n";
799  if (useAssociators_) {
801  event.getByToken(associatorTokens[ww], theAssociator);
802 
803  // The associator interfaces really need to be fixed...
805  // trackRefs.vectorHolder()->reserve(trackCollection.size()); NOT a good idea
806  for (edm::View<Track>::size_type i = 0; i < trackCollection.size(); ++i) {
807  trackRefs.push_back(trackCollection.refAt(i));
808  }
809 
810  LogTrace("TrackValidator") << "Calling associateRecoToSim method"
811  << "\n";
812  recSimCollL = theAssociator->associateRecoToSim(trackRefs, tPCfake);
813  recSimCollP = &recSimCollL;
814  LogTrace("TrackValidator") << "Calling associateSimToReco method"
815  << "\n";
816  // It is necessary to do the association wrt. fake TPs,
817  // because this SimToReco association is used also for
818  // duplicates. Since the set of efficiency TPs are required to
819  // be a subset of the set of fake TPs, for efficiency
820  // histograms it doesn't matter if the association contains
821  // associations of TPs not in the set of efficiency TPs.
822  simRecCollL = theAssociator->associateSimToReco(trackRefs, tPCfake);
823  simRecCollP = &simRecCollL;
824  } else {
825  // We need to filter the associations of the current track
826  // collection only from SimToReco collection, otherwise the
827  // SimToReco histograms get false entries. The filtering must
828  // be done separately for each track collection.
829  simRecCollL = associationMapFilterValues(*simRecCollPFull, trackCollection);
830  simRecCollP = &simRecCollL;
831  }
832 
833  reco::RecoToSimCollection const& recSimColl = *recSimCollP;
834  reco::SimToRecoCollection const& simRecColl = *simRecCollP;
835 
836  // read MVA collections
840  for (const auto& tokenTpl : mvaQualityCollectionTokens_[www]) {
841  event.getByToken(std::get<0>(tokenTpl), hmva);
842  event.getByToken(std::get<1>(tokenTpl), hqual);
843 
844  mvaCollections.push_back(hmva.product());
845  qualityMaskCollections.push_back(hqual.product());
846  if (mvaCollections.back()->size() != trackCollection.size()) {
847  throw cms::Exception("Configuration")
848  << "Inconsistency in track collection and MVA sizes. Track collection " << www << " has "
849  << trackCollection.size() << " tracks, whereas the MVA " << (mvaCollections.size() - 1)
850  << " for it has " << mvaCollections.back()->size() << " entries. Double-check your configuration.";
851  }
852  if (qualityMaskCollections.back()->size() != trackCollection.size()) {
853  throw cms::Exception("Configuration")
854  << "Inconsistency in track collection and quality mask sizes. Track collection " << www << " has "
855  << trackCollection.size() << " tracks, whereas the quality mask " << (qualityMaskCollections.size() - 1)
856  << " for it has " << qualityMaskCollections.back()->size()
857  << " entries. Double-check your configuration.";
858  }
859  }
860  }
861 
862  // ########################################################
863  // fill simulation histograms (LOOP OVER TRACKINGPARTICLES)
864  // ########################################################
865 
866  //compute number of tracks per eta interval
867  //
868  LogTrace("TrackValidator") << "\n# of TrackingParticles: " << tPCeff.size() << "\n";
869  int ats(0); //This counter counts the number of simTracks that are "associated" to recoTracks
870  int st(0); //This counter counts the number of simulated tracks passing the MTV selection (i.e. tpSelector(tp) )
871 
872  //loop over already-selected TPs for tracking efficiency
873  for (size_t i = 0; i < selected_tPCeff.size(); ++i) {
874  size_t iTP = selected_tPCeff[i];
875  const TrackingParticleRef& tpr = tPCeff[iTP];
876  const TrackingParticle& tp = *tpr;
877 
878  auto const& momVert = momVert_tPCeff[i];
879  TrackingParticle::Vector momentumTP;
880  TrackingParticle::Point vertexTP;
881 
882  double dxySim(0);
883  double dzSim(0);
884  double dxyPVSim = 0;
885  double dzPVSim = 0;
886  double dR = dR_tPCeff[iTP];
887  double dR_jet = dR_tPCeff_jet[iTP];
888 
889  //---------- THIS PART HAS TO BE CLEANED UP. THE PARAMETER DEFINER WAS NOT MEANT TO BE USED IN THIS WAY ----------
890  //If the TrackingParticle is collison like, get the momentum and vertex at production state
892  momentumTP = tp.momentum();
893  vertexTP = tp.vertex();
894  //Calcualte the impact parameters w.r.t. PCA
895  const TrackingParticle::Vector& momentum = std::get<TrackingParticle::Vector>(momVert);
896  const TrackingParticle::Point& vertex = std::get<TrackingParticle::Point>(momVert);
897  dxySim = TrackingParticleIP::dxy(vertex, momentum, bs.position());
898  dzSim = TrackingParticleIP::dz(vertex, momentum, bs.position());
899 
900  if (theSimPVPosition) {
901  dxyPVSim = TrackingParticleIP::dxy(vertex, momentum, *theSimPVPosition);
902  dzPVSim = TrackingParticleIP::dz(vertex, momentum, *theSimPVPosition);
903  }
904  }
905  //If the TrackingParticle is comics, get the momentum and vertex at PCA
906  else {
907  momentumTP = std::get<TrackingParticle::Vector>(momVert);
908  vertexTP = std::get<TrackingParticle::Point>(momVert);
909  dxySim = TrackingParticleIP::dxy(vertexTP, momentumTP, bs.position());
910  dzSim = TrackingParticleIP::dz(vertexTP, momentumTP, bs.position());
911 
912  // Do dxy and dz vs. PV make any sense for cosmics? I guess not
913  }
914  //---------- THE PART ABOVE HAS TO BE CLEANED UP. THE PARAMETER DEFINER WAS NOT MEANT TO BE USED IN THIS WAY ----------
915 
916  // in the coming lines, histos are filled using as input
917  // - momentumTP
918  // - vertexTP
919  // - dxySim
920  // - dzSim
921  if (!doSimTrackPlots_)
922  continue;
923 
924  // ##############################################
925  // fill RecoAssociated SimTracks' histograms
926  // ##############################################
927  const reco::Track* matchedTrackPointer = nullptr;
928  const reco::Track* matchedSecondTrackPointer = nullptr;
929  unsigned int selectsLoose = mvaCollections.size();
930  unsigned int selectsHP = mvaCollections.size();
931  if (simRecColl.find(tpr) != simRecColl.end()) {
932  auto const& rt = simRecColl[tpr];
933  if (!rt.empty()) {
934  ats++; //This counter counts the number of simTracks that have a recoTrack associated
935  // isRecoMatched = true; // UNUSED
936  matchedTrackPointer = rt.begin()->first.get();
937  if (rt.size() >= 2) {
938  matchedSecondTrackPointer = (rt.begin() + 1)->first.get();
939  }
940  LogTrace("TrackValidator") << "TrackingParticle #" << st << " with pt=" << sqrt(momentumTP.perp2())
941  << " associated with quality:" << rt.begin()->second << "\n";
942 
943  if (doMVAPlots_) {
944  // for each MVA we need to take the value of the track
945  // with largest MVA value (for the cumulative histograms)
946  //
947  // also identify the first MVA that possibly selects any
948  // track matched to this TrackingParticle, separately
949  // for loose and highPurity qualities
950  for (size_t imva = 0; imva < mvaCollections.size(); ++imva) {
951  const auto& mva = *(mvaCollections[imva]);
952  const auto& qual = *(qualityMaskCollections[imva]);
953 
954  auto iMatch = rt.begin();
955  float maxMva = mva[iMatch->first.key()];
956  for (; iMatch != rt.end(); ++iMatch) {
957  auto itrk = iMatch->first.key();
958  maxMva = std::max(maxMva, mva[itrk]);
959 
960  if (selectsLoose >= imva && trackSelected(qual[itrk], reco::TrackBase::loose))
961  selectsLoose = imva;
962  if (selectsHP >= imva && trackSelected(qual[itrk], reco::TrackBase::highPurity))
963  selectsHP = imva;
964  }
965  mvaValues.push_back(maxMva);
966  }
967  }
968  }
969  } else {
970  LogTrace("TrackValidator") << "TrackingParticle #" << st << " with pt,eta,phi: " << sqrt(momentumTP.perp2())
971  << " , " << momentumTP.eta() << " , " << momentumTP.phi() << " , "
972  << " NOT associated to any reco::Track"
973  << "\n";
974  }
975 
976  int nSimHits = tp.numberOfTrackerHits();
977  int nSimLayers = nLayers_tPCeff[tpr];
978  int nSimPixelLayers = nPixelLayers_tPCeff[tpr];
979  int nSimStripMonoAndStereoLayers = nStripMonoAndStereoLayers_tPCeff[tpr];
980  histoProducerAlgo_->fill_recoAssociated_simTrack_histos(histograms.histoProducerAlgo,
981  w,
982  tp,
983  momentumTP,
984  vertexTP,
985  dxySim,
986  dzSim,
987  dxyPVSim,
988  dzPVSim,
989  nSimHits,
990  nSimLayers,
991  nSimPixelLayers,
992  nSimStripMonoAndStereoLayers,
993  matchedTrackPointer,
994  puinfo.getPU_NumInteractions(),
995  dR,
996  dR_jet,
997  thePVposition,
998  theSimPVPosition,
999  bs.position(),
1000  mvaValues,
1001  selectsLoose,
1002  selectsHP);
1003  mvaValues.clear();
1004 
1005  if (matchedTrackPointer && matchedSecondTrackPointer) {
1006  histoProducerAlgo_->fill_duplicate_histos(
1007  histograms.histoProducerAlgo, w, *matchedTrackPointer, *matchedSecondTrackPointer);
1008  }
1009 
1010  if (doSummaryPlots_) {
1011  if (dRtpSelector(tp)) {
1012  histograms.h_simul_coll[ww]->Fill(www);
1013  if (matchedTrackPointer) {
1014  histograms.h_assoc_coll[ww]->Fill(www);
1015  }
1016  }
1017  }
1018 
1019  } // End for (TrackingParticleCollection::size_type i=0; i<tPCeff.size(); i++){
1020 
1021  // ##############################################
1022  // fill recoTracks histograms (LOOP OVER TRACKS)
1023  // ##############################################
1024  if (!doRecoTrackPlots_)
1025  continue;
1026  LogTrace("TrackValidator") << "\n# of reco::Tracks with " << label[www].process() << ":" << label[www].label()
1027  << ":" << label[www].instance() << ": " << trackCollection.size() << "\n";
1028 
1029  int sat(0); //This counter counts the number of recoTracks that are associated to SimTracks from Signal only
1030  int at(0); //This counter counts the number of recoTracks that are associated to SimTracks
1031  int rT(0); //This counter counts the number of recoTracks in general
1032  int seed_fit_failed = 0;
1033  size_t n_selTrack_dr = 0;
1034 
1035  //calculate dR for tracks
1036  declareDynArray(float, trackCollection.size(), dR_trk);
1037  declareDynArray(float, trackCollection.size(), dR_trk_jet);
1038 #ifndef NO_TRACK_DR
1039  // this accounts for most of the time spent in MTV and it is used to fill just one histo that is of doubtful usefulness but (maybe) for the whole collection
1040  const edm::View<Track>* trackCollectionDr = &trackCollection;
1042  trackCollectionDr = trackCollectionForDrCalculation.product();
1043  }
1044  trackDR(trackCollection, *trackCollectionDr, dR_trk, dR_trk_jet, coresVector);
1045 #endif
1046 
1047  for (View<Track>::size_type i = 0; i < trackCollection.size(); ++i) {
1048  auto track = trackCollection.refAt(i);
1049  rT++;
1051  ++seed_fit_failed;
1052  if ((*dRTrackSelector)(*track, bs.position()))
1053  ++n_selTrack_dr;
1054 
1055  bool isSigSimMatched(false);
1056  bool isSimMatched(false);
1057  bool isChargeMatched(true);
1058  int numAssocRecoTracks = 0;
1059  int nSimHits = 0;
1060  double sharedFraction = 0.;
1061 
1062  auto tpFound = recSimColl.find(track);
1063  isSimMatched = tpFound != recSimColl.end();
1064  if (isSimMatched) {
1065  const auto& tp = tpFound->val;
1066  nSimHits = tp[0].first->numberOfTrackerHits();
1067  sharedFraction = tp[0].second;
1068  if (tp[0].first->charge() != track->charge())
1069  isChargeMatched = false;
1070  if (simRecColl.find(tp[0].first) != simRecColl.end())
1071  numAssocRecoTracks = simRecColl[tp[0].first].size();
1072  at++;
1073  for (unsigned int tp_ite = 0; tp_ite < tp.size(); ++tp_ite) {
1074  TrackingParticle trackpart = *(tp[tp_ite].first);
1075  if ((trackpart.eventId().event() == 0) && (trackpart.eventId().bunchCrossing() == 0)) {
1076  isSigSimMatched = true;
1077  sat++;
1078  break;
1079  }
1080  }
1081  LogTrace("TrackValidator") << "reco::Track #" << rT << " with pt=" << track->pt()
1082  << " associated with quality:" << tp.begin()->second << "\n";
1083  } else {
1084  LogTrace("TrackValidator") << "reco::Track #" << rT << " with pt=" << track->pt()
1085  << " NOT associated to any TrackingParticle"
1086  << "\n";
1087  }
1088 
1089  // set MVA values for this track
1090  // take also the indices of first MVAs to select by loose and
1091  // HP quality
1092  unsigned int selectsLoose = mvaCollections.size();
1093  unsigned int selectsHP = mvaCollections.size();
1094  if (doMVAPlots_) {
1095  for (size_t imva = 0; imva < mvaCollections.size(); ++imva) {
1096  const auto& mva = *(mvaCollections[imva]);
1097  const auto& qual = *(qualityMaskCollections[imva]);
1098  mvaValues.push_back(mva[i]);
1099 
1100  if (selectsLoose >= imva && trackSelected(qual[i], reco::TrackBase::loose))
1101  selectsLoose = imva;
1102  if (selectsHP >= imva && trackSelected(qual[i], reco::TrackBase::highPurity))
1103  selectsHP = imva;
1104  }
1105  }
1106 
1107  double dR = dR_trk[i];
1108  double dR_jet = dR_trk_jet[i];
1109  histoProducerAlgo_->fill_generic_recoTrack_histos(histograms.histoProducerAlgo,
1110  w,
1111  *track,
1112  ttopo,
1113  bs.position(),
1114  thePVposition,
1115  theSimPVPosition,
1116  isSimMatched,
1117  isSigSimMatched,
1118  isChargeMatched,
1119  numAssocRecoTracks,
1120  puinfo.getPU_NumInteractions(),
1121  nSimHits,
1122  sharedFraction,
1123  dR,
1124  dR_jet,
1125  mvaValues,
1126  selectsLoose,
1127  selectsHP);
1128  mvaValues.clear();
1129 
1130  if (doSummaryPlots_) {
1131  histograms.h_reco_coll[ww]->Fill(www);
1132  if (isSimMatched) {
1133  histograms.h_assoc2_coll[ww]->Fill(www);
1134  if (numAssocRecoTracks > 1) {
1135  histograms.h_looper_coll[ww]->Fill(www);
1136  }
1137  if (!isSigSimMatched) {
1138  histograms.h_pileup_coll[ww]->Fill(www);
1139  }
1140  }
1141  }
1142 
1143  // dE/dx
1144  if (dodEdxPlots_)
1145  histoProducerAlgo_->fill_dedx_recoTrack_histos(histograms.histoProducerAlgo, w, track, v_dEdx);
1146 
1147  //Fill other histos
1148  if (!isSimMatched)
1149  continue;
1150 
1151  histoProducerAlgo_->fill_simAssociated_recoTrack_histos(histograms.histoProducerAlgo, w, *track);
1152 
1153  /* TO BE FIXED LATER
1154  if (associators[ww]=="trackAssociatorByChi2"){
1155  //association chi2
1156  double assocChi2 = -tp.begin()->second;//in association map is stored -chi2
1157  h_assochi2[www]->Fill(assocChi2);
1158  h_assochi2_prob[www]->Fill(TMath::Prob((assocChi2)*5,5));
1159  }
1160  else if (associators[ww]=="quickTrackAssociatorByHits"){
1161  double fraction = tp.begin()->second;
1162  h_assocFraction[www]->Fill(fraction);
1163  h_assocSharedHit[www]->Fill(fraction*track->numberOfValidHits());
1164  }
1165  */
1166 
1167  if (doResolutionPlots_[www]) {
1168  //Get tracking particle parameters at point of closest approach to the beamline
1169  TrackingParticleRef tpr = tpFound->val.begin()->first;
1170  TrackingParticle::Vector momentumTP = parametersDefinerTP->momentum(event, setup, tpr);
1171  TrackingParticle::Point vertexTP = parametersDefinerTP->vertex(event, setup, tpr);
1172  int chargeTP = tpr->charge();
1173 
1174  histoProducerAlgo_->fill_ResoAndPull_recoTrack_histos(
1175  histograms.histoProducerAlgo, w, momentumTP, vertexTP, chargeTP, *track, bs.position());
1176  }
1177 
1178  //TO BE FIXED
1179  //std::vector<PSimHit> simhits=tpr.get()->trackPSimHit(DetId::Tracker);
1180  //nrecHit_vs_nsimHit_rec2sim[w]->Fill(track->numberOfValidHits(), (int)(simhits.end()-simhits.begin() ));
1181 
1182  } // End of for(View<Track>::size_type i=0; i<trackCollection.size(); ++i){
1183  mvaCollections.clear();
1184  qualityMaskCollections.clear();
1185 
1186  histoProducerAlgo_->fill_trackBased_histos(histograms.histoProducerAlgo, w, at, rT, n_selTrack_dr, n_selTP_dr);
1187  // Fill seed-specific histograms
1188  if (doSeedPlots_) {
1189  histoProducerAlgo_->fill_seed_histos(
1190  histograms.histoProducerAlgo, www, seed_fit_failed, trackCollection.size());
1191  }
1192 
1193  LogTrace("TrackValidator") << "Collection " << www << "\n"
1194  << "Total Simulated (selected): " << n_selTP_dr << "\n"
1195  << "Total Reconstructed (selected): " << n_selTrack_dr << "\n"
1196  << "Total Reconstructed: " << rT << "\n"
1197  << "Total Associated (recoToSim): " << at << "\n"
1198  << "Total Fakes: " << rT - at << "\n";
1199  } // End of for (unsigned int www=0;www<label.size();www++){
1200  } //END of for (unsigned int ww=0;ww<associators.size();ww++){
1201 }

References _simHitTpMapTag, funct::abs(), reco::TrackToTrackingParticleAssociator::associateRecoToSim(), reco::TrackToTrackingParticleAssociator::associateSimToReco(), associationMapFilterValues(), associatormapRtSs, associatormapStRs, associators, associatorTokens, cms::cuda::bs, bsSrc, EncodedEventId::bunchCrossing(), calculateDrSingleCollection_, HLT_FULL_cff::cores, cores_, cosmictpSelector, declareDynArray, dodEdxPlots_, doMVAPlots_, doPlotsOnlyForTruePV_, doPVAssociationPlots_, doRecoTrackPlots_, doResolutionPlots_, doSeedPlots_, doSimTrackPlots_, doSummaryPlots_, HGC3DClusterGenMatchSelector_cfi::dR, dRtpSelector, dRTrackSelector, TrackingParticleIP::dxy(), TrackingParticleIP::dz(), relativeConstraints::empty, edm::AssociationMap< Tag >::end(), EncodedEventId::event(), TrackingParticle::eventId(), Exception, edm::AssociationMap< Tag >::find(), first, PileupSummaryInfo::getPU_NumInteractions(), getRecoPVPosition(), getSimPVPosition(), reco::TrackBase::highPurity, histoProducerAlgo_, mps_fire::i, ignoremissingtkcollection_, edm::EDGetTokenT< T >::isUninitialized(), label, label_pileupinfo, label_tp_effic, label_tp_effic_refvector, label_tp_fake, label_tp_fake_refvector, label_tv, labelToken, labelTokenForDrCalculation, LogDebug, LogTrace, reco::TrackBase::loose, m_dEdx1Tag, m_dEdx2Tag, SiStripPI::max, beam_dqm_sourceclient-live_cfg::mva, mvaQualityCollectionTokens_, parametersDefinerIsCosmic_, edm::Handle< T >::product(), edm::RefToBaseVector< T >::push_back(), edm::RefVector< C, T, F >::push_back(), edm::RefVector< C, T, F >::reserve(), hcal_runs::rt, singleTopDQM_cfi::setup, simPVMaxZ_, edm::RefVector< C, T, F >::size(), findQualityFiles::size, mathSSE::sqrt(), cmsswSequenceInfo::tp, tpDefinerEsToken, tpDR(), tpNLayersToken_, tpNPixelLayersToken_, tpNStripStereoLayersToken_, tpParametersAndSelection(), HLT_FULL_cff::track, duplicaterechits_cfi::trackCollection, TrackValidationHeavyIons_cff::trackCollectionForDrCalculation, trackDR(), trackFromSeedFitFailed(), tTopoEsToken, useAssociators_, bphysicsOniaDQM_cfi::vertex, and w.

◆ getRecoPVPosition()

const reco::Vertex::Point * MultiTrackValidator::getRecoPVPosition ( const edm::Event event,
const edm::Handle< TrackingVertexCollection > &  htv 
) const
private

Definition at line 393 of file MultiTrackValidator.cc.

394  {
396  event.getByToken(recoVertexToken_, hvertex);
397 
399  event.getByToken(vertexAssociatorToken_, hvassociator);
400 
401  auto v_r2s = hvassociator->associateRecoToSim(hvertex, htv);
402  auto pvPtr = hvertex->refAt(0);
403  if (pvPtr->isFake() || pvPtr->ndof() < 0) // skip junk vertices
404  return nullptr;
405 
406  auto pvFound = v_r2s.find(pvPtr);
407  if (pvFound == v_r2s.end())
408  return nullptr;
409 
410  for (const auto& vertexRefQuality : pvFound->val) {
411  const TrackingVertex& tv = *(vertexRefQuality.first);
412  if (tv.eventId().event() == 0 && tv.eventId().bunchCrossing() == 0) {
413  return &(pvPtr->position());
414  }
415  }
416 
417  return nullptr;
418 }

References reco::VertexToTrackingVertexAssociator::associateRecoToSim(), EncodedEventId::bunchCrossing(), EncodedEventId::event(), TrackingVertex::eventId(), recoVertexToken_, and vertexAssociatorToken_.

Referenced by dqmAnalyze().

◆ getSimPVPosition()

const TrackingVertex::LorentzVector * MultiTrackValidator::getSimPVPosition ( const edm::Handle< TrackingVertexCollection > &  htv) const
private

Definition at line 381 of file MultiTrackValidator.cc.

382  {
383  for (const auto& simV : *htv) {
384  if (simV.eventId().bunchCrossing() != 0)
385  continue; // remove OOTPU
386  if (simV.eventId().event() != 0)
387  continue; // pick the PV of hard scatter
388  return &(simV.position());
389  }
390  return nullptr;
391 }

Referenced by dqmAnalyze().

◆ tpDR()

size_t MultiTrackValidator::tpDR ( const TrackingParticleRefVector tPCeff,
const std::vector< size_t > &  selected_tPCeff,
DynArray< float > &  dR_tPCeff,
DynArray< float > &  dR_tPCeff_jet,
const edm::View< reco::Candidate > *  cores 
) const
private

Definition at line 479 of file MultiTrackValidator.cc.

483  {
484  float etaL[tPCeff.size()], phiL[tPCeff.size()];
485  size_t n_selTP_dr = 0;
486  for (size_t iTP : selected_tPCeff) {
487  //calculare dR wrt inclusive collection (also with PU, low pT, displaced)
488  auto const& tp2 = *(tPCeff[iTP]);
489  auto&& p = tp2.momentum();
490  etaL[iTP] = etaFromXYZ(p.x(), p.y(), p.z());
491  phiL[iTP] = atan2f(p.y(), p.x());
492  }
493  for (size_t iTP1 : selected_tPCeff) {
494  auto const& tp = *(tPCeff[iTP1]);
496  double dR_jet = std::numeric_limits<double>::max();
497  if (dRtpSelector(tp)) { //only for those needed for efficiency!
498  ++n_selTP_dr;
499  float eta = etaL[iTP1];
500  float phi = phiL[iTP1];
501  for (size_t iTP2 : selected_tPCeff) {
502  //calculare dR wrt inclusive collection (also with PU, low pT, displaced)
503  if (iTP1 == iTP2) {
504  continue;
505  }
506  auto dR_tmp = reco::deltaR2(eta, phi, etaL[iTP2], phiL[iTP2]);
507  if (dR_tmp < dR)
508  dR = dR_tmp;
509  } // ttp2 (iTP)
510  if (cores != nullptr) {
511  for (unsigned int ji = 0; ji < cores->size(); ji++) { //jet loop
512  const reco::Candidate& jet = (*cores)[ji];
513  double jet_eta = jet.eta();
514  double jet_phi = jet.phi();
515  auto dR_jet_tmp = reco::deltaR2(eta, phi, jet_eta, jet_phi);
516  if (dR_jet_tmp < dR_jet)
517  dR_jet = dR_jet_tmp;
518  }
519  }
520  }
521  dR_tPCeff[iTP1] = std::sqrt(dR);
522  dR_tPCeff_jet[iTP1] = std::sqrt(dR_jet);
523 
524  } // tp
525  return n_selTP_dr;
526 }

References HLT_FULL_cff::cores, reco::deltaR2(), HGC3DClusterGenMatchSelector_cfi::dR, dRtpSelector, PVValHelper::eta, metsig::jet, SiStripPI::max, AlCaHLTBitMon_ParallelJobs::p, phi, edm::RefVector< C, T, F >::size(), mathSSE::sqrt(), and cmsswSequenceInfo::tp.

Referenced by dqmAnalyze().

◆ tpParametersAndSelection()

void MultiTrackValidator::tpParametersAndSelection ( const Histograms histograms,
const TrackingParticleRefVector tPCeff,
const ParametersDefinerForTP parametersDefinerTP,
const edm::Event event,
const edm::EventSetup setup,
const reco::BeamSpot bs,
std::vector< std::tuple< TrackingParticle::Vector, TrackingParticle::Point >> &  momVert_tPCeff,
std::vector< size_t > &  selected_tPCeff 
) const
private

Definition at line 420 of file MultiTrackValidator.cc.

428  {
429  selected_tPCeff.reserve(tPCeff.size());
430  momVert_tPCeff.reserve(tPCeff.size());
431  int nIntimeTPs = 0;
433  for (size_t j = 0; j < tPCeff.size(); ++j) {
434  const TrackingParticleRef& tpr = tPCeff[j];
435 
436  auto const& rec = parametersDefinerTP.momentumAndVertex(event, setup, tpr);
437  TrackingParticle::Vector const& momentum = std::get<0>(rec);
438  TrackingParticle::Point const& vertex = std::get<1>(rec);
439  if (doSimPlots_) {
440  histoProducerAlgo_->fill_generic_simTrack_histos(
441  histograms.histoProducerAlgo, momentum, vertex, tpr->eventId().bunchCrossing());
442  }
443  if (tpr->eventId().bunchCrossing() == 0)
444  ++nIntimeTPs;
445 
446  if (cosmictpSelector(tpr, &bs, event, setup)) {
447  selected_tPCeff.push_back(j);
448  momVert_tPCeff.emplace_back(momentum, vertex);
449  }
450  }
451  } else {
452  size_t j = 0;
453  for (auto const& tpr : tPCeff) {
454  const TrackingParticle& tp = *tpr;
455 
456  // TODO: do we want to fill these from all TPs that include IT
457  // and OOT (as below), or limit to IT+OOT TPs passing tpSelector
458  // (as it was before)? The latter would require another instance
459  // of tpSelector with intimeOnly=False.
460  if (doSimPlots_) {
461  histoProducerAlgo_->fill_generic_simTrack_histos(
462  histograms.histoProducerAlgo, tp.momentum(), tp.vertex(), tp.eventId().bunchCrossing());
463  }
464  if (tp.eventId().bunchCrossing() == 0)
465  ++nIntimeTPs;
466 
467  if (tpSelector(tp)) {
468  selected_tPCeff.push_back(j);
469  momVert_tPCeff.emplace_back(parametersDefinerTP.momentumAndVertex(event, setup, tpr));
470  }
471  ++j;
472  }
473  }
474  if (doSimPlots_) {
475  histoProducerAlgo_->fill_simTrackBased_histos(histograms.histoProducerAlgo, nIntimeTPs);
476  }
477 }

References cms::cuda::bs, cosmictpSelector, doSimPlots_, histoProducerAlgo_, dqmiolumiharvest::j, ParametersDefinerForTP::momentumAndVertex(), parametersDefinerIsCosmic_, singleTopDQM_cfi::setup, edm::RefVector< C, T, F >::size(), cmsswSequenceInfo::tp, tpSelector, and bphysicsOniaDQM_cfi::vertex.

Referenced by dqmAnalyze().

◆ trackDR()

void MultiTrackValidator::trackDR ( const edm::View< reco::Track > &  trackCollection,
const edm::View< reco::Track > &  trackCollectionDr,
DynArray< float > &  dR_trk,
DynArray< float > &  dR_trk_jet,
const edm::View< reco::Candidate > *  cores 
) const
private

Definition at line 528 of file MultiTrackValidator.cc.

532  {
533  int i = 0;
534  float etaL[trackCollectionDr.size()];
535  float phiL[trackCollectionDr.size()];
536  bool validL[trackCollectionDr.size()];
537  for (auto const& track2 : trackCollectionDr) {
538  auto&& p = track2.momentum();
539  etaL[i] = etaFromXYZ(p.x(), p.y(), p.z());
540  phiL[i] = atan2f(p.y(), p.x());
541  validL[i] = !trackFromSeedFitFailed(track2);
542  ++i;
543  }
544  for (View<reco::Track>::size_type i = 0; i < trackCollection.size(); ++i) {
545  auto const& track = trackCollection[i];
547  auto dR_jet = std::numeric_limits<float>::max();
549  auto&& p = track.momentum();
550  float eta = etaFromXYZ(p.x(), p.y(), p.z());
551  float phi = atan2f(p.y(), p.x());
552  for (View<reco::Track>::size_type j = 0; j < trackCollectionDr.size(); ++j) {
553  if (!validL[j])
554  continue;
555  auto dR_tmp = reco::deltaR2(eta, phi, etaL[j], phiL[j]);
556  if ((dR_tmp < dR) & (dR_tmp > std::numeric_limits<float>::min()))
557  dR = dR_tmp;
558  }
559  if (cores != nullptr) {
560  for (unsigned int ji = 0; ji < cores->size(); ji++) { //jet loop
561  const reco::Candidate& jet = (*cores)[ji];
562  double jet_eta = jet.eta();
563  double jet_phi = jet.phi();
564  auto dR_jet_tmp = reco::deltaR2(eta, phi, jet_eta, jet_phi);
565  if (dR_jet_tmp < dR_jet)
566  dR_jet = dR_jet_tmp;
567  }
568  }
569  }
570  dR_trk[i] = std::sqrt(dR);
571  dR_trk_jet[i] = std::sqrt(dR_jet);
572  }
573 }

References HLT_FULL_cff::cores, reco::deltaR2(), HGC3DClusterGenMatchSelector_cfi::dR, PVValHelper::eta, mps_fire::i, dqmiolumiharvest::j, metsig::jet, SiStripPI::max, min(), AlCaHLTBitMon_ParallelJobs::p, phi, edm::View< T >::size(), mathSSE::sqrt(), HLT_FULL_cff::track, duplicaterechits_cfi::trackCollection, and trackFromSeedFitFailed().

Referenced by dqmAnalyze().

Member Data Documentation

◆ _simHitTpMapTag

edm::EDGetTokenT<SimHitTPAssociationProducer::SimHitTPAssociationList> MultiTrackValidator::_simHitTpMapTag
private

Definition at line 151 of file MultiTrackValidator.h.

Referenced by dqmAnalyze(), and MultiTrackValidator().

◆ associatormapRtSs

std::vector<edm::EDGetTokenT<reco::RecoToSimCollection> > MultiTrackValidator::associatormapRtSs
private

Definition at line 126 of file MultiTrackValidator.h.

Referenced by dqmAnalyze(), and MultiTrackValidator().

◆ associatormapStRs

std::vector<edm::EDGetTokenT<reco::SimToRecoCollection> > MultiTrackValidator::associatormapStRs
private

Definition at line 125 of file MultiTrackValidator.h.

Referenced by dqmAnalyze(), and MultiTrackValidator().

◆ associators

std::vector<edm::InputTag> MultiTrackValidator::associators
protected

◆ associatorTokens

std::vector<edm::EDGetTokenT<reco::TrackToTrackingParticleAssociator> > MultiTrackValidator::associatorTokens
private

Definition at line 124 of file MultiTrackValidator.h.

Referenced by dqmAnalyze(), and MultiTrackValidator().

◆ bsSrc

edm::EDGetTokenT<reco::BeamSpot> MultiTrackValidator::bsSrc
protected

◆ calculateDrSingleCollection_

const bool MultiTrackValidator::calculateDrSingleCollection_
protected

Definition at line 85 of file MultiTrackValidator.h.

Referenced by dqmAnalyze(), and MultiTrackValidator().

◆ cores_

edm::EDGetTokenT<edm::View<reco::Candidate> > MultiTrackValidator::cores_
private

Definition at line 142 of file MultiTrackValidator.h.

Referenced by dqmAnalyze(), and MultiTrackValidator().

◆ cosmictpSelector

CosmicTrackingParticleSelector MultiTrackValidator::cosmictpSelector
private

◆ dirName_

std::string MultiTrackValidator::dirName_
private

Definition at line 137 of file MultiTrackValidator.h.

Referenced by bookHistograms(), and MultiTrackValidator().

◆ dodEdxPlots_

const bool MultiTrackValidator::dodEdxPlots_
protected

◆ doMVAPlots_

const bool MultiTrackValidator::doMVAPlots_
protected

Definition at line 94 of file MultiTrackValidator.h.

Referenced by bookHistograms(), dqmAnalyze(), and MultiTrackValidator().

◆ doPlotsOnlyForTruePV_

const bool MultiTrackValidator::doPlotsOnlyForTruePV_
protected

Definition at line 86 of file MultiTrackValidator.h.

Referenced by dqmAnalyze(), and MultiTrackValidator().

◆ doPVAssociationPlots_

const bool MultiTrackValidator::doPVAssociationPlots_
protected

Definition at line 92 of file MultiTrackValidator.h.

Referenced by bookHistograms(), dqmAnalyze(), and MultiTrackValidator().

◆ doRecoTrackPlots_

const bool MultiTrackValidator::doRecoTrackPlots_
protected

◆ doResolutionPlots_

std::vector<bool> MultiTrackValidator::doResolutionPlots_
protected

Definition at line 96 of file MultiTrackValidator.h.

Referenced by bookHistograms(), dqmAnalyze(), and MultiTrackValidator().

◆ doSeedPlots_

const bool MultiTrackValidator::doSeedPlots_
protected

Definition at line 93 of file MultiTrackValidator.h.

Referenced by bookHistograms(), dqmAnalyze(), and MultiTrackValidator().

◆ doSimPlots_

const bool MultiTrackValidator::doSimPlots_
protected

◆ doSimTrackPlots_

const bool MultiTrackValidator::doSimTrackPlots_
protected

◆ doSummaryPlots_

const bool MultiTrackValidator::doSummaryPlots_
protected

Definition at line 87 of file MultiTrackValidator.h.

Referenced by bookHistograms(), and dqmAnalyze().

◆ dRtpSelector

TrackingParticleSelector MultiTrackValidator::dRtpSelector
private

Definition at line 148 of file MultiTrackValidator.h.

Referenced by dqmAnalyze(), MultiTrackValidator(), and tpDR().

◆ dRTrackSelector

std::unique_ptr<RecoTrackSelectorBase> MultiTrackValidator::dRTrackSelector
private

Definition at line 149 of file MultiTrackValidator.h.

Referenced by dqmAnalyze(), and MultiTrackValidator().

◆ histoProducerAlgo_

std::unique_ptr<MTVHistoProducerAlgoForTracker> MultiTrackValidator::histoProducerAlgo_
protected

◆ ignoremissingtkcollection_

const bool MultiTrackValidator::ignoremissingtkcollection_
protected

Definition at line 83 of file MultiTrackValidator.h.

Referenced by MultiTrackValidatorGenPs::dqmAnalyze(), and dqmAnalyze().

◆ label

std::vector<edm::InputTag> MultiTrackValidator::label
protected

◆ label_pileupinfo

edm::EDGetTokenT<std::vector<PileupSummaryInfo> > MultiTrackValidator::label_pileupinfo
protected

◆ label_tp_effic

edm::EDGetTokenT<TrackingParticleCollection> MultiTrackValidator::label_tp_effic
protected

◆ label_tp_effic_refvector

edm::EDGetTokenT<TrackingParticleRefVector> MultiTrackValidator::label_tp_effic_refvector
protected

Definition at line 68 of file MultiTrackValidator.h.

Referenced by dqmAnalyze(), and MultiTrackValidator().

◆ label_tp_fake

edm::EDGetTokenT<TrackingParticleCollection> MultiTrackValidator::label_tp_fake
protected

◆ label_tp_fake_refvector

edm::EDGetTokenT<TrackingParticleRefVector> MultiTrackValidator::label_tp_fake_refvector
protected

Definition at line 69 of file MultiTrackValidator.h.

Referenced by dqmAnalyze(), and MultiTrackValidator().

◆ label_tv

edm::EDGetTokenT<TrackingVertexCollection> MultiTrackValidator::label_tv
protected

Definition at line 70 of file MultiTrackValidator.h.

Referenced by dqmAnalyze(), and MultiTrackValidator().

◆ labelToken

std::vector<edm::EDGetTokenT<edm::View<reco::Track> > > MultiTrackValidator::labelToken
protected

◆ labelTokenForDrCalculation

edm::EDGetTokenT<edm::View<reco::Track> > MultiTrackValidator::labelTokenForDrCalculation
private

Definition at line 152 of file MultiTrackValidator.h.

Referenced by dqmAnalyze(), and MultiTrackValidator().

◆ labelTokenSeed

std::vector<edm::EDGetTokenT<edm::View<TrajectorySeed> > > MultiTrackValidator::labelTokenSeed
protected

Definition at line 77 of file MultiTrackValidator.h.

◆ m_dEdx1Tag

edm::EDGetTokenT<edm::ValueMap<reco::DeDxData> > MultiTrackValidator::m_dEdx1Tag
protected

◆ m_dEdx2Tag

edm::EDGetTokenT<edm::ValueMap<reco::DeDxData> > MultiTrackValidator::m_dEdx2Tag
protected

◆ mvaQualityCollectionTokens_

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

Definition at line 135 of file MultiTrackValidator.h.

Referenced by bookHistograms(), dqmAnalyze(), and MultiTrackValidator().

◆ parametersDefiner

std::string MultiTrackValidator::parametersDefiner
protected

Definition at line 59 of file MultiTrackValidator.h.

◆ parametersDefinerIsCosmic_

const bool MultiTrackValidator::parametersDefinerIsCosmic_
protected

◆ ptMinJet_

double MultiTrackValidator::ptMinJet_
private

Definition at line 143 of file MultiTrackValidator.h.

◆ recoVertexToken_

edm::EDGetTokenT<edm::View<reco::Vertex> > MultiTrackValidator::recoVertexToken_
private

Definition at line 153 of file MultiTrackValidator.h.

Referenced by getRecoPVPosition(), and MultiTrackValidator().

◆ simHitTokens_

std::vector<edm::EDGetTokenT<std::vector<PSimHit> > > MultiTrackValidator::simHitTokens_
protected

Definition at line 73 of file MultiTrackValidator.h.

Referenced by MultiTrackValidator().

◆ simPVMaxZ_

const double MultiTrackValidator::simPVMaxZ_
private

Definition at line 140 of file MultiTrackValidator.h.

Referenced by dqmAnalyze().

◆ tpDefinerEsToken

const edm::ESGetToken<ParametersDefinerForTP, TrackAssociatorRecord> MultiTrackValidator::tpDefinerEsToken
protected

Definition at line 60 of file MultiTrackValidator.h.

Referenced by MultiTrackValidatorGenPs::dqmAnalyze(), and dqmAnalyze().

◆ tpNLayersToken_

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

Definition at line 128 of file MultiTrackValidator.h.

Referenced by dqmAnalyze(), and MultiTrackValidator().

◆ tpNPixelLayersToken_

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

Definition at line 129 of file MultiTrackValidator.h.

Referenced by dqmAnalyze(), and MultiTrackValidator().

◆ tpNStripStereoLayersToken_

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

Definition at line 130 of file MultiTrackValidator.h.

Referenced by dqmAnalyze(), and MultiTrackValidator().

◆ tpSelector

TrackingParticleSelector MultiTrackValidator::tpSelector
private

Definition at line 146 of file MultiTrackValidator.h.

Referenced by MultiTrackValidator(), and tpParametersAndSelection().

◆ tTopoEsToken

const edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> MultiTrackValidator::tTopoEsToken
protected

Definition at line 57 of file MultiTrackValidator.h.

Referenced by MultiTrackValidatorGenPs::dqmAnalyze(), and dqmAnalyze().

◆ useAssociators_

const bool MultiTrackValidator::useAssociators_
protected

◆ useGsf

bool MultiTrackValidator::useGsf
private

Definition at line 139 of file MultiTrackValidator.h.

Referenced by MultiTrackValidator().

◆ vertexAssociatorToken_

edm::EDGetTokenT<reco::VertexToTrackingVertexAssociator> MultiTrackValidator::vertexAssociatorToken_
private

Definition at line 154 of file MultiTrackValidator.h.

Referenced by getRecoPVPosition(), and MultiTrackValidator().

SummaryClient_cfi.labels
labels
Definition: SummaryClient_cfi.py:61
MultiTrackValidator::dRtpSelector
TrackingParticleSelector dRtpSelector
Definition: MultiTrackValidator.h:148
MultiTrackValidator::simPVMaxZ_
const double simPVMaxZ_
Definition: MultiTrackValidator.h:140
dqm::impl::MonitorElement
Definition: MonitorElement.h:98
edm::RefVector::reserve
void reserve(size_type n)
Reserve space for RefVector.
Definition: RefVector.h:108
MultiTrackValidator::associatorTokens
std::vector< edm::EDGetTokenT< reco::TrackToTrackingParticleAssociator > > associatorTokens
Definition: MultiTrackValidator.h:124
edm::AssociationMap::find
const_iterator find(const key_type &k) const
find element with specified reference key
Definition: AssociationMap.h:173
mps_fire.i
i
Definition: mps_fire.py:428
edm::ESInputTag
Definition: ESInputTag.h:87
MultiTrackValidator::tpNLayersToken_
edm::EDGetTokenT< edm::ValueMap< unsigned int > > tpNLayersToken_
Definition: MultiTrackValidator.h:128
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11724
MultiTrackValidator::labelToken
std::vector< edm::EDGetTokenT< edm::View< reco::Track > > > labelToken
Definition: MultiTrackValidator.h:76
reco::TrackBase::loose
Definition: TrackBase.h:152
MultiTrackValidator::cores_
edm::EDGetTokenT< edm::View< reco::Candidate > > cores_
Definition: MultiTrackValidator.h:142
edm::Handle::product
T const * product() const
Definition: Handle.h:70
MultiTrackValidator::label_tp_effic_refvector
edm::EDGetTokenT< TrackingParticleRefVector > label_tp_effic_refvector
Definition: MultiTrackValidator.h:68
MultiTrackValidator::useGsf
bool useGsf
Definition: MultiTrackValidator.h:139
MultiTrackValidator::label
std::vector< edm::InputTag > label
Definition: MultiTrackValidator.h:75
min
T min(T a, T b)
Definition: MathUtil.h:58
TrackerTopology
Definition: TrackerTopology.h:16
reco::TrackToTrackingParticleAssociator::associateRecoToSim
reco::RecoToSimCollection associateRecoToSim(const edm::Handle< edm::View< reco::Track >> &tCH, const edm::Handle< TrackingParticleCollection > &tPCH) const
Definition: TrackToTrackingParticleAssociator.h:64
hcal_runs.rt
rt
Definition: hcal_runs.py:76
MultiTrackValidator::dRTrackSelector
std::unique_ptr< RecoTrackSelectorBase > dRTrackSelector
Definition: MultiTrackValidator.h:149
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
edm::EDGetTokenT::isUninitialized
constexpr bool isUninitialized() const noexcept
Definition: EDGetToken.h:99
MultiTrackValidator::tpNPixelLayersToken_
edm::EDGetTokenT< edm::ValueMap< unsigned int > > tpNPixelLayersToken_
Definition: MultiTrackValidator.h:129
TrackingParticle::Vector
math::XYZVectorD Vector
point in the space
Definition: TrackingParticle.h:37
edm::RefVector< TrackingParticleCollection >
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:46
beam_dqm_sourceclient-live_cfg.mva
mva
Definition: beam_dqm_sourceclient-live_cfg.py:127
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
edm::Handle< TrackingParticleCollection >
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
edm::Ref< TrackingParticleCollection >
trackingPlots.assoc
assoc
Definition: trackingPlots.py:183
edm::InputTag::label
std::string const & label() const
Definition: InputTag.h:36
cmsdt::algo
algo
Definition: constants.h:171
edm::AssociationMap::end
const_iterator end() const
last iterator over the map (read only)
Definition: AssociationMap.h:171
MultiTrackValidator::label_tp_fake_refvector
edm::EDGetTokenT< TrackingParticleRefVector > label_tp_fake_refvector
Definition: MultiTrackValidator.h:69
reco::VertexToTrackingVertexAssociator::associateRecoToSim
reco::VertexRecoToSimCollection associateRecoToSim(const edm::Handle< edm::View< reco::Vertex >> &vCH, const edm::Handle< TrackingVertexCollection > &tVCH) const
Definition: VertexToTrackingVertexAssociator.h:22
MultiTrackValidator::tpNStripStereoLayersToken_
edm::EDGetTokenT< edm::ValueMap< unsigned int > > tpNStripStereoLayersToken_
Definition: MultiTrackValidator.h:130
cms::cuda::bs
bs
Definition: HistoContainer.h:76
TrackingParticleIP::dxy
auto dxy(const T_Vertex &vertex, const T_Momentum &momentum, const T_Point &point)
Definition: TrackingParticleIP.h:11
TrackValidationHeavyIons_cff.trackCollectionForDrCalculation
trackCollectionForDrCalculation
Definition: TrackValidationHeavyIons_cff.py:32
MultiTrackValidator::associators
std::vector< edm::InputTag > associators
Definition: MultiTrackValidator.h:65
edm::RefToBaseVector::push_back
void push_back(const RefToBase< T > &)
Definition: RefToBaseVector.h:217
MultiTrackValidator::doMVAPlots_
const bool doMVAPlots_
Definition: MultiTrackValidator.h:94
PVValHelper::eta
Definition: PVValidationHelpers.h:70
w
const double w
Definition: UKUtility.cc:23
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
TrackingParticle
Monte Carlo truth information used for tracking validation.
Definition: TrackingParticle.h:29
mps_fire.end
end
Definition: mps_fire.py:242
reco::BeamSpot
Definition: BeamSpot.h:21
MultiTrackValidator::tpDR
size_t tpDR(const TrackingParticleRefVector &tPCeff, const std::vector< size_t > &selected_tPCeff, DynArray< float > &dR_tPCeff, DynArray< float > &dR_tPCeff_jet, const edm::View< reco::Candidate > *cores) const
Definition: MultiTrackValidator.cc:479
reco::modules::TrackingParticleSelector
SingleObjectSelector< TrackingParticleCollection, ::TrackingParticleSelector > TrackingParticleSelector
Definition: TrackingParticleSelector.cc:17
reco::Track
Definition: Track.h:27
MultiTrackValidator::doRecoTrackPlots_
const bool doRecoTrackPlots_
Definition: MultiTrackValidator.h:90
dqm::implementation::NavigatorBase::cd
virtual void cd()
Definition: DQMStore.cc:29
declareDynArray
#define declareDynArray(T, n, x)
Definition: DynArray.h:91
MultiTrackValidator::_simHitTpMapTag
edm::EDGetTokenT< SimHitTPAssociationProducer::SimHitTPAssociationList > _simHitTpMapTag
Definition: MultiTrackValidator.h:151
TrackingVertex::eventId
const EncodedEventId & eventId() const
Definition: TrackingVertex.h:72
MultiTrackValidator::tTopoEsToken
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoEsToken
Definition: MultiTrackValidator.h:57
MultiTrackValidator::getRecoPVPosition
const reco::Vertex::Point * getRecoPVPosition(const edm::Event &event, const edm::Handle< TrackingVertexCollection > &htv) const
Definition: MultiTrackValidator.cc:393
MultiTrackValidator::parametersDefiner
std::string parametersDefiner
Definition: MultiTrackValidator.h:59
AlignmentProducer_cff.beamSpotTag
beamSpotTag
Definition: AlignmentProducer_cff.py:50
ParametersDefinerForTP::momentumAndVertex
virtual std::tuple< TrackingParticle::Vector, TrackingParticle::Point > momentumAndVertex(const edm::Event &iEvent, const edm::EventSetup &iSetup, const TrackingParticleRef &tpr) const
Definition: ParametersDefinerForTP.h:65
MultiTrackValidator::ignoremissingtkcollection_
const bool ignoremissingtkcollection_
Definition: MultiTrackValidator.h:83
cmsswSequenceInfo.tp
tp
Definition: cmsswSequenceInfo.py:17
first
auto first
Definition: CAHitNtupletGeneratorKernelsImpl.h:125
MultiTrackValidator::doSimPlots_
const bool doSimPlots_
Definition: MultiTrackValidator.h:88
MultiTrackValidator::associatormapRtSs
std::vector< edm::EDGetTokenT< reco::RecoToSimCollection > > associatormapRtSs
Definition: MultiTrackValidator.h:126
edm::vector_transform
auto vector_transform(std::vector< InputType > const &input, Function predicate) -> std::vector< typename std::remove_cv< typename std::remove_reference< decltype(predicate(input.front()))>::type >::type >
Definition: transform.h:11
edm::View::size
size_type size() const
trackFromSeedFitFailed
bool trackFromSeedFitFailed(const reco::Track &track)
Definition: trackFromSeedFitFailed.h:6
MultiTrackValidator::dodEdxPlots_
const bool dodEdxPlots_
Definition: MultiTrackValidator.h:91
edm::View
Definition: CaloClusterFwd.h:14
reco::CosmicTrackingParticleSelector
ObjectSelector< CosmicTrackingParticleSelector > CosmicTrackingParticleSelector
Definition: CosmicTrackingParticleSelector.cc:16
bphysicsOniaDQM_cfi.vertex
vertex
Definition: bphysicsOniaDQM_cfi.py:7
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:233
edm::ParameterSet
Definition: ParameterSet.h:47
MultiTrackValidator::doSimTrackPlots_
const bool doSimTrackPlots_
Definition: MultiTrackValidator.h:89
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
TrackRefitter_38T_cff.src
src
Definition: TrackRefitter_38T_cff.py:24
MultiTrackValidator::tpParametersAndSelection
void tpParametersAndSelection(const Histograms &histograms, const TrackingParticleRefVector &tPCeff, const ParametersDefinerForTP &parametersDefinerTP, const edm::Event &event, const edm::EventSetup &setup, const reco::BeamSpot &bs, std::vector< std::tuple< TrackingParticle::Vector, TrackingParticle::Point >> &momVert_tPCeff, std::vector< size_t > &selected_tPCeff) const
Definition: MultiTrackValidator.cc:420
duplicaterechits_cfi.trackCollection
trackCollection
Definition: duplicaterechits_cfi.py:4
makeGlobalPositionRcd_cfg.tag
tag
Definition: makeGlobalPositionRcd_cfg.py:6
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
MultiTrackValidator::vertexAssociatorToken_
edm::EDGetTokenT< reco::VertexToTrackingVertexAssociator > vertexAssociatorToken_
Definition: MultiTrackValidator.h:154
edm::AssociationMap< edm::OneToManyWithQualityGeneric< TrackingParticleCollection, edm::View< reco::Track >, double > >
MultiTrackValidator::calculateDrSingleCollection_
const bool calculateDrSingleCollection_
Definition: MultiTrackValidator.h:85
TrackingVertex
Definition: TrackingVertex.h:22
jetUpdater_cfi.sort
sort
Definition: jetUpdater_cfi.py:29
MultiTrackValidator::doPVAssociationPlots_
const bool doPVAssociationPlots_
Definition: MultiTrackValidator.h:92
reco::deltaR2
constexpr auto deltaR2(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:16
MultiTrackValidator::m_dEdx1Tag
edm::EDGetTokenT< edm::ValueMap< reco::DeDxData > > m_dEdx1Tag
Definition: MultiTrackValidator.h:80
EncodedEventId::event
int event() const
get the contents of the subdetector field (should be protected?)
Definition: EncodedEventId.h:30
MultiTrackValidator::doResolutionPlots_
std::vector< bool > doResolutionPlots_
Definition: MultiTrackValidator.h:96
MultiTrackValidator::doSummaryPlots_
const bool doSummaryPlots_
Definition: MultiTrackValidator.h:87
histograms
Definition: histograms.py:1
edm::RefVector::push_back
void push_back(value_type const &ref)
Add a Ref<C, T> to the RefVector.
Definition: RefVector.h:67
edm::RefToBaseVector< reco::Track >
MultiTrackValidator::recoVertexToken_
edm::EDGetTokenT< edm::View< reco::Vertex > > recoVertexToken_
Definition: MultiTrackValidator.h:153
MultiTrackValidator::useAssociators_
const bool useAssociators_
Definition: MultiTrackValidator.h:84
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
TrackingParticle::eventId
EncodedEventId eventId() const
Signal source, crossing number.
Definition: TrackingParticle.h:72
cmsLHEtoEOSManager.l
l
Definition: cmsLHEtoEOSManager.py:204
MultiTrackValidator::doSeedPlots_
const bool doSeedPlots_
Definition: MultiTrackValidator.h:93
reco::Candidate
Definition: Candidate.h:27
edm::EDConsumerBase::labelsForToken
void labelsForToken(EDGetToken iToken, Labels &oLabels) const
Definition: EDConsumerBase.cc:338
DDAxes::phi
MultiTrackValidator::parametersDefinerIsCosmic_
const bool parametersDefinerIsCosmic_
Definition: MultiTrackValidator.h:61
MultiTrackValidator::histoProducerAlgo_
std::unique_ptr< MTVHistoProducerAlgoForTracker > histoProducerAlgo_
Definition: MultiTrackValidator.h:98
reco::Vertex::Point
math::XYZPoint Point
point in the space
Definition: Vertex.h:40
MultiTrackValidator::tpDefinerEsToken
const edm::ESGetToken< ParametersDefinerForTP, TrackAssociatorRecord > tpDefinerEsToken
Definition: MultiTrackValidator.h:60
MultiTrackValidator::label_tp_fake
edm::EDGetTokenT< TrackingParticleCollection > label_tp_fake
Definition: MultiTrackValidator.h:67
MultiTrackValidator::tpSelector
TrackingParticleSelector tpSelector
Definition: MultiTrackValidator.h:146
MultiTrackValidator::label_tv
edm::EDGetTokenT< TrackingVertexCollection > label_tv
Definition: MultiTrackValidator.h:70
metsig::jet
Definition: SignAlgoResolutions.h:47
PileupSummaryInfo::getPU_NumInteractions
const int getPU_NumInteractions() const
Definition: PileupSummaryInfo.h:62
MultiTrackValidator::label_pileupinfo
edm::EDGetTokenT< std::vector< PileupSummaryInfo > > label_pileupinfo
Definition: MultiTrackValidator.h:71
MultiTrackValidator::associatormapStRs
std::vector< edm::EDGetTokenT< reco::SimToRecoCollection > > associatormapStRs
Definition: MultiTrackValidator.h:125
relativeConstraints.empty
bool empty
Definition: relativeConstraints.py:46
Exception
Definition: hltDiff.cc:245
HLT_FULL_cff.cores
cores
Definition: HLT_FULL_cff.py:104308
associationMapFilterValues
T_AssociationMap associationMapFilterValues(const T_AssociationMap &map, const T_RefVector &valueRefs)
Definition: associationMapFilterValues.h:125
TrackerOfflineValidation_Dqm_cff.dirName
dirName
Definition: TrackerOfflineValidation_Dqm_cff.py:55
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
MultiTrackValidator::cosmictpSelector
CosmicTrackingParticleSelector cosmictpSelector
Definition: MultiTrackValidator.h:147
reco::TrackToTrackingParticleAssociator::associateSimToReco
reco::SimToRecoCollection associateSimToReco(const edm::Handle< edm::View< reco::Track >> &tCH, const edm::Handle< TrackingParticleCollection > &tPCH) const
Definition: TrackToTrackingParticleAssociator.h:71
MultiTrackValidator_cfi.doResolutionPlotsForLabels
doResolutionPlotsForLabels
do resolution plots only for these labels (or all if empty)
Definition: MultiTrackValidator_cfi.py:101
edm::EDConsumerBase::esConsumes
auto esConsumes()
Definition: EDConsumerBase.h:206
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:234
MultiTrackValidator::dirName_
std::string dirName_
Definition: MultiTrackValidator.h:137
HGC3DClusterGenMatchSelector_cfi.dR
dR
Definition: HGC3DClusterGenMatchSelector_cfi.py:7
TrackingParticleRef
edm::Ref< TrackingParticleCollection > TrackingParticleRef
Definition: TrackingParticleFwd.h:12
edm::EDConsumerBase::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: EDConsumerBase.h:159
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
hlt_dqm_clientPB-live_cfg.me
me
Definition: hlt_dqm_clientPB-live_cfg.py:61
MultiTrackValidator::bsSrc
edm::EDGetTokenT< reco::BeamSpot > bsSrc
Definition: MultiTrackValidator.h:78
event
Definition: event.py:1
MultiTrackValidator::getSimPVPosition
const TrackingVertex::LorentzVector * getSimPVPosition(const edm::Handle< TrackingVertexCollection > &htv) const
Definition: MultiTrackValidator.cc:381
MultiTrackValidator::m_dEdx2Tag
edm::EDGetTokenT< edm::ValueMap< reco::DeDxData > > m_dEdx2Tag
Definition: MultiTrackValidator.h:81
TrackingParticle::Point
math::XYZPointD Point
point in the space
Definition: TrackingParticle.h:36
edm::RefVector::size
size_type size() const
Size of the RefVector.
Definition: RefVector.h:102
MultiTrackValidator::trackDR
void trackDR(const edm::View< reco::Track > &trackCollection, const edm::View< reco::Track > &trackCollectionDr, DynArray< float > &dR_trk, DynArray< float > &dR_trk_jet, const edm::View< reco::Candidate > *cores) const
Definition: MultiTrackValidator.cc:528
MultiTrackValidator::label_tp_effic
edm::EDGetTokenT< TrackingParticleCollection > label_tp_effic
Definition: MultiTrackValidator.h:66
MultiTrackValidator::doPlotsOnlyForTruePV_
const bool doPlotsOnlyForTruePV_
Definition: MultiTrackValidator.h:86
MTVHistoProducerAlgoForTracker::makeRecoTrackSelectorFromTPSelectorParameters
static std::unique_ptr< RecoTrackSelectorBase > makeRecoTrackSelectorFromTPSelectorParameters(const edm::ParameterSet &pset)
Definition: MTVHistoProducerAlgoForTracker.cc:370
edm::InputTag
Definition: InputTag.h:15
EncodedEventId::bunchCrossing
int bunchCrossing() const
get the detector field from this detid
Definition: EncodedEventId.h:25
PileupSummaryInfo
Definition: PileupSummaryInfo.h:22
MultiTrackValidator::labelTokenForDrCalculation
edm::EDGetTokenT< edm::View< reco::Track > > labelTokenForDrCalculation
Definition: MultiTrackValidator.h:152
MultiTrackValidator::mvaQualityCollectionTokens_
std::vector< std::vector< std::tuple< edm::EDGetTokenT< MVACollection >, edm::EDGetTokenT< QualityMaskCollection > > > > mvaQualityCollectionTokens_
Definition: MultiTrackValidator.h:135
edm::View::size_type
unsigned int size_type
Definition: View.h:90
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
dqm::implementation::IBooker::book1D
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
edm::ProductLabels
Definition: ProductLabels.h:4
MultiTrackValidator::simHitTokens_
std::vector< edm::EDGetTokenT< std::vector< PSimHit > > > simHitTokens_
Definition: MultiTrackValidator.h:73
TrackingVertex::LorentzVector
math::XYZTLorentzVectorD LorentzVector
Definition: TrackingVertex.h:28
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443
TrackingParticleIP::dz
auto dz(const T_Vertex &vertex, const T_Momentum &momentum, const T_Point &point)
Definition: TrackingParticleIP.h:16
python.rootplot.root2matplotlib.replace
def replace(string, replacements)
Definition: root2matplotlib.py:444
reco::TrackBase::highPurity
Definition: TrackBase.h:154