CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
RPCPointProducer Class Reference

#include <Analysis/RPCPointProducer/src/RPCPointProducer.cc>

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

Public Member Functions

 RPCPointProducer (const edm::ParameterSet &)
 
- 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::EDGetTokenT< CSCSegmentCollectioncscSegments
 
std::unique_ptr< CSCSegtoRPCcscSegtoRPC
 
const bool debug
 
edm::EDGetTokenT< DTRecSegment4DCollectiondt4DSegments
 
std::unique_ptr< DTSegtoRPCdtSegtoRPC
 
const double ExtrapolatedRegion
 
const bool inclcsc
 
const bool incldt
 
const bool incltrack
 
const double MaxD
 
const double MaxDrb4
 
const double MinCosAng
 
edm::EDGetTokenT< reco::TrackCollectiontracks
 
std::unique_ptr< TracktoRPCtracktoRPC
 

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

Description: <one line="" class="" summary>="">

Implementation: <Notes on="" implementation>="">

Definition at line 25 of file RPCPointProducer.h.

Constructor & Destructor Documentation

◆ RPCPointProducer()

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

Definition at line 62 of file RPCPointProducer.cc.

References cscSegments, cscSegtoRPC, dt4DSegments, dtSegtoRPC, edm::ParameterSet::getParameter(), inclcsc, incldt, incltrack, tracks, and tracktoRPC.

63  : incldt(iConfig.getParameter<bool>("incldt")),
64  inclcsc(iConfig.getParameter<bool>("inclcsc")),
65  incltrack(iConfig.getParameter<bool>("incltrack")),
66  debug(iConfig.getUntrackedParameter<bool>("debug")),
67  MinCosAng(iConfig.getParameter<double>("MinCosAng")),
68  MaxD(iConfig.getParameter<double>("MaxD")),
69  MaxDrb4(iConfig.getParameter<double>("MaxDrb4")),
70  ExtrapolatedRegion(iConfig.getParameter<double>("ExtrapolatedRegion")) {
71  if (incldt) {
72  dt4DSegments = consumes<DTRecSegment4DCollection>(iConfig.getParameter<edm::InputTag>("dt4DSegments"));
73  dtSegtoRPC = std::make_unique<DTSegtoRPC>(consumesCollector(), iConfig);
74  }
75  if (inclcsc) {
76  cscSegments = consumes<CSCSegmentCollection>(iConfig.getParameter<edm::InputTag>("cscSegments"));
77  cscSegtoRPC = std::make_unique<CSCSegtoRPC>(consumesCollector(), iConfig);
78  }
79  if (incltrack) {
80  tracks = consumes<reco::TrackCollection>(iConfig.getParameter<edm::InputTag>("tracks"));
81  tracktoRPC = std::make_unique<TracktoRPC>(iConfig.getParameter<edm::ParameterSet>("TrackTransformer"),
82  iConfig.getParameter<edm::InputTag>("tracks"),
83  consumesCollector());
84  }
85 
86  produces<RPCRecHitCollection>("RPCDTExtrapolatedPoints");
87  produces<RPCRecHitCollection>("RPCCSCExtrapolatedPoints");
88  produces<RPCRecHitCollection>("RPCTrackExtrapolatedPoints");
89 }
const double ExtrapolatedRegion
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
const double MaxD
const double MaxDrb4
std::unique_ptr< TracktoRPC > tracktoRPC
const bool incltrack
edm::EDGetTokenT< CSCSegmentCollection > cscSegments
edm::EDGetTokenT< DTRecSegment4DCollection > dt4DSegments
const double MinCosAng
T getUntrackedParameter(std::string const &, T const &) const
std::unique_ptr< CSCSegtoRPC > cscSegtoRPC
edm::EDGetTokenT< reco::TrackCollection > tracks
std::unique_ptr< DTSegtoRPC > dtSegtoRPC

Member Function Documentation

◆ fillDescriptions()

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

Definition at line 31 of file RPCPointProducer.cc.

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

31  {
33  desc.add<bool>("incldt", true);
34  desc.add<bool>("inclcsc", true);
35  desc.add<bool>("incltrack", false);
36  desc.addUntracked<bool>("debug", false);
37  desc.add<double>("rangestrips", 4.);
38  desc.add<double>("rangestripsRB4", 4.);
39  desc.add<double>("MinCosAng", 0.85);
40  desc.add<double>("MaxD", 80.0);
41  desc.add<double>("MaxDrb4", 150.0);
42  desc.add<double>("ExtrapolatedRegion", 0.5);
43  desc.add<edm::InputTag>("cscSegments", edm::InputTag("hltCscSegments"));
44  desc.add<edm::InputTag>("dt4DSegments", edm::InputTag("hltDt4DSegments"));
45  desc.add<edm::InputTag>("tracks", edm::InputTag("standAloneMuons"));
46  desc.add<int>("minBX", -2);
47  desc.add<int>("maxBX", 2);
49  descNested.add<bool>("DoPredictionsOnly", false);
50  descNested.add<std::string>("Fitter", "KFFitterForRefitInsideOut");
51  descNested.add<std::string>("TrackerRecHitBuilder", "WithTrackAngle");
52  descNested.add<std::string>("Smoother", "KFSmootherForRefitInsideOut");
53  descNested.add<std::string>("MuonRecHitBuilder", "MuonRecHitBuilder");
54  descNested.add<std::string>("RefitDirection", "alongMomentum");
55  descNested.add<bool>("RefitRPCHits", false);
56  descNested.add<std::string>("Propagator", "SmartPropagatorAnyRKOpposite");
57  desc.add<edm::ParameterSetDescription>("TrackTransformer", descNested);
58 
59  descriptions.add("rpcPointProducer", desc);
60 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)

◆ produce()

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

Definition at line 91 of file RPCPointProducer.cc.

References cscSegments, cscSegtoRPC, debug, dt4DSegments, dtSegtoRPC, ExtrapolatedRegion, iEvent, inclcsc, incldt, incltrack, edm::HandleBase::isValid(), LogDebug, edm::Handle< T >::product(), tracks, and tracktoRPC.

91  {
92  if (incldt) {
94  iEvent.getByToken(dt4DSegments, all4DSegments);
95  if (all4DSegments.isValid()) {
96  iEvent.put(dtSegtoRPC->thePoints(all4DSegments.product(), iSetup, debug, ExtrapolatedRegion),
97  "RPCDTExtrapolatedPoints");
98  } else {
99  if (debug)
100  LogDebug("RPCPointProducer") << "RPCHLT Invalid DTSegments collection" << std::endl;
101  }
102  }
103 
104  if (inclcsc) {
105  edm::Handle<CSCSegmentCollection> allCSCSegments;
106  iEvent.getByToken(cscSegments, allCSCSegments);
107  if (allCSCSegments.isValid()) {
108  iEvent.put(cscSegtoRPC->thePoints(allCSCSegments.product(), iSetup, debug, ExtrapolatedRegion),
109  "RPCCSCExtrapolatedPoints");
110  } else {
111  if (debug)
112  LogDebug("RPCPointProducer") << "RPCHLT Invalid CSCSegments collection" << std::endl;
113  }
114  }
115  if (incltrack) {
117  iEvent.getByToken(tracks, alltracks);
118  if (!(alltracks->empty())) {
119  iEvent.put(tracktoRPC->thePoints(alltracks.product(), iSetup, debug), "RPCTrackExtrapolatedPoints");
120  } else {
121  if (debug)
122  LogDebug("RPCPointProducer") << "RPCHLT Invalid Tracks collection" << std::endl;
123  }
124  }
125 }
const double ExtrapolatedRegion
std::unique_ptr< TracktoRPC > tracktoRPC
const bool incltrack
edm::EDGetTokenT< CSCSegmentCollection > cscSegments
edm::EDGetTokenT< DTRecSegment4DCollection > dt4DSegments
T const * product() const
Definition: Handle.h:70
int iEvent
Definition: GenABIO.cc:224
std::unique_ptr< CSCSegtoRPC > cscSegtoRPC
edm::EDGetTokenT< reco::TrackCollection > tracks
bool isValid() const
Definition: HandleBase.h:70
#define LogDebug(id)
std::unique_ptr< DTSegtoRPC > dtSegtoRPC

Member Data Documentation

◆ cscSegments

edm::EDGetTokenT<CSCSegmentCollection> RPCPointProducer::cscSegments
private

Definition at line 33 of file RPCPointProducer.h.

Referenced by produce(), and RPCPointProducer().

◆ cscSegtoRPC

std::unique_ptr<CSCSegtoRPC> RPCPointProducer::cscSegtoRPC
private

Definition at line 38 of file RPCPointProducer.h.

Referenced by produce(), and RPCPointProducer().

◆ debug

const bool RPCPointProducer::debug
private

◆ dt4DSegments

edm::EDGetTokenT<DTRecSegment4DCollection> RPCPointProducer::dt4DSegments
private

Definition at line 34 of file RPCPointProducer.h.

Referenced by produce(), and RPCPointProducer().

◆ dtSegtoRPC

std::unique_ptr<DTSegtoRPC> RPCPointProducer::dtSegtoRPC
private

Definition at line 37 of file RPCPointProducer.h.

Referenced by produce(), and RPCPointProducer().

◆ ExtrapolatedRegion

const double RPCPointProducer::ExtrapolatedRegion
private

Definition at line 48 of file RPCPointProducer.h.

Referenced by produce().

◆ inclcsc

const bool RPCPointProducer::inclcsc
private

Definition at line 42 of file RPCPointProducer.h.

Referenced by produce(), and RPCPointProducer().

◆ incldt

const bool RPCPointProducer::incldt
private

Definition at line 41 of file RPCPointProducer.h.

Referenced by produce(), and RPCPointProducer().

◆ incltrack

const bool RPCPointProducer::incltrack
private

Definition at line 43 of file RPCPointProducer.h.

Referenced by produce(), and RPCPointProducer().

◆ MaxD

const double RPCPointProducer::MaxD
private

Definition at line 46 of file RPCPointProducer.h.

◆ MaxDrb4

const double RPCPointProducer::MaxDrb4
private

Definition at line 47 of file RPCPointProducer.h.

◆ MinCosAng

const double RPCPointProducer::MinCosAng
private

Definition at line 45 of file RPCPointProducer.h.

◆ tracks

edm::EDGetTokenT<reco::TrackCollection> RPCPointProducer::tracks
private

Definition at line 35 of file RPCPointProducer.h.

Referenced by produce(), and RPCPointProducer().

◆ tracktoRPC

std::unique_ptr<TracktoRPC> RPCPointProducer::tracktoRPC
private

Definition at line 39 of file RPCPointProducer.h.

Referenced by produce(), and RPCPointProducer().