CMS 3D CMS Logo

TICLCandidateProducer.cc
Go to the documentation of this file.
1 // Author: Felice Pantaleo, Wahid Redjeb, Aurora Perego (CERN) - felice.pantaleo@cern.ch, wahid.redjeb@cern.ch, aurora.perego@cern.ch
2 // Date: 12/2023
3 #include <memory> // unique_ptr
17 
31 
35 
37 
40 
46 
49 
53 
54 #include "TrackstersPCA.h"
55 
56 using namespace ticl;
57 
59 public:
60  explicit TICLCandidateProducer(const edm::ParameterSet &ps);
61  ~TICLCandidateProducer() override{};
62  void produce(edm::Event &, const edm::EventSetup &) override;
63  static void fillDescriptions(edm::ConfigurationDescriptions &descriptions);
64 
65  void beginRun(edm::Run const &iEvent, edm::EventSetup const &es) override;
66 
67 private:
68  void dumpCandidate(const TICLCandidate &) const;
69 
70  template <typename F>
71  void assignTimeToCandidates(std::vector<TICLCandidate> &resultCandidates,
72  edm::Handle<std::vector<reco::Track>> track_h,
73  MtdHostCollection::ConstView &inputTimingView,
74  F func) const;
75 
76  std::unique_ptr<TICLInterpretationAlgoBase<reco::Track>> generalInterpretationAlgo_;
77  std::vector<edm::EDGetTokenT<std::vector<Trackster>>> egamma_tracksters_tokens_;
78  std::vector<edm::EDGetTokenT<std::vector<std::vector<unsigned>>>> egamma_tracksterlinks_tokens_;
79 
80  std::vector<edm::EDGetTokenT<std::vector<Trackster>>> general_tracksters_tokens_;
81  std::vector<edm::EDGetTokenT<std::vector<std::vector<unsigned>>>> general_tracksterlinks_tokens_;
82 
85 
86  std::vector<edm::EDGetTokenT<std::vector<float>>> original_masks_tokens_;
87 
90 
92  const bool useMTDTiming_;
93  const bool useTimingAverage_;
96 
102 
103  std::once_flag initializeGeometry_;
106  const float tkEnergyCut_ = 2.0f;
112  static constexpr float c_light_ = CLHEP::c_light * CLHEP::ns / CLHEP::cm;
113  static constexpr float timeRes = 0.02f;
114 };
115 
117  : clusters_token_(consumes<std::vector<reco::CaloCluster>>(ps.getParameter<edm::InputTag>("layer_clusters"))),
118  clustersTime_token_(
119  consumes<edm::ValueMap<std::pair<float, float>>>(ps.getParameter<edm::InputTag>("layer_clustersTime"))),
120  tracks_token_(consumes<std::vector<reco::Track>>(ps.getParameter<edm::InputTag>("tracks"))),
121  inputTimingToken_(consumes<MtdHostCollection>(ps.getParameter<edm::InputTag>("timingSoA"))),
122  muons_token_(consumes<std::vector<reco::Muon>>(ps.getParameter<edm::InputTag>("muons"))),
123  useMTDTiming_(ps.getParameter<bool>("useMTDTiming")),
124  useTimingAverage_(ps.getParameter<bool>("useTimingAverage")),
125  timingQualityThreshold_(ps.getParameter<double>("timingQualityThreshold")),
126  geometry_token_(esConsumes<CaloGeometry, CaloGeometryRecord, edm::Transition::BeginRun>()),
127  bfield_token_(esConsumes<MagneticField, IdealMagneticFieldRecord, edm::Transition::BeginRun>()),
128  detector_(ps.getParameter<std::string>("detector")),
129  propName_(ps.getParameter<std::string>("propagator")),
130  propagator_token_(
132  trackingGeometry_token_(
134  cutTk_(ps.getParameter<std::string>("cutTk")) {
135  // These are the CLUE3DEM Tracksters put in the event by the TracksterLinksProducer with the superclustering algorithm
136  for (auto const &tag : ps.getParameter<std::vector<edm::InputTag>>("egamma_tracksters_collections")) {
137  egamma_tracksters_tokens_.emplace_back(consumes<std::vector<Trackster>>(tag));
138  }
139 
140  // These are the links put in the event by the TracksterLinksProducer with the superclustering algorithm
141  for (auto const &tag : ps.getParameter<std::vector<edm::InputTag>>("egamma_tracksterlinks_collections")) {
142  egamma_tracksterlinks_tokens_.emplace_back(consumes<std::vector<std::vector<unsigned int>>>(tag));
143  }
144 
145  //make sure that the number of tracksters collections and tracksterlinks collections is the same
147 
148  // Loop over the edm::VInputTag and append the token to general_tracksters_tokens_
149  // These, instead, are the tracksters already merged by the TrackstersLinksProducer
150  for (auto const &tag : ps.getParameter<std::vector<edm::InputTag>>("general_tracksters_collections")) {
151  general_tracksters_tokens_.emplace_back(consumes<std::vector<Trackster>>(tag));
152  }
153 
154  for (auto const &tag : ps.getParameter<std::vector<edm::InputTag>>("general_tracksterlinks_collections")) {
155  general_tracksterlinks_tokens_.emplace_back(consumes<std::vector<std::vector<unsigned int>>>(tag));
156  }
157 
158  //make sure that the number of tracksters collections and tracksterlinks collections is the same
160 
161  //Loop over the edm::VInputTag of masks and append the token to original_masks_tokens_
162  for (auto const &tag : ps.getParameter<std::vector<edm::InputTag>>("original_masks")) {
163  original_masks_tokens_.emplace_back(consumes<std::vector<float>>(tag));
164  }
165 
166  std::string detectorName_ = (detector_ == "HFNose") ? "HGCalHFNoseSensitive" : "HGCalEESensitive";
167  hdc_token_ =
168  esConsumes<HGCalDDDConstants, IdealGeometryRecord, edm::Transition::BeginRun>(edm::ESInputTag("", detectorName_));
169  if (useMTDTiming_) {
170  inputTimingToken_ = consumes<MtdHostCollection>(ps.getParameter<edm::InputTag>("timingSoA"));
171  }
172 
173  produces<std::vector<TICLCandidate>>();
174 
175  // New trackster collection after linking
176  produces<std::vector<Trackster>>();
177 
178  auto interpretationPSet = ps.getParameter<edm::ParameterSet>("interpretationDescPSet");
179  auto algoType = interpretationPSet.getParameter<std::string>("type");
181  TICLGeneralInterpretationPluginFactory::get()->create(algoType, interpretationPSet, consumesCollector());
182 }
183 
186  hgcons_ = hdc.product();
187 
190 
194 
196 };
197 
198 void filterTracks(edm::Handle<std::vector<reco::Track>> tkH,
199  const edm::Handle<std::vector<reco::Muon>> &muons_h,
201  const float tkEnergyCut_,
202  std::vector<bool> &maskTracks) {
203  auto const &tracks = *tkH;
204  for (unsigned i = 0; i < tracks.size(); ++i) {
205  const auto &tk = tracks[i];
206  reco::TrackRef trackref = reco::TrackRef(tkH, i);
207 
208  // veto tracks associated to muons
209  int muId = PFMuonAlgo::muAssocToTrack(trackref, *muons_h);
210  const reco::MuonRef muonref = reco::MuonRef(muons_h, muId);
211 
212  if (!cutTk_((tk)) or (muId != -1 and PFMuonAlgo::isMuon(muonref) and not(*muons_h)[muId].isTrackerMuon())) {
213  maskTracks[i] = false;
214  continue;
215  }
216 
217  // don't consider tracks below 2 GeV for linking
218  if (std::sqrt(tk.p() * tk.p() + ticl::mpion2) < tkEnergyCut_) {
219  maskTracks[i] = false;
220  continue;
221  }
222 
223  // record tracks that can be used to make a ticlcandidate
224  maskTracks[i] = true;
225  }
226 }
227 
229  auto resultTracksters = std::make_unique<std::vector<Trackster>>();
230  auto resultTrackstersMerged = std::make_unique<std::vector<Trackster>>();
231  auto linkedResultTracksters = std::make_unique<std::vector<std::vector<unsigned int>>>();
232 
233  const auto &layerClusters = evt.get(clusters_token_);
234  const auto &layerClustersTimes = evt.get(clustersTime_token_);
236  evt.getByToken(muons_token_, muons_h);
237 
239  evt.getByToken(tracks_token_, tracks_h);
240  const auto &tracks = *tracks_h;
241 
242  edm::Handle<MtdHostCollection> inputTiming_h;
243  MtdHostCollection::ConstView inputTimingView;
244  if (useMTDTiming_) {
245  evt.getByToken(inputTimingToken_, inputTiming_h);
246  inputTimingView = (*inputTiming_h).const_view();
247  }
248 
249  auto const bFieldProd = bfield_.product();
251 
252  // loop over the original_masks_tokens_ and get the original masks collections and multiply them
253  // to get the global mask
254  std::vector<float> original_global_mask(layerClusters.size(), 1.f);
255  for (unsigned int i = 0; i < original_masks_tokens_.size(); ++i) {
256  const auto &tmp_mask = evt.get(original_masks_tokens_[i]);
257  for (unsigned int j = 0; j < tmp_mask.size(); ++j) {
258  original_global_mask[j] *= tmp_mask[j];
259  }
260  }
261 
262  auto resultMask = std::make_unique<std::vector<float>>(original_global_mask);
263 
264  std::vector<edm::Handle<std::vector<Trackster>>> general_tracksters_h(general_tracksters_tokens_.size());
265  MultiVectorManager<Trackster> generalTrackstersManager;
266  for (unsigned int i = 0; i < general_tracksters_tokens_.size(); ++i) {
267  evt.getByToken(general_tracksters_tokens_[i], general_tracksters_h[i]);
268  //Fill MultiVectorManager
269  generalTrackstersManager.addVector(*general_tracksters_h[i]);
270  }
271  //now get the general_tracksterlinks_tokens_
272  std::vector<edm::Handle<std::vector<std::vector<unsigned>>>> general_tracksterlinks_h(
274  std::vector<std::vector<unsigned>> generalTracksterLinksGlobalId;
275  for (unsigned int i = 0; i < general_tracksterlinks_tokens_.size(); ++i) {
276  evt.getByToken(general_tracksterlinks_tokens_[i], general_tracksterlinks_h[i]);
277  for (unsigned int j = 0; j < general_tracksterlinks_h[i]->size(); ++j) {
278  generalTracksterLinksGlobalId.emplace_back();
279  auto &links_vector = generalTracksterLinksGlobalId.back();
280  links_vector.resize((*general_tracksterlinks_h[i])[j].size());
281  for (unsigned int k = 0; k < links_vector.size(); ++k) {
282  links_vector[k] = generalTrackstersManager.getGlobalIndex(i, (*general_tracksterlinks_h[i])[j][k]);
283  }
284  }
285  }
286 
287  std::vector<bool> maskTracks;
288  maskTracks.resize(tracks.size());
289  filterTracks(tracks_h, muons_h, cutTk_, tkEnergyCut_, maskTracks);
290 
292  es,
294  layerClustersTimes,
295  generalTrackstersManager,
296  generalTracksterLinksGlobalId,
297  tracks_h,
298  maskTracks);
299 
300  auto resultCandidates = std::make_unique<std::vector<TICLCandidate>>();
301  std::vector<int> trackstersInTrackIndices(tracks.size(), -1);
302 
303  //TODO
304  //egammaInterpretationAlg_->makecandidates(inputGSF, inputTiming, *resultTrackstersMerged, trackstersInGSFTrackIndices)
305  // mask generalTracks associated to GSFTrack linked in egammaInterpretationAlgo_
306 
307  generalInterpretationAlgo_->makeCandidates(input, inputTiming_h, *resultTracksters, trackstersInTrackIndices);
308 
310  *resultTracksters, layerClusters, layerClustersTimes, rhtools_.getPositionLayer(rhtools_.lastLayerEE()).z(), true);
311 
312  std::vector<bool> maskTracksters(resultTracksters->size(), true);
313  edm::OrphanHandle<std::vector<Trackster>> resultTracksters_h = evt.put(std::move(resultTracksters));
314  //create ChargedCandidates
315  for (size_t iTrack = 0; iTrack < tracks.size(); iTrack++) {
316  if (maskTracks[iTrack]) {
317  auto const tracksterId = trackstersInTrackIndices[iTrack];
318  auto trackPtr = edm::Ptr<reco::Track>(tracks_h, iTrack);
319  if (tracksterId != -1 and !maskTracksters.empty()) {
320  auto tracksterPtr = edm::Ptr<Trackster>(resultTracksters_h, tracksterId);
321  TICLCandidate chargedCandidate(trackPtr, tracksterPtr);
322  resultCandidates->push_back(chargedCandidate);
323  maskTracksters[tracksterId] = false;
324  } else {
325  //charged candidates track only
326  edm::Ptr<Trackster> tracksterPtr;
327  TICLCandidate chargedCandidate(trackPtr, tracksterPtr);
328  auto trackRef = edm::Ref<reco::TrackCollection>(tracks_h, iTrack);
329  const int muId = PFMuonAlgo::muAssocToTrack(trackRef, *muons_h);
330  const reco::MuonRef muonRef = reco::MuonRef(muons_h, muId);
331  if (muonRef.isNonnull() and muonRef->isGlobalMuon()) {
332  // create muon candidate
333  chargedCandidate.setPdgId(13 * trackPtr.get()->charge());
334  }
335  resultCandidates->push_back(chargedCandidate);
336  }
337  }
338  }
339 
340  //Neutral Candidate
341  for (size_t iTrackster = 0; iTrackster < maskTracksters.size(); iTrackster++) {
342  if (maskTracksters[iTrackster]) {
343  edm::Ptr<Trackster> tracksterPtr(resultTracksters_h, iTrackster);
344  edm::Ptr<reco::Track> trackPtr;
345  TICLCandidate neutralCandidate(trackPtr, tracksterPtr);
346  resultCandidates->push_back(neutralCandidate);
347  }
348  }
349 
350  auto getPathLength = [&](const reco::Track &track, float zVal) {
351  const auto &fts_inn = trajectoryStateTransform::innerFreeState(track, bFieldProd);
352  const auto &fts_out = trajectoryStateTransform::outerFreeState(track, bFieldProd);
353  const auto &surf_inn = trajectoryStateTransform::innerStateOnSurface(track, *trackingGeometry_, bFieldProd);
354  const auto &surf_out = trajectoryStateTransform::outerStateOnSurface(track, *trackingGeometry_, bFieldProd);
355 
356  Basic3DVector<float> pos(track.referencePoint());
357  Basic3DVector<float> mom(track.momentum());
358  FreeTrajectoryState stateAtBeamspot{GlobalPoint(pos), GlobalVector(mom), track.charge(), bFieldProd};
359 
360  float pathlength = propagator->propagateWithPath(stateAtBeamspot, surf_inn.surface()).second;
361 
362  if (pathlength) {
363  const auto &t_inn_out = propagator->propagateWithPath(fts_inn, surf_out.surface());
364 
365  if (t_inn_out.first.isValid()) {
366  pathlength += t_inn_out.second;
367 
368  std::pair<float, float> rMinMax = hgcons_->rangeR(zVal, true);
369 
370  int iSide = int(track.eta() > 0);
371  float zSide = (iSide == 0) ? (-1. * zVal) : zVal;
372  const auto &disk = std::make_unique<GeomDet>(
373  Disk::build(Disk::PositionType(0, 0, zSide),
375  SimpleDiskBounds(rMinMax.first, rMinMax.second, zSide - 0.5, zSide + 0.5))
376  .get());
377  const auto &tsos = propagator->propagateWithPath(fts_out, disk->surface());
378 
379  if (tsos.first.isValid()) {
380  pathlength += tsos.second;
381  return pathlength;
382  }
383  }
384  }
385  edm::LogWarning("TICLCandidateProducer")
386  << "Not able to use the track to compute the path length. A straight line will be used instead.";
387  return 0.f;
388  };
389 
390  assignTimeToCandidates(*resultCandidates, tracks_h, inputTimingView, getPathLength);
391 
392  evt.put(std::move(resultCandidates));
393 }
394 
395 template <typename F>
396 void TICLCandidateProducer::assignTimeToCandidates(std::vector<TICLCandidate> &resultCandidates,
397  edm::Handle<std::vector<reco::Track>> track_h,
398  MtdHostCollection::ConstView &inputTimingView,
399  F func) const {
400  for (auto &cand : resultCandidates) {
401  float beta = 1;
402  float time = 0.f;
403  float invTimeErr = 0.f;
404  float timeErr = -1.f;
405 
406  for (const auto &tr : cand.tracksters()) {
407  if (tr->timeError() > 0) {
408  const auto invTimeESq = pow(tr->timeError(), -2);
409  const auto x = tr->barycenter().X();
410  const auto y = tr->barycenter().Y();
411  const auto z = tr->barycenter().Z();
412  auto path = std::sqrt(x * x + y * y + z * z);
413  if (cand.trackPtr().get() != nullptr) {
414  const auto &trackIndex = cand.trackPtr().get() - (edm::Ptr<reco::Track>(track_h, 0)).get();
415  if (useMTDTiming_ and inputTimingView.timeErr()[trackIndex] > 0) {
416  const auto xMtd = inputTimingView.posInMTD_x()[trackIndex];
417  const auto yMtd = inputTimingView.posInMTD_y()[trackIndex];
418  const auto zMtd = inputTimingView.posInMTD_z()[trackIndex];
419 
420  beta = inputTimingView.beta()[trackIndex];
421  path = std::sqrt((x - xMtd) * (x - xMtd) + (y - yMtd) * (y - yMtd) + (z - zMtd) * (z - zMtd)) +
422  inputTimingView.pathLength()[trackIndex];
423  } else {
424  float pathLength = func(*(cand.trackPtr().get()), z);
425  if (pathLength) {
426  path = pathLength;
427  }
428  }
429  }
430  time += (tr->time() - path / (beta * c_light_)) * invTimeESq;
431  invTimeErr += invTimeESq;
432  }
433  }
434  if (invTimeErr > 0) {
435  time = time / invTimeErr;
436  // FIXME_ set a liminf of 0.02 ns on the ts error (based on residuals)
437  timeErr = sqrt(1.f / invTimeErr);
438  if (timeErr < timeRes)
439  timeErr = timeRes;
440  cand.setTime(time, timeErr);
441  }
442 
443  if (useMTDTiming_ and cand.charge()) {
444  // Check MTD timing availability
445  const auto &trackIndex = cand.trackPtr().get() - (edm::Ptr<reco::Track>(track_h, 0)).get();
446  const bool assocQuality = inputTimingView.MVAquality()[trackIndex] > timingQualityThreshold_;
447  if (assocQuality) {
448  const auto timeHGC = cand.time();
449  const auto timeEHGC = cand.timeError();
450  const auto timeMTD = inputTimingView.time0()[trackIndex];
451  const auto timeEMTD = inputTimingView.time0Err()[trackIndex];
452 
453  if (useTimingAverage_ && (timeEMTD > 0 && timeEHGC > 0)) {
454  // Compute weighted average between HGCAL and MTD timing
455  const auto invTimeESqHGC = pow(timeEHGC, -2);
456  const auto invTimeESqMTD = pow(timeEMTD, -2);
457  timeErr = 1.f / (invTimeESqHGC + invTimeESqMTD);
458  time = (timeHGC * invTimeESqHGC + timeMTD * invTimeESqMTD) * timeErr;
459  timeErr = sqrt(timeErr);
460  } else if (timeEMTD > 0) {
461  time = timeMTD;
462  timeErr = timeEMTD;
463  }
464  }
465  cand.setTime(time, timeErr);
466  cand.setMTDTime(inputTimingView.time()[trackIndex], inputTimingView.timeErr()[trackIndex]);
467  }
468  }
469 }
470 
473  edm::ParameterSetDescription interpretationDesc;
474  interpretationDesc.addNode(edm::PluginDescription<TICLGeneralInterpretationPluginFactory>("type", "General", true));
475  desc.add<edm::ParameterSetDescription>("interpretationDescPSet", interpretationDesc);
476  desc.add<std::vector<edm::InputTag>>("egamma_tracksters_collections", {edm::InputTag("ticlTracksterLinks")});
477  desc.add<std::vector<edm::InputTag>>("egamma_tracksterlinks_collections", {edm::InputTag("ticlTracksterLinks")});
478  desc.add<std::vector<edm::InputTag>>("general_tracksters_collections", {edm::InputTag("ticlTracksterLinks")});
479  desc.add<std::vector<edm::InputTag>>("general_tracksterlinks_collections", {edm::InputTag("ticlTracksterLinks")});
480  desc.add<std::vector<edm::InputTag>>("original_masks",
481  {edm::InputTag("hgcalMergeLayerClusters", "InitialLayerClustersMask")});
482  desc.add<edm::InputTag>("layer_clusters", edm::InputTag("hgcalMergeLayerClusters"));
483  desc.add<edm::InputTag>("layer_clustersTime", edm::InputTag("hgcalMergeLayerClusters", "timeLayerCluster"));
484  desc.add<edm::InputTag>("tracks", edm::InputTag("generalTracks"));
485  desc.add<edm::InputTag>("timingSoA", edm::InputTag("mtdSoA"));
486  desc.add<edm::InputTag>("muons", edm::InputTag("muons1stStep"));
487  desc.add<std::string>("detector", "HGCAL");
488  desc.add<std::string>("propagator", "PropagatorWithMaterial");
489  desc.add<bool>("useMTDTiming", true);
490  desc.add<bool>("useTimingAverage", true);
491  desc.add<double>("timingQualityThreshold", 0.5);
492  desc.add<std::string>("cutTk",
493  "1.48 < abs(eta) < 3.0 && pt > 1. && quality(\"highPurity\") && "
494  "hitPattern().numberOfLostHits(\"MISSING_OUTER_HITS\") < 5");
495  descriptions.add("ticlCandidateProducer", desc);
496 }
497 
size
Write out results.
static DiskPointer build(Args &&... args)
Definition: BoundDisk.h:38
static int muAssocToTrack(const reco::TrackRef &trackref, const reco::MuonCollection &muons)
Definition: PFMuonAlgo.cc:479
TICLCandidateProducer(const edm::ParameterSet &ps)
ESGetTokenH3DDVariant esConsumes(std::string const &Record, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:133
bool get(ProductID const &oid, Handle< PROD > &result) const
Definition: Event.h:344
void beginRun(edm::Run const &iEvent, edm::EventSetup const &es) override
const StringCutObjectSelector< reco::Track > cutTk_
static bool isMuon(const reco::PFBlockElement &elt)
Definition: PFMuonAlgo.cc:48
TrajectoryStateOnSurface outerStateOnSurface(const reco::Track &tk, const TrackingGeometry &geom, const MagneticField *field, bool withErr=true)
const edm::EDGetTokenT< edm::ValueMap< std::pair< float, float > > > clustersTime_token_
void assignTimeToCandidates(std::vector< TICLCandidate > &resultCandidates, edm::Handle< std::vector< reco::Track >> track_h, MtdHostCollection::ConstView &inputTimingView, F func) const
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
ParameterDescriptionNode * addNode(ParameterDescriptionNode const &node)
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:238
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:528
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > bfield_token_
assert(be >=bs)
const edm::EDGetTokenT< std::vector< reco::Track > > tracks_token_
static std::string const input
Definition: EdmProvDump.cc:50
edm::ESHandle< Propagator > propagator_
U second(std::pair< T, U > const &p)
const edm::ESGetToken< Propagator, TrackingComponentsRecord > propagator_token_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
edm::ESHandle< GlobalTrackingGeometry > trackingGeometry_
int iEvent
Definition: GenABIO.cc:224
T const * product() const
Definition: ESHandle.h:86
Definition: Muon.py:1
T sqrt(T t)
Definition: SSEVec.h:23
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
Transition
Definition: Transition.h:12
double f[11][100]
edm::Ref< MuonCollection > MuonRef
presistent reference to a Muon
Definition: MuonFwd.h:13
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
edm::ESGetToken< HGCalDDDConstants, IdealGeometryRecord > hdc_token_
void produce(edm::Event &, const edm::EventSetup &) override
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:130
std::vector< edm::EDGetTokenT< std::vector< Trackster > > > general_tracksters_tokens_
std::pair< double, double > rangeR(double z, bool reco) const
typename Layout::ConstView ConstView
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
std::vector< edm::EDGetTokenT< std::vector< Trackster > > > egamma_tracksters_tokens_
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
Definition: TrackFwd.h:20
void add(std::string const &label, ParameterSetDescription const &psetDescription)
GlobalPoint getPositionLayer(int layer, bool nose=false) const
Definition: RecHitTools.cc:152
void setGeometry(CaloGeometry const &)
Definition: RecHitTools.cc:79
const edm::ESGetToken< GlobalTrackingGeometry, GlobalTrackingGeometryRecord > trackingGeometry_token_
fixed size matrix
const edm::EDGetTokenT< std::vector< reco::CaloCluster > > clusters_token_
const HGCalDDDConstants * hgcons_
HLT enums.
constexpr float mpion2
Definition: Common.h:41
static constexpr float c_light_
std::vector< edm::EDGetTokenT< std::vector< std::vector< unsigned > > > > general_tracksterlinks_tokens_
Definition: Common.h:10
const edm::ESGetToken< CaloGeometry, CaloGeometryRecord > geometry_token_
void assignPCAtoTracksters(std::vector< Trackster > &, const std::vector< reco::CaloCluster > &, const edm::ValueMap< std::pair< float, float >> &, double, bool computeLocalTime=false, bool energyWeight=true)
edm::EDGetTokenT< MtdHostCollection > inputTimingToken_
std::vector< edm::EDGetTokenT< std::vector< float > > > original_masks_tokens_
std::unique_ptr< TICLInterpretationAlgoBase< reco::Track > > generalInterpretationAlgo_
FreeTrajectoryState innerFreeState(const reco::Track &tk, const MagneticField *field, bool withErr=true)
#define get
Log< level::Warning, false > LogWarning
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
Definition: blowfish.cc:163
edm::ESHandle< MagneticField > bfield_
static constexpr float timeRes
FreeTrajectoryState outerFreeState(const reco::Track &tk, const MagneticField *field, bool withErr=true)
void setPdgId(int pdgId) final
std::vector< edm::EDGetTokenT< std::vector< std::vector< unsigned > > > > egamma_tracksterlinks_tokens_
void filterTracks(edm::Handle< std::vector< reco::Track >> tkH, const edm::Handle< std::vector< reco::Muon >> &muons_h, const StringCutObjectSelector< reco::Track > cutTk_, const float tkEnergyCut_, std::vector< bool > &maskTracks)
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
const edm::EDGetTokenT< std::vector< reco::Muon > > muons_token_
def move(src, dest)
Definition: eostools.py:511
unsigned int lastLayerEE(bool nose=false) const
Definition: RecHitTools.h:76
Definition: Run.h:45
Global3DVector GlobalVector
Definition: GlobalVector.h:10
TrajectoryStateOnSurface innerStateOnSurface(const reco::Track &tk, const TrackingGeometry &geom, const MagneticField *field, bool withErr=true)