CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch12/src/L1Trigger/CSCTrackFinder/src/CSCTFPtMethods.cc

Go to the documentation of this file.
00001 #include <L1Trigger/CSCTrackFinder/interface/CSCTFPtMethods.h>
00002 #include <DataFormats/L1CSCTrackFinder/interface/CSCTFConstants.h>
00003 
00004 #include <cmath>
00005 
00006 //-----------------
00007 // Static variables
00008 //-----------------
00009 
00010 //L1MuTriggerPtScale CSCTFPtMethods::trigger_scale;
00011 
00012 // Global scale factor to multiply all parameterizations by
00013 //const float CSCTFPtMethods::kGlobalScaleFactor = 1.055;
00014 // Now scale to 90% effic definition like in old ORCA
00015 const float CSCTFPtMethods::kGlobalScaleFactor = 1.36;
00016 
00017 // First ME1andME2, then ME1andME3, then MB1andME2
00018 // units are radians*GeV
00019 
00020 // These arrays contain the values for the best fit parameters for three station measurements
00021 
00022 const float CSCTFPtMethods::AkLowEta_Fit1[kME2andMB2][CSCTFPtMethods::kMaxParameters] = 
00023   {
00024     //    {-4.026, 8.139, -5.350, 1.176},                               //hit detectors 1 and 2
00025     //???    {0.5170, -11.13, 8.255, -1.980},                           //hit detectors 1 and 2
00026     {3.900, -8.391, 6.062, -1.436},                             //hit detectors 1 and 2
00027     //    {-2.241, 4.405, -2.756, 0.5878},      //13
00028     {8.03602, -17.5355, 12.7725, -3.0616 },     //13
00029     {0.8372, -2.220, 1.908, -0.5233},                   //23
00030     {-0.04389, 0.05174, 0.0, 0.0},                              //24
00031     {-0.5519E-02, 0.8496E-02, 0.0, 0.0},                //34
00032     {-4.228, 8.546, -5.617, 1.235},                             //12
00033     {0.80, -0.54, 0.0, 0.0},                            //25
00034     {0.80, -0.54, 0.0, 0.0},                            //26
00035   };
00036 
00037 const float CSCTFPtMethods::AkHighEta_Fit1[kME2andMB2][CSCTFPtMethods::kMaxParameters] = 
00038   {
00039     //    {0.6644, -0.2312, 0.0, 0.0},                  //12
00040     {0.6275, -0.2133, 0.0, 0.0},                        //12
00041     {-1.124, 2.492, -1.347, 0.2204},            //13
00042     {0.5214, -0.7536, 0.3913, -.06739},         //23
00043     {1.394, -1.886, 0.8809, -0.1369},           //24
00044     {-0.5519E-02, 0.8496E-02, 0.0, 0.0},        //34
00045     {0.6644, -0.2312, 0.0, 0.0},                        //12
00046     {0.80, -0.54, 0.0, 0.0},                    //25
00047     {0.80, -0.54, 0.0, 0.0},                    //26
00048   };
00049 
00050 // These arrays contain the values for the best fit parameters found imperically to determine Pt for a two station measurement
00051 // The realtionship is dphi = A/Pt + B/Pt^2
00052 const float CSCTFPtMethods::AkLowEta_Fit2[kME2andMB2][CSCTFPtMethods::kMaxParameters] = 
00053   {
00054     //    {-3.198, 6.703, -4.539, 1.028},                       //12
00055     {-0.6131, 0.6870, 0.0285, -0.1147},                 //12
00056     //  {-6.705, 14.52, -10.32, 2.449},                 //13
00057     {8.03602, -17.5355, 12.7725, -3.0616 },     //13
00058     {5.765, -12.85, 9.543, -2.345},                     //23
00059     {-4.068, 8.254, -5.491, 1.214},                     //24
00060     {-.02974, .04816, -.02105, .003640},        //34
00061     {-3.358, 7.038, -4.766, 1.079},                     //12
00062     {0.80, -0.54, 0.0, 0.0},                    //25
00063     {0.80, -0.54, 0.0, 0.0},                    //26
00064   };
00065 const float CSCTFPtMethods::AkHighEta_Fit2[kME2andMB2][CSCTFPtMethods::kMaxParameters] = 
00066   {
00067     {0.6425, -0.2308, 0.0, 0.0},                                //12
00068     {0.6923, -0.2336, 0.0, 0.0},                                //13
00069     {-0.7147, .01117, -0.5255E-04, 0.7991E-07}, //23
00070     {-1.377, 2.150, -1.046, 0.1667},                    //24
00071     {-.02974, .04816, -.02105, .003640},                //34
00072     {0.6425, -0.2308, 0.0, 0.0},                                //12
00073     {0.80, -0.54, 0.0, 0.0},                            //25
00074     {0.80, -0.54, 0.0, 0.0},                            //26
00075   };
00076 
00077 const float CSCTFPtMethods::BkLowEta_Fit2[kME2andMB2][CSCTFPtMethods::kMaxParameters] = 
00078   {
00079     //    {-0.5873, 0.0802, 0.2337, 0.0},       //12
00080     {7.0509, -7.3282, -0.1465, 1.308},  //12
00081     //    {-0.5677, 1.907, -1.365, 0.2899},     //13
00082     {0.0, 0.0, 0.0, 0.0},       //13
00083     {-38.55, 82.95, -59.66, 14.29},             //23
00084     {20.71, -45.34, 32.05, -7.415},             //24
00085     {0.0, 0.0, 0.0, 0.0},                               //34
00086     {-0.6167, 0.08421, 0.2454, 0.0},    //12
00087     {0.0, 0.0, 0.0, 0.0},                               //25
00088     {0.0, 0.0, 0.0, 0.0}                                //26
00089   };
00090 const float CSCTFPtMethods::BkHighEta_Fit2[kME2andMB2][CSCTFPtMethods::kMaxParameters] = 
00091   {
00092     {14.79, -21.10, 10.16, -1.623},             //12
00093     {70.67, -105.7, 52.49, -8.631},             //13
00094     {15.70, -23.94, 11.89, -1.939},             //23
00095     {17.18, -26.38, 13.13, -2.139},             //24
00096     {0.0, 0.0, 0.0, 0.0},                               //34
00097     {14.79, -21.10, 10.16, -1.623},             //12
00098     {0.0, 0.0, 0.0, 0.0},                               //25
00099     {0.0, 0.0, 0.0, 0.0}                                //26
00100   };
00101 
00102 const float CSCTFPtMethods::FRCorrLowEta[kME2andMB2][2] = 
00103   {
00104 //    {1.13, 0.87}, //12
00105 //    {1.14, 0.85},   //13
00106     {1.30, 1.0}, //12
00107     {1.30, 1.0},   //13
00108     {1.0, 1.0},   //23
00109     {1.0, 1.0},   //24
00110     {1.0, 1.0},   //34
00111     {1.0, 1.0},   //12
00112     {1.0, 1.0},   //25
00113     {1.0, 1.0}    //26
00114   };
00115 const float CSCTFPtMethods::FRCorrHighEta[kME2andMB2][2] = 
00116   {
00117 //    {0.92, 1.12}, //12
00118 //    {0.92, 1.12},   //13
00119     {0.966, 1.176}, //12
00120     {0.966, 1.176},   //13
00121     {1.0, 1.0},   //23
00122     {1.0, 1.0},   //24
00123     {1.0, 1.0},   //34
00124     {1.0, 1.0},   //12
00125     {1.0, 1.0},   //25
00126     {1.0, 1.0}    //26
00127   };
00128 // Anna's 2010 parametrization
00129 const double CSCTFPtMethods::A_mu12Front[4][15] = 
00130   {
00131     {0, 0, 0, -0.10523922235654110946, -0.10983929659374999654, -0.11452047380694262146, -0.11922097760176857129, -0.31345770385362781152, -0.29879434616186489881, -0.26915122313015271693, -0.23825592462089598134, -0.21577716540165170489, 0, 0, 0},//A_mu
00132     {0, 0, 0, 0.26520808786388666567, 0.20543788970357632073, 0.15092171845376831096, 0.10960449046799547457, 0.07249357497808966988, 0.084725241812656573726, 0.080545185052021503469, 0.063499540823294411962, 0.052274729725005748826, 0, 0, 0},//B_mu
00133     {0, 0, 0, 0.00053807554094229155788, 0.00045289727656323158257, 0.00048500971554021258918, 0.00062343043239925161666, 0.00018916793540052533398, 9.9877853046464147579e-05, 0.00011936753945903473204, -0.00013555974179713960442, -0.00018396374782998390577, 0, 0, 0},//C_mu
00134     {0, 0, 0, 0.5999999999999999778, 0.5999999999999999778, 0.5999999999999999778, 0.5999999999999999778, 0.5999999999999999778, 0.5999999999999999778, 0.5999999999999999778, 0.5999999999999999778, 0.5999999999999999778, 0, 0, 0} //D_mu
00135   };
00136 
00137 const double CSCTFPtMethods::A_sig12Front[3][15] = 
00138   {
00139     {0, 0, 0, 0.012128390128145795368, 0.0060118459615588950434, 0.0066857690437444544998, 0.016870580188088974555, 3.2471855065940857799e-17, 0.04950616849006982817, 0.047875666889731632869, 0.046434926233452016031, 0.043576561593816925955, 0, 0, 0},
00140     {0, 0, 0, 0.11205437847560090203, 0.14710111810994394577, 0.12139003108545433351, 0.05805544863709271447, 0.44230910905171338943, 0.097455948703866090987, 0.091167182629549800565, 0.08155034337565571223, 0.10115334241053108855, 0, 0, 0},
00141     {0, 0, 0, 0.00045794655246943964493, 0.00060328713936987944655, 0.00059167776206113108402, 0.00032821487645948946993, 0.0017467056059844235372, 0.00059613339189244513722, 0.00058184715339610595854, 0.00064476542748265707177, 0.00065843267283058381015, 0, 0, 0}
00142   };
00143 const double CSCTFPtMethods::A_mu13Front[4][15] = 
00144   {
00145    {0, 0, 0, -0.13778088536998894797, -0.15278054690526707282, -0.143346136779766542, -0.14969165155567873415, -0.31735124864642083597, -0.33366154127080654979, -0.32035587063652937179, -0.29063133844224109392, -0.2625110988870774098, 0, 0, 0},
00146    {0, 0, 0, 0.50472519215627242861, 0.45431218833331760143, 0.27978303792475944789, 0.21659344933388599563, 0.39042059382545513113, 0.21436973705419076763, 0.21989939737961083921, 0.17248537946455347325, 0.14545152483288878442, 0, 0, 0},
00147    {0, 0, 0, 0.00074029784977316568338, 0.00094379263107391029794, 0.00044290989468863904959, 0.00032465731761844673995, 0.00080437043173185620963, 0.00030621821048436737717, 0.00036742704696401365556, 0.00031744969589481185704, 4.3755432326479009111e-05, 0, 0, 0},
00148    {0, 0, 0, 0.5999999999999999778, 0.5999999999999999778, 0.5999999999999999778, 0.5999999999999999778, 0.5999999999999999778, 0.5999999999999999778, 0.5999999999999999778, 0.5999999999999999778, 0.5999999999999999778, 0, 0, 0}
00149   };
00150 const double CSCTFPtMethods::A_sig13Front[3][15] = 
00151   {
00152     {0, 0, 0, 0.022229486577380466045, 0.014786622332179612943, 0.022206319015528955263, 0.030956563988669690696, 0.10438632614093404372, 0.052151139493775117151, 0.061379169888241082165, 0.063070119166874993866, 0.062738437335733338029, 0, 0, 0},
00153     {0, 0, 0, 0.17561127734822717938, 0.248243347883890908, 0.15435972163154007553, 0.098222588303399416265, 0.28864281120179885454, 0.28143242857015660086, 0.16091447629058408531, 0.13483945718353784748, 0.13542102637707623125, 0, 0, 0},
00154     {0, 0, 0, 0.00050105260335033322255, 0.00060095811169912115909, 0.00049407859567527159534, 0.00062091453005704531909, 0.00046438613640785659023, 0.00074251112464886865304, 0.00070054085319381544095, 0.00064104982805283157888, 0.00060566613754535849647, 0, 0, 0}
00155   };
00156 const double CSCTFPtMethods::A_mu14Front[4][15] = 
00157   {
00158    {0, 0, 0, 0, 0, 0, 0, 0, 0, -0.32728513383665119862, -0.30618420062024648276, -0.27554118389520276811, -0.16285631900256525295, 0, 0},
00159    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0.32023477684420448286, 0.2693691108403535317, 0.22056748837118930751, 0.064251774309308562483, 0, 0},
00160    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0.00042613689417415228419, 0.00055054357631906247761, 0.00015434926334609733872, -0.012950297280226659088, 0, 0},
00161    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0.5999999999999999778, 0.5999999999999999778, 0.5999999999999999778, 0.5999999999999999778, 0, 0}
00162   };
00163 const double CSCTFPtMethods::A_sig14Front[3][15] = 
00164   {
00165     {0, 0, 0, 0, 0, 0, 0, 0, 0, 0.060082258981389996544, 0.07247051398468504213, 0.069785008221314948074, 3.6424053064063738328e-12, 0, 0},
00166     {0, 0, 0, 0, 0, 0, 0, 0, 0, 0.30722806049859069377, 0.20925971382909466789, 0.21969785537300090539, 0.022179262487250456931, 0, 0},
00167     {0, 0, 0, 0, 0, 0, 0, 0, 0, 0.00094734288756094921311, 0.00069588950170735620632, 0.00069173065831375820777, 0.095265205090887594697, 0, 0}
00168   };
00169 //
00170 // Rare without CSCTF resolution 
00171 const double CSCTFPtMethods::A_mu12Rare[4][15] = 
00172   {
00173     {0, -0.10374889091836100863, -0.099788822609968519384, -0.13818657823143312702, -0.13717556879309533713, -0.14490849378394998759, -0.14408105919423722097, -0.2740736915947392105, -0.25354252758973594428, -0.22856287512160483599, -0.19978450972956338094, -0.18078462391477437277, 0, 0, 0},
00174     {0, 0.43901381552049162371, 0.33269140862921836588, 0.2867281989745522619, 0.1745740696789168378, 0.13068773408294853677, 0.090289532623200399741, 0.14511096793044100939, 0.089110172781148286325, 0.088325915559225531837, 0.058284739852102536439, 0.054838099980182117288, 0, 0, 0},
00175     {0, 0.00090427118272218449946, 0.00051285798655137816021, 0.00096712518524937637985, 0.0005533967588738022839, 0.00058699577022335697706, 0.00046096277656442602704, 0.00059775151582151515688, 0.0002982802094889720106, 0.00025087464533485412822, -1.2763501682976573746e-06, 8.7075909949317653082e-05, 0, 0, 0},
00176     {0, 0.5999999999999999778, 0.5999999999999999778, 0.5999999999999999778, 0.5999999999999999778, 0.5999999999999999778, 0.5999999999999999778, 0.5999999999999999778, 0.5999999999999999778, 0.5999999999999999778, 0.5999999999999999778, 0.5999999999999999778, 0, 0, 0}
00177   };
00178 const double CSCTFPtMethods::A_sig12Rare[3][15] = 
00179   {
00180     {0, 0.0038093885421048444447, 0.0065769632315039548015, 0.0055592323950014550446, 0.0093835962422483230883, 0.017396352418037726306, 0.020259861529127568686, 0.028034021369845840699, 0.039800110854239546809, 0.039980148857628114434, 0.038524308685830198351, 0.040281758067103733134, 0, 0, 0},
00181     {0, 0.23514753393254139713, 0.20840454339700395514, 0.1734554515667367236, 0.14712778893221009624, 0.068478644292554124995, 0.045578777378287992084, 0.17971688457142401263, 0.10413274328597779683, 0.096806606002943468292, 0.095972114441355463321, 0.077888109608563196873, 0, 0, 0},
00182     {0, 0.00060835884164537896556, 0.00057248928258038056342, 0.00054601310456751364283, 0.00045596139082362406765, 0.00036256195477186049098, 0.00033554189220614231851, 0.00081415383922815243514, 0.00064529700989722222747, 0.00063280618158918571729, 0.00066801533625483495039, 0.00061304601669530541484, 0, 0, 0}
00183   };
00184 const double CSCTFPtMethods::A_mu13Rare[4][15] = 
00185   {
00186    {0, 0, -0.12623127354128180211, -0.17935797490956165157, -0.18060840788964968584, -0.18696605249703140972, -0.19077279628481272344, -0.29349472537983850584, -0.28999462954606641807, -0.28042269536018021858, -0.24794997339523475177, -0.22381101094323510581, 0, 0, 0},
00187    {0, 0, 0.46581826439734036471, 0.59045368664701669559, 0.42112504758806018623, 0.31214409746624299791, 0.22991099738945788844, 0.38259688787882195626, 0.21032714197086083141, 0.23803428613207575082, 0.16848812991169570541, 0.13391107896586992854, 0, 0, 0},
00188    {0, 0, 0.0002201385928033240463, 0.00094588024264893161806, 0.0006090017795757148196, 0.00055819818498869361832, 0.00051220623767016942862, 0.0010722093641169425093, 0.00033951226487555219435, 0.00057667736469464204747, 0.00038672362687909188003, 0.00018665348905046641372, 0, 0, 0},
00189    {0, 0, 0.5999999999999999778, 0.5999999999999999778, 0.5999999999999999778, 0.5999999999999999778, 0.5999999999999999778, 0.5999999999999999778, 0.5999999999999999778, 0.5999999999999999778, 0.5999999999999999778, 0.5999999999999999778, 0, 0, 0}
00190   };
00191 const double CSCTFPtMethods::A_sig13Rare[3][15] = 
00192   {
00193     {0, 0, 0.015046443595756202674, 0.024350274050281187077, 0.030516519859742685661, 0.034951536569288559064, 0.040872596013944946514, 0.075500038528175023034, 0.054258877880390701809, 0.057948329004836200695, 0.055684189309453437089, 0.055547652610341891055, 0, 0, 0},
00194     {0, 0, 0.72981359973468040714, 0.25552798678505961316, 0.20538399097483123201, 0.13568477284924612691, 0.087691623490571385391, 0.14380693710811331965, 0.17784552932129321645, 0.15447707796169932171, 0.15118995597952319954, 0.13106219757004208826, 0, 0, 0},
00195     {0, 0, 0.00047001852983351251119, 0.00053481400606665866967, 0.00036348184816972377081, 0.00037774161715020031574, 0.00026657604722595630358, 0.00029086094173271957383, 0.00068184877937593074432, 0.00058313040724595804811, 0.00061068422520455867882, 0.00061315948044054677767, 0, 0, 0}
00196   };
00197 const double CSCTFPtMethods::A_mu14Rare[4][15] = 
00198   {
00199    {0, 0, 0, 0, 0, 0, 0, 0, 0, -0.2849452232390318196, -0.26600970450734234829, -0.23683395869018955548, -0.22057309433227462181, 0, 0},
00200    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0.33740004932669764859, 0.27762229117854592131, 0.19628468723350062097, 0.17323896845886521678, 0, 0},
00201    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0.00036794862559287675862, 0.00059266387001125628905, 0.00029802341315537321086, 0.00025629117987456756858, 0, 0},
00202    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0.5999999999999999778, 0.5999999999999999778, 0.5999999999999999778, 0.5999999999999999778, 0, 0}
00203   };
00204 const double CSCTFPtMethods::A_sig14Rare[3][15] = 
00205   {
00206     {0, 0, 0, 0, 0, 0, 0, 0, 0, 0.057936258148966857107, 0.067831242837197713857, 0.065620840504349520206, 0.054328715544637938561, 0, 0},
00207     {0, 0, 0, 0, 0, 0, 0, 0, 0, 0.30423086251952391468, 0.20761013178198547968, 0.19093892168102474804, 0.38288685251508419727, 0, 0},
00208     {0, 0, 0, 0, 0, 0, 0, 0, 0, 0.00080261760198784384054, 0.00063696047781503656055, 0.00065139580093967995589, 0.00069639579902228165072, 0, 0}
00209   };
00210 
00211 const double CSCTFPtMethods::A_mu52[4][15] = 
00212   {
00213     {0, -0.31934822512291188845, -0.24671378669106625026, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
00214     {0, -0.99999999999980493381, -0.99999999999999167333, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
00215     {0, -0.0073087160764979198016, -0.0070564603063957591009, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
00216     {0, -5.0384103551069152616, -5.6736067150957572025, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
00217   };
00218 const double CSCTFPtMethods::A_sig52[3][15] = 
00219   {
00220     {0, 0.021754484285831678786, 0.0079969520010703034479, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
00221     {0, 0.31662456185786602703, 0.25320436095234394314, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
00222     {0, 0.0026259453672001680305, 0.0027192866432913216992, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
00223   };
00224 const double CSCTFPtMethods::A_mu23[4][15] = 
00225   {
00226 
00227     {0, 0, -0.038262994788483634112, -0.038329955987871006107, -0.0374748823380766094, -0.041131685825480934771, -0.041682237062370237901, -0.043941548191289134251, -0.036858451809650610853, -0.041160145519271960912, -0.03640665951155453578, -0.037033177234847232395, -0.039730205721839016719, -0.041049544792113090708, -0.03904511674158141904},
00228     {0, 0, 0.22476203480449799543, 0.19067575131669534105, 0.15256324303025625699, 0.13801063658393192268, 0.12256502197662035025, 0.11905632873396845839, 0.10056103279215167223, 0.094455197819930808434, 0.06542931061274483151, 0.055715924150473321308, 0.053301837423971050456, 0.045890095913808617856, 0.027949821903864861122},
00229     {0, 0, 0.00069404495353071109318, 0.00065670816947569431686, 0.00050715045635956769714, 0.00051087666765004164943, 0.00050201870311558270069, 0.00025160072489320881679, 0.00026119341522217484446, 0.00027099698566654400892, 9.9011225161971808595e-05, 7.3884094779271263388e-05, 0.00025118886053809180194, 0.00035276812785148709559, 0.00023201907068018601732},
00230     {0, 0, 1.5949221750821838128, 1.7201281725872403783, 1.58953615582846286, 1.1423843849936006212, 0.97788843089194554814, 0.90488697221367975221, 1.1715145764654877336, 1.1384185105977693286, 1.1222106905033706337, 0.8870702391119174024, 0.61881410578333895245, 0.2103057782202895909, 0.20906493220451535797}
00231   };
00232 const double CSCTFPtMethods::A_sig23[3][15] = 
00233   {
00234      {0, 0, 5.1487948019707241443e-14, 1.371515748194163109e-17, 5.7867664653155070908e-15, 0.0018689633292167232882, 0.0022366390858728274135, 0.0098612407883851022766, 6.8801945206625053642e-12, 0.0032973305248131545321, 0.0054990363466139750501, 0.0092745687266331533483, 0.011501230292384876167, 0.012866555123334103353, 0.01433335748409165708},
00235      {0, 0, 0.20455300017238808863, 0.19201919320235372179, 0.17201776141542601817, 0.12441381076621171875, 0.1050096955004960475, 0.086699597450937707088, 0.12195247491883690061, 0.12325808533281308599, 0.096676601548240911899, 0.075608663356511091047, 0.063411508431177876499, 0.053299915739310803342, 0.048982690822271121589},
00236      {0, 0, 0.00067345631439024247495, 0.00071637601448934864513, 0.00073991596851847836816, 0.0007991069380909875423, 0.0008004777620410123912, 0.00089609812741991013828, 0.001505913962207979526, 0.0014477291363779595194, 0.001410515534491615236, 0.0013306603256628582281, 0.0012465454381592282456, 0.0012290059929163277448, 0.001182792281371985825}
00237   };
00238 const double CSCTFPtMethods::A_mu24[4][15] = 
00239   {
00240     {0, 0, 0, 0, 0, 0, 0, 0, 0, -0.061959407101930465134, -0.058818321370234280532, -0.068352281408454867995, -0.061460298909070447404, -0.052235918421231680719, -0.072498226107478094815},
00241     {0, 0, 0, 0, 0, 0, 0, 0, 0, 0.21211506894042392313, 0.1693324759070968244, 0.16427164509165567696, 0.12206249376578166832, 0.059425221503678751778, 0.10342818163255371178},
00242     {0, 0, 0, 0, 0, 0, 0, 0, 0, 0.00082310131655814202344, 0.00076119821363284040708, 0.0011383177083823211358, 0.00088025107979697856699, 0.00053811687741542281113, 0.0012072828551724611168},
00243     {0, 0, 0, 0, 0, 0, 0, 0, 0, 0.90513569051375386554, 0.84830498879329219175, 0.61907648481747246105, 0.62281733240515868566, 0.96959526780257299095, 0.22278747273629403991}
00244   };
00245 const double CSCTFPtMethods::A_sig24[3][15] = 
00246   {
00247      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0.036897103741702109991, 0.039899187881393870236, 0.037199371928606554671, 0.044110460084859734464, 0.04574632914580819415, 0.043819228659279139959},
00248      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0.12588087914450593607, 0.096275574709463407341, 0.097301378507412841778, 0.062284950968221723666, 0.040981290949611878793, 0.062080679266191686472},
00249      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0.00015197851743841865125, 0.00020141684336612834154, 0.00023753469072643055345, 5.280883524679438998e-05, 5.5577569515852236366e-05, 6.1083145679098556401e-05}
00250   };
00251 const double CSCTFPtMethods::A_mu34[4][15] = 
00252   {
00253     {0, 0, 0, 0, 0, 0, 0, 0, 0, -0.0058446275511135183447, -0.0044363335612002457661, -0.0063690633680748938092, -0.0071732602982787522714, -0.0060076595959582691081, -0.0097192787716524169095},
00254     {0, 0, 0, 0, 0, 0, 0, 0, 0, 0.069899440774008433919, 0.041945454306693608082, 0.033695321175754334997, 0.02572107994967174141, 0.011966531649750349747, 0.013632158523237790024},
00255     {0, 0, 0, 0, 0, 0, 0, 0, 0, -0.00028713324507221590172, -0.00029722368993748908127, -0.00021881992359872021571, -0.00019444183718237873664, -0.00019245346134829781652, -4.7403620157884084486e-05},
00256     {0, 0, 0, 0, 0, 0, 0, 0, 0, 1.23011991602398707, 1.3460026509066507217, 1.3048596027895269511, 1.1101126497057096643, 1.3404667534791459005, 1.1961024662925265893}
00257   };
00258 const double CSCTFPtMethods::A_sig34[3][15] = 
00259   {
00260      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0.014243461206981972156, 0.010278183995352333305, 0.013373297961434488582, 0.018049641090122695714, 0.018285814028279508137, 0.018004419633993375832},
00261      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0.080281940189430453514, 0.097702954127336857915, 0.068717674384759980244, 0.047838267178665204449, 0.043271382660605303694, 0.034571413197575895371},
00262      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0.00019610172919627981338, 0.00020181030100052541531, 9.721123551963389408e-05, 7.9515919724251022879e-05, 3.152903608551011833e-05, -1.5281155054305934032e-05}
00263   };
00264 
00265 /*
00266 const double CSCTFPtMethods::A_mu23CSCTF[4][15] = 
00267   {
00268     {0, 0, -0.05159583579882612292, -0.057495850955557127604, -0.038777381197559336601, -0.034650103854195257735, -0.035866685307932126558, -0.036520018265937925772, -0.039140048431005991514, -0.04132313862170765989, -0.036795418654570546946, -0.034712298048110004633, -0.030675971294882777712, -0.026581567107835060715, -0.027082610124683551694},
00269     {0, 0, 0.30930157379625533576, 0.30528792735566101513, 0.18101621729540517958, 0.13261043687180154582, 0.11710185518524707238, 0.1042269425450448872, 0.12842978872597279882, 0.11026714080229071957, 0.077195052828225488306, 0.052779807661988357992, 0.031907294195008026327, 0.015010793353952620391, 0.0083693744640667474405},
00270     {0, 0, 0.003303237228747075635, 0.0036877622923072827903, 0.0028778748613812418257, 0.0027697479676805046578, 0.0029722472234315878113, 0.0027557729541331493078, 0.0027439686054866367984, 0.0027429867920243330461, 0.0026205380860322580877, 0.0025684796211763527909, 0.0024501533836338673482, 0.0022886566312508992323, 0.0023109047428951515549},
00271     {0, 0, 0.5999999999999999778, 0.5999999999999999778, 0.5999999999999999778, 0.5999999999999999778, 0.5999999999999999778, 0.5999999999999999778, 0.5999999999999999778, 0.5999999999999999778, 0.5999999999999999778, 0.5999999999999999778, 0.5999999999999999778, 0.5999999999999999778, 0.5999999999999999778}
00272   };
00273 const double CSCTFPtMethods::A_sig23CSCTF[3][15] = 
00274   {
00275      {0, 0, 1.9795336160186027818e-14, 1.9915059185082739646e-14, 3.1018595894952150083e-13, 3.247104191431149367e-15, 8.1315162936412832551e-20, 1.240503468176445967e-14, 5.42101086242752217e-20, 1.0611672131288774068e-13, 1.5769479363818283968e-13, 1.3950757324528162417e-13, 9.006754760412793992e-14, 6.4351600220433069488e-14, 3.422793732471562933e-14},
00276      {0, 0, 0.16247290882387102617, 0.17175130285728712476, 0.12863499593873295446, 0.087195343431809388401, 0.075178796525218818947, 0.084968005914806410406, 0.097534051101499472103, 0.10072101959821762318, 0.086515842289935293574, 0.077487068666586722543, 0.066495426545906038962, 0.05829523793723847408, 0.058469062331064518279},
00277      {0, 0, 0.0030866184008234202017, 0.0027157845892710396826, 0.0031000107472930020502, 0.0032948728256854639164, 0.0032523838944876529676, 0.0032908170044063911851, 0.0031077703733701392101, 0.003168310045777431895, 0.0031995826882447926144, 0.0033172473608836330373, 0.003481731357302361371, 0.0035885923423450909013, 0.0036197682854273677093}
00278   };
00279 const double CSCTFPtMethods::A_mu24CSCTF[4][15] = 
00280   {
00281     {0, 0, 0, 0, 0, 0, 0, 0, 0, -0.040588070215567317867, -0.037244899938720932298, -0.032557928194235655206, -0.033625486248390609734, -0.030979888871088396424, -0.034417775727303090427},
00282     {0, 0, 0, 0, 0, 0, 0, 0, 0, 0.14679164922919202274, 0.10155103197601543508, 0.05654629310554831062, 0.045376829456755543579, 0.027509877797561234358, 0.023419523710039816256},
00283     {0, 0, 0, 0, 0, 0, 0, 0, 0, 0.0020633358759647897618, 0.001896533050698436711, 0.0017858761282068486096, 0.001844050222271934221, 0.0017557139477893672803, 0.0018426777898371733428},
00284     {0, 0, 0, 0, 0, 0, 0, 0, 0, 0.8287338692316308375, 0.99774828307731855404, 1.1829866290816364316, 1.1602087549628306018, 1.2464326048294538385, 1.2759641819434877075}
00285   };
00286 const double CSCTFPtMethods::A_sig24CSCTF[3][15] = 
00287   {
00288      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0.037625952557573547064, 0.01799213091317735172, 1.6125862879181815379e-11, 1.0562397310953652863e-12, 1.241077634541939978e-12, 0.0010355011396506045348},
00289      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0.042427032035622765094, 0.098803329688397070751, 0.14389559700484103044, 0.13799560522998333134, 0.12970987520579105312, 0.12360506328208811788},
00290      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0.0016583711392086320988, 0.0026285030865632191821, 0.0035332492384275056285, 0.0035536381484177958709, 0.0036008804486243150937, 0.003671342260090017847}
00291   };
00292 const double CSCTFPtMethods::A_mu34CSCTF[4][15] = 
00293   {
00294     {0, 0, 0, 0, 0, 0, 0, 0, 0, -0.024386862247056880632, -0.021528537191676071216, -0.02005083006670880727, -0.01336094590546606925, -0.011202986245246833105, -0.010221348552148104907},
00295     {0, 0, 0, 0, 0, 0, 0, 0, 0, 0.13932346391503466765, 0.10879329554634586952, 0.082131024131389118725, 0.049386143583177943839, 0.031626039045900805613, 0.018428910788041489438},
00296     {0, 0, 0, 0, 0, 0, 0, 0, 0, 0.002260334327917361795, 0.0022298163315863312253, 0.0022548694122104897576, 0.0018759307742583139749, 0.00177881208252465557, 0.0017313182633728260718},
00297     {0, 0, 0, 0, 0, 0, 0, 0, 0, 0.5999999999999999778, 0.5999999999999999778, 0.5999999999999999778, 0.5999999999999999778, 0.5999999999999999778, 0.5999999999999999778}
00298   };
00299 const double CSCTFPtMethods::A_sig34CSCTF[3][15] = 
00300   {
00301      {0, 0, 0, 0, 0, 0, 0, 0, 0, 8.7898167477201694098e-15, 9.6596450456509774796e-15, 5.8301345522149272682e-15, 4.2091980942404738641e-15, 5.3458485468199645751e-15, 3.1712051604473878719e-13},
00302      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0.093687563387992001118, 0.079820927326800600321, 0.066984420892720844543, 0.056708328335080805671, 0.047536365785603315604, 0.038169598629265347189},
00303      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0.0030253104511002268558, 0.0031726875548676886779, 0.0032496716988121504902, 0.0033443354915219845012, 0.0034738654347779623563, 0.0036318730482019275646}
00304 //
00305   };
00306 */
00307 
00308 /*
00309 // correlation
00310 const double CSCTFPtMethods::A_rho123FrontCSCTF[5][15] = 
00311   {
00312     {0, 0, 0, -7.1040670977031510347, -12.670315837935662628, -8.7170331637018456661, -0.67519391792989291723, -82.734134458636077625, -0.75423027516740670517, -1.5375638068488624022, -1.9436626689216969233, -3.3048393305106831264, 0, 0, 0},
00313     {0, 0, 0, 13.120105991486797237, 24.351734925387280128, 17.466447377883568493, 3.4093984643667423207, 194.02337279340923715, 2.3366398860307699969, 3.18999491763136378, 3.6653450973208929753, 5.5669645488507377706, 0, 0, 0},
00314     {0, 0, 0, -6.3122732945347292954, -12.092235620129875073, -8.964306376251860442, -2.0956518253881668556, -14.276757245102295713, -1.052341283927880955, -1.3351509494835234193, -1.4259213982588558878, -1.7115493310298179885, 0, 0, 0},
00315     {0, 0, 0, 0.88435981237335747895, 1.7435813620171676241, 1.3426959412552754713, 0.34444942151920626694, -87.449791709635917414, 0.12377690603711703765, 0.15538477196375066747, 0.15008809252689520042, 0.10296388213110005405, 0, 0, 0},
00316     {0, 0, 0, 0.6301630452598394605, 0.95776009332113687389, 0.9017528066816278276, 0.50478537372345588796, 4.2993192028223639056, 0.44617114302999638653, 0.34541691945594366064, 0.42054938381219214572, 0.7433264993299159018, 0, 0, 0}
00317   };
00318 const double CSCTFPtMethods::A_rho124FrontCSCTF[5][15] = 
00319   {
00320     {0, 0, 0, 0, 0, 0, 0, 0, -67.653257351760515803, -14.640453888061129462, -8.0061864057341729506, -6.380532066411966241, 0, 0, 0},
00321     {0, 0, 0, 0, 0, 0, 0, 0, 199.99999998356389597, 18.625354490890874359, 10.511672179624257595, 8.772341856627665635, 0, 0, 0},
00322     {0, 0, 0, 0, 0, 0, 0, 0, -190.6065599611967798, -3.7847886886961528141, -2.2651826031392530147, -1.9160721119800219192, 0, 0, 0},
00323     {0, 0, 0, 0, 0, 0, 0, 0, 58.439288729233759057, -2.3364343906401296991e-06, 3.6855623904152867709e-07, -3.0414002648998517131e-06, 0, 0, 0},
00324     {0, 0, 0, 0, 0, 0, 0, 0, 2.8796301484731765541, 1.3626067779332513563, 1.0087454870715759636, 0.90653374832410571482, 0, 0, 0}
00325   };
00326 const double CSCTFPtMethods::A_rho134FrontCSCTF[5][15] = 
00327   {
00328     {0, 0, 0, 0, 0, 0, 0, 0, 0, -5.1253686146165238213, -3.9460979852191035988, 50.876993645544430933, 0, 0, 0},
00329     {0, 0, 0, 0, 0, 0, 0, 0, 0, 8.6945510876485556651, 6.9804335263398149536, -138.23002940118752235, 0, 0, 0},
00330     {0, 0, 0, 0, 0, 0, 0, 0, 0, -3.7766962717672067917, -3.021481709800325266, 114.72054763323052384, 0, 0, 0},
00331     {0, 0, 0, 0, 0, 0, 0, 0, 0, 0.47276435137618078031, 0.37604585592516825976, -25.936589905717454485, 0, 0, 0},
00332     {0, 0, 0, 0, 0, 0, 0, 0, 0, 0.67139180168906242852, 0.65599257431238855443, 2.2983843503797514174, 0, 0, 0}
00333   };
00334 const double CSCTFPtMethods::A_rho123RareCSCTF[5][15] = 
00335   {
00336     {0, 3.693736660096563762e-07, -6.3780194230193432148, -13.770035906375994728, -5.1562051118343141809, -3.7461867441730016814, -1.2805080447177172864, 0.50294375115506961826, -1.4740723006986149457, -2.5387426474729517523, -2.1923622917088105844, -3.0911905495886267126, 0, 0, 0},
00337     {0, 1.2460479107724575787e-08, 11.270599218378388073, 22.392173152402016001, 9.3862642825355049325, 7.7578075325167734633, 4.2953294294048536273, 0.22827419724359693243, 3.4825602170197607066, 5.0470037914562615455, 4.4340011683393560915, 6.2256125281916929737, 0, 0, 0},
00338     {0, -3.4521070809865814222e-09, -5.0004899240308509079, -10.311644488849697865, -4.282123228906844048, -3.7150337817860408229, -2.2556284401727886291, -0.25683718959054824271, -1.5532530344313972837, -2.0501268102747358668, -1.6048499907132562914, -2.42639211677826383, 0, 0, 0},
00339     {0, 0.11247782203128549317, 0.65621333795917502485, 1.4508425971339706795, 0.57554752401241371373, 0.51651149712728827712, 0.32553981050209734871, 0.041454698814621479541, 0.1892053332712004543, 0.23183666635265892664, 0.14070399770166691633, 0.25037305153793043555, 0, 0, 0},
00340     {0, 5.2468060541259898405e-05, 0.59902231088968072026, 0.64691306718481345062, 0.56825725017267580963, 0.55227308775738792601, 0.52292618714173277894, 0.15015264640230108206, 0.47276305428305431811, 0.58130632102024715202, 0.66287057871639254447, 0.70571047503796380251, 0, 0, 0}
00341   };
00342 const double CSCTFPtMethods::A_rho124RareCSCTF[5][15] = 
00343   {
00344     {0, 0, 0, 0, 0, 0, 0, 0, -62.063614454439573365, -9.3911739932179134627, -6.1205175819402386495, -3.1911920231298327444, 0, 0, 0},
00345     {0, 0, 0, 0, 0, 0, 0, 0, 176.01031612404437965, 12.375741099204100593, 8.5587121090773408127, 5.7559625518179906578, 0, 0, 0},
00346     {0, 0, 0, 0, 0, 0, 0, 0, -160.26616104904954341, -2.5400842729151151822, -1.8386520927660907621, -2.1326757988726772197, 0, 0, 0},
00347     {0, 0, 0, 0, 0, 0, 0, 0, 46.856826297399912562, -4.8053174807327625473e-07, 3.6069918621373098233e-07, 0.21904388264162638622, 0, 0, 0},
00348     {0, 0, 0, 0, 0, 0, 0, 0, 2.6686667219206672286, 1.1798705662301880448, 0.9751334566408034199, 0.50657760373212734617, 0, 0, 0}
00349   };
00350 const double CSCTFPtMethods::A_rho134RareCSCTF[5][15] = 
00351   {
00352     {0, 0, 0, 0, 0, 0, 0, 0, 0, 22.63925623244709584, 33.307602374459399641, -4.7351194818759818617, 0, 0, 0},
00353     {0, 0, 0, 0, 0, 0, 0, 0, 0, -81.727537829168539929, -106.94890709205490964, 9.1466321665848884237, 0, 0, 0},
00354     {0, 0, 0, 0, 0, 0, 0, 0, 0, 81.287234092264910146, 99.769637227574477834, -3.9238059375998592948, 0, 0, 0},
00355     {0, 0, 0, 0, 0, 0, 0, 0, 0, -19.366748957614952076, -21.885672253322599801, 0.45930089549956160111, 0, 0, 0},
00356     {0, 0, 0, 0, 0, 0, 0, 0, 0, 2.3976365353544930592, 2.6613591378002552368, 0.90958735012798141994, 0, 0, 0}
00357   };
00358 const double CSCTFPtMethods::A_rho234CSCTF[5][15] = 
00359   {
00360     {0, 0, 0, 0, 0, 0, 0, 0, 0, -9.8545541776242284726, -64.883134763134137302, -2.7111481630799327824, -0.094635535725662925377, -0.24145993067693449774, -0.86334668692406080215},
00361     {0, 0, 0, 0, 0, 0, 0, 0, 0, 20.483521463583567623, 128.78793309543945611, 8.4668465066294569255, 3.2196840916959703627, 3.5062716967070435281, 4.8689870431603861078},
00362     {0, 0, 0, 0, 0, 0, 0, 0, 0, -10.072715847457928362, -81.865408753031090328, -4.2797400827660840861, -1.8900888882082564901, -2.0494364954339538976, -2.6715697235200512871},
00363     {0, 0, 0, 0, 0, 0, 0, 0, 0, 1.4368420319765635718, 44.864139609984853507, 0.57906617181020891838, 0.27668065500104588317, 0.30413204972393043102, 0.38082905421452400985},
00364     {0, 0, 0, 0, 0, 0, 0, 0, 0, 1.1952334817255199084, 3.5585102799355743386, 1.062066264100966162, 0.76269875289384825301, 0.75934194995400139394, 0.84343143505690310047}
00365   };
00366 */
00367 // correlation is calculated without CSCTF resolution
00368 const double CSCTFPtMethods::A_rho123FrontCSCTF[5][15] = 
00369   {
00370     {0, 0, 0, -1.8018355270558423786, -3.0800442413303450451, -73.019003781704810763, -71.455790570687398144, -64.380384468942153831, 2.1550121774347754666, 2.5576552488389672213, 2.449616802429892104, 2.6048654763866916362, 0, 0, 0},
00371     {0, 0, 0, -2.1007675246065984354, 5.0425956104081919307, 199.99999998505296617, 197.550283903424031, 199.99999998947504309, -3.6752175165788334432, -5.1722529027050292427, -4.3622079033393852399, -3.8822092661387657131, 0, 0, 0},
00372     {0, 0, 0, 4.7467280498208239692, -0.9954101483761357283, -174.31370635014994264, -172.76138545990900752, -195.76348611065316163, 3.4105036734574345481, 4.6147873662827647578, 3.7484788313774726198, 3.1712066148946220778, 0, 0, 0},
00373     {0, 0, 0, 0.30810891952961361184, -1.5943850767419220915e-06, 54.774256057823905053, 53.990647071858525408, 62.484493391665445472, -0.69848464296741152868, -0.91930506751317175862, -0.74283883233049896599, -0.63029551267626326982, 0, 0, 0},
00374     {0, 0, 0, 1.5832663901749726154, 0.74552216086091394054, 2.3871718840149540597, 2.3429031884405246977, 2.5923987724387411724, 0.78470036712835855575, 0.84997184658808944135, 0.77449725473134001241, 0.7103384244719952445, 0, 0, 0}
00375   };
00376 const double CSCTFPtMethods::A_rho124FrontCSCTF[5][15] = 
00377   {
00378     {0, 0, 0, 0, 0, 0, 0, 0, 0, 1.3870060999256690337, 2.9712356450806232111, 3.570810174736656073, 0, 0, 0},
00379     {0, 0, 0, 0, 0, 0, 0, 0, 0, -2.5249315692538325528, -5.0029964029336300158, -5.9723457657194050086, 0, 0, 0},
00380     {0, 0, 0, 0, 0, 0, 0, 0, 0, 2.5905258665507675531, 3.7350919226554304409, 4.4308882990573090765, 0, 0, 0},
00381     {0, 0, 0, 0, 0, 0, 0, 0, 0, -0.46509034721864128681, -0.65123509278498414865, -0.77222404956138701593, 0, 0, 0},
00382     {0, 0, 0, 0, 0, 0, 0, 0, 0, 0.80362588618902608406, 0.76388670904989408594, 0.8119443249235495097, 0, 0, 0}
00383   };
00384 const double CSCTFPtMethods::A_rho134FrontCSCTF[5][15] = 
00385   {
00386     {0, 0, 0, 0, 0, 0, 0, 0, 0, 1.9650106495811070495, 4.4682144046367060497, 3.6127345552596952238, 0, 0, 0},
00387     {0, 0, 0, 0, 0, 0, 0, 0, 0, -2.8639423697800454605, -8.5042162539937766752, -6.2743097440414938859, 0, 0, 0},
00388     {0, 0, 0, 0, 0, 0, 0, 0, 0, 2.3846745836159768395, 6.2976695885419857746, 4.8907783903396619962, 0, 0, 0},
00389     {0, 0, 0, 0, 0, 0, 0, 0, 0, -0.45508861624906205012, -1.1535577557401812676, -0.887603855749135362, 0, 0, 0},
00390     {0, 0, 0, 0, 0, 0, 0, 0, 0, 0.61133320621013831353, 0.8416666357275194299, 0.84060163399865650558, 0, 0, 0}
00391   };
00392 const double CSCTFPtMethods::A_rho123RareCSCTF[5][15] = 
00393   {
00394     {0, 3.693736660096563762e-07, 3.6624889920579235536, -1.5878130861362493853, -16.882029490672145755, -19.782998814333478066, -60.455933184308456418, 4.7409034663087075145, 1.2313698717610916944, 4.0535624038761168819, 2.839672990936767949, 1.1264072104945499486, 0, 0, 0},
00395     {0, 1.2460479107724575787e-08, -9.1322692253088106895, 2.7885945213228429118, 35.574384349975474606, 52.562872763020486389, 165.96545891988304788, -7.8572084740661054525, -2.2073725837258022509, -8.2319545861659868535, -5.2739465547973312098, -1.6641893104460985242, 0, 0, 0},
00396     {0, -3.4521070809865814222e-09, 0.304049807886722534, -1.0070939003771062215, -25.509204584815140748, -43.856338459435548316, -142.9795139802988615, 5.1120722960994200434, 2.5507720910098483635, 6.5298492011791555711, 4.4578719360600889132, 2.2487455007422072484, 0, 0, 0},
00397     {0, 0.11247782203128549317, 6.1743739480412145326, 0.11162411914689808479, 8.9528675403092599083, 15.100558849256662697, 44.430568006333729159, -0.9341261050017011236, -0.55701647459573400134, -1.2571707419142834627, -0.88779580801276813951, -0.51779245640493165581, 0, 0, 0},
00398     {0, 5.2468060541259898405e-05, 1.8940496384956984066, 0.066707207826664116634, 1.7508237418861856138, 1.8900280458873763845, 2.1844068317738409846, 0.76180412238695105476, 0.72372957011062566401, 0.89275082928758009437, 0.81250184984526685472, 0.71783981961882159517, 0, 0, 0}
00399   };
00400 const double CSCTFPtMethods::A_rho124RareCSCTF[5][15] = 
00401   {
00402     {0, 0, 0, 0, 0, 0, 0, 0, 0, 3.6863837484595949334, 2.3224336525694582178, 3.2507026803368823664, 0, 0, 0},
00403     {0, 0, 0, 0, 0, 0, 0, 0, 0, -6.9075821699787951502, -4.3426737934213210934, -6.2428017762167931082, 0, 0, 0},
00404     {0, 0, 0, 0, 0, 0, 0, 0, 0, 5.1741882361155777659, 3.6659747818805397124, 5.1137870308059385493, 0, 0, 0},
00405     {0, 0, 0, 0, 0, 0, 0, 0, 0, -0.8788429753762293517, -0.6687776952912940498, -0.89611818355296113392, 0, 0, 0},
00406     {0, 0, 0, 0, 0, 0, 0, 0, 0, 0.89064996021251574554, 0.79339716446029262542, 0.92504977817804989737, 0, 0, 0}
00407   };
00408 const double CSCTFPtMethods::A_rho134RareCSCTF[5][15] = 
00409   {
00410     {0, 0, 0, 0, 0, 0, 0, 0, 0, 3.4612440846722587473, 5.7154640478562965811, 6.1988763822017318716, 0, 0, 0},
00411     {0, 0, 0, 0, 0, 0, 0, 0, 0, -5.7252426310553330424, -10.734814097449786985, -11.773479219426080888, 0, 0, 0}, 
00412     {0, 0, 0, 0, 0, 0, 0, 0, 0, 4.1825411479975462825, 7.4929964403945605866, 8.4655628853855269256, 0, 0, 0},
00413     {0, 0, 0, 0, 0, 0, 0, 0, 0, -0.76190351147590362757, -1.349101837260204606, -1.4909015696715794963, 0, 0, 0},
00414     {0, 0, 0, 0, 0, 0, 0, 0, 0, 0.73180297067413413448, 0.85937126410475961347, 0.96408406745158758966, 0, 0, 0}
00415   };
00416 //
00417 const double CSCTFPtMethods::A_rho234CSCTF[5][15] = 
00418   {
00419     {0, 0, 0, 0, 0, 0, 0, 0, 0, 0.90545523934272553745, 0.87175008048078328482, 11.473027189906936485, 11.663806475851881572, 0.42441495626586411838, 0.32838673222117276129},
00420     {0, 0, 0, 0, 0, 0, 0, 0, 0, -0.44139458152853866535, -0.42393288245808863346, -22.394533628750806997, -23.701781706067023947, 0.3795109868989199331, 0.61276617249320963765},
00421     {0, 0, 0, 0, 0, 0, 0, 0, 0, 0.051844682585598461655, 0.049996912305763613338, 16.507523030995347568, 17.496995261382853215, -0.25771028946901503032, -0.35814371755433299649},
00422     {0, 0, 0, 0, 0, 0, 0, 0, 0, 2.7429208195040022389e-07, 9.0318461390404003453e-08, -3.1629404839892929502, -3.4008584782052286855, 0.032310851118482836197, 0.04444079467290308616},
00423     {0, 0, 0, 0, 0, 0, 0, 0, 0, -0.42794073513595692893, -0.42484700224018712156, 1.2597467573071601254, 1.2343273593218078155, -0.1335866415068663049, -0.10123375520631937297}
00424   };
00425  
00426 // Constructor
00427 CSCTFPtMethods::CSCTFPtMethods( const L1MuTriggerPtScale* ptScale )
00428   : trigger_scale( ptScale )
00429 {
00430 }
00431 
00432 // compute PT from dphi = A/Pt + B/Pt^2
00433 // this involves solving the quadratic equation and storing it as Pt
00434 // out of the two possible roots, the return value is always the larger value for Pt
00435 
00436 float CSCTFPtMethods::Pt2Stn(int type, float eta, float dphi, int fr) const 
00437 {
00438   float A = 0; 
00439   float B = 0;
00440   if (dphi == 0.0) dphi = 1.e-6;
00441   if (eta  < 0.0) eta  = static_cast<float>(fabs(static_cast<double>(eta)));
00442   if (dphi < 0.0) dphi = static_cast<float>(fabs(static_cast<double>(dphi)));
00444 #ifdef L1CSC_STANDALONE
00445   if (type == kME1andME2 && eta <= 1.25) fr = 1; 
00446 #else
00447   if (type == kME1andME2 && eta < 1.2) fr = 1; 
00448 #endif
00449   if (type >= kME1andME2 && 
00450       type <= kME2andMB2 && eta < 2.5) 
00451     {
00452       if (eta >= 0.0 && eta < 1.6)
00453         {
00454           A = AkLowEta_Fit2[type-1][0] + AkLowEta_Fit2[type-1][1]*eta 
00455             + AkLowEta_Fit2[type-1][2]*eta*eta + AkLowEta_Fit2[type-1][3]*eta*eta*eta;
00456           B = BkLowEta_Fit2[type-1][0] + BkLowEta_Fit2[type-1][1]*eta 
00457             + BkLowEta_Fit2[type-1][2]*eta*eta + BkLowEta_Fit2[type-1][3]*eta*eta*eta;
00458           if (fr >= 0 && fr <= 1) 
00459             {     
00460               A *= FRCorrLowEta[type-1][fr];
00461               B *= FRCorrLowEta[type-1][fr];
00462             } 
00463         }       
00464       
00465       if (eta >= 1.6 && eta < 2.5)
00466         {
00467           A = AkHighEta_Fit2[type-1][0] + AkHighEta_Fit2[type-1][1]*eta 
00468             + AkHighEta_Fit2[type-1][2]*eta*eta + AkHighEta_Fit2[type-1][3]*eta*eta*eta;
00469           B = BkHighEta_Fit2[type-1][0] + BkHighEta_Fit2[type-1][1]*eta 
00470             + BkHighEta_Fit2[type-1][2]*eta*eta + BkHighEta_Fit2[type-1][3]*eta*eta*eta;
00471         if (fr >= 0 && fr <= 1) 
00472           {
00473             A *= FRCorrHighEta[type-1][fr];
00474             B *= FRCorrHighEta[type-1][fr];
00475           } 
00476         }
00477       
00478       A *= kGlobalScaleFactor;
00479       B *= kGlobalScaleFactor;
00480       float Pt = (A + sqrt(A*A + 4.*dphi*B))/(2.*dphi);
00481 
00482       //      return (Pt>0.0) ? Pt : 0.0;
00483       return (Pt>trigger_scale->getPtScale()->getLowEdge(1)) ? Pt 
00484         : trigger_scale->getPtScale()->getLowEdge(1);
00485     }
00486     return 0.0;
00487 }
00488 
00489 float CSCTFPtMethods::Pt3Stn(int type, float eta, float dphi1, float dphi2, int fr ) const 
00490 {
00491     int ty1 = 0, ty2 =0;
00492 
00493     switch (type)
00494       {
00495       case 1 :
00496         ty1 = kME1andME2 -1; // subtype sets the right position for array A
00497         ty2 = kME2andME3 -1;
00498         break;
00499       case 2 :
00500         ty1 = kME1andME2 -1;
00501         ty2 = kME2andME4 -1;
00502         break;
00503       case 3 :
00504         ty1 = kME1andME3 -1;
00505         ty2 = kME3andME4 -1;
00506         break;
00507       case 4 :
00508         ty1 = kME2andME3 -1;
00509         ty2 = kME3andME4 -1;
00510         break;
00511       default:
00512         return 0.0;
00513       }
00514 
00515     // Switch to 2-Station measurement if dphi is too small
00516     // box cut around Pt of 10 GeV
00517     float Pt;
00518 //    if ( (fabs(static_cast<double>(dphi2))<0.004) &&
00519 //         (fabs(static_cast<double>(dphi1))<0.030)) {
00520     if ( fabs(static_cast<double>(dphi2))<0.004 ) 
00521       {
00522         Pt = Pt2Stn((ty1+1), eta, dphi1, fr);
00523       }
00524     else 
00525       {
00526         float c1=(-.2999 * (eta*eta*eta) + 2.030 * (eta*eta) - 4.235 * eta + 3.024) + 0.02;
00527         float c2=(-2.484 * (eta*eta*eta) + 14.43 * (eta*eta) - 27.66 * eta + 18.47)*.72;
00528         float r = 0.6; //correlation
00529         float A1 = 0; 
00530         float A2 = 0;
00531         
00532         if (dphi1 == 0.0) dphi1 = 1.e-6;
00533         if (dphi2 == 0.0) dphi2 = 1.e-6;    
00534         if (eta  < 0.0) eta  = static_cast<float>(fabs(static_cast<double>(eta)));
00535         if (eta >= 0.0 && eta < 1.6) 
00536           {
00537             A1 = AkLowEta_Fit1[ty1][0]         + AkLowEta_Fit1[ty1][1]*eta 
00538               + AkLowEta_Fit1[ty1][2]*eta*eta + AkLowEta_Fit1[ty1][3]*eta*eta*eta;
00539             A2 = AkLowEta_Fit1[ty2][0]         + AkLowEta_Fit1[ty2][1]*eta 
00540               + AkLowEta_Fit1[ty2][2]*eta*eta + AkLowEta_Fit1[ty2][3]*eta*eta*eta;
00541             if (fr >= 0 && fr <= 1) 
00542               {
00543                 A1 *= FRCorrLowEta[ty1][fr];
00544               }
00545           }
00546         
00547       if (eta >= 1.6 && eta < 2.5)
00548         {       
00549           A1 = AkHighEta_Fit1[ty1][0]         + AkHighEta_Fit1[ty1][1]*eta
00550             + AkHighEta_Fit1[ty1][2]*eta*eta + AkHighEta_Fit1[ty1][3]*eta*eta*eta;
00551           A2 = AkHighEta_Fit1[ty2][0]         + AkHighEta_Fit1[ty2][1]*eta
00552             + AkHighEta_Fit1[ty2][2]*eta*eta + AkHighEta_Fit1[ty2][3]*eta*eta*eta;
00553           if (fr >= 0 && fr <= 1) 
00554             {
00555               A1 *= FRCorrHighEta[ty1][fr];
00556             }
00557         }
00558       A1 *= kGlobalScaleFactor;
00559       A2 *= kGlobalScaleFactor;
00560       Pt = 1/((( -dphi1/c1/c1/A1+r*dphi2/c1/c2/A2+dphi1*r/c1/c2/A1-dphi2/c2/c2/A2)
00561                + sqrt( (dphi1/c1/c1/A1-r*dphi2/c1/c2/A2-dphi1*r/c1/A1/c2+dphi2/c2/c2/A2)
00562                        *(dphi1/c1/c1/A1-r*dphi2/c1/c2/A2-dphi1*r/c1/A1/c2+dphi2/c2/c2/A2)
00563                        + 8*(1-r*r)*(dphi1*dphi1/c1/c1/A1/A1-2*dphi1*dphi2*r/c1/A1/c2/A2
00564                                     +dphi2*dphi2/c2/c2/A2/A2)))/(4*(1-r*r)));
00565       
00566       } // end 2 or 3 station method
00567     //    if (Pt<0.0) Pt = 0.0;
00568     if (Pt<trigger_scale->getPtScale()->getLowEdge(1)) 
00569       Pt = trigger_scale->getPtScale()->getLowEdge(1);
00570 
00571     // switch to 2-stn Pt above 10 GeV:
00572     /*
00573       if (Pt>10.0) {
00574       switch (type)
00575       {
00576       case 1 :
00577       case 2 :
00578       Pt = Pt2Stn(1, eta, dphi1);
00579       break;
00580       case 3:
00581       Pt = Pt2Stn(2, eta, dphi1);
00582       break;
00583       case 4:
00584       Pt = Pt2Stn(3, eta, dphi1);
00585       }
00586       }
00587     */
00588     
00589     return Pt;
00590 }
00591 
00592 // Now for C.Yeh's Chisquare method
00593 
00594 /*
00595 type:
00596 sta1-2 = 0
00597 sta1-3 = 1
00598 sta2-3 = 2
00599 sta2-4 = 3
00600 sta1-2-3 = 4
00601 sta1-2-4 = 5
00602 
00603 2.0 <= pt < 140.0
00604 0.9 <= eta < 2.4
00605 
00606 Note: So far, 
00607 Pt2Stn only defined for types 0 and 1
00608 Pt3Stn only defined for types 4 and 5
00609 */
00610 
00611 //arrays for pt and eta bins
00612 
00613 const float CSCTFPtMethods::ptbins[29] = 
00614   {2.0, 2.5, 3.0, 3.5, 4.0, 4.5, 5.0, 6.0, 7.0, 8.0, 
00615    10.0, 12.0, 14.0, 16.0, 18.0, 20.0, 25.0, 30.0, 35.0, 40.0, 
00616    45.0, 50.0, 60.0, 70.0, 80.0, 90.0, 100.0, 120.0, 140.0};
00617 
00618 const float CSCTFPtMethods::etabins[16] = 
00619   {0.9, 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 
00620    1.7, 1.8, 1.9, 2.0, 2.1, 2.2, 2.3, 2.4};
00621 
00622 double CSCTFPtMethods::Likelihood2(double *phi12, double *par_m12, double *par_sig12, double *v) const
00623    {
00624        double fitval = 0.;
00625        double Pi  = acos(-1.);
00626        double m12 = 0;
00627        if(v[0] > par_m12[3]) 
00628          m12 = par_m12[0]/(v[0]-par_m12[3]) + par_m12[1]/(v[0]-par_m12[3])/(v[0]-par_m12[3]) + par_m12[2]; //mu12
00629        double sig12 = 0.1;
00630        if(v[0] > 0.) sig12 = par_sig12[0]/v[0] + par_sig12[1]/v[0]/v[0] + par_sig12[2];//sig12  
00631 //     
00632        fitval = -(phi12[0] - m12)*(phi12[0] - m12)/2./sig12/sig12;
00633        fitval = fitval - log(sig12) - 0.5*log(2*Pi) ;
00634 
00635       return fitval;   }
00636 double CSCTFPtMethods::Likelihood(double *phi12, double *phi23, double *par_m12, double *par_m23, double *par_sig12, double *par_sig23, double *par_rho, double *v) const
00637    {
00638        double fitval = 0.;
00639        //double Pi  = acos(-1.);
00640        double m12 = 0.;
00641        if(v[0] > par_m12[3]) 
00642          m12 = par_m12[0]/(v[0]-par_m12[3]) + par_m12[1]/(v[0]-par_m12[3])/(v[0]-par_m12[3]) + par_m12[2]; //mu12
00643        double m23 = 0.;
00644        if(v[0] > par_m23[3]) 
00645          m23 = par_m23[0]/(v[0]-par_m23[3]) + par_m23[1]/(v[0]-par_m23[3])/(v[0]-par_m23[3]) + par_m23[2]; //mu23
00646        double sig12 = 0.1;
00647        if(v[0] > 0.) sig12 = par_sig12[0]/v[0] + par_sig12[1]/v[0]/v[0] + par_sig12[2];//sig12  
00648        double sig23 = 0.1;
00649        if(v[0] > 0.) sig23 = par_sig23[0]/v[0] + par_sig23[1]/v[0]/v[0] + par_sig23[2];//sig23  
00650 
00651        double rho = (par_rho[0] + par_rho[1]*log(v[0]) + par_rho[2]*log(v[0])*log(v[0]) + par_rho[3]*log(v[0])*log(v[0])*log(v[0]))*exp(-par_rho[4]*log(v[0])); //rho  
00652        if(rho > 0.95) rho = 0.95;
00653        if(rho < -0.95) rho = -0.95;
00654 //
00655        fitval = (phi12[0] - m12)*(phi12[0] - m12)/sig12/sig12 + (phi23[0] - m23)*(phi23[0] - m23)/sig23/sig23;
00656        fitval = fitval - 2.*rho*(phi12[0] - m12)*(phi23[0] - m23)/sig12/sig23;
00657        fitval = fitval*(-1./(2.*(1-rho*rho)));
00658        fitval = fitval - log(sig12) - log(sig23) - 0.5*log(1-rho*rho) ;
00659 
00660       return fitval;
00661    }
00662 
00663 
00664 float CSCTFPtMethods::Pt2Stn2010(int type, float eta, float dphi, int fr) const 
00665 {
00666     if(fabs(eta) >= 2.4) eta = 2.35;  
00667     double PTsolv = 1.; // for muon plus hypothesis
00668     double PTsolvMinus = 1.;//for muon minus hypothesis
00669     for(int iETA = 0; iETA < 15; iETA++){
00670     if(fabs(eta) >= etabins[iETA] && fabs(eta) < etabins[iETA+1] ){
00671 
00672 // calculate curvers of mean and sigma 
00673               // calculate phi12 mean  
00674               double par1[4] = {0., 0., 0., 0.};
00675               //double phi12mean = fitf5(v, par1); //mu12 
00676               double par_sig1[3] = {0., 0., 0.};
00677         int iETA1 = iETA; 
00678         switch (type) // type = mode here
00679           {
00680           case 6 :  //1-2
00681                  if(fr == 1){
00682                    if(iETA1 < 3)iETA1 = 3;
00683                    if(iETA1 > 11)iETA1 = 11;
00684                    //if(fabs(eta)>1.56 && fabs(eta) < 1.6) iETA1 = iETA +1;
00685                    par1[0] = A_mu12Front[0][iETA1];
00686                    par1[1] = A_mu12Front[1][iETA1];
00687                    par1[2] = A_mu12Front[2][iETA1];
00688                    par1[3] = A_mu12Front[3][iETA1];
00689                    par_sig1[0] = A_sig12Front[0][iETA1];
00690                    par_sig1[1] = A_sig12Front[1][iETA1];
00691                    par_sig1[2] = A_sig12Front[2][iETA1];
00692                  }
00693                  if(fr == 0){
00694                    if(iETA1 < 1)iETA1 = 1;
00695                    if(iETA1 > 11)iETA1 = 11;
00696                    //if(fabs(eta)>1.56 && fabs(eta) < 1.6) iETA1 = iETA +1;
00697                    par1[0] = A_mu12Rare[0][iETA1];
00698                    par1[1] = A_mu12Rare[1][iETA1];
00699                    par1[2] = A_mu12Rare[2][iETA1];
00700                    par1[3] = A_mu12Rare[3][iETA1];
00701                    par_sig1[0] = A_sig12Rare[0][iETA1];
00702                    par_sig1[1] = A_sig12Rare[1][iETA1];
00703                    par_sig1[2] = A_sig12Rare[2][iETA1];
00704                  }
00705           break;
00706           case 7 :  //1-3
00707                  if(fr == 1){
00708                    if(iETA1 < 3)iETA1 = 3;
00709                    if(iETA1 > 11)iETA1 = 11;
00710                    //if(fabs(eta)>1.56 && fabs(eta) < 1.6) iETA1 = iETA +1;
00711                    par1[0] = A_mu13Front[0][iETA1];
00712                    par1[1] = A_mu13Front[1][iETA1];
00713                    par1[2] = A_mu13Front[2][iETA1];
00714                    par1[3] = A_mu13Front[3][iETA1];
00715                    par_sig1[0] = A_sig13Front[0][iETA1];
00716                    par_sig1[1] = A_sig13Front[1][iETA1];
00717                    par_sig1[2] = A_sig13Front[2][iETA1];
00718                  }
00719                  if(fr == 0){
00720                    if(iETA1 < 2)iETA1 = 2;
00721                    if(iETA1 > 11)iETA1 = 11;
00722                    //if(fabs(eta)>1.56 && fabs(eta) < 1.6) iETA1 = iETA +1;
00723                    par1[0] = A_mu13Rare[0][iETA1];
00724                    par1[1] = A_mu13Rare[1][iETA1];
00725                    par1[2] = A_mu13Rare[2][iETA1];
00726                    par1[3] = A_mu13Rare[3][iETA1];
00727                    par_sig1[0] = A_sig13Rare[0][iETA1];
00728                    par_sig1[1] = A_sig13Rare[1][iETA1];
00729                    par_sig1[2] = A_sig13Rare[2][iETA1];
00730                  }
00731           break;
00732           case 8 :  //2-3
00733                  if(iETA1 < 2)iETA1 = 2;
00734                  par1[0] = A_mu23[0][iETA1];
00735                  par1[1] = A_mu23[1][iETA1];
00736                  par1[2] = A_mu23[2][iETA1];
00737                  par1[3] = A_mu23[3][iETA1];
00738                  par_sig1[0] = A_sig23[0][iETA1];
00739                  par_sig1[1] = A_sig23[1][iETA1];
00740                  par_sig1[2] = A_sig23[2][iETA1];
00741           break;
00742           case 9 :  //2-4
00743                  if(iETA1 < 9)iETA1 = 9;
00744                  par1[0] = A_mu24[0][iETA1];
00745                  par1[1] = A_mu24[1][iETA1];
00746                  par1[2] = A_mu24[2][iETA1];
00747                  par1[3] = A_mu24[3][iETA1];
00748                  par_sig1[0] = A_sig24[0][iETA1];
00749                  par_sig1[1] = A_sig24[1][iETA1];
00750                  par_sig1[2] = A_sig24[2][iETA1];
00751           break;
00752           case 10 :  //3-4
00753                  if(iETA1 < 9)iETA1 = 9;
00754                  par1[0] = A_mu34[0][iETA1];
00755                  par1[1] = A_mu34[1][iETA1];
00756                  par1[2] = A_mu34[2][iETA1];
00757                  par1[3] = A_mu34[3][iETA1];
00758                  par_sig1[0] = A_sig34[0][iETA1];
00759                  par_sig1[1] = A_sig34[1][iETA1];
00760                  par_sig1[2] = A_sig34[2][iETA1];
00761           break;
00762           case 13 :  //1-4
00763                  if(iETA1 < 9)iETA1 = 9;
00764                  if(iETA1 > 12)iETA1 = 12;
00765                  if(fr == 1){
00766                    par1[0] = A_mu14Front[0][iETA1];
00767                    par1[1] = A_mu14Front[1][iETA1];
00768                    par1[2] = A_mu14Front[2][iETA1];
00769                    par1[3] = A_mu14Front[3][iETA1];
00770                    par_sig1[0] = A_sig14Front[0][iETA1];
00771                    par_sig1[1] = A_sig14Front[1][iETA1];
00772                    par_sig1[2] = A_sig14Front[2][iETA1];
00773                  }
00774                  if(fr == 0){
00775                    par1[0] = A_mu14Rare[0][iETA1];
00776                    par1[1] = A_mu14Rare[1][iETA1];
00777                    par1[2] = A_mu14Rare[2][iETA1];
00778                    par1[3] = A_mu14Rare[3][iETA1];
00779                    par_sig1[0] = A_sig14Rare[0][iETA1];
00780                    par_sig1[1] = A_sig14Rare[1][iETA1];
00781                    par_sig1[2] = A_sig14Rare[2][iETA1];
00782                  }
00783           break;
00784           case 12 :  //1-2-b1 = 2-b1
00785           case 14 :  //2-b1
00786                  if(iETA1 < 1)iETA1 = 1;
00787                  if(iETA1 > 2)iETA1 = 2;
00788                  par1[0] = A_mu52[0][iETA1];
00789                  par1[1] = A_mu52[1][iETA1];
00790                  par1[2] = A_mu52[2][iETA1];
00791                  par1[3] = A_mu52[3][iETA1];
00792                  par_sig1[0] = A_sig52[0][iETA1];
00793                  par_sig1[1] = A_sig52[1][iETA1];
00794                  par_sig1[2] = A_sig52[2][iETA1];
00795           break;
00796           //default:
00797           //return 0.0;
00798           }    
00799 
00800 //************* solve equation dLog(Likelihood)/dpt = 0 for muon + ;
00801           //if(fabs(dphi) >= 0.002)
00802           //if(fabs(dphi) >= 0.00)
00803           //if(fabs(dphi) >= 0.002 || (fabs(dphi) >= 0.01 && (type == 12 || type == 14)))
00804           //{
00805                   double pt = 140;
00806                   double dpt = 0.1;
00807                   double step = 5.;
00808                   while(pt > 2. ){
00809                       double par_phi12[1] = {dphi};
00810                       double v[1], lpt1_1, lpt1_2, lpt2_1, lpt2_2;
00811                        v[0] = 0; lpt1_1 = 1.; lpt1_2 = 2.; lpt2_1 = 1.; lpt2_2 = 2.; 
00812                          v[0] = pt;
00813                          lpt1_1 = Likelihood2(par_phi12, par1, par_sig1, v);
00814                          v[0] = pt + dpt;
00815                          lpt1_2 = Likelihood2(par_phi12, par1, par_sig1, v);
00816                       double lpt1 = (lpt1_2-lpt1_1)/dpt; // derivative at point pt1 = pt
00817                          v[0] = pt - step;
00818                          lpt2_1 = Likelihood2(par_phi12, par1, par_sig1, v);
00819                          v[0] = pt - step + dpt;
00820                          lpt2_2 = Likelihood2(par_phi12, par1, par_sig1, v);
00821                       double lpt2 = (lpt2_2-lpt2_1)/dpt; // derivative at point pt1 = pt - step
00822                       // calculate 2nd derivative at point pt-0.5*step, it should be > 0 if minimum
00823                       v[0] = pt - 0.5*step;
00824                       double fx = Likelihood2(par_phi12, par1, par_sig1, v);
00825                       v[0] = pt - 0.5*step + dpt;
00826                       double fxh = Likelihood2(par_phi12, par1, par_sig1, v);
00827                       v[0] = pt - 0.5*step + 2*dpt;
00828                       double fx2h = Likelihood2(par_phi12, par1, par_sig1, v);
00829     
00830                       double lpt2nd = -(fx2h + fx - 2*fxh)/dpt/dpt;
00831                       //if(lpt1*lpt2 <= 0 && lpt2nd < 0) std::cout << "lpt2nd < 0 dphi12 = " << dphi <<" PT = " << pt<< " eta =" << fabs(eta) << std::endl; 
00832                       //lpt2nd = 1.; // don't care about 2nd derivative
00833                       if(lpt1*lpt2 <= 0 && lpt2nd > 0){PTsolv = pt - 0.5*step; break;}// lpt = 0 between lpt1 and lpt2 => maximum pt_solv is a solution of the likelihood
00834 /*
00835                       if(pt == 140.){
00836                             v[0] = 200;
00837                             lpt2_1 = Likelihood2(par_phi12, par1, par_sig1, v);
00838                             v[0] = 200. + 5.;
00839                             lpt2_2 = Likelihood2(par_phi12, par1, par_sig1, v);
00840                             lpt2 = (lpt2_2-lpt2_1)/5.;
00841 
00842                             v[0] = 170.;
00843                             fx = Likelihood2(par_phi12, par1, par_sig1, v);
00844                             v[0] = 170.+5.;
00845                             fxh = Likelihood2(par_phi12, par1, par_sig1, v);
00846                             v[0] = 170.+2*5.;
00847                             fx2h = Likelihood2(par_phi12, par1, par_sig1, v);
00848                             lpt2nd = -(fx2h + fx - 2*fxh)/5./5.;
00849                       }
00850                       if(pt == 140. && lpt1*lpt2 <= 0 && lpt2nd > 0 && fabs(dphi) < 0.1 ){PTsolv = 137.5; break;}
00851 */
00852                       if(pt > 25) {dpt = 0.1; step = 5.;}
00853                       if(pt <= 25) {dpt = 0.01; step = 0.5;}
00854                       pt = pt - step;
00855                   }// end while
00856 //*********** end solve equation for muon plus
00857 //************* solve equation dLog(Likelihood)/dpt = 0 for muon minus ;
00858 // for one station method we know sing of muon: dphi > 0 for muon minus!!! => dphi = -dphi < 0
00859                   dphi = - dphi;
00860                   pt = 140;
00861                   dpt = 0.1;
00862                   step = 5.;
00863                   while(pt > 2. ){
00864                       double par_phi12[1] = {dphi};
00865                       double v[1], lpt1_1, lpt1_2, lpt2_1, lpt2_2;
00866                        v[0] = 0; lpt1_1 = 1.; lpt1_2 = 2.; lpt2_1 = 1.; lpt2_2 = 2.;
00867                          v[0] = pt;
00868                          lpt1_1 = Likelihood2(par_phi12, par1, par_sig1, v);
00869                          v[0] = pt + dpt;
00870                          lpt1_2 = Likelihood2(par_phi12, par1, par_sig1, v);
00871                       double lpt1 = (lpt1_2-lpt1_1)/dpt; // derivative at point pt1 = pt
00872                          v[0] = pt - step;
00873                          lpt2_1 = Likelihood2(par_phi12, par1, par_sig1, v);
00874                          v[0] = pt - step + dpt;
00875                          lpt2_2 = Likelihood2(par_phi12, par1, par_sig1, v);
00876                       double lpt2 = (lpt2_2-lpt2_1)/dpt; // derivative at point pt1 = pt - step
00877                       // calculate 2nd derivative at point pt-0.5*step, it should be > 0 if minimum
00878                       v[0] = pt - 0.5*step;
00879                       double fx = Likelihood2(par_phi12, par1, par_sig1, v);
00880                       v[0] = pt - 0.5*step + dpt;
00881                       double fxh = Likelihood2(par_phi12, par1, par_sig1, v);
00882                       v[0] = pt - 0.5*step + 2*dpt;
00883                       double fx2h = Likelihood2(par_phi12, par1, par_sig1, v);
00884     
00885                       double lpt2nd = -(fx2h + fx - 2*fxh)/dpt/dpt;
00886 
00887                       if(lpt1*lpt2 <= 0 && lpt2nd > 0){PTsolvMinus = pt - 0.5*step; break;}// lpt = 0 between lpt1 and lpt2 => maximum pt_solv is a solution of the likelihood
00888 /*
00889                       if(pt == 140.){
00890                             v[0] = 200;
00891                             lpt2_1 = Likelihood2(par_phi12, par1, par_sig1, v);
00892                             v[0] = 200. + 5.;
00893                             lpt2_2 = Likelihood2(par_phi12, par1, par_sig1, v);
00894 
00895                             lpt2 = (lpt2_2-lpt2_1)/5.;
00896 
00897                             v[0] = 170.;
00898                             fx = Likelihood2(par_phi12, par1, par_sig1, v);
00899                             v[0] = 170.+5.;
00900                             fxh = Likelihood2(par_phi12, par1, par_sig1, v);
00901                             v[0] = 170.+2*5.;
00902                             fx2h = Likelihood2(par_phi12, par1, par_sig1, v);
00903                             lpt2nd = -(fx2h + fx - 2*fxh)/5./5.;
00904                       }
00905                       if(pt == 140. && lpt1*lpt2 <= 0 && lpt2nd > 0 && fabs(dphi) < 0.1){PTsolvMinus = 137.5; break;}
00906 */
00907                       if(pt > 25) {dpt = 0.1; step = 5.;}
00908                       if(pt <= 25) {dpt = 0.01; step = 0.5;}
00909                       pt = pt - step;
00910                   }// end while
00911 //          }// if(fabs(dphi) >= 0.002)
00912 //          else 
00913 //          {PTsolv = 137.5;} 
00914 
00915 //*********** end solve equation for muon minus 
00916           PTsolv = (PTsolv > PTsolvMinus) ? PTsolv: PTsolvMinus; // select Maximum solution from muon plus and moun minus hypotesis
00917           PTsolv = PTsolv*1.2;
00918           if(PTsolv > 137.5) PTsolv = 137.5;
00919           if(fabs(dphi) <= 0.002 && PTsolv < 120.)PTsolv = 140.;
00920           if( fabs(dphi) <= 0.01 && (type == 12 || type == 14) && PTsolv < 120.)PTsolv = 140.;
00921           dphi = - dphi; //return to correct sing dphi
00922 
00923     } //if(fabs(eta_TracMy) 
00924     } //end "for by iETA"
00925 
00926     float Pt = PTsolv;
00927     if(Pt > 10 && fabs(dphi) >= 0.1 ) std::cout << "iF = 0 for dphi = " << dphi <<" and Pt = " << Pt << std::endl;
00928                                                                     
00929     //if(Pt > 100 && (type == 12 || type == 14) && fabs(eta) <= 1.2 && dphi > 0.015 )std::cout << "dphi = " << dphi << " eta = " << eta << std::endl; 
00930     if(Pt < 10 && (type == 12 || type == 14) && fabs(eta) <= 1.2 && dphi < 0.01)std::cout << "dphi = " << dphi << " eta = " << eta <<   std::endl; 
00931     //      return (Pt>0.0) ? Pt : 0.0;
00932     return (Pt>trigger_scale->getPtScale()->getLowEdge(1)) ? Pt 
00933     : trigger_scale->getPtScale()->getLowEdge(1);
00934 }
00935 float CSCTFPtMethods::Pt3Stn2010(int type, float eta, float dphi1, float dphi2, int fr ) const 
00936 {
00937 
00938     if(fabs(eta) >= 2.4)eta = 2.35;
00939     float Pt = 0.;
00940     double PTsolv = 1.; // for muon plus hypothesis
00941     double PTsolvMinus = 1.;//for muon minus hypothesis
00942     for(int iETA = 0; iETA < 15; iETA++){
00943     if(fabs(eta) >= etabins[iETA] && fabs(eta) < etabins[iETA+1] ){
00944 
00945 // calculate curvers of mean and sigma 
00946               // calculate phi12 mean  
00947               double par1[4] = {0., 0., 0., 0.};
00948               //double phi12mean = fitf5(v, par1); //mu12 
00949               double par_sig1[3] = {0., 0., 0.};
00950               // calculate phi23 mean  
00951               double par2[4] = {0., 0., 0., 0.};
00952               // calculate phi23 sig
00953               double par_sig2[3] = {0., 0., 0.};
00954               // calculate correlation rho
00955               double par_rho[5] = {0., 0., 0., 0., 0.};
00956               int iETA1 = iETA;
00957               int iETA2 = iETA;
00958         switch (type) // type = mode here
00959           {
00960           case 2 :  //1-2-3
00961                  if(fr == 1){
00962                    if(iETA1 < 3)iETA1 = 3;
00963                    if(iETA1 > 11)iETA1 = 11;
00964                    //if(fabs(eta)>1.56 && fabs(eta) < 1.6) iETA1 = iETA +1;
00965                    par1[0] = A_mu12Front[0][iETA1];
00966                    par1[1] = A_mu12Front[1][iETA1];
00967                    par1[2] = A_mu12Front[2][iETA1];
00968                    par1[3] = A_mu12Front[3][iETA1];
00969                    par_sig1[0] = A_sig12Front[0][iETA1];
00970                    par_sig1[1] = A_sig12Front[1][iETA1];
00971                    par_sig1[2] = A_sig12Front[2][iETA1];
00972                    par_rho[0] = A_rho123FrontCSCTF[0][iETA1];
00973                    par_rho[1] = A_rho123FrontCSCTF[1][iETA1];
00974                    par_rho[2] = A_rho123FrontCSCTF[2][iETA1];
00975                    par_rho[3] = A_rho123FrontCSCTF[3][iETA1];
00976                    par_rho[4] = A_rho123FrontCSCTF[4][iETA1];
00977                  }
00978                  if(fr == 0){
00979                    if(iETA1 < 1)iETA1 = 1;
00980                    if(iETA1 > 11)iETA1 = 11;
00981                    //if(fabs(eta)>1.56 && fabs(eta) < 1.6) iETA1 = iETA +1;
00982                    par1[0] = A_mu12Rare[0][iETA1];
00983                    par1[1] = A_mu12Rare[1][iETA1];
00984                    par1[2] = A_mu12Rare[2][iETA1];
00985                    par1[3] = A_mu12Rare[3][iETA1];
00986                    par_sig1[0] = A_sig12Rare[0][iETA1];
00987                    par_sig1[1] = A_sig12Rare[1][iETA1];
00988                    par_sig1[2] = A_sig12Rare[2][iETA1];
00989                    par_rho[0] = A_rho123RareCSCTF[0][iETA1];
00990                    par_rho[1] = A_rho123RareCSCTF[1][iETA1];
00991                    par_rho[2] = A_rho123RareCSCTF[2][iETA1];
00992                    par_rho[3] = A_rho123RareCSCTF[3][iETA1];
00993                    par_rho[4] = A_rho123RareCSCTF[4][iETA1];
00994                  }
00995                  if(iETA2 < 2)iETA2 = 2;
00996                  par2[0] = A_mu23[0][iETA2];
00997                  par2[1] = A_mu23[1][iETA2];
00998                  par2[2] = A_mu23[2][iETA2];
00999                  par2[3] = A_mu23[3][iETA2];
01000                  par_sig2[0] = A_sig23[0][iETA2];
01001                  par_sig2[1] = A_sig23[1][iETA2];
01002                  par_sig2[2] = A_sig23[2][iETA2];
01003 
01004           break;
01005           case 3 : //1-2-4
01006                  if(fr == 1){
01007                    if(iETA1 < 3)iETA1 = 3;
01008                    if(iETA1 > 11)iETA1 = 11;
01009                    par1[0] = A_mu12Front[0][iETA1];
01010                    par1[1] = A_mu12Front[1][iETA1];
01011                    par1[2] = A_mu12Front[2][iETA1];
01012                    par1[3] = A_mu12Front[3][iETA1];
01013                    par_sig1[0] = A_sig12Front[0][iETA1];
01014                    par_sig1[1] = A_sig12Front[1][iETA1];
01015                    par_sig1[2] = A_sig12Front[2][iETA1];
01016                    par_rho[0] = A_rho124FrontCSCTF[0][iETA1];
01017                    par_rho[1] = A_rho124FrontCSCTF[1][iETA1];
01018                    par_rho[2] = A_rho124FrontCSCTF[2][iETA1];
01019                    par_rho[3] = A_rho124FrontCSCTF[3][iETA1];
01020                    par_rho[4] = A_rho124FrontCSCTF[4][iETA1];
01021                  }
01022                  if(fr == 0){
01023                    if(iETA1 < 1)iETA1 = 1;
01024                    if(iETA1 > 11)iETA1 = 11;
01025                    par1[0] = A_mu12Rare[0][iETA1];
01026                    par1[1] = A_mu12Rare[1][iETA1];
01027                    par1[2] = A_mu12Rare[2][iETA1];
01028                    par1[3] = A_mu12Rare[3][iETA1];
01029                    par_sig1[0] = A_sig12Rare[0][iETA1];
01030                    par_sig1[1] = A_sig12Rare[1][iETA1];
01031                    par_sig1[2] = A_sig12Rare[2][iETA1];
01032                    par_rho[0] = A_rho124RareCSCTF[0][iETA1];
01033                    par_rho[1] = A_rho124RareCSCTF[1][iETA1];
01034                    par_rho[2] = A_rho124RareCSCTF[2][iETA1];
01035                    par_rho[3] = A_rho124RareCSCTF[3][iETA1];
01036                    par_rho[4] = A_rho124RareCSCTF[4][iETA1];
01037                  }
01038                  if(iETA2 < 9)iETA2 = 9;
01039                  par2[0] = A_mu24[0][iETA2];
01040                  par2[1] = A_mu24[1][iETA2];
01041                  par2[2] = A_mu24[2][iETA2];
01042                  par2[3] = A_mu24[3][iETA2];
01043                  par_sig2[0] = A_sig24[0][iETA2];
01044                  par_sig2[1] = A_sig24[1][iETA2];
01045                  par_sig2[2] = A_sig24[2][iETA2];
01046           break;
01047           case 4 : //1-3-4
01048                  if(fr == 1){
01049                    if(iETA1 < 3)iETA1 = 3;
01050                    if(iETA1 > 11)iETA1 = 11;
01051                    par1[0] = A_mu13Front[0][iETA1];
01052                    par1[1] = A_mu13Front[1][iETA1];
01053                    par1[2] = A_mu13Front[2][iETA1];
01054                    par1[3] = A_mu13Front[3][iETA1];
01055                    par_sig1[0] = A_sig13Front[0][iETA1];
01056                    par_sig1[1] = A_sig13Front[1][iETA1];
01057                    par_sig1[2] = A_sig13Front[2][iETA1];
01058                    par_rho[0] = A_rho134FrontCSCTF[0][iETA1];
01059                    par_rho[1] = A_rho134FrontCSCTF[1][iETA1];
01060                    par_rho[2] = A_rho134FrontCSCTF[2][iETA1];
01061                    par_rho[3] = A_rho134FrontCSCTF[3][iETA1];
01062                    par_rho[4] = A_rho134FrontCSCTF[4][iETA1];                 
01063                  }
01064                  if(fr == 0){
01065                    if(iETA1 < 2)iETA1 = 2;
01066                    if(iETA1 > 11)iETA1 = 11;
01067                    par1[0] = A_mu13Rare[0][iETA1];
01068                    par1[1] = A_mu13Rare[1][iETA1];
01069                    par1[2] = A_mu13Rare[2][iETA1];
01070                    par1[3] = A_mu13Rare[3][iETA1];
01071                    par_sig1[0] = A_sig13Rare[0][iETA1];
01072                    par_sig1[1] = A_sig13Rare[1][iETA1];
01073                    par_sig1[2] = A_sig13Rare[2][iETA1];
01074                    par_rho[0] = A_rho134RareCSCTF[0][iETA1];
01075                    par_rho[1] = A_rho134RareCSCTF[1][iETA1];
01076                    par_rho[2] = A_rho134RareCSCTF[2][iETA1];
01077                    par_rho[3] = A_rho134RareCSCTF[3][iETA1];
01078                    par_rho[4] = A_rho134RareCSCTF[4][iETA1];
01079                  }
01080                  if(iETA2 < 9)iETA2 = 9;
01081                  par2[0] = A_mu34[0][iETA2];
01082                  par2[1] = A_mu34[1][iETA2];
01083                  par2[2] = A_mu34[2][iETA2];
01084                  par2[3] = A_mu34[3][iETA2];
01085                  par_sig2[0] = A_sig34[0][iETA2];
01086                  par_sig2[1] = A_sig34[1][iETA2];
01087                  par_sig2[2] = A_sig34[2][iETA2];
01088           break;
01089           case 5 ://2-3-4
01090                  if(iETA1 < 9)iETA1 = 9;
01091                  par1[0] = A_mu23[0][iETA1];
01092                  par1[1] = A_mu23[1][iETA1];
01093                  par1[2] = A_mu23[2][iETA1];
01094                  par1[3] = A_mu23[3][iETA1];
01095                  par_sig1[0] = A_sig23[0][iETA1];
01096                  par_sig1[1] = A_sig23[1][iETA1];
01097                  par_sig1[2] = A_sig23[2][iETA1];
01098                  par_rho[0] = A_rho234CSCTF[0][iETA1];
01099                  par_rho[1] = A_rho234CSCTF[1][iETA1];
01100                  par_rho[2] = A_rho234CSCTF[2][iETA1];
01101                  par_rho[3] = A_rho234CSCTF[3][iETA1];
01102                  par_rho[4] = A_rho234CSCTF[4][iETA1];
01103 
01104                  par2[0] = A_mu34[0][iETA1];
01105                  par2[1] = A_mu34[1][iETA1];
01106                  par2[2] = A_mu34[2][iETA1];
01107                  par2[3] = A_mu34[3][iETA1];
01108                  par_sig2[0] = A_sig34[0][iETA1];
01109                  par_sig2[1] = A_sig34[1][iETA1];
01110                  par_sig2[2] = A_sig34[2][iETA1];
01111           break;
01112           //default:
01113           //return 0.0;
01114           }
01115 
01116         // Switch to 2-Station measurement if dphi is too small
01117         // box cut around Pt of 10 GeV
01118         if ( fabs(static_cast<double>(dphi2))<0.004 ) 
01119           {
01120             if(type == 2 || type == 3) type = 6; // 1-2-3(or 4) -> 1-2 
01121             if(type == 4) type = 7; // 1-3-4 -> 1-3
01122             if(type == 5) type = 8; // 2-3-4 -> 2-3
01123             if(type == 12) type = 14; //1-2-b1 -> 2-b1 
01124             Pt = Pt2Stn2010(type, eta, dphi1, fr);
01125           }
01126         else 
01127           {
01128 //************* solve equation dLog(Likelihood)/dpt = 0 for muon + ;
01129                   double pt = 140;
01130                   double dpt = 0.1;
01131                   double step = 5.;
01132                   while(pt > 2. ){
01133                       double par_phi12[1] = {dphi1};
01134                       double par_phi23[1] = {dphi2};
01135                       double v[1], lpt1_1, lpt1_2, lpt2_1, lpt2_2;
01136                        v[0] = 0; lpt1_1 = 1.; lpt1_2 = 2.; lpt2_1 = 1.; lpt2_2 = 2.; 
01137                          v[0] = pt;
01138                          lpt1_1 = Likelihood(par_phi12, par_phi23, par1, par2, par_sig1, par_sig2, par_rho, v);
01139                          v[0] = pt + dpt;
01140                          lpt1_2 = Likelihood(par_phi12, par_phi23, par1, par2, par_sig1, par_sig2, par_rho, v);
01141                       double lpt1 = (lpt1_2-lpt1_1)/dpt; // derivative at point pt1 = pt
01142                          v[0] = pt - step;
01143                          lpt2_1 = Likelihood(par_phi12, par_phi23, par1, par2, par_sig1, par_sig2, par_rho, v);
01144                          v[0] = pt - step + dpt;
01145                          lpt2_2 = Likelihood(par_phi12, par_phi23, par1, par2, par_sig1, par_sig2, par_rho, v);
01146                       double lpt2 = (lpt2_2-lpt2_1)/dpt; // derivative at point pt1 = pt - step
01147                       // calculate 2nd derivative at point pt-0.5*step, it should be > 0 if minimum
01148                       v[0] = pt - 0.5*step;
01149                       double fx = Likelihood(par_phi12, par_phi23, par1, par2, par_sig1, par_sig2, par_rho, v);
01150                       v[0] = pt - 0.5*step + dpt;
01151                       double fxh = Likelihood(par_phi12, par_phi23, par1, par2, par_sig1, par_sig2, par_rho, v);
01152                       v[0] = pt - 0.5*step + 2*dpt;
01153                       double fx2h = Likelihood(par_phi12, par_phi23, par1, par2, par_sig1, par_sig2, par_rho, v);
01154     
01155                       double lpt2nd = -(fx2h + fx - 2*fxh)/dpt/dpt;
01156 
01157                       if(lpt1*lpt2 <= 0 && lpt2nd > 0){PTsolv = pt - 0.5*step; break;}// lpt = 0 between lpt1 and lpt2 => maximum pt_solv is a solution of the likelihood
01158 /*
01159                       if(pt == 140.){
01160                            v[0] = 200.;
01161                            lpt2_1 = Likelihood(par_phi12, par_phi23, par1, par2, par_sig1, par_sig2, par_rho, v);
01162                            v[0] = 200.+ 5.;
01163                            lpt2_2 = Likelihood(par_phi12, par_phi23, par1, par2, par_sig1, par_sig2, par_rho, v);
01164                            lpt2 = (lpt2_2-lpt2_1)/5.;
01165                             v[0] = 170.;
01166                             fx = Likelihood(par_phi12, par_phi23, par1, par2, par_sig1, par_sig2, par_rho, v);
01167                             v[0] = 170.+5.;
01168                             fxh = Likelihood(par_phi12, par_phi23, par1, par2, par_sig1, par_sig2, par_rho, v);
01169                             v[0] = 170.+2*5.;
01170                             fx2h = Likelihood(par_phi12, par_phi23, par1, par2, par_sig1, par_sig2, par_rho, v);
01171                             lpt2nd = -(fx2h + fx - 2*fxh)/5./5.;
01172                       }
01173 
01174                       if(pt == 140. && lpt1*lpt2 <= 0 && lpt2nd > 0){PTsolv = 137.5; break;}
01175 */
01176                       //double rho = fitfrho(v, par_rho); //rho 
01177                       if(pt > 25) {dpt = 0.1; step = 5.;}
01178                       if(pt <= 25) {dpt = 0.01; step = 0.5;}
01179                       pt = pt - step;
01180                   }// end while
01181 //*********** end solve equation for muon plus
01182 //************* solve equation dLog(Likelihood)/dpt = 0 for muon minus ;
01183 // for one station method we know sing of muon: dphi1 > 0 for muon minus!!! => dphi1 = -dphi1 < 0
01184                   dphi1 = - dphi1;
01185                   dphi2 = - dphi2;      
01186                   pt = 140;
01187                   dpt = 0.1;
01188                   step = 5.;
01189                   while(pt > 2. ){
01190                       double par_phi12[1] = {dphi1};
01191                       double par_phi23[1] = {dphi2};
01192                       double v[1], lpt1_1, lpt1_2, lpt2_1, lpt2_2;
01193                        v[0] = 0; lpt1_1 = 1.; lpt1_2 = 2.; lpt2_1 = 1.; lpt2_2 = 2.; 
01194                          v[0] = pt;
01195                          lpt1_1 = Likelihood(par_phi12, par_phi23, par1, par2, par_sig1, par_sig2, par_rho, v);
01196                          v[0] = pt + dpt;
01197                          lpt1_2 = Likelihood(par_phi12, par_phi23, par1, par2, par_sig1, par_sig2, par_rho, v);
01198                       double lpt1 = (lpt1_2-lpt1_1)/dpt; // derivative at point pt1 = pt
01199                          v[0] = pt - step;
01200                          lpt2_1 = Likelihood(par_phi12, par_phi23, par1, par2, par_sig1, par_sig2, par_rho, v);
01201                          v[0] = pt - step + dpt;
01202                          lpt2_2 = Likelihood(par_phi12, par_phi23, par1, par2, par_sig1, par_sig2, par_rho, v);
01203                       double lpt2 = (lpt2_2-lpt2_1)/dpt; // derivative at point pt1 = pt - step
01204                       // calculate 2nd derivative at point pt-0.5*step, it should be > 0 if minimum
01205                       v[0] = pt - 0.5*step;
01206                       double fx = Likelihood(par_phi12, par_phi23, par1, par2, par_sig1, par_sig2, par_rho, v);
01207                       v[0] = pt - 0.5*step + dpt;
01208                       double fxh = Likelihood(par_phi12, par_phi23, par1, par2, par_sig1, par_sig2, par_rho, v);
01209                       v[0] = pt - 0.5*step + 2*dpt;
01210                       double fx2h = Likelihood(par_phi12, par_phi23, par1, par2, par_sig1, par_sig2, par_rho, v);
01211     
01212                       double lpt2nd = -(fx2h + fx - 2*fxh)/dpt/dpt;
01213 
01214                       if(lpt1*lpt2 <= 0 && lpt2nd > 0){PTsolvMinus = pt - 0.5*step; break;}// lpt = 0 between lpt1 and lpt2 => maximum pt_solv is a solution of the likelihood
01215                       //if(iETA == 3 && v[0] < 4 && v[0] > 3) cout << "m12 = " << fitf5(v, par1) << " sig12 = " << fitf2(v, par_sig1) << endl;
01217 /*
01218                       if(pt == 140.){
01219                            v[0] = 200.;
01220                            lpt2_1 = Likelihood(par_phi12, par_phi23, par1, par2, par_sig1, par_sig2, par_rho, v);
01221                            v[0] = 200.+ 5.;
01222                            lpt2_2 = Likelihood(par_phi12, par_phi23, par1, par2, par_sig1, par_sig2, par_rho, v);
01223                            lpt2 = (lpt2_2-lpt2_1)/5.;
01224                             v[0] = 170.;
01225                             fx = Likelihood(par_phi12, par_phi23, par1, par2, par_sig1, par_sig2, par_rho, v);
01226                             v[0] = 170.+5.;
01227                             fxh = Likelihood(par_phi12, par_phi23, par1, par2, par_sig1, par_sig2, par_rho, v);
01228                             v[0] = 170.+2*5.;
01229                             fx2h = Likelihood(par_phi12, par_phi23, par1, par2, par_sig1, par_sig2, par_rho, v);
01230                             lpt2nd = -(fx2h + fx - 2*fxh)/5./5.;
01231                       }
01232                       if(pt == 140. && lpt1*lpt2 <= 0 && lpt2nd > 0){PTsolvMinus = 137.5; break;}
01233 */
01234                       //double rho = fitfrho(v, par_rho); //rho 
01235                       if(pt > 25) {dpt = 0.1; step = 5.;}
01236                       if(pt <= 25) {dpt = 0.01; step = 0.5;}
01237                       pt = pt - step;
01238                   }// end while
01239 //*********** end solve equation for muon minus 
01240                   PTsolv = (PTsolv > PTsolvMinus) ? PTsolv: PTsolvMinus; // select Maximum solution from muon plus and moun minus hypotesis
01241                   PTsolv = PTsolv*1.2; // correction to have 90% efficiency for trigger cuts
01242                   if(PTsolv > 137.5) PTsolv = 137.5;
01243                   //if(fabs(dphi1) < 0.002 && fabs(dphi2) <= CutPhi23){PTsolv = 140;}
01244                   dphi1 = - dphi1; //return to correct sing dphi
01245                   dphi2 = - dphi2; //return to correct sing dphi
01246                   Pt = PTsolv;
01247           } // end 2 or 3 station method
01248     }}
01249            // if ( fabs(static_cast<double>(dphi2))>0.004 ) std::cout << "Pt = " << Pt << " Mode = " << type << " dphi1 = " << dphi1 << " dphi2 = " << dphi2 << std::endl;
01250         if (Pt<trigger_scale->getPtScale()->getLowEdge(1)) 
01251           Pt = trigger_scale->getPtScale()->getLowEdge(1);
01252     
01253     return Pt;
01254 }
01255 
01256 // These arrays contain mean dphi values for each pt and eta bin.  
01257 // They are split into fr=0 and fr=1.
01258 
01259 const float CSCTFPtMethods::dphifr0[4][15][28] = 
01260   {
01261     {
01262       {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
01263       {-1, -1, 1253.47, -174.543, -90.845, -36.8835, -13.2793, 3.28278, 11.1568, 12.9352, 12.8576, 12.322, 11.7342, 10.5244, 10.0687, 8.32785, 7.13888, 6.20492, 5.85733, 4.75137, 4.77209, 4.02553, 3.69785, 3.28493, 2.99132, 2.55496, 2.22965, 1.98868},
01264       {-1, -1, -158.232, -135.974, -59.1458, -5.19565, 12.8464, 23.5714, 24.0722, 24.6097, 21.0736, 19.6627, 17.2412, 15.6857, 14.308, 12.6231, 10.4509, 9.9933, 8.24835, 6.92309, 6.57742, 5.69463, 4.74087, 3.78364, 4.21154, 3.27273, 3.10333, 2.60822},
01265       {-1, -1, -187.544, -42.1843, 40.6221, 54.483, 56.7803, 53.5989, 48.8252, 41.8441, 35.5835, 30.7605, 26.9772, 24.2051, 21.5163, 18.7697, 15.6471, 12.8676, 10.9852, 9.93952, 9.17785, 7.91962, 6.87614, 5.85018, 5.10393, 4.67222, 4.02645, 3.547},
01266       {-1, -93.4379, -64.9443, 70.5053, 85.4571, 85.2642, 77.1782, 67.8264, 59.6792, 50.1799, 41.1682, 35.1241, 30.6299, 27.1403, 24.6307, 20.6204, 17.277, 14.4064, 12.6264, 11.5938, 10.0659, 8.76273, 7.54754, 6.535, 5.69304, 5.44025, 4.61045, 3.87704},
01267       {-1, 65.2747, 120.239, 129.902, 115.172, 108.511, 92.9557, 77.3499, 66.5613, 56.856, 45.7164, 39.0012, 33.7201, 30.13, 26.8649, 22.9335, 18.2273, 16.5989, 13.9109, 12.3409, 10.9531, 9.90102, 8.25129, 7.1479, 6.71622, 5.77461, 5.05741, 4.38687},
01268       {1292.54, 139.196, 169.261, 134.554, 129.417, 118.125, 97.2182, 80.5974, 70.3365, 58.7809, 48.6667, 40.7918, 34.917, 30.8781, 28.1953, 23.2852, 19.1667, 14.6401, 14.0676, 12.5932, 11.4459, 9.67685, 8.55686, 7.49359, 6.3961, 6.02812, 5.26887, 4.55128},
01269       {396.903, 408.642, 331.11, 291.154, 244.6, 225.93, 191.418, 159.273, 137.156, 113.559, 92.3122, 77.8488, 67.4872, 57.885, 53.6376, 45.4894, 37.1931, 30.9091, 26.9629, 22.8523, 20.6881, 17.8588, 16.0515, 14.2847, 11.9988, 10.9918, 9.58895, 8.28621},
01270       {634.157, 376.909, 303.487, 269.928, 237.553, 221.337, 183.49, 151.95, 128.961, 108.078, 88.4642, 74.0832, 64.4987, 56.8622, 51.0964, 43.2635, 34.8376, 30.0291, 25.2508, 22.9892, 20.3061, 17.1065, 15.08, 13.1487, 11.3403, 9.8765, 8.67395, 7.70727},
01271       {370.029, 334.631, 284.161, 247.876, 220.082, 190.31, 160.042, 139.043, 119.323, 96.8377, 79.0452, 67.6644, 58.5129, 51.8932, 46.4433, 38.2747, 32.5855, 28.1408, 23.2895, 20.8651, 18.3079, 16.0197, 13.33, 10.7823, 10.5876, 9.3446, 8.18957, 7.13109},
01272       {336.807, 315.636, 263.106, 227.678, 196.301, 172.476, 144.296, 122.167, 107.034, 88.4252, 71.6369, 61.0729, 53.1695, 47.213, 42.3058, 36.058, 27.7351, 25.8168, 21.0509, 19.0587, 16.2367, 14.7198, 12.368, 10.5611, 9.43783, 8.64059, 7.30456, 6.50177},
01273       {562.84, 281.367, 231.744, 197.26, 175.838, 154, 132.991, 112.797, 97.7521, 80.0722, 66.1777, 53.8695, 47.5855, 42.4901, 36.5583, 31.8172, 24.5935, 22.6, 19.9488, 17.8189, 15.1107, 13.2519, 10.8772, 10.1643, 8.80709, 8.00448, 6.02758, 5.14123},
01274       {289.896, 258.601, 215.353, 187.786, 154.972, 143.654, 120.207, 106.698, 88.6531, 75.9, 59.003, 52.4794, 41.7089, 38.3974, 35.4884, 28.7295, 17.5001, 31.3222, 18.7727, 15.4322, 11.8692, 10.5938, 8.97935, 9.22087, 9.05559, 6.60579, 6.4547, 2.855},
01275       {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
01276       {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}
01277     },
01278     {
01279       {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
01280       {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
01281       {-1, -1, -1, -158, -149.043, -92.0094, -28.6132, 27.8399, 27.5444, 27.5802, 37.07, 24.0291, 24.9195, 20.9748, 18.7762, 22.7466, 14.5682, 28.4577, 11.0263, 29.5137, 7.04546, 7.38512, 7.724, 6.71233, 27.4036, 4.52113, 4.33911, 4.07762},
01282       {-1, -1, -265.6, -144.969, -56.137, -4.4, 30.8879, 44.1075, 45.163, 42.5274, 38.7436, 34.8538, 31.1479, 28.8793, 25.3394, 22.5102, 19.0281, 15.6608, 13.3702, 12.0331, 11.1189, 10.2568, 8.57414, 7.45946, 6.29798, 6.15319, 5.30089, 4.56149},
01283       {-1, -79.5241, -105.242, -29.2478, 33.9726, 60.1505, 67.6247, 67.8742, 63.3538, 55.8014, 47.6468, 41.3991, 36.6279, 32.9551, 29.9351, 25.5988, 21.3793, 17.7866, 15.8878, 14.6346, 12.5951, 11.084, 9.73607, 8.64701, 7.50803, 6.97295, 5.98046, 5.18782},
01284       {-1, -40.3713, 42.1945, 92.9089, 114.43, 113.72, 100.286, 89.219, 77.4508, 66.7699, 55.0464, 47.6297, 41.3828, 36.4328, 33.2834, 28.5722, 23.0725, 21.5406, 18.1268, 16.2328, 13.9065, 12.2744, 10.5509, 9.47753, 8.48564, 7.63124, 6.41131, 5.79205},
01285       {-34.9, 73.3963, 142.631, 145.951, 142.318, 129.656, 111.93, 94.6978, 85.5312, 71.8926, 60.7711, 50.9572, 44.9347, 39.6302, 36.0288, 30.04, 24.3307, 21.7811, 18.3903, 16.2716, 14.7719, 12.8338, 11.2943, 9.72188, 8.62582, 7.73165, 6.73526, 5.93205},
01286       {7368.83, 502.793, 291.618, 282.933, 244.114, 233.502, 201.302, 172.276, 148.921, 125.128, 102.477, 86.3142, 75.3546, 64.468, 60.2395, 50.8744, 42.101, 35.6805, 30.7703, 26.6287, 23.2273, 20.6701, 17.2109, 15.2909, 13.682, 12.3394, 11.0076, 9.19048},
01287       {82.7323, 379.23, 270.613, 264.088, 246.284, 233.18, 190.228, 162.832, 141.282, 119.001, 96.1594, 81.5045, 71.5023, 63.5261, 57.4827, 48.7483, 38.0439, 34.4778, 29.625, 25.2903, 23.1887, 20.6185, 17.7059, 14.7975, 12.9311, 11.9939, 11.016, 9.50148},
01288       {185.843, 294.953, 268.259, 250.028, 232.276, 209.138, 174.647, 153.029, 132.233, 109.333, 91.0324, 76.9822, 67.8374, 59.8954, 53.4497, 43.553, 37.6139, 32.7444, 27.023, 23.9679, 20.9309, 19.1485, 16.0294, 13.8003, 12.3176, 11.3441, 9.55937, 8.54497},
01289       {348.282, 310.699, 268.381, 243.254, 217.179, 187.212, 162.957, 136.969, 124.132, 101.48, 81.8314, 71.5882, 61.3147, 54.9158, 49.5517, 42.7537, 33.5, 29.7412, 26.1131, 23.1024, 19.7197, 17.708, 14.0364, 12.8054, 11.8375, 10.4924, 9.04095, 8.33528},
01290       {324.513, 290.628, 251.147, 216.936, 198.177, 176.297, 151.909, 129.606, 113.817, 94.3377, 76.6785, 64.382, 56.4567, 51.125, 43.4356, 37.6896, 30.338, 26.5577, 23.1858, 20.4549, 18.0182, 16.0098, 13.1211, 11.8445, 11.3616, 9.25812, 8.4992, 7.35148},
01291       {244.009, 279.89, 230.644, 231.457, 172.803, 163.804, 140.071, 126.029, 107.683, 91.6615, 72.0354, 64.4556, 50.6761, 46.5068, 41.6472, 35.4661, 21.2969, 38.4268, 19.632, 18.4574, 12.839, 14.213, 12.4018, 12.0424, 9.6145, 8.22918, 9.88007, 6.12946},
01292       {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
01293       {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}
01294     },
01295     {
01296       {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
01297       {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
01298       {-1, -1, -251.167, -157.188, -100.839, -70.7716, -31.9278, -14.7414, -6.46332, -1.43471, 1.10161, 1.95823, 2.6771, 2.52718, 2.67548, 2.75908, 2.87331, 2.61814, 1.92056, 2.16773, 1.70225, 1.70877, 1.55219, 1.43065, 1.53014, 1.69851, 1.40267, 1.46639},
01299       {-1, -1, -243.237, -145.933, -87.2068, -48.5578, -21.9141, -7.68402, -2.83933, 1.21596, 2.94545, 4.083, 3.97067, 4.12142, 3.78849, 3.83645, 3.07738, 2.90695, 2.53516, 2.51623, 2.31173, 2.2246, 1.85357, 1.78656, 1.65385, 1.57375, 1.40617, 1.35693},
01300       {-1, -110, -141.651, -118.596, -52.606, -23.472, -8.09735, 0.683589, 3.57165, 5.25367, 5.8348, 5.67137, 5.26599, 5.1816, 4.84428, 4.6964, 4.06178, 3.27554, 3, 2.92343, 2.56487, 2.47989, 2.32236, 1.83586, 1.84201, 1.97658, 1.64081, 1.56958},
01301       {-1, -106.053, -87.5398, -49.1882, -11.1091, -0.606904, 6.08278, 8.18373, 9.14269, 8.82061, 8.39517, 7.5095, 6.66552, 6.06293, 5.79917, 5.11953, 4.08928, 3.87, 3.71985, 3.4277, 2.925, 2.47762, 2.49134, 2.1793, 2.11341, 1.8709, 1.68674, 1.69234},
01302       {-116.854, -103.914, -48.6067, -7.80512, 4.11674, 8.14952, 11.6643, 11.178, 11.3862, 10.0188, 9.46565, 8.32955, 7.58777, 6.63929, 6.08499, 5.66225, 4.70548, 4.09773, 4.0294, 3.23529, 2.62532, 2.89612, 2.52651, 2.27649, 1.99773, 1.96176, 2.06313, 2.12814},
01303       {-146.18, -59.7282, -12.5, 3.08192, 8.34909, 11.1753, 15.2845, 14.8204, 14.3607, 12.9987, 11.1043, 9.964, 8.90504, 8.31783, 7.36251, 6.6915, 6.24035, 4.98582, 4.03066, 5.83789, 3.10856, 2.96333, 3.06171, 2.23047, 2.32792, 2.18535, 2.38165, 2.42884},
01304       {-233.643, -96.4333, -30.9536, -2.51866, 5.30801, 7.45312, 14.238, 12.5321, 12.7695, 11.741, 10.4656, 8.62541, 7.93922, 7.51216, 6.53463, 5.50929, 4.6268, 4.64697, 4.30481, 3.52426, 3.45212, 3.73824, 4.07812, 2.33724, 2.51972, 2.21704, 3.41317, 2.55682},
01305       {-211.848, -67.9261, -9.6179, 2.65525, 11.0301, 16.4831, 16.0704, 15.4027, 15.1086, 13.5929, 11.7898, 9.90025, 9.13345, 8.25683, 7.21617, 6.25572, 5.43346, 4.54866, 3.83221, 3.4237, 3.65898, 3.65808, 3.18498, 2.75829, 2.37531, 2.88444, 1.95099, 1.89066},
01306       {-143.833, -12.2832, 7.8963, 16.4622, 19.9538, 17.4053, 18.3962, 16.7577, 15.9486, 14.1232, 11.1662, 10.5826, 9.11908, 8.38156, 7.65503, 6.84281, 5.95331, 4.69263, 4.88752, 3.84843, 3.79038, 3.24503, 2.73708, 2.6645, 2.5017, 2.13435, 1.87916, 2.1749},
01307       {-37.4431, 11.3047, 18.5, 23.1562, 22.8984, 22.1124, 20.1964, 19.4342, 17.2078, 15.1252, 12.2962, 10.5784, 9.23938, 8.73254, 7.106, 6.7301, 5.53248, 4.62478, 3.82739, 3.07251, 2.79682, 2.8214, 2.92242, 2.47091, 2.63102, 1.94484, 2.30322, 2.64068},
01308       {4.24623, 23.1041, 27.5407, 28, 23.0684, 24.1685, 21.3723, 19.4634, 16.9631, 14.3876, 12.3701, 10.1272, 9.12229, 7.9875, 7.06019, 5.96169, 5.53393, 4.32105, 3.66794, 3.70074, 3.20382, 3.47729, 3.06609, 2.26191, 2.48768, 2.01323, 2.73772, 2.66561},
01309       {33.3344, 32.716, 30.0851, 30.6933, 29.2431, 25.6295, 21.674, 19.3741, 17.7184, 14.8413, 12.1543, 10.4758, 9.33113, 7.79187, 7.39106, 5.8376, 6.08377, 4.85748, 4.16908, 3.88557, 3.14086, 3.11306, 2.98297, 3.33859, 2.04182, 2.32861, 2.75164, 2.29621},
01310       {46.1357, 38.8426, 36.6976, 32.0038, 29.6956, 23.4889, 22.725, 19.779, 17.5173, 14.7043, 11.9171, 10.7871, 9.06671, 8.23658, 7.41977, 6.46988, 4.93792, 4.55465, 4.20588, 3.82236, 3.62993, 2.83949, 2.95902, 1.99063, 2.37545, 2.28563, 2.49407, 2.52411}
01311     },
01312     {
01313       {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
01314       {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
01315       {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
01316       {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
01317       {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
01318       {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
01319       {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
01320       {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
01321       {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
01322       {-417.629, -218.804, -63.1122, -34.5828, -10.68, 2.75084, 8.65719, 11.6155, 13.6253, 12.1802, 12.5535, 10.8028, 9.48349, 9.38468, 7.83699, 6.99092, 5.30562, 4.20316, 4.41177, 4.52123, 3.31882, 3.91104, 3.77374, 4.04567, 2.35974, 2.35145, 2.96747, 1.98381},
01323       {-311.688, -93.8205, -32.57, -6.85071, 6.45113, 7.97528, 13.5012, 15.2368, 16.5485, 14.4764, 12.181, 11.4092, 10.3418, 9.29414, 9.04287, 7.72862, 7.46558, 5.20657, 5.19399, 5.61358, 3.9523, 3.20885, 3.29034, 2.82267, 2.91734, 2.38053, 2.44655, 2.36229},
01324       {-161.948, -37.0248, -4.60393, 8.56983, 13.4828, 19.0043, 18.3378, 20.0726, 18.3394, 16.8149, 14.4702, 12.2298, 10.8159, 10.422, 8.29546, 7.70715, 6.26524, 5.70706, 5.26374, 4.44881, 4.80797, 3.24519, 3.09801, 2.73461, 3.34774, 2.88844, 2.34626, 2.76387},
01325       {-72.1648, -12.5057, 16.9112, 23.5819, 20.6731, 21.814, 22.9407, 19.6563, 19.1021, 16.9339, 15.2842, 12.4743, 11.0013, 10.0748, 8.91402, 7.27224, 6.15542, 5.23092, 4.49629, 4.25791, 3.79059, 3.70681, 3.31756, 2.62265, 3.45895, 2.19926, 2.15639, 2.7466},
01326       {2.3118, 20.9883, 24.9015, 32.366, 32.2839, 29.3505, 24.8013, 23.3821, 21.1815, 18.3139, 15.0436, 13.3637, 11.4887, 9.84427, 9.51972, 8.22026, 6.8517, 5.85862, 4.95269, 4.5885, 3.45462, 4.03355, 3.70984, 4.04694, 2.46266, 2.50179, 3.23813, 2.46999},
01327       {30.7084, 40.046, 40.956, 39.7092, 36.4134, 28.415, 28.5543, 24.9346, 23.1865, 19.4968, 15.3536, 14.0231, 12.0163, 10.7639, 9.82125, 8.36598, 6.4058, 5.88361, 5.13249, 4.51457, 4.9171, 3.87165, 3.58904, 2.85879, 2.53645, 2.81466, 2.72057, 3.18122}
01328     }
01329   };
01330 
01331 const float CSCTFPtMethods::dphifr1[4][15][28] = 
01332   {
01333     {
01334       {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
01335       {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
01336       {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
01337       {-1, -1, -174.092, -53.9867, 10.2441, 27.4286, 36.9822, 37.5167, 34.3051, 31.8195, 27.8286, 24.1206, 21.161, 19.0382, 17.1718, 14.6208, 12.2432, 10.7876, 9.69835, 8.08848, 7.13485, 6.60187, 5.18874, 5.13839, 4.41612, 4.14069, 3.58335, 3.01529},
01338       {-1, 1138.05, -49.183, 2.6568, 58.5809, 57.9481, 56.8007, 51.1911, 44.5243, 37.806, 32.1175, 27.5585, 24.3955, 21.7533, 19.3667, 17.0463, 13.9365, 11.8102, 10.2398, 9.1678, 8.26393, 7.18307, 6.13392, 5.533, 4.8865, 4.11951, 3.87238, 3.48248},
01339       {-1, 9.64577, 56.9057, 81.944, 82.4872, 78.3198, 68.8015, 60.7978, 52.6542, 44.3584, 37.3611, 31.2648, 27.235, 24.5, 22.04, 18.5, 15.75, 12.9557, 11.2655, 10.2491, 9.21672, 8.30474, 6.64511, 6.13513, 5.34219, 4.95, 4.23425, 3.6963},
01340       {97.5, 87.4578, 120.684, 105.38, 98.3177, 87.4048, 75.9, 65.9142, 56.1879, 47.6314, 39.6183, 33.2005, 28.7316, 25.4495, 22.9327, 19.4612, 15.7254, 13.8618, 11.9249, 10.0859, 9.444, 8.11458, 6.95662, 6.25641, 5.44159, 5.19583, 4.35396, 3.83333},
01341       {693.205, 454.942, 655.428, 360.329, 323.261, 275.945, 234.843, 196.055, 167.247, 139.873, 113.932, 95.6506, 82.789, 72.2128, 64.9871, 53.997, 43.4461, 39.0238, 33.6322, 28.8622, 25.6006, 21.9322, 18.5028, 16.0912, 14.2918, 12.4941, 10.5138, 9.05925},
01342       {9146.66, 471.958, 387.082, 340.914, 286.893, 262.777, 224.112, 184.982, 155.447, 133.684, 107.642, 91.5521, 78.135, 69.0562, 61.4634, 52.4394, 42.1881, 36.5169, 30.0318, 27.9321, 24.4145, 21.0881, 17.9552, 14.6189, 13.2301, 12.9111, 10.8691, 8.35492},
01343       {540.281, 410.901, 354.276, 301.779, 253.803, 238.881, 199.465, 167.136, 145.674, 119.585, 97.0842, 82.3805, 70.6386, 62.154, 55.8136, 46.3101, 37.2817, 33.507, 28.8241, 25.774, 22.4889, 19.8697, 16.1007, 13.3432, 12.4647, 11.9955, 9.6895, 8.46321},
01344       {419.005, 377.428, 314.861, 270.658, 240.487, 213.074, 182.994, 151.52, 129.287, 108.487, 87.9791, 74.8889, 64.8147, 56.7597, 50.5058, 42.6958, 35.6277, 29.9064, 26.1033, 22.5358, 20.6119, 17.9656, 15.3201, 13.1018, 11.7756, 10.129, 8.86099, 7.58348},
01345       {2783.23, 334.238, 275.818, 240.947, 205.026, 186.945, 163.992, 138.569, 117.64, 100.381, 81.1057, 68.0913, 58.8849, 52.6374, 45.2179, 38.059, 32.6702, 26.3298, 23.0484, 18.3201, 18.1814, 16.0936, 12.7571, 12.2673, 9.95479, 8.37502, 7.42398, 6.72237},
01346       {-1, -1, -1, -1, -1, 143.654, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 9.23717, 9.05559, -1, -1, 338.089},
01347       {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
01348       {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}
01349     },
01350     {
01351       {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
01352       {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
01353       {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
01354       {-1, -1, -293.3, -150.312, -41.3547, -4.93182, 20.0224, 31.2313, 31.0566, 33.3205, 30.2863, 27.2634, 24.2872, 22.0512, 19.596, 17.3902, 14.2112, 12.6609, 11.407, 10.2093, 8.85659, 7.85742, 6.4135, 6.23362, 5.41945, 4.95306, 4.41755, 3.82303},
01355       {-1, -143.627, -143.826, -62.3445, 23.7381, 51.7379, 55.9747, 54.5144, 47.9348, 42.2055, 37.0868, 31.9699, 28.8453, 26.0344, 23.1051, 20.5071, 17.1946, 14.1772, 12.4708, 11.3144, 9.88063, 8.86923, 7.67165, 6.4322, 5.96624, 5.18282, 4.81762, 4.28301},
01356       {-1, -13.3855, 5.16716, 64.1898, 72.3294, 76.3905, 73.7962, 67.3364, 59.9099, 51.4343, 43.5279, 37.1873, 31.7994, 29.0358, 26.5368, 22.0615, 19.1543, 15.4385, 14.2599, 12.3375, 10.9493, 9.73496, 8.26995, 7.45197, 6.60214, 6.08206, 5.15337, 4.66445},
01357       {-42.7682, 47.3889, 103.482, 107.735, 107.75, 94.9291, 87.763, 75.9543, 65.4694, 56.7377, 47.3143, 39.9327, 34.7819, 31.2361, 27.8932, 24.1076, 19.6767, 17.1081, 15.427, 12.8984, 11.4228, 10.0318, 8.49021, 7.90816, 6.72917, 6.39571, 5.45637, 4.61281},
01358       {541.234, 465.806, 429.209, 372.183, 331.067, 285.903, 258.37, 216.269, 181.991, 154.204, 125.987, 107.564, 91.8176, 81.5452, 73.1247, 59.1412, 51, 43.3898, 37.9118, 33.2887, 28.8381, 25.3079, 21.6463, 17.6858, 16.9908, 14.841, 11.8149, 10.9434},
01359       {255.594, 371.519, 358.173, 343.459, 285.798, 262.664, 238.913, 194.777, 163.618, 142.465, 116.934, 98.3012, 84.7328, 73.9315, 66.1496, 57.1145, 45.7455, 39.2169, 33.571, 28.7347, 27.0902, 22.7753, 19.8191, 16.4045, 15.2075, 14.0935, 12.3427, 9.36143},
01360       {275.796, 423.747, 347.249, 303.803, 270.357, 254.279, 217.372, 182.151, 161.833, 132.635, 108.221, 91.6597, 79.5534, 69.683, 62.6926, 52.9109, 42.95, 36.9714, 31.6704, 28.9253, 25.7569, 22.4706, 18.5914, 16.0164, 14.43, 14.6449, 11.4458, 9.78841},
01361       {378.542, 349.351, 319.333, 285.503, 261.452, 233.428, 201.215, 165.997, 145.442, 121.289, 98.8432, 84.1681, 72.9111, 64.2952, 58.4893, 48.2012, 41.2393, 34.1303, 29.9633, 26.1572, 23.1371, 20.5019, 17.2906, 15.0458, 14.0115, 11.7586, 10.045, 9.31029},
01362       {557.927, 338.049, 301.204, 265.456, 232.807, 212.31, 185.76, 158.503, 132.332, 113.382, 91.8123, 76.8816, 67.1968, 60.2717, 52.0559, 44.363, 36.5282, 29.777, 25.6156, 22.1842, 20.2098, 18.3932, 15.1911, 14.1691, 12.6889, 10.8789, 10.4976, 7.84804},
01363       {-1, -1, -1, -1, -1, 2154.03, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 12.2722, 8.95391, -1, -1, 337.608},
01364       {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
01365       {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}
01366     },
01367     {
01368       {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
01369       {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
01370       {-1, -1, -251.167, -157.188, -100.839, -70.7716, -31.9278, -14.7414, -6.46332, -1.43471, 1.10161, 1.95823, 2.6771, 2.52718, 2.67548, 2.75908, 2.87331, 2.61814, 1.92056, 2.16773, 1.70225, 1.70877, 1.55219, 1.43065, 1.53014, 1.69851, 1.40267, 1.46639},
01371       {-1, -1, -243.237, -145.933, -87.2068, -48.5578, -21.9141, -7.68402, -2.83933, 1.21596, 2.94545, 4.083, 3.97067, 4.12142, 3.78849, 3.83645, 3.07738, 2.90695, 2.53516, 2.51623, 2.31173, 2.2246, 1.85357, 1.78656, 1.65385, 1.57375, 1.40617, 1.35693},
01372       {-1, -110, -141.651, -118.596, -52.606, -23.472, -8.09735, 0.683589, 3.57165, 5.25367, 5.8348, 5.67137, 5.26599, 5.1816, 4.84428, 4.6964, 4.06178, 3.27554, 3, 2.92343, 2.56487, 2.47989, 2.32236, 1.83586, 1.84201, 1.97658, 1.64081, 1.56958},
01373       {-1, -106.053, -87.5398, -49.1882, -11.1091, -0.606904, 6.08278, 8.18373, 9.14269, 8.82061, 8.39517, 7.5095, 6.66552, 6.06293, 5.79917, 5.11953, 4.08928, 3.87, 3.71985, 3.4277, 2.925, 2.47762, 2.49134, 2.1793, 2.11341, 1.8709, 1.68674, 1.69234},
01374       {-116.854, -103.914, -48.6067, -7.80512, 4.11674, 8.14952, 11.6643, 11.178, 11.3862, 10.0188, 9.46565, 8.32955, 7.58777, 6.63929, 6.08499, 5.66225, 4.70548, 4.09773, 4.0294, 3.23529, 2.62532, 2.89612, 2.52651, 2.27649, 1.99773, 1.96176, 2.06313, 2.12814},
01375       {-146.18, -59.7282, -12.5, 3.08192, 8.34909, 11.1753, 15.2845, 14.8204, 14.3607, 12.9987, 11.1043, 9.964, 8.90504, 8.31783, 7.36251, 6.6915, 6.24035, 4.98582, 4.03066, 5.83789, 3.10856, 2.96333, 3.06171, 2.23047, 2.32792, 2.18535, 2.38165, 2.42884},
01376       {-233.643, -96.4333, -30.9536, -2.51866, 5.30801, 7.45312, 14.238, 12.5321, 12.7695, 11.741, 10.4656, 8.62541, 7.93922, 7.51216, 6.53463, 5.50929, 4.6268, 4.64697, 4.30481, 3.52426, 3.45212, 3.73824, 4.07812, 2.33724, 2.51972, 2.21704, 3.41317, 2.55682},
01377       {-211.848, -67.9261, -9.6179, 2.65525, 11.0301, 16.4831, 16.0704, 15.4027, 15.1086, 13.5929, 11.7898, 9.90025, 9.13345, 8.25683, 7.21617, 6.25572, 5.43346, 4.54866, 3.83221, 3.4237, 3.65898, 3.65808, 3.18498, 2.75829, 2.37531, 2.88444, 1.95099, 1.89066},
01378       {-143.833, -12.2832, 7.8963, 16.4622, 19.9538, 17.4053, 18.3962, 16.7577, 15.9486, 14.1232, 11.1662, 10.5826, 9.11908, 8.38156, 7.65503, 6.84281, 5.95331, 4.69263, 4.88752, 3.84843, 3.79038, 3.24503, 2.73708, 2.6645, 2.5017, 2.13435, 1.87916, 2.1749},
01379       {-37.4431, 11.3047, 18.5, 23.1562, 22.8984, 22.1124, 20.1964, 19.4342, 17.2078, 15.1252, 12.2962, 10.5784, 9.23938, 8.73254, 7.106, 6.7301, 5.53248, 4.62478, 3.82739, 3.07251, 2.79682, 2.8214, 2.92242, 2.47091, 2.63102, 1.94484, 2.30322, 2.64068},
01380       {4.24623, 23.1041, 27.5407, 28, 23.0684, 24.1685, 21.3723, 19.4634, 16.9631, 14.3876, 12.3701, 10.1272, 9.12229, 7.9875, 7.06019, 5.96169, 5.53393, 4.32105, 3.66794, 3.70074, 3.20382, 3.47729, 3.06609, 2.26191, 2.48768, 2.01323, 2.73772, 2.66561},
01381       {33.3344, 32.716, 30.0851, 30.6933, 29.2431, 25.6295, 21.674, 19.3741, 17.7184, 14.8413, 12.1543, 10.4758, 9.33113, 7.79187, 7.39106, 5.8376, 6.08377, 4.85748, 4.16908, 3.88557, 3.14086, 3.11306, 2.98297, 3.33859, 2.04182, 2.32861, 2.75164, 2.29621},
01382       {46.1357, 38.8426, 36.6976, 32.0038, 29.6956, 23.4889, 22.725, 19.779, 17.5173, 14.7043, 11.9171, 10.7871, 9.06671, 8.23658, 7.41977, 6.46988, 4.93792, 4.55465, 4.20588, 3.82236, 3.62993, 2.83949, 2.95902, 1.99063, 2.37545, 2.28563, 2.49407, 2.52411}
01383     },
01384     {
01385       {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
01386       {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
01387       {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
01388       {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
01389       {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
01390       {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
01391       {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
01392       {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
01393       {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
01394       {-417.629, -218.804, -63.1122, -34.5828, -10.68, 2.75084, 8.65719, 11.6155, 13.6253, 12.1802, 12.5535, 10.8028, 9.48349, 9.38468, 7.83699, 6.99092, 5.30562, 4.20316, 4.41177, 4.52123, 3.31882, 3.91104, 3.77374, 4.04567, 2.35974, 2.35145, 2.96747, 1.98381},
01395       {-311.688, -93.8205, -32.57, -6.85071, 6.45113, 7.97528, 13.5012, 15.2368, 16.5485, 14.4764, 12.181, 11.4092, 10.3418, 9.29414, 9.04287, 7.72862, 7.46558, 5.20657, 5.19399, 5.61358, 3.9523, 3.20885, 3.29034, 2.82267, 2.91734, 2.38053, 2.44655, 2.36229},
01396       {-161.948, -37.0248, -4.60393, 8.56983, 13.4828, 19.0043, 18.3378, 20.0726, 18.3394, 16.8149, 14.4702, 12.2298, 10.8159, 10.422, 8.29546, 7.70715, 6.26524, 5.70706, 5.26374, 4.44881, 4.80797, 3.24519, 3.09801, 2.73461, 3.34774, 2.88844, 2.34626, 2.76387},
01397       {-72.1648, -12.5057, 16.9112, 23.5819, 20.6731, 21.814, 22.9407, 19.6563, 19.1021, 16.9339, 15.2842, 12.4743, 11.0013, 10.0748, 8.91402, 7.27224, 6.15542, 5.23092, 4.49629, 4.25791, 3.79059, 3.70681, 3.31756, 2.62265, 3.45895, 2.19926, 2.15639, 2.7466},
01398       {2.3118, 20.9883, 24.9015, 32.366, 32.2839, 29.3505, 24.8013, 23.3821, 21.1815, 18.3139, 15.0436, 13.3637, 11.4887, 9.84427, 9.51972, 8.22026, 6.8517, 5.85862, 4.95269, 4.5885, 3.45462, 4.03355, 3.70984, 4.04694, 2.46266, 2.50179, 3.23813, 2.46999},
01399       {30.7084, 40.046, 40.956, 39.7092, 36.4134, 28.415, 28.5543, 24.9346, 23.1865, 19.4968, 15.3536, 14.0231, 12.0163, 10.7639, 9.82125, 8.36598, 6.4058, 5.88361, 5.13249, 4.51457, 4.9171, 3.87165, 3.58904, 2.85879, 2.53645, 2.81466, 2.72057, 3.18122}
01400     }
01401   };
01402 
01403 
01404 const float CSCTFPtMethods::sigmafr0[4][15][28] =
01405   {
01406     {
01407       {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
01408       {1, 1, 68.1251, 119.334, 71.9663, 47.2033, 34.4095, 24.1757, 16.9244, 14.21, 10.0848, 8.28308, 7.49682, 7.5252, 5.7771, 5.67435, 5.05335, 4.03134, 3.38787, 3.49897, 3.27399, 4.38102, 3.45241, 3.57641, 2.74292, 2.58754, 2.82597, 3.02336},
01409       {1, 1, 11.2171, 180.376, 95.0863, 45.7334, 36.6456, 24.597, 16.4907, 15.2826, 12.8201, 10.0379, 9.45291, 8.26339, 6.8289, 6.16693, 4.85849, 12.1669, 4.04481, 3.76596, 3.33028, 3.0602, 2.82333, 6.10153, 3.8862, 4.83151, 2.99154, 2.87868},
01410       {1, 1, 214.489, 145.179, 39.8377, 32.3612, 24.983, 17.3205, 14.5435, 11.4038, 8.99103, 7.65653, 7.03634, 6.16057, 5.35274, 6.44559, 4.63289, 3.48617, 3.32857, 3.25099, 3.28055, 3.0714, 2.58432, 2.61066, 2.99103, 2.85844, 3.29465, 3.06768},
01411       {1, 2.17804, 246.204, 73.5985, 34.3397, 27.9956, 21.2206, 15.6835, 13.173, 11.1528, 9.00959, 7.51184, 6.55643, 5.56576, 5.47, 5.43772, 4.62926, 3.37312, 3.33237, 3.59496, 2.67392, 2.79043, 3.0637, 2.60009, 3.12616, 3.22084, 3.22784, 3.62183},
01412       {1, 178.428, 54.0668, 50.639, 30.0806, 26.6723, 18.1088, 16.2946, 12.3097, 11.9197, 9.76022, 7.47657, 6.44478, 6.32831, 5.64725, 4.21032, 3.63872, 4.3096, 3.11977, 3.49313, 2.69508, 3.80622, 2.76555, 2.70835, 3.1522, 2.74832, 2.77429, 2.80946},
01413       {33.7724, 127.162, 36.813, 83.7352, 41.0058, 28.8809, 20.1964, 14.9477, 14.2195, 11.9145, 11.2838, 7.30775, 8.05355, 7.12897, 7.13998, 4.44287, 3.82913, 15.6533, 3.1924, 3.68782, 2.97145, 3.00122, 2.60565, 2.86444, 2.25535, 2.47471, 2.46453, 2.92709},
01414       {63.4126, 78.9729, 63.6832, 49.5751, 46.9535, 42.779, 36.3592, 31.1099, 23.5997, 21.204, 16.8426, 16.7998, 13.9811, 12.5411, 10.5253, 13.362, 8.63362, 6.77557, 6.6511, 14.3978, 8.47154, 10.8782, 7.15581, 5.88536, 8.01652, 12.0409, 6.80079, 9.92202},
01415       {323.587, 130.398, 76.2136, 54.71, 44.2662, 43.958, 40.2353, 30.8886, 26.9603, 24.2783, 17.5786, 15.1457, 15.3706, 13.0387, 11.2397, 11.2636, 7.87718, 10.9021, 7.53715, 8.17749, 6.93261, 17.4198, 4.87206, 5.71908, 6.3438, 9.25595, 11.7572, 6.81276},
01416       {125.501, 86.1114, 78.0846, 56.6407, 42.2517, 43.9773, 35.4223, 31.0062, 26.3755, 22.5857, 20.9842, 17.2539, 14.0029, 12.3455, 11.3132, 13.3154, 8.60381, 8.35366, 6.2164, 6.76689, 6.09496, 5.59811, 8.17196, 13.4268, 6.02764, 5.67951, 6.71677, 8.7109},
01417       {95.8611, 75.3004, 65.2466, 53.2109, 47.9975, 40.0404, 31.958, 30.4257, 27.7305, 25.0529, 17.6693, 15.6535, 14.5663, 11.3021, 11.7363, 9.1677, 11.1228, 7.84579, 6.95689, 7.39175, 8.02251, 6.36251, 6.64162, 7.60716, 5.71819, 8.15284, 6.63158, 6.81248},
01418       {274.776, 85.1791, 62.5779, 52.2624, 45.0418, 38.0133, 33.6947, 28.865, 27.5922, 23.043, 19.7818, 17.272, 15.9374, 13.4469, 11.8057, 11.5461, 10.9067, 11.0404, 8.0732, 10.2156, 10.7966, 8.75473, 8.18003, 20.2431, 14.1253, 10.6056, 14.0389, 18.7348},
01419       {81.1599, 81.4479, 69.629, 57.8942, 56.9895, 32.849, 30.7188, 31.1175, 24.4425, 21.2399, 15.3807, 20.083, 15.6961, 11.7551, 15.4998, 10.336, 95.0491, 69.3807, 9.18389, 8.17367, 17.986, 10.1523, 12.8713, 12.5117, 13.3384, 6.82039, 12.7359, 26.3342},
01420       {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
01421       {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}
01422     },
01423     {
01424       {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
01425       {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
01426       {1, 1, 1, 0.213802, 110.043, 85.1732, 83.1862, 87.3043, 33.7737, 23.0747, 63.8276, 15.2175, 27.868, 12.6669, 17.1469, 50.731, 9.70449, 64.2886, 5.70197, 81.6955, 9.51219, 7.0649, 8.84973, 5.99795, 83.4597, 4.3645, 5.86517, 5.28726},
01427       {1, 1, 89.5159, 113.68, 91.6962, 77.6377, 52.0035, 33.9964, 28.4368, 21.664, 16.7158, 14.0169, 11.7753, 10.7078, 10.2129, 8.69455, 6.96017, 5.68121, 5.38927, 4.89401, 4.95697, 4.9322, 3.65117, 3.25201, 3.55802, 4.72346, 3.40616, 3.19724},
01428       {1, 3.65071, 167.809, 118.577, 79.2131, 62.7322, 46.6568, 31.0416, 24.7606, 20.1139, 16.3567, 13.9311, 12.4083, 10.2061, 9.70802, 8.58308, 7.39169, 5.60975, 6.81223, 4.72617, 4.29868, 4.44951, 4.15795, 3.71309, 3.85244, 3.71955, 3.6068, 4.61138},
01429       {1, 143.017, 114.974, 80.9475, 65.7978, 58.7383, 33.663, 40.7059, 22.9966, 20.6734, 16.5455, 13.8755, 12.3398, 12.2325, 10.2504, 7.705, 7.19971, 9.05019, 6.72006, 5.09801, 5.65375, 4.89251, 3.85383, 5.25096, 3.76551, 3.68784, 3.63877, 3.53497},
01430       {70.5084, 123.26, 74.5829, 51.9644, 47.7945, 42.5259, 34.1665, 27.4405, 24.5782, 19.7956, 16.2276, 12.4019, 11.9461, 10.1038, 9.26924, 8.81221, 6.45554, 6.13044, 6.01564, 5.92054, 5.00283, 3.79784, 4.43493, 3.38759, 3.06995, 3.1821, 3.37826, 3.39659},
01431       {1217.05, 201.975, 85.5261, 68.5927, 66.6012, 60.9998, 53.6427, 48.6075, 31.7341, 27.728, 24.6024, 22.4018, 15.7743, 17.3198, 13.7922, 11.3731, 10.1716, 9.0544, 8.50262, 14.2347, 6.81764, 8.60334, 9.55753, 7.02884, 6.94412, 5.80156, 7.08978, 8.2179},
01432       {236.657, 244.966, 112.373, 78.8199, 67.8974, 66.5142, 55.7426, 43.4698, 42.7562, 31.9949, 26.366, 19.1138, 19.3944, 20.4525, 14.6857, 12.3677, 10.7261, 12.6794, 8.76137, 12.16, 6.75415, 10.3045, 7.91157, 7.42901, 6.80211, 6.86062, 12.349, 10.4941},
01433       {256.896, 159.681, 100.055, 84.1373, 62.7979, 61.6566, 48.3574, 40.4226, 36.0741, 31.4883, 25.5559, 23.7784, 17.1684, 15.61, 16.1722, 15.1145, 10.1943, 10.9007, 10.3402, 7.54424, 7.313, 7.46722, 7.17864, 7.46414, 6.75702, 5.89486, 6.40948, 8.48163},
01434       {257.504, 109.282, 103.033, 75.7751, 76.7721, 58.9241, 48.3108, 41.4407, 39.4679, 33.6439, 24.8537, 21.3699, 18.0898, 16.9161, 15.6342, 14.1586, 12.3244, 9.18785, 10.0318, 9.4986, 8.91357, 11.6174, 18.6761, 9.52487, 6.88319, 13.6627, 9.81258, 14.6774},
01435       {169.185, 113.197, 93.9858, 75.5571, 65.2782, 52.2785, 48.0109, 40.0461, 36.6626, 30.353, 25.1063, 20.7361, 18.792, 16.958, 14.6701, 13.3799, 13.4912, 9.98326, 9.89502, 12.4285, 10.494, 11.2434, 8.54232, 16.3106, 14.0824, 8.59128, 9.7086, 12.0069},
01436       {101.76, 119.944, 74.5477, 78.6374, 68.0419, 54.84, 40.7916, 44.7959, 40.9335, 33.4932, 22.5979, 24.5248, 18.5872, 15.2081, 15.6492, 10.4524, 103.653, 66.9111, 17.5435, 8.81236, 15.4697, 9.49944, 13.4211, 9.33341, 11.9129, 8.46251, 14.9693, 10.4711},
01437       {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
01438       {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}
01439     },
01440     {
01441       {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
01442       {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
01443       {1, 1, 0.0011042, 86.9352, 75.2624, 52.2464, 32.6091, 20.4476, 13.4983, 11.2587, 8.80378, 7.11921, 7.0583, 5.68815, 6.20848, 4.34774, 5.45062, 5.4936, 3.43077, 3.33174, 3.04659, 3.8793, 3.11545, 2.97137, 3.92529, 4.57437, 3.88033, 3.82278},
01444       {1, 1, 94.2962, 87.2608, 63.6413, 44.4619, 27.8601, 17.1249, 14.5496, 10.6136, 8.1779, 7.43897, 6.44223, 6.07491, 5.71576, 5.80677, 4.30508, 3.71754, 3.50651, 3.11441, 4.01509, 3.70184, 3.27363, 3.07401, 3.82936, 3.74439, 2.99869, 3.56942},
01445       {1, 0.263982, 119.77, 91.7619, 57.8566, 34.9019, 22.023, 15.941, 12.22, 10.1212, 8.34203, 7.32761, 6.13686, 5.47659, 5.31636, 4.7639, 4.16051, 3.54105, 4.07639, 3.09476, 3.04313, 3.29353, 3.70995, 2.79947, 3.94107, 3.99605, 3.96949, 4.88657},
01446       {1, 113.045, 93.6573, 70.568, 31.0566, 20.7173, 16.8019, 14.8641, 11.9429, 9.96161, 7.87523, 6.7396, 6.18326, 6.16374, 5.35523, 3.95939, 4.04783, 4.28055, 3.89598, 3.4252, 3.42753, 3.48459, 3.23155, 3.19143, 4.02432, 3.06929, 3.42948, 4.04161},
01447       {0.447397, 105.302, 76.6619, 31.9851, 22.4774, 19.276, 17.7676, 14.1965, 10.8272, 10.1416, 7.62459, 6.60822, 7.21393, 6.00029, 5.10027, 4.89418, 4.42892, 3.707, 6.06502, 3.37472, 3.49089, 3.46185, 6.33915, 3.3654, 3.30022, 3.36655, 4.87842, 8.07411},
01448       {152.08, 112.801, 47.3659, 30.5674, 29.0316, 22.3914, 19.0157, 16.3471, 15.5554, 12.4982, 10.4935, 8.23282, 7.40488, 9.06651, 6.97499, 9.66855, 8.35921, 5.45921, 5.68328, 10.6461, 4.65396, 7.5477, 7.11417, 6.02132, 6.79497, 8.21492, 10.5221, 11.7369},
01449       {177.146, 109.73, 53.3379, 32.4922, 30.5016, 25.9712, 22.9064, 19.6453, 17.4685, 14.9279, 10.9822, 10.9065, 9.22264, 9.52341, 9.23665, 6.50148, 6.20737, 8.19635, 7.38019, 9.07186, 9.22787, 11.9975, 15.4328, 12.1685, 11.2679, 11.0456, 16.8556, 15.203},
01450       {175.465, 100.985, 56.7871, 37.5513, 26.3367, 23.6775, 19.3572, 17.3464, 16.3425, 14.2809, 11.4196, 10.1502, 9.45509, 8.55837, 7.929, 7.75422, 6.25516, 6.98075, 7.95726, 5.58602, 8.52811, 8.94976, 8.61675, 7.52203, 5.86654, 9.30841, 7.95983, 9.16498},
01451       {161.557, 60.9083, 42.7418, 32.6681, 28.4483, 23.0831, 20.1852, 16.6503, 14.3982, 12.9469, 10.4914, 10.6759, 9.05724, 8.21126, 8.46837, 9.92698, 7.71569, 6.7965, 8.87549, 6.0765, 7.88892, 7.22201, 8.13346, 8.88474, 11.2008, 10.4921, 8.34342, 10.0337},
01452       {91.718, 50.2739, 37.883, 32.7472, 24.9764, 23.3509, 19.3552, 17.9669, 15.5899, 13.3535, 11.3664, 9.74592, 9.19961, 7.76436, 7.74193, 7.18929, 6.40388, 8.6005, 6.88462, 10.8404, 8.72774, 7.46032, 9.74493, 9.06091, 8.81877, 8.50823, 11.0295, 15.2753},
01453       {72.4631, 47.222, 36.2746, 28.8782, 23.553, 24.7348, 18.7544, 18.437, 15.7064, 12.729, 11.0992, 10.1026, 8.40556, 7.96116, 8.09745, 6.41375, 6.51981, 6.63771, 8.47843, 7.66306, 8.95359, 10.2608, 8.83699, 8.72077, 10.7087, 7.27377, 13.6, 14.2494},
01454       {60.2763, 42.7498, 34.6623, 26.385, 25.4651, 21.7019, 19.0647, 15.8816, 14.2646, 12.5554, 10.8672, 9.43677, 8.44181, 7.59876, 7.81844, 6.11722, 8.516, 8.94197, 6.97098, 7.17371, 6.68615, 7.24368, 6.23672, 11.2857, 8.77067, 8.43604, 11.2313, 10.0775},
01455       {57.866, 41.2832, 33.3179, 27.3557, 23.8832, 20.5696, 17.8125, 15.5961, 14.4456, 12.0961, 9.76464, 9.34033, 7.73885, 7.76005, 7.44823, 7.55132, 7.13281, 5.57387, 6.08408, 6.99443, 6.28186, 6.48654, 6.99549, 5.28173, 7.53539, 6.92374, 8.62903, 12.2492}
01456     },
01457     {
01458       {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
01459       {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
01460       {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
01461       {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
01462       {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
01463       {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
01464       {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
01465       {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
01466       {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
01467       {269.647, 190.711, 88.8938, 70.894, 47.3717, 44.6289, 33.3552, 28.7616, 25.0309, 21.272, 17.9555, 14.7229, 14.5419, 11.7788, 13.5958, 10.8726, 7.98782, 10.1873, 8.92189, 9.84992, 7.93519, 10.66, 9.14665, 13.8959, 8.38381, 7.987, 15.2538, 11.2857},
01468       {235.853, 115.945, 85.6699, 62.6811, 48.3218, 46.3742, 32.8133, 27.8045, 23.4159, 20.5056, 16.0387, 15.324, 13.2206, 11.3368, 10.4307, 9.27748, 11.3733, 8.87551, 8.35207, 11.7778, 8.82057, 8.90268, 8.28021, 8.06991, 12.7847, 7.80538, 8.15497, 8.97099},
01469       {181.416, 96.6442, 73.0719, 54.7106, 42.9821, 37.438, 32.203, 27.5413, 22.6414, 19.4503, 17.7779, 14.5369, 13.0979, 13.7771, 10.4079, 9.45385, 13.0227, 8.50182, 7.17865, 10.9919, 15.7864, 8.76431, 8.51823, 5.92961, 9.18247, 10.5971, 9.3721, 15.4988},
01470       {139.491, 86.7362, 64.8339, 51.7932, 40.4078, 39.1071, 30.9617, 26.4873, 25.263, 20.3243, 16.5092, 14.4393, 12.175, 11.956, 10.8174, 9.08607, 7.18855, 10.0054, 11.1779, 7.12204, 9.47445, 6.93119, 8.93181, 8.61144, 11.0501, 6.27241, 9.95825, 14.4856},
01471       {106.141, 75.9413, 58.0517, 48.534, 42.3919, 33.3155, 31.0908, 25.4912, 22.6406, 19.3109, 16.0106, 14.2606, 12.5963, 11.0191, 11.1065, 9.09784, 9.07922, 8.92264, 7.34917, 7.71939, 7.41573, 8.73107, 6.43358, 17.2136, 9.26347, 8.55656, 10.9458, 12.6821},
01472       {100.082, 76.8702, 55.0846, 48.6279, 40.6142, 34.3238, 29.3724, 26.3273, 25.1794, 19.6749, 16.3483, 14.3196, 12.3469, 11.8695, 11.738, 9.54169, 10.3128, 8.97389, 7.22238, 8.43618, 9.03957, 7.8851, 9.20503, 8.0428, 8.81155, 10.3738, 10.7343, 18.0864}
01473     }
01474   };
01475 
01476 const float CSCTFPtMethods::sigmafr1[4][15][28] = 
01477   {
01478     {
01479       {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
01480       {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
01481       {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
01482       {1, 1, 146.093, 91.0022, 59.1524, 33.1605, 28.0477, 17.4744, 15.5721, 11.7519, 9.35168, 7.7485, 7.04861, 6.47423, 5.73763, 5.09473, 4.08489, 3.39595, 4.04544, 2.96401, 3.63584, 3.1557, 3.00004, 3.18668, 3.41738, 2.71614, 2.82526, 3.70189},
01483       {1, 218.776, 145.244, 104.935, 64.8144, 29.6568, 23.4613, 19.0926, 14.8407, 10.6044, 9.43501, 7.74741, 6.91137, 6.22613, 5.72544, 5.2123, 4.24476, 3.74203, 3.31965, 3.40162, 3.74122, 2.96814, 3.12356, 2.69131, 3.2702, 3.08497, 3.38834, 2.81568},
01484       {1, 216.291, 89.0598, 61.8382, 26.9505, 21.5635, 19.7094, 17.3911, 12.8349, 12.6624, 9.67599, 7.38235, 6.67213, 6.85975, 5.63519, 4.96333, 5.1828, 3.76683, 3.47407, 3.5603, 4.18003, 2.75393, 3.24872, 2.69483, 3.18626, 3.0917, 2.9064, 3.49336},
01485       {74.8743, 114.685, 34.9506, 32.6917, 21.6367, 20.6803, 22.2436, 14.6578, 12.8293, 10.8414, 8.62706, 7.16602, 6.62353, 6.20931, 5.41574, 4.63619, 4.12341, 3.53772, 5.40106, 3.54274, 3.04711, 2.82168, 2.97043, 2.56215, 2.63581, 2.72855, 3.475, 2.40102},
01486       {171.647, 40.3668, 170.531, 57.8944, 49.7425, 45.0042, 40.4664, 35.8242, 31.2455, 28.1189, 21.2241, 17.9434, 14.4424, 15.5375, 14.4543, 11.4451, 11.2267, 9.18004, 8.39402, 12.0792, 5.76609, 6.72775, 8.85565, 8.75935, 6.70541, 6.8381, 9.55174, 8.56415},
01487       {1303.1, 108.27, 69.3932, 63.777, 57.8401, 52.0202, 42.5951, 33.2084, 28.6304, 27.9733, 20.1268, 18.8158, 17.0162, 13.475, 12.6629, 12.7418, 8.99252, 8.94672, 7.8758, 8.3772, 10.6977, 8.00381, 8.8381, 14.3496, 11.113, 8.4152, 9.00849, 13.7466},
01488       {160.859, 94.3386, 65.0202, 60.3475, 75.2043, 44.8816, 41.5634, 37.5275, 27.7923, 26.4016, 21.5374, 15.8813, 15.8779, 13.9959, 13.7772, 19.727, 11.742, 8.67518, 9.28799, 8.13627, 7.15515, 8.97133, 6.80429, 10.5999, 5.91254, 9.1128, 10.6201, 10.5506},
01489       {107.553, 88.8958, 66.3069, 65.4056, 48.5765, 45.1286, 40.6105, 32.3372, 26.121, 24.6533, 21.1985, 17.5026, 16.0065, 14.2815, 14.0509, 11.6923, 10.0067, 10.5004, 9.65113, 8.2566, 9.49279, 7.25941, 9.84551, 9.10625, 13.5828, 7.42791, 9.7761, 13.2592},
01490       {621.575, 81.157, 78.9902, 50.6043, 51.6995, 55.1314, 40.8115, 35.0876, 26.3547, 27.1407, 22.0774, 18.4421, 15.9584, 16.8535, 14.1161, 12.7641, 15.5263, 11.1729, 9.03555, 12.459, 19.0917, 9.49799, 18.3356, 11.5246, 14.7979, 11.849, 14.7263, 17.7757},
01491       {1, 1, 1, 1, 1, 32.849, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.0542444, 13.3384, 1, 1, 0.248621},
01492       {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
01493       {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}
01494     },
01495     {
01496       {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
01497       {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
01498       {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
01499       {1, 1, 0.296438, 118.62, 89.405, 52.2476, 45.2939, 28.7616, 25.5548, 18.0656, 13.6928, 11.9697, 10.3611, 10.2854, 7.90347, 6.39297, 5.44473, 5.61793, 5.27675, 4.76144, 3.86958, 3.78657, 3.56005, 3.94048, 3.79113, 3.08763, 3.15283, 3.15847},
01500       {1, 0.14452, 190.349, 154.279, 86.5965, 82.5413, 34.8556, 31.0941, 21.5582, 16.6576, 14.6587, 11.7976, 10.7251, 8.74257, 8.03431, 6.05178, 6.15984, 5.17494, 4.89723, 4.20602, 4.38072, 3.50678, 3.58872, 3.36111, 4.08605, 3.61866, 3.4662, 3.78235},
01501       {1, 152.929, 136.244, 73.4085, 45.9132, 36.7447, 30.241, 27.8179, 20.674, 19.6962, 14.1128, 12.5882, 9.73802, 10.7205, 7.71969, 7.51919, 7.77108, 5.55116, 5.33028, 4.40788, 4.93005, 3.668, 3.55749, 3.69614, 3.82949, 5.04436, 3.26159, 4.26046},
01502       {140.472, 85.4204, 71.8176, 59.7741, 41.1711, 31.8045, 29.5324, 23.9129, 19.9144, 18.3415, 13.8572, 10.9475, 10.3783, 8.29955, 7.48321, 7.171, 7.00912, 5.36884, 6.52747, 3.98305, 4.04028, 3.61817, 3.21717, 3.59865, 3.14602, 3.12143, 3.07281, 2.69386},
01503       {237.788, 96.2055, 102.507, 72.5626, 75.5721, 55.7517, 51.4652, 44.584, 37.268, 33.9088, 25.8814, 21.9077, 17.3586, 14.6234, 14.7653, 11.7539, 12.3716, 11.6726, 8.48135, 6.99178, 7.1455, 8.09071, 7.52601, 8.58121, 6.96213, 7.95596, 6.81041, 5.66795},
01504       {294.913, 161.347, 102.319, 90.1594, 81.3222, 70.8996, 53.4479, 45.6466, 42.2802, 37.0224, 24.8388, 24.4679, 21.1667, 17.9857, 17.5664, 18.9734, 11.9997, 12.9781, 8.93737, 8.43556, 9.32775, 10.8702, 8.67542, 7.73195, 8.2574, 8.75741, 7.36091, 13.6306},
01505       {180.057, 184.24, 82.2473, 86.6705, 77.8282, 62.6743, 52.5831, 46.0168, 37.4869, 33.5461, 26.8174, 20.3363, 20.252, 18.0727, 15.3164, 12.4784, 11.096, 9.67415, 10.3632, 9.03916, 9.16117, 10.5277, 8.66486, 7.16234, 6.57559, 10.5885, 9.67653, 10.1513},
01506       {251.671, 111.919, 94.9753, 90.3654, 68.4575, 62.0251, 55.3331, 45.2581, 34.2676, 33.7628, 26.9416, 23.3815, 19.7758, 18.5239, 19.3473, 18.9695, 12.0358, 12.3383, 10.8987, 8.83571, 10.1066, 9.69945, 10.316, 9.06576, 11.4875, 9.98941, 9.84754, 11.6985},
01507       {232.68, 109.947, 100.398, 74.9348, 66.4849, 60.1203, 51.4264, 44.3605, 37.0279, 34.0509, 27.488, 23.3947, 20.7529, 19.3877, 17.5345, 14.8416, 13.6832, 16.4535, 10.019, 13.0386, 10.8694, 9.31296, 10.1387, 9.91914, 10.8276, 8.53285, 12.0437, 13.6714},
01508       {1, 1, 1, 1, 1, 54.84, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.0233561, 0.0280901, 1, 1, 0.226361},
01509       {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
01510       {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}
01511     },
01512     {
01513       {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
01514       {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
01515       {1, 1, 0.0011042, 86.9352, 75.2624, 52.2464, 32.6091, 20.4476, 13.4983, 11.2587, 8.80378, 7.11921, 7.0583, 5.68815, 6.20848, 4.34774, 5.45062, 5.4936, 3.43077, 3.33174, 3.04659, 3.8793, 3.11545, 2.97137, 3.92529, 4.57437, 3.88033, 3.82278},
01516       {1, 1, 94.2962, 87.2608, 63.6413, 44.4619, 27.8601, 17.1249, 14.5496, 10.6136, 8.1779, 7.43897, 6.44223, 6.07491, 5.71576, 5.80677, 4.30508, 3.71754, 3.50651, 3.11441, 4.01509, 3.70184, 3.27363, 3.07401, 3.82936, 3.74439, 2.99869, 3.56942},
01517       {1, 0.263982, 119.77, 91.7619, 57.8566, 34.9019, 22.023, 15.941, 12.22, 10.1212, 8.34203, 7.32761, 6.13686, 5.47659, 5.31636, 4.7639, 4.16051, 3.54105, 4.07639, 3.09476, 3.04313, 3.29353, 3.70995, 2.79947, 3.94107, 3.99605, 3.96949, 4.88657},
01518       {1, 113.045, 93.6573, 70.568, 31.0566, 20.7173, 16.8019, 14.8641, 11.9429, 9.96161, 7.87523, 6.7396, 6.18326, 6.16374, 5.35523, 3.95939, 4.04783, 4.28055, 3.89598, 3.4252, 3.42753, 3.48459, 3.23155, 3.19143, 4.02432, 3.06929, 3.42948, 4.04161},
01519       {0.447397, 105.302, 76.6619, 31.9851, 22.4774, 19.276, 17.7676, 14.1965, 10.8272, 10.1416, 7.62459, 6.60822, 7.21393, 6.00029, 5.10027, 4.89418, 4.42892, 3.707, 6.06502, 3.37472, 3.49089, 3.46185, 6.33915, 3.3654, 3.30022, 3.36655, 4.87842, 8.07411},
01520       {152.08, 112.801, 47.3659, 30.5674, 29.0316, 22.3914, 19.0157, 16.3471, 15.5554, 12.4982, 10.4935, 8.23282, 7.40488, 9.06651, 6.97499, 9.66855, 8.35921, 5.45921, 5.68328, 10.6461, 4.65396, 7.5477, 7.11417, 6.02132, 6.79497, 8.21492, 10.5221, 11.7369},
01521       {177.146, 109.73, 53.3379, 32.4922, 30.5016, 25.9712, 22.9064, 19.6453, 17.4685, 14.9279, 10.9822, 10.9065, 9.22264, 9.52341, 9.23665, 6.50148, 6.20737, 8.19635, 7.38019, 9.07186, 9.22787, 11.9975, 15.4328, 12.1685, 11.2679, 11.0456, 16.8556, 15.203},
01522       {175.465, 100.985, 56.7871, 37.5513, 26.3367, 23.6775, 19.3572, 17.3464, 16.3425, 14.2809, 11.4196, 10.1502, 9.45509, 8.55837, 7.929, 7.75422, 6.25516, 6.98075, 7.95726, 5.58602, 8.52811, 8.94976, 8.61675, 7.52203, 5.86654, 9.30841, 7.95983, 9.16498},
01523       {161.557, 60.9083, 42.7418, 32.6681, 28.4483, 23.0831, 20.1852, 16.6503, 14.3982, 12.9469, 10.4914, 10.6759, 9.05724, 8.21126, 8.46837, 9.92698, 7.71569, 6.7965, 8.87549, 6.0765, 7.88892, 7.22201, 8.13346, 8.88474, 11.2008, 10.4921, 8.34342, 10.0337},
01524       {91.718, 50.2739, 37.883, 32.7472, 24.9764, 23.3509, 19.3552, 17.9669, 15.5899, 13.3535, 11.3664, 9.74592, 9.19961, 7.76436, 7.74193, 7.18929, 6.40388, 8.6005, 6.88462, 10.8404, 8.72774, 7.46032, 9.74493, 9.06091, 8.81877, 8.50823, 11.0295, 15.2753},
01525       {72.4631, 47.222, 36.2746, 28.8782, 23.553, 24.7348, 18.7544, 18.437, 15.7064, 12.729, 11.0992, 10.1026, 8.40556, 7.96116, 8.09745, 6.41375, 6.51981, 6.63771, 8.47843, 7.66306, 8.95359, 10.2608, 8.83699, 8.72077, 10.7087, 7.27377, 13.6, 14.2494},
01526       {60.2763, 42.7498, 34.6623, 26.385, 25.4651, 21.7019, 19.0647, 15.8816, 14.2646, 12.5554, 10.8672, 9.43677, 8.44181, 7.59876, 7.81844, 6.11722, 8.516, 8.94197, 6.97098, 7.17371, 6.68615, 7.24368, 6.23672, 11.2857, 8.77067, 8.43604, 11.2313, 10.0775},
01527       {57.866, 41.2832, 33.3179, 27.3557, 23.8832, 20.5696, 17.8125, 15.5961, 14.4456, 12.0961, 9.76464, 9.34033, 7.73885, 7.76005, 7.44823, 7.55132, 7.13281, 5.57387, 6.08408, 6.99443, 6.28186, 6.48654, 6.99549, 5.28173, 7.53539, 6.92374, 8.62903, 12.2492}
01528     },
01529     {
01530       {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
01531       {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
01532       {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
01533       {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
01534       {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
01535       {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
01536       {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
01537       {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
01538       {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
01539       {269.647, 190.711, 88.8938, 70.894, 47.3717, 44.6289, 33.3552, 28.7616, 25.0309, 21.272, 17.9555, 14.7229, 14.5419, 11.7788, 13.5958, 10.8726, 7.98782, 10.1873, 8.92189, 9.84992, 7.93519, 10.66, 9.14665, 13.8959, 8.38381, 7.987, 15.2538, 11.2857},
01540       {235.853, 115.945, 85.6699, 62.6811, 48.3218, 46.3742, 32.8133, 27.8045, 23.4159, 20.5056, 16.0387, 15.324, 13.2206, 11.3368, 10.4307, 9.27748, 11.3733, 8.87551, 8.35207, 11.7778, 8.82057, 8.90268, 8.28021, 8.06991, 12.7847, 7.80538, 8.15497, 8.97099},
01541       {181.416, 96.6442, 73.0719, 54.7106, 42.9821, 37.438, 32.203, 27.5413, 22.6414, 19.4503, 17.7779, 14.5369, 13.0979, 13.7771, 10.4079, 9.45385, 13.0227, 8.50182, 7.17865, 10.9919, 15.7864, 8.76431, 8.51823, 5.92961, 9.18247, 10.5971, 9.3721, 15.4988},
01542       {139.491, 86.7362, 64.8339, 51.7932, 40.4078, 39.1071, 30.9617, 26.4873, 25.263, 20.3243, 16.5092, 14.4393, 12.175, 11.956, 10.8174, 9.08607, 7.18855, 10.0054, 11.1779, 7.12204, 9.47445, 6.93119, 8.93181, 8.61144, 11.0501, 6.27241, 9.95825, 14.4856},
01543       {106.141, 75.9413, 58.0517, 48.534, 42.3919, 33.3155, 31.0908, 25.4912, 22.6406, 19.3109, 16.0106, 14.2606, 12.5963, 11.0191, 11.1065, 9.09784, 9.07922, 8.92264, 7.34917, 7.71939, 7.41573, 8.73107, 6.43358, 17.2136, 9.26347, 8.55656, 10.9458, 12.6821},
01544                 {100.082, 76.8702, 55.0846, 48.6279, 40.6142, 34.3238, 29.3724, 26.3273, 25.1794, 19.6749, 16.3483, 14.3196, 12.3469, 11.8695, 11.738, 9.54169, 10.3128, 8.97389, 7.22238, 8.43618, 9.03957, 7.8851, 9.20503, 8.0428, 8.81155, 10.3738, 10.7343, 18.0864}
01545     }
01546   };
01547 
01548 float CSCTFPtMethods::Pt2StnChiSq(int type, float eta, int dphi, int fr) const
01549 {
01550 
01551   float diff, min, ptmin, ptmax;
01552   float mypt = 0.0;
01553 
01554   int dphicopy = dphi;
01555 
01556   if (type<0 || type>3) 
01557     {
01558 //      std::cout << "CSCTFPtMethods: illegal track type for Chi-square method" << std::endl;
01559       edm::LogError("CSCTFPtMethods::Pt2StnChiSq()")<<"Illegal track type for Chi-square method";
01560       return 0.;
01561     }
01562   
01563   // flip sign
01564   //dphi = -dphi;
01565   
01566   // force positive
01567   eta = fabs(eta);
01568   
01569   //determine which eta bin muon falls into
01570   int i = 0;
01571   for(i = 0; i < 15; i++) 
01572     {
01573       if (eta >= etabins[i] && eta < etabins[i+1]) break;
01574     }
01575   if ( i == 15 ) 
01576     {
01577 //      std::cout<<" CSCTFPtMethods: muon not within any eta range"<< std::endl;
01578       edm::LogWarning("CSCTFPtMethods::Pt2StnChiSq()")<<"Muon not within any eta range";
01579       if (eta<etabins[0]) 
01580         { 
01581           eta = etabins[0];
01582           i = 0;
01583         }
01584       else if (eta>=etabins[15]) 
01585         {
01586           eta = etabins[15];
01587           i = 15;
01588         }
01589       else
01590         exit(0);
01591     }
01592 
01593   bool bCallOldMethod = false;
01594   
01595   if (fr == 0) 
01596     {
01597       //advance past bins in array w/ default values
01598       //default is: dphifr0[x][y][z] = -1, sigmafr0[x][y][z] = 1
01599       int j = 0;  //start from 1st column, j=0
01600       while (dphifr0[type][i][j] == -1 && sigmafr0[type][i][j] == 1 && j != 28) j++;
01601       if ( j == 28 ) 
01602         {
01603 //        std::cout <<" CSCTFPtMethods: every entry in row is default"<< std::endl;
01604           edm::LogInfo("CSCTFPtMethods::Pt2StnChiSq()")<<"Every entry in row is default";
01605           //      exit(0); //normal termination
01606           bCallOldMethod = true;
01607         }
01608 
01609       if (!bCallOldMethod) 
01610         {
01611           //set min, ptmin, ptmax to first bin
01612           //in row that is not default
01613           min = fabs(dphi - dphifr0[type][i][j]) / sigmafr0[type][i][j];
01614           ptmin = ptbins[j];
01615           ptmax = ptbins[j+1];
01616           
01617           //loop through all pt bins.  assign pt of bin w/ least diff
01618           //do not include default bins in calculation
01619           for ( int k = j; k < 28; k++ ) 
01620             {
01621               if(dphifr0[type][i][k] != -1 || sigmafr0[type][i][k] != 1) 
01622                 {
01623                   diff = fabs(dphi - dphifr0[type][i][k]) / sigmafr0[type][i][k];
01624                   if (diff < min) 
01625                     {
01626                       min = diff;
01627                       ptmin = ptbins[k];
01628                       ptmax = ptbins[k+1];
01629                     }
01630                 }
01631             }
01632           mypt = (ptmin + ptmax)/2;
01633         }
01634     }
01635 
01636   if (fr == 1) 
01637     {
01638       //advance past bins in array w/ default values
01639       //default is: dphifr1[x][y][z] = -1, sigmafr1[x][y][z] = 1
01640       int j = 0;  //start from 1st column, j=0
01641       
01642       while (dphifr1[type][i][j] == -1 && sigmafr1[type][i][j] == 1 && j != 28) j++;
01643       
01644       if ( j == 28 ) 
01645         {
01646 //        std::cout <<" CSCTFPtMethods: every entry in row is default"<< std::endl;
01647           edm::LogInfo("CSCTFPtMethods::Pt2StnChiSq()")<<"Every entry in row is default";
01648           //      exit(0); //normal termination
01649           bCallOldMethod = true;
01650         }
01651 
01652     if (!bCallOldMethod) 
01653       {
01654         //set min, ptmin, ptmax to first bin
01655         //in row that is not default
01656         min = fabs(dphi - dphifr1[type][i][j]) / sigmafr1[type][i][j];
01657         ptmin = ptbins[j];
01658         ptmax = ptbins[j+1];
01659         
01660         //loop through all pt bins.  assign pt of bin w/ least diff
01661         //do not include default bins in calculation
01662         for ( int k = j; k < 28; k++ ) 
01663           {
01664             if(dphifr1[type][i][k] != -1 || sigmafr1[type][i][k] != 1) 
01665               {
01666                 diff = fabs(dphi - dphifr1[type][i][k]) / sigmafr1[type][i][k];
01667                 if (diff < min) 
01668                   {
01669                     min = diff;
01670                     ptmin = ptbins[k];
01671                     ptmax = ptbins[k+1];
01672                   }
01673               }
01674           }
01675         mypt = (ptmin + ptmax)/2;
01676       }
01677     }
01678 
01679   // hybrid approach:
01680   if (bCallOldMethod)
01681     {
01682       float dphiR = static_cast<float>(dphicopy) / static_cast<float>(1<<12) * CSCTFConstants::SECTOR_RAD;
01683       // must change type definition, just add one
01684       mypt =  Pt2Stn(type+1, eta, dphiR, fr);
01685     }
01686   
01687   return mypt;
01688 }
01689 
01690 
01691 float CSCTFPtMethods::Pt3StnChiSq(int type, float eta, int dphi1, int dphi2, int fr) const
01692 {
01693 
01694   float diff, min, ptmin, ptmax;
01695   float mypt = 0.0;
01696 
01697   int dphi1copy = dphi1, dphi2copy = dphi2;
01698 
01699   if (type<4 || type>5) 
01700     {
01701 //      std::cout << "PtParams: illegal track type for Chi-square method" << std::endl;
01702       edm::LogError("CSCTFPtMethods::Pt3StnChiSq()")<<"Illegal track type for Chi-square method";
01703       return 0.;
01704     }
01705 
01706   // flip sign
01707   //dphi1 = -dphi1; 
01708   //dphi2 = -dphi2; 
01709 
01710 
01711   //determine which eta bin muon falls into
01712   int i = 0;
01713   for( i = 0; i < 15; i++ ) 
01714     {
01715       if ( eta >= etabins[i] && eta < etabins[i + 1] ) break;
01716     }
01717   if ( i == 15 ) 
01718     {
01719       //std::cout<<"muon not within any eta range";
01720       edm::LogWarning("CSCTFPtMethods::Pt3StnChiSq()")<<"Muon not within any eta range";
01721       if (eta<etabins[0]) 
01722         { 
01723           eta = etabins[0];
01724           i = 0;
01725         }
01726       else if (eta>=etabins[15]) 
01727         {
01728           eta = etabins[15];
01729           i = 15;
01730         }
01731       else
01732         exit(0);
01733     }
01734 
01735   bool bCallOldMethod = false;
01736 
01737   if(abs(dphi2) < 32) dphi2 = 0; //dphi2=dphi23 or dphi24
01738 
01739   //sta1-2-3, dphi1=dphi12, dphi2=dphi23
01740   if (type == 4) 
01741     {
01742       if (fr == 0) 
01743         {
01744           //advance past bins in array w/ default values
01745           //default is: dphifr0[x][y][z] = -1, sigmafr0[x][y][z] = 1
01746           int j = 0;  //start from 1st column, j = 0
01747           while ( ((dphifr0[0][i][j] == -1 && sigmafr0[0][i][j] == 1) || (dphifr0[2][i][j] == -1 && sigmafr0[2][i][j] == 1)) && j != 28 ) j++;
01748           if ( j == 28 ) 
01749             {
01750 //            std::cout<<" L1MuCSCPtParams: every entry in row is default"<<std::endl;  
01751               edm::LogInfo("CSCTFPtMethods::Pt3StnChiSq()")<<"Every entry in row is default";
01752               //        exit(0); //normal termination
01753               bCallOldMethod = true;
01754             }
01755           
01756           if (!bCallOldMethod) 
01757             {
01758               //set min, ptmin, ptmax to first bin
01759               //in row that is not default
01760               min = 1.5625 * ( (pow((dphi1 - dphifr0[0][i][j]),2) / pow(sigmafr0[0][i][j],2)) + (pow((dphi2 - dphifr0[2][i][j]),2) / pow(sigmafr0[2][i][j],2)) - (1.2 * (dphi1 - dphifr0[0][i][j]) * (dphi2 - dphifr0[2][i][j]) / (sigmafr0[0][i][j] * sigmafr0[2][i][j])) ); //calculate chi square
01761               ptmin = ptbins[j];
01762               ptmax = ptbins[j + 1];
01763               
01764               //loop through all pt bins.  assign pt of bin w/ least diff
01765               //do not include default bins in calculation
01766               for ( int k = j; k < 28; k++ ) 
01767                 {
01768                   if( (dphifr0[0][i][k] != -1 || sigmafr0[0][i][k] != 1) && (dphifr0[2][i][k] != -1 || sigmafr0[2][i][k] != 1) ) 
01769                     {
01770                       diff = 1.5625 * ( (pow((dphi1 - dphifr0[0][i][k]),2) / pow(sigmafr0[0][i][k],2)) + (pow((dphi2 - dphifr0[2][i][k]),2) / pow(sigmafr0[2][i][k],2)) - (1.2 * (dphi1 - dphifr0[0][i][k]) * (dphi2 - dphifr0[2][i][k]) / (sigmafr0[0][i][k] * sigmafr0[2][i][k])) );
01771                       if (diff < min) 
01772                         {
01773                           min = diff;
01774                           ptmin = ptbins[k];
01775                           ptmax = ptbins[k + 1];
01776                         }
01777                     }
01778                 }
01779               mypt = (ptmin + ptmax) / 2;
01780             }
01781         }
01782       
01783       if (fr == 1) 
01784         {
01785           //advance past bins in array w/ default values
01786           //default is: dphifr1[x][y][z] = -1, sigmafr1[x][y][z] = 1
01787           int j = 0;  //start from 1st column, j = 0
01788           while ( ((dphifr1[0][i][j] == -1 && sigmafr1[0][i][j] == 1) || (dphifr1[2][i][j] == -1 && sigmafr1[2][i][j] == 1)) && j != 28 ) j++;
01789           if ( j == 28 ) 
01790             {
01791 //            std::cout<<" L1MuCSCPtParams: every entry in row is default"<<std::endl;  
01792               edm::LogInfo("CSCTFPtMethods::Pt3StnChiSq()")<<"Every entry in row is default";
01793               //        exit(0); //normal termination
01794               bCallOldMethod = true;
01795             }
01796 
01797           if (!bCallOldMethod) 
01798             {
01799               //set min, ptmin, ptmax to first bin
01800               //in row that is not default
01801               min = 1.5625 * ( (pow((dphi1 - dphifr1[0][i][j]),2) / pow(sigmafr1[0][i][j],2)) + (pow((dphi2 - dphifr1[2][i][j]),2) / pow(sigmafr1[2][i][j],2)) - (1.2 * (dphi1 - dphifr1[0][i][j]) * (dphi2 - dphifr1[2][i][j]) / (sigmafr1[0][i][j] * sigmafr1[2][i][j])) ); //calculate chi square
01802               ptmin = ptbins[j];
01803               ptmax = ptbins[j + 1];
01804               
01805               //loop through all pt bins.  assign pt of bin w/ least diff
01806               //do not include default bins in calculation
01807               for ( int k = j; k  < 28; k++ ) 
01808                 {
01809                   if( (dphifr1[0][i][k] != -1 || sigmafr1[0][i][k] != 1) && (dphifr1[2][i][k] != -1 || sigmafr1[2][i][k] != 1) ) 
01810                     {
01811                       diff = 1.5625 * ( (pow((dphi1 - dphifr1[0][i][k]),2) / pow(sigmafr1[0][i][k],2)) + (pow((dphi2 - dphifr1[2][i][k]),2) / pow(sigmafr1[2][i][k],2)) - (1.2 * (dphi1 - dphifr1[0][i][k]) * (dphi2 - dphifr1[2][i][k]) / (sigmafr1[0][i][k] * sigmafr1[2][i][k])) );
01812                       if (diff < min) 
01813                         {
01814                           min = diff;
01815                           ptmin = ptbins[k];
01816                           ptmax = ptbins[k + 1];
01817                         }
01818                     }
01819                   mypt = (ptmin + ptmax) / 2;
01820                 }
01821             }
01822         }
01823     }
01824   
01825   //sta1-2-4, dphi1=dphi12, dphi2=dphi24
01826   if (type == 5) 
01827     {
01828       
01829       if (fr == 0) 
01830         {
01831           //advance past bins in array w/ default values
01832           //default is: dphifr0[x][y][z] = -1, sigmafr0[x][y][z] = 1
01833           int j = 0;  //start from 1st column, j = 0
01834           while ( ((dphifr0[0][i][j] == -1 && sigmafr0[0][i][j] == 1) || (dphifr0[3][i][j] == -1 && sigmafr0[3][i][j] == 1)) && j != 28 ) j++;
01835           if ( j == 28 ) 
01836             {
01837 //            std::cout<<" L1MuCSCPtParams: every entry in row is default"<<std::endl;  
01838               edm::LogInfo("CSCTFPtMethods::Pt3StnChiSq()")<<"Every entry in row is default";
01839               //        exit(0); //normal termination
01840               bCallOldMethod = true;
01841             }
01842 
01843           if (!bCallOldMethod) 
01844             {
01845               //set min, ptmin, ptmax to first bin
01846               //in row that is not default
01847               min = 1.5625 * ( (pow((dphi1 - dphifr0[0][i][j]),2) / pow(sigmafr0[0][i][j],2)) + (pow((dphi2 - dphifr0[3][i][j]),2) / pow(sigmafr0[3][i][j],2)) - (1.2 * (dphi1 - dphifr0[0][i][j]) * (dphi2 - dphifr0[3][i][j]) / (sigmafr0[0][i][j] * sigmafr0[3][i][j])) ); //calculate chi square
01848               ptmin = ptbins[j];
01849               ptmax = ptbins[j + 1];
01850               
01851               //loop through all pt bins.  assign pt of bin w/ least diff
01852       //do not include default bins in calculation
01853               for ( int k = j; k < 28; k++ ) 
01854                 {
01855                   if( (dphifr0[0][i][k] != -1 || sigmafr0[0][i][k] != 1) && (dphifr0[3][i][k] != -1 || sigmafr0[3][i][k] != 1) ) 
01856                     {
01857                       diff = 1.5625 * ( (pow((dphi1 - dphifr0[0][i][k]),2) / pow(sigmafr0[0][i][k],2)) + (pow((dphi2 - dphifr0[3][i][k]),2) / pow(sigmafr0[3][i][k],2)) - (1.2 * (dphi1 - dphifr0[0][i][k]) * (dphi2 - dphifr0[3][i][k]) / (sigmafr0[0][i][k] * sigmafr0[3][i][k])) );
01858                       if (diff < min) 
01859                         {
01860                           min = diff;
01861                           ptmin = ptbins[k];
01862                           ptmax = ptbins[k + 1];
01863                         }
01864                     }
01865                 }
01866               mypt = (ptmin + ptmax) / 2;
01867             }
01868         }
01869       
01870       if (fr == 1) 
01871         {
01872           //advance past bins in array w/ default values
01873           //default is: dphifr1[x][y][z] = -1, sigmafr1[x][y][z] = 1
01874           int j = 0;  //start from 1st column, j = 0
01875           while ( ((dphifr1[0][i][j] == -1 && sigmafr1[0][i][j] == 1) || (dphifr1[3][i][j] == -1 && sigmafr1[3][i][j] == 1)) && j != 28 ) j++;
01876           if ( j == 28 ) 
01877             {
01878 //            std::cout<<" L1MuCSCPtParams: every entry in row is default"<<std::endl;  
01879               edm::LogInfo("CSCTFPtMethods::Pt3StnChiSq()")<<"Every entry in row is default";
01880               //        exit(0); //normal termination
01881               bCallOldMethod = true;
01882             }
01883           
01884           if (!bCallOldMethod) 
01885             {
01886               //set min, ptmin, ptmax to first bin
01887               //in row that is not default
01888               min = 1.5625 * ( (pow((dphi1 - dphifr1[0][i][j]),2) / pow(sigmafr1[0][i][j],2)) + (pow((dphi2 - dphifr1[3][i][j]),2) / pow(sigmafr1[3][i][j],2)) - (1.2 * (dphi1 - dphifr1[0][i][j]) * (dphi2 - dphifr1[3][i][j]) / (sigmafr1[0][i][j] * sigmafr1[3][i][j])) ); //calculate chi square
01889               ptmin = ptbins[j];
01890               ptmax = ptbins[j + 1];
01891               
01892               //loop through all pt bins.  assign pt of bin w/ least diff
01893               //do not include default bins in calculation
01894               for ( int k = j; k < 28; k++ ) 
01895                 {
01896                   if( (dphifr1[0][i][k] != -1 || sigmafr1[0][i][k] != 1) && (dphifr1[3][i][k] != -1 || sigmafr1[3][i][k] != 1) ) 
01897                     {
01898                       diff = 1.5625 * ( (pow((dphi1 - dphifr1[0][i][k]),2) / pow(sigmafr1[0][i][k],2)) + (pow((dphi2 - dphifr1[3][i][k]),2) / pow(sigmafr1[3][i][k],2)) - (1.2 * (dphi1 - dphifr1[0][i][k]) * (dphi2 - dphifr1[3][i][k]) / (sigmafr1[0][i][k] * sigmafr1[3][i][k])) );
01899                       if (diff < min) 
01900                         {
01901                           min = diff;
01902                           ptmin = ptbins[k];
01903                           ptmax = ptbins[k + 1];
01904                         }
01905                     }
01906                 }
01907               mypt = (ptmin + ptmax) / 2;
01908             }
01909         }
01910     }
01911     
01912   if (bCallOldMethod) 
01913     {
01914       float dphi12R = (static_cast<float>(dphi1copy)) / static_cast<float>(1<<12) * CSCTFConstants::SECTOR_RAD;
01915       float dphi23R = (static_cast<float>(dphi2copy)) / static_cast<float>(1<<12) * CSCTFConstants::SECTOR_RAD;
01916       // change defintion of track type to old method
01917       mypt =  Pt3Stn(type-3, eta, dphi12R, dphi23R, fr);
01918     }
01919   return mypt;
01920 
01921 }
01922 
01923 float CSCTFPtMethods::Pt2StnHybrid(int type, float eta, int dphi, int fr) const
01924 {
01925   float mypt = 0.0;
01926 
01927   mypt = Pt2StnChiSq(type, eta, dphi, fr);
01928   if(mypt >= 8.0)
01929     {
01930       float dphiR = static_cast<float>(dphi) / static_cast<float>(1<<12) * CSCTFConstants::SECTOR_RAD;
01931       mypt = Pt2Stn(type+1, eta, dphiR, fr);
01932     }
01933 
01934   return mypt;
01935 }
01936 
01937 float CSCTFPtMethods::Pt3StnHybrid(int type, float eta, int dphi1, int dphi2, int fr) const
01938 {
01939   float mypt = 0.0;
01940 
01941   mypt = Pt3StnChiSq(type, eta, dphi1, dphi2, fr);
01942   if(mypt >= 8.0)
01943     {
01944       float dphi12R = (static_cast<float>(dphi1)) / static_cast<float>(1<<12) * CSCTFConstants::SECTOR_RAD;
01945       float dphi23R = (static_cast<float>(dphi2)) / static_cast<float>(1<<12) * CSCTFConstants::SECTOR_RAD;
01946       // change defintion of track type to old method
01947       mypt =  Pt3Stn(type-3, eta, dphi12R, dphi23R, fr);      
01948     }
01949 
01950   return mypt;
01951 }
01952 
01953 bool CSCTFPtMethods::chargeValid(unsigned pT, unsigned quality, unsigned eta, unsigned method) const
01954 {
01955   bool result = false;
01956 
01957   switch(method)
01958     {
01959     case 1:
01960       break;
01961     case 2:
01962       break;
01963     case 3:
01964       if(quality != 1)
01965         {
01966           if(pT <= 19)
01967             {
01968               if(eta >=4 && eta <=9)
01969                 result = true;         
01970             }
01971           if(pT <= 18 && pT >= 10)
01972             {
01973               if(eta > 0 && eta < 4)
01974                 result = true;
01975             }
01976         }
01977     };  
01978   
01979   return result;
01980 }
01981 
01982 float CSCTFPtMethods::PtEff90(float pt, float eta, int mode) const
01983 {
01984   // set pT resolution 
01985   float c;
01986   switch (mode) 
01987     {
01988       // 3-stn with ME1
01989     case 2:
01990     case 3:
01991     case 4:
01992       // leave as 2 Stn for now:
01993       //        if (eta < 2.0)
01994       //            c = 0.2;
01995       //        else
01996       //            c = 0.2 + (eta-2.0)*0.5;
01997       //        break;
01998       // 2-stn with ME1
01999     case 6:
02000     case 7:
02001       //        c=(-.2999 * (eta*eta*eta) + 2.030 * (eta*eta) - 4.235 * eta + 3.024)+0.02;
02002       // Try just fixed value from fits to Pt turn-on curves
02003       c=0.3;
02004       break;
02005       // 2 or 3 stn without ME1
02006     case 5:
02007     case 8:
02008     case 9:
02009       c=(-2.484 * (eta*eta*eta) + 14.43 * (eta*eta) - 27.66 * eta + 18.47)*.72;
02010       break;
02011     case 10:
02012       c=2.0;
02013       break;
02014       // MB1 tracks
02015     case 11:
02016     case 12:
02017     case 13:
02018     case 14:
02019     case 15:
02020       c=0.3;
02021       break;
02022     default:
02023       c = 0.0;
02024     };
02025   // Calculation of 90% threshold from 50% one, assuming Gaussian resolution
02026   // 90% of Gaussian area extends to 1.28*sigma
02027   if (c>0.78) c = 0.78;
02028   //    return pt/(1.0 - 1.28*c);
02029   // Let's go back to old empirical method:
02030   return pt*(1.0 + 1.28*c);
02031 }