CMS 3D CMS Logo

GEMCSCSegmentProducer.cc
Go to the documentation of this file.
1 
7 
11 
13 
17 
21 
23  csc_token = consumes<CSCSegmentCollection>(pas.getParameter<edm::InputTag>("inputObjectsCSC"));
24  gem_token = consumes<GEMRecHitCollection>(pas.getParameter<edm::InputTag>("inputObjectsGEM"));
25  segmentBuilder_ = new GEMCSCSegmentBuilder(pas); // pass on the parameterset
26 
27  // register what this produces
28  produces<GEMCSCSegmentCollection>();
29 }
30 
32  LogDebug("GEMCSCSegment") << "deleting GEMCSCSegmentBuilder after " << iev << " events w/ gem and csc data.";
33  delete segmentBuilder_;
34 }
35 
37  LogDebug("GEMCSCSegment") << "start producing segments for " << ++iev << "th event w/ gem and csc data";
38 
39  // find the geometry (& conditions?) for this event & cache it in the builder
41  setup.get<MuonGeometryRecord>().get(cscg);
42  const CSCGeometry* cgeom = &*cscg;
43 
45  setup.get<MuonGeometryRecord>().get(gemg);
46  const GEMGeometry* ggeom = &*gemg;
47 
48  // cache the geometry in the builder
49  segmentBuilder_->setGeometry(ggeom, cgeom);
50 
51  // fill the map with matches between GEM and CSC chambers
53 
54  // get the collection of CSCSegment and GEMRecHits
56  ev.getByToken(csc_token, cscSegment);
58  ev.getByToken(gem_token, gemRecHits);
59 
60  // create empty collection of GEMCSC Segments
61  auto oc = std::make_unique<GEMCSCSegmentCollection>();
62 
63  // pass the empty collection of GEMCSC Segments and fill it
64  segmentBuilder_->build(gemRecHits.product(), cscSegment.product(), *oc); //@@ FILL oc
65 
66  // put the filled collection in event
67  ev.put(std::move(oc));
68 }
GEMCSCSegmentProducer::iev
int iev
Definition: GEMCSCSegmentProducer.h:33
iev
const HitContainer *__restrict__ const TkSoA *__restrict__ const Quality *__restrict__ const CAHitNtupletGeneratorKernelsGPU::HitToTuple *__restrict__ uint32_t int iev
Definition: CAHitNtupletGeneratorKernelsImpl.h:544
CSCRecHit2DCollection.h
Handle.h
MessageLogger.h
ESHandle.h
GEMCSCSegmentBuilder::LinkGEMRollsToCSCChamberIndex
void LinkGEMRollsToCSCChamberIndex(const GEMGeometry *gemgeom, const CSCGeometry *cscgeom)
Definition: GEMCSCSegmentBuilder.cc:45
GEMCSCSegmentProducer::gem_token
edm::EDGetTokenT< GEMRecHitCollection > gem_token
Definition: GEMCSCSegmentProducer.h:36
edm::Handle< CSCSegmentCollection >
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
CSCGeometry
Definition: CSCGeometry.h:24
GEMCSCSegmentBuilder.h
cscRecHitPSet.cscSegment
cscSegment
Definition: cscRecHitPSet.py:10
GEMCSCSegmentProducer::produce
void produce(edm::Event &, const edm::EventSetup &) override
Produce the GEM-CSCSegment collection.
Definition: GEMCSCSegmentProducer.cc:36
edm::ESHandle< CSCGeometry >
GEMCSCSegmentBuilder::build
void build(const GEMRecHitCollection *rechits, const CSCSegmentCollection *cscsegments, GEMCSCSegmentCollection &oc)
Definition: GEMCSCSegmentBuilder.cc:92
GEMCSCSegmentProducer::segmentBuilder_
GEMCSCSegmentBuilder * segmentBuilder_
Definition: GEMCSCSegmentProducer.h:34
GEMCSCSegmentProducer::~GEMCSCSegmentProducer
~GEMCSCSegmentProducer() override
Destructor.
Definition: GEMCSCSegmentProducer.cc:31
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:233
edm::ParameterSet
Definition: ParameterSet.h:47
GEMCSCSegmentProducer.h
GEMCSCSegmentProducer::csc_token
edm::EDGetTokenT< CSCSegmentCollection > csc_token
Definition: GEMCSCSegmentProducer.h:35
GEMRecHitCollection.h
edm::EventSetup
Definition: EventSetup.h:58
get
#define get
eostools.move
def move(src, dest)
Definition: eostools.py:511
GEMCSCSegmentCollection.h
ev
bool ev
Definition: Hydjet2Hadronizer.cc:95
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
GEMCSCSegmentProducer::GEMCSCSegmentProducer
GEMCSCSegmentProducer(const edm::ParameterSet &)
Constructor.
Definition: GEMCSCSegmentProducer.cc:22
CSCSegment.h
GEMCSCSegment.h
GEMGeometry
Definition: GEMGeometry.h:24
gemRecHits_cfi.gemRecHits
gemRecHits
Definition: gemRecHits_cfi.py:7
GEMCSCSegmentBuilder
Definition: GEMCSCSegmentBuilder.h:69
MuonGeometryRecord.h
edm::Event
Definition: Event.h:73
MuonGeometryRecord
Definition: MuonGeometryRecord.h:34
GEMCSCSegmentBuilder::setGeometry
void setGeometry(const GEMGeometry *gemgeom, const CSCGeometry *cscgeom)
Definition: GEMCSCSegmentBuilder.cc:363
edm::InputTag
Definition: InputTag.h:15
CSCSegmentCollection.h