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 | 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
 

Private Member Functions

void produce (edm::Event &, const edm::EventSetup &) override
 

Private Attributes

edm::EDGetTokenT
< CSCSegmentCollection
cscSegments
 
std::unique_ptr< CSCSegtoRPCcscSegtoRPC
 
const bool debug
 
edm::EDGetTokenT
< DTRecSegment4DCollection
dt4DSegments
 
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::TrackCollection
tracks
 
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 22 of file RPCPointProducer.h.

Constructor & Destructor Documentation

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

Definition at line 28 of file RPCPointProducer.cc.

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

29  : incldt(iConfig.getUntrackedParameter<bool>("incldt", true)),
30  inclcsc(iConfig.getUntrackedParameter<bool>("inclcsc", true)),
31  incltrack(iConfig.getUntrackedParameter<bool>("incltrack", true)),
32  debug(iConfig.getUntrackedParameter<bool>("debug", false)),
33  MinCosAng(iConfig.getUntrackedParameter<double>("MinCosAng", 0.95)),
34  MaxD(iConfig.getUntrackedParameter<double>("MaxD", 80.)),
35  MaxDrb4(iConfig.getUntrackedParameter<double>("MaxDrb4", 150.)),
36  ExtrapolatedRegion(iConfig.getUntrackedParameter<double>("ExtrapolatedRegion", 0.5)) {
37  if (incldt) {
38  dt4DSegments = consumes<DTRecSegment4DCollection>(iConfig.getParameter<edm::InputTag>("dt4DSegments"));
39  dtSegtoRPC = std::make_unique<DTSegtoRPC>(consumesCollector());
40  }
41  if (inclcsc) {
42  cscSegments = consumes<CSCSegmentCollection>(iConfig.getParameter<edm::InputTag>("cscSegments"));
43  cscSegtoRPC = std::make_unique<CSCSegtoRPC>(consumesCollector());
44  }
45  if (incltrack) {
46  tracks = consumes<reco::TrackCollection>(iConfig.getParameter<edm::InputTag>("tracks"));
47  tracktoRPC = std::make_unique<TracktoRPC>(iConfig.getParameter<edm::ParameterSet>("TrackTransformer"),
48  iConfig.getParameter<edm::InputTag>("tracks"),
49  consumesCollector());
50  }
51 
52  produces<RPCRecHitCollection>("RPCDTExtrapolatedPoints");
53  produces<RPCRecHitCollection>("RPCCSCExtrapolatedPoints");
54  produces<RPCRecHitCollection>("RPCTrackExtrapolatedPoints");
55 }
const double ExtrapolatedRegion
T getUntrackedParameter(std::string const &, T const &) const
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
std::unique_ptr< CSCSegtoRPC > cscSegtoRPC
edm::EDGetTokenT< reco::TrackCollection > tracks
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
std::unique_ptr< DTSegtoRPC > dtSegtoRPC

Member Function Documentation

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

Definition at line 57 of file RPCPointProducer.cc.

References gather_cfg::cout, cscSegments, cscSegtoRPC, debug, dt4DSegments, dtSegtoRPC, ExtrapolatedRegion, edm::Event::getByToken(), inclcsc, incldt, incltrack, edm::HandleBase::isValid(), edm::Handle< T >::product(), edm::Event::put(), tracks, and tracktoRPC.

57  {
58  if (incldt) {
60  iEvent.getByToken(dt4DSegments, all4DSegments);
61  if (all4DSegments.isValid()) {
62  iEvent.put(dtSegtoRPC->thePoints(all4DSegments.product(), iSetup, debug, ExtrapolatedRegion),
63  "RPCDTExtrapolatedPoints");
64  } else {
65  if (debug)
66  std::cout << "RPCHLT Invalid DTSegments collection" << std::endl;
67  }
68  }
69 
70  if (inclcsc) {
71  edm::Handle<CSCSegmentCollection> allCSCSegments;
72  iEvent.getByToken(cscSegments, allCSCSegments);
73  if (allCSCSegments.isValid()) {
74  iEvent.put(cscSegtoRPC->thePoints(allCSCSegments.product(), iSetup, debug, ExtrapolatedRegion),
75  "RPCCSCExtrapolatedPoints");
76  } else {
77  if (debug)
78  std::cout << "RPCHLT Invalid CSCSegments collection" << std::endl;
79  }
80  }
81  if (incltrack) {
83  iEvent.getByToken(tracks, alltracks);
84  if (!(alltracks->empty())) {
85  iEvent.put(tracktoRPC->thePoints(alltracks.product(), iSetup, debug), "RPCTrackExtrapolatedPoints");
86  } else {
87  if (debug)
88  std::cout << "RPCHLT Invalid Tracks collection" << std::endl;
89  }
90  }
91 }
const double ExtrapolatedRegion
std::unique_ptr< TracktoRPC > tracktoRPC
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:133
const bool incltrack
edm::EDGetTokenT< CSCSegmentCollection > cscSegments
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:539
edm::EDGetTokenT< DTRecSegment4DCollection > dt4DSegments
std::unique_ptr< CSCSegtoRPC > cscSegtoRPC
bool isValid() const
Definition: HandleBase.h:70
T const * product() const
Definition: Handle.h:70
edm::EDGetTokenT< reco::TrackCollection > tracks
tuple cout
Definition: gather_cfg.py:144
std::unique_ptr< DTSegtoRPC > dtSegtoRPC

Member Data Documentation

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

Definition at line 29 of file RPCPointProducer.h.

Referenced by produce(), and RPCPointProducer().

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

Definition at line 34 of file RPCPointProducer.h.

Referenced by produce(), and RPCPointProducer().

const bool RPCPointProducer::debug
private
edm::EDGetTokenT<DTRecSegment4DCollection> RPCPointProducer::dt4DSegments
private

Definition at line 30 of file RPCPointProducer.h.

Referenced by produce(), and RPCPointProducer().

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

Definition at line 33 of file RPCPointProducer.h.

Referenced by produce(), and RPCPointProducer().

const double RPCPointProducer::ExtrapolatedRegion
private

Definition at line 44 of file RPCPointProducer.h.

Referenced by produce().

const bool RPCPointProducer::inclcsc
private

Definition at line 38 of file RPCPointProducer.h.

Referenced by produce(), and RPCPointProducer().

const bool RPCPointProducer::incldt
private

Definition at line 37 of file RPCPointProducer.h.

Referenced by produce(), and RPCPointProducer().

const bool RPCPointProducer::incltrack
private

Definition at line 39 of file RPCPointProducer.h.

Referenced by produce(), and RPCPointProducer().

const double RPCPointProducer::MaxD
private

Definition at line 42 of file RPCPointProducer.h.

const double RPCPointProducer::MaxDrb4
private

Definition at line 43 of file RPCPointProducer.h.

const double RPCPointProducer::MinCosAng
private

Definition at line 41 of file RPCPointProducer.h.

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

Definition at line 31 of file RPCPointProducer.h.

Referenced by produce(), and RPCPointProducer().

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

Definition at line 35 of file RPCPointProducer.h.

Referenced by produce(), and RPCPointProducer().