CMS 3D CMS Logo

List of all members | Public Member Functions | Private Types | Private Member Functions | Private Attributes
MuonDetCleaner< T1, T2 > Class Template Reference

#include <MuonDetCleaner.h>

Inheritance diagram for MuonDetCleaner< T1, T2 >:
edm::stream::EDProducer<>

Public Member Functions

 MuonDetCleaner (const edm::ParameterSet &)
 
 ~MuonDetCleaner () override
 
- Public Member Functions inherited from edm::stream::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
 
const EDProduceroperator= (const EDProducer &)=delete
 

Private Types

typedef edm::RangeMap< T1, edm::OwnVector< T2 > > RecHitCollection
 

Private Member Functions

void beginRun (const edm::Run &, const edm::EventSetup &) override
 
bool checkrecHit (const TrackingRecHit &)
 
template<>
bool checkrecHit (const TrackingRecHit &recHit)
 
template<>
bool checkrecHit (const TrackingRecHit &recHit)
 
template<>
bool checkrecHit (const TrackingRecHit &recHit)
 
template<>
bool checkrecHit (const TrackingRecHit &recHit)
 
template<>
bool checkrecHit (const TrackingRecHit &recHit)
 
void fillVetoHits (const TrackingRecHit &, std::vector< uint32_t > *)
 
uint32_t getRawDetId (const T2 &)
 
template<>
uint32_t getRawDetId (const CSCRecHit2D &recHit)
 
template<>
uint32_t getRawDetId (const DTRecHit1DPair &recHit)
 
template<>
uint32_t getRawDetId (const RPCRecHit &recHit)
 
template<>
uint32_t getRawDetId (const CSCSegment &recHit)
 
template<>
uint32_t getRawDetId (const DTRecSegment4D &recHit)
 
void produce (edm::Event &, const edm::EventSetup &) override
 

Private Attributes

std::map< std::string, edm::EDGetTokenT< RecHitCollection > > inputs_
 
edm::Handle< CSCStripDigiCollectionm_cscDigis
 
edm::EDGetTokenT< CSCStripDigiCollectionm_cscDigisToken
 
edm::ESHandle< CSCGeometrym_cscGeometry
 
edm::ESGetToken< CSCGeometry, MuonGeometryRecordm_cscGeometryToken
 
double m_digiMaxDistanceX
 
edm::Handle< DTDigiCollectionm_dtDigis
 
edm::EDGetTokenT< DTDigiCollectionm_dtDigisToken
 
edm::ESHandle< DTGeometrym_dtGeometry
 
edm::ESGetToken< DTGeometry, MuonGeometryRecordm_dtGeometryToken
 
const edm::EDGetTokenT< edm::View< pat::Muon > > mu_input_
 
TrackAssociatorParameters parameters_
 
const edm::ESGetToken< Propagator, TrackingComponentsRecordpropagatorToken_
 
TrackDetectorAssociator trackAssociator_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 

Detailed Description

template<typename T1, typename T2>
class MuonDetCleaner< T1, T2 >

Clean collections of hits in muon detectors (CSC, DT and RPC) for original Zmumu event and "embedded" simulated tau decay products

Author
Christian Veelken, LLR

Clean Up from STefan Wayand, KIT Clean Up from Christian Winter & Sebastian Brommer, KIT

Definition at line 42 of file MuonDetCleaner.h.

Member Typedef Documentation

◆ RecHitCollection

template<typename T1 , typename T2 >
typedef edm::RangeMap<T1, edm::OwnVector<T2> > MuonDetCleaner< T1, T2 >::RecHitCollection
private

Definition at line 48 of file MuonDetCleaner.h.

Constructor & Destructor Documentation

◆ MuonDetCleaner()

template<typename T1 , typename T2 >
MuonDetCleaner< T1, T2 >::MuonDetCleaner ( const edm::ParameterSet iConfig)
explicit

Definition at line 19 of file MuonDetCleaner.cc.

References edm::ParameterSet::getParameter(), MuonDetCleaner< T1, T2 >::inputs_, TrackAssociatorParameters::loadParameters(), and MuonDetCleaner< T1, T2 >::parameters_.

20  : mu_input_(consumes<edm::View<pat::Muon>>(iConfig.getParameter<edm::InputTag>("MuonCollection"))),
21  m_dtDigisToken(consumes<DTDigiCollection>(iConfig.getParameter<edm::InputTag>("dtDigiCollectionLabel"))),
22  m_cscDigisToken(consumes<CSCStripDigiCollection>(iConfig.getParameter<edm::InputTag>("cscDigiCollectionLabel"))),
23  m_dtGeometryToken(esConsumes<edm::Transition::BeginRun>()),
24  m_cscGeometryToken(esConsumes<edm::Transition::BeginRun>()),
25  propagatorToken_(esConsumes(edm::ESInputTag("", "SteppingHelixPropagatorAny"))),
26  m_digiMaxDistanceX(iConfig.getParameter<double>("digiMaxDistanceX")) {
27  std::vector<edm::InputTag> inCollections = iConfig.getParameter<std::vector<edm::InputTag>>("oldCollection");
28  for (const auto &inCollection : inCollections) {
29  inputs_[inCollection.instance()] = consumes<RecHitCollection>(inCollection);
30  produces<RecHitCollection>(inCollection.instance());
31  }
32  edm::ParameterSet parameters = iConfig.getParameter<edm::ParameterSet>("TrackAssociatorParameters");
33  edm::ConsumesCollector iC = consumesCollector();
35 }
ESGetTokenH3DDVariant esConsumes(std::string const &Record, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
edm::ESGetToken< DTGeometry, MuonGeometryRecord > m_dtGeometryToken
void loadParameters(const edm::ParameterSet &, edm::ConsumesCollector &)
edm::EDGetTokenT< CSCStripDigiCollection > m_cscDigisToken
TrackAssociatorParameters parameters_
double m_digiMaxDistanceX
const edm::EDGetTokenT< edm::View< pat::Muon > > mu_input_
const edm::ESGetToken< Propagator, TrackingComponentsRecord > propagatorToken_
edm::ESGetToken< CSCGeometry, MuonGeometryRecord > m_cscGeometryToken
edm::EDGetTokenT< DTDigiCollection > m_dtDigisToken
std::map< std::string, edm::EDGetTokenT< RecHitCollection > > inputs_

◆ ~MuonDetCleaner()

template<typename T1 , typename T2 >
MuonDetCleaner< T1, T2 >::~MuonDetCleaner ( )
override

Definition at line 38 of file MuonDetCleaner.cc.

38  {
39  // nothing to be done yet...
40 }

Member Function Documentation

◆ beginRun()

template<typename T1 , typename T2 >
void MuonDetCleaner< T1, T2 >::beginRun ( const edm::Run iRun,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 43 of file MuonDetCleaner.cc.

References edm::EventSetup::getHandle().

43  {
44  // get the geometries from the event setup everytime the run (of the event which is processed right now to the previous event) changes
47 }
edm::ESGetToken< DTGeometry, MuonGeometryRecord > m_dtGeometryToken
edm::ESHandle< CSCGeometry > m_cscGeometry
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:130
edm::ESGetToken< CSCGeometry, MuonGeometryRecord > m_cscGeometryToken
edm::ESHandle< DTGeometry > m_dtGeometry

◆ checkrecHit() [1/6]

template<typename T1 , typename T2 >
bool MuonDetCleaner< T1, T2 >::checkrecHit ( const TrackingRecHit recHit)
private

Definition at line 258 of file MuonDetCleaner.cc.

References cms::cuda::assert().

258  {
259  edm::LogError("TauEmbedding") << "!!!! Please add the checkrecHit for the individual class templates " assert(0);
260 }
Log< level::Error, false > LogError
assert(be >=bs)

◆ checkrecHit() [2/6]

template<>
bool MuonDetCleaner< CSCDetId, CSCRecHit2D >::checkrecHit ( const TrackingRecHit recHit)
private

Definition at line 263 of file MuonDetCleaner.cc.

References rpcPointValidation_cfi::recHit.

263  {
264  const std::type_info &hit_type = typeid(recHit);
265  if (hit_type == typeid(CSCSegment)) {
266  return true;
267  } // This should be the default one (which are included in the global (outer) muon track)
268  else if (hit_type == typeid(CSCRecHit2D)) {
269  return true;
270  }
271  return false;
272 }

◆ checkrecHit() [3/6]

template<>
bool MuonDetCleaner< DTLayerId, DTRecHit1DPair >::checkrecHit ( const TrackingRecHit recHit)
private

Definition at line 285 of file MuonDetCleaner.cc.

References rpcPointValidation_cfi::recHit.

285  {
286  const std::type_info &hit_type = typeid(recHit);
287  if (hit_type == typeid(DTRecSegment4D)) {
288  return true;
289  } // This should be the default one (which are included in the global (outer) muon track)
290  else if (hit_type == typeid(DTRecHit1D)) {
291  return true;
292  } else if (hit_type == typeid(DTSLRecCluster)) {
293  return true;
294  } else if (hit_type == typeid(DTSLRecSegment2D)) {
295  return true;
296  }
297  return false;
298 }

◆ checkrecHit() [4/6]

template<>
bool MuonDetCleaner< RPCDetId, RPCRecHit >::checkrecHit ( const TrackingRecHit recHit)
private

Definition at line 301 of file MuonDetCleaner.cc.

References rpcPointValidation_cfi::recHit.

301  {
302  const std::type_info &hit_type = typeid(recHit);
303  if (hit_type == typeid(RPCRecHit)) {
304  return true;
305  } // This should be the default one (which are included in the global (outer) muon track)
306  return false;
307 }

◆ checkrecHit() [5/6]

template<>
bool MuonDetCleaner< CSCDetId, CSCSegment >::checkrecHit ( const TrackingRecHit recHit)
private

Definition at line 310 of file MuonDetCleaner.cc.

References rpcPointValidation_cfi::recHit.

310  {
311  const std::type_info &hit_type = typeid(recHit);
312  if (hit_type == typeid(CSCSegment)) {
313  return true;
314  } // This should be the default one (which are included in the global (outer) muon track)
315  return false;
316 }

◆ checkrecHit() [6/6]

template<>
bool MuonDetCleaner< DTChamberId, DTRecSegment4D >::checkrecHit ( const TrackingRecHit recHit)
private

Definition at line 319 of file MuonDetCleaner.cc.

References rpcPointValidation_cfi::recHit.

319  {
320  const std::type_info &hit_type = typeid(recHit);
321  if (hit_type == typeid(DTRecSegment4D)) {
322  return true;
323  } // This should be the default one (which are included in the global (outer) muon track)
324  else if (hit_type == typeid(DTRecHit1D)) {
325  return true;
326  } else if (hit_type == typeid(DTSLRecCluster)) {
327  return true;
328  } else if (hit_type == typeid(DTSLRecSegment2D)) {
329  return true;
330  }
331  return false;
332 }

◆ fillVetoHits()

template<typename T1 , typename T2 >
void MuonDetCleaner< T1, T2 >::fillVetoHits ( const TrackingRecHit rh,
std::vector< uint32_t > *  HitsList 
)
private

Definition at line 215 of file MuonDetCleaner.cc.

References TrackingRecHit::rawId(), and TrackingRecHit::recHits().

215  {
216  std::vector<const TrackingRecHit *> rh_components = rh.recHits();
217  if (rh_components.empty()) {
218  HitsList->push_back(rh.rawId());
219  } else {
220  for (std::vector<const TrackingRecHit *>::const_iterator rh_component = rh_components.begin();
221  rh_component != rh_components.end();
222  ++rh_component) {
223  fillVetoHits(**rh_component, HitsList);
224  }
225  }
226 }
id_type rawId() const
virtual std::vector< const TrackingRecHit * > recHits() const =0
Access to component RecHits (if any)
void fillVetoHits(const TrackingRecHit &, std::vector< uint32_t > *)

◆ getRawDetId() [1/6]

template<typename T1 , typename T2 >
uint32_t MuonDetCleaner< T1, T2 >::getRawDetId ( const T2 &  recHit)
private

Definition at line 233 of file MuonDetCleaner.cc.

References cms::cuda::assert().

233  {
234  assert(0); // CV: make sure general function never gets called;
235  // always use template specializations
236 }
assert(be >=bs)

◆ getRawDetId() [2/6]

template<>
uint32_t MuonDetCleaner< CSCDetId, CSCRecHit2D >::getRawDetId ( const CSCRecHit2D recHit)
private

Definition at line 239 of file MuonDetCleaner.cc.

References rpcPointValidation_cfi::recHit.

239  {
240  return recHit.cscDetId().rawId();
241 }

◆ getRawDetId() [3/6]

template<>
uint32_t MuonDetCleaner< DTLayerId, DTRecHit1DPair >::getRawDetId ( const DTRecHit1DPair recHit)
private

Definition at line 244 of file MuonDetCleaner.cc.

References rpcPointValidation_cfi::recHit.

244  {
245  return recHit.geographicalId().rawId();
246 }

◆ getRawDetId() [4/6]

template<>
uint32_t MuonDetCleaner< RPCDetId, RPCRecHit >::getRawDetId ( const RPCRecHit recHit)
private

Definition at line 249 of file MuonDetCleaner.cc.

References rpcPointValidation_cfi::recHit.

249  {
250  return recHit.rpcId().rawId();
251 }

◆ getRawDetId() [5/6]

template<>
uint32_t MuonDetCleaner< CSCDetId, CSCSegment >::getRawDetId ( const CSCSegment recHit)
private

Definition at line 275 of file MuonDetCleaner.cc.

References rpcPointValidation_cfi::recHit.

275  {
276  return recHit.cscDetId().rawId();
277 }

◆ getRawDetId() [6/6]

template<>
uint32_t MuonDetCleaner< DTChamberId, DTRecSegment4D >::getRawDetId ( const DTRecSegment4D recHit)
private

Definition at line 280 of file MuonDetCleaner.cc.

References rpcPointValidation_cfi::recHit.

280  {
281  return recHit.geographicalId().rawId();
282 }

◆ produce()

template<typename T1 , typename T2 >
void MuonDetCleaner< T1, T2 >::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 50 of file MuonDetCleaner.cc.

References funct::abs(), TrackDetectorAssociator::Any, cms::cuda::assert(), relativeConstraints::chamber, MuonSubdetId::CSC, reco::MuonChamberMatch::detector(), hcalRecHitTable_cff::detId, change_name::diff, MuonSubdetId::DT, dX(), reco::MuonChamberMatch::dXdZ, reco::MuonChamberMatch::dXdZErr, reco::MuonChamberMatch::dYdZ, reco::MuonChamberMatch::dYdZErr, reco::MuonChamberMatch::edgeX, reco::MuonChamberMatch::edgeY, spr::find(), ALCARECOEcalPhiSym_cff::float, edm::EventSetup::getData(), reco::MuonChamberMatch::id, iEvent, info(), nano_mu_digi_cff::layer, genParticles_cff::map, DTChamberId::maxLayerId, CSCDetId::maxLayerId(), DTChamberId::maxSuperLayerId, eostools::move(), DiMuonV_cfg::muons, convertSQLitetoXML_cfg::output, Hcal_Conditions_forGlobalTag_cff::pedestal, TrackCandidateProducer_cfi::propagator, isotrackApplyRegressor::range, DetId::rawId(), rpcPointValidation_cfi::recHit, MuonSubdetId::RPC, jetUpdater_cfi::sort, mathSSE::sqrt(), DiMuonV_cfg::threshold, HLT_2024v14_cff::track, tier0::unique(), reco::MuonChamberMatch::x, reco::MuonChamberMatch::xErr, CSCLayerGeometry::xOfStrip(), reco::MuonChamberMatch::y, and reco::MuonChamberMatch::yErr.

50  {
51  std::map<T1, std::vector<T2>> recHits_output; // This data format is easyer to handle
52  std::vector<uint32_t> vetoHits;
53 
54  // First fill the veto RecHits colletion with the Hits from the input muons
56  iEvent.getByToken(mu_input_, muonHandle);
57  edm::View<pat::Muon> muons = *muonHandle;
58  for (edm::View<pat::Muon>::const_iterator iMuon = muons.begin(); iMuon != muons.end(); ++iMuon) {
59  const reco::Track *track = nullptr;
60  if (iMuon->isGlobalMuon())
61  track = iMuon->outerTrack().get();
62  else if (iMuon->isStandAloneMuon())
63  track = iMuon->outerTrack().get();
64  else if (iMuon->isRPCMuon())
65  track = iMuon->innerTrack().get(); // To add, try to access the rpc track
66  else if (iMuon->isTrackerMuon())
67  track = iMuon->innerTrack().get();
68  else {
69  edm::LogError("TauEmbedding") << "The imput muon: " << (*iMuon)
70  << " must be either global or does or be tracker muon";
71  assert(0);
72  }
73 
74  for (trackingRecHit_iterator hitIt = track->recHitsBegin(); hitIt != track->recHitsEnd(); ++hitIt) {
75  const TrackingRecHit &murechit = **hitIt; // Base class for all rechits
76  if (!(murechit).isValid())
77  continue;
78  if (!checkrecHit(murechit))
79  continue; // Check if the hit belongs to a specifc detector section
80  fillVetoHits(murechit, &vetoHits); // Go back to the very basic rechits
81  }
82 
83  sort(vetoHits.begin(), vetoHits.end());
84  vetoHits.erase(unique(vetoHits.begin(), vetoHits.end()), vetoHits.end());
85  iEvent.getByToken(m_dtDigisToken, m_dtDigis);
86  iEvent.getByToken(m_cscDigisToken, m_cscDigis);
91 
92  // inspired from Muon Identification algorithm: https://github.com/cms-sw/cmssw/blob/3b943c0dbbdf4494cd66064a5a147301f38af295/RecoMuon/MuonIdentification/plugins/MuonIdProducer.cc#L911
93  // and the MuonShowerDigiFiller: https://github.com/cms-sw/cmssw/blob/29909891e150c9781f4ade2a6f7b5beb0bd67a6e/RecoMuon/MuonIdentification/interface/MuonShowerDigiFiller.h & https://github.com/cms-sw/cmssw/blob/29909891e150c9781f4ade2a6f7b5beb0bd67a6e/RecoMuon/MuonIdentification/src/MuonShowerDigiFiller.cc
94  for (const auto &chamber : info.chambers) {
95  if (chamber.id.subdetId() == MuonSubdetId::RPC)
96  continue;
97 
98  reco::MuonChamberMatch matchedChamber;
99 
100  const auto &lErr = chamber.tState.localError();
101  const auto &lPos = chamber.tState.localPosition();
102  const auto &lDir = chamber.tState.localDirection();
103  const auto &localError = lErr.positionError();
104 
105  matchedChamber.x = lPos.x();
106  matchedChamber.y = lPos.y();
107  matchedChamber.xErr = sqrt(localError.xx());
108  matchedChamber.yErr = sqrt(localError.yy());
109  matchedChamber.dXdZ = lDir.z() != 0 ? lDir.x() / lDir.z() : 9999;
110  matchedChamber.dYdZ = lDir.z() != 0 ? lDir.y() / lDir.z() : 9999;
111 
112  // DANGEROUS - compiler cannot guaranty parameters ordering
113  AlgebraicSymMatrix55 trajectoryCovMatrix = lErr.matrix();
114  matchedChamber.dXdZErr = trajectoryCovMatrix(1, 1) > 0 ? sqrt(trajectoryCovMatrix(1, 1)) : 0;
115  matchedChamber.dYdZErr = trajectoryCovMatrix(2, 2) > 0 ? sqrt(trajectoryCovMatrix(2, 2)) : 0;
116 
117  matchedChamber.edgeX = chamber.localDistanceX;
118  matchedChamber.edgeY = chamber.localDistanceY;
119 
120  matchedChamber.id = chamber.id;
121 
122  // DT chamber
123  if (matchedChamber.detector() == MuonSubdetId::DT) {
124  double xTrack = matchedChamber.x;
125 
126  for (int sl = 1; sl <= DTChamberId::maxSuperLayerId; sl += 2) {
127  for (int layer = 1; layer <= DTChamberId::maxLayerId; ++layer) {
128  const DTLayerId layerId(DTChamberId(matchedChamber.id.rawId()), sl, layer);
129  auto range = m_dtDigis->get(layerId);
130 
131  for (auto digiIt = range.first; digiIt != range.second; ++digiIt) {
132  const auto topo = m_dtGeometry->layer(layerId)->specificTopology();
133  double xWire = topo.wirePosition((*digiIt).wire());
134  double dX = std::abs(xWire - xTrack);
135 
136  if (dX < m_digiMaxDistanceX) {
137  vetoHits.push_back(matchedChamber.id.rawId());
138  }
139  }
140  }
141  }
142  }
143 
144  else if (matchedChamber.detector() == MuonSubdetId::CSC) {
145  double xTrack = matchedChamber.x;
146  double yTrack = matchedChamber.y;
147 
148  for (int iLayer = 1; iLayer <= CSCDetId::maxLayerId(); ++iLayer) {
149  const CSCDetId chId(matchedChamber.id.rawId());
150  const CSCDetId layerId(chId.endcap(), chId.station(), chId.ring(), chId.chamber(), iLayer);
151  auto range = m_cscDigis->get(layerId);
152 
153  for (auto digiIt = range.first; digiIt != range.second; ++digiIt) {
154  std::vector<int> adcVals = digiIt->getADCCounts();
155  bool hasFired = false;
156  float pedestal = 0.5 * (float)(adcVals[0] + adcVals[1]);
157  float threshold = 13.3;
158  float diff = 0.;
159  for (const auto &adcVal : adcVals) {
160  diff = (float)adcVal - pedestal;
161  if (diff > threshold) {
162  hasFired = true;
163  break;
164  }
165  }
166 
167  if (!hasFired)
168  continue;
169 
170  const CSCLayerGeometry *layerGeom = m_cscGeometry->layer(layerId)->geometry();
171  Float_t xStrip = layerGeom->xOfStrip(digiIt->getStrip(), yTrack);
172  float dX = std::abs(xStrip - xTrack);
173 
174  if (dX < m_digiMaxDistanceX) {
175  vetoHits.push_back(matchedChamber.id.rawId());
176  }
177  }
178  }
179  }
180  }
181 
182  // End improved cleaning in the muon chambers
183  }
184 
185  sort(vetoHits.begin(), vetoHits.end());
186  vetoHits.erase(unique(vetoHits.begin(), vetoHits.end()), vetoHits.end());
187 
188  // Now this can also handle different instance
189  for (auto input_ : inputs_) {
190  // Second read in the RecHit Colltection which is to be replaced, without the vetoRecHits
191  typedef edm::Handle<RecHitCollection> RecHitCollectionHandle;
192  RecHitCollectionHandle RecHitinput;
193  iEvent.getByToken(input_.second, RecHitinput);
194  for (typename RecHitCollection::const_iterator recHit = RecHitinput->begin(); recHit != RecHitinput->end();
195  ++recHit) { // loop over the basic rec hit collection (DT CSC or RPC)
196  if (find(vetoHits.begin(), vetoHits.end(), getRawDetId(*recHit)) != vetoHits.end())
197  continue; // If the hit is not in the
198  T1 detId(getRawDetId(*recHit));
199  recHits_output[detId].push_back(*recHit);
200  }
201 
202  // Last step savet the output in the CMSSW Data Format
203  std::unique_ptr<RecHitCollection> output(new RecHitCollection());
204  for (typename std::map<T1, std::vector<T2>>::const_iterator recHit = recHits_output.begin();
205  recHit != recHits_output.end();
206  ++recHit) {
207  output->put(recHit->first, recHit->second.begin(), recHit->second.end());
208  }
209  output->post_insert();
210  iEvent.put(std::move(output), input_.first);
211  }
212 }
static const TGPicture * info(bool iBackgroundIsBlack)
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
edm::ESHandle< CSCGeometry > m_cscGeometry
uint32_t getRawDetId(const T2 &)
bool checkrecHit(const TrackingRecHit &)
edm::RangeMap< T1, edm::OwnVector< T2 > > RecHitCollection
Log< level::Error, false > LogError
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
muons
the two sets of parameters below are mutually exclusive, depending if RECO or ALCARECO is used the us...
Definition: DiMuonV_cfg.py:214
assert(be >=bs)
const CSCLayerGeometry * geometry() const
Definition: CSCLayer.h:44
C::const_iterator const_iterator
constant access iterator type
Definition: RangeMap.h:43
edm::EDGetTokenT< CSCStripDigiCollection > m_cscDigisToken
int iEvent
Definition: GenABIO.cc:224
edm::Handle< CSCStripDigiCollection > m_cscDigis
TrackAssociatorParameters parameters_
void setPropagator(const Propagator *)
use a user configured propagator
static const int maxLayerId
highest layer id
Definition: DTChamberId.h:73
double m_digiMaxDistanceX
T sqrt(T t)
Definition: SSEVec.h:23
def unique(seq, keepstr=True)
Definition: tier0.py:24
TrackDetectorAssociator trackAssociator_
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const edm::EDGetTokenT< edm::View< pat::Muon > > mu_input_
const DTTopology & specificTopology() const
Definition: DTLayer.cc:37
static const int maxSuperLayerId
highest superlayer id
Definition: DTChamberId.h:69
float dX(const MatchPair &match)
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
static constexpr int RPC
Definition: MuonSubdetId.h:13
const edm::ESGetToken< Propagator, TrackingComponentsRecord > propagatorToken_
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
edm::Handle< DTDigiCollection > m_dtDigis
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:88
void fillVetoHits(const TrackingRecHit &, std::vector< uint32_t > *)
TrackDetMatchInfo associate(const edm::Event &, const edm::EventSetup &, const FreeTrajectoryState &, const AssociatorParameters &)
Definition: output.py:1
float xOfStrip(int strip, float y=0.) const
static constexpr int DT
Definition: MuonSubdetId.h:11
edm::ESHandle< DTGeometry > m_dtGeometry
const CSCLayer * layer(CSCDetId id) const
Return the layer corresponding to given DetId.
Definition: CSCGeometry.cc:105
static constexpr int CSC
Definition: MuonSubdetId.h:12
edm::EDGetTokenT< DTDigiCollection > m_dtDigisToken
static int maxLayerId()
Definition: CSCDetId.h:243
def move(src, dest)
Definition: eostools.py:511
float wirePosition(int wireNumber) const
Returns the x position in the layer of a given wire number.
Definition: DTTopology.cc:63
const DTLayer * layer(const DTLayerId &id) const
Return a layer given its id.
Definition: DTGeometry.cc:96
std::map< std::string, edm::EDGetTokenT< RecHitCollection > > inputs_

Member Data Documentation

◆ inputs_

template<typename T1 , typename T2 >
std::map<std::string, edm::EDGetTokenT<RecHitCollection> > MuonDetCleaner< T1, T2 >::inputs_
private

Definition at line 58 of file MuonDetCleaner.h.

Referenced by MuonDetCleaner< T1, T2 >::MuonDetCleaner().

◆ m_cscDigis

template<typename T1 , typename T2 >
edm::Handle<CSCStripDigiCollection> MuonDetCleaner< T1, T2 >::m_cscDigis
private

Definition at line 65 of file MuonDetCleaner.h.

◆ m_cscDigisToken

template<typename T1 , typename T2 >
edm::EDGetTokenT<CSCStripDigiCollection> MuonDetCleaner< T1, T2 >::m_cscDigisToken
private

Definition at line 63 of file MuonDetCleaner.h.

◆ m_cscGeometry

template<typename T1 , typename T2 >
edm::ESHandle<CSCGeometry> MuonDetCleaner< T1, T2 >::m_cscGeometry
private

Definition at line 67 of file MuonDetCleaner.h.

◆ m_cscGeometryToken

template<typename T1 , typename T2 >
edm::ESGetToken<CSCGeometry, MuonGeometryRecord> MuonDetCleaner< T1, T2 >::m_cscGeometryToken
private

Definition at line 69 of file MuonDetCleaner.h.

◆ m_digiMaxDistanceX

template<typename T1 , typename T2 >
double MuonDetCleaner< T1, T2 >::m_digiMaxDistanceX
private

Definition at line 71 of file MuonDetCleaner.h.

◆ m_dtDigis

template<typename T1 , typename T2 >
edm::Handle<DTDigiCollection> MuonDetCleaner< T1, T2 >::m_dtDigis
private

Definition at line 64 of file MuonDetCleaner.h.

◆ m_dtDigisToken

template<typename T1 , typename T2 >
edm::EDGetTokenT<DTDigiCollection> MuonDetCleaner< T1, T2 >::m_dtDigisToken
private

Definition at line 62 of file MuonDetCleaner.h.

◆ m_dtGeometry

template<typename T1 , typename T2 >
edm::ESHandle<DTGeometry> MuonDetCleaner< T1, T2 >::m_dtGeometry
private

Definition at line 66 of file MuonDetCleaner.h.

◆ m_dtGeometryToken

template<typename T1 , typename T2 >
edm::ESGetToken<DTGeometry, MuonGeometryRecord> MuonDetCleaner< T1, T2 >::m_dtGeometryToken
private

Definition at line 68 of file MuonDetCleaner.h.

◆ mu_input_

template<typename T1 , typename T2 >
const edm::EDGetTokenT<edm::View<pat::Muon> > MuonDetCleaner< T1, T2 >::mu_input_
private

Definition at line 56 of file MuonDetCleaner.h.

◆ parameters_

template<typename T1 , typename T2 >
TrackAssociatorParameters MuonDetCleaner< T1, T2 >::parameters_
private

◆ propagatorToken_

template<typename T1 , typename T2 >
const edm::ESGetToken<Propagator, TrackingComponentsRecord> MuonDetCleaner< T1, T2 >::propagatorToken_
private

Definition at line 70 of file MuonDetCleaner.h.

◆ trackAssociator_

template<typename T1 , typename T2 >
TrackDetectorAssociator MuonDetCleaner< T1, T2 >::trackAssociator_
private

Definition at line 61 of file MuonDetCleaner.h.