55 std::vector<csc::L1Track>
trks;
60 for (Citer = lcts->begin(); Citer != lcts->end(); Citer++) {
64 for (; Diter != Dend; Diter++) {
81 int spReturnValue =
my_SPs[
e - 1][
s - 1]->
run(current_e_s);
82 if (spReturnValue == -1)
87 }
else if (spReturnValue) {
89 trks.insert(
trks.end(), theTracks.begin(), theTracks.end());
96 trkcoll->resize(
trks.size());
97 std::vector<csc::L1Track>::const_iterator titr =
trks.begin();
98 L1CSCTrackCollection::iterator tcitr = trkcoll->begin();
100 for (; titr !=
trks.end(); titr++) {
101 tcitr->first = (*titr);
102 std::vector<csctf::TrackStub> possible_stubs =
my_SPs[titr->endcap() - 1][titr->sector() - 1]->
filteredStubs();
103 std::vector<csctf::TrackStub>::const_iterator tkstbs = possible_stubs.begin();
105 int me1ID = titr->me1ID();
106 int me2ID = titr->me2ID();
107 int me3ID = titr->me3ID();
108 int me4ID = titr->me4ID();
109 int mb1ID = titr->mb1ID();
110 int me1delay = titr->me1Tbin();
111 int me2delay = titr->me2Tbin();
112 int me3delay = titr->me3Tbin();
113 int me4delay = titr->me4Tbin();
114 int mb1delay = titr->mb1Tbin();
118 std::map<int, std::list<int> > timeline;
120 timeline[me1delay].push_back(1);
122 timeline[me2delay].push_back(2);
124 timeline[me3delay].push_back(3);
126 timeline[me4delay].push_back(4);
127 int earliest_tbin = 0, second_earliest_tbin = 0;
128 for (
int bx = 7;
bx >= 0;
bx--) {
129 std::list<int>::const_iterator iter = timeline[
bx].begin();
130 while (iter != timeline[
bx].
end()) {
131 if (earliest_tbin == 0)
133 else if (second_earliest_tbin == 0)
134 second_earliest_tbin =
bx;
141 int me1Tbin = titr->bx() - me1delay + second_earliest_tbin +
shift;
142 int me2Tbin = titr->bx() - me2delay + second_earliest_tbin +
shift;
143 int me3Tbin = titr->bx() - me3delay + second_earliest_tbin +
shift;
144 int me4Tbin = titr->bx() - me4delay + second_earliest_tbin +
shift;
145 int mb1Tbin = titr->bx() - mb1delay + second_earliest_tbin +
shift;
147 for (; tkstbs != possible_stubs.end(); tkstbs++) {
148 switch (tkstbs->station()) {
150 if ((tkstbs->getMPCLink() +
153 me1ID != 0 && me1Tbin == tkstbs->BX()) {
154 tcitr->second.insertDigi(
CSCDetId(tkstbs->getDetId().rawId()), *(tkstbs->getDigi()));
158 if (tkstbs->getMPCLink() == me2ID && me2ID != 0 && me2Tbin == tkstbs->BX()) {
159 tcitr->second.insertDigi(
CSCDetId(tkstbs->getDetId().rawId()), *(tkstbs->getDigi()));
163 if (tkstbs->getMPCLink() == me3ID && me3ID != 0 && me3Tbin == tkstbs->BX()) {
164 tcitr->second.insertDigi(
CSCDetId(tkstbs->getDetId().rawId()), *(tkstbs->getDigi()));
168 if (tkstbs->getMPCLink() == me4ID && me4ID != 0 && me4Tbin == tkstbs->BX()) {
169 tcitr->second.insertDigi(
CSCDetId(tkstbs->getDetId().rawId()), *(tkstbs->getDigi()));
173 if (tkstbs->getMPCLink() == mb1ID && mb1ID != 0 && mb1Tbin == tkstbs->BX()) {
179 <<
"SERIOUS ERROR: STATION " << tkstbs->station() <<
" NOT IN RANGE [1,5]\n";
CSCTFTrackBuilder(const edm::ParameterSet &pset, bool TMB07, const L1MuTriggerScales *scales, const L1MuTriggerPtScale *ptScale)
static int maxTriggerSectorId()
std::vector< T > get() const
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 > *)
void initialize(const edm::EventSetup &c, const Tokens &tokens)
std::vector< csctf::TrackStub > filteredStubs() const
std::vector< DigiType >::const_iterator const_iterator
const std::vector< double > ptScale
static int triggerSubSectorFromLabels(int station, int chamber)
void initialize(const edm::EventSetup &c, const Tokens &tokens)
KK.
static unsigned int const shift
Log< level::Warning, false > LogWarning
CSCTFSectorProcessor * my_SPs[nEndcaps][nSectors]
CSCTriggerContainer< csc::L1Track > tracks() const