23 : rh(rh_), idWire(rh.wireId()), lr(rh.lrSide()) {
36 if (time < 0. || time > 415.) {
38 cout <<
" *** WARNING time = " <<
time << endl;
54 for (vector<DTRecHit1D>::const_iterator
hit =
hits.begin();
hit !=
hits.end(); ++
hit) {
73 if ((*ilay) ==
nullptr) {
80 else if (lOrR == Right)
90 layersIn += (*ilay)->idWire.layer();
104 if (layersIn <= 8 || layersIn == 10) {
108 if (layersIn <= 7 || layersIn >= 9) {
112 if (layersIn == 6 || layersIn >= 8) {
125 float halfCell = 2.1;
127 unsigned t0Factor = 99;
132 cout <<
"t1, t2, t3, t4: " <<
t1 <<
" " <<
t2 <<
" " <<
t3 <<
" " << t4 << endl;
133 cout <<
"x1, x2, x3, x4: " <<
x1 <<
" " <<
x2 <<
" " << x3 <<
" " << x4 << endl;
137 unsigned hSubGroup = 99;
138 if (
t1 == 0. ||
t2 == 0. ||
t3 == 0. || t4 == 0.)
140 else if (
t1 <= 5. ||
t2 <= 5. ||
t3 <= 5. || t4 <= 5.)
142 else if (
t1 <= 10. ||
t2 <= 10. ||
t3 <= 10. || t4 <= 10.)
144 else if (
t1 <= 20. ||
t2 <= 20. ||
t3 <= 20. || t4 <= 20.)
146 else if (
t1 <= 50. ||
t2 <= 50. ||
t3 <= 50. || t4 <= 50.)
149 if ((layersIn == 6 || layersIn == 10) && (fabs(
x1 - x3) <
delta)) {
153 if (
type ==
"LRL" ||
type ==
"RLR") {
156 hist.hT123LRL->Fill(
t);
160 hist.hT123LLR->Fill(
t);
164 hist.hT123LRR->Fill(
t);
168 hist.hT123Bad->Fill(
t);
172 cout <<
"tmax123 " <<
t <<
" " <<
type << endl;
174 if (layersIn == 7 || layersIn == 10) {
181 t = 1.5 *
t2 +
t1 - t4 / 2.;
182 hist.hT124LRR1gt4->Fill(
t);
186 t = 1.5 *
t2 -
t1 + t4 / 2.;
187 hist.hT124LLR->Fill(
t);
191 t = 1.5 *
t2 -
t1 - t4 / 2.;
192 hist.hT124LLLR->Fill(
t);
196 t = -1.5 *
t2 +
t1 + t4 / 2.;
197 hist.hT124LLLL->Fill(
t);
201 t = 1.5 *
t2 +
t1 + t4 / 2.;
202 hist.hT124LRLL->Fill(
t);
206 t = 3. / 4. *
t2 +
t1 / 2. + t4 / 4.;
208 hist.hT124LRLR->Fill(
t);
212 t = 3. / 4. *
t2 +
t1 / 2. - t4 / 4.;
214 hist.hT124LRR1lt4->Fill(
t);
218 hist.hT124Bad->Fill(
t);
222 cout <<
"tmax124 " <<
t <<
" " << t0Factor <<
" " <<
type << endl;
224 if (layersIn == 8 || layersIn == 10) {
231 t = 1.5 *
t3 + t4 -
t1 / 2.;
232 hist.hT134LLR1gt4->Fill(
t);
233 }
else if ((
type ==
"LLR" &&
x1 < x4 && (fabs(
x1 - x4) < (halfCell +
delta))) ||
234 (
type ==
"RRL" &&
x1 > x4 && (fabs(
x1 - x4) < (halfCell +
delta)))) {
236 t = 3. / 4. *
t3 + t4 / 2. -
t1 / 4.;
238 hist.hT134LLR1lt4->Fill(
t);
242 t = 1.5 *
t3 - t4 +
t1 / 2.;
243 hist.hT134LRR->Fill(
t);
247 t = 1.5 *
t3 + t4 +
t1 / 2.;
248 hist.hT134LRLR->Fill(
t);
252 t = 3. / 4. *
t3 + t4 / 2. +
t1 / 4.;
254 hist.hT134LRLL->Fill(
t);
258 t = 1.5 *
t3 - t4 -
t1 / 2.;
259 hist.hT134LLLL->Fill(
t);
263 t = -1.5 *
t3 + t4 +
t1 / 2.;
264 hist.hT134LLLR->Fill(
t);
268 hist.hT134Bad->Fill(
t);
272 cout <<
"tmax134 " <<
t <<
" " << t0Factor <<
" " <<
type << endl;
274 if ((layersIn == 9 || layersIn == 10) && (fabs(
x2 - x4) <
delta)) {
279 if ((
type ==
"LRL") || (
type ==
"RLR")) {
281 t = (
t2 + t4) / 2. +
t3;
282 hist.hT234LRL->Fill(
t);
285 t = (
t2 - t4) / 2. +
t3;
286 hist.hT234LRR->Fill(
t);
289 t = (t4 -
t2) / 2. +
t3;
290 hist.hT234LLR->Fill(
t);
294 hist.hT234Bad->Fill(
t);
298 cout <<
"tmax234 " <<
t <<
" " <<
type << endl;
304 vector<const TMax*>
v;
305 if (idWire.
layer() == 1) {
309 }
else if (idWire.
layer() == 2) {
313 }
else if (idWire.
layer() == 3) {
326 vector<const TMax*>
v;
347 for (vector<TMax*>::const_iterator iTmax =
theTMaxes.begin(); iTmax !=
theTMaxes.end(); ++iTmax) {