CMS 3D CMS Logo

RPCPointProducer.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: RPCPointProducer
4 // Class: RPCPointProducer
5 //
13 //
14 // Original Author: Camilo Andres Carrillo Montoya
15 // Created: Wed Sep 16 14:56:18 CEST 2009
16 //
17 //
18 
20 
21 // system include files
22 
23 #include <memory>
24 #include <ctime>
25 
26 // user include files
27 
29  : cscSegments(consumes<CSCSegmentCollection>(iConfig.getParameter<edm::InputTag>("cscSegments"))),
30  dt4DSegments(consumes<DTRecSegment4DCollection>(iConfig.getParameter<edm::InputTag>("dt4DSegments"))),
31  tracks(consumes<reco::TrackCollection>(iConfig.getParameter<edm::InputTag>("tracks"))),
32  tracks_(iConfig.getParameter<edm::InputTag>("tracks")),
33  incldt(iConfig.getUntrackedParameter<bool>("incldt", true)),
34  inclcsc(iConfig.getUntrackedParameter<bool>("inclcsc", true)),
35  incltrack(iConfig.getUntrackedParameter<bool>("incltrack", true)),
36  debug(iConfig.getUntrackedParameter<bool>("debug", false)),
37  MinCosAng(iConfig.getUntrackedParameter<double>("MinCosAng", 0.95)),
38  MaxD(iConfig.getUntrackedParameter<double>("MaxD", 80.)),
39  MaxDrb4(iConfig.getUntrackedParameter<double>("MaxDrb4", 150.)),
40  ExtrapolatedRegion(iConfig.getUntrackedParameter<double>("ExtrapolatedRegion", 0.5)),
41  trackTransformerParam(iConfig.getParameter<edm::ParameterSet>("TrackTransformer")) {
42  produces<RPCRecHitCollection>("RPCDTExtrapolatedPoints");
43  produces<RPCRecHitCollection>("RPCCSCExtrapolatedPoints");
44  produces<RPCRecHitCollection>("RPCTrackExtrapolatedPoints");
45 }
46 
48  if (incldt) {
50  iEvent.getByToken(dt4DSegments, all4DSegments);
51  if (all4DSegments.isValid()) {
52  DTSegtoRPC DTClass(all4DSegments.product(), iSetup, debug, ExtrapolatedRegion);
53  iEvent.put(std::move(DTClass.thePoints()), "RPCDTExtrapolatedPoints");
54  } else {
55  if (debug)
56  std::cout << "RPCHLT Invalid DTSegments collection" << std::endl;
57  }
58  }
59 
60  if (inclcsc) {
61  edm::Handle<CSCSegmentCollection> allCSCSegments;
62  iEvent.getByToken(cscSegments, allCSCSegments);
63  if (allCSCSegments.isValid()) {
64  CSCSegtoRPC CSCClass(allCSCSegments.product(), iSetup, debug, ExtrapolatedRegion);
65  iEvent.put(std::move(CSCClass.thePoints()), "RPCCSCExtrapolatedPoints");
66  } else {
67  if (debug)
68  std::cout << "RPCHLT Invalid CSCSegments collection" << std::endl;
69  }
70  }
71  if (incltrack) {
73  iEvent.getByToken(tracks, alltracks);
74  if (!(alltracks->empty())) {
76  iEvent.put(std::move(TrackClass.thePoints()), "RPCTrackExtrapolatedPoints");
77  } else {
78  if (debug)
79  std::cout << "RPCHLT Invalid Tracks collection" << std::endl;
80  }
81  }
82 }
rpcPointProducer_cfi.ExtrapolatedRegion
ExtrapolatedRegion
Definition: rpcPointProducer_cfi.py:15
edm::StreamID
Definition: StreamID.h:30
PDWG_EXOHSCP_cff.tracks
tracks
Definition: PDWG_EXOHSCP_cff.py:28
RPCResidualsHLT_cfi.inclcsc
inclcsc
Definition: RPCResidualsHLT_cfi.py:8
electrons_cff.bool
bool
Definition: electrons_cff.py:372
RPCPointProducer::tracks_
const edm::InputTag tracks_
Definition: RPCPointProducer.h:32
funct::false
false
Definition: Factorize.h:34
edm::Handle::product
T const * product() const
Definition: Handle.h:70
edm
HLT enums.
Definition: AlignableModifier.h:19
gather_cfg.cout
cout
Definition: gather_cfg.py:144
RPCPointProducer::RPCPointProducer
RPCPointProducer(const edm::ParameterSet &)
Definition: RPCPointProducer.cc:28
RPCPointProducer::cscSegments
const edm::EDGetTokenT< CSCSegmentCollection > cscSegments
Definition: RPCPointProducer.h:29
dtChamberEfficiency_cfi.cscSegments
cscSegments
Definition: dtChamberEfficiency_cfi.py:15
CSCSegmentCollection
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
edm::Handle< DTRecSegment4DCollection >
rpcPointProducer_cfi.incltrack
incltrack
Definition: rpcPointProducer_cfi.py:6
debug
#define debug
Definition: HDRShower.cc:19
RPCResidualsHLT_cfi.MaxD
MaxD
Definition: RPCResidualsHLT_cfi.py:18
DTSegtoRPC
Definition: DTSegtoRPC.h:13
RPCPointProducer::dt4DSegments
const edm::EDGetTokenT< DTRecSegment4DCollection > dt4DSegments
Definition: RPCPointProducer.h:30
DTRecSegment4DCollection
TracktoRPC
Definition: TracktoRPC.h:58
funct::true
true
Definition: Factorize.h:173
TrackClass
TrackClass
Definition: L1MuBMTrackAssParam.h:21
HLT_2018_cff.InputTag
InputTag
Definition: HLT_2018_cff.py:79016
edm::ParameterSet
Definition: ParameterSet.h:36
RPCPointProducer::incltrack
const bool incltrack
Definition: RPCPointProducer.h:36
RPCPointProducer.h
ParameterSet
Definition: Functions.h:16
iEvent
int iEvent
Definition: GenABIO.cc:224
RPCPointProducer::ExtrapolatedRegion
const double ExtrapolatedRegion
Definition: RPCPointProducer.h:41
edm::EventSetup
Definition: EventSetup.h:57
dtChamberEfficiency_cfi.dt4DSegments
dt4DSegments
Definition: dtChamberEfficiency_cfi.py:13
eostools.move
def move(src, dest)
Definition: eostools.py:511
RPCPointProducer::tracks
const edm::EDGetTokenT< reco::TrackCollection > tracks
Definition: RPCPointProducer.h:31
RPCPointProducer::inclcsc
const bool inclcsc
Definition: RPCPointProducer.h:35
RPCResidualsHLT_cfi.MaxDrb4
MaxDrb4
Definition: RPCResidualsHLT_cfi.py:19
RPCPointProducer::debug
const bool debug
Definition: RPCPointProducer.h:37
RPCPointProducer::incldt
const bool incldt
Definition: RPCPointProducer.h:34
CSCSegtoRPC
Definition: CSCSegtoRPC.h:13
RPCPointProducer::produce
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
Definition: RPCPointProducer.cc:47
RPCPointProducer::trackTransformerParam
const edm::ParameterSet trackTransformerParam
Definition: RPCPointProducer.h:42
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
edm::Event
Definition: Event.h:73
RPCResidualsHLT_cfi.incldt
incldt
Definition: RPCResidualsHLT_cfi.py:6
reco::TrackCollection
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
RPCResidualsHLT_cfi.MinCosAng
MinCosAng
Definition: RPCResidualsHLT_cfi.py:17