CMS 3D CMS Logo

SimTrackstersProducer.cc
Go to the documentation of this file.
1 // Author: Felice Pantaleo, Leonardo Cristella - felice.pantaleo@cern.ch, leonardo.cristella@cern.ch
2 // Date: 09/2021
3 
4 // user include files
5 
15 
18 
24 
28 
32 
34 
37 
39 
41 
42 #include "TrackstersPCA.h"
43 #include <vector>
44 #include <map>
45 #include <iterator>
46 #include <algorithm>
47 #include <numeric>
48 
49 using namespace ticl;
50 
52 public:
54  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
55 
56  void produce(edm::Event&, const edm::EventSetup&) override;
57  void makePUTrackster(const std::vector<float>& inputClusterMask,
58  std::vector<float>& output_mask,
59  std::vector<Trackster>& result,
60  const edm::ProductID seed,
61  int loop_index);
62 
63  void addTrackster(const int index,
64  const std::vector<std::pair<edm::Ref<reco::CaloClusterCollection>, std::pair<float, float>>>& lcVec,
65  const std::vector<float>& inputClusterMask,
66  const float fractionCut_,
67  const float energy,
68  const int pdgId,
69  const int charge,
70  float time,
71  const edm::ProductID seed,
72  const Trackster::IterationIndex iter,
73  std::vector<float>& output_mask,
74  std::vector<Trackster>& result,
75  int& loop_index,
76  const bool add = false);
77 
78 private:
80  const bool doNose_ = false;
84 
87 
92  const float fractionCut_;
93  const float qualityCutTrack_;
96 
99 
103 };
104 
106 
108  : detector_(ps.getParameter<std::string>("detector")),
109  doNose_(detector_ == "HFNose"),
110  clusters_token_(consumes(ps.getParameter<edm::InputTag>("layer_clusters"))),
111  clustersTime_token_(consumes(ps.getParameter<edm::InputTag>("time_layerclusters"))),
112  filtered_layerclusters_mask_token_(consumes(ps.getParameter<edm::InputTag>("filtered_mask"))),
113  simclusters_token_(consumes(ps.getParameter<edm::InputTag>("simclusters"))),
114  caloparticles_token_(consumes(ps.getParameter<edm::InputTag>("caloparticles"))),
115  associatorMapSimClusterToReco_token_(
116  consumes(ps.getParameter<edm::InputTag>("layerClusterSimClusterAssociator"))),
117  associatorMapCaloParticleToReco_token_(
118  consumes(ps.getParameter<edm::InputTag>("layerClusterCaloParticleAssociator"))),
119  geom_token_(esConsumes()),
120  fractionCut_(ps.getParameter<double>("fractionCut")),
121  qualityCutTrack_(ps.getParameter<double>("qualityCutTrack")),
122  trackingParticleToken_(
123  consumes<std::vector<TrackingParticle>>(ps.getParameter<edm::InputTag>("trackingParticles"))),
124  simVerticesToken_(consumes<std::vector<SimVertex>>(ps.getParameter<edm::InputTag>("simVertices"))),
125  recoTracksToken_(consumes<std::vector<reco::Track>>(ps.getParameter<edm::InputTag>("recoTracks"))),
126  cutTk_(ps.getParameter<std::string>("cutTk")),
127  associatormapStRsToken_(consumes(ps.getParameter<edm::InputTag>("tpToTrack"))),
128  associationSimTrackToTPToken_(consumes(ps.getParameter<edm::InputTag>("simTrackToTPMap"))) {
129  produces<TracksterCollection>();
130  produces<std::vector<float>>();
131  produces<TracksterCollection>("fromCPs");
132  produces<TracksterCollection>("PU");
133  produces<std::vector<float>>("fromCPs");
134  produces<std::map<uint, std::vector<uint>>>();
135  produces<std::vector<TICLCandidate>>();
136 }
137 
140  desc.add<std::string>("detector", "HGCAL");
141  desc.add<edm::InputTag>("layer_clusters", edm::InputTag("hgcalMergeLayerClusters"));
142  desc.add<edm::InputTag>("time_layerclusters", edm::InputTag("hgcalMergeLayerClusters", "timeLayerCluster"));
143  desc.add<edm::InputTag>("filtered_mask", edm::InputTag("filteredLayerClustersSimTracksters", "ticlSimTracksters"));
144  desc.add<edm::InputTag>("simclusters", edm::InputTag("mix", "MergedCaloTruth"));
145  desc.add<edm::InputTag>("caloparticles", edm::InputTag("mix", "MergedCaloTruth"));
146  desc.add<edm::InputTag>("layerClusterSimClusterAssociator",
147  edm::InputTag("layerClusterSimClusterAssociationProducer"));
148  desc.add<edm::InputTag>("layerClusterCaloParticleAssociator",
149  edm::InputTag("layerClusterCaloParticleAssociationProducer"));
150  desc.add<edm::InputTag>("recoTracks", edm::InputTag("generalTracks"));
151  desc.add<std::string>("cutTk",
152  "1.48 < abs(eta) < 3.0 && pt > 1. && quality(\"highPurity\") && "
153  "hitPattern().numberOfLostHits(\"MISSING_OUTER_HITS\") < 5");
154  desc.add<edm::InputTag>("tpToTrack", edm::InputTag("trackingParticleRecoTrackAsssociation"));
155 
156  desc.add<edm::InputTag>("trackingParticles", edm::InputTag("mix", "MergedTrackTruth"));
157  desc.add<edm::InputTag>("simVertices", edm::InputTag("g4SimHits"));
158 
159  desc.add<edm::InputTag>("simTrackToTPMap", edm::InputTag("simHitTPAssocProducer", "simTrackToTP"));
160  desc.add<double>("fractionCut", 0.);
161  desc.add<double>("qualityCutTrack", 0.75);
162 
163  descriptions.addWithDefaultLabel(desc);
164 }
165 void SimTrackstersProducer::makePUTrackster(const std::vector<float>& inputClusterMask,
166  std::vector<float>& output_mask,
167  std::vector<Trackster>& result,
168  const edm::ProductID seed,
169  int loop_index) {
170  Trackster tmpTrackster;
171  for (size_t i = 0; i < output_mask.size(); i++) {
172  const float remaining_fraction = output_mask[i];
173  if (remaining_fraction > 0.) {
174  tmpTrackster.vertices().push_back(i);
175  tmpTrackster.vertex_multiplicity().push_back(1. / remaining_fraction);
176  }
177  }
178  tmpTrackster.setSeed(seed, 0);
179  result.push_back(tmpTrackster);
180 }
181 
183  const int index,
184  const std::vector<std::pair<edm::Ref<reco::CaloClusterCollection>, std::pair<float, float>>>& lcVec,
185  const std::vector<float>& inputClusterMask,
186  const float fractionCut_,
187  const float energy,
188  const int pdgId,
189  const int charge,
190  const float time,
191  const edm::ProductID seed,
192  const Trackster::IterationIndex iter,
193  std::vector<float>& output_mask,
194  std::vector<Trackster>& result,
195  int& loop_index,
196  const bool add) {
197  Trackster tmpTrackster;
198  if (lcVec.empty()) {
199  result[index] = tmpTrackster;
200  return;
201  }
202 
203  tmpTrackster.vertices().reserve(lcVec.size());
204  tmpTrackster.vertex_multiplicity().reserve(lcVec.size());
205  for (auto const& [lc, energyScorePair] : lcVec) {
206  if (inputClusterMask[lc.index()] > 0) {
207  double fraction = energyScorePair.first / lc->energy();
208  if (fraction < fractionCut_)
209  continue;
210  tmpTrackster.vertices().push_back(lc.index());
211  output_mask[lc.index()] -= fraction;
212  tmpTrackster.vertex_multiplicity().push_back(1. / fraction);
213  }
214  }
215 
217  tmpTrackster.setRegressedEnergy(energy);
218  tmpTrackster.setIteration(iter);
219  tmpTrackster.setSeed(seed, index);
220  if (add) {
221  result[index] = tmpTrackster;
222  loop_index += 1;
223  } else {
224  result.push_back(tmpTrackster);
225  }
226 }
227 
229  auto result = std::make_unique<TracksterCollection>();
230  auto output_mask = std::make_unique<std::vector<float>>();
231  auto result_fromCP = std::make_unique<TracksterCollection>();
232  auto resultPU = std::make_unique<TracksterCollection>();
233  auto output_mask_fromCP = std::make_unique<std::vector<float>>();
234  auto cpToSc_SimTrackstersMap = std::make_unique<std::map<uint, std::vector<uint>>>();
235  auto result_ticlCandidates = std::make_unique<std::vector<TICLCandidate>>();
236 
237  const auto& layerClusters = evt.get(clusters_token_);
238  const auto& layerClustersTimes = evt.get(clustersTime_token_);
239  const auto& inputClusterMask = evt.get(filtered_layerclusters_mask_token_);
240  output_mask->resize(layerClusters.size(), 1.f);
241  output_mask_fromCP->resize(layerClusters.size(), 1.f);
242 
243  const auto& simclusters = evt.get(simclusters_token_);
244  edm::Handle<std::vector<CaloParticle>> caloParticles_h;
245  evt.getByToken(caloparticles_token_, caloParticles_h);
246  const auto& caloparticles = *caloParticles_h;
247 
248  const auto& simClustersToRecoColl = evt.get(associatorMapSimClusterToReco_token_);
249  const auto& caloParticlesToRecoColl = evt.get(associatorMapCaloParticleToReco_token_);
250  const auto& simVertices = evt.get(simVerticesToken_);
251 
252  edm::Handle<std::vector<TrackingParticle>> trackingParticles_h;
253  evt.getByToken(trackingParticleToken_, trackingParticles_h);
255  evt.getByToken(recoTracksToken_, recoTracks_h);
256  const auto& TPtoRecoTrackMap = evt.get(associatormapStRsToken_);
257  const auto& simTrackToTPMap = evt.get(associationSimTrackToTPToken_);
258  const auto& recoTracks = *recoTracks_h;
259 
260  const auto& geom = es.getData(geom_token_);
262  const auto num_simclusters = simclusters.size();
263  result->reserve(num_simclusters); // Conservative size, will call shrink_to_fit later
264  const auto num_caloparticles = caloparticles.size();
265  result_fromCP->resize(num_caloparticles);
266  std::map<uint, uint> SimClusterToCaloParticleMap;
267  int loop_index = 0;
268  for (const auto& [key, lcVec] : caloParticlesToRecoColl) {
269  auto const& cp = *(key);
270  auto cpIndex = &cp - &caloparticles[0];
271  for (const auto& scRef : cp.simClusters()) {
272  auto const& sc = *(scRef);
273  auto const scIndex = &sc - &simclusters[0];
274  SimClusterToCaloParticleMap[scIndex] = cpIndex;
275  }
276 
277  auto regr_energy = cp.energy();
278  std::vector<uint> scSimTracksterIdx;
279  scSimTracksterIdx.reserve(cp.simClusters().size());
280 
281  // Create a Trackster from the object entering HGCal
282  if (cp.g4Tracks()[0].crossedBoundary()) {
283  regr_energy = cp.g4Tracks()[0].getMomentumAtBoundary().energy();
284  float time = cp.g4Tracks()[0].getPositionAtBoundary().t();
285  addTrackster(cpIndex,
286  lcVec,
287  inputClusterMask,
288  fractionCut_,
289  regr_energy,
290  cp.pdgId(),
291  cp.charge(),
292  time,
293  key.id(),
295  *output_mask,
296  *result,
297  loop_index);
298  } else {
299  for (const auto& scRef : cp.simClusters()) {
300  const auto& it = simClustersToRecoColl.find(scRef);
301  if (it == simClustersToRecoColl.end())
302  continue;
303  const auto& lcVec = it->val;
304  auto const& sc = *(scRef);
305  auto const scIndex = &sc - &simclusters[0];
306 
307  addTrackster(scIndex,
308  lcVec,
309  inputClusterMask,
310  fractionCut_,
311  sc.g4Tracks()[0].getMomentumAtBoundary().energy(),
312  sc.pdgId(),
313  sc.charge(),
314  sc.g4Tracks()[0].getPositionAtBoundary().t(),
315  scRef.id(),
317  *output_mask,
318  *result,
319  loop_index);
320 
321  if (result->empty())
322  continue;
323  const auto index = result->size() - 1;
324  if (std::find(scSimTracksterIdx.begin(), scSimTracksterIdx.end(), index) == scSimTracksterIdx.end()) {
325  scSimTracksterIdx.emplace_back(index);
326  }
327  }
328  scSimTracksterIdx.shrink_to_fit();
329  }
330  float time = simVertices[cp.g4Tracks()[0].vertIndex()].position().t();
331  // Create a Trackster from any CP
332  addTrackster(cpIndex,
333  lcVec,
334  inputClusterMask,
335  fractionCut_,
336  regr_energy,
337  cp.pdgId(),
338  cp.charge(),
339  time,
340  key.id(),
342  *output_mask_fromCP,
343  *result_fromCP,
344  loop_index,
345  true);
346 
347  if (result_fromCP->empty())
348  continue;
349  const auto index = loop_index - 1;
350  if (cpToSc_SimTrackstersMap->find(index) == cpToSc_SimTrackstersMap->end()) {
351  (*cpToSc_SimTrackstersMap)[index] = scSimTracksterIdx;
352  }
353  }
354  // TODO: remove time computation from PCA calculation and
355  // store time from boundary position in simTracksters
358  result->shrink_to_fit();
360  *result_fromCP, layerClusters, layerClustersTimes, rhtools_.getPositionLayer(rhtools_.lastLayerEE(doNose_)).z());
361 
362  makePUTrackster(inputClusterMask, *output_mask, *resultPU, caloParticles_h.id(), 0);
363 
364  auto simTrackToRecoTrack = [&](UniqueSimTrackId simTkId) -> std::pair<int, float> {
365  int trackIdx = -1;
366  float quality = 0.f;
367  auto ipos = simTrackToTPMap.mapping.find(simTkId);
368  if (ipos != simTrackToTPMap.mapping.end()) {
369  auto jpos = TPtoRecoTrackMap.find((ipos->second));
370  if (jpos != TPtoRecoTrackMap.end()) {
371  auto& associatedRecoTracks = jpos->val;
372  if (!associatedRecoTracks.empty()) {
373  // associated reco tracks are sorted by decreasing quality
374  if (associatedRecoTracks[0].second > qualityCutTrack_) {
375  trackIdx = &(*associatedRecoTracks[0].first) - &recoTracks[0];
376  quality = associatedRecoTracks[0].second;
377  }
378  }
379  }
380  }
381  return {trackIdx, quality};
382  };
383 
384  // Creating the map from TrackingParticle to SimTrackstersFromCP
385  auto& simTrackstersFromCP = *result_fromCP;
386  for (unsigned int i = 0; i < simTrackstersFromCP.size(); ++i) {
387  if (simTrackstersFromCP[i].vertices().empty())
388  continue;
389  const auto& simTrack = caloparticles[simTrackstersFromCP[i].seedIndex()].g4Tracks()[0];
390  UniqueSimTrackId simTkIds(simTrack.trackId(), simTrack.eventId());
391  auto bestAssociatedRecoTrack = simTrackToRecoTrack(simTkIds);
392  if (bestAssociatedRecoTrack.first != -1 and bestAssociatedRecoTrack.second > qualityCutTrack_) {
393  auto trackIndex = bestAssociatedRecoTrack.first;
394  simTrackstersFromCP[i].setTrackIdx(trackIndex);
395  }
396  }
397 
398  auto& simTracksters = *result;
399  // Creating the map from TrackingParticle to SimTrackster
400  std::unordered_map<unsigned int, std::vector<unsigned int>> TPtoSimTracksterMap;
401  for (unsigned int i = 0; i < simTracksters.size(); ++i) {
402  const auto& simTrack = (simTracksters[i].seedID() == caloParticles_h.id())
403  ? caloparticles[simTracksters[i].seedIndex()].g4Tracks()[0]
404  : simclusters[simTracksters[i].seedIndex()].g4Tracks()[0];
405  UniqueSimTrackId simTkIds(simTrack.trackId(), simTrack.eventId());
406  auto bestAssociatedRecoTrack = simTrackToRecoTrack(simTkIds);
407  if (bestAssociatedRecoTrack.first != -1 and bestAssociatedRecoTrack.second > qualityCutTrack_) {
408  auto trackIndex = bestAssociatedRecoTrack.first;
409  simTracksters[i].setTrackIdx(trackIndex);
410  }
411  }
412 
414 
415  result_ticlCandidates->resize(result_fromCP->size());
416  std::vector<int> toKeep;
417  for (size_t i = 0; i < simTracksters_h->size(); ++i) {
418  const auto& simTrackster = (*simTracksters_h)[i];
419  int cp_index = (simTrackster.seedID() == caloParticles_h.id())
420  ? simTrackster.seedIndex()
421  : SimClusterToCaloParticleMap[simTrackster.seedIndex()];
422  auto const& tCP = (*result_fromCP)[cp_index];
423  if (!tCP.vertices().empty()) {
424  auto trackIndex = tCP.trackIdx();
425 
426  auto& cand = (*result_ticlCandidates)[cp_index];
427  cand.addTrackster(edm::Ptr<Trackster>(simTracksters_h, i));
428  if (trackIndex != -1 and (trackIndex < 0 or trackIndex >= (long int)recoTracks.size())) {
429  }
430  cand.setTime((*result_fromCP)[cp_index].time());
431  cand.setTimeError(0);
432  if (trackIndex != -1 && caloparticles[cp_index].charge() != 0)
433  cand.setTrackPtr(edm::Ptr<reco::Track>(recoTracks_h, trackIndex));
434  toKeep.push_back(cp_index);
435  }
436  }
437 
438  auto isHad = [](int pdgId) {
439  pdgId = std::abs(pdgId);
440  if (pdgId == 111)
441  return false;
442  return (pdgId > 100 and pdgId < 900) or (pdgId > 1000 and pdgId < 9000);
443  };
444 
445  for (size_t i = 0; i < result_ticlCandidates->size(); ++i) {
446  auto cp_index = (*result_fromCP)[i].seedIndex();
447  if (cp_index < 0)
448  continue;
449  auto& cand = (*result_ticlCandidates)[i];
450  const auto& cp = caloparticles[cp_index];
451  float rawEnergy = 0.f;
452  float regressedEnergy = 0.f;
453 
454  for (const auto& trackster : cand.tracksters()) {
455  rawEnergy += trackster->raw_energy();
456  regressedEnergy += trackster->regressed_energy();
457  }
458  cand.setRawEnergy(rawEnergy);
459 
460  auto pdgId = cp.pdgId();
461  auto charge = cp.charge();
462  if (cand.trackPtr().isNonnull() and charge == 0) {
463  }
464  if (cand.trackPtr().isNonnull() and charge != 0) {
465  auto const& track = cand.trackPtr().get();
466  if (std::abs(pdgId) == 13) {
467  cand.setPdgId(pdgId);
468  } else {
469  cand.setPdgId((isHad(pdgId) ? 211 : 11) * charge);
470  }
471  cand.setCharge(charge);
472  math::XYZTLorentzVector p4(regressedEnergy * track->momentum().unit().x(),
473  regressedEnergy * track->momentum().unit().y(),
474  regressedEnergy * track->momentum().unit().z(),
475  regressedEnergy);
476  cand.setP4(p4);
477  } else { // neutral candidates
478  cand.setPdgId(isHad(pdgId) ? 130 : 22);
479  cand.setCharge(0);
480 
482  cand.setIdProbability(particleType, 1.f);
483 
484  const auto& simTracksterFromCP = (*result_fromCP)[i];
485  float regressedEnergy = simTracksterFromCP.regressed_energy();
486  math::XYZTLorentzVector p4(regressedEnergy * simTracksterFromCP.barycenter().unit().x(),
487  regressedEnergy * simTracksterFromCP.barycenter().unit().y(),
488  regressedEnergy * simTracksterFromCP.barycenter().unit().z(),
489  regressedEnergy);
490  cand.setP4(p4);
491  }
492  }
493 
494  std::vector<int> all_nums(result_fromCP->size()); // vector containing all caloparticles indexes
495  std::iota(all_nums.begin(), all_nums.end(), 0); // fill the vector with consecutive numbers starting from 0
496 
497  std::vector<int> toRemove;
498  std::set_difference(all_nums.begin(), all_nums.end(), toKeep.begin(), toKeep.end(), std::back_inserter(toRemove));
499  std::sort(toRemove.begin(), toRemove.end(), [](int x, int y) { return x > y; });
500  for (auto const& r : toRemove) {
501  result_fromCP->erase(result_fromCP->begin() + r);
502  result_ticlCandidates->erase(result_ticlCandidates->begin() + r);
503  }
504  evt.put(std::move(result_ticlCandidates));
505  evt.put(std::move(output_mask));
506  evt.put(std::move(result_fromCP), "fromCPs");
507  evt.put(std::move(resultPU), "PU");
508  evt.put(std::move(output_mask_fromCP), "fromCPs");
509  evt.put(std::move(cpToSc_SimTrackstersMap));
510 }
void setSeed(edm::ProductID pid, int index)
Definition: Trackster.h:59
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
ESGetTokenH3DDVariant esConsumes(std::string const &Record, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:133
ProductID id() const
Definition: HandleBase.cc:29
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
void setRegressedEnergy(float value)
Definition: Trackster.h:67
void addTrackster(const int index, const std::vector< std::pair< edm::Ref< reco::CaloClusterCollection >, std::pair< float, float >>> &lcVec, const std::vector< float > &inputClusterMask, const float fractionCut_, const float energy, const int pdgId, const int charge, float time, const edm::ProductID seed, const Trackster::IterationIndex iter, std::vector< float > &output_mask, std::vector< Trackster > &result, int &loop_index, const bool add=false)
bool get(ProductID const &oid, Handle< PROD > &result) const
Definition: Event.h:344
const edm::EDGetTokenT< reco::SimToRecoCollection > associatormapStRsToken_
std::pair< uint32_t, EncodedEventId > UniqueSimTrackId
const edm::EDGetTokenT< std::vector< SimVertex > > simVerticesToken_
const edm::EDGetTokenT< hgcal::SimToRecoCollectionWithSimClusters > associatorMapSimClusterToReco_token_
const edm::EDGetTokenT< std::vector< float > > filtered_layerclusters_mask_token_
const edm::ESGetToken< CaloGeometry, CaloGeometryRecord > geom_token_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:528
const edm::EDGetTokenT< SimTrackToTPMap > associationSimTrackToTPToken_
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
U second(std::pair< T, U > const &p)
void assignPCAtoTracksters(std::vector< Trackster > &, const std::vector< reco::CaloCluster > &, const edm::ValueMap< std::pair< float, float >> &, double, bool energyWeight=true)
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
string quality
Trackster::ParticleType tracksterParticleTypeFromPdgId(int pdgId, int charge)
Definition: commons.h:16
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
void produce(edm::Event &, const edm::EventSetup &) override
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
double f[11][100]
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
const edm::EDGetTokenT< std::vector< CaloParticle > > caloparticles_token_
const edm::EDGetTokenT< std::vector< reco::CaloCluster > > clusters_token_
const edm::EDGetTokenT< edm::ValueMap< std::pair< float, float > > > clustersTime_token_
const StringCutObjectSelector< reco::Track > cutTk_
const edm::EDGetTokenT< hgcal::SimToRecoCollection > associatorMapCaloParticleToReco_token_
SimTrackstersProducer(const edm::ParameterSet &)
std::vector< unsigned int > & vertices()
Definition: Trackster.h:56
const edm::EDGetTokenT< std::vector< SimCluster > > simclusters_token_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
hgcal::RecHitTools rhtools_
const edm::EDGetTokenT< std::vector< reco::Track > > recoTracksToken_
std::vector< float > & vertex_multiplicity()
Definition: Trackster.h:57
const edm::EDGetTokenT< std::vector< TrackingParticle > > trackingParticleToken_
GlobalPoint getPositionLayer(int layer, bool nose=false) const
Definition: RecHitTools.cc:152
void setGeometry(CaloGeometry const &)
Definition: RecHitTools.cc:79
fixed size matrix
void add(std::map< std::string, TH1 *> &h, TH1 *hist)
HLT enums.
Definition: Common.h:8
Monte Carlo truth information used for tracking validation.
void setIteration(const Trackster::IterationIndex i)
Definition: Trackster.h:55
void setIdProbability(ParticleType type, float value)
Definition: Trackster.h:119
const edm::EDGetTokenT< reco::RecoToSimCollection > associatormapRtSsToken_
std::vector< std::string > set_difference(std::vector< std::string > const &v1, std::vector< std::string > const &v2)
def move(src, dest)
Definition: eostools.py:511
unsigned int lastLayerEE(bool nose=false) const
Definition: RecHitTools.h:76
void makePUTrackster(const std::vector< float > &inputClusterMask, std::vector< float > &output_mask, std::vector< Trackster > &result, const edm::ProductID seed, int loop_index)