CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
DisplacedRegionSeedingVertexProducer Class Reference
Inheritance diagram for DisplacedRegionSeedingVertexProducer:
edm::global::EDProducer<> edm::global::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 DisplacedRegionSeedingVertexProducer (const edm::ParameterSet &)
 
void produce (edm::StreamID, edm::Event &, const edm::EventSetup &) const override
 
 ~DisplacedRegionSeedingVertexProducer () override
 
- Public Member Functions inherited from edm::global::EDProducer<>
 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 noexcept final
 
bool wantsGlobalRuns () const noexcept final
 
bool wantsInputProcessBlocks () const noexcept final
 
bool wantsProcessBlocks () const noexcept final
 
bool wantsStreamLuminosityBlocks () const noexcept final
 
bool wantsStreamRuns () const noexcept 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 const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESResolverIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESResolverIndex > 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
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, 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::ESRecordsToProductResolverIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &)
 
- Static Public Member Functions inherited from edm::global::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Member Functions

double getDiscriminatorValue (const DisplacedVertexCluster &, const reco::BeamSpot &) const
 

Private Attributes

const edm::EDGetTokenT< reco::BeamSpotbeamSpotToken_
 
const double discriminatorCut_
 
const double farThreshold_
 
const vector< string > input_names_
 
const unsigned int maxPseudoROIs_
 
const double minRadius_
 
const double nearThreshold_
 
const vector< string > output_names_
 
const double rParam_
 
tensorflow::Session * session_
 
const edm::EDGetTokenT< edm::View< reco::VertexCompositeCandidate > > trackClustersToken_
 

Additional Inherited Members

- Public Types inherited from edm::global::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
template<typename T >
using BranchAliasSetterT = ProductRegistryHelper::BranchAliasSetterT< T >
 
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
 
- Protected Member Functions inherited from edm::ProducerBase
template<Transition Tr = Transition::Event>
auto produces (std::string instanceName) noexcept
 declare what type of product will make and with which optional label More...
 
template<Transition B>
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)
 
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 ()
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
template<Transition Tr = Transition::Event>
auto produces () noexcept
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
void resetItemsToGetFrom (BranchType iType)
 

Detailed Description

Definition at line 32 of file DisplacedRegionSeedingVertexProducer.cc.

Constructor & Destructor Documentation

◆ DisplacedRegionSeedingVertexProducer()

DisplacedRegionSeedingVertexProducer::DisplacedRegionSeedingVertexProducer ( const edm::ParameterSet cfg)

Definition at line 60 of file DisplacedRegionSeedingVertexProducer.cc.

References looper::cfg, tensorflow::createSession(), contentValuesFiles::fullPath, tensorflow::loadGraphDef(), ConfigBuilder::nThreads, AlcaSiPixelAliHarvester0T_cff::options, and session_.

61  : rParam_(cfg.getParameter<double>("rParam")),
62  minRadius_(cfg.getParameter<double>("minRadius")),
63  nearThreshold_(cfg.getParameter<double>("nearThreshold")),
64  farThreshold_(cfg.getParameter<double>("farThreshold")),
65  discriminatorCut_(cfg.getParameter<double>("discriminatorCut")),
66  maxPseudoROIs_(cfg.getParameter<unsigned int>("maxPseudoROIs")),
67  input_names_(cfg.getParameter<vector<string> >("input_names")),
68  output_names_(cfg.getParameter<vector<string> >("output_names")),
69  beamSpotToken_(consumes<reco::BeamSpot>(cfg.getParameter<edm::InputTag>("beamSpot"))),
71  consumes<edm::View<reco::VertexCompositeCandidate> >(cfg.getParameter<edm::InputTag>("trackClusters"))) {
72  unsigned nThreads = cfg.getUntrackedParameter<unsigned>("nThreads");
74  options.setThreading(nThreads);
75  string pbFile = cfg.getParameter<edm::FileInPath>("graph_path").fullPath();
76  auto graphDef = tensorflow::loadGraphDef(pbFile);
78 
79  produces<vector<reco::Vertex> >("nearRegionsOfInterest");
80  produces<vector<reco::Vertex> >("farRegionsOfInterest");
81 }
GraphDef * loadGraphDef(const std::string &pbFile)
Definition: TensorFlow.cc:119
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Session * createSession()
Definition: TensorFlow.cc:136
const edm::EDGetTokenT< edm::View< reco::VertexCompositeCandidate > > trackClustersToken_
const edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_

◆ ~DisplacedRegionSeedingVertexProducer()

DisplacedRegionSeedingVertexProducer::~DisplacedRegionSeedingVertexProducer ( )
override

Definition at line 83 of file DisplacedRegionSeedingVertexProducer.cc.

References tensorflow::closeSession(), and session_.

83  {
84  if (session_ != nullptr)
86 }
bool closeSession(Session *&session)
Definition: TensorFlow.cc:233

Member Function Documentation

◆ fillDescriptions()

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

Definition at line 198 of file DisplacedRegionSeedingVertexProducer.cc.

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

198  {
200 
201  desc.add<double>("rParam", 1.0);
202  desc.add<double>("minRadius", -1.0);
203  desc.add<double>("nearThreshold", 9999.0);
204  desc.add<double>("farThreshold", -1.0);
205  desc.add<double>("discriminatorCut", -1.0);
206  desc.add<vector<string> >("input_names", {"phi_0", "phi_1"});
207  desc.add<vector<string> >("output_names", {"model_5/activation_10/Softmax"});
208  desc.add<unsigned int>("maxPseudoROIs", 10000);
209  desc.addUntracked<unsigned>("nThreads", 1);
210  desc.add<edm::FileInPath>(
211  "graph_path",
213  "RecoTracker/DisplacedRegionalTracking/data/FullData_Phi-64-128-256_16-32-64_F-128-64-32_Model.pb"));
214  desc.add<edm::InputTag>("beamSpot", edm::InputTag("offlineBeamSpot"));
215  desc.add<edm::InputTag>("trackClusters", edm::InputTag("generalV0Candidates", "Kshort"));
216 
217  descriptions.add("displacedRegionProducer", desc);
218 }
void add(std::string const &label, ParameterSetDescription const &psetDescription)

◆ getDiscriminatorValue()

double DisplacedRegionSeedingVertexProducer::getDiscriminatorValue ( const DisplacedVertexCluster roi,
const reco::BeamSpot bs 
) const
private

Definition at line 220 of file DisplacedRegionSeedingVertexProducer.cc.

References reco::Candidate::bestTrack(), cms::cuda::bs, ALPAKA_ACCELERATOR_NAMESPACE::brokenline::constexpr(), DisplacedVertexCluster::constituent(), reco::CompositeCandidate::daughter(), ALCARECOEcalPhiSym_cff::float, reco::TrackBase::highPurity, mps_fire::i, input_names_, dqmiolumiharvest::j, hltPixelTracks_cff::maxNVertices, DisplacedVertexCluster::nConstituents(), output_names_, PatBasicFWLiteJetAnalyzer_Selector_cfg::outputs, tensorflow::run(), session_, and reco::TrackBase::vx().

Referenced by produce().

221  {
222  // The network takes in two maps of data features, one with information
223  // related to the pairwise track vertices and one with information related to
224  // the tracks in an isolation annulus.
225 
226  constexpr int maxNVertices = 40; // maximum number of pairwise track vertices per ROI
227  constexpr int nVertexFeatures = 23; // number of features per pairwise track vertex
228  constexpr int nDimVertices = 3; // number of tensor dimensions for the map of pairwise track vertices
229 
230  constexpr int maxNAnnulusTracks = 10; // maximum number of annulus tracks per ROI
231  constexpr int nAnnulusTrackFeatures = 8; // number of features per annulus track
232  constexpr int nDimAnnulusTracks = 3; // number of tensor dimensions for the map of annulus tracks
233 
234  tensorflow::Tensor vertexTensor(tensorflow::DT_FLOAT, tensorflow::TensorShape({1, maxNVertices, nVertexFeatures}));
235  auto vertex_map = vertexTensor.tensor<float, nDimVertices>();
236  tensorflow::Tensor annulusTensor(tensorflow::DT_FLOAT,
237  tensorflow::TensorShape({1, maxNAnnulusTracks, nAnnulusTrackFeatures}));
238  auto annulus_map = annulusTensor.tensor<float, nDimAnnulusTracks>();
239 
240  for (int i = 0, map_i = 0; map_i < maxNVertices; i++, map_i++) {
241  if (i >= static_cast<int>(roi.nConstituents()))
242  for (unsigned j = 0; j < nVertexFeatures; j++)
243  vertex_map(0, map_i, j) = 0.0;
244  else {
245  const auto &trackCluster = *roi.constituent(i);
246  const auto &track0 = *trackCluster.daughter(0)->bestTrack();
247  const auto &track1 = *trackCluster.daughter(1)->bestTrack();
248 
249  vertex_map(0, map_i, 0) = trackCluster.vx() - bs.x0();
250  vertex_map(0, map_i, 1) = trackCluster.vy() - bs.y0();
251  vertex_map(0, map_i, 2) = trackCluster.vz() - bs.z0();
252 
253  vertex_map(0, map_i, 3) = trackCluster.vertexCovariance()(0, 0);
254  vertex_map(0, map_i, 4) = trackCluster.vertexCovariance()(0, 1);
255  vertex_map(0, map_i, 5) = trackCluster.vertexCovariance()(0, 2);
256  vertex_map(0, map_i, 6) = trackCluster.vertexCovariance()(1, 1);
257  vertex_map(0, map_i, 7) = trackCluster.vertexCovariance()(1, 2);
258  vertex_map(0, map_i, 8) = trackCluster.vertexCovariance()(2, 2);
259 
260  vertex_map(0, map_i, 9) = track0.charge() * track0.pt();
261  vertex_map(0, map_i, 10) = track0.eta();
262  vertex_map(0, map_i, 11) = track0.phi();
263  vertex_map(0, map_i, 12) = track0.dxy(bs);
264  vertex_map(0, map_i, 13) = track0.dz(bs.position());
265  vertex_map(0, map_i, 14) = track0.normalizedChi2();
266  vertex_map(0, map_i, 15) = track0.quality(reco::Track::highPurity) ? 1 : 0;
267 
268  vertex_map(0, map_i, 16) = track1.charge() * track1.pt();
269  vertex_map(0, map_i, 17) = track1.eta();
270  vertex_map(0, map_i, 18) = track1.phi();
271  vertex_map(0, map_i, 19) = track1.dxy(bs);
272  vertex_map(0, map_i, 20) = track1.dz(bs.position());
273  vertex_map(0, map_i, 21) = track1.normalizedChi2();
274  vertex_map(0, map_i, 22) = track1.quality(reco::Track::highPurity) ? 1 : 0;
275  }
276  }
277 
278  for (int i = 0; i < maxNAnnulusTracks; i++)
279  for (unsigned j = 0; j < nAnnulusTrackFeatures; j++)
280  annulus_map(0, i, j) = 0.0;
281 
282  tensorflow::NamedTensorList input_tensors;
283  input_tensors.resize(2);
284  input_tensors[0] = tensorflow::NamedTensor(input_names_.at(0), vertexTensor);
285  input_tensors[1] = tensorflow::NamedTensor(input_names_.at(1), annulusTensor);
286  vector<tensorflow::Tensor> outputs;
287  tensorflow::run(session_, input_tensors, output_names_, &outputs);
288 
289  return (outputs.at(0).flat<float>()(1));
290 }
const Candidate * daughter(size_type) const override
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode) ...
std::vector< NamedTensor > NamedTensorList
Definition: TensorFlow.h:31
double vx() const
x coordinate of the reference point on track
Definition: TrackBase.h:655
std::pair< std::string, Tensor > NamedTensor
Definition: TensorFlow.h:30
const reco::VertexCompositeCandidate * constituent(const unsigned i) const
void run(Session *session, const NamedTensorList &inputs, const std::vector< std::string > &outputNames, std::vector< Tensor > *outputs, const thread::ThreadPoolOptions &threadPoolOptions)
Definition: TensorFlow.cc:271
virtual const Track * bestTrack() const
Definition: Candidate.h:268

◆ produce()

void DisplacedRegionSeedingVertexProducer::produce ( edm::StreamID  streamID,
edm::Event event,
const edm::EventSetup setup 
) const
overridevirtual

Implements edm::global::EDProducerBase.

Definition at line 88 of file DisplacedRegionSeedingVertexProducer.cc.

References a, isoTrack_cff::beamSpot, beamSpotToken_, cms::cuda::bs, ALPAKA_ACCELERATOR_NAMESPACE::brokenline::constexpr(), discriminatorCut_, farThreshold_, getDiscriminatorValue(), mps_fire::i, ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, dqmiolumiharvest::j, WZElectronSkims53X_cff::max, maxPseudoROIs_, SiStripPI::min, minRadius_, eostools::move(), nearThreshold_, rParam_, DisplacedRegionalStep_cff::trackClusters, trackClustersToken_, reco::LeafCandidate::vertex(), and x.

90  {
91  const auto &beamSpot = event.get(beamSpotToken_);
92  const math::XYZVector bs(beamSpot.position());
93 
94  const auto &trackClusters = event.get(trackClustersToken_);
95 
96  // Initialize distances.
97  vector<DisplacedVertexCluster> pseudoROIs;
98  pseudoROIs.reserve(std::min(maxPseudoROIs_, trackClusters.size()));
99  vector<Distance> distances;
100  const double minTrackClusterRadius = minRadius_ - rParam_;
101  for (unsigned i = 0; i < trackClusters.size(); i++) {
102  const reco::VertexCompositeCandidate &trackCluster = trackClusters[i];
103  const math::XYZVector x(trackCluster.vertex());
104  if (minRadius_ < 0.0 || minTrackClusterRadius < 0.0 || (x - bs).rho() > minTrackClusterRadius)
105  pseudoROIs.emplace_back(&trackClusters.at(i), rParam_);
106  if (pseudoROIs.size() == maxPseudoROIs_) {
107  edm::LogWarning("DisplacedRegionSeedingVertexProducer")
108  << "Truncated list of pseudoROIs at " << maxPseudoROIs_ << " out of " << trackClusters.size()
109  << " possible track clusters.";
110  break;
111  }
112  }
113  if (pseudoROIs.size() > 1) {
114  distances.reserve(pseudoROIs.size() * std::max(1.0, pseudoROIs.size() * 0.05));
115  DisplacedVertexClusterItr secondToLast = pseudoROIs.end();
116  secondToLast--;
117  for (DisplacedVertexClusterItr i = pseudoROIs.begin(); i != secondToLast; i++) {
119  j++;
120  for (; j != pseudoROIs.end(); j++) {
121  distances.emplace_back(i, j);
122 
123  // Track clusters farther apart than 4 times rParam_ (i.e., 16 times
124  // rParam_^2) cannot wind up in the same ROI, so remove these pairs.
125  if (distances.back().distance2() > 16.0 * rParam_ * rParam_)
126  distances.pop_back();
127  }
128  }
129  }
130 
131  auto itBegin = distances.begin();
132  auto itLast = distances.end();
133 
134  // Do clustering.
135  while (itBegin != itLast) {
136  //find the lowest distance. Lots of repeatitive calculations done here
137  //as from loop iteration to loop iteration only sqrt(distances.size()) distances
138  //need to be recomputed (those involving best_i
139  //but this is much better than sorting distances..
140  DistanceItr dBest = itBegin;
141  double distanceBest = dBest->distance2();
142 
143  for (auto i = itBegin; i != itLast; i++) {
144  if (distanceBest > i->distance2()) {
145  dBest = i;
146  distanceBest = i->distance2();
147  }
148  }
149 
150  if (dBest->distance2() > rParam_ * rParam_)
151  break;
152 
153  dBest->entities().first->merge(*dBest->entities().second);
154  dBest->entities().second->setInvalid();
155 
156  const auto distancePred = [](const Distance &a) {
157  return (!a.entities().first->valid() || !a.entities().second->valid());
158  };
159  itLast = std::remove_if(itBegin, itLast, distancePred);
160  }
161 
162  const auto pseudoROIPred = [](const DisplacedVertexCluster &a) { return !a.valid(); };
163  auto remove_invalid = std::remove_if(pseudoROIs.begin(), pseudoROIs.end(), pseudoROIPred);
164 
165  // Remove invalid ROIs.
166  const auto roiPred = [&](const DisplacedVertexCluster &roi) {
167  if (!roi.valid())
168  return true;
169  const auto &x(roi.centerOfMass());
170  if ((x - bs).rho() < minRadius_)
171  return true;
172  const double discriminatorValue = ((discriminatorCut_ > 0.0) ? getDiscriminatorValue(roi, beamSpot) : 1.0);
173  if (discriminatorValue < discriminatorCut_)
174  return true;
175  return false;
176  };
177  auto remove_pred = std::remove_if(pseudoROIs.begin(), remove_invalid, roiPred);
178 
179  auto nearRegionsOfInterest = make_unique<vector<reco::Vertex> >();
180  auto farRegionsOfInterest = make_unique<vector<reco::Vertex> >();
181 
182  constexpr std::array<double, 6> errorA{{1.0, 0.0, 1.0, 0.0, 0.0, 1.0}};
183  static const reco::Vertex::Error errorRegion(errorA.begin(), errorA.end(), true, true);
184 
185  for (auto it = pseudoROIs.begin(); it != remove_pred; ++it) {
186  auto const &roi = *it;
187  const auto &x(roi.centerOfMass());
188  if ((x - bs).rho() < nearThreshold_)
189  nearRegionsOfInterest->emplace_back(reco::Vertex::Point(roi.centerOfMass()), errorRegion);
190  if ((x - bs).rho() > farThreshold_)
191  farRegionsOfInterest->emplace_back(reco::Vertex::Point(roi.centerOfMass()), errorRegion);
192  }
193 
194  event.put(std::move(nearRegionsOfInterest), "nearRegionsOfInterest");
195  event.put(std::move(farRegionsOfInterest), "farRegionsOfInterest");
196 }
std::vector< DisplacedVertexCluster >::iterator DisplacedVertexClusterItr
math::Error< dimension >::type Error
covariance error matrix (3x3)
Definition: Vertex.h:45
const Point & vertex() const override
vertex position (overwritten by PF...)
DisplacedVertexCluster::DistanceItr DistanceItr
math::XYZPoint Point
point in the space
Definition: Vertex.h:40
const edm::EDGetTokenT< edm::View< reco::VertexCompositeCandidate > > trackClustersToken_
double getDiscriminatorValue(const DisplacedVertexCluster &, const reco::BeamSpot &) const
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:31
const edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_
double a
Definition: hdecay.h:121
Log< level::Warning, false > LogWarning
def move(src, dest)
Definition: eostools.py:511

Member Data Documentation

◆ beamSpotToken_

const edm::EDGetTokenT<reco::BeamSpot> DisplacedRegionSeedingVertexProducer::beamSpotToken_
private

Definition at line 52 of file DisplacedRegionSeedingVertexProducer.cc.

Referenced by produce().

◆ discriminatorCut_

const double DisplacedRegionSeedingVertexProducer::discriminatorCut_
private

Definition at line 47 of file DisplacedRegionSeedingVertexProducer.cc.

Referenced by produce().

◆ farThreshold_

const double DisplacedRegionSeedingVertexProducer::farThreshold_
private

Definition at line 46 of file DisplacedRegionSeedingVertexProducer.cc.

Referenced by produce().

◆ input_names_

const vector<string> DisplacedRegionSeedingVertexProducer::input_names_
private

Definition at line 49 of file DisplacedRegionSeedingVertexProducer.cc.

Referenced by getDiscriminatorValue().

◆ maxPseudoROIs_

const unsigned int DisplacedRegionSeedingVertexProducer::maxPseudoROIs_
private

Definition at line 48 of file DisplacedRegionSeedingVertexProducer.cc.

Referenced by produce().

◆ minRadius_

const double DisplacedRegionSeedingVertexProducer::minRadius_
private

Definition at line 44 of file DisplacedRegionSeedingVertexProducer.cc.

Referenced by produce().

◆ nearThreshold_

const double DisplacedRegionSeedingVertexProducer::nearThreshold_
private

Definition at line 45 of file DisplacedRegionSeedingVertexProducer.cc.

Referenced by produce().

◆ output_names_

const vector<string> DisplacedRegionSeedingVertexProducer::output_names_
private

Definition at line 50 of file DisplacedRegionSeedingVertexProducer.cc.

Referenced by getDiscriminatorValue().

◆ rParam_

const double DisplacedRegionSeedingVertexProducer::rParam_
private

Definition at line 41 of file DisplacedRegionSeedingVertexProducer.cc.

Referenced by produce().

◆ session_

tensorflow::Session* DisplacedRegionSeedingVertexProducer::session_
private

◆ trackClustersToken_

const edm::EDGetTokenT<edm::View<reco::VertexCompositeCandidate> > DisplacedRegionSeedingVertexProducer::trackClustersToken_
private

Definition at line 53 of file DisplacedRegionSeedingVertexProducer.cc.

Referenced by produce().