Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-04-29 23:11:00

0001 /**
0002  *  Class: ChamberSegmentUtility
0003  *
0004  *  Description:
0005  *  utility class for the dynamical truncation algorithm
0006  *
0007  *
0008  *  Authors :
0009  *  D. Pagano & G. Bruno - UCL Louvain
0010  *
0011  **/
0012 
0013 #include "RecoMuon/GlobalTrackingTools/interface/ChamberSegmentUtility.h"
0014 #include "FWCore/Framework/interface/Frameworkfwd.h"
0015 #include "DataFormats/TrackReco/interface/Track.h"
0016 #include "DataFormats/TrackReco/interface/TrackFwd.h"
0017 #include "Geometry/DTGeometry/interface/DTGeometry.h"
0018 #include "DataFormats/DTRecHit/interface/DTRecSegment4DCollection.h"
0019 #include "Geometry/Records/interface/MuonGeometryRecord.h"
0020 
0021 #include <map>
0022 #include <vector>
0023 
0024 using namespace edm;
0025 using namespace std;
0026 using namespace reco;
0027 
0028 ChamberSegmentUtility::ChamberSegmentUtility() {}
0029 
0030 void ChamberSegmentUtility::initCSU(const edm::Handle<DTRecSegment4DCollection>& DTSegProd,
0031                                     const edm::Handle<CSCSegmentCollection>& CSCSegProd) {
0032   all4DSegments = DTSegProd;
0033   CSCSegments = CSCSegProd;
0034 }
0035 
0036 vector<CSCSegment> ChamberSegmentUtility::getCSCSegmentsInChamber(CSCDetId sel) {
0037   cscseg.clear();
0038   CSCSegmentCollection::range range = CSCSegments->get(sel);
0039   for (CSCSegmentCollection::const_iterator segment = range.first; segment != range.second; ++segment) {
0040     cscseg.push_back(*segment);
0041   }
0042   return cscseg;
0043 }
0044 
0045 vector<DTRecSegment4D> ChamberSegmentUtility::getDTSegmentsInChamber(DTChamberId sel) {
0046   dtseg.clear();
0047   DTRecSegment4DCollection::range range = all4DSegments->get(sel);
0048   for (DTRecSegment4DCollection::const_iterator segment = range.first; segment != range.second; ++segment) {
0049     dtseg.push_back(*segment);
0050   }
0051   return dtseg;
0052 }