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 {
43  produces<RPCRecHitCollection>("RPCDTExtrapolatedPoints");
44  produces<RPCRecHitCollection>("RPCCSCExtrapolatedPoints");
45  produces<RPCRecHitCollection>("RPCTrackExtrapolatedPoints");
46 }
47 
49  if(incldt){
51  iEvent.getByToken(dt4DSegments, all4DSegments);
52  if(all4DSegments.isValid()){
53  DTSegtoRPC DTClass(all4DSegments.product(), iSetup, debug, ExtrapolatedRegion);
54  iEvent.put(std::move(DTClass.thePoints()), "RPCDTExtrapolatedPoints");
55  }else{
56  if(debug) 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) std::cout<<"RPCHLT Invalid CSCSegments collection"<<std::endl;
68  }
69  }
70  if(incltrack){
72  iEvent.getByToken(tracks,alltracks);
73  if(!(alltracks->empty())){
75  iEvent.put(std::move(TrackClass.thePoints()), "RPCTrackExtrapolatedPoints");
76  }else{
77  if(debug) std::cout<<"RPCHLT Invalid Tracks collection"<<std::endl;
78  }
79  }
80 
81 }
const double ExtrapolatedRegion
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:125
const bool incltrack
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:15
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
const edm::ParameterSet trackTransformerParam
const edm::EDGetTokenT< reco::TrackCollection > tracks
int iEvent
Definition: GenABIO.cc:224
bool isValid() const
Definition: HandleBase.h:74
const edm::InputTag tracks_
#define debug
Definition: HDRShower.cc:19
T const * product() const
Definition: Handle.h:74
RPCPointProducer(const edm::ParameterSet &)
const edm::EDGetTokenT< CSCSegmentCollection > cscSegments
fixed size matrix
HLT enums.
const std::vector< reco::CandidatePtr > & tracks_
const edm::EDGetTokenT< DTRecSegment4DCollection > dt4DSegments
def move(src, dest)
Definition: eostools.py:511