test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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(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(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(TrackClass.thePoints(), "RPCTrackExtrapolatedPoints");
76  }else{
77  if(debug) std::cout<<"RPCHLT Invalid Tracks collection"<<std::endl;
78  }
79  }
80 
81 }
const double ExtrapolatedRegion
const bool incltrack
const std::vector< reco::PFCandidatePtr > & tracks_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:462
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
virtual 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:230
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:121
bool isValid() const
Definition: HandleBase.h:75
const edm::InputTag tracks_
#define debug
Definition: HDRShower.cc:19
T const * product() const
Definition: Handle.h:81
tuple tracks
Definition: testEve_cfg.py:39
RPCPointProducer(const edm::ParameterSet &)
const edm::EDGetTokenT< CSCSegmentCollection > cscSegments
const edm::EDGetTokenT< DTRecSegment4DCollection > dt4DSegments
tuple cout
Definition: gather_cfg.py:145
volatile std::atomic< bool > shutdown_flag false