Constructor.
52 for (vector<DTRecHit1D>::const_iterator
hit=
hits.begin();
hit!=
hits.end();
56 InfoLayer* layInfo =
new InfoLayer((*
hit), isl, dir, pos, sync);
57 int ilay = layInfo->idWire.layer();
71 for(vector<InfoLayer*>::const_iterator ilay =
theInfoLayers.begin();
87 layersIn += (*ilay)->idWire.layer();
101 if(layersIn <= 8 || layersIn == 10) {
105 if(layersIn <= 7 || layersIn >= 9) {
109 if(layersIn == 6 || layersIn >= 8) {
122 float halfCell = 2.1;
124 unsigned t0Factor = 99;
129 cout <<
"t1, t2, t3, t4: " << t1 <<
" " << t2 <<
" " << t3 <<
" " << t4 << endl;
130 cout <<
"x1, x2, x3, x4: " << x1 <<
" " << x2 <<
" " << x3 <<
" " << x4 << endl;
134 unsigned hSubGroup = 99;
135 if(t1 == 0. || t2 == 0. || t3 == 0. || t4 == 0.)
137 else if(t1<=5. || t2<=5. || t3<=5. || t4<=5.)
139 else if(t1<=10. || t2<=10. || t3<=10. || t4<=10.)
141 else if(t1<=20. || t2<=20. || t3<=20. || t4<=20.)
143 else if(t1<=50. || t2<=50. || t3<=50. || t4<=50.)
146 if((layersIn == 6 || layersIn == 10) && (fabs(x1-x3)<delta)) {
150 if(type ==
"LRL" || type ==
"RLR") {
155 else if((type ==
"LLR" &&
theSegDir == R) ||
161 else if((type ==
"LRR" &&
theSegDir == R) ||
172 theTMaxes[cGroup] =
new TMax(t,cGroup,type,sigma,t0Factor,hSubGroup);
173 if(
debug)
cout <<
"tmax123 " << t <<
" " << type << endl;
175 if(layersIn == 7 || layersIn == 10) {
180 if((
theSegType ==
"LRLR" && type ==
"LRR" && x1 > x4) ||
181 (
theSegType ==
"RLRL" && type ==
"RLL" && x1 < x4)) {
186 else if((type ==
"LLR" &&
theSegDir == R && (fabs(x2-x4)<delta) && x1 < x2) ||
187 (type ==
"RRL" &&
theSegDir ==
L && (fabs(x2-x4)<delta) && x1 > x2)) {
192 else if((type ==
"LLL" &&
theSegDir == R && (fabs(x2-x4)<delta) && x1 < x2) ||
193 (type ==
"RRR" &&
theSegDir ==
L && (fabs(x2-x4)<delta) && x1 > x2)) {
198 else if((type ==
"LLL" &&
theSegDir ==
L && (fabs(x2-x4)<delta)) ||
199 (type ==
"RRR" &&
theSegDir == R && (fabs(x2-x4)<delta))) {
201 t = -1.5*t2+t1+t4/2.;
204 else if((type ==
"LRL" &&
theSegDir ==
L && (fabs(x2-x4)<delta)) ||
205 (type ==
"RLR" &&
theSegDir == R && (fabs(x2-x4)<delta))) {
210 else if((type ==
"LRL" &&
theSegDir == R && (fabs(x1-x4)<(halfCell+delta))) ||
211 (type ==
"RLR" &&
theSegDir ==
L && (fabs(x1-x4)<(halfCell+delta)))) {
213 t = 3./4.*t2+t1/2.+t4/4.;
217 else if((type ==
"LRR" &&
theSegDir == R && x1 < x4 && (fabs(x1-x4)<(halfCell+delta)))||
218 (type ==
"RLL" &&
theSegDir ==
L && x1 > x4 && (fabs(x1-x4)<(halfCell+delta)))) {
220 t = 3./4.*t2+t1/2.-t4/4.;
229 theTMaxes[cGroup] =
new TMax(t,cGroup,type,sigma,t0Factor,hSubGroup);
230 if(
debug)
cout <<
"tmax124 " << t <<
" " << t0Factor <<
" " << type << endl;
232 if(layersIn == 8 || layersIn == 10) {
237 if((type ==
"LLR" && x1 > x4 &&
theSegType ==
"LRLR") ||
238 (type ==
"RRL" && x1 < x4 &&
theSegType ==
"RLRL")) {
243 else if((type ==
"LLR" && x1 < x4 && (fabs(x1-x4)<(halfCell+delta))) ||
244 (type ==
"RRL" && x1 > x4 && (fabs(x1-x4)<(halfCell+delta)))) {
246 t = 3./4.*t3+t4/2.-t1/4.;
250 else if((type ==
"LRR" &&
theSegDir == R && x1 < x4 && (fabs(x1-x3)<delta)) ||
251 (type ==
"RLL" &&
theSegDir ==
L && x1 > x4 &&(fabs(x1-x3)<delta))) {
256 else if((type ==
"LRL" &&
theSegDir == R && (fabs(x1-x3)<delta)) ||
257 (type ==
"RLR" &&
theSegDir ==
L && (fabs(x1-x3)<delta))) {
262 else if((type ==
"LRL" &&
theSegDir ==
L && (fabs(x1-x3)<(2.*halfCell+delta))) ||
263 (type ==
"RLR" &&
theSegDir == R && (fabs(x1-x3)<(2.*halfCell+delta)))) {
265 t = 3./4.*t3+t4/2.+t1/4.;
269 else if((type ==
"LLL" &&
theSegDir ==
L && x1 > x4 && (fabs(x1-x3)<delta)) ||
270 (type ==
"RRR" &&
theSegDir == R && x1 < x4 && (fabs(x1-x3)<delta))) {
275 else if((type ==
"LLL" &&
theSegDir == R && (fabs(x1-x3)<delta)) ||
276 (type ==
"RRR" &&
theSegDir ==
L && (fabs(x1-x3)<delta))) {
278 t = -1.5*t3+t4+t1/2.;
286 theTMaxes[cGroup] =
new TMax(t,cGroup,type,sigma,t0Factor,hSubGroup);
287 if(
debug)
cout <<
"tmax134 " << t <<
" " << t0Factor <<
" " << type << endl;
289 if((layersIn == 9 || layersIn == 10) && (fabs(x2-x4)<delta)) {
292 ((type+=theSegType[1])+=theSegType[2])+=theSegType[3];
294 if((type ==
"LRL" ) ||
300 else if((type ==
"LRR" &&
theSegDir == R) ||
306 else if((type ==
"LLR" &&
theSegDir == R) ||
317 theTMaxes[cGroup] =
new TMax(t,cGroup,type,sigma,t0Factor,hSubGroup);
318 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.
InfoLayer *& getInfoLayer(int layer)
std::vector< TMax * > theTMaxes
std::vector< InfoLayer * > theInfoLayers