CMS 3D CMS Logo

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

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

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

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

Definition at line 22 of file RPCPointProducer.h.

Constructor & Destructor Documentation

◆ RPCPointProducer()

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

Definition at line 28 of file RPCPointProducer.cc.

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 }

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

Member Function Documentation

◆ produce()

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

Definition at line 57 of file RPCPointProducer.cc.

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 }

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

Member Data Documentation

◆ cscSegments

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

Definition at line 29 of file RPCPointProducer.h.

Referenced by produce(), and RPCPointProducer().

◆ cscSegtoRPC

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

Definition at line 34 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 30 of file RPCPointProducer.h.

Referenced by produce(), and RPCPointProducer().

◆ dtSegtoRPC

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

Definition at line 33 of file RPCPointProducer.h.

Referenced by produce(), and RPCPointProducer().

◆ ExtrapolatedRegion

const double RPCPointProducer::ExtrapolatedRegion
private

Definition at line 44 of file RPCPointProducer.h.

Referenced by produce().

◆ inclcsc

const bool RPCPointProducer::inclcsc
private

Definition at line 38 of file RPCPointProducer.h.

Referenced by produce(), and RPCPointProducer().

◆ incldt

const bool RPCPointProducer::incldt
private

Definition at line 37 of file RPCPointProducer.h.

Referenced by produce(), and RPCPointProducer().

◆ incltrack

const bool RPCPointProducer::incltrack
private

Definition at line 39 of file RPCPointProducer.h.

Referenced by produce(), and RPCPointProducer().

◆ MaxD

const double RPCPointProducer::MaxD
private

Definition at line 42 of file RPCPointProducer.h.

◆ MaxDrb4

const double RPCPointProducer::MaxDrb4
private

Definition at line 43 of file RPCPointProducer.h.

◆ MinCosAng

const double RPCPointProducer::MinCosAng
private

Definition at line 41 of file RPCPointProducer.h.

◆ tracks

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

Definition at line 31 of file RPCPointProducer.h.

Referenced by produce(), and RPCPointProducer().

◆ tracktoRPC

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

Definition at line 35 of file RPCPointProducer.h.

Referenced by produce(), and RPCPointProducer().

RPCPointProducer::tracks
edm::EDGetTokenT< reco::TrackCollection > tracks
Definition: RPCPointProducer.h:31
edm::Handle::product
T const * product() const
Definition: Handle.h:70
gather_cfg.cout
cout
Definition: gather_cfg.py:144
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
edm::Handle< DTRecSegment4DCollection >
RPCPointProducer::MaxDrb4
const double MaxDrb4
Definition: RPCPointProducer.h:43
edm::ParameterSet
Definition: ParameterSet.h:47
RPCPointProducer::incltrack
const bool incltrack
Definition: RPCPointProducer.h:39
RPCPointProducer::dtSegtoRPC
std::unique_ptr< DTSegtoRPC > dtSegtoRPC
Definition: RPCPointProducer.h:33
RPCPointProducer::tracktoRPC
std::unique_ptr< TracktoRPC > tracktoRPC
Definition: RPCPointProducer.h:35
iEvent
int iEvent
Definition: GenABIO.cc:224
RPCPointProducer::ExtrapolatedRegion
const double ExtrapolatedRegion
Definition: RPCPointProducer.h:44
RPCPointProducer::MaxD
const double MaxD
Definition: RPCPointProducer.h:42
RPCPointProducer::dt4DSegments
edm::EDGetTokenT< DTRecSegment4DCollection > dt4DSegments
Definition: RPCPointProducer.h:30
RPCPointProducer::cscSegments
edm::EDGetTokenT< CSCSegmentCollection > cscSegments
Definition: RPCPointProducer.h:29
RPCPointProducer::inclcsc
const bool inclcsc
Definition: RPCPointProducer.h:38
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
RPCPointProducer::debug
const bool debug
Definition: RPCPointProducer.h:40
RPCPointProducer::incldt
const bool incldt
Definition: RPCPointProducer.h:37
RPCPointProducer::MinCosAng
const double MinCosAng
Definition: RPCPointProducer.h:41
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
RPCPointProducer::cscSegtoRPC
std::unique_ptr< CSCSegtoRPC > cscSegtoRPC
Definition: RPCPointProducer.h:34
edm::InputTag
Definition: InputTag.h:15