CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Protected Attributes
MuonSeedGenerator Class Reference

#include <MuonSeedGenerator.h>

Inheritance diagram for MuonSeedGenerator:
edm::stream::EDProducer<>

Public Member Functions

 MuonSeedGenerator (const edm::ParameterSet &)
 Constructor. More...
 
void produce (edm::Event &, const edm::EventSetup &) override
 reconstruct muon's seeds More...
 
 ~MuonSeedGenerator () override
 Destructor. More...
 
- 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)
 

Protected Attributes

edm::EDGetTokenT< reco::BeamSpotbeamspotToken
 
edm::ESGetToken< MagneticField, IdealMagneticFieldRecordmagFieldToken
 
edm::InputTag theBeamSpotTag
 
MuonSeedVPatternRecognitionthePatternRecognition
 
MuonSeedVCleanertheSeedCleaner
 
MuonSeedVFindertheSeedFinder
 

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

No description available.

Author
R. Bellan - INFN Torino

Definition at line 26 of file MuonSeedGenerator.h.

Constructor & Destructor Documentation

◆ MuonSeedGenerator()

MuonSeedGenerator::MuonSeedGenerator ( const edm::ParameterSet pset)

Constructor.

Definition at line 52 of file MuonSeedGenerator.cc.

References beamspotToken, magFieldToken, muonDTDigis_cfi::pset, theBeamSpotTag, and thePatternRecognition.

55  theBeamSpotTag(pset.getParameter<edm::InputTag>("beamSpotTag")) {
56  produces<TrajectorySeedCollection>();
57 
58  edm::ConsumesCollector iC = consumesCollector();
60 
61  beamspotToken = consumes<reco::BeamSpot>(theBeamSpotTag);
62  magFieldToken = esConsumes<MagneticField, IdealMagneticFieldRecord>();
63 }
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magFieldToken
MuonSeedVCleaner * theSeedCleaner
edm::EDGetTokenT< reco::BeamSpot > beamspotToken
MuonSeedVFinder * theSeedFinder
MuonSeedVPatternRecognition * thePatternRecognition
edm::InputTag theBeamSpotTag

◆ ~MuonSeedGenerator()

MuonSeedGenerator::~MuonSeedGenerator ( )
override

Destructor.

Definition at line 66 of file MuonSeedGenerator.cc.

References thePatternRecognition, theSeedCleaner, and theSeedFinder.

66  {
67  delete thePatternRecognition;
68  delete theSeedFinder;
69  delete theSeedCleaner;
70 }
MuonSeedVCleaner * theSeedCleaner
MuonSeedVFinder * theSeedFinder
MuonSeedVPatternRecognition * thePatternRecognition

Member Function Documentation

◆ fillDescriptions()

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

Definition at line 107 of file MuonSeedGenerator.cc.

References edm::ConfigurationDescriptions::add(), submitPVResolutionJobs::desc, and ProducerED_cfi::InputTag.

107  {
109  desc.setAllowAnything();
110  desc.add<edm::InputTag>("beamSpotTag", edm::InputTag("offlineBeamSpot"));
111  desc.add<bool>("scaleDT", true);
112  desc.add<edm::InputTag>("CSCRecSegmentLabel", edm::InputTag("cscSegments"));
113  desc.add<edm::InputTag>("DTRecSegmentLabel", edm::InputTag("dt4DSegments"));
114  desc.add<edm::InputTag>("ME0RecSegmentLabel", edm::InputTag("me0Segments"));
115  desc.add<bool>("EnableDTMeasurement", true);
116  desc.add<bool>("EnableCSCMeasurement", true);
117  desc.add<bool>("EnableME0Measurement", false);
118  desc.add<std::vector<double>>("crackEtas", {0.2, 1.6, 1.7});
119  desc.add<double>("crackWindow", 0.04);
120  desc.add<double>("deltaPhiSearchWindow", 0.25);
121  desc.add<double>("deltaEtaSearchWindow", 0.2);
122  desc.add<double>("deltaEtaCrackSearchWindow", 0.25);
123  descriptions.add("muonSeedGenerator", desc);
124 }
void add(std::string const &label, ParameterSetDescription const &psetDescription)

◆ produce()

void MuonSeedGenerator::produce ( edm::Event event,
const edm::EventSetup eSetup 
)
override

reconstruct muon's seeds

Definition at line 73 of file MuonSeedGenerator.cc.

References isoTrack_cff::beamSpot, beamspotToken, MuonSeedVCleaner::clean(), edm::EventSetup::getHandle(), edm::HandleBase::isValid(), magFieldToken, eostools::move(), MuonSeedVPatternRecognition::produce(), MuonSeedVFinder::seeds(), MuonSeedVFinder::setBeamSpot(), MuonSeedVFinder::setBField(), thePatternRecognition, theSeedCleaner, and theSeedFinder.

73  {
74  // create the pointer to the Seed container
75  auto output = std::make_unique<TrajectorySeedCollection>();
76 
78  theSeedFinder->setBField(&*field);
79 
81  edm::Handle<reco::BeamSpot> beamSpotHandle;
82  event.getByToken(beamspotToken, beamSpotHandle);
83  if (beamSpotHandle.isValid()) {
84  beamSpot = *beamSpotHandle;
85 
86  } else {
87  edm::LogInfo("MuonSeedGenerator") << "No beam spot available from EventSetup \n";
88  }
89 
90  // make it a vector so we can subtract it from position vectors
91  GlobalVector gv(beamSpot.x0(), beamSpot.y0(), beamSpot.z0());
93 
94  std::vector<MuonRecHitContainer> patterns;
95  thePatternRecognition->produce(event, eSetup, patterns);
96 
97  for (std::vector<MuonRecHitContainer>::const_iterator seedSegments = patterns.begin(); seedSegments != patterns.end();
98  ++seedSegments) {
99  theSeedFinder->seeds(*seedSegments, *output);
100  }
101 
103 
104  event.put(std::move(output));
105 }
void setBeamSpot(const GlobalVector &gv)
virtual void produce(const edm::Event &event, const edm::EventSetup &eSetup, std::vector< MuonRecHitContainer > &result)=0
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magFieldToken
MuonSeedVCleaner * theSeedCleaner
edm::EDGetTokenT< reco::BeamSpot > beamspotToken
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:130
virtual void seeds(const MuonTransientTrackingRecHit::MuonRecHitContainer &hits, std::vector< TrajectorySeed > &result)=0
Log< level::Info, false > LogInfo
bool isValid() const
Definition: HandleBase.h:70
virtual void clean(TrajectorySeedCollection &seeds)=0
virtual void setBField(const MagneticField *field)=0
MuonSeedVFinder * theSeedFinder
MuonSeedVPatternRecognition * thePatternRecognition
Definition: output.py:1
def move(src, dest)
Definition: eostools.py:511
Definition: event.py:1

Member Data Documentation

◆ beamspotToken

edm::EDGetTokenT<reco::BeamSpot> MuonSeedGenerator::beamspotToken
protected

Definition at line 47 of file MuonSeedGenerator.h.

Referenced by MuonSeedGenerator(), and produce().

◆ magFieldToken

edm::ESGetToken<MagneticField, IdealMagneticFieldRecord> MuonSeedGenerator::magFieldToken
protected

Definition at line 48 of file MuonSeedGenerator.h.

Referenced by MuonSeedGenerator(), and produce().

◆ theBeamSpotTag

edm::InputTag MuonSeedGenerator::theBeamSpotTag
protected

Definition at line 46 of file MuonSeedGenerator.h.

Referenced by MuonSeedGenerator().

◆ thePatternRecognition

MuonSeedVPatternRecognition* MuonSeedGenerator::thePatternRecognition
protected

Definition at line 42 of file MuonSeedGenerator.h.

Referenced by MuonSeedGenerator(), produce(), and ~MuonSeedGenerator().

◆ theSeedCleaner

MuonSeedVCleaner* MuonSeedGenerator::theSeedCleaner
protected

Definition at line 44 of file MuonSeedGenerator.h.

Referenced by produce(), and ~MuonSeedGenerator().

◆ theSeedFinder

MuonSeedVFinder* MuonSeedGenerator::theSeedFinder
protected

Definition at line 43 of file MuonSeedGenerator.h.

Referenced by produce(), and ~MuonSeedGenerator().