CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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,
IdealMagneticFieldRecord
magFieldToken
 
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 ( const edm::ParameterSet pset)

Constructor.

Definition at line 52 of file MuonSeedGenerator.cc.

References beamspotToken, magFieldToken, theBeamSpotTag, and thePatternRecognition.

53  : theSeedFinder(new MuonSeedFinder(pset)),
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
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
MuonSeedVFinder * theSeedFinder
MuonSeedVPatternRecognition * thePatternRecognition
edm::InputTag theBeamSpotTag
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

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

Definition at line 107 of file MuonSeedGenerator.cc.

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

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 setAllowAnything()
allow any parameter label/value pairs
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void MuonSeedGenerator::produce ( edm::Event event,
const edm::EventSetup eSetup 
)
override

reconstruct muon's seeds

Definition at line 73 of file MuonSeedGenerator.cc.

References beam_dqm_sourceclient-live_cfg::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, theSeedFinder, reco::BeamSpot::x0(), reco::BeamSpot::y0(), and reco::BeamSpot::z0().

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)
double z0() const
z coordinate
Definition: BeamSpot.h:65
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
def move
Definition: eostools.py:511
bool isValid() const
Definition: HandleBase.h:70
virtual void seeds(const MuonTransientTrackingRecHit::MuonRecHitContainer &hits, std::vector< TrajectorySeed > &result)=0
Log< level::Info, false > LogInfo
virtual void clean(TrajectorySeedCollection &seeds)=0
virtual void setBField(const MagneticField *field)=0
double y0() const
y coordinate
Definition: BeamSpot.h:63
MuonSeedVFinder * theSeedFinder
MuonSeedVPatternRecognition * thePatternRecognition
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:151
double x0() const
x coordinate
Definition: BeamSpot.h:61

Member Data Documentation

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

Definition at line 47 of file MuonSeedGenerator.h.

Referenced by MuonSeedGenerator(), and produce().

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

Definition at line 48 of file MuonSeedGenerator.h.

Referenced by MuonSeedGenerator(), and produce().

edm::InputTag MuonSeedGenerator::theBeamSpotTag
protected

Definition at line 46 of file MuonSeedGenerator.h.

Referenced by MuonSeedGenerator().

MuonSeedVPatternRecognition* MuonSeedGenerator::thePatternRecognition
protected

Definition at line 42 of file MuonSeedGenerator.h.

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

MuonSeedVCleaner* MuonSeedGenerator::theSeedCleaner
protected

Definition at line 44 of file MuonSeedGenerator.h.

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

MuonSeedVFinder* MuonSeedGenerator::theSeedFinder
protected

Definition at line 43 of file MuonSeedGenerator.h.

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