Constructor.
54 for (vector<DTRecHit1D>::const_iterator
hit=hits.begin();
hit!=hits.end();
58 InfoLayer* layInfo =
new InfoLayer((*
hit), isl, dir, pos, sync);
59 int ilay = layInfo->idWire.layer();
73 for(vector<InfoLayer*>::const_iterator ilay =
theInfoLayers.begin();
89 layersIn += (*ilay)->idWire.layer();
103 if(layersIn <= 8 || layersIn == 10) {
107 if(layersIn <= 7 || layersIn >= 9) {
111 if(layersIn == 6 || layersIn >= 8) {
124 float halfCell = 2.1;
126 unsigned t0Factor = 99;
131 cout <<
"t1, t2, t3, t4: " << t1 <<
" " << t2 <<
" " << t3 <<
" " << t4 << endl;
132 cout <<
"x1, x2, x3, x4: " << x1 <<
" " << x2 <<
" " << x3 <<
" " << x4 << endl;
136 unsigned hSubGroup = 99;
137 if(t1 == 0. || t2 == 0. || t3 == 0. || t4 == 0.)
139 else if(t1<=5. || t2<=5. || t3<=5. || t4<=5.)
141 else if(t1<=10. || t2<=10. || t3<=10. || t4<=10.)
143 else if(t1<=20. || t2<=20. || t3<=20. || t4<=20.)
145 else if(t1<=50. || t2<=50. || t3<=50. || t4<=50.)
148 if((layersIn == 6 || layersIn == 10) && (fabs(x1-x3)<delta)) {
152 if(type ==
"LRL" || type ==
"RLR") {
157 else if((type ==
"LLR" &&
theSegDir == R) ||
163 else if((type ==
"LRR" &&
theSegDir == R) ||
174 theTMaxes[cGroup] =
new TMax(t,cGroup,type,sigma,t0Factor,hSubGroup);
175 if(
debug)
cout <<
"tmax123 " << t <<
" " << type << endl;
177 if(layersIn == 7 || layersIn == 10) {
182 if((
theSegType ==
"LRLR" && type ==
"LRR" && x1 > x4) ||
183 (
theSegType ==
"RLRL" && type ==
"RLL" && x1 < x4)) {
188 else if((type ==
"LLR" &&
theSegDir == R && (fabs(x2-x4)<delta) && x1 < x2) ||
189 (type ==
"RRL" &&
theSegDir ==
L && (fabs(x2-x4)<delta) && x1 > x2)) {
194 else if((type ==
"LLL" &&
theSegDir == R && (fabs(x2-x4)<delta) && x1 < x2) ||
195 (type ==
"RRR" &&
theSegDir ==
L && (fabs(x2-x4)<delta) && x1 > x2)) {
200 else if((type ==
"LLL" &&
theSegDir ==
L && (fabs(x2-x4)<delta)) ||
201 (type ==
"RRR" &&
theSegDir == R && (fabs(x2-x4)<delta))) {
203 t = -1.5*t2+t1+t4/2.;
206 else if((type ==
"LRL" &&
theSegDir ==
L && (fabs(x2-x4)<delta)) ||
207 (type ==
"RLR" &&
theSegDir == R && (fabs(x2-x4)<delta))) {
212 else if((type ==
"LRL" &&
theSegDir == R && (fabs(x1-x4)<(halfCell+delta))) ||
213 (type ==
"RLR" &&
theSegDir ==
L && (fabs(x1-x4)<(halfCell+delta)))) {
215 t = 3./4.*t2+t1/2.+t4/4.;
219 else if((type ==
"LRR" &&
theSegDir == R && x1 < x4 && (fabs(x1-x4)<(halfCell+delta)))||
220 (type ==
"RLL" &&
theSegDir ==
L && x1 > x4 && (fabs(x1-x4)<(halfCell+delta)))) {
222 t = 3./4.*t2+t1/2.-t4/4.;
231 theTMaxes[cGroup] =
new TMax(t,cGroup,type,sigma,t0Factor,hSubGroup);
232 if(
debug)
cout <<
"tmax124 " << t <<
" " << t0Factor <<
" " << type << endl;
234 if(layersIn == 8 || layersIn == 10) {
239 if((type ==
"LLR" && x1 > x4 &&
theSegType ==
"LRLR") ||
240 (type ==
"RRL" && x1 < x4 &&
theSegType ==
"RLRL")) {
245 else if((type ==
"LLR" && x1 < x4 && (fabs(x1-x4)<(halfCell+delta))) ||
246 (type ==
"RRL" && x1 > x4 && (fabs(x1-x4)<(halfCell+delta)))) {
248 t = 3./4.*t3+t4/2.-t1/4.;
252 else if((type ==
"LRR" &&
theSegDir == R && x1 < x4 && (fabs(x1-x3)<delta)) ||
253 (type ==
"RLL" &&
theSegDir ==
L && x1 > x4 &&(fabs(x1-x3)<delta))) {
258 else if((type ==
"LRL" &&
theSegDir == R && (fabs(x1-x3)<delta)) ||
259 (type ==
"RLR" &&
theSegDir ==
L && (fabs(x1-x3)<delta))) {
264 else if((type ==
"LRL" &&
theSegDir ==
L && (fabs(x1-x3)<(2.*halfCell+delta))) ||
265 (type ==
"RLR" &&
theSegDir == R && (fabs(x1-x3)<(2.*halfCell+delta)))) {
267 t = 3./4.*t3+t4/2.+t1/4.;
271 else if((type ==
"LLL" &&
theSegDir ==
L && x1 > x4 && (fabs(x1-x3)<delta)) ||
272 (type ==
"RRR" &&
theSegDir == R && x1 < x4 && (fabs(x1-x3)<delta))) {
277 else if((type ==
"LLL" &&
theSegDir == R && (fabs(x1-x3)<delta)) ||
278 (type ==
"RRR" &&
theSegDir ==
L && (fabs(x1-x3)<delta))) {
280 t = -1.5*t3+t4+t1/2.;
288 theTMaxes[cGroup] =
new TMax(t,cGroup,type,sigma,t0Factor,hSubGroup);
289 if(
debug)
cout <<
"tmax134 " << t <<
" " << t0Factor <<
" " << type << endl;
291 if((layersIn == 9 || layersIn == 10) && (fabs(x2-x4)<delta)) {
294 ((type+=theSegType[1])+=theSegType[2])+=theSegType[3];
296 if((type ==
"LRL" ) ||
302 else if((type ==
"LRR" &&
theSegDir == R) ||
308 else if((type ==
"LLR" &&
theSegDir == R) ||
319 theTMaxes[cGroup] =
new TMax(t,cGroup,type,sigma,t0Factor,hSubGroup);
320 if(
debug)
cout <<
"tmax234 " << t <<
" " << type << endl;
DTCellSide
Which side of the DT cell.
LocalPoint toLocal(const GlobalPoint &gp) const
Conversion to the R.F. of the GeomDet.
auto const T2 &decltype(t1.eta()) t2
InfoLayer *& getInfoLayer(int layer)
std::vector< TMax * > theTMaxes
std::vector< InfoLayer * > theInfoLayers