CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Types | Protected Attributes
l1tpf_impl::RegionMapper Class Reference

#include <RegionMapper.h>

Public Member Functions

void addCalo (const l1t::PFCluster &t)
 
void addCalo (const l1t::PFCluster &t, l1t::PFClusterRef ref)
 
void addEmCalo (const l1t::PFCluster &t)
 
void addEmCalo (const l1t::PFCluster &t, l1t::PFClusterRef ref)
 
void addMuon (const l1t::Muon &t)
 
void addMuon (const l1t::TkMuon &t)
 
void addMuon (const l1t::Muon &t, l1t::PFCandidate::MuonRef ref)
 
void addTrack (const l1t::PFTrack &t)
 
void addTrack (const l1t::PFTrack &t, l1t::PFTrackRef ref)
 
void clear ()
 
std::unique_ptr< l1t::PFCandidateCollectionfetch (bool puppi=true, float ptMin=0.01) const
 
std::unique_ptr< l1t::PFCandidateCollectionfetchCalo (float ptMin=0.01, bool emcalo=false) const
 
std::unique_ptr< l1t::PFCandidateCollectionfetchTracks (float ptMin=0.01, bool fromPV=false) const
 
 RegionMapper (const edm::ParameterSet &)
 
std::vector< Region > & regions ()
 
std::pair< unsigned, unsigned > totAndMaxInput (int type) const
 
std::pair< unsigned, unsigned > totAndMaxOutput (int type, bool puppi) const
 
std::unique_ptr< std::vector< unsigned > > vecInput (int type) const
 
std::unique_ptr< std::vector< unsigned > > vecOutput (int type, bool puppi) const
 

Protected Types

enum  TrackAssoMode { TrackAssoMode::atVertex, TrackAssoMode::atCalo, TrackAssoMode::any = 999 }
 

Protected Attributes

std::unordered_map< const l1t::PFCluster *, l1t::PFClusterRefclusterRefMap_
 
std::unordered_map< const l1t::Muon *, l1t::PFCandidate::MuonRefmuonRefMap_
 
std::vector< Regionregions_
 
std::unordered_map< const l1t::PFTrack *, l1t::PFTrackReftrackRefMap_
 
enum l1tpf_impl::RegionMapper::TrackAssoMode trackRegionMode_
 
bool useRelativeRegionalCoordinates_
 

Detailed Description

Definition at line 15 of file RegionMapper.h.

Member Enumeration Documentation

◆ TrackAssoMode

Enumerator
atVertex 
atCalo 
any 

Definition at line 48 of file RegionMapper.h.

48 { atVertex, atCalo, any = 999 } trackRegionMode_;
bool any(const std::vector< T > &v, const T &what)
Definition: ECalSD.cc:37
enum l1tpf_impl::RegionMapper::TrackAssoMode trackRegionMode_

Constructor & Destructor Documentation

◆ RegionMapper()

RegionMapper::RegionMapper ( const edm::ParameterSet iConfig)

Definition at line 5 of file RegionMapper.cc.

References any, atCalo, atVertex, hltEgammaEleL1TrkIsoL1Seeded_cfi::etaBoundaries, l1pfProducerBarrel_cfi::etaExtra, Exception, edm::ParameterSet::existsAs(), edm::ParameterSet::getParameter(), LEDCalibrationChannels::ieta, LEDCalibrationChannels::iphi, M_PI, neta, l1pfProducerBarrel_cfi::phiExtra, l1pfProducerBarrel_cfi::phiSlices, photons_cff::phiWidth, g4SimHits_cfi::Region, regions_, AlCaHLTBitMon_QueryRunRegistry::string, l1pfProducerBarrel_cfi::trackRegionMode, trackRegionMode_, and useRelativeRegionalCoordinates_.

6  if (iConfig.existsAs<std::vector<edm::ParameterSet>>("regions")) {
7  useRelativeRegionalCoordinates_ = iConfig.getParameter<bool>("useRelativeRegionalCoordinates");
8  for (const edm::ParameterSet &preg : iConfig.getParameter<std::vector<edm::ParameterSet>>("regions")) {
9  std::vector<double> etaBoundaries = preg.getParameter<std::vector<double>>("etaBoundaries");
10  unsigned int phiSlices = preg.getParameter<uint32_t>("phiSlices");
11  float etaExtra = preg.getParameter<double>("etaExtra");
12  float phiExtra = preg.getParameter<double>("phiExtra");
13  float phiWidth = 2 * M_PI / phiSlices;
14  unsigned int ncalomax = 0, nemcalomax = 0, ntrackmax = 0, nmuonmax = 0, npfmax = 0, npuppimax = 0;
15  if (preg.existsAs<uint32_t>("caloNMax"))
16  ncalomax = preg.getParameter<uint32_t>("caloNMax");
17  if (preg.existsAs<uint32_t>("emcaloNMax"))
18  nemcalomax = preg.getParameter<uint32_t>("emcaloNMax");
19  if (preg.existsAs<uint32_t>("trackNMax"))
20  ntrackmax = preg.getParameter<uint32_t>("trackNMax");
21  if (preg.existsAs<uint32_t>("muonNMax"))
22  nmuonmax = preg.getParameter<uint32_t>("muonNMax");
23  if (preg.existsAs<uint32_t>("pfNMax"))
24  npfmax = preg.getParameter<uint32_t>("pfNMax");
25  if (preg.existsAs<uint32_t>("puppiNMax"))
26  npuppimax = preg.getParameter<uint32_t>("puppiNMax");
27  for (unsigned int ieta = 0, neta = etaBoundaries.size() - 1; ieta < neta; ++ieta) {
28  for (unsigned int iphi = 0; iphi < phiSlices; ++iphi) {
29  float phiCenter = (iphi + 0.5) * phiWidth - M_PI;
30  regions_.push_back(Region(etaBoundaries[ieta],
31  etaBoundaries[ieta + 1],
32  phiCenter,
33  phiWidth,
34  etaExtra,
35  phiExtra,
37  ncalomax,
38  nemcalomax,
39  ntrackmax,
40  nmuonmax,
41  npfmax,
42  npuppimax));
43  }
44  }
45  }
46  std::string trackRegionMode = "TrackAssoMode::any";
47  if (iConfig.existsAs<std::string>("trackRegionMode"))
48  trackRegionMode = iConfig.getParameter<std::string>("trackRegionMode");
49  if (trackRegionMode == "atVertex")
51  else if (trackRegionMode == "atCalo")
53  else if (trackRegionMode == "any")
55  else
56  throw cms::Exception(
57  "Configuration",
58  "Unsupported value for trackRegionMode: " + trackRegionMode + " (allowed are 'atVertex', 'atCalo', 'any')");
59  } else {
60  // start off with a dummy region
61  unsigned int ncalomax = 0, nemcalomax = 0, ntrackmax = 0, nmuonmax = 0, npfmax = 0, npuppimax = 0;
62  regions_.emplace_back(-5.5,
63  5.5,
64  0,
65  2 * M_PI,
66  0.5,
67  0.5,
69  ncalomax,
70  nemcalomax,
71  ntrackmax,
72  nmuonmax,
73  npfmax,
74  npuppimax);
75  }
76 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
enum l1tpf_impl::RegionMapper::TrackAssoMode trackRegionMode_
bool existsAs(std::string const &parameterName, bool trackiness=true) const
checks if a parameter exists as a given type
Definition: ParameterSet.h:171
const int neta
std::vector< Region > regions_
Definition: RegionMapper.h:46
#define M_PI

Member Function Documentation

◆ addCalo() [1/2]

void RegionMapper::addCalo ( const l1t::PFCluster t)

Definition at line 153 of file RegionMapper.cc.

References L1TowerCalibrationProducer_cfi::calo, AlCaHLTBitMon_ParallelJobs::p, alignCSCRings::r, and regions_.

Referenced by addCalo(), and L1TPFProducer::produce().

153  {
154  if (p.pt() == 0)
155  return;
156  for (Region &r : regions_) {
157  if (r.contains(p.eta(), p.phi())) {
159  calo.fill(p.pt(), p.emEt(), p.ptError(), r.localEta(p.eta()), r.localPhi(p.phi()), p.isEM(), 0, &p);
160  r.calo.push_back(calo);
161  }
162  }
163 }
std::vector< Region > regions_
Definition: RegionMapper.h:46
Definition: Common.h:9

◆ addCalo() [2/2]

void RegionMapper::addCalo ( const l1t::PFCluster t,
l1t::PFClusterRef  ref 
)

Definition at line 164 of file RegionMapper.cc.

References addCalo(), clusterRefMap_, and AlCaHLTBitMon_ParallelJobs::p.

164  {
165  addCalo(p);
166  clusterRefMap_[&p] = ref;
167 }
std::unordered_map< const l1t::PFCluster *, l1t::PFClusterRef > clusterRefMap_
Definition: RegionMapper.h:51
void addCalo(const l1t::PFCluster &t)

◆ addEmCalo() [1/2]

void RegionMapper::addEmCalo ( const l1t::PFCluster t)

Definition at line 169 of file RegionMapper.cc.

References L1TowerCalibrationProducer_cfi::calo, AlCaHLTBitMon_ParallelJobs::p, alignCSCRings::r, and regions_.

Referenced by addEmCalo(), and L1TPFProducer::produce().

169  {
170  if (p.pt() == 0)
171  return;
172  for (Region &r : regions_) {
173  if (r.contains(p.eta(), p.phi())) {
175  calo.fill(p.pt(), p.emEt(), p.ptError(), r.localEta(p.eta()), r.localPhi(p.phi()), p.isEM(), 0, &p);
176  r.emcalo.push_back(calo);
177  }
178  }
179 }
std::vector< Region > regions_
Definition: RegionMapper.h:46
Definition: Common.h:9

◆ addEmCalo() [2/2]

void RegionMapper::addEmCalo ( const l1t::PFCluster t,
l1t::PFClusterRef  ref 
)

Definition at line 180 of file RegionMapper.cc.

References addEmCalo(), clusterRefMap_, and AlCaHLTBitMon_ParallelJobs::p.

180  {
181  addEmCalo(p);
182  clusterRefMap_[&p] = ref;
183 }
std::unordered_map< const l1t::PFCluster *, l1t::PFClusterRef > clusterRefMap_
Definition: RegionMapper.h:51
void addEmCalo(const l1t::PFCluster &t)

◆ addMuon() [1/3]

void RegionMapper::addMuon ( const l1t::Muon t)

Definition at line 124 of file RegionMapper.cc.

References amptDefaultParameters_cff::mu, alignCSCRings::r, and regions_.

Referenced by addMuon(), and L1TPFProducer::produce().

124  {
125  // now let's be optimistic and make things very simple
126  // we don't propagate anything
127  for (Region &r : regions_) {
128  if (r.contains(mu.eta(), mu.phi())) {
129  Muon prop;
130  prop.fill(mu.pt(), r.localEta(mu.eta()), r.localPhi(mu.phi()), mu.charge(), mu.hwQual(), &mu);
131  r.muon.push_back(prop);
132  }
133  }
134 }
Definition: Muon.py:1
std::vector< Region > regions_
Definition: RegionMapper.h:46

◆ addMuon() [2/3]

void RegionMapper::addMuon ( const l1t::TkMuon t)

Definition at line 136 of file RegionMapper.cc.

References amptDefaultParameters_cff::mu, alignCSCRings::r, and regions_.

136  {
137  // now let's be optimistic and make things very simple
138  // we don't propagate anything
139  for (Region &r : regions_) {
140  if (r.contains(mu.eta(), mu.phi())) {
141  Muon prop;
142  prop.fill(mu.pt(), r.localEta(mu.eta()), r.localPhi(mu.phi()), mu.charge(), mu.hwQual());
143  r.muon.push_back(prop);
144  }
145  }
146 }
Definition: Muon.py:1
std::vector< Region > regions_
Definition: RegionMapper.h:46

◆ addMuon() [3/3]

void RegionMapper::addMuon ( const l1t::Muon t,
l1t::PFCandidate::MuonRef  ref 
)

Definition at line 148 of file RegionMapper.cc.

References addMuon(), amptDefaultParameters_cff::mu, and muonRefMap_.

148  {
149  addMuon(mu);
150  muonRefMap_[&mu] = ref;
151 }
void addMuon(const l1t::Muon &t)
std::unordered_map< const l1t::Muon *, l1t::PFCandidate::MuonRef > muonRefMap_
Definition: RegionMapper.h:53

◆ addTrack() [1/2]

void RegionMapper::addTrack ( const l1t::PFTrack t)

Definition at line 86 of file RegionMapper.cc.

References any, atCalo, atVertex, l1tpf_impl::InputTrack::hwChi2, l1tpf_impl::InputTrack::hwStubs, alignCSCRings::r, regions_, submitPVValidationJobs::t, and trackRegionMode_.

Referenced by addTrack(), and L1TPFProducer::produce().

86  {
87  // now let's be optimistic and make things very simple
88  // we propagate in floating point the track to the calo
89  // we add the track to the region corresponding to its vertex (eta,phi) coordinates AND its (eta,phi) calo coordinates
90  for (Region &r : regions_) {
91  bool inside = true;
92  switch (trackRegionMode_) {
94  inside = r.contains(t.eta(), t.phi());
95  break;
97  inside = r.contains(t.caloEta(), t.caloPhi());
98  break;
99  case TrackAssoMode::any:
100  inside = r.contains(t.eta(), t.phi()) || r.contains(t.caloEta(), t.caloPhi());
101  break;
102  }
103  if (inside) {
104  PropagatedTrack prop;
105  prop.fillInput(t.pt(), r.localEta(t.eta()), r.localPhi(t.phi()), t.charge(), t.vertex().Z(), t.quality(), &t);
106  prop.fillPropagated(t.pt(),
107  t.trkPtError(),
108  t.caloPtError(),
109  r.localEta(t.caloEta()),
110  r.localPhi(t.caloPhi()),
111  t.quality(),
112  t.isMuon());
113  prop.hwStubs = t.nStubs();
114  prop.hwChi2 = round(t.chi2() * 10);
115  r.track.push_back(prop);
116  }
117  }
118 }
enum l1tpf_impl::RegionMapper::TrackAssoMode trackRegionMode_
std::vector< Region > regions_
Definition: RegionMapper.h:46

◆ addTrack() [2/2]

void RegionMapper::addTrack ( const l1t::PFTrack t,
l1t::PFTrackRef  ref 
)

Definition at line 119 of file RegionMapper.cc.

References addTrack(), submitPVValidationJobs::t, and trackRefMap_.

119  {
120  addTrack(t);
121  trackRefMap_[&t] = ref;
122 }
std::unordered_map< const l1t::PFTrack *, l1t::PFTrackRef > trackRefMap_
Definition: RegionMapper.h:52
void addTrack(const l1t::PFTrack &t)
Definition: RegionMapper.cc:86

◆ clear()

void RegionMapper::clear ( void  )

Definition at line 78 of file RegionMapper.cc.

References clusterRefMap_, muonRefMap_, alignCSCRings::r, regions_, and trackRefMap_.

Referenced by L1TPFProducer::produce().

78  {
79  for (Region &r : regions_)
80  r.zero();
81  clusterRefMap_.clear();
82  trackRefMap_.clear();
83  muonRefMap_.clear();
84 }
std::unordered_map< const l1t::PFTrack *, l1t::PFTrackRef > trackRefMap_
Definition: RegionMapper.h:52
std::unordered_map< const l1t::PFCluster *, l1t::PFClusterRef > clusterRefMap_
Definition: RegionMapper.h:51
std::vector< Region > regions_
Definition: RegionMapper.h:46
std::unordered_map< const l1t::Muon *, l1t::PFCandidate::MuonRef > muonRefMap_
Definition: RegionMapper.h:53

◆ fetch()

std::unique_ptr< l1t::PFCandidateCollection > RegionMapper::fetch ( bool  puppi = true,
float  ptMin = 0.01 
) const

Definition at line 185 of file RegionMapper.cc.

References any, atCalo, atVertex, clusterRefMap_, Exception, f, match(), muonRefMap_, AlCaHLTBitMon_ParallelJobs::p, ptMin, alignCSCRings::r, regions_, runTheMatrix::ret, trackRefMap_, and trackRegionMode_.

Referenced by L1TPFProducer::produce().

185  {
186  auto ret = std::make_unique<l1t::PFCandidateCollection>();
187  for (const Region &r : regions_) {
188  for (const PFParticle &p : (puppi ? r.puppi : r.pf)) {
189  bool inside = true;
190  switch (trackRegionMode_) {
192  inside = r.fiducialLocal(p.floatVtxEta(), p.floatVtxPhi());
193  break;
195  inside = r.fiducialLocal(p.floatEta(), p.floatPhi());
196  break;
197  case TrackAssoMode::any:
198  inside = r.fiducialLocal(p.floatVtxEta(), p.floatVtxPhi());
199  break; // WARNING: this may not be the best choice
200  }
201  if (!inside)
202  continue;
203  if (p.floatPt() > ptMin) {
205  p.floatPt(), r.globalEta(p.floatVtxEta()), r.globalPhi(p.floatVtxPhi()), 0.13f);
206  ret->emplace_back(l1t::PFCandidate::ParticleType(p.hwId), p.intCharge(), p4, p.floatPuppiW());
207  ret->back().setVertex(reco::Particle::Point(0, 0, p.floatDZ()));
208  ret->back().setStatus(p.hwStatus);
209  if (p.cluster.src) {
210  auto match = clusterRefMap_.find(p.cluster.src);
211  if (match == clusterRefMap_.end()) {
212  throw cms::Exception("CorruptData") << "Invalid cluster pointer in PF candidate id " << p.hwId << " pt "
213  << p4.pt() << " eta " << p4.eta() << " phi " << p4.phi();
214  }
215  ret->back().setPFCluster(match->second);
216  }
217  if (p.track.src) {
218  auto match = trackRefMap_.find(p.track.src);
219  if (match == trackRefMap_.end()) {
220  throw cms::Exception("CorruptData") << "Invalid track pointer in PF candidate id " << p.hwId << " pt "
221  << p4.pt() << " eta " << p4.eta() << " phi " << p4.phi();
222  }
223  ret->back().setPFTrack(match->second);
224  }
225  if (p.muonsrc) {
226  auto match = muonRefMap_.find(p.muonsrc);
227  if (match == muonRefMap_.end()) {
228  throw cms::Exception("CorruptData") << "Invalid muon pointer in PF candidate id " << p.hwId << " pt "
229  << p4.pt() << " eta " << p4.eta() << " phi " << p4.phi();
230  }
231  ret->back().setMuon(match->second);
232  }
233  }
234  }
235  }
236  return ret;
237 }
std::unordered_map< const l1t::PFTrack *, l1t::PFTrackRef > trackRefMap_
Definition: RegionMapper.h:52
ret
prodAgent to be discontinued
enum l1tpf_impl::RegionMapper::TrackAssoMode trackRegionMode_
std::unordered_map< const l1t::PFCluster *, l1t::PFClusterRef > clusterRefMap_
Definition: RegionMapper.h:51
constexpr float ptMin
math::XYZPoint Point
point in the space
Definition: Particle.h:25
std::vector< Region > regions_
Definition: RegionMapper.h:46
double f[11][100]
std::unordered_map< const l1t::Muon *, l1t::PFCandidate::MuonRef > muonRefMap_
Definition: RegionMapper.h:53
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition: Particle.h:23
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
Definition: Utils.h:10

◆ fetchCalo()

std::unique_ptr< l1t::PFCandidateCollection > RegionMapper::fetchCalo ( float  ptMin = 0.01,
bool  emcalo = false 
) const

Definition at line 239 of file RegionMapper.cc.

References clusterRefMap_, Exception, f, CalibrationSummaryClient_cfi::kind, match(), l1t::PFCandidate::NeutralHadron, AlCaHLTBitMon_ParallelJobs::p, l1t::PFCandidate::Photon, ptMin, alignCSCRings::r, regions_, and runTheMatrix::ret.

Referenced by L1TPFProducer::produce().

239  {
240  auto ret = std::make_unique<l1t::PFCandidateCollection>();
241  for (const Region &r : regions_) {
242  for (const CaloCluster &p : (emcalo ? r.emcalo : r.calo)) {
243  if (!r.fiducialLocal(p.floatEta(), p.floatPhi()))
244  continue;
245  if (p.floatPt() > ptMin) {
246  reco::Particle::PolarLorentzVector p4(p.floatPt(), r.globalEta(p.floatEta()), r.globalPhi(p.floatPhi()), 0.13f);
249  ret->emplace_back(kind, 0, p4);
250  if (p.src) {
251  auto match = clusterRefMap_.find(p.src);
252  if (match == clusterRefMap_.end()) {
253  throw cms::Exception("CorruptData")
254  << "Invalid cluster pointer in cluster pt " << p4.pt() << " eta " << p4.eta() << " phi " << p4.phi();
255  }
256  ret->back().setPFCluster(match->second);
257  }
258  }
259  }
260  }
261  return ret;
262 }
ret
prodAgent to be discontinued
std::unordered_map< const l1t::PFCluster *, l1t::PFClusterRef > clusterRefMap_
Definition: RegionMapper.h:51
constexpr float ptMin
std::vector< Region > regions_
Definition: RegionMapper.h:46
double f[11][100]
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition: Particle.h:23
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
Definition: Utils.h:10

◆ fetchTracks()

std::unique_ptr< l1t::PFCandidateCollection > RegionMapper::fetchTracks ( float  ptMin = 0.01,
bool  fromPV = false 
) const

Definition at line 264 of file RegionMapper.cc.

References any, atCalo, atVertex, l1t::PFCandidate::ChargedHadron, Exception, f, isotracks_cff::fromPV, CalibrationSummaryClient_cfi::kind, match(), l1t::PFCandidate::Muon, AlCaHLTBitMon_ParallelJobs::p, ptMin, alignCSCRings::r, regions_, runTheMatrix::ret, trackRefMap_, and trackRegionMode_.

Referenced by L1TPFProducer::produce().

264  {
265  auto ret = std::make_unique<l1t::PFCandidateCollection>();
266  for (const Region &r : regions_) {
267  for (const PropagatedTrack &p : r.track) {
268  if (fromPV && !p.fromPV)
269  continue;
270  bool inside = true;
271  switch (trackRegionMode_) {
273  inside = r.fiducialLocal(p.floatVtxEta(), p.floatVtxPhi());
274  break;
276  inside = r.fiducialLocal(p.floatEta(), p.floatPhi());
277  break;
278  case TrackAssoMode::any:
279  inside = r.fiducialLocal(p.floatVtxEta(), p.floatVtxPhi());
280  break; // WARNING: this may not be the best choice
281  }
282  if (!inside)
283  continue;
284  if (p.floatPt() > ptMin) {
286  p.floatVtxPt(), r.globalEta(p.floatVtxEta()), r.globalPhi(p.floatVtxPhi()), 0.13f);
288  ret->emplace_back(kind, p.intCharge(), p4);
289  ret->back().setVertex(reco::Particle::Point(0, 0, p.floatDZ()));
290  if (p.src) {
291  auto match = trackRefMap_.find(p.src);
292  if (match == trackRefMap_.end()) {
293  throw cms::Exception("CorruptData")
294  << "Invalid track pointer in PF track pt " << p4.pt() << " eta " << p4.eta() << " phi " << p4.phi();
295  }
296  ret->back().setPFTrack(match->second);
297  }
298  }
299  }
300  }
301  return ret;
302 }
std::unordered_map< const l1t::PFTrack *, l1t::PFTrackRef > trackRefMap_
Definition: RegionMapper.h:52
ret
prodAgent to be discontinued
enum l1tpf_impl::RegionMapper::TrackAssoMode trackRegionMode_
constexpr float ptMin
math::XYZPoint Point
point in the space
Definition: Particle.h:25
std::vector< Region > regions_
Definition: RegionMapper.h:46
double f[11][100]
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition: Particle.h:23
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
Definition: Utils.h:10

◆ regions()

std::vector<Region>& l1tpf_impl::RegionMapper::regions ( )
inline

Definition at line 34 of file RegionMapper.h.

References regions_.

Referenced by L1TPFProducer::produce().

34 { return regions_; }
std::vector< Region > regions_
Definition: RegionMapper.h:46

◆ totAndMaxInput()

std::pair< unsigned, unsigned > RegionMapper::totAndMaxInput ( int  type) const

Definition at line 304 of file RegionMapper.cc.

References SiStripPI::max, gpuPixelDoublets::ntot, alignCSCRings::r, and regions_.

Referenced by L1TPFProducer::produce().

304  {
305  unsigned ntot = 0, nmax = 0;
306  for (const auto &r : regions_) {
307  unsigned int ni = r.nInput(Region::InputType(type));
308  ntot += ni;
309  nmax = std::max(nmax, ni);
310  }
311  return std::make_pair(ntot, nmax);
312 }
std::vector< Region > regions_
Definition: RegionMapper.h:46
__shared__ uint32_t ntot

◆ totAndMaxOutput()

std::pair< unsigned, unsigned > RegionMapper::totAndMaxOutput ( int  type,
bool  puppi 
) const

Definition at line 323 of file RegionMapper.cc.

References SiStripPI::max, gpuPixelDoublets::ntot, alignCSCRings::r, and regions_.

Referenced by L1TPFProducer::produce().

323  {
324  unsigned ntot = 0, nmax = 0;
325  for (const auto &r : regions_) {
326  unsigned int ni = r.nOutput(Region::OutputType(type), puppi);
327  ntot += ni;
328  nmax = std::max(nmax, ni);
329  }
330  return std::make_pair(ntot, nmax);
331 }
std::vector< Region > regions_
Definition: RegionMapper.h:46
__shared__ uint32_t ntot

◆ vecInput()

std::unique_ptr< std::vector< unsigned > > RegionMapper::vecInput ( int  type) const

Definition at line 314 of file RegionMapper.cc.

References alignCSCRings::r, regions_, and findQualityFiles::v.

Referenced by L1TPFProducer::produce().

314  {
315  auto v = std::make_unique<std::vector<unsigned>>();
316  for (const auto &r : regions_) {
317  unsigned ni = r.nInput(Region::InputType(type));
318  v->push_back(ni);
319  }
320  return v;
321 }
std::vector< Region > regions_
Definition: RegionMapper.h:46

◆ vecOutput()

std::unique_ptr< std::vector< unsigned > > RegionMapper::vecOutput ( int  type,
bool  puppi 
) const

Definition at line 333 of file RegionMapper.cc.

References alignCSCRings::r, regions_, and findQualityFiles::v.

Referenced by L1TPFProducer::produce().

333  {
334  auto v = std::make_unique<std::vector<unsigned>>();
335  for (const auto &r : regions_) {
336  unsigned ni = r.nOutput(Region::OutputType(type), puppi);
337  v->push_back(ni);
338  }
339  return v;
340 }
std::vector< Region > regions_
Definition: RegionMapper.h:46

Member Data Documentation

◆ clusterRefMap_

std::unordered_map<const l1t::PFCluster *, l1t::PFClusterRef> l1tpf_impl::RegionMapper::clusterRefMap_
protected

Definition at line 51 of file RegionMapper.h.

Referenced by addCalo(), addEmCalo(), clear(), fetch(), and fetchCalo().

◆ muonRefMap_

std::unordered_map<const l1t::Muon *, l1t::PFCandidate::MuonRef> l1tpf_impl::RegionMapper::muonRefMap_
protected

Definition at line 53 of file RegionMapper.h.

Referenced by addMuon(), clear(), and fetch().

◆ regions_

std::vector<Region> l1tpf_impl::RegionMapper::regions_
protected

◆ trackRefMap_

std::unordered_map<const l1t::PFTrack *, l1t::PFTrackRef> l1tpf_impl::RegionMapper::trackRefMap_
protected

Definition at line 52 of file RegionMapper.h.

Referenced by addTrack(), clear(), fetch(), and fetchTracks().

◆ trackRegionMode_

enum l1tpf_impl::RegionMapper::TrackAssoMode l1tpf_impl::RegionMapper::trackRegionMode_
protected

◆ useRelativeRegionalCoordinates_

bool l1tpf_impl::RegionMapper::useRelativeRegionalCoordinates_
protected

Definition at line 47 of file RegionMapper.h.

Referenced by RegionMapper().