76 std::vector<int> positionDT;
77 std::vector<int> positionCSC;
78 std::vector<TrackingRecHit *> my4DTrack;
96 int NumberOfDTSegment = 0;
98 for( segmentDT = DTSegments->begin(); segmentDT != DTSegments->end(); ++segmentDT ) {
101 bool isNewChamber =
true;
104 for( std::vector<int>::iterator positionIt = positionDT.begin();
105 positionIt != positionDT.end(); positionIt++ )
108 if(NumberOfDTSegment == *positionIt) isNewChamber =
false;
112 for( std::vector<std::vector<int> >::iterator collect =
indexCollectionDT.begin();
116 for( std::vector<int>::iterator positionIt = (*collect).begin();
117 positionIt != (*collect).end(); positionIt++ )
120 if( NumberOfDTSegment == *positionIt ) isNewChamber =
false;
127 DTChamberId myChamber( (*segmentDT).geographicalId().rawId() );
129 if( myLayer.wheel() == myChamber.wheel() &&
130 myLayer.station() == myChamber.station() &&
131 myLayer.sector() == myChamber.sector() )
134 positionDT.push_back( NumberOfDTSegment );
135 const GeomDet* DTgeomDet = theTrackingGeometry->
idToDet( myChamber );
152 int NumberOfCSCSegment = 0;
154 for( segmentCSC = CSCSegments->begin(); segmentCSC != CSCSegments->end(); segmentCSC++ )
158 bool isNewChamber =
true;
160 for( std::vector<int>::iterator positionIt = positionCSC.begin();
161 positionIt != positionCSC.end(); positionIt++ )
164 if( NumberOfCSCSegment == *positionIt ) isNewChamber =
false;
171 for( std::vector<int>::iterator positionIt = (*collect).begin();
172 positionIt != (*collect).end(); positionIt++ )
175 if( NumberOfCSCSegment == *positionIt ) isNewChamber =
false;
181 CSCDetId myChamber( (*segmentCSC).geographicalId().rawId() );
183 if( myLayer.chamberId() == myChamber.chamberId() )
186 positionCSC.push_back( NumberOfCSCSegment );
187 const GeomDet* CSCgeomDet = theTrackingGeometry->
idToDet( myChamber );
191 NumberOfCSCSegment++;
200 if ( TrackRefitterType ==
"CosmicLike" )
202 std::reverse(SelectedSegments.begin(),SelectedSegments.end());
205 return SelectedSegments;
T getParameter(std::string const &) const
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
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)
TrackingRecHitRef recHit(size_t i) const
Get i-th hit on the track.
const GeomDet * idToDet(DetId) const override
DetId geographicalId() const
virtual SubDetector subDetector() const
Which subdetector.
static MuonRecHitPointer specificBuild(const GeomDet *geom, const TrackingRecHit *rh)
std::vector< MuonRecHitPointer > MuonRecHitContainer
SegmentToTrackAssociator(const edm::ParameterSet &)