86 std::vector<ConvertedHit> ConvHits;
87 for(std::vector<TriggerPrimitive>::iterator C1 = TriggPrim.begin();C1 != TriggPrim.end();C1++){
98 if(station == 1 &&
ring == 1 && strip > 127){
119 bool IsNeighbor =
neighbor(
endcap,sector,SectIndex,Id,sub,station);
122 if(
ring == 4){Id += 9;}
125 if( (SectIndex == (
endcap - 1)*6 + sector - 1 ) || IsNeighbor )
138 int ph_tmp = -999, th_tmp = -999;
139 int clctpatcor = -999, clctpatsign = -999;
140 int eightstrip = -999;
142 int factor = (station == 1 &&
ring == 4) ? 1707:
143 (station == 1 &&
ring == 3) ? 947:
144 (station == 1 &&
ring == 1) ? 1301:
149 bool ph_reverse = (
endcap == 1 && station >= 3) ? 1:
150 (
endcap == 2 && station < 3) ? 1: 0;
152 int ph_coverage = (station <= 1 && Id > 6 && Id < 10) ? 15 :
153 (station >= 2 && Id <= 3) ? 40 : 20;
155 int th_coverage = (station == 1 && Id <= 3) ? 45 :
156 (station == 1 && Id > 6 && Id < 10) ? 27 :
157 (station == 1 && Id > 3) ? 39 :
158 (station == 2 && Id <= 3) ? 43 :
159 (station == 2 && Id > 3) ? 56 :
160 (station == 3 && Id <= 3) ? 34 :
161 (station == 3 && Id > 3) ? 52 :
162 (station == 4 && Id <= 3) ? 28 :
163 (station == 4 && Id > 3) ? 50 : 0;
165 int ph_zone_bnd1 = (station <= 1 && (Id <= 3 || Id > 9)) ? 41 :
166 (station == 2 && Id <= 3) ? 41 :
167 (station == 2 && Id > 3) ? 87 :
168 (station == 3 && Id > 3) ? 49 :
169 (station == 4 && Id > 3) ? 49 : 127;
171 int ph_zone_bnd2 = (station == 3 && Id > 3) ? 87 : 127;
173 int zone_overlap = 2;
175 int fph = -999, th = -999, ph_hit = -999, phzvl = -999;
212 case 1: LUTi = nId - 1;
break;
213 case 2: LUTi = 15 + nId;
break;
217 case 2: LUTi = 27 + nId;
break;
218 case 3: LUTi = 38 + nId;
break;
219 case 4: LUTi = 49 + nId;
break;
223 if(IsNeighbor && station == 1){
227 case 1: LUTi = 15 + nId;
break;
228 case 2: LUTi = nId - 1;
break;
243 if(pattern > 0 && pattern < 11){
245 clctpatsign = ((pattern%2) == 0);
247 if(pattern >= 2) {clctpatcor = 5;}
248 if(pattern >= 6) {clctpatcor = 2;}
249 if(pattern == 10) {clctpatcor = 0;clctpatsign = 0;}
258 eightstrip = 8*strip;
259 int patcor = clctpatcor;
263 if(station == 1 || Id > 3){
265 eightstrip = (eightstrip>>1);
266 patcor = (patcor>>1);
267 if(
ring == 4 && strip > 127) eightstrip -= 512;
272 if(clctpatsign) patcor = -patcor;
273 eightstrip += patcor;
279 ph_tmp = ((eightstrip*factor)>>10);
280 int phShift = (ph_tmp>>5);
290 int phInitIndex = Id;
295 int neighborId = C3.
Id()/3;
300 phInitIndex = 12 + neighborId;
312 int neighborId = Id/3;
317 phInitIndex = 9 + neighborId;
337 int neighborId = C3.
Id()/3;
342 idl = 12 + neighborId;
356 int neighborId = Id/3;
361 idl = 9 + neighborId;
372 if(station == 1 && (
ring == 1 ||
ring == 4) ){
374 index = (wire>>4)*32 + (eightstrip>>4);
384 if(IsNeighbor &&
ring == 4){
401 if(ph_reverse) th_corr = -th_corr;
413 if(th_tmp < th_coverage){
417 th = th_tmp + Th_Init_Neighbor_[SectIndex][LUTi];
432 if(th <= (ph_zone_bnd1 + zone_overlap))
435 if(th > (ph_zone_bnd2 - zone_overlap))
438 if((th > (ph_zone_bnd1 - zone_overlap)) && (th <= (ph_zone_bnd2 + zone_overlap)))
452 int zhit = -99, pz = -99;
453 std::vector<int> zonecontribution;
464 if((phzvl & 1) && (Id < 4 || Id > 9)){pz=0;zonecontribution.push_back(0);}
465 if((phzvl & 2) && (Id < 4)){pz=1;zonecontribution.push_back(1);}
466 if((phzvl & 1) && (Id > 3) && (station > 2)){pz=0;zonecontribution.push_back(1);}
467 if((phzvl & 1) && (Id > 3) && (Id < 7) && (station == 1)){pz=0;zonecontribution.push_back(2);}
468 if((phzvl & 1) && (Id > 3) && (station == 2)){pz=0;zonecontribution.push_back(2);}
469 if((phzvl & 2) && (Id > 3) && (station > 2)){pz=1;zonecontribution.push_back(2);}
470 if((phzvl & 1) && (Id > 4) && (station < 2)){pz=0;zonecontribution.push_back(3);}
471 if(phzvl & 4){pz=2;zonecontribution.push_back(3);}
472 if((phzvl & 2) && (Id > 3) && (station < 3)){pz=1;zonecontribution.push_back(3);}
519 Hit.
SetValues(fph,th,ph_hit,phzvl,station,sub,Id,
quality,pattern,wire,strip,
BX);
526 if(Hit.
Theta() != -999 && Hit.
Phi() > 0){
527 ConvHits.push_back(Hit);
unsigned int Th_Init_Neighbor_[12][61]
bool neighbor(int endcap, int sector, int SectIndex, int id, int sub, int station)
void SetZoneContribution(std::vector< int > zonecontribution)
void SetNeighbor(int neighbor)
int Th_LUT_St234_Neighbor_[3][12][11][112]
const CSCData getCSCData() const
const int getPattern() const
SeedingHitSet::ConstRecHitPointer Hit
int Th_Corr_Neighbor_[2][12][4][96]
int Th_LUT_St1_Neighbor_[2][12][16][64]
int triggerSector() const
unsigned int Ph_Disp_Neighbor_[12][61]
void SetValues(int phi, int theta, int ph_hit, int phzvl, int station, int sub, int id, int quality, int pattern, int wire, int strip, int BX)
int Ph_Init_Neighbor_[12][5][16]
void SetTP(TriggerPrimitive tp)
int ph_offsets_neighbor[5][10][3]
void SetSectorIndex(int sectorIndex)