37 : globalTrackingGeometry_(GlobalTrackingGeometry) {
65 std::vector<int> positionDT;
66 std::vector<int> positionCSC;
67 std::vector<TrackingRecHit*> my4DTrack;
81 int NumberOfDTSegment = 0;
83 for (segmentDT = DTSegments->begin(); segmentDT != DTSegments->end(); ++segmentDT) {
85 bool isNewChamber =
true;
88 for (std::vector<int>::iterator positionIt = positionDT.begin(); positionIt != positionDT.end(); positionIt++) {
90 if (NumberOfDTSegment == *positionIt)
99 for (std::vector<int>::iterator positionIt = (*collect).begin(); positionIt != (*collect).end();
102 if (NumberOfDTSegment == *positionIt)
103 isNewChamber =
false;
109 DTChamberId myChamber((*segmentDT).geographicalId().rawId());
111 if (myLayer.wheel() == myChamber.wheel() && myLayer.station() == myChamber.station() &&
112 myLayer.sector() == myChamber.sector()) {
114 positionDT.push_back(NumberOfDTSegment);
116 SelectedSegments.push_back(
129 int NumberOfCSCSegment = 0;
131 for (segmentCSC = CSCSegments->begin(); segmentCSC != CSCSegments->end(); segmentCSC++) {
133 bool isNewChamber =
true;
135 for (std::vector<int>::iterator positionIt = positionCSC.begin(); positionIt != positionCSC.end();
138 if (NumberOfCSCSegment == *positionIt)
139 isNewChamber =
false;
146 for (std::vector<int>::iterator positionIt = (*collect).begin(); positionIt != (*collect).end();
149 if (NumberOfCSCSegment == *positionIt)
150 isNewChamber =
false;
155 CSCDetId myChamber((*segmentCSC).geographicalId().rawId());
157 if (myLayer.chamberId() == myChamber.chamberId()) {
159 positionCSC.push_back(NumberOfCSCSegment);
161 SelectedSegments.push_back(
165 NumberOfCSCSegment++;
173 if (TrackRefitterType ==
"CosmicLike") {
174 std::reverse(SelectedSegments.begin(), SelectedSegments.end());
177 return SelectedSegments;
edm::InputTag theCSCSegmentLabel
virtual ~SegmentToTrackAssociator()
size_t recHitsSize() const
Get number of RecHits. (Warning, this includes invalid hits, which are not physical hits)...
edm::InputTag theDTSegmentLabel
constexpr uint32_t rawId() const
get the raw id
const GeomDet * idToDet(DetId) const override
intDVector indexCollectionCSC
C::const_iterator const_iterator
constant access iterator type
intDVector indexCollectionDT
T const * get() const
Returns C++ pointer to the item.
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
MuonTransientTrackingRecHit::MuonRecHitContainer associate(const edm::Event &, const edm::EventSetup &, const reco::Track &, std::string)
T getParameter(std::string const &) const
const GlobalTrackingGeometry * globalTrackingGeometry_
static std::atomic< unsigned int > counter
TrackingRecHitRef recHit(size_t i) const
Get i-th hit on the track.
DetId geographicalId() const
SegmentToTrackAssociator(const edm::ParameterSet &, const GlobalTrackingGeometry *GlobalTrackingGeometry)
virtual SubDetector subDetector() const
Which subdetector.
static MuonRecHitPointer specificBuild(const GeomDet *geom, const TrackingRecHit *rh)
std::vector< MuonRecHitPointer > MuonRecHitContainer