@@ -552,6 +552,7 @@ public:
552552 ~CalibThreshold () {}
553553
554554 double threshold (unsigned int detId );
555+
555556private :
556557 double threshold (int subdet , int ieta , int depth );
557558 bool fileThreshold (const char * fname );
@@ -586,20 +587,21 @@ bool CalibThreshold::fileThreshold(const char* fname) {
586587 continue ; //ignore comment
587588 std ::vector < std ::string > items = splitString (std ::string (buffer ));
588589 if (items .size () != 7 ) {
589- ++ bad ;
590+ ++ bad ;
590591 std ::cout << "Ignore line: " << buffer << std ::endl ;
591592 } else {
592593 ++ good ;
593- int ieta = std ::atoi (items [0 ].c_str ());
594- int depth = std ::atoi (items [2 ].c_str ());
595- double thr = std ::atof (items [4 ].c_str ());
596- thresh_ [std ::pair < int , int > (ieta , depth )] = thr ;
597- }
594+ int ieta = std ::atoi (items [0 ].c_str ());
595+ int depth = std ::atoi (items [2 ].c_str ());
596+ double thr = std ::atof (items [4 ].c_str ());
597+ thresh_ [std ::pair < int , int > (ieta , depth )] = thr ;
598+ }
598599 }
599600 fInput .close ();
600- std ::cout << "Reads " << all << " entries from " << fname << " with " << good << " Good and " << bad << " bad records" << std ::endl ;
601+ std ::cout << "Reads " << all << " entries from " << fname << " with " << good << " Good and " << bad
602+ << " bad records" << std ::endl ;
601603 if (good > 0 )
602- ok = true;
604+ ok = true;
603605 }
604606 }
605607 return ok ;
@@ -610,23 +612,19 @@ double CalibThreshold::threshold(int subdet, int ieta, int depth) {
610612 {0.1 , 0.2 , 0.2 , 0.2 , 0.2 , 0.2 , 0.2 },
611613 {0.1 , 0.2 , 0.2 , 0.2 , 0.2 , 0.2 , 0.2 },
612614 {0.2 , 0.3 , 0.3 , 0.3 , 0.3 , 0.3 , 0.3 }};
613- double cutHB [4 ][4 ] = {{0.1 , 0.2 , 0.3 , 0.3 },
614- {0.25 , 0.25 , 0.3 , 0.3 },
615- {0.4 , 0.3 , 0.3 , 0.3 },
616- {0.6 , 0.4 , 0.4 , 0.5 }};
615+ double cutHB [4 ][4 ] = {{0.1 , 0.2 , 0.3 , 0.3 }, {0.25 , 0.25 , 0.3 , 0.3 }, {0.4 , 0.3 , 0.3 , 0.3 }, {0.6 , 0.4 , 0.4 , 0.5 }};
617616
618617 double thr (0 );
619618 if (ok_ ) {
620619 if ((form_ > 0 ) && (form_ <= 4 )) {
621620 if (subdet == 2 )
622- thr = cutHE [form_ - 1 ][depth - 1 ];
621+ thr = cutHE [form_ - 1 ][depth - 1 ];
623622 else
624- thr = cutHB [form_ - 1 ][depth - 1 ];
623+ thr = cutHB [form_ - 1 ][depth - 1 ];
625624 } else {
626- std ::map < std ::pair < int , int > , double > ::const_iterator itr =
627- thresh_ .find (std ::pair < int , int > (ieta , depth ));
625+ std ::map < std ::pair < int , int > , double > ::const_iterator itr = thresh_ .find (std ::pair < int , int > (ieta , depth ));
628626 if (itr != thresh_ .end ())
629- thr = itr -> second ;
627+ thr = itr -> second ;
630628 }
631629 }
632630 return thr ;
0 commit comments