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.

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 }

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

◆ ~MuonSeedGenerator()

MuonSeedGenerator::~MuonSeedGenerator ( )
override

Destructor.

Definition at line 66 of file MuonSeedGenerator.cc.

66  {
67  delete thePatternRecognition;
68  delete theSeedFinder;
69  delete theSeedCleaner;
70 }

References thePatternRecognition, theSeedCleaner, and theSeedFinder.

Member Function Documentation

◆ fillDescriptions()

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

Definition at line 107 of file MuonSeedGenerator.cc.

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 }

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

◆ produce()

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

reconstruct muon's seeds

Definition at line 73 of file MuonSeedGenerator.cc.

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 }

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

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().

Vector3DBase
Definition: Vector3DBase.h:8
MuonSeedGenerator::thePatternRecognition
MuonSeedVPatternRecognition * thePatternRecognition
Definition: MuonSeedGenerator.h:42
pwdgSkimBPark_cfi.beamSpot
beamSpot
Definition: pwdgSkimBPark_cfi.py:5
MuonSeedVFinder::seeds
virtual void seeds(const MuonTransientTrackingRecHit::MuonRecHitContainer &hits, std::vector< TrajectorySeed > &result)=0
convertSQLitetoXML_cfg.output
output
Definition: convertSQLitetoXML_cfg.py:72
MuonSeedGenerator::theBeamSpotTag
edm::InputTag theBeamSpotTag
Definition: MuonSeedGenerator.h:46
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89301
MuonSeedFinder
Definition: MuonSeedFinder.h:22
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
edm::Handle< reco::BeamSpot >
MuonSeedVFinder::setBField
virtual void setBField(const MagneticField *field)=0
MuonSeedGenerator::magFieldToken
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magFieldToken
Definition: MuonSeedGenerator.h:48
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
reco::BeamSpot
Definition: BeamSpot.h:21
edm::ESHandle< MagneticField >
MuonSeedGenerator::theSeedCleaner
MuonSeedVCleaner * theSeedCleaner
Definition: MuonSeedGenerator.h:44
MuonSeedVCleaner::clean
virtual void clean(TrajectorySeedCollection &seeds)=0
MuonSeedSimpleCleaner
Definition: MuonSeedSimpleCleaner.h:6
MuonSeedGenerator::theSeedFinder
MuonSeedVFinder * theSeedFinder
Definition: MuonSeedGenerator.h:43
edm::EventSetup::getHandle
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:155
MuonSeedGenerator::beamspotToken
edm::EDGetTokenT< reco::BeamSpot > beamspotToken
Definition: MuonSeedGenerator.h:47
MuonSeedVFinder::setBeamSpot
void setBeamSpot(const GlobalVector &gv)
Definition: MuonSeedVFinder.h:27
MuonSeedVPatternRecognition::produce
virtual void produce(const edm::Event &event, const edm::EventSetup &eSetup, std::vector< MuonRecHitContainer > &result)=0
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
eostools.move
def move(src, dest)
Definition: eostools.py:511
MuonSeedOrcaPatternRecognition
Definition: MuonSeedOrcaPatternRecognition.h:11
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
event
Definition: event.py:1
edm::InputTag
Definition: InputTag.h:15
edm::ConsumesCollector
Definition: ConsumesCollector.h:45
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27