64 std::vector<csc::L1Track> trks;
69 for(Citer = lcts->begin(); Citer != lcts->end(); Citer++)
74 for(; Diter != Dend; Diter++)
95 int spReturnValue =
my_SPs[
e-1][
s-1]->
run(current_e_s);
96 if(spReturnValue == -1)
102 else if(spReturnValue)
105 trks.insert(trks.end(), theTracks.begin(), theTracks.end());
112 trkcoll->resize(trks.size());
113 std::vector<csc::L1Track>::const_iterator titr = trks.begin();
114 L1CSCTrackCollection::iterator tcitr = trkcoll->begin();
116 for(; titr != trks.end(); titr++)
118 tcitr->first = (*titr);
119 std::vector<csctf::TrackStub> possible_stubs =
my_SPs[titr->endcap()-1][titr->sector()-1]->
filteredStubs();
120 std::vector<csctf::TrackStub>::const_iterator tkstbs = possible_stubs.begin();
122 int me1ID = titr->me1ID();
123 int me2ID = titr->me2ID();
124 int me3ID = titr->me3ID();
125 int me4ID = titr->me4ID();
126 int mb1ID = titr->mb1ID();
127 int me1delay = titr->me1Tbin();
128 int me2delay = titr->me2Tbin();
129 int me3delay = titr->me3Tbin();
130 int me4delay = titr->me4Tbin();
131 int mb1delay = titr->mb1Tbin();
135 std::map< int, std::list<int> > timeline;
136 if( me1ID ) timeline[me1delay].push_back(1);
137 if( me2ID ) timeline[me2delay].push_back(2);
138 if( me3ID ) timeline[me3delay].push_back(3);
139 if( me4ID ) timeline[me4delay].push_back(4);
140 int earliest_tbin=0, second_earliest_tbin=0;
141 for(
int bx=7; bx>=0; bx--){
142 std::list<int>::const_iterator iter = timeline[bx].begin();
143 while( iter != timeline[bx].
end() ){
144 if( earliest_tbin==0 ) earliest_tbin=bx;
145 else if( second_earliest_tbin==0 ) second_earliest_tbin=bx;
152 int me1Tbin = titr->bx() - me1delay + second_earliest_tbin +
shift;
153 int me2Tbin = titr->bx() - me2delay + second_earliest_tbin +
shift;
154 int me3Tbin = titr->bx() - me3delay + second_earliest_tbin +
shift;
155 int me4Tbin = titr->bx() - me4delay + second_earliest_tbin +
shift;
156 int mb1Tbin = titr->bx() - mb1delay + second_earliest_tbin +
shift;
158 for(; tkstbs != possible_stubs.end(); tkstbs++)
160 switch(tkstbs->station())
163 if((tkstbs->getMPCLink()
166 tcitr->second.insertDigi(
CSCDetId(tkstbs->getDetId().rawId()), *(tkstbs->getDigi()));
170 if(tkstbs->getMPCLink() == me2ID && me2ID != 0 && me2Tbin == tkstbs->BX() )
172 tcitr->second.insertDigi(
CSCDetId(tkstbs->getDetId().rawId()), *(tkstbs->getDigi()));
176 if(tkstbs->getMPCLink() == me3ID && me3ID != 0 && me3Tbin == tkstbs->BX() )
178 tcitr->second.insertDigi(
CSCDetId(tkstbs->getDetId().rawId()), *(tkstbs->getDigi()));
182 if(tkstbs->getMPCLink() == me4ID && me4ID != 0 && me4Tbin == tkstbs->BX() )
184 tcitr->second.insertDigi(
CSCDetId(tkstbs->getDetId().rawId()), *(tkstbs->getDigi()));
188 if(tkstbs->getMPCLink() == mb1ID && mb1ID != 0 && mb1Tbin == tkstbs->BX() )
194 edm::LogWarning(
"CSCTFTrackBuilder::buildTracks()") <<
"SERIOUS ERROR: STATION " << tkstbs->station() <<
" NOT IN RANGE [1,5]\n";
std::vector< csctf::TrackStub > filteredStubs() const
const std::vector< Double_t > ptScale
T getParameter(std::string const &) const
std::vector< T > get() const
CSCTFTrackBuilder(const edm::ParameterSet &pset, bool TMB07, const L1MuTriggerScales *scales, const L1MuTriggerPtScale *ptScale)
static int maxTriggerSectorId()
void initialize(const edm::EventSetup &c)
KK.
void initialize(const edm::EventSetup &c)
std::vector< L1CSCTrack > L1CSCTrackCollection
static int minTriggerSectorId()
void push_back(const T &data)
int run(const CSCTriggerContainer< csctf::TrackStub > &)
void push_many(const std::vector< T > &data)
void buildTracks(const CSCCorrelatedLCTDigiCollection *, const CSCTriggerContainer< csctf::TrackStub > *, L1CSCTrackCollection *, CSCTriggerContainer< csctf::TrackStub > *)
std::vector< CSCCorrelatedLCTDigi >::const_iterator const_iterator
static int triggerSubSectorFromLabels(int station, int chamber)
CSCTriggerContainer< csc::L1Track > tracks() const
static unsigned int const shift
CSCTFSectorProcessor * my_SPs[nEndcaps][nSectors]