CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
MuonToTrackingParticleAssociatorEDProducer Class Reference
Inheritance diagram for MuonToTrackingParticleAssociatorEDProducer:
edm::stream::EDProducer<>

Public Member Functions

 MuonToTrackingParticleAssociatorEDProducer (const edm::ParameterSet &)
 
 ~MuonToTrackingParticleAssociatorEDProducer () 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
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Private Member Functions

void produce (edm::Event &, const edm::EventSetup &) override
 

Private Attributes

edm::ParameterSet const config_
 
CSCHitAssociator::Config cscHitAssociatorConfig_
 
std::unique_ptr< InputDumper > diagnostics_
 
DTHitAssociator::Config dtHitAssociatorConfig_
 
GEMHitAssociator::Config gemHitAssociatorConfig_
 
MuonAssociatorByHitsHelper helper_
 
TrackerMuonHitExtractor hitExtractor_
 
RPCHitAssociator::Config rpcHitAssociatorConfig_
 
TrackerHitAssociator::Config trackerHitAssociatorConfig_
 
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcdtTopoToken_
 

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

MuonToTrackingParticleAssociatorEDProducer.cc SimMuon/MCTruth/plugins/MuonToTrackingParticleAssociatorEDProducer.cc

Description: [one line class summary]

Implementation: [Notes on implementation]

Definition at line 175 of file MuonToTrackingParticleAssociatorEDProducer.cc.

Constructor & Destructor Documentation

◆ MuonToTrackingParticleAssociatorEDProducer()

MuonToTrackingParticleAssociatorEDProducer::MuonToTrackingParticleAssociatorEDProducer ( const edm::ParameterSet iConfig)
explicit

Definition at line 210 of file MuonToTrackingParticleAssociatorEDProducer.cc.

References diagnostics_, and edm::ParameterSet::getUntrackedParameter().

211  : config_(iConfig),
212  helper_(iConfig),
213  trackerHitAssociatorConfig_(iConfig, consumesCollector()),
214  hitExtractor_(iConfig, consumesCollector()),
215  gemHitAssociatorConfig_(iConfig, consumesCollector()),
216  rpcHitAssociatorConfig_(iConfig, consumesCollector()),
217  cscHitAssociatorConfig_(iConfig, consumesCollector()),
218  dtHitAssociatorConfig_(iConfig, consumesCollector()),
220  // register your products
221  produces<reco::MuonToTrackingParticleAssociator>();
222 
223  edm::LogVerbatim("MuonToTrackingParticleAssociatorEDProducer")
224  << "\n constructing MuonToTrackingParticleAssociatorEDProducer"
225  << "\n";
226 
227  if (iConfig.getUntrackedParameter<bool>("dumpInputCollections")) {
228  diagnostics_ = std::make_unique<InputDumper>(iConfig, consumesCollector());
229  }
230 }
Log< level::Info, true > LogVerbatim
ESGetTokenH3DDVariant esConsumes(std::string const &Record, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
T getUntrackedParameter(std::string const &, T const &) const
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_

◆ ~MuonToTrackingParticleAssociatorEDProducer()

MuonToTrackingParticleAssociatorEDProducer::~MuonToTrackingParticleAssociatorEDProducer ( )
override

Definition at line 232 of file MuonToTrackingParticleAssociatorEDProducer.cc.

232  {
233  // do anything here that needs to be done at desctruction time
234  // (e.g. close files, deallocate resources etc.)
235 }

Member Function Documentation

◆ fillDescriptions()

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

Definition at line 275 of file MuonToTrackingParticleAssociatorEDProducer.cc.

References edm::ConfigurationDescriptions::addDefault(), and submitPVResolutionJobs::desc.

275  {
276  // The following says we do not know what parameters are allowed so do no
277  // validation
278  // Please change this to state exactly what you do use, even if it is no
279  // parameters
281  desc.setUnknown();
282  descriptions.addDefault(desc);
283 }
void addDefault(ParameterSetDescription const &psetDescription)

◆ produce()

void MuonToTrackingParticleAssociatorEDProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 242 of file MuonToTrackingParticleAssociatorEDProducer.cc.

References cscHitAssociatorConfig_, diagnostics_, dtHitAssociatorConfig_, gemHitAssociatorConfig_, edm::EventSetup::getData(), helper_, hitExtractor_, iEvent, TrackerMuonHitExtractor::init(), eostools::move(), rpcHitAssociatorConfig_, convertXMLtoSQLite_cfg::toPut, trackerHitAssociatorConfig_, and tTopoToken_.

242  {
243  using namespace edm;
244 
246 
247  // Retrieve tracker topology from geometry
248  const TrackerTopology *tTopo = &iSetup.getData(tTopoToken_);
249 
250  std::function<void(const TrackHitsCollection &, const TrackingParticleCollection &)> diagnostics;
251  if (diagnostics_) {
252  diagnostics_->read(iEvent);
253  diagnostics = [this](const TrackHitsCollection &hC, const TrackingParticleCollection &pC) {
254  diagnostics_->dump(hC, pC);
255  };
256  }
257 
258  auto impl = std::make_unique<MuonToTrackingParticleAssociatorByHitsImpl>(hitExtractor_,
264  iEvent,
265  iSetup,
266  tTopo,
267  diagnostics,
268  &helper_);
269  auto toPut = std::make_unique<reco::MuonToTrackingParticleAssociator>(std::move(impl));
270  iEvent.put(std::move(toPut));
271 }
int iEvent
Definition: GenABIO.cc:224
bool getData(T &iHolder) const
Definition: EventSetup.h:122
MuonAssociatorByHitsHelper::TrackHitsCollection TrackHitsCollection
void init(const edm::Event &)
HLT enums.
std::vector< TrackingParticle > TrackingParticleCollection
def move(src, dest)
Definition: eostools.py:511
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_

Member Data Documentation

◆ config_

edm::ParameterSet const MuonToTrackingParticleAssociatorEDProducer::config_
private

◆ cscHitAssociatorConfig_

CSCHitAssociator::Config MuonToTrackingParticleAssociatorEDProducer::cscHitAssociatorConfig_
private

Definition at line 192 of file MuonToTrackingParticleAssociatorEDProducer.cc.

Referenced by produce().

◆ diagnostics_

std::unique_ptr<InputDumper> MuonToTrackingParticleAssociatorEDProducer::diagnostics_
private

◆ dtHitAssociatorConfig_

DTHitAssociator::Config MuonToTrackingParticleAssociatorEDProducer::dtHitAssociatorConfig_
private

Definition at line 193 of file MuonToTrackingParticleAssociatorEDProducer.cc.

Referenced by produce().

◆ gemHitAssociatorConfig_

GEMHitAssociator::Config MuonToTrackingParticleAssociatorEDProducer::gemHitAssociatorConfig_
private

Definition at line 190 of file MuonToTrackingParticleAssociatorEDProducer.cc.

Referenced by produce().

◆ helper_

MuonAssociatorByHitsHelper MuonToTrackingParticleAssociatorEDProducer::helper_
private

Definition at line 187 of file MuonToTrackingParticleAssociatorEDProducer.cc.

Referenced by produce().

◆ hitExtractor_

TrackerMuonHitExtractor MuonToTrackingParticleAssociatorEDProducer::hitExtractor_
private

Definition at line 189 of file MuonToTrackingParticleAssociatorEDProducer.cc.

Referenced by produce().

◆ rpcHitAssociatorConfig_

RPCHitAssociator::Config MuonToTrackingParticleAssociatorEDProducer::rpcHitAssociatorConfig_
private

Definition at line 191 of file MuonToTrackingParticleAssociatorEDProducer.cc.

Referenced by produce().

◆ trackerHitAssociatorConfig_

TrackerHitAssociator::Config MuonToTrackingParticleAssociatorEDProducer::trackerHitAssociatorConfig_
private

Definition at line 188 of file MuonToTrackingParticleAssociatorEDProducer.cc.

Referenced by produce().

◆ tTopoToken_

const edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> MuonToTrackingParticleAssociatorEDProducer::tTopoToken_
private

Definition at line 195 of file MuonToTrackingParticleAssociatorEDProducer.cc.

Referenced by produce().