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
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Protected Attributes

edm::EDGetTokenT< reco::BeamSpotbeamspotToken
 
edm::InputTag theBeamSpotTag
 
MuonSeedVPatternRecognitionthePatternRecognition
 
MuonSeedVCleanertheSeedCleaner
 
MuonSeedVFindertheSeedFinder
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 

Detailed Description

No description available.

Author
R. Bellan - INFN Torino

Definition at line 23 of file MuonSeedGenerator.h.

Constructor & Destructor Documentation

◆ MuonSeedGenerator()

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

Constructor.

Definition at line 53 of file MuonSeedGenerator.cc.

56  theBeamSpotTag(pset.getParameter<edm::InputTag>("beamSpotTag")) {
57  produces<TrajectorySeedCollection>();
58 
59  edm::ConsumesCollector iC = consumesCollector();
61 
62  beamspotToken = consumes<reco::BeamSpot>(theBeamSpotTag);
63 }

References beamspotToken, 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 108 of file MuonSeedGenerator.cc.

108  {
110  desc.setAllowAnything();
111  desc.add<bool>("EnableDTMeasurement", true);
112  desc.add<bool>("EnableCSCMeasurement", true);
113  desc.add<bool>("EnableME0Measurement", false);
114  descriptions.add("produceMuons", desc);
115 }

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), and edm::ParameterSetDescription::setAllowAnything().

◆ 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  eSetup.get<IdealMagneticFieldRecord>().get(field);
79  theSeedFinder->setBField(&*field);
80 
82  edm::Handle<reco::BeamSpot> beamSpotHandle;
83  event.getByToken(beamspotToken, beamSpotHandle);
84  if (beamSpotHandle.isValid()) {
85  beamSpot = *beamSpotHandle;
86 
87  } else {
88  edm::LogInfo("MuonSeedGenerator") << "No beam spot available from EventSetup \n";
89  }
90 
91  // make it a vector so we can subtract it from position vectors
92  GlobalVector gv(beamSpot.x0(), beamSpot.y0(), beamSpot.z0());
94 
95  std::vector<MuonRecHitContainer> patterns;
96  thePatternRecognition->produce(event, eSetup, patterns);
97 
98  for (std::vector<MuonRecHitContainer>::const_iterator seedSegments = patterns.begin(); seedSegments != patterns.end();
99  ++seedSegments) {
100  theSeedFinder->seeds(*seedSegments, *output);
101  }
102 
104 
105  event.put(std::move(output));
106 }

References pwdgSkimBPark_cfi::beamSpot, beamspotToken, MuonSeedVCleaner::clean(), edm::EventSetup::get(), get, edm::HandleBase::isValid(), 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 44 of file MuonSeedGenerator.h.

Referenced by MuonSeedGenerator(), and produce().

◆ theBeamSpotTag

edm::InputTag MuonSeedGenerator::theBeamSpotTag
protected

Definition at line 43 of file MuonSeedGenerator.h.

Referenced by MuonSeedGenerator().

◆ thePatternRecognition

MuonSeedVPatternRecognition* MuonSeedGenerator::thePatternRecognition
protected

Definition at line 39 of file MuonSeedGenerator.h.

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

◆ theSeedCleaner

MuonSeedVCleaner* MuonSeedGenerator::theSeedCleaner
protected

Definition at line 41 of file MuonSeedGenerator.h.

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

◆ theSeedFinder

MuonSeedVFinder* MuonSeedGenerator::theSeedFinder
protected

Definition at line 40 of file MuonSeedGenerator.h.

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

Vector3DBase
Definition: Vector3DBase.h:8
MuonSeedGenerator::thePatternRecognition
MuonSeedVPatternRecognition * thePatternRecognition
Definition: MuonSeedGenerator.h:39
edm::ParameterSetDescription::add
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:95
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:32
MuonSeedGenerator::theBeamSpotTag
edm::InputTag theBeamSpotTag
Definition: MuonSeedGenerator.h:43
edm::LogInfo
Definition: MessageLogger.h:254
MuonSeedFinder
Definition: MuonSeedFinder.h:22
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
edm::Handle< reco::BeamSpot >
IdealMagneticFieldRecord
Definition: IdealMagneticFieldRecord.h:11
MuonSeedVFinder::setBField
virtual void setBField(const MagneticField *field)=0
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
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:41
MuonSeedVCleaner::clean
virtual void clean(TrajectorySeedCollection &seeds)=0
MuonSeedSimpleCleaner
Definition: MuonSeedSimpleCleaner.h:6
MuonSeedGenerator::theSeedFinder
MuonSeedVFinder * theSeedFinder
Definition: MuonSeedGenerator.h:40
MuonSeedGenerator::beamspotToken
edm::EDGetTokenT< reco::BeamSpot > beamspotToken
Definition: MuonSeedGenerator.h:44
edm::ParameterSetDescription::setAllowAnything
void setAllowAnything()
allow any parameter label/value pairs
Definition: ParameterSetDescription.cc:37
get
#define get
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
eostools.move
def move(src, dest)
Definition: eostools.py:511
MuonSeedOrcaPatternRecognition
Definition: MuonSeedOrcaPatternRecognition.h:8
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:39
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27