CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Attributes | Private Attributes
CSCTFPtMethods Class Reference

#include <CSCTFPtMethods.h>

Public Types

enum  { kMaxParameters = 4 }
 
enum  {
  kME1andME2 = 1, kME1andME3, kME2andME3, kME2andME4,
  kME3andME4, kME1andME2ovr, kME2andMB1, kME2andMB2
}
 

Public Member Functions

bool chargeValid (unsigned Pt, unsigned Quality, unsigned Eta, unsigned method) const
 
 CSCTFPtMethods (const L1MuTriggerPtScale *ptScale=nullptr)
 
double Likelihood (double *phi12, double *phi23, double *par_m12, double *par_m23, double *par_sig12, double *par_sig23, double *par_rho, double *v) const
 
double Likelihood2 (double *phi12, double *par_m12, double *par_sig12, double *v) const
 
double Likelihood2011 (double *phi12, double *phi23, double *par_m12, double *par_m23, double *par_sig12, double *par_sig23, double *par_rho, double *v) const
 
double Likelihood2_2011 (double *phi12, double *par_m12, double *par_sig12, double *v) const
 
float Pt2Stn (int type, float eta, float dphi, int fr=-1) const
 
float Pt2Stn2010 (int type, float eta, float dphi, int fr=-1, int method=11) const
 
float Pt2Stn2011 (int type, float eta, float dphi, int fr=-1, int method=11, int phiSign=2) const
 
float Pt2Stn2012 (int type, float eta, float dphi, int PtbyMLH, float &theLH, int fr=-1, int method=11) const
 
float Pt2Stn2012_DT (int type, float eta, float dphi, int PtbyMLH, float &theLH, int fr=-1, int method=11, int phiSign=2) const
 
float Pt2StnChiSq (int type, float eta, int dphi, int fr) const
 
float Pt2StnHybrid (int type, float eta, int dphi, int fr) const
 
float Pt3Stn (int type, float eta, float dphi1, float dphi2, int fr=-1) const
 
float Pt3Stn2010 (int type, float eta, float dphi1, float dphi2, int fr=-1, int method=11) const
 
float Pt3Stn2011 (int type, float eta, float dphi1, float dphi2, int fr=-1, int method=11) const
 
float Pt3Stn2012 (int type, float eta, float dphi1, float dphi2, int PtbyMLH, float &theLH, int fr=-1, int method=11) const
 
float Pt3Stn2012_DT (int type, float eta, float dphi1, float dphi2, int PtbyMLH, float &theLH, int fr=-1, int method=11) const
 
float Pt3StnChiSq (int type, float eta, int dphi1, int dphi2, int fr) const
 
float Pt3StnHybrid (int type, float eta, int dphi1, int dphi2, int fr) const
 
float PtEff90 (float pt, float eta, int mode) const
 

Static Public Attributes

static const double A_mu12Front [4][15]
 
static const double A_mu12Rare [4][15]
 
static const double A_mu13Front [4][15]
 
static const double A_mu13Rare [4][15]
 
static const double A_mu14Front [4][15]
 
static const double A_mu14Rare [4][15]
 
static const double A_mu23 [4][15]
 
static const double A_mu24 [4][15]
 
static const double A_mu34 [4][15]
 
static const double A_mu51 [4][15]
 
static const double A_mu52 [4][15]
 
static const double A_mu53 [4][15]
 
static const double A_rho123FrontCSCTF [5][15]
 
static const double A_rho123RareCSCTF [5][15]
 
static const double A_rho124FrontCSCTF [5][15]
 
static const double A_rho124RareCSCTF [5][15]
 
static const double A_rho134FrontCSCTF [5][15]
 
static const double A_rho134RareCSCTF [5][15]
 
static const double A_rho234CSCTF [5][15]
 
static const double A_rho512 [5][15]
 DT correlation. More...
 
static const double A_rho513 [5][15]
 
static const double A_rho523 [5][15]
 
static const double A_sig12Front [3][15]
 
static const double A_sig12Rare [3][15]
 
static const double A_sig13Front [3][15]
 
static const double A_sig13Rare [3][15]
 
static const double A_sig14Front [3][15]
 
static const double A_sig14Rare [3][15]
 
static const double A_sig23 [3][15]
 
static const double A_sig24 [3][15]
 
static const double A_sig34 [3][15]
 
static const double A_sig51 [3][15]
 
static const double A_sig52 [3][15]
 
static const double A_sig53 [3][15]
 
static const double AB_mu12F [4][15]
 
static const double AB_mu12FME11 [4][15]
 
static const double AB_mu12FnoME11 [4][15]
 
static const double AB_mu12R [4][15]
 
static const double AB_mu12RME11 [4][15]
 
static const double AB_mu12RnoME11 [4][15]
 
static const double AB_mu13F [4][15]
 
static const double AB_mu13FME11 [4][15]
 
static const double AB_mu13FnoME11 [4][15]
 
static const double AB_mu13R [4][15]
 
static const double AB_mu13RME11 [4][15]
 
static const double AB_mu13RnoME11 [4][15]
 
static const double AB_mu14F [4][15]
 
static const double AB_mu14FME11 [4][15]
 
static const double AB_mu14FnoME11 [4][15]
 
static const double AB_mu14R [4][15]
 
static const double AB_mu14RME11 [4][15]
 
static const double AB_mu14RnoME11 [4][15]
 
static const double AB_mu23 [4][15]
 
static const double AB_mu24 [4][15]
 
static const double AB_mu34 [4][15]
 
static const double AB_mu5 [4][15]
 
static const double AB_mu51 [4][15]
 
static const double AB_mu52 [4][15]
 
static const double AB_mu53 [4][15]
 
static const double AB_rho123F [5][15]
 
static const double AB_rho123R [5][15]
 
static const double AB_rho124F [5][15]
 
static const double AB_rho124R [5][15]
 
static const double AB_rho134F [5][15]
 
static const double AB_rho134R [5][15]
 
static const double AB_rho234 [5][15]
 
static const double AB_rho512 [5][15]
 
static const double AB_rho513 [5][15]
 
static const double AB_rho51B [5][15]
 
static const double AB_rho523 [5][15]
 
static const double AB_rho52B [5][15]
 
static const double AB_rho53B [5][15]
 
static const double AB_sig12F [4][15]
 
static const double AB_sig12FME11 [4][15]
 
static const double AB_sig12FnoME11 [4][15]
 
static const double AB_sig12R [4][15]
 
static const double AB_sig12RME11 [4][15]
 
static const double AB_sig12RnoME11 [4][15]
 
static const double AB_sig13F [4][15]
 
static const double AB_sig13FME11 [4][15]
 
static const double AB_sig13FnoME11 [4][15]
 
static const double AB_sig13R [4][15]
 
static const double AB_sig13RME11 [4][15]
 
static const double AB_sig13RnoME11 [4][15]
 
static const double AB_sig14F [4][15]
 
static const double AB_sig14FME11 [4][15]
 
static const double AB_sig14FnoME11 [4][15]
 
static const double AB_sig14R [4][15]
 
static const double AB_sig14RME11 [4][15]
 
static const double AB_sig14RnoME11 [4][15]
 
static const double AB_sig23 [4][15]
 
static const double AB_sig24 [4][15]
 
static const double AB_sig34 [4][15]
 
static const double AB_sig5 [4][15]
 
static const double AB_sig51 [4][15]
 
static const double AB_sig52 [4][15]
 
static const double AB_sig53 [4][15]
 
static const float AkHighEta_Fit1 [kME2andMB2][kMaxParameters]
 
static const float AkHighEta_Fit2 [kME2andMB2][kMaxParameters]
 
static const float AkLowEta_Fit1 [kME2andMB2][kMaxParameters]
 
static const float AkLowEta_Fit2 [kME2andMB2][kMaxParameters]
 
static const float BkHighEta_Fit2 [kME2andMB2][kMaxParameters]
 
static const float BkLowEta_Fit2 [kME2andMB2][kMaxParameters]
 
static const float dphifr0 [4][15][28]
 
static const float dphifr1 [4][15][28]
 
static const float etabins [16]
 
static const float FRCorrHighEta [kME2andMB2][2]
 
static const float FRCorrLowEta [kME2andMB2][2]
 
static const float kGlobalScaleFactor = 1.36
 
static const float ptbins [29]
 
static const float sigmafr0 [4][15][28]
 
static const float sigmafr1 [4][15][28]
 

Private Attributes

const L1MuTriggerPtScaletrigger_scale
 

Detailed Description

Definition at line 8 of file CSCTFPtMethods.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
kMaxParameters 

Definition at line 10 of file CSCTFPtMethods.h.

◆ anonymous enum

anonymous enum

Allowed station combinations for extrapolation units

Enumerator
kME1andME2 
kME1andME3 
kME2andME3 
kME2andME4 
kME3andME4 
kME1andME2ovr 
kME2andMB1 
kME2andMB2 

Definition at line 12 of file CSCTFPtMethods.h.

Constructor & Destructor Documentation

◆ CSCTFPtMethods()

CSCTFPtMethods::CSCTFPtMethods ( const L1MuTriggerPtScale ptScale = nullptr)

Definition at line 5162 of file CSCTFPtMethods.cc.

5162 : trigger_scale(ptScale) {}
const L1MuTriggerPtScale * trigger_scale
const std::vector< double > ptScale
Definition: Utilities.cc:33

Member Function Documentation

◆ chargeValid()

bool CSCTFPtMethods::chargeValid ( unsigned  Pt,
unsigned  Quality,
unsigned  Eta,
unsigned  method 
) const

The hybrid method may be changing soon to: 1st Calculate PT with Darin's method 2nd if BELOW a certain cut call Cathy's method 3rd if Cathy's < Darin's use Cathy's otherwise return Darin's A study needs to be performed to determine any gains from this procedure.A method to calculate the charge valid bit Regions where this bit is were determined via simulation

Definition at line 10109 of file CSCTFPtMethods.cc.

References PVValHelper::eta, AlcaSiPixelAliHarvester0T_cff::method, pv::pT, quality, and mps_fire::result.

10109  {
10110  bool result = false;
10111 
10112  switch (method) {
10113  case 1:
10114  break;
10115  case 2:
10116  break;
10117  case 3:
10118  if (quality != 1) {
10119  if (pT <= 19) {
10120  if (eta >= 4 && eta <= 9)
10121  result = true;
10122  }
10123  if (pT <= 18 && pT >= 10) {
10124  if (eta > 0 && eta < 4)
10125  result = true;
10126  }
10127  }
10128  };
10129 
10130  return result;
10131 }
string quality

◆ Likelihood()

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

Definition at line 5382 of file CSCTFPtMethods.cc.

References JetChargeProducer_cfi::exp, dqm-mbProfile::log, rho, and findQualityFiles::v.

Referenced by Pt3Stn2010(), and Pt3Stn2012().

5389  {
5390  double fitval = 0.;
5391  //double Pi = acos(-1.);
5392  double m12 = 0.;
5393  if (v[0] > par_m12[3])
5394  m12 =
5395  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
5396  double m23 = 0.;
5397  if (v[0] > par_m23[3])
5398  m23 =
5399  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
5400  double sig12 = 0.1;
5401  if (v[0] > 0.)
5402  sig12 = par_sig12[0] / v[0] + par_sig12[1] / v[0] / v[0] + par_sig12[2]; //sig12
5403  double sig23 = 0.1;
5404  if (v[0] > 0.)
5405  sig23 = par_sig23[0] / v[0] + par_sig23[1] / v[0] / v[0] + par_sig23[2]; //sig23
5406 
5407  double rho = (par_rho[0] + par_rho[1] * log(v[0]) + par_rho[2] * log(v[0]) * log(v[0]) +
5408  par_rho[3] * log(v[0]) * log(v[0]) * log(v[0])) *
5409  exp(-par_rho[4] * log(v[0])); //rho
5410  if (rho > 0.95)
5411  rho = 0.95;
5412  if (rho < -0.95)
5413  rho = -0.95;
5414  //
5415  fitval = (phi12[0] - m12) * (phi12[0] - m12) / sig12 / sig12 + (phi23[0] - m23) * (phi23[0] - m23) / sig23 / sig23;
5416  fitval = fitval - 2. * rho * (phi12[0] - m12) * (phi23[0] - m23) / sig12 / sig23;
5417  fitval = fitval * (-1. / (2. * (1 - rho * rho)));
5418  fitval = fitval - log(sig12) - log(sig23) - 0.5 * log(1 - rho * rho);
5419 
5420  return fitval;
5421 }

◆ Likelihood2()

double CSCTFPtMethods::Likelihood2 ( double *  phi12,
double *  par_m12,
double *  par_sig12,
double *  v 
) const

Definition at line 5347 of file CSCTFPtMethods.cc.

References dqm-mbProfile::log, Pi, and findQualityFiles::v.

Referenced by Pt2Stn2010(), and Pt2Stn2012().

5347  {
5348  double fitval = 0.;
5349  double Pi = acos(-1.);
5350  double m12 = 0;
5351  if (v[0] > par_m12[3])
5352  m12 =
5353  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
5354  double sig12 = 0.1;
5355  if (v[0] > 0.)
5356  sig12 = par_sig12[0] / v[0] + par_sig12[1] / v[0] / v[0] + par_sig12[2]; //sig12
5357  //
5358  fitval = -(phi12[0] - m12) * (phi12[0] - m12) / 2. / sig12 / sig12;
5359  fitval = fitval - log(sig12) - 0.5 * log(2 * Pi);
5360 
5361  return fitval;
5362 }
const double Pi

◆ Likelihood2011()

double CSCTFPtMethods::Likelihood2011 ( double *  phi12,
double *  phi23,
double *  par_m12,
double *  par_m23,
double *  par_sig12,
double *  par_sig23,
double *  par_rho,
double *  v 
) const

Definition at line 5422 of file CSCTFPtMethods.cc.

References JetChargeProducer_cfi::exp, dqm-mbProfile::log, rho, and findQualityFiles::v.

Referenced by Pt3Stn2011(), and Pt3Stn2012_DT().

5429  {
5430  double fitval = 0.;
5431  //double Pi = acos(-1.);
5432  double m12 = 0.;
5433  if (v[0] > par_m12[3])
5434  m12 =
5435  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
5436  double m23 = 0.;
5437  if (v[0] > par_m23[3])
5438  m23 =
5439  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
5440  double sig12 = 0.1;
5441  if (v[0] > par_sig12[3])
5442  sig12 = par_sig12[0] / (v[0] - par_sig12[3]) + par_sig12[1] / (v[0] - par_sig12[3]) / (v[0] - par_sig12[3]) +
5443  par_sig12[2]; //sig12
5444  double sig23 = 0.1;
5445  if (v[0] > par_sig23[3])
5446  sig23 = par_sig23[0] / (v[0] - par_sig23[3]) + par_sig23[1] / (v[0] - par_sig23[3]) / (v[0] - par_sig23[3]) +
5447  par_sig23[2]; //sig12
5448  if (sig12 < 0.0015)
5449  sig12 = 0.0015;
5450  if (sig23 < 0.0015)
5451  sig23 = 0.0015;
5452 
5453  double rho = (par_rho[0] + par_rho[1] * log(v[0]) + par_rho[2] * log(v[0]) * log(v[0]) +
5454  par_rho[3] * log(v[0]) * log(v[0]) * log(v[0])) *
5455  exp(-par_rho[4] * log(v[0])); //rho
5456  //if(rho > 0.95) rho = 0.95;
5457  //if(rho < -0.95) rho = -0.95;
5458  if (rho > 0.7)
5459  rho = 0.7;
5460  if (rho < -0.7)
5461  rho = -0.7;
5462  //rho = 0.4;
5463  //
5464  fitval = (phi12[0] - m12) * (phi12[0] - m12) / sig12 / sig12 + (phi23[0] - m23) * (phi23[0] - m23) / sig23 / sig23;
5465  fitval = fitval - 2. * rho * (phi12[0] - m12) * (phi23[0] - m23) / sig12 / sig23;
5466  fitval = fitval * (-1. / (2. * (1 - rho * rho)));
5467  fitval = fitval - log(sig12) - log(sig23) - 0.5 * log(1 - rho * rho);
5468 
5469  return fitval;
5470 }

◆ Likelihood2_2011()

double CSCTFPtMethods::Likelihood2_2011 ( double *  phi12,
double *  par_m12,
double *  par_sig12,
double *  v 
) const

Definition at line 5363 of file CSCTFPtMethods.cc.

References dqm-mbProfile::log, Pi, and findQualityFiles::v.

Referenced by Pt2Stn2011(), and Pt2Stn2012_DT().

5363  {
5364  double fitval = 0.;
5365  double Pi = acos(-1.);
5366  double m12 = 0;
5367  if (v[0] > par_m12[3])
5368  m12 =
5369  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
5370  double sig12 = 0.1;
5371  if (v[0] > par_sig12[3])
5372  sig12 = par_sig12[0] / (v[0] - par_sig12[3]) + par_sig12[1] / (v[0] - par_sig12[3]) / (v[0] - par_sig12[3]) +
5373  par_sig12[2]; //sig12
5374  if (sig12 < 0.0015)
5375  sig12 = 0.0015;
5376  //
5377  fitval = -(phi12[0] - m12) * (phi12[0] - m12) / 2. / sig12 / sig12;
5378  fitval = fitval - log(sig12) - 0.5 * log(2 * Pi);
5379 
5380  return fitval;
5381 }
const double Pi

◆ Pt2Stn()

float CSCTFPtMethods::Pt2Stn ( int  type,
float  eta,
float  dphi,
int  fr = -1 
) const

2-station Pt measurement for types (see SP class for 2-stn types)

DEA: kluge to get verilog and original model to agree

Definition at line 5168 of file CSCTFPtMethods.cc.

References A, AkHighEta_Fit2, AkLowEta_Fit2, B, BkHighEta_Fit2, BkLowEta_Fit2, PVValHelper::eta, FRCorrHighEta, FRCorrLowEta, L1MuScale::getLowEdge(), L1MuTriggerPtScale::getPtScale(), kGlobalScaleFactor, kME1andME2, kME2andMB2, mathSSE::sqrt(), and trigger_scale.

Referenced by CSCTFPtLUT::calcPt(), Pt2StnChiSq(), Pt2StnHybrid(), and Pt3Stn().

5168  {
5169  float A = 0;
5170  float B = 0;
5171  if (dphi == 0.0)
5172  dphi = 1.e-6;
5173  if (eta < 0.0)
5174  eta = static_cast<float>(fabs(static_cast<double>(eta)));
5175  if (dphi < 0.0)
5176  dphi = static_cast<float>(fabs(static_cast<double>(dphi)));
5178 #ifdef L1CSC_STANDALONE
5179  if (type == kME1andME2 && eta <= 1.25)
5180  fr = 1;
5181 #else
5182  if (type == kME1andME2 && eta < 1.2)
5183  fr = 1;
5184 #endif
5185  if (type >= kME1andME2 && type <= kME2andMB2 && eta < 2.5) {
5186  if (eta >= 0.0 && eta < 1.6) {
5187  A = AkLowEta_Fit2[type - 1][0] + AkLowEta_Fit2[type - 1][1] * eta + AkLowEta_Fit2[type - 1][2] * eta * eta +
5188  AkLowEta_Fit2[type - 1][3] * eta * eta * eta;
5189  B = BkLowEta_Fit2[type - 1][0] + BkLowEta_Fit2[type - 1][1] * eta + BkLowEta_Fit2[type - 1][2] * eta * eta +
5190  BkLowEta_Fit2[type - 1][3] * eta * eta * eta;
5191  if (fr >= 0 && fr <= 1) {
5192  A *= FRCorrLowEta[type - 1][fr];
5193  B *= FRCorrLowEta[type - 1][fr];
5194  }
5195  }
5196 
5197  if (eta >= 1.6 && eta < 2.5) {
5198  A = AkHighEta_Fit2[type - 1][0] + AkHighEta_Fit2[type - 1][1] * eta + AkHighEta_Fit2[type - 1][2] * eta * eta +
5199  AkHighEta_Fit2[type - 1][3] * eta * eta * eta;
5200  B = BkHighEta_Fit2[type - 1][0] + BkHighEta_Fit2[type - 1][1] * eta + BkHighEta_Fit2[type - 1][2] * eta * eta +
5201  BkHighEta_Fit2[type - 1][3] * eta * eta * eta;
5202  if (fr >= 0 && fr <= 1) {
5203  A *= FRCorrHighEta[type - 1][fr];
5204  B *= FRCorrHighEta[type - 1][fr];
5205  }
5206  }
5207 
5208  A *= kGlobalScaleFactor;
5209  B *= kGlobalScaleFactor;
5210  float Pt = (A + sqrt(A * A + 4. * dphi * B)) / (2. * dphi);
5211 
5212  // return (Pt>0.0) ? Pt : 0.0;
5213  return (Pt > trigger_scale->getPtScale()->getLowEdge(1)) ? Pt : trigger_scale->getPtScale()->getLowEdge(1);
5214  }
5215  return 0.0;
5216 }
static const float AkHighEta_Fit2[kME2andMB2][kMaxParameters]
Definition: APVGainStruct.h:7
static const float FRCorrHighEta[kME2andMB2][2]
virtual float getLowEdge(unsigned packed) const =0
get the low edge of bin represented by packed
static const float BkLowEta_Fit2[kME2andMB2][kMaxParameters]
const L1MuTriggerPtScale * trigger_scale
const L1MuScale * getPtScale() const
get the Pt scale
T sqrt(T t)
Definition: SSEVec.h:19
static const float BkHighEta_Fit2[kME2andMB2][kMaxParameters]
static const float kGlobalScaleFactor
static const float AkLowEta_Fit2[kME2andMB2][kMaxParameters]
static const float FRCorrLowEta[kME2andMB2][2]
Definition: APVGainStruct.h:7

◆ Pt2Stn2010()

float CSCTFPtMethods::Pt2Stn2010 ( int  type,
float  eta,
float  dphi,
int  fr = -1,
int  method = 11 
) const

Definition at line 5472 of file CSCTFPtMethods.cc.

References A_mu12Front, A_mu12Rare, A_mu13Front, A_mu13Rare, A_mu14Front, A_mu14Rare, A_mu23, A_mu24, A_mu34, A_mu51, A_mu52, A_mu53, A_sig12Front, A_sig12Rare, A_sig13Front, A_sig13Rare, A_sig14Front, A_sig14Rare, A_sig23, A_sig24, A_sig34, A_sig51, A_sig52, A_sig53, gather_cfg::cout, PVValHelper::eta, etabins, multPhiCorr_741_25nsDY_cfi::fx, L1MuScale::getLowEdge(), L1MuTriggerPtScale::getPtScale(), Likelihood2(), AlcaSiPixelAliHarvester0T_cff::method, pfMETCorrectionType0_cfi::par1, DiDispStaMuonMonitor_cfi::pt, HLT_2024v12_cff::Pt_min, trigger_scale, and findQualityFiles::v.

Referenced by CSCTFPtLUT::calcPt(), and Pt3Stn2010().

5472  {
5473  if (fabs(eta) >= 2.4)
5474  eta = 2.35;
5475  double PTsolv = 1.; // for muon plus hypothesis
5476  double PTsolvMinus = 1.; //for muon minus hypothesis
5477  for (int iETA = 0; iETA < 15; iETA++) {
5478  if (fabs(eta) >= etabins[iETA] && fabs(eta) < etabins[iETA + 1]) {
5479  // calculate curvers of mean and sigma
5480  // calculate phi12 mean
5481  double par1[4] = {0., 0., 0., 0.};
5482  //double phi12mean = fitf5(v, par1); //mu12
5483  double par_sig1[3] = {0., 0., 0.};
5484  int iETA1 = iETA;
5485  switch (type) // type = mode here
5486  {
5487  case 6: //1-2
5488  if (fr == 1) {
5489  if (iETA1 < 3)
5490  iETA1 = 3;
5491  //if(iETA1 > 11)iETA1 = 11;
5492  //if(fabs(eta)>1.56 && fabs(eta) < 1.6) iETA1 = iETA +1;
5493  par1[0] = A_mu12Front[0][iETA1];
5494  par1[1] = A_mu12Front[1][iETA1];
5495  par1[2] = A_mu12Front[2][iETA1];
5496  par1[3] = A_mu12Front[3][iETA1];
5497  par_sig1[0] = A_sig12Front[0][iETA1];
5498  par_sig1[1] = A_sig12Front[1][iETA1];
5499  par_sig1[2] = A_sig12Front[2][iETA1];
5500  }
5501  if (fr == 0) {
5502  if (iETA1 < 1)
5503  iETA1 = 1;
5504  //if(iETA1 > 11)iETA1 = 11;
5505  //if(fabs(eta)>1.56 && fabs(eta) < 1.6) iETA1 = iETA +1;
5506  par1[0] = A_mu12Rare[0][iETA1];
5507  par1[1] = A_mu12Rare[1][iETA1];
5508  par1[2] = A_mu12Rare[2][iETA1];
5509  par1[3] = A_mu12Rare[3][iETA1];
5510  par_sig1[0] = A_sig12Rare[0][iETA1];
5511  par_sig1[1] = A_sig12Rare[1][iETA1];
5512  par_sig1[2] = A_sig12Rare[2][iETA1];
5513  }
5514  break;
5515  case 7: //1-3
5516  if (fr == 1) {
5517  if (iETA1 < 3)
5518  iETA1 = 3;
5519  //if(iETA1 > 11)iETA1 = 11;
5520  //if(fabs(eta)>1.56 && fabs(eta) < 1.6) iETA1 = iETA +1;
5521  par1[0] = A_mu13Front[0][iETA1];
5522  par1[1] = A_mu13Front[1][iETA1];
5523  par1[2] = A_mu13Front[2][iETA1];
5524  par1[3] = A_mu13Front[3][iETA1];
5525  par_sig1[0] = A_sig13Front[0][iETA1];
5526  par_sig1[1] = A_sig13Front[1][iETA1];
5527  par_sig1[2] = A_sig13Front[2][iETA1];
5528  }
5529  if (fr == 0) {
5530  if (iETA1 < 2)
5531  iETA1 = 2;
5532  //if(iETA1 > 11)iETA1 = 11;
5533  //if(fabs(eta)>1.56 && fabs(eta) < 1.6) iETA1 = iETA +1;
5534  par1[0] = A_mu13Rare[0][iETA1];
5535  par1[1] = A_mu13Rare[1][iETA1];
5536  par1[2] = A_mu13Rare[2][iETA1];
5537  par1[3] = A_mu13Rare[3][iETA1];
5538  par_sig1[0] = A_sig13Rare[0][iETA1];
5539  par_sig1[1] = A_sig13Rare[1][iETA1];
5540  par_sig1[2] = A_sig13Rare[2][iETA1];
5541  }
5542  break;
5543  case 8: //2-3
5544  if (iETA1 < 2)
5545  iETA1 = 2;
5546  par1[0] = A_mu23[0][iETA1];
5547  par1[1] = A_mu23[1][iETA1];
5548  par1[2] = A_mu23[2][iETA1];
5549  par1[3] = A_mu23[3][iETA1];
5550  par_sig1[0] = A_sig23[0][iETA1];
5551  par_sig1[1] = A_sig23[1][iETA1];
5552  par_sig1[2] = A_sig23[2][iETA1];
5553  break;
5554  case 9: //2-4
5555  if (iETA1 < 9)
5556  iETA1 = 9;
5557  par1[0] = A_mu24[0][iETA1];
5558  par1[1] = A_mu24[1][iETA1];
5559  par1[2] = A_mu24[2][iETA1];
5560  par1[3] = A_mu24[3][iETA1];
5561  par_sig1[0] = A_sig24[0][iETA1];
5562  par_sig1[1] = A_sig24[1][iETA1];
5563  par_sig1[2] = A_sig24[2][iETA1];
5564  break;
5565  case 10: //3-4
5566  if (iETA1 < 9)
5567  iETA1 = 9;
5568  par1[0] = A_mu34[0][iETA1];
5569  par1[1] = A_mu34[1][iETA1];
5570  par1[2] = A_mu34[2][iETA1];
5571  par1[3] = A_mu34[3][iETA1];
5572  par_sig1[0] = A_sig34[0][iETA1];
5573  par_sig1[1] = A_sig34[1][iETA1];
5574  par_sig1[2] = A_sig34[2][iETA1];
5575  break;
5576  case 13: //1-4
5577  if (iETA1 < 9)
5578  iETA1 = 9;
5579  if (iETA1 > 12)
5580  iETA1 = 12;
5581  if (fr == 1) {
5582  par1[0] = A_mu14Front[0][iETA1];
5583  par1[1] = A_mu14Front[1][iETA1];
5584  par1[2] = A_mu14Front[2][iETA1];
5585  par1[3] = A_mu14Front[3][iETA1];
5586  par_sig1[0] = A_sig14Front[0][iETA1];
5587  par_sig1[1] = A_sig14Front[1][iETA1];
5588  par_sig1[2] = A_sig14Front[2][iETA1];
5589  }
5590  if (fr == 0) {
5591  par1[0] = A_mu14Rare[0][iETA1];
5592  par1[1] = A_mu14Rare[1][iETA1];
5593  par1[2] = A_mu14Rare[2][iETA1];
5594  par1[3] = A_mu14Rare[3][iETA1];
5595  par_sig1[0] = A_sig14Rare[0][iETA1];
5596  par_sig1[1] = A_sig14Rare[1][iETA1];
5597  par_sig1[2] = A_sig14Rare[2][iETA1];
5598  }
5599  break;
5600  case 11: // b1-3
5601  if (iETA1 != 2)
5602  iETA1 = 2;
5603  par1[0] = A_mu53[0][iETA1];
5604  par1[1] = A_mu53[1][iETA1];
5605  par1[2] = A_mu53[2][iETA1];
5606  par1[3] = A_mu53[3][iETA1];
5607  par_sig1[0] = A_sig53[0][iETA1];
5608  par_sig1[1] = A_sig53[1][iETA1];
5609  par_sig1[2] = A_sig53[2][iETA1];
5610 
5611  break;
5612  case 12: //1-2-b1 = 2-b1 for pt_method < 10, for pt_method > 10: b1-2
5613  if (iETA1 < 1)
5614  iETA1 = 1;
5615  if (iETA1 > 2)
5616  iETA1 = 2;
5617  par1[0] = A_mu52[0][iETA1];
5618  par1[1] = A_mu52[1][iETA1];
5619  par1[2] = A_mu52[2][iETA1];
5620  par1[3] = A_mu52[3][iETA1];
5621  par_sig1[0] = A_sig52[0][iETA1];
5622  par_sig1[1] = A_sig52[1][iETA1];
5623  par_sig1[2] = A_sig52[2][iETA1];
5624  break;
5625  case 14: //2-b1 for pt_method < 10 and b1-1 for pt_method > 10
5626  if (method < 10) {
5627  if (iETA1 < 1)
5628  iETA1 = 1;
5629  if (iETA1 > 2)
5630  iETA1 = 2;
5631  }
5632  par1[0] = A_mu52[0][iETA1];
5633  par1[1] = A_mu52[1][iETA1];
5634  par1[2] = A_mu52[2][iETA1];
5635  par1[3] = A_mu52[3][iETA1];
5636  par_sig1[0] = A_sig52[0][iETA1];
5637  par_sig1[1] = A_sig52[1][iETA1];
5638  par_sig1[2] = A_sig52[2][iETA1];
5639  if (method > 10) {
5640  if (iETA1 > 2)
5641  iETA1 = 2;
5642  par1[0] = A_mu51[0][iETA1];
5643  par1[1] = A_mu51[1][iETA1];
5644  par1[2] = A_mu51[2][iETA1];
5645  par1[3] = A_mu51[3][iETA1];
5646  par_sig1[0] = A_sig51[0][iETA1];
5647  par_sig1[1] = A_sig51[1][iETA1];
5648  par_sig1[2] = A_sig51[2][iETA1];
5649  }
5650  break;
5651  //default:
5652  //return 0.0;
5653  }
5654 
5655  //************* solve equation dLog(Likelihood)/dpt = 0 for muon + ;
5656  //if(fabs(dphi) >= 0.002)
5657  //if(fabs(dphi) >= 0.00)
5658  //if(fabs(dphi) >= 0.002 || (fabs(dphi) >= 0.01 && (type == 12 || type == 14)))
5659  //{
5660  double pt = 140;
5661  double dpt = 0.1;
5662  double step = 5.;
5663  while (pt > 2.) {
5664  double par_phi12[1] = {dphi};
5665  double v[1], lpt1_1, lpt1_2, lpt2_1, lpt2_2;
5666  v[0] = pt;
5667  lpt1_1 = Likelihood2(par_phi12, par1, par_sig1, v);
5668  v[0] = pt + dpt;
5669  lpt1_2 = Likelihood2(par_phi12, par1, par_sig1, v);
5670  double lpt1 = (lpt1_2 - lpt1_1) / dpt; // derivative at point pt1 = pt
5671  v[0] = pt - step;
5672  lpt2_1 = Likelihood2(par_phi12, par1, par_sig1, v);
5673  v[0] = pt - step + dpt;
5674  lpt2_2 = Likelihood2(par_phi12, par1, par_sig1, v);
5675  double lpt2 = (lpt2_2 - lpt2_1) / dpt; // derivative at point pt1 = pt - step
5676  // calculate 2nd derivative at point pt-0.5*step, it should be > 0 if minimum
5677  v[0] = pt - 0.5 * step;
5678  double fx = Likelihood2(par_phi12, par1, par_sig1, v);
5679  v[0] = pt - 0.5 * step + dpt;
5680  double fxh = Likelihood2(par_phi12, par1, par_sig1, v);
5681  v[0] = pt - 0.5 * step + 2 * dpt;
5682  double fx2h = Likelihood2(par_phi12, par1, par_sig1, v);
5683 
5684  double lpt2nd = -(fx2h + fx - 2 * fxh) / dpt / dpt;
5685  //if(lpt1*lpt2 <= 0 && lpt2nd < 0) std::cout << "lpt2nd < 0 dphi12 = " << dphi <<" PT = " << pt<< " eta =" << fabs(eta) << std::endl;
5686  //lpt2nd = 1.; // don't care about 2nd derivative
5687  if (lpt1 * lpt2 <= 0 && lpt2nd > 0) {
5688  PTsolv = pt - 0.5 * step;
5689  break;
5690  } // lpt = 0 between lpt1 and lpt2 => maximum pt_solv is a solution of the likelihood
5691  /*
5692  if(pt == 140.){
5693  v[0] = 200;
5694  lpt2_1 = Likelihood2(par_phi12, par1, par_sig1, v);
5695  v[0] = 200. + 5.;
5696  lpt2_2 = Likelihood2(par_phi12, par1, par_sig1, v);
5697  lpt2 = (lpt2_2-lpt2_1)/5.;
5698 
5699  v[0] = 170.;
5700  fx = Likelihood2(par_phi12, par1, par_sig1, v);
5701  v[0] = 170.+5.;
5702  fxh = Likelihood2(par_phi12, par1, par_sig1, v);
5703  v[0] = 170.+2*5.;
5704  fx2h = Likelihood2(par_phi12, par1, par_sig1, v);
5705  lpt2nd = -(fx2h + fx - 2*fxh)/5./5.;
5706  }
5707  if(pt == 140. && lpt1*lpt2 <= 0 && lpt2nd > 0 && fabs(dphi) < 0.1 ){PTsolv = 137.5; break;}
5708 */
5709  if (pt > 25) {
5710  dpt = 0.1;
5711  step = 5.;
5712  } else if (pt <= 25) {
5713  dpt = 0.01;
5714  step = 0.5;
5715  }
5716  pt = pt - step;
5717  } // end while
5718  //*********** end solve equation for muon plus
5719  //************* solve equation dLog(Likelihood)/dpt = 0 for muon minus ;
5720  // for one station method we know sing of muon: dphi > 0 for muon minus!!! => dphi = -dphi < 0
5721  dphi = -dphi;
5722  pt = 140;
5723  dpt = 0.1;
5724  step = 5.;
5725  while (pt > 2.) {
5726  double par_phi12[1] = {dphi};
5727  double v[1], lpt1_1, lpt1_2, lpt2_1, lpt2_2;
5728  v[0] = pt;
5729  lpt1_1 = Likelihood2(par_phi12, par1, par_sig1, v);
5730  v[0] = pt + dpt;
5731  lpt1_2 = Likelihood2(par_phi12, par1, par_sig1, v);
5732  double lpt1 = (lpt1_2 - lpt1_1) / dpt; // derivative at point pt1 = pt
5733  v[0] = pt - step;
5734  lpt2_1 = Likelihood2(par_phi12, par1, par_sig1, v);
5735  v[0] = pt - step + dpt;
5736  lpt2_2 = Likelihood2(par_phi12, par1, par_sig1, v);
5737  double lpt2 = (lpt2_2 - lpt2_1) / dpt; // derivative at point pt1 = pt - step
5738  // calculate 2nd derivative at point pt-0.5*step, it should be > 0 if minimum
5739  v[0] = pt - 0.5 * step;
5740  double fx = Likelihood2(par_phi12, par1, par_sig1, v);
5741  v[0] = pt - 0.5 * step + dpt;
5742  double fxh = Likelihood2(par_phi12, par1, par_sig1, v);
5743  v[0] = pt - 0.5 * step + 2 * dpt;
5744  double fx2h = Likelihood2(par_phi12, par1, par_sig1, v);
5745 
5746  double lpt2nd = -(fx2h + fx - 2 * fxh) / dpt / dpt;
5747 
5748  if (lpt1 * lpt2 <= 0 && lpt2nd > 0) {
5749  PTsolvMinus = pt - 0.5 * step;
5750  break;
5751  } // lpt = 0 between lpt1 and lpt2 => maximum pt_solv is a solution of the likelihood
5752  /*
5753  if(pt == 140.){
5754  v[0] = 200;
5755  lpt2_1 = Likelihood2(par_phi12, par1, par_sig1, v);
5756  v[0] = 200. + 5.;
5757  lpt2_2 = Likelihood2(par_phi12, par1, par_sig1, v);
5758 
5759  lpt2 = (lpt2_2-lpt2_1)/5.;
5760 
5761  v[0] = 170.;
5762  fx = Likelihood2(par_phi12, par1, par_sig1, v);
5763  v[0] = 170.+5.;
5764  fxh = Likelihood2(par_phi12, par1, par_sig1, v);
5765  v[0] = 170.+2*5.;
5766  fx2h = Likelihood2(par_phi12, par1, par_sig1, v);
5767  lpt2nd = -(fx2h + fx - 2*fxh)/5./5.;
5768  }
5769  if(pt == 140. && lpt1*lpt2 <= 0 && lpt2nd > 0 && fabs(dphi) < 0.1){PTsolvMinus = 137.5; break;}
5770 */
5771  if (pt > 25) {
5772  dpt = 0.1;
5773  step = 5.;
5774  } else if (pt <= 25) {
5775  dpt = 0.01;
5776  step = 0.5;
5777  }
5778  pt = pt - step;
5779  } // end while
5780  // }// if(fabs(dphi) >= 0.002)
5781  // else
5782  // {PTsolv = 137.5;}
5783 
5784  //*********** end solve equation for muon minus
5785  PTsolv = (PTsolv > PTsolvMinus) ? PTsolv
5786  : PTsolvMinus; // select Maximum solution from muon plus and moun minus hypotesis
5787  PTsolv = PTsolv * 1.2;
5788  if (PTsolv > 137.5)
5789  PTsolv = 137.5;
5790  if (fabs(dphi) <= 0.002 && PTsolv < 120.)
5791  PTsolv = 140.;
5792  if (fabs(dphi) <= 0.01 && (type == 11 || type == 12 || type == 14) && PTsolv < 120.)
5793  PTsolv = 140.;
5794  dphi = -dphi; //return to correct sing dphi
5795 
5796  } //if(fabs(eta_TracMy)
5797  } //end "for by iETA"
5798 
5799  float Pt = PTsolv;
5800  if (Pt > 10 && fabs(dphi) >= 0.1)
5801  std::cout << "iF = 0 for dphi = " << dphi << " and Pt = " << Pt << std::endl;
5802 
5803  //if(Pt > 100 && (type == 12 || type == 14) && fabs(eta) <= 1.2 && dphi > 0.015 )std::cout << "dphi = " << dphi << " eta = " << eta << std::endl;
5804  //if(Pt < 10 && (type == 12 || type == 14) && fabs(eta) <= 1.2 && dphi < 0.01)std::cout << "dphi = " << dphi << " eta = " << eta << std::endl;
5805  // return (Pt>0.0) ? Pt : 0.0;
5806 
5807  float Pt_min = trigger_scale->getPtScale()->getLowEdge(1); // 0 GeV
5808  if (method > 10)
5809  Pt_min = trigger_scale->getPtScale()->getLowEdge(3); // 2 GeV
5810 
5811  return (Pt > Pt_min) ? Pt : Pt_min;
5812 }
static const double A_sig14Front[3][15]
double Likelihood2(double *phi12, double *par_m12, double *par_sig12, double *v) const
static const double A_sig13Rare[3][15]
static const double A_sig12Front[3][15]
virtual float getLowEdge(unsigned packed) const =0
get the low edge of bin represented by packed
const L1MuTriggerPtScale * trigger_scale
const L1MuScale * getPtScale() const
get the Pt scale
static const double A_sig34[3][15]
static const double A_sig53[3][15]
static const double A_mu53[4][15]
static const double A_mu24[4][15]
static const double A_sig23[3][15]
static const double A_mu14Front[4][15]
static const double A_mu23[4][15]
static const double A_sig14Rare[3][15]
static const double A_sig12Rare[3][15]
static const double A_sig51[3][15]
static const double A_mu52[4][15]
static const double A_mu13Front[4][15]
static const double A_mu12Rare[4][15]
static const double A_mu13Rare[4][15]
static const double A_mu12Front[4][15]
static const double A_sig24[3][15]
static const double A_mu14Rare[4][15]
static const double A_sig13Front[3][15]
static const double A_mu51[4][15]
step
Definition: StallMonitor.cc:83
static const double A_sig52[3][15]
static const double A_mu34[4][15]
static const float etabins[16]

◆ Pt2Stn2011()

float CSCTFPtMethods::Pt2Stn2011 ( int  type,
float  eta,
float  dphi,
int  fr = -1,
int  method = 11,
int  phiSign = 2 
) const

Definition at line 5813 of file CSCTFPtMethods.cc.

References AB_mu12F, AB_mu12FME11, AB_mu12FnoME11, AB_mu12R, AB_mu12RME11, AB_mu12RnoME11, AB_mu13F, AB_mu13FME11, AB_mu13FnoME11, AB_mu13R, AB_mu13RME11, AB_mu13RnoME11, AB_mu14F, AB_mu14FME11, AB_mu14FnoME11, AB_mu14R, AB_mu14RME11, AB_mu14RnoME11, AB_mu23, AB_mu24, AB_mu34, AB_mu51, AB_mu52, AB_mu53, AB_sig12F, AB_sig12FME11, AB_sig12FnoME11, AB_sig12R, AB_sig12RME11, AB_sig12RnoME11, AB_sig13F, AB_sig13FME11, AB_sig13FnoME11, AB_sig13R, AB_sig13RME11, AB_sig13RnoME11, AB_sig14F, AB_sig14FME11, AB_sig14FnoME11, AB_sig14R, AB_sig14RME11, AB_sig14RnoME11, AB_sig23, AB_sig24, AB_sig34, AB_sig51, AB_sig52, AB_sig53, PVValHelper::eta, etabins, multPhiCorr_741_25nsDY_cfi::fx, Likelihood2_2011(), AlcaSiPixelAliHarvester0T_cff::method, pfMETCorrectionType0_cfi::par1, DiDispStaMuonMonitor_cfi::pt, HLT_2024v12_cff::Pt_min, and findQualityFiles::v.

Referenced by CSCTFPtLUT::calcPt(), and Pt3Stn2011().

5813  {
5814  //if(fabs(eta) >= 2.4) eta = 2.35;
5815  if (fabs(eta) >= 2.2)
5816  eta = 2.15;
5817  double PTsolv = 1.; // for muon plus hypothesis
5818  double PTsolvMinus = 1.; //for muon minus hypothesis
5819  for (int iETA = 0; iETA < 15; iETA++) {
5820  if (fabs(eta) >= etabins[iETA] && fabs(eta) < etabins[iETA + 1]) {
5821  // calculate curvers of mean and sigma
5822  // calculate phi12 mean
5823  double par1[4] = {0., 0., 0., 0.};
5824  //double phi12mean = fitf5(v, par1); //mu12
5825  double par_sig1[4] = {0., 0., 0., 0};
5826  int iETA1 = iETA;
5827  int iETA2 = iETA;
5828 
5829  const double(*Amean12FnoME11)[15] = AB_mu12FnoME11;
5830  const double(*Asig12FnoME11)[15] = AB_sig12FnoME11;
5831  const double(*Amean12RnoME11)[15] = AB_mu12RnoME11;
5832  const double(*Asig12RnoME11)[15] = AB_sig12RnoME11;
5833 
5834  const double(*Amean13FnoME11)[15] = AB_mu13FnoME11;
5835  const double(*Asig13FnoME11)[15] = AB_sig13FnoME11;
5836  const double(*Amean13RnoME11)[15] = AB_mu13RnoME11;
5837  const double(*Asig13RnoME11)[15] = AB_sig13RnoME11;
5838 
5839  const double(*Amean14FnoME11)[15] = AB_mu14FnoME11;
5840  const double(*Asig14FnoME11)[15] = AB_sig14FnoME11;
5841  const double(*Amean14RnoME11)[15] = AB_mu14RnoME11;
5842  const double(*Asig14RnoME11)[15] = AB_sig14RnoME11;
5843  //
5844  const double(*Amean12FME11)[15] = AB_mu12FME11;
5845  const double(*Asig12FME11)[15] = AB_sig12FME11;
5846  const double(*Amean12RME11)[15] = AB_mu12RME11;
5847  const double(*Asig12RME11)[15] = AB_sig12RME11;
5848 
5849  const double(*Amean13FME11)[15] = AB_mu13FME11;
5850  const double(*Asig13FME11)[15] = AB_sig13FME11;
5851  const double(*Amean13RME11)[15] = AB_mu13RME11;
5852  const double(*Asig13RME11)[15] = AB_sig13RME11;
5853 
5854  const double(*Amean14FME11)[15] = AB_mu14FME11;
5855  const double(*Asig14FME11)[15] = AB_sig14FME11;
5856  const double(*Amean14RME11)[15] = AB_mu14RME11;
5857  const double(*Asig14RME11)[15] = AB_sig14RME11;
5858  //
5859  const double(*Amean12F)[15] = AB_mu12F;
5860  const double(*Asig12F)[15] = AB_sig12F;
5861  const double(*Amean12R)[15] = AB_mu12R;
5862  const double(*Asig12R)[15] = AB_sig12R;
5863 
5864  const double(*Amean13F)[15] = AB_mu13F;
5865  const double(*Asig13F)[15] = AB_sig13F;
5866  const double(*Amean13R)[15] = AB_mu13R;
5867  const double(*Asig13R)[15] = AB_sig13R;
5868 
5869  const double(*Amean14F)[15] = AB_mu14F;
5870  const double(*Asig14F)[15] = AB_sig14F;
5871  const double(*Amean14R)[15] = AB_mu14R;
5872  const double(*Asig14R)[15] = AB_sig14R;
5873 
5874  const double(*Amean23)[15] = AB_mu23;
5875  const double(*Asig23)[15] = AB_sig23;
5876  const double(*Amean24)[15] = AB_mu24;
5877  const double(*Asig24)[15] = AB_sig24;
5878  const double(*Amean34)[15] = AB_mu34;
5879  const double(*Asig34)[15] = AB_sig34;
5880 
5881  const double(*Amean51)[15] = AB_mu51;
5882  const double(*Asig51)[15] = AB_sig51;
5883  const double(*Amean52)[15] = AB_mu52;
5884  const double(*Asig52)[15] = AB_sig52;
5885  const double(*Amean53)[15] = AB_mu53;
5886  const double(*Asig53)[15] = AB_sig53;
5887 
5888  switch (type) // type = mode here
5889  {
5890  case 6: //1-2
5891  if (fr == 1) {
5892  if (iETA1 < 3)
5893  iETA1 = 3;
5894  //if(iETA1 > 11)iETA1 = 11;
5895  par1[0] = (*(Amean12F + 0))[iETA1];
5896  par1[1] = (*(Amean12F + 1))[iETA1];
5897  par1[2] = (*(Amean12F + 2))[iETA1];
5898  par1[3] = (*(Amean12F + 3))[iETA1];
5899  par_sig1[0] = (*(Asig12F + 0))[iETA1];
5900  par_sig1[1] = (*(Asig12F + 1))[iETA1];
5901  par_sig1[2] = (*(Asig12F + 2))[iETA1];
5902  par_sig1[3] = (*(Asig12F + 3))[iETA1];
5903  }
5904  if (fr == 0) {
5905  if (iETA1 < 1)
5906  iETA1 = 1;
5907  //if(iETA1 > 11)iETA1 = 11;
5908  par1[0] = (*(Amean12R + 0))[iETA1];
5909  par1[1] = (*(Amean12R + 1))[iETA1];
5910  par1[2] = (*(Amean12R + 2))[iETA1];
5911  par1[3] = (*(Amean12R + 3))[iETA1];
5912  par_sig1[0] = (*(Asig12R + 0))[iETA1];
5913  par_sig1[1] = (*(Asig12R + 1))[iETA1];
5914  par_sig1[2] = (*(Asig12R + 2))[iETA1];
5915  par_sig1[3] = (*(Asig12R + 3))[iETA1];
5916  }
5917  if (phiSign == 0) { // track belong to ME11 station
5918  if (fr == 1) {
5919  if (iETA2 < 7)
5920  iETA2 = 7;
5921  par1[0] = (*(Amean12FME11 + 0))[iETA2];
5922  par1[1] = (*(Amean12FME11 + 1))[iETA2];
5923  par1[2] = (*(Amean12FME11 + 2))[iETA2];
5924  par1[3] = (*(Amean12FME11 + 3))[iETA2];
5925  par_sig1[0] = (*(Asig12FME11 + 0))[iETA2];
5926  par_sig1[1] = (*(Asig12FME11 + 1))[iETA2];
5927  par_sig1[2] = (*(Asig12FME11 + 2))[iETA2];
5928  par_sig1[3] = (*(Asig12FME11 + 3))[iETA2];
5929  }
5930  if (fr == 0) {
5931  if (iETA2 < 7)
5932  iETA2 = 7;
5933  par1[0] = (*(Amean12RME11 + 0))[iETA2];
5934  par1[1] = (*(Amean12RME11 + 1))[iETA2];
5935  par1[2] = (*(Amean12RME11 + 2))[iETA2];
5936  par1[3] = (*(Amean12RME11 + 3))[iETA2];
5937  par_sig1[0] = (*(Asig12RME11 + 0))[iETA2];
5938  par_sig1[1] = (*(Asig12RME11 + 1))[iETA2];
5939  par_sig1[2] = (*(Asig12RME11 + 2))[iETA2];
5940  par_sig1[3] = (*(Asig12RME11 + 3))[iETA2];
5941  }
5942  }
5943  if (phiSign == 1) { // track belong to ME1/2 or ME1/3 station
5944  if (fr == 1) {
5945  if (iETA2 < 3)
5946  iETA2 = 3;
5947  if (iETA2 > 7)
5948  iETA2 = 7;
5949  par1[0] = (*(Amean12FnoME11 + 0))[iETA2];
5950  par1[1] = (*(Amean12FnoME11 + 1))[iETA2];
5951  par1[2] = (*(Amean12FnoME11 + 2))[iETA2];
5952  par1[3] = (*(Amean12FnoME11 + 3))[iETA2];
5953  par_sig1[0] = (*(Asig12FnoME11 + 0))[iETA2];
5954  par_sig1[1] = (*(Asig12FnoME11 + 1))[iETA2];
5955  par_sig1[2] = (*(Asig12FnoME11 + 2))[iETA2];
5956  par_sig1[3] = (*(Asig12FnoME11 + 3))[iETA2];
5957  }
5958  if (fr == 0) {
5959  if (iETA2 < 1)
5960  iETA2 = 1;
5961  if (iETA2 > 6)
5962  iETA2 = 6; // rare ME1/2 only till 1.6
5963  par1[0] = (*(Amean12RnoME11 + 0))[iETA2];
5964  par1[1] = (*(Amean12RnoME11 + 1))[iETA2];
5965  par1[2] = (*(Amean12RnoME11 + 2))[iETA2];
5966  par1[3] = (*(Amean12RnoME11 + 3))[iETA2];
5967  par_sig1[0] = (*(Asig12RnoME11 + 0))[iETA2];
5968  par_sig1[1] = (*(Asig12RnoME11 + 1))[iETA2];
5969  par_sig1[2] = (*(Asig12RnoME11 + 2))[iETA2];
5970  par_sig1[3] = (*(Asig12RnoME11 + 3))[iETA2];
5971  }
5972  }
5973 
5974  break;
5975  case 7: //1-3
5976  if (fr == 1) {
5977  if (iETA1 < 3)
5978  iETA1 = 3;
5979  //if(iETA1 > 11)iETA1 = 11;
5980  par1[0] = (*(Amean13F + 0))[iETA1];
5981  par1[1] = (*(Amean13F + 1))[iETA1];
5982  par1[2] = (*(Amean13F + 2))[iETA1];
5983  par1[3] = (*(Amean13F + 3))[iETA1];
5984  par_sig1[0] = (*(Asig13F + 0))[iETA1];
5985  par_sig1[1] = (*(Asig13F + 1))[iETA1];
5986  par_sig1[2] = (*(Asig13F + 2))[iETA1];
5987  par_sig1[3] = (*(Asig13F + 3))[iETA1];
5988  }
5989  if (fr == 0) {
5990  if (iETA1 < 3)
5991  iETA1 = 3;
5992  //if(iETA1 > 11)iETA1 = 11;
5993  par1[0] = (*(Amean13R + 0))[iETA1];
5994  par1[1] = (*(Amean13R + 1))[iETA1];
5995  par1[2] = (*(Amean13R + 2))[iETA1];
5996  par1[3] = (*(Amean13R + 3))[iETA1];
5997  par_sig1[0] = (*(Asig13R + 0))[iETA1];
5998  par_sig1[1] = (*(Asig13R + 1))[iETA1];
5999  par_sig1[2] = (*(Asig13R + 2))[iETA1];
6000  par_sig1[3] = (*(Asig13R + 3))[iETA1];
6001  }
6002  if (phiSign == 0) { // track belong to ME11 station
6003  if (fr == 1) {
6004  if (iETA2 < 7)
6005  iETA2 = 7;
6006  par1[0] = (*(Amean13FME11 + 0))[iETA2];
6007  par1[1] = (*(Amean13FME11 + 1))[iETA2];
6008  par1[2] = (*(Amean13FME11 + 2))[iETA2];
6009  par1[3] = (*(Amean13FME11 + 3))[iETA2];
6010  par_sig1[0] = (*(Asig13FME11 + 0))[iETA2];
6011  par_sig1[1] = (*(Asig13FME11 + 1))[iETA2];
6012  par_sig1[2] = (*(Asig13FME11 + 2))[iETA2];
6013  par_sig1[3] = (*(Asig13FME11 + 3))[iETA2];
6014  }
6015  if (fr == 0) {
6016  if (iETA2 < 7)
6017  iETA2 = 7;
6018  par1[0] = (*(Amean13RME11 + 0))[iETA2];
6019  par1[1] = (*(Amean13RME11 + 1))[iETA2];
6020  par1[2] = (*(Amean13RME11 + 2))[iETA2];
6021  par1[3] = (*(Amean13RME11 + 3))[iETA2];
6022  par_sig1[0] = (*(Asig13RME11 + 0))[iETA2];
6023  par_sig1[1] = (*(Asig13RME11 + 1))[iETA2];
6024  par_sig1[2] = (*(Asig13RME11 + 2))[iETA2];
6025  par_sig1[3] = (*(Asig13RME11 + 3))[iETA2];
6026  }
6027  }
6028  if (phiSign == 1) { // track belong to ME1/2 or ME1/3 station
6029  if (fr == 1) {
6030  if (iETA2 < 3)
6031  iETA2 = 3;
6032  if (iETA2 > 7)
6033  iETA2 = 7;
6034  par1[0] = (*(Amean13FnoME11 + 0))[iETA2];
6035  par1[1] = (*(Amean13FnoME11 + 1))[iETA2];
6036  par1[2] = (*(Amean13FnoME11 + 2))[iETA2];
6037  par1[3] = (*(Amean13FnoME11 + 3))[iETA2];
6038  par_sig1[0] = (*(Asig13FnoME11 + 0))[iETA2];
6039  par_sig1[1] = (*(Asig13FnoME11 + 1))[iETA2];
6040  par_sig1[2] = (*(Asig13FnoME11 + 2))[iETA2];
6041  par_sig1[3] = (*(Asig13FnoME11 + 3))[iETA2];
6042  }
6043  if (fr == 0) {
6044  if (iETA2 < 3)
6045  iETA2 = 3;
6046  if (iETA2 > 6)
6047  iETA2 = 6; // rare ME1/2 only till 1.6
6048  par1[0] = (*(Amean13RnoME11 + 0))[iETA2];
6049  par1[1] = (*(Amean13RnoME11 + 1))[iETA2];
6050  par1[2] = (*(Amean13RnoME11 + 2))[iETA2];
6051  par1[3] = (*(Amean13RnoME11 + 3))[iETA2];
6052  par_sig1[0] = (*(Asig13RnoME11 + 0))[iETA2];
6053  par_sig1[1] = (*(Asig13RnoME11 + 1))[iETA2];
6054  par_sig1[2] = (*(Asig13RnoME11 + 2))[iETA2];
6055  par_sig1[3] = (*(Asig13RnoME11 + 3))[iETA2];
6056  }
6057  }
6058  break;
6059  case 8: //2-3
6060  if (iETA1 < 2)
6061  iETA1 = 2;
6062  par1[0] = (*(Amean23 + 0))[iETA1];
6063  par1[1] = (*(Amean23 + 1))[iETA1];
6064  par1[2] = (*(Amean23 + 2))[iETA1];
6065  par1[3] = (*(Amean23 + 3))[iETA1];
6066  par_sig1[0] = (*(Asig23 + 0))[iETA1];
6067  par_sig1[1] = (*(Asig23 + 1))[iETA1];
6068  par_sig1[2] = (*(Asig23 + 2))[iETA1];
6069  par_sig1[3] = (*(Asig23 + 3))[iETA1];
6070 
6071  break;
6072  case 9: //2-4
6073  if (iETA1 < 3)
6074  iETA1 = 3;
6075  par1[0] = (*(Amean24 + 0))[iETA1];
6076  par1[1] = (*(Amean24 + 1))[iETA1];
6077  par1[2] = (*(Amean24 + 2))[iETA1];
6078  par1[3] = (*(Amean24 + 3))[iETA1];
6079  par_sig1[0] = (*(Asig24 + 0))[iETA1];
6080  par_sig1[1] = (*(Asig24 + 1))[iETA1];
6081  par_sig1[2] = (*(Asig24 + 2))[iETA1];
6082  par_sig1[3] = (*(Asig24 + 3))[iETA1];
6083  break;
6084  case 10: //3-4
6085  if (iETA1 < 3)
6086  iETA1 = 3;
6087  par1[0] = (*(Amean34 + 0))[iETA1];
6088  par1[1] = (*(Amean34 + 1))[iETA1];
6089  par1[2] = (*(Amean34 + 2))[iETA1];
6090  par1[3] = (*(Amean34 + 3))[iETA1];
6091  par_sig1[0] = (*(Asig34 + 0))[iETA1];
6092  par_sig1[1] = (*(Asig34 + 1))[iETA1];
6093  par_sig1[2] = (*(Asig34 + 2))[iETA1];
6094  par_sig1[3] = (*(Asig34 + 3))[iETA1];
6095  break;
6096  case 13: //1-4
6097  if (fr == 1) {
6098  if (iETA1 < 3)
6099  iETA1 = 3;
6100  //if(iETA1 > 11)iETA1 = 11;
6101  par1[0] = (*(Amean14F + 0))[iETA1];
6102  par1[1] = (*(Amean14F + 1))[iETA1];
6103  par1[2] = (*(Amean14F + 2))[iETA1];
6104  par1[3] = (*(Amean14F + 3))[iETA1];
6105  par_sig1[0] = (*(Asig14F + 0))[iETA1];
6106  par_sig1[1] = (*(Asig14F + 1))[iETA1];
6107  par_sig1[2] = (*(Asig14F + 2))[iETA1];
6108  par_sig1[3] = (*(Asig14F + 3))[iETA1];
6109  }
6110  if (fr == 0) {
6111  if (iETA1 < 2)
6112  iETA1 = 2;
6113  //if(iETA1 > 11)iETA1 = 11;
6114  par1[0] = (*(Amean14R + 0))[iETA1];
6115  par1[1] = (*(Amean14R + 1))[iETA1];
6116  par1[2] = (*(Amean14R + 2))[iETA1];
6117  par1[3] = (*(Amean14R + 3))[iETA1];
6118  par_sig1[0] = (*(Asig14R + 0))[iETA1];
6119  par_sig1[1] = (*(Asig14R + 1))[iETA1];
6120  par_sig1[2] = (*(Asig14R + 2))[iETA1];
6121  par_sig1[3] = (*(Asig14R + 3))[iETA1];
6122  }
6123  if (phiSign == 0) { // track belong to ME11 station
6124  if (fr == 1) {
6125  if (iETA2 < 9)
6126  iETA2 = 9;
6127  par1[0] = (*(Amean14FME11 + 0))[iETA2];
6128  par1[1] = (*(Amean14FME11 + 1))[iETA2];
6129  par1[2] = (*(Amean14FME11 + 2))[iETA2];
6130  par1[3] = (*(Amean14FME11 + 3))[iETA2];
6131  par_sig1[0] = (*(Asig14FME11 + 0))[iETA2];
6132  par_sig1[1] = (*(Asig14FME11 + 1))[iETA2];
6133  par_sig1[2] = (*(Asig14FME11 + 2))[iETA2];
6134  par_sig1[3] = (*(Asig14FME11 + 3))[iETA2];
6135  }
6136  if (fr == 0) {
6137  if (iETA2 < 9)
6138  iETA2 = 9;
6139  par1[0] = (*(Amean14RME11 + 0))[iETA2];
6140  par1[1] = (*(Amean14RME11 + 1))[iETA2];
6141  par1[2] = (*(Amean14RME11 + 2))[iETA2];
6142  par1[3] = (*(Amean14RME11 + 3))[iETA2];
6143  par_sig1[0] = (*(Asig14RME11 + 0))[iETA2];
6144  par_sig1[1] = (*(Asig14RME11 + 1))[iETA2];
6145  par_sig1[2] = (*(Asig14RME11 + 2))[iETA2];
6146  par_sig1[3] = (*(Asig14RME11 + 3))[iETA2];
6147  }
6148  }
6149  if (phiSign == 1) { // track belong to ME1/2 or ME1/3 station
6150  if (fr == 1) {
6151  if (iETA2 < 4)
6152  iETA2 = 4;
6153  if (iETA2 > 7)
6154  iETA2 = 7;
6155  par1[0] = (*(Amean14FnoME11 + 0))[iETA2];
6156  par1[1] = (*(Amean14FnoME11 + 1))[iETA2];
6157  par1[2] = (*(Amean14FnoME11 + 2))[iETA2];
6158  par1[3] = (*(Amean14FnoME11 + 3))[iETA2];
6159  par_sig1[0] = (*(Asig14FnoME11 + 0))[iETA2];
6160  par_sig1[1] = (*(Asig14FnoME11 + 1))[iETA2];
6161  par_sig1[2] = (*(Asig14FnoME11 + 2))[iETA2];
6162  par_sig1[3] = (*(Asig14FnoME11 + 3))[iETA2];
6163  }
6164  if (fr == 0) {
6165  if (iETA2 < 4)
6166  iETA2 = 4;
6167  if (iETA2 > 6)
6168  iETA2 = 6; // rare ME1/2 only till 1.6
6169  par1[0] = (*(Amean14RnoME11 + 0))[iETA2];
6170  par1[1] = (*(Amean14RnoME11 + 1))[iETA2];
6171  par1[2] = (*(Amean14RnoME11 + 2))[iETA2];
6172  par1[3] = (*(Amean14RnoME11 + 3))[iETA2];
6173  par_sig1[0] = (*(Asig14RnoME11 + 0))[iETA2];
6174  par_sig1[1] = (*(Asig14RnoME11 + 1))[iETA2];
6175  par_sig1[2] = (*(Asig14RnoME11 + 2))[iETA2];
6176  par_sig1[3] = (*(Asig14RnoME11 + 3))[iETA2];
6177  }
6178  }
6179 
6180  break;
6181  case 11: // b1-3 for pt_method > 10 & fr = 0, singles for pt_method < 10
6182  if (iETA1 != 2)
6183  iETA1 = 2;
6184  par1[0] = (*(Amean53 + 0))[iETA1];
6185  par1[1] = (*(Amean53 + 1))[iETA1];
6186  par1[2] = (*(Amean53 + 2))[iETA1];
6187  par1[3] = (*(Amean53 + 3))[iETA1];
6188  par_sig1[0] = (*(Asig53 + 0))[iETA1];
6189  par_sig1[1] = (*(Asig53 + 1))[iETA1];
6190  par_sig1[2] = (*(Asig53 + 2))[iETA1];
6191  par_sig1[3] = (*(Asig53 + 3))[iETA1];
6192  break;
6193 
6194  case 12: //1-2-b1 = 2-b1 for pt_method < 10, for pt_method > 10 & fr = 0: b1-2
6195  if (iETA1 < 1)
6196  iETA1 = 1;
6197  if (iETA1 > 2)
6198  iETA1 = 2;
6199 
6200  par1[0] = (*(Amean52 + 0))[iETA1];
6201  par1[1] = (*(Amean52 + 1))[iETA1];
6202  par1[2] = (*(Amean52 + 2))[iETA1];
6203  par1[3] = (*(Amean52 + 3))[iETA1];
6204  par_sig1[0] = (*(Asig52 + 0))[iETA1];
6205  par_sig1[1] = (*(Asig52 + 1))[iETA1];
6206  par_sig1[2] = (*(Asig52 + 2))[iETA1];
6207  par_sig1[3] = (*(Asig52 + 3))[iETA1];
6208 
6209  break;
6210  case 14: //2-b1 for pt_method < 10 and b1-1 for pt_method > 10 & fr = 0
6211  if (method < 10) {
6212  if (iETA1 < 1)
6213  iETA1 = 1;
6214  if (iETA1 > 2)
6215  iETA1 = 2;
6216  }
6217  par1[0] = (*(Amean52 + 0))[iETA1];
6218  par1[1] = (*(Amean52 + 1))[iETA1];
6219  par1[2] = (*(Amean52 + 2))[iETA1];
6220  par1[3] = (*(Amean52 + 3))[iETA1];
6221  par_sig1[0] = (*(Asig52 + 0))[iETA1];
6222  par_sig1[1] = (*(Asig52 + 1))[iETA1];
6223  par_sig1[2] = (*(Asig52 + 2))[iETA1];
6224  par_sig1[3] = (*(Asig52 + 3))[iETA1];
6225 
6226  if (method > 10) {
6227  if (iETA1 > 2)
6228  iETA1 = 2;
6229  par1[0] = (*(Amean51 + 0))[iETA1];
6230  par1[1] = (*(Amean51 + 1))[iETA1];
6231  par1[2] = (*(Amean51 + 2))[iETA1];
6232  par1[3] = (*(Amean51 + 3))[iETA1];
6233  par_sig1[0] = (*(Asig51 + 0))[iETA1];
6234  par_sig1[1] = (*(Asig51 + 1))[iETA1];
6235  par_sig1[2] = (*(Asig51 + 2))[iETA1];
6236  par_sig1[3] = (*(Asig51 + 3))[iETA1];
6237  }
6238  break;
6239  //default:
6240  //return 0.0;
6241  }
6242 
6243  //************* solve equation dLog(Likelihood)/dpt = 0 for muon + ;
6244  //if(fabs(dphi) >= 0.002)
6245  //if(fabs(dphi) >= 0.00)
6246  //if(fabs(dphi) >= 0.002 || (fabs(dphi) >= 0.01 && (type == 12 || type == 14)))
6247  //{
6248  double pt = 140;
6249  double dpt = 0.1;
6250  double step = 5.;
6251  while (pt > 2.) {
6252  double par_phi12[1] = {dphi};
6253  double v[1], lpt1_1, lpt1_2, lpt2_1, lpt2_2;
6254  v[0] = pt;
6255  lpt1_1 = Likelihood2_2011(par_phi12, par1, par_sig1, v);
6256  v[0] = pt + dpt;
6257  lpt1_2 = Likelihood2_2011(par_phi12, par1, par_sig1, v);
6258  double lpt1 = (lpt1_2 - lpt1_1) / dpt; // derivative at point pt1 = pt
6259  v[0] = pt - step;
6260  lpt2_1 = Likelihood2_2011(par_phi12, par1, par_sig1, v);
6261  v[0] = pt - step + dpt;
6262  lpt2_2 = Likelihood2_2011(par_phi12, par1, par_sig1, v);
6263  double lpt2 = (lpt2_2 - lpt2_1) / dpt; // derivative at point pt1 = pt - step
6264  // calculate 2nd derivative at point pt-0.5*step, it should be > 0 if minimum
6265  v[0] = pt - 0.5 * step;
6266  double fx = Likelihood2_2011(par_phi12, par1, par_sig1, v);
6267  v[0] = pt - 0.5 * step + dpt;
6268  double fxh = Likelihood2_2011(par_phi12, par1, par_sig1, v);
6269  v[0] = pt - 0.5 * step + 2 * dpt;
6270  double fx2h = Likelihood2_2011(par_phi12, par1, par_sig1, v);
6271 
6272  double lpt2nd = -(fx2h + fx - 2 * fxh) / dpt / dpt;
6273  //if(lpt1*lpt2 <= 0 && lpt2nd < 0) std::cout << "lpt2nd < 0 dphi12 = " << dphi <<" PT = " << pt<< " eta =" << fabs(eta) << std::endl;
6274  //lpt2nd = 1.; // don't care about 2nd derivative
6275  if (lpt1 * lpt2 <= 0 && lpt2nd > 0) {
6276  PTsolv = pt - 0.5 * step;
6277  break;
6278  } // lpt = 0 between lpt1 and lpt2 => maximum pt_solv is a solution of the likelihood
6279  /*
6280  if(pt == 140.){
6281  v[0] = 200;
6282  lpt2_1 = Likelihood2_2011(par_phi12, par1, par_sig1, v);
6283  v[0] = 200. + 5.;
6284  lpt2_2 = Likelihood2_2011(par_phi12, par1, par_sig1, v);
6285  lpt2 = (lpt2_2-lpt2_1)/5.;
6286 
6287  v[0] = 170.;
6288  fx = Likelihood2_2011(par_phi12, par1, par_sig1, v);
6289  v[0] = 170.+5.;
6290  fxh = Likelihood2_2011(par_phi12, par1, par_sig1, v);
6291  v[0] = 170.+2*5.;
6292  fx2h = Likelihood2_2011(par_phi12, par1, par_sig1, v);
6293  lpt2nd = -(fx2h + fx - 2*fxh)/5./5.;
6294  }
6295  if(pt == 140. && lpt1*lpt2 <= 0 && lpt2nd > 0 && fabs(dphi) < 0.1 ){PTsolv = 137.5; break;}
6296 */
6297  if (pt > 25) {
6298  dpt = 0.1;
6299  step = 5.;
6300  } else if (pt <= 25) {
6301  dpt = 0.01;
6302  step = 0.5;
6303  }
6304  pt = pt - step;
6305  } // end while
6306  //*********** end solve equation for muon plus
6307  //************* solve equation dLog(Likelihood)/dpt = 0 for muon minus ;
6308  // for one station method we know sing of muon: dphi > 0 for muon minus!!! => dphi = -dphi < 0
6309  dphi = -dphi;
6310  pt = 140;
6311  dpt = 0.1;
6312  step = 5.;
6313  while (pt > 2.) {
6314  double par_phi12[1] = {dphi};
6315  double v[1], lpt1_1, lpt1_2, lpt2_1, lpt2_2;
6316  v[0] = pt;
6317  lpt1_1 = Likelihood2_2011(par_phi12, par1, par_sig1, v);
6318  v[0] = pt + dpt;
6319  lpt1_2 = Likelihood2_2011(par_phi12, par1, par_sig1, v);
6320  double lpt1 = (lpt1_2 - lpt1_1) / dpt; // derivative at point pt1 = pt
6321  v[0] = pt - step;
6322  lpt2_1 = Likelihood2_2011(par_phi12, par1, par_sig1, v);
6323  v[0] = pt - step + dpt;
6324  lpt2_2 = Likelihood2_2011(par_phi12, par1, par_sig1, v);
6325  double lpt2 = (lpt2_2 - lpt2_1) / dpt; // derivative at point pt1 = pt - step
6326  // calculate 2nd derivative at point pt-0.5*step, it should be > 0 if minimum
6327  v[0] = pt - 0.5 * step;
6328  double fx = Likelihood2_2011(par_phi12, par1, par_sig1, v);
6329  v[0] = pt - 0.5 * step + dpt;
6330  double fxh = Likelihood2_2011(par_phi12, par1, par_sig1, v);
6331  v[0] = pt - 0.5 * step + 2 * dpt;
6332  double fx2h = Likelihood2_2011(par_phi12, par1, par_sig1, v);
6333 
6334  double lpt2nd = -(fx2h + fx - 2 * fxh) / dpt / dpt;
6335 
6336  if (lpt1 * lpt2 <= 0 && lpt2nd > 0) {
6337  PTsolvMinus = pt - 0.5 * step;
6338  break;
6339  } // lpt = 0 between lpt1 and lpt2 => maximum pt_solv is a solution of the likelihood
6340  /*
6341  if(pt == 140.){
6342  v[0] = 200;
6343  lpt2_1 = Likelihood2_2011(par_phi12, par1, par_sig1, v);
6344  v[0] = 200. + 5.;
6345  lpt2_2 = Likelihood2_2011(par_phi12, par1, par_sig1, v);
6346 
6347  lpt2 = (lpt2_2-lpt2_1)/5.;
6348 
6349  v[0] = 170.;
6350  fx = Likelihood2_2011(par_phi12, par1, par_sig1, v);
6351  v[0] = 170.+5.;
6352  fxh = Likelihood2_2011(par_phi12, par1, par_sig1, v);
6353  v[0] = 170.+2*5.;
6354  fx2h = Likelihood2_2011(par_phi12, par1, par_sig1, v);
6355  lpt2nd = -(fx2h + fx - 2*fxh)/5./5.;
6356  }
6357  if(pt == 140. && lpt1*lpt2 <= 0 && lpt2nd > 0 && fabs(dphi) < 0.1){PTsolvMinus = 137.5; break;}
6358 */
6359  if (pt > 25) {
6360  dpt = 0.1;
6361  step = 5.;
6362  } else if (pt <= 25) {
6363  dpt = 0.01;
6364  step = 0.5;
6365  }
6366  pt = pt - step;
6367  } // end while
6368  // }// if(fabs(dphi) >= 0.002)
6369  // else
6370  // {PTsolv = 137.5;}
6371 
6372  //*********** end solve equation for muon minus
6373  PTsolv = (PTsolv > PTsolvMinus) ? PTsolv
6374  : PTsolvMinus; // select Maximum solution from muon plus and moun minus hypotesis
6375  PTsolv = PTsolv * 1.2;
6376  if (PTsolv > 137.5)
6377  PTsolv = 137.5;
6378  if (fabs(dphi) <= 0.002 && PTsolv < 120.)
6379  PTsolv = 140.;
6380  //if( fabs(dphi) <= 0.01 && (type == 11 || type == 12 || type == 14) && PTsolv < 120.)PTsolv = 140.;
6381  dphi = -dphi; //return to correct sing dphi
6382 
6383  } //if(fabs(eta_TracMy)
6384  } //end "for by iETA"
6385 
6386  float Pt = PTsolv;
6387 
6388  //float Pt_min = trigger_scale->getPtScale()->getLowEdge(1);// 0 GeV
6389  //if(method > 10) Pt_min = trigger_scale->getPtScale()->getLowEdge(3);// 2 GeV
6390  float Pt_min = 2; // 0 GeV
6391 
6392  return (Pt > Pt_min) ? Pt : Pt_min;
6393 }
static const double AB_sig14FnoME11[4][15]
static const double AB_sig24[4][15]
static const double AB_mu14R[4][15]
static const double AB_sig14RnoME11[4][15]
static const double AB_sig52[4][15]
static const double AB_mu12R[4][15]
static const double AB_mu13RME11[4][15]
static const double AB_sig13F[4][15]
static const double AB_mu24[4][15]
static const double AB_mu13RnoME11[4][15]
static const double AB_mu52[4][15]
static const double AB_mu14RME11[4][15]
static const double AB_sig12FnoME11[4][15]
static const double AB_mu13FnoME11[4][15]
static const double AB_mu14F[4][15]
static const double AB_sig13FME11[4][15]
static const double AB_mu51[4][15]
static const double AB_sig12FME11[4][15]
static const double AB_mu23[4][15]
static const double AB_sig12R[4][15]
static const double AB_sig51[4][15]
static const double AB_mu14FME11[4][15]
static const double AB_sig53[4][15]
static const double AB_mu14RnoME11[4][15]
static const double AB_sig14R[4][15]
static const double AB_mu12RnoME11[4][15]
static const double AB_mu12FnoME11[4][15]
static const double AB_mu13R[4][15]
static const double AB_sig34[4][15]
static const double AB_mu12RME11[4][15]
static const double AB_mu12FME11[4][15]
double Likelihood2_2011(double *phi12, double *par_m12, double *par_sig12, double *v) const
static const double AB_sig14F[4][15]
static const double AB_sig14FME11[4][15]
static const double AB_mu13F[4][15]
static const double AB_sig13R[4][15]
static const double AB_mu53[4][15]
static const double AB_sig13RME11[4][15]
static const double AB_mu14FnoME11[4][15]
static const double AB_sig13FnoME11[4][15]
static const double AB_sig23[4][15]
static const double AB_sig12RnoME11[4][15]
static const double AB_mu34[4][15]
step
Definition: StallMonitor.cc:83
static const double AB_sig13RnoME11[4][15]
static const double AB_sig12F[4][15]
static const double AB_mu12F[4][15]
static const double AB_sig14RME11[4][15]
static const double AB_mu13FME11[4][15]
static const float etabins[16]
static const double AB_sig12RME11[4][15]

◆ Pt2Stn2012()

float CSCTFPtMethods::Pt2Stn2012 ( int  type,
float  eta,
float  dphi,
int  PtbyMLH,
float &  theLH,
int  fr = -1,
int  method = 11 
) const

Definition at line 7361 of file CSCTFPtMethods.cc.

References A_mu12Front, A_mu12Rare, A_mu13Front, A_mu13Rare, A_mu14Front, A_mu14Rare, A_mu23, A_mu24, A_mu34, A_mu51, A_mu52, A_mu53, A_sig12Front, A_sig12Rare, A_sig13Front, A_sig13Rare, A_sig14Front, A_sig14Rare, A_sig23, A_sig24, A_sig34, A_sig51, A_sig52, A_sig53, gather_cfg::cout, PVValHelper::eta, etabins, L1MuScale::getLowEdge(), L1MuTriggerPtScale::getPtScale(), Likelihood2(), AlcaSiPixelAliHarvester0T_cff::method, pfMETCorrectionType0_cfi::par1, DiDispStaMuonMonitor_cfi::pt, HLT_2024v12_cff::Pt_min, trigger_scale, and findQualityFiles::v.

Referenced by CSCTFPtLUT::calcPt(), and Pt3Stn2012().

7361  {
7362  int useBestMLH = PtbyMLH;
7363  int useBOXcut = false;
7364  int useDTBOXcut = true;
7365  if (type == 5)
7366  useBOXcut = true; // useBOXcut for mode 5 which come from 3 station
7367  if (type == 5)
7368  type = 8; // 2-3-4 -> 2-3//
7369 
7370  if (fabs(eta) >= 2.4)
7371  eta = 2.35;
7372  double PTsolv = 1.; // for muon plus hypothesis
7373  double PTsolvMinus = 1.; //for muon minus hypothesis
7374  for (int iETA = 0; iETA < 15; iETA++) {
7375  if (fabs(eta) >= etabins[iETA] && fabs(eta) < etabins[iETA + 1]) {
7376  // calculate curvers of mean and sigma
7377  // calculate phi12 mean
7378  double par1[4] = {0., 0., 0., 0.};
7379  //double phi12mean = fitf5(v, par1); //mu12
7380  double par_sig1[3] = {0., 0., 0.};
7381  int iETA1 = iETA;
7382  switch (type) // type = mode here
7383  {
7384  case 6: //1-2
7385  if (fr == 1) {
7386  if (iETA1 < 3)
7387  iETA1 = 3;
7388  //if(iETA1 > 11)iETA1 = 11;
7389  //if(fabs(eta)>1.56 && fabs(eta) < 1.6) iETA1 = iETA +1;
7390  par1[0] = A_mu12Front[0][iETA1];
7391  par1[1] = A_mu12Front[1][iETA1];
7392  par1[2] = A_mu12Front[2][iETA1];
7393  par1[3] = A_mu12Front[3][iETA1];
7394  par_sig1[0] = A_sig12Front[0][iETA1];
7395  par_sig1[1] = A_sig12Front[1][iETA1];
7396  par_sig1[2] = A_sig12Front[2][iETA1];
7397  }
7398  if (fr == 0) {
7399  if (iETA1 < 1)
7400  iETA1 = 1;
7401  //if(iETA1 > 11)iETA1 = 11;
7402  //if(fabs(eta)>1.56 && fabs(eta) < 1.6) iETA1 = iETA +1;
7403  par1[0] = A_mu12Rare[0][iETA1];
7404  par1[1] = A_mu12Rare[1][iETA1];
7405  par1[2] = A_mu12Rare[2][iETA1];
7406  par1[3] = A_mu12Rare[3][iETA1];
7407  par_sig1[0] = A_sig12Rare[0][iETA1];
7408  par_sig1[1] = A_sig12Rare[1][iETA1];
7409  par_sig1[2] = A_sig12Rare[2][iETA1];
7410  }
7411  break;
7412  case 7: //1-3
7413  if (fr == 1) {
7414  if (iETA1 < 3)
7415  iETA1 = 3;
7416  //if(iETA1 > 11)iETA1 = 11;
7417  //if(fabs(eta)>1.56 && fabs(eta) < 1.6) iETA1 = iETA +1;
7418  par1[0] = A_mu13Front[0][iETA1];
7419  par1[1] = A_mu13Front[1][iETA1];
7420  par1[2] = A_mu13Front[2][iETA1];
7421  par1[3] = A_mu13Front[3][iETA1];
7422  par_sig1[0] = A_sig13Front[0][iETA1];
7423  par_sig1[1] = A_sig13Front[1][iETA1];
7424  par_sig1[2] = A_sig13Front[2][iETA1];
7425  }
7426  if (fr == 0) {
7427  if (iETA1 < 2)
7428  iETA1 = 2;
7429  //if(iETA1 > 11)iETA1 = 11;
7430  //if(fabs(eta)>1.56 && fabs(eta) < 1.6) iETA1 = iETA +1;
7431  par1[0] = A_mu13Rare[0][iETA1];
7432  par1[1] = A_mu13Rare[1][iETA1];
7433  par1[2] = A_mu13Rare[2][iETA1];
7434  par1[3] = A_mu13Rare[3][iETA1];
7435  par_sig1[0] = A_sig13Rare[0][iETA1];
7436  par_sig1[1] = A_sig13Rare[1][iETA1];
7437  par_sig1[2] = A_sig13Rare[2][iETA1];
7438  }
7439  break;
7440  case 8: //2-3
7441  if (iETA1 < 2)
7442  iETA1 = 2;
7443  par1[0] = A_mu23[0][iETA1];
7444  par1[1] = A_mu23[1][iETA1];
7445  par1[2] = A_mu23[2][iETA1];
7446  par1[3] = A_mu23[3][iETA1];
7447  par_sig1[0] = A_sig23[0][iETA1];
7448  par_sig1[1] = A_sig23[1][iETA1];
7449  par_sig1[2] = A_sig23[2][iETA1];
7450  break;
7451  case 9: //2-4
7452  if (iETA1 < 9)
7453  iETA1 = 9;
7454  par1[0] = A_mu24[0][iETA1];
7455  par1[1] = A_mu24[1][iETA1];
7456  par1[2] = A_mu24[2][iETA1];
7457  par1[3] = A_mu24[3][iETA1];
7458  par_sig1[0] = A_sig24[0][iETA1];
7459  par_sig1[1] = A_sig24[1][iETA1];
7460  par_sig1[2] = A_sig24[2][iETA1];
7461  break;
7462  case 10: //3-4
7463  if (iETA1 < 9)
7464  iETA1 = 9;
7465  par1[0] = A_mu34[0][iETA1];
7466  par1[1] = A_mu34[1][iETA1];
7467  par1[2] = A_mu34[2][iETA1];
7468  par1[3] = A_mu34[3][iETA1];
7469  par_sig1[0] = A_sig34[0][iETA1];
7470  par_sig1[1] = A_sig34[1][iETA1];
7471  par_sig1[2] = A_sig34[2][iETA1];
7472  break;
7473  case 13: //1-4
7474  if (iETA1 < 9)
7475  iETA1 = 9;
7476  //if(iETA1 > 11)iETA1 = 11;
7477  //if(iETA1 > 12)iETA1 = 12;
7478  if (fr == 1) {
7479  par1[0] = A_mu14Front[0][iETA1];
7480  par1[1] = A_mu14Front[1][iETA1];
7481  par1[2] = A_mu14Front[2][iETA1];
7482  par1[3] = A_mu14Front[3][iETA1];
7483  par_sig1[0] = A_sig14Front[0][iETA1];
7484  par_sig1[1] = A_sig14Front[1][iETA1];
7485  par_sig1[2] = A_sig14Front[2][iETA1];
7486  }
7487  if (fr == 0) {
7488  par1[0] = A_mu14Rare[0][iETA1];
7489  par1[1] = A_mu14Rare[1][iETA1];
7490  par1[2] = A_mu14Rare[2][iETA1];
7491  par1[3] = A_mu14Rare[3][iETA1];
7492  par_sig1[0] = A_sig14Rare[0][iETA1];
7493  par_sig1[1] = A_sig14Rare[1][iETA1];
7494  par_sig1[2] = A_sig14Rare[2][iETA1];
7495  }
7496  break;
7497  case 11: // b1-3
7498  if (iETA1 != 2)
7499  iETA1 = 2;
7500  par1[0] = A_mu53[0][iETA1];
7501  par1[1] = A_mu53[1][iETA1];
7502  par1[2] = A_mu53[2][iETA1];
7503  par1[3] = A_mu53[3][iETA1];
7504  par_sig1[0] = A_sig53[0][iETA1];
7505  par_sig1[1] = A_sig53[1][iETA1];
7506  par_sig1[2] = A_sig53[2][iETA1];
7507 
7508  break;
7509  case 12: //1-2-b1 = 2-b1 for pt_method < 10, for pt_method > 10: b1-2
7510  if (iETA1 < 1)
7511  iETA1 = 1;
7512  if (iETA1 > 2)
7513  iETA1 = 2;
7514  par1[0] = A_mu52[0][iETA1];
7515  par1[1] = A_mu52[1][iETA1];
7516  par1[2] = A_mu52[2][iETA1];
7517  par1[3] = A_mu52[3][iETA1];
7518  par_sig1[0] = A_sig52[0][iETA1];
7519  par_sig1[1] = A_sig52[1][iETA1];
7520  par_sig1[2] = A_sig52[2][iETA1];
7521  break;
7522  case 14: //2-b1 for pt_method < 10 and b1-1 for pt_method > 10
7523  if (method < 10) {
7524  if (iETA1 < 1)
7525  iETA1 = 1;
7526  if (iETA1 > 2)
7527  iETA1 = 2;
7528  }
7529  par1[0] = A_mu52[0][iETA1];
7530  par1[1] = A_mu52[1][iETA1];
7531  par1[2] = A_mu52[2][iETA1];
7532  par1[3] = A_mu52[3][iETA1];
7533  par_sig1[0] = A_sig52[0][iETA1];
7534  par_sig1[1] = A_sig52[1][iETA1];
7535  par_sig1[2] = A_sig52[2][iETA1];
7536  if (method > 10) {
7537  if (iETA1 > 2)
7538  iETA1 = 2;
7539  par1[0] = A_mu51[0][iETA1];
7540  par1[1] = A_mu51[1][iETA1];
7541  par1[2] = A_mu51[2][iETA1];
7542  par1[3] = A_mu51[3][iETA1];
7543  par_sig1[0] = A_sig51[0][iETA1];
7544  par_sig1[1] = A_sig51[1][iETA1];
7545  par_sig1[2] = A_sig51[2][iETA1];
7546  }
7547  break;
7548  //default:
7549  //return 0.0;
7550  }
7551 
7552  //************* solve equation dLog(Likelihood)/dpt = 0 for muon + ;
7553  //if(fabs(dphi) >= 0.002)
7554  //if(fabs(dphi) >= 0.00)
7555  //if(fabs(dphi) >= 0.002 || (fabs(dphi) >= 0.01 && (type == 12 || type == 14)))
7556  //{
7557  double muPlusMaxLH = -1e9;
7558  double pt = 140;
7559  double step = 5.;
7560  double maxLH = -1e9;
7561 
7562  while (pt > 2.) {
7563  double par_phi12[1] = {dphi};
7564  double v[1], lpt1_1;
7565  v[0] = pt;
7566  lpt1_1 = Likelihood2(par_phi12, par1, par_sig1, v);
7567 
7568  if (lpt1_1 > maxLH) {
7569  maxLH = lpt1_1;
7570  PTsolv = pt;
7571  }
7572 
7573  if (pt <= 5) {
7574  step = 0.5 / 4.0;
7575  } else if (pt <= 10) {
7576  step = 1.0 / 4.0;
7577  } else if (pt <= 20) {
7578  step = 2.0 / 4.0;
7579  } else if (pt <= 50) {
7580  step = 5.0 / 4.0;
7581  } else if (pt <= 100) {
7582  step = 10.0 / 4.0;
7583  }
7584  pt = pt - step;
7585  } // end while
7586  muPlusMaxLH = maxLH;
7587 
7588  //*********** end solve equation for muon plus
7589  //************* solve equation dLog(Likelihood)/dpt = 0 for muon minus ;
7590  // for one station method we know sing of muon: dphi > 0 for muon minus!!! => dphi = -dphi < 0
7591  double muMinusMaxLH = -1e9;
7592  dphi = -dphi;
7593  pt = 140;
7594  step = 5.;
7595  maxLH = -1e9;
7596  while (pt > 2.) {
7597  double par_phi12[1] = {dphi};
7598  double v[1], lpt1_1;
7599  v[0] = pt;
7600  lpt1_1 = Likelihood2(par_phi12, par1, par_sig1, v);
7601 
7602  if (lpt1_1 > maxLH) {
7603  maxLH = lpt1_1;
7604  PTsolvMinus = pt;
7605  }
7606 
7607  if (pt <= 100) {
7608  step = 10.0 / 4.0;
7609  }
7610  if (pt <= 50) {
7611  step = 5.0 / 4.0;
7612  }
7613  if (pt <= 20) {
7614  step = 2.0 / 4.0;
7615  }
7616  if (pt <= 10) {
7617  step = 1.0 / 4.0;
7618  }
7619  if (pt <= 5) {
7620  step = 0.5 / 4.0;
7621  }
7622  pt = pt - step;
7623  } // end while
7624  muMinusMaxLH = maxLH;
7625 
7626  // }// if(fabs(dphi) >= 0.002)
7627  // else
7628  // {PTsolv = 137.5;}
7629 
7630  //*********** end solve equation for muon minus
7631  if (useBestMLH)
7632  PTsolv = (muPlusMaxLH > muMinusMaxLH)
7633  ? PTsolv
7634  : PTsolvMinus; // select Maximum solution from muon plus and moun minus hypotesis
7635  else
7636  PTsolv = (PTsolv > PTsolvMinus)
7637  ? PTsolv
7638  : PTsolvMinus; // select Maximum solution from muon plus and moun minus hypotesis
7639 
7640  bestLH = (muPlusMaxLH > muMinusMaxLH) ? muPlusMaxLH : muMinusMaxLH;
7641 
7642  PTsolv = PTsolv * 1.2;
7643  if (PTsolv > 137.5)
7644  PTsolv = 137.5;
7645 
7646  if (useBOXcut)
7647  if (fabs(dphi) <= 0.002 && PTsolv < 120.)
7648  PTsolv = 140.;
7649  if (useDTBOXcut)
7650  if (fabs(dphi) <= 0.01 && (type == 11 || type == 12 || type == 14) && PTsolv < 120.)
7651  PTsolv = 140.;
7652 
7653  dphi = -dphi; //return to correct sing dphi
7654 
7655  } //if(fabs(eta_TracMy)
7656  } //end "for by iETA"
7657 
7658  float Pt = PTsolv;
7659  if (Pt > 10 && fabs(dphi) >= 0.1)
7660  std::cout << "iF = 0 for dphi = " << dphi << " and Pt = " << Pt << std::endl;
7661 
7662  //if(Pt > 100 && (type == 12 || type == 14) && fabs(eta) <= 1.2 && dphi > 0.015 )std::cout << "dphi = " << dphi << " eta = " << eta << std::endl;
7663  //if(Pt < 10 && (type == 12 || type == 14) && fabs(eta) <= 1.2 && dphi < 0.01)std::cout << "dphi = " << dphi << " eta = " << eta << std::endl;
7664  // return (Pt>0.0) ? Pt : 0.0;
7665 
7666  float Pt_min = trigger_scale->getPtScale()->getLowEdge(1); // 0 GeV
7667  if (method > 10)
7668  Pt_min = trigger_scale->getPtScale()->getLowEdge(3); // 2 GeV
7669 
7670  return (Pt > Pt_min) ? Pt : Pt_min;
7671 }
static const double A_sig14Front[3][15]
double Likelihood2(double *phi12, double *par_m12, double *par_sig12, double *v) const
static const double A_sig13Rare[3][15]
static const double A_sig12Front[3][15]
virtual float getLowEdge(unsigned packed) const =0
get the low edge of bin represented by packed
const L1MuTriggerPtScale * trigger_scale
const L1MuScale * getPtScale() const
get the Pt scale
static const double A_sig34[3][15]
static const double A_sig53[3][15]
static const double A_mu53[4][15]
static const double A_mu24[4][15]
static const double A_sig23[3][15]
static const double A_mu14Front[4][15]
static const double A_mu23[4][15]
static const double A_sig14Rare[3][15]
static const double A_sig12Rare[3][15]
static const double A_sig51[3][15]
static const double A_mu52[4][15]
static const double A_mu13Front[4][15]
static const double A_mu12Rare[4][15]
static const double A_mu13Rare[4][15]
static const double A_mu12Front[4][15]
static const double A_sig24[3][15]
static const double A_mu14Rare[4][15]
static const double A_sig13Front[3][15]
static const double A_mu51[4][15]
step
Definition: StallMonitor.cc:83
static const double A_sig52[3][15]
static const double A_mu34[4][15]
static const float etabins[16]

◆ Pt2Stn2012_DT()

float CSCTFPtMethods::Pt2Stn2012_DT ( int  type,
float  eta,
float  dphi,
int  PtbyMLH,
float &  theLH,
int  fr = -1,
int  method = 11,
int  phiSign = 2 
) const

Definition at line 8615 of file CSCTFPtMethods.cc.

References AB_mu12F, AB_mu12FME11, AB_mu12FnoME11, AB_mu12R, AB_mu12RME11, AB_mu12RnoME11, AB_mu13F, AB_mu13FME11, AB_mu13FnoME11, AB_mu13R, AB_mu13RME11, AB_mu13RnoME11, AB_mu14F, AB_mu14FME11, AB_mu14FnoME11, AB_mu14R, AB_mu14RME11, AB_mu14RnoME11, AB_mu23, AB_mu24, AB_mu34, AB_mu51, AB_mu52, AB_mu53, AB_sig12F, AB_sig12FME11, AB_sig12FnoME11, AB_sig12R, AB_sig12RME11, AB_sig12RnoME11, AB_sig13F, AB_sig13FME11, AB_sig13FnoME11, AB_sig13R, AB_sig13RME11, AB_sig13RnoME11, AB_sig14F, AB_sig14FME11, AB_sig14FnoME11, AB_sig14R, AB_sig14RME11, AB_sig14RnoME11, AB_sig23, AB_sig24, AB_sig34, AB_sig51, AB_sig52, AB_sig53, PVValHelper::eta, etabins, Likelihood2_2011(), AlcaSiPixelAliHarvester0T_cff::method, pfMETCorrectionType0_cfi::par1, DiDispStaMuonMonitor_cfi::pt, HLT_2024v12_cff::Pt_min, and findQualityFiles::v.

Referenced by Pt3Stn2012_DT().

8616  {
8617  int useBestMLH = PtbyMLH;
8618  int useBOXcut = true;
8619 
8620  //if(fabs(eta) >= 2.4) eta = 2.35;
8621  if (fabs(eta) >= 2.2)
8622  eta = 2.15;
8623  double PTsolv = 1.; // for muon plus hypothesis
8624  double PTsolvMinus = 1.; //for muon minus hypothesis
8625  for (int iETA = 0; iETA < 15; iETA++) {
8626  if (fabs(eta) >= etabins[iETA] && fabs(eta) < etabins[iETA + 1]) {
8627  // calculate curvers of mean and sigma
8628  // calculate phi12 mean
8629  double par1[4] = {0., 0., 0., 0.};
8630  //double phi12mean = fitf5(v, par1); //mu12
8631  double par_sig1[4] = {0., 0., 0., 0};
8632  int iETA1 = iETA;
8633  int iETA2 = iETA;
8634 
8635  const double(*Amean12FnoME11)[15] = AB_mu12FnoME11;
8636  const double(*Asig12FnoME11)[15] = AB_sig12FnoME11;
8637  const double(*Amean12RnoME11)[15] = AB_mu12RnoME11;
8638  const double(*Asig12RnoME11)[15] = AB_sig12RnoME11;
8639 
8640  const double(*Amean13FnoME11)[15] = AB_mu13FnoME11;
8641  const double(*Asig13FnoME11)[15] = AB_sig13FnoME11;
8642  const double(*Amean13RnoME11)[15] = AB_mu13RnoME11;
8643  const double(*Asig13RnoME11)[15] = AB_sig13RnoME11;
8644 
8645  const double(*Amean14FnoME11)[15] = AB_mu14FnoME11;
8646  const double(*Asig14FnoME11)[15] = AB_sig14FnoME11;
8647  const double(*Amean14RnoME11)[15] = AB_mu14RnoME11;
8648  const double(*Asig14RnoME11)[15] = AB_sig14RnoME11;
8649  //
8650  const double(*Amean12FME11)[15] = AB_mu12FME11;
8651  const double(*Asig12FME11)[15] = AB_sig12FME11;
8652  const double(*Amean12RME11)[15] = AB_mu12RME11;
8653  const double(*Asig12RME11)[15] = AB_sig12RME11;
8654 
8655  const double(*Amean13FME11)[15] = AB_mu13FME11;
8656  const double(*Asig13FME11)[15] = AB_sig13FME11;
8657  const double(*Amean13RME11)[15] = AB_mu13RME11;
8658  const double(*Asig13RME11)[15] = AB_sig13RME11;
8659 
8660  const double(*Amean14FME11)[15] = AB_mu14FME11;
8661  const double(*Asig14FME11)[15] = AB_sig14FME11;
8662  const double(*Amean14RME11)[15] = AB_mu14RME11;
8663  const double(*Asig14RME11)[15] = AB_sig14RME11;
8664  //
8665  const double(*Amean12F)[15] = AB_mu12F;
8666  const double(*Asig12F)[15] = AB_sig12F;
8667  const double(*Amean12R)[15] = AB_mu12R;
8668  const double(*Asig12R)[15] = AB_sig12R;
8669 
8670  const double(*Amean13F)[15] = AB_mu13F;
8671  const double(*Asig13F)[15] = AB_sig13F;
8672  const double(*Amean13R)[15] = AB_mu13R;
8673  const double(*Asig13R)[15] = AB_sig13R;
8674 
8675  const double(*Amean14F)[15] = AB_mu14F;
8676  const double(*Asig14F)[15] = AB_sig14F;
8677  const double(*Amean14R)[15] = AB_mu14R;
8678  const double(*Asig14R)[15] = AB_sig14R;
8679 
8680  const double(*Amean23)[15] = AB_mu23;
8681  const double(*Asig23)[15] = AB_sig23;
8682  const double(*Amean24)[15] = AB_mu24;
8683  const double(*Asig24)[15] = AB_sig24;
8684  const double(*Amean34)[15] = AB_mu34;
8685  const double(*Asig34)[15] = AB_sig34;
8686 
8687  const double(*Amean51)[15] = AB_mu51;
8688  const double(*Asig51)[15] = AB_sig51;
8689  const double(*Amean52)[15] = AB_mu52;
8690  const double(*Asig52)[15] = AB_sig52;
8691  const double(*Amean53)[15] = AB_mu53;
8692  const double(*Asig53)[15] = AB_sig53;
8693 
8694  switch (type) // type = mode here
8695  {
8696  case 6: //1-2
8697  if (fr == 1) {
8698  if (iETA1 < 3)
8699  iETA1 = 3;
8700  //if(iETA1 > 11)iETA1 = 11;
8701  par1[0] = (*(Amean12F + 0))[iETA1];
8702  par1[1] = (*(Amean12F + 1))[iETA1];
8703  par1[2] = (*(Amean12F + 2))[iETA1];
8704  par1[3] = (*(Amean12F + 3))[iETA1];
8705  par_sig1[0] = (*(Asig12F + 0))[iETA1];
8706  par_sig1[1] = (*(Asig12F + 1))[iETA1];
8707  par_sig1[2] = (*(Asig12F + 2))[iETA1];
8708  par_sig1[3] = (*(Asig12F + 3))[iETA1];
8709  }
8710  if (fr == 0) {
8711  if (iETA1 < 1)
8712  iETA1 = 1;
8713  //if(iETA1 > 11)iETA1 = 11;
8714  par1[0] = (*(Amean12R + 0))[iETA1];
8715  par1[1] = (*(Amean12R + 1))[iETA1];
8716  par1[2] = (*(Amean12R + 2))[iETA1];
8717  par1[3] = (*(Amean12R + 3))[iETA1];
8718  par_sig1[0] = (*(Asig12R + 0))[iETA1];
8719  par_sig1[1] = (*(Asig12R + 1))[iETA1];
8720  par_sig1[2] = (*(Asig12R + 2))[iETA1];
8721  par_sig1[3] = (*(Asig12R + 3))[iETA1];
8722  }
8723  if (phiSign == 0) { // track belong to ME11 station
8724  if (fr == 1) {
8725  if (iETA2 < 7)
8726  iETA2 = 7;
8727  par1[0] = (*(Amean12FME11 + 0))[iETA2];
8728  par1[1] = (*(Amean12FME11 + 1))[iETA2];
8729  par1[2] = (*(Amean12FME11 + 2))[iETA2];
8730  par1[3] = (*(Amean12FME11 + 3))[iETA2];
8731  par_sig1[0] = (*(Asig12FME11 + 0))[iETA2];
8732  par_sig1[1] = (*(Asig12FME11 + 1))[iETA2];
8733  par_sig1[2] = (*(Asig12FME11 + 2))[iETA2];
8734  par_sig1[3] = (*(Asig12FME11 + 3))[iETA2];
8735  }
8736  if (fr == 0) {
8737  if (iETA2 < 7)
8738  iETA2 = 7;
8739  par1[0] = (*(Amean12RME11 + 0))[iETA2];
8740  par1[1] = (*(Amean12RME11 + 1))[iETA2];
8741  par1[2] = (*(Amean12RME11 + 2))[iETA2];
8742  par1[3] = (*(Amean12RME11 + 3))[iETA2];
8743  par_sig1[0] = (*(Asig12RME11 + 0))[iETA2];
8744  par_sig1[1] = (*(Asig12RME11 + 1))[iETA2];
8745  par_sig1[2] = (*(Asig12RME11 + 2))[iETA2];
8746  par_sig1[3] = (*(Asig12RME11 + 3))[iETA2];
8747  }
8748  }
8749  if (phiSign == 1) { // track belong to ME1/2 or ME1/3 station
8750  if (fr == 1) {
8751  if (iETA2 < 3)
8752  iETA2 = 3;
8753  if (iETA2 > 7)
8754  iETA2 = 7;
8755  par1[0] = (*(Amean12FnoME11 + 0))[iETA2];
8756  par1[1] = (*(Amean12FnoME11 + 1))[iETA2];
8757  par1[2] = (*(Amean12FnoME11 + 2))[iETA2];
8758  par1[3] = (*(Amean12FnoME11 + 3))[iETA2];
8759  par_sig1[0] = (*(Asig12FnoME11 + 0))[iETA2];
8760  par_sig1[1] = (*(Asig12FnoME11 + 1))[iETA2];
8761  par_sig1[2] = (*(Asig12FnoME11 + 2))[iETA2];
8762  par_sig1[3] = (*(Asig12FnoME11 + 3))[iETA2];
8763  }
8764  if (fr == 0) {
8765  if (iETA2 < 1)
8766  iETA2 = 1;
8767  if (iETA2 > 6)
8768  iETA2 = 6; // rare ME1/2 only till 1.6
8769  par1[0] = (*(Amean12RnoME11 + 0))[iETA2];
8770  par1[1] = (*(Amean12RnoME11 + 1))[iETA2];
8771  par1[2] = (*(Amean12RnoME11 + 2))[iETA2];
8772  par1[3] = (*(Amean12RnoME11 + 3))[iETA2];
8773  par_sig1[0] = (*(Asig12RnoME11 + 0))[iETA2];
8774  par_sig1[1] = (*(Asig12RnoME11 + 1))[iETA2];
8775  par_sig1[2] = (*(Asig12RnoME11 + 2))[iETA2];
8776  par_sig1[3] = (*(Asig12RnoME11 + 3))[iETA2];
8777  }
8778  }
8779 
8780  break;
8781  case 7: //1-3
8782  if (fr == 1) {
8783  if (iETA1 < 3)
8784  iETA1 = 3;
8785  //if(iETA1 > 11)iETA1 = 11;
8786  par1[0] = (*(Amean13F + 0))[iETA1];
8787  par1[1] = (*(Amean13F + 1))[iETA1];
8788  par1[2] = (*(Amean13F + 2))[iETA1];
8789  par1[3] = (*(Amean13F + 3))[iETA1];
8790  par_sig1[0] = (*(Asig13F + 0))[iETA1];
8791  par_sig1[1] = (*(Asig13F + 1))[iETA1];
8792  par_sig1[2] = (*(Asig13F + 2))[iETA1];
8793  par_sig1[3] = (*(Asig13F + 3))[iETA1];
8794  }
8795  if (fr == 0) {
8796  if (iETA1 < 3)
8797  iETA1 = 3;
8798  //if(iETA1 > 11)iETA1 = 11;
8799  par1[0] = (*(Amean13R + 0))[iETA1];
8800  par1[1] = (*(Amean13R + 1))[iETA1];
8801  par1[2] = (*(Amean13R + 2))[iETA1];
8802  par1[3] = (*(Amean13R + 3))[iETA1];
8803  par_sig1[0] = (*(Asig13R + 0))[iETA1];
8804  par_sig1[1] = (*(Asig13R + 1))[iETA1];
8805  par_sig1[2] = (*(Asig13R + 2))[iETA1];
8806  par_sig1[3] = (*(Asig13R + 3))[iETA1];
8807  }
8808  if (phiSign == 0) { // track belong to ME11 station
8809  if (fr == 1) {
8810  if (iETA2 < 7)
8811  iETA2 = 7;
8812  par1[0] = (*(Amean13FME11 + 0))[iETA2];
8813  par1[1] = (*(Amean13FME11 + 1))[iETA2];
8814  par1[2] = (*(Amean13FME11 + 2))[iETA2];
8815  par1[3] = (*(Amean13FME11 + 3))[iETA2];
8816  par_sig1[0] = (*(Asig13FME11 + 0))[iETA2];
8817  par_sig1[1] = (*(Asig13FME11 + 1))[iETA2];
8818  par_sig1[2] = (*(Asig13FME11 + 2))[iETA2];
8819  par_sig1[3] = (*(Asig13FME11 + 3))[iETA2];
8820  }
8821  if (fr == 0) {
8822  if (iETA2 < 7)
8823  iETA2 = 7;
8824  par1[0] = (*(Amean13RME11 + 0))[iETA2];
8825  par1[1] = (*(Amean13RME11 + 1))[iETA2];
8826  par1[2] = (*(Amean13RME11 + 2))[iETA2];
8827  par1[3] = (*(Amean13RME11 + 3))[iETA2];
8828  par_sig1[0] = (*(Asig13RME11 + 0))[iETA2];
8829  par_sig1[1] = (*(Asig13RME11 + 1))[iETA2];
8830  par_sig1[2] = (*(Asig13RME11 + 2))[iETA2];
8831  par_sig1[3] = (*(Asig13RME11 + 3))[iETA2];
8832  }
8833  }
8834  if (phiSign == 1) { // track belong to ME1/2 or ME1/3 station
8835  if (fr == 1) {
8836  if (iETA2 < 3)
8837  iETA2 = 3;
8838  if (iETA2 > 7)
8839  iETA2 = 7;
8840  par1[0] = (*(Amean13FnoME11 + 0))[iETA2];
8841  par1[1] = (*(Amean13FnoME11 + 1))[iETA2];
8842  par1[2] = (*(Amean13FnoME11 + 2))[iETA2];
8843  par1[3] = (*(Amean13FnoME11 + 3))[iETA2];
8844  par_sig1[0] = (*(Asig13FnoME11 + 0))[iETA2];
8845  par_sig1[1] = (*(Asig13FnoME11 + 1))[iETA2];
8846  par_sig1[2] = (*(Asig13FnoME11 + 2))[iETA2];
8847  par_sig1[3] = (*(Asig13FnoME11 + 3))[iETA2];
8848  }
8849  if (fr == 0) {
8850  if (iETA2 < 3)
8851  iETA2 = 3;
8852  if (iETA2 > 6)
8853  iETA2 = 6; // rare ME1/2 only till 1.6
8854  par1[0] = (*(Amean13RnoME11 + 0))[iETA2];
8855  par1[1] = (*(Amean13RnoME11 + 1))[iETA2];
8856  par1[2] = (*(Amean13RnoME11 + 2))[iETA2];
8857  par1[3] = (*(Amean13RnoME11 + 3))[iETA2];
8858  par_sig1[0] = (*(Asig13RnoME11 + 0))[iETA2];
8859  par_sig1[1] = (*(Asig13RnoME11 + 1))[iETA2];
8860  par_sig1[2] = (*(Asig13RnoME11 + 2))[iETA2];
8861  par_sig1[3] = (*(Asig13RnoME11 + 3))[iETA2];
8862  }
8863  }
8864  break;
8865  case 8: //2-3
8866  if (iETA1 < 2)
8867  iETA1 = 2;
8868  par1[0] = (*(Amean23 + 0))[iETA1];
8869  par1[1] = (*(Amean23 + 1))[iETA1];
8870  par1[2] = (*(Amean23 + 2))[iETA1];
8871  par1[3] = (*(Amean23 + 3))[iETA1];
8872  par_sig1[0] = (*(Asig23 + 0))[iETA1];
8873  par_sig1[1] = (*(Asig23 + 1))[iETA1];
8874  par_sig1[2] = (*(Asig23 + 2))[iETA1];
8875  par_sig1[3] = (*(Asig23 + 3))[iETA1];
8876 
8877  break;
8878  case 9: //2-4
8879  if (iETA1 < 3)
8880  iETA1 = 3;
8881  par1[0] = (*(Amean24 + 0))[iETA1];
8882  par1[1] = (*(Amean24 + 1))[iETA1];
8883  par1[2] = (*(Amean24 + 2))[iETA1];
8884  par1[3] = (*(Amean24 + 3))[iETA1];
8885  par_sig1[0] = (*(Asig24 + 0))[iETA1];
8886  par_sig1[1] = (*(Asig24 + 1))[iETA1];
8887  par_sig1[2] = (*(Asig24 + 2))[iETA1];
8888  par_sig1[3] = (*(Asig24 + 3))[iETA1];
8889  break;
8890  case 10: //3-4
8891  if (iETA1 < 3)
8892  iETA1 = 3;
8893  par1[0] = (*(Amean34 + 0))[iETA1];
8894  par1[1] = (*(Amean34 + 1))[iETA1];
8895  par1[2] = (*(Amean34 + 2))[iETA1];
8896  par1[3] = (*(Amean34 + 3))[iETA1];
8897  par_sig1[0] = (*(Asig34 + 0))[iETA1];
8898  par_sig1[1] = (*(Asig34 + 1))[iETA1];
8899  par_sig1[2] = (*(Asig34 + 2))[iETA1];
8900  par_sig1[3] = (*(Asig34 + 3))[iETA1];
8901  break;
8902  case 13: //1-4
8903  if (fr == 1) {
8904  if (iETA1 < 3)
8905  iETA1 = 3;
8906  //if(iETA1 > 11)iETA1 = 11;
8907  par1[0] = (*(Amean14F + 0))[iETA1];
8908  par1[1] = (*(Amean14F + 1))[iETA1];
8909  par1[2] = (*(Amean14F + 2))[iETA1];
8910  par1[3] = (*(Amean14F + 3))[iETA1];
8911  par_sig1[0] = (*(Asig14F + 0))[iETA1];
8912  par_sig1[1] = (*(Asig14F + 1))[iETA1];
8913  par_sig1[2] = (*(Asig14F + 2))[iETA1];
8914  par_sig1[3] = (*(Asig14F + 3))[iETA1];
8915  }
8916  if (fr == 0) {
8917  if (iETA1 < 2)
8918  iETA1 = 2;
8919  //if(iETA1 > 11)iETA1 = 11;
8920  par1[0] = (*(Amean14R + 0))[iETA1];
8921  par1[1] = (*(Amean14R + 1))[iETA1];
8922  par1[2] = (*(Amean14R + 2))[iETA1];
8923  par1[3] = (*(Amean14R + 3))[iETA1];
8924  par_sig1[0] = (*(Asig14R + 0))[iETA1];
8925  par_sig1[1] = (*(Asig14R + 1))[iETA1];
8926  par_sig1[2] = (*(Asig14R + 2))[iETA1];
8927  par_sig1[3] = (*(Asig14R + 3))[iETA1];
8928  }
8929  if (phiSign == 0) { // track belong to ME11 station
8930  if (fr == 1) {
8931  if (iETA2 < 9)
8932  iETA2 = 9;
8933  par1[0] = (*(Amean14FME11 + 0))[iETA2];
8934  par1[1] = (*(Amean14FME11 + 1))[iETA2];
8935  par1[2] = (*(Amean14FME11 + 2))[iETA2];
8936  par1[3] = (*(Amean14FME11 + 3))[iETA2];
8937  par_sig1[0] = (*(Asig14FME11 + 0))[iETA2];
8938  par_sig1[1] = (*(Asig14FME11 + 1))[iETA2];
8939  par_sig1[2] = (*(Asig14FME11 + 2))[iETA2];
8940  par_sig1[3] = (*(Asig14FME11 + 3))[iETA2];
8941  }
8942  if (fr == 0) {
8943  if (iETA2 < 9)
8944  iETA2 = 9;
8945  par1[0] = (*(Amean14RME11 + 0))[iETA2];
8946  par1[1] = (*(Amean14RME11 + 1))[iETA2];
8947  par1[2] = (*(Amean14RME11 + 2))[iETA2];
8948  par1[3] = (*(Amean14RME11 + 3))[iETA2];
8949  par_sig1[0] = (*(Asig14RME11 + 0))[iETA2];
8950  par_sig1[1] = (*(Asig14RME11 + 1))[iETA2];
8951  par_sig1[2] = (*(Asig14RME11 + 2))[iETA2];
8952  par_sig1[3] = (*(Asig14RME11 + 3))[iETA2];
8953  }
8954  }
8955  if (phiSign == 1) { // track belong to ME1/2 or ME1/3 station
8956  if (fr == 1) {
8957  if (iETA2 < 4)
8958  iETA2 = 4;
8959  if (iETA2 > 7)
8960  iETA2 = 7;
8961  par1[0] = (*(Amean14FnoME11 + 0))[iETA2];
8962  par1[1] = (*(Amean14FnoME11 + 1))[iETA2];
8963  par1[2] = (*(Amean14FnoME11 + 2))[iETA2];
8964  par1[3] = (*(Amean14FnoME11 + 3))[iETA2];
8965  par_sig1[0] = (*(Asig14FnoME11 + 0))[iETA2];
8966  par_sig1[1] = (*(Asig14FnoME11 + 1))[iETA2];
8967  par_sig1[2] = (*(Asig14FnoME11 + 2))[iETA2];
8968  par_sig1[3] = (*(Asig14FnoME11 + 3))[iETA2];
8969  }
8970  if (fr == 0) {
8971  if (iETA2 < 4)
8972  iETA2 = 4;
8973  if (iETA2 > 6)
8974  iETA2 = 6; // rare ME1/2 only till 1.6
8975  par1[0] = (*(Amean14RnoME11 + 0))[iETA2];
8976  par1[1] = (*(Amean14RnoME11 + 1))[iETA2];
8977  par1[2] = (*(Amean14RnoME11 + 2))[iETA2];
8978  par1[3] = (*(Amean14RnoME11 + 3))[iETA2];
8979  par_sig1[0] = (*(Asig14RnoME11 + 0))[iETA2];
8980  par_sig1[1] = (*(Asig14RnoME11 + 1))[iETA2];
8981  par_sig1[2] = (*(Asig14RnoME11 + 2))[iETA2];
8982  par_sig1[3] = (*(Asig14RnoME11 + 3))[iETA2];
8983  }
8984  }
8985 
8986  break;
8987  case 11: // b1-3 for pt_method > 10 & fr = 0, singles for pt_method < 10
8988  if (iETA1 != 2)
8989  iETA1 = 2;
8990  par1[0] = (*(Amean53 + 0))[iETA1];
8991  par1[1] = (*(Amean53 + 1))[iETA1];
8992  par1[2] = (*(Amean53 + 2))[iETA1];
8993  par1[3] = (*(Amean53 + 3))[iETA1];
8994  par_sig1[0] = (*(Asig53 + 0))[iETA1];
8995  par_sig1[1] = (*(Asig53 + 1))[iETA1];
8996  par_sig1[2] = (*(Asig53 + 2))[iETA1];
8997  par_sig1[3] = (*(Asig53 + 3))[iETA1];
8998  break;
8999 
9000  case 12: //1-2-b1 = 2-b1 for pt_method < 10, for pt_method > 10 & fr = 0: b1-2
9001  if (iETA1 < 1)
9002  iETA1 = 1;
9003  if (iETA1 > 2)
9004  iETA1 = 2;
9005 
9006  par1[0] = (*(Amean52 + 0))[iETA1];
9007  par1[1] = (*(Amean52 + 1))[iETA1];
9008  par1[2] = (*(Amean52 + 2))[iETA1];
9009  par1[3] = (*(Amean52 + 3))[iETA1];
9010  par_sig1[0] = (*(Asig52 + 0))[iETA1];
9011  par_sig1[1] = (*(Asig52 + 1))[iETA1];
9012  par_sig1[2] = (*(Asig52 + 2))[iETA1];
9013  par_sig1[3] = (*(Asig52 + 3))[iETA1];
9014 
9015  break;
9016  case 14: //2-b1 for pt_method < 10 and b1-1 for pt_method > 10 & fr = 0
9017  if (method < 10) {
9018  if (iETA1 < 1)
9019  iETA1 = 1;
9020  if (iETA1 > 2)
9021  iETA1 = 2;
9022  }
9023  par1[0] = (*(Amean52 + 0))[iETA1];
9024  par1[1] = (*(Amean52 + 1))[iETA1];
9025  par1[2] = (*(Amean52 + 2))[iETA1];
9026  par1[3] = (*(Amean52 + 3))[iETA1];
9027  par_sig1[0] = (*(Asig52 + 0))[iETA1];
9028  par_sig1[1] = (*(Asig52 + 1))[iETA1];
9029  par_sig1[2] = (*(Asig52 + 2))[iETA1];
9030  par_sig1[3] = (*(Asig52 + 3))[iETA1];
9031 
9032  if (method > 10) {
9033  if (iETA1 > 2)
9034  iETA1 = 2;
9035  par1[0] = (*(Amean51 + 0))[iETA1];
9036  par1[1] = (*(Amean51 + 1))[iETA1];
9037  par1[2] = (*(Amean51 + 2))[iETA1];
9038  par1[3] = (*(Amean51 + 3))[iETA1];
9039  par_sig1[0] = (*(Asig51 + 0))[iETA1];
9040  par_sig1[1] = (*(Asig51 + 1))[iETA1];
9041  par_sig1[2] = (*(Asig51 + 2))[iETA1];
9042  par_sig1[3] = (*(Asig51 + 3))[iETA1];
9043  }
9044  break;
9045  //default:
9046  //return 0.0;
9047  }
9048 
9049  //************* solve equation dLog(Likelihood)/dpt = 0 for muon + ;
9050  //if(fabs(dphi) >= 0.002)
9051  //if(fabs(dphi) >= 0.00)
9052  //if(fabs(dphi) >= 0.002 || (fabs(dphi) >= 0.01 && (type == 12 || type == 14)))
9053  //{
9054  double muPlusMaxLH = -1e9;
9055  double pt = 140;
9056  double step = 5.;
9057  double maxLH = -1e9;
9058  while (pt > 2.) {
9059  double par_phi12[1] = {dphi};
9060  double v[1], lpt1_1;
9061  v[0] = pt;
9062  lpt1_1 = Likelihood2_2011(par_phi12, par1, par_sig1, v);
9063 
9064  if (lpt1_1 > maxLH) {
9065  maxLH = lpt1_1;
9066  PTsolv = pt;
9067  }
9068 
9069  if (pt <= 5) {
9070  step = 0.5 / 4.0;
9071  } else if (pt <= 10) {
9072  step = 1.0 / 4.0;
9073  } else if (pt <= 20) {
9074  step = 2.0 / 4.0;
9075  } else if (pt <= 50) {
9076  step = 5.0 / 4.0;
9077  } else if (pt <= 100) {
9078  step = 10.0 / 4.0;
9079  }
9080  pt = pt - step;
9081  } // end while
9082  muPlusMaxLH = maxLH;
9083 
9084  //*********** end solve equation for muon plus
9085  //************* solve equation dLog(Likelihood)/dpt = 0 for muon minus ;
9086  // for one station method we know sing of muon: dphi > 0 for muon minus!!! => dphi = -dphi < 0
9087  double muMinusMaxLH = -1e9;
9088  dphi = -dphi;
9089  pt = 140;
9090  step = 5.;
9091  maxLH = -1e9;
9092  while (pt > 2.) {
9093  double par_phi12[1] = {dphi};
9094  double v[1], lpt1_1;
9095  v[0] = pt;
9096  lpt1_1 = Likelihood2_2011(par_phi12, par1, par_sig1, v);
9097 
9098  if (lpt1_1 > maxLH) {
9099  maxLH = lpt1_1;
9100  PTsolvMinus = pt;
9101  }
9102 
9103  if (pt <= 5) {
9104  step = 0.5 / 4.0;
9105  } else if (pt <= 10) {
9106  step = 1.0 / 4.0;
9107  } else if (pt <= 20) {
9108  step = 2.0 / 4.0;
9109  } else if (pt <= 50) {
9110  step = 5.0 / 4.0;
9111  } else if (pt <= 100) {
9112  step = 10.0 / 4.0;
9113  }
9114  pt = pt - step;
9115  } // end while
9116  muMinusMaxLH = maxLH;
9117 
9118  // }// if(fabs(dphi) >= 0.002)
9119  // else
9120  // {PTsolv = 137.5;}
9121 
9122  //*********** end solve equation for muon minus
9123  if (useBestMLH)
9124  PTsolv = (muPlusMaxLH > muMinusMaxLH)
9125  ? PTsolv
9126  : PTsolvMinus; // select Maximum solution from muon plus and moun minus hypotesis
9127  else
9128  PTsolv = (PTsolv > PTsolvMinus)
9129  ? PTsolv
9130  : PTsolvMinus; // select Maximum solution from muon plus and moun minus hypotesis
9131 
9132  bestLH = (muPlusMaxLH > muMinusMaxLH) ? muPlusMaxLH : muMinusMaxLH;
9133 
9134  PTsolv = PTsolv * 1.2;
9135  if (PTsolv > 137.5)
9136  PTsolv = 137.5;
9137 
9138  if (useBOXcut)
9139  if (fabs(dphi) <= 0.002 && PTsolv < 120.)
9140  PTsolv = 140.;
9141  //if( fabs(dphi) <= 0.01 && (type == 11 || type == 12 || type == 14) && PTsolv < 120.)PTsolv = 140.;
9142  dphi = -dphi; //return to correct sing dphi
9143 
9144  } //if(fabs(eta_TracMy)
9145  } //end "for by iETA"
9146 
9147  float Pt = PTsolv;
9148 
9149  //float Pt_min = trigger_scale->getPtScale()->getLowEdge(1);// 0 GeV
9150  //if(method > 10) Pt_min = trigger_scale->getPtScale()->getLowEdge(3);// 2 GeV
9151  float Pt_min = 2; // 0 GeV
9152 
9153  return (Pt > Pt_min) ? Pt : Pt_min;
9154 }
static const double AB_sig14FnoME11[4][15]
static const double AB_sig24[4][15]
static const double AB_mu14R[4][15]
static const double AB_sig14RnoME11[4][15]
static const double AB_sig52[4][15]
static const double AB_mu12R[4][15]
static const double AB_mu13RME11[4][15]
static const double AB_sig13F[4][15]
static const double AB_mu24[4][15]
static const double AB_mu13RnoME11[4][15]
static const double AB_mu52[4][15]
static const double AB_mu14RME11[4][15]
static const double AB_sig12FnoME11[4][15]
static const double AB_mu13FnoME11[4][15]
static const double AB_mu14F[4][15]
static const double AB_sig13FME11[4][15]
static const double AB_mu51[4][15]
static const double AB_sig12FME11[4][15]
static const double AB_mu23[4][15]
static const double AB_sig12R[4][15]
static const double AB_sig51[4][15]
static const double AB_mu14FME11[4][15]
static const double AB_sig53[4][15]
static const double AB_mu14RnoME11[4][15]
static const double AB_sig14R[4][15]
static const double AB_mu12RnoME11[4][15]
static const double AB_mu12FnoME11[4][15]
static const double AB_mu13R[4][15]
static const double AB_sig34[4][15]
static const double AB_mu12RME11[4][15]
static const double AB_mu12FME11[4][15]
double Likelihood2_2011(double *phi12, double *par_m12, double *par_sig12, double *v) const
static const double AB_sig14F[4][15]
static const double AB_sig14FME11[4][15]
static const double AB_mu13F[4][15]
static const double AB_sig13R[4][15]
static const double AB_mu53[4][15]
static const double AB_sig13RME11[4][15]
static const double AB_mu14FnoME11[4][15]
static const double AB_sig13FnoME11[4][15]
static const double AB_sig23[4][15]
static const double AB_sig12RnoME11[4][15]
static const double AB_mu34[4][15]
step
Definition: StallMonitor.cc:83
static const double AB_sig13RnoME11[4][15]
static const double AB_sig12F[4][15]
static const double AB_mu12F[4][15]
static const double AB_sig14RME11[4][15]
static const double AB_mu13FME11[4][15]
static const float etabins[16]
static const double AB_sig12RME11[4][15]

◆ Pt2StnChiSq()

float CSCTFPtMethods::Pt2StnChiSq ( int  type,
float  eta,
int  dphi,
int  fr 
) const

Definition at line 9725 of file CSCTFPtMethods.cc.

References change_name::diff, dphifr0, dphifr1, PVValHelper::eta, etabins, beamvalidation::exit(), mps_fire::i, dqmiolumiharvest::j, dqmdumpme::k, SiStripPI::min, Pt2Stn(), ptbins, muonTiming_cfi::ptmax, ptmin, CSCTFConstants::SECTOR_RAD, sigmafr0, and sigmafr1.

Referenced by CSCTFPtLUT::calcPt(), and Pt2StnHybrid().

9725  {
9726  float diff, min, ptmin, ptmax;
9727  float mypt = 0.0;
9728 
9729  int dphicopy = dphi;
9730 
9731  if (type < 0 || type > 3) {
9732  // std::cout << "CSCTFPtMethods: illegal track type for Chi-square method" << std::endl;
9733  edm::LogError("CSCTFPtMethods::Pt2StnChiSq()") << "Illegal track type for Chi-square method";
9734  return 0.;
9735  }
9736 
9737  // flip sign
9738  //dphi = -dphi;
9739 
9740  // force positive
9741  eta = fabs(eta);
9742 
9743  //determine which eta bin muon falls into
9744  int i = 0;
9745  for (i = 0; i < 15; i++) {
9746  if (eta >= etabins[i] && eta < etabins[i + 1])
9747  break;
9748  }
9749  if (i == 15) {
9750  // std::cout<<" CSCTFPtMethods: muon not within any eta range"<< std::endl;
9751  edm::LogWarning("CSCTFPtMethods::Pt2StnChiSq()") << "Muon not within any eta range";
9752  if (eta < etabins[0]) {
9753  eta = etabins[0];
9754  i = 0;
9755  } else if (eta >= etabins[15]) {
9756  eta = etabins[15];
9757  i = 15;
9758  } else
9759  exit(0);
9760  }
9761 
9762  bool bCallOldMethod = false;
9763 
9764  if (fr == 0) {
9765  //advance past bins in array w/ default values
9766  //default is: dphifr0[x][y][z] = -1, sigmafr0[x][y][z] = 1
9767  int j = 0; //start from 1st column, j=0
9768  while (dphifr0[type][i][j] == -1 && sigmafr0[type][i][j] == 1 && j != 28)
9769  j++;
9770  if (j == 28) {
9771  // std::cout <<" CSCTFPtMethods: every entry in row is default"<< std::endl;
9772  edm::LogInfo("CSCTFPtMethods::Pt2StnChiSq()") << "Every entry in row is default";
9773  // exit(0); //normal termination
9774  bCallOldMethod = true;
9775  }
9776 
9777  if (!bCallOldMethod) {
9778  //set min, ptmin, ptmax to first bin
9779  //in row that is not default
9780  min = fabs(dphi - dphifr0[type][i][j]) / sigmafr0[type][i][j];
9781  ptmin = ptbins[j];
9782  ptmax = ptbins[j + 1];
9783 
9784  //loop through all pt bins. assign pt of bin w/ least diff
9785  //do not include default bins in calculation
9786  for (int k = j; k < 28; k++) {
9787  if (dphifr0[type][i][k] != -1 || sigmafr0[type][i][k] != 1) {
9788  diff = fabs(dphi - dphifr0[type][i][k]) / sigmafr0[type][i][k];
9789  if (diff < min) {
9790  min = diff;
9791  ptmin = ptbins[k];
9792  ptmax = ptbins[k + 1];
9793  }
9794  }
9795  }
9796  mypt = (ptmin + ptmax) / 2;
9797  }
9798  }
9799 
9800  if (fr == 1) {
9801  //advance past bins in array w/ default values
9802  //default is: dphifr1[x][y][z] = -1, sigmafr1[x][y][z] = 1
9803  int j = 0; //start from 1st column, j=0
9804 
9805  while (dphifr1[type][i][j] == -1 && sigmafr1[type][i][j] == 1 && j != 28)
9806  j++;
9807 
9808  if (j == 28) {
9809  // std::cout <<" CSCTFPtMethods: every entry in row is default"<< std::endl;
9810  edm::LogInfo("CSCTFPtMethods::Pt2StnChiSq()") << "Every entry in row is default";
9811  // exit(0); //normal termination
9812  bCallOldMethod = true;
9813  }
9814 
9815  if (!bCallOldMethod) {
9816  //set min, ptmin, ptmax to first bin
9817  //in row that is not default
9818  min = fabs(dphi - dphifr1[type][i][j]) / sigmafr1[type][i][j];
9819  ptmin = ptbins[j];
9820  ptmax = ptbins[j + 1];
9821 
9822  //loop through all pt bins. assign pt of bin w/ least diff
9823  //do not include default bins in calculation
9824  for (int k = j; k < 28; k++) {
9825  if (dphifr1[type][i][k] != -1 || sigmafr1[type][i][k] != 1) {
9826  diff = fabs(dphi - dphifr1[type][i][k]) / sigmafr1[type][i][k];
9827  if (diff < min) {
9828  min = diff;
9829  ptmin = ptbins[k];
9830  ptmax = ptbins[k + 1];
9831  }
9832  }
9833  }
9834  mypt = (ptmin + ptmax) / 2;
9835  }
9836  }
9837 
9838  // hybrid approach:
9839  if (bCallOldMethod) {
9840  float dphiR = static_cast<float>(dphicopy) / static_cast<float>(1 << 12) * CSCTFConstants::SECTOR_RAD;
9841  // must change type definition, just add one
9842  mypt = Pt2Stn(type + 1, eta, dphiR, fr);
9843  }
9844 
9845  return mypt;
9846 }
float Pt2Stn(int type, float eta, float dphi, int fr=-1) const
static const float dphifr1[4][15][28]
Log< level::Error, false > LogError
static const float dphifr0[4][15][28]
static const float sigmafr0[4][15][28]
Log< level::Info, false > LogInfo
double ptmin
Definition: HydjetWrapper.h:86
static const double SECTOR_RAD
static const float ptbins[29]
Definition: mypt.h:6
Log< level::Warning, false > LogWarning
static const float sigmafr1[4][15][28]
static const float etabins[16]
def exit(msg="")

◆ Pt2StnHybrid()

float CSCTFPtMethods::Pt2StnHybrid ( int  type,
float  eta,
int  dphi,
int  fr 
) const

Third is the hybrid method

Definition at line 10083 of file CSCTFPtMethods.cc.

References PVValHelper::eta, Pt2Stn(), Pt2StnChiSq(), and CSCTFConstants::SECTOR_RAD.

Referenced by CSCTFPtLUT::calcPt().

10083  {
10084  float mypt = 0.0;
10085 
10086  mypt = Pt2StnChiSq(type, eta, dphi, fr);
10087  if (mypt >= 8.0) {
10088  float dphiR = static_cast<float>(dphi) / static_cast<float>(1 << 12) * CSCTFConstants::SECTOR_RAD;
10089  mypt = Pt2Stn(type + 1, eta, dphiR, fr);
10090  }
10091 
10092  return mypt;
10093 }
float Pt2Stn(int type, float eta, float dphi, int fr=-1) const
float Pt2StnChiSq(int type, float eta, int dphi, int fr) const
static const double SECTOR_RAD
Definition: mypt.h:6

◆ Pt3Stn()

float CSCTFPtMethods::Pt3Stn ( int  type,
float  eta,
float  dphi1,
float  dphi2,
int  fr = -1 
) const

3-station Pt measurement for types (see SP class for 3-stn types)

Definition at line 5218 of file CSCTFPtMethods.cc.

References AkHighEta_Fit1, AkLowEta_Fit1, alignmentValidation::c1, PVValHelper::eta, FRCorrHighEta, FRCorrLowEta, L1MuScale::getLowEdge(), L1MuTriggerPtScale::getPtScale(), kGlobalScaleFactor, kME1andME2, kME1andME3, kME2andME3, kME2andME4, kME3andME4, Pt2Stn(), alignCSCRings::r, mathSSE::sqrt(), and trigger_scale.

Referenced by CSCTFPtLUT::calcPt(), Pt3StnChiSq(), and Pt3StnHybrid().

5218  {
5219  int ty1 = 0, ty2 = 0;
5220 
5221  switch (type) {
5222  case 1:
5223  ty1 = kME1andME2 - 1; // subtype sets the right position for array A
5224  ty2 = kME2andME3 - 1;
5225  break;
5226  case 2:
5227  ty1 = kME1andME2 - 1;
5228  ty2 = kME2andME4 - 1;
5229  break;
5230  case 3:
5231  ty1 = kME1andME3 - 1;
5232  ty2 = kME3andME4 - 1;
5233  break;
5234  case 4:
5235  ty1 = kME2andME3 - 1;
5236  ty2 = kME3andME4 - 1;
5237  break;
5238  default:
5239  return 0.0;
5240  }
5241 
5242  // Switch to 2-Station measurement if dphi is too small
5243  // box cut around Pt of 10 GeV
5244  float Pt;
5245  // if ( (fabs(static_cast<double>(dphi2))<0.004) &&
5246  // (fabs(static_cast<double>(dphi1))<0.030)) {
5247  if (fabs(static_cast<double>(dphi2)) < 0.004) {
5248  Pt = Pt2Stn((ty1 + 1), eta, dphi1, fr);
5249  } else {
5250  float c1 = (-.2999 * (eta * eta * eta) + 2.030 * (eta * eta) - 4.235 * eta + 3.024) + 0.02;
5251  float c2 = (-2.484 * (eta * eta * eta) + 14.43 * (eta * eta) - 27.66 * eta + 18.47) * .72;
5252  float r = 0.6; //correlation
5253  float A1 = 0;
5254  float A2 = 0;
5255 
5256  if (dphi1 == 0.0)
5257  dphi1 = 1.e-6;
5258  if (dphi2 == 0.0)
5259  dphi2 = 1.e-6;
5260  if (eta < 0.0)
5261  eta = static_cast<float>(fabs(static_cast<double>(eta)));
5262  if (eta >= 0.0 && eta < 1.6) {
5263  A1 = AkLowEta_Fit1[ty1][0] + AkLowEta_Fit1[ty1][1] * eta + AkLowEta_Fit1[ty1][2] * eta * eta +
5264  AkLowEta_Fit1[ty1][3] * eta * eta * eta;
5265  A2 = AkLowEta_Fit1[ty2][0] + AkLowEta_Fit1[ty2][1] * eta + AkLowEta_Fit1[ty2][2] * eta * eta +
5266  AkLowEta_Fit1[ty2][3] * eta * eta * eta;
5267  if (fr >= 0 && fr <= 1) {
5268  A1 *= FRCorrLowEta[ty1][fr];
5269  }
5270  }
5271 
5272  if (eta >= 1.6 && eta < 2.5) {
5273  A1 = AkHighEta_Fit1[ty1][0] + AkHighEta_Fit1[ty1][1] * eta + AkHighEta_Fit1[ty1][2] * eta * eta +
5274  AkHighEta_Fit1[ty1][3] * eta * eta * eta;
5275  A2 = AkHighEta_Fit1[ty2][0] + AkHighEta_Fit1[ty2][1] * eta + AkHighEta_Fit1[ty2][2] * eta * eta +
5276  AkHighEta_Fit1[ty2][3] * eta * eta * eta;
5277  if (fr >= 0 && fr <= 1) {
5278  A1 *= FRCorrHighEta[ty1][fr];
5279  }
5280  }
5281  A1 *= kGlobalScaleFactor;
5282  A2 *= kGlobalScaleFactor;
5283  Pt =
5284  1 /
5285  (((-dphi1 / c1 / c1 / A1 + r * dphi2 / c1 / c2 / A2 + dphi1 * r / c1 / c2 / A1 - dphi2 / c2 / c2 / A2) +
5286  sqrt((dphi1 / c1 / c1 / A1 - r * dphi2 / c1 / c2 / A2 - dphi1 * r / c1 / A1 / c2 + dphi2 / c2 / c2 / A2) *
5287  (dphi1 / c1 / c1 / A1 - r * dphi2 / c1 / c2 / A2 - dphi1 * r / c1 / A1 / c2 + dphi2 / c2 / c2 / A2) +
5288  8 * (1 - r * r) *
5289  (dphi1 * dphi1 / c1 / c1 / A1 / A1 - 2 * dphi1 * dphi2 * r / c1 / A1 / c2 / A2 +
5290  dphi2 * dphi2 / c2 / c2 / A2 / A2))) /
5291  (4 * (1 - r * r)));
5292 
5293  } // end 2 or 3 station method
5294  // if (Pt<0.0) Pt = 0.0;
5295  if (Pt < trigger_scale->getPtScale()->getLowEdge(1))
5296  Pt = trigger_scale->getPtScale()->getLowEdge(1);
5297 
5298  // switch to 2-stn Pt above 10 GeV:
5299  /*
5300  if (Pt>10.0) {
5301  switch (type)
5302  {
5303  case 1 :
5304  case 2 :
5305  Pt = Pt2Stn(1, eta, dphi1);
5306  break;
5307  case 3:
5308  Pt = Pt2Stn(2, eta, dphi1);
5309  break;
5310  case 4:
5311  Pt = Pt2Stn(3, eta, dphi1);
5312  }
5313  }
5314  */
5315 
5316  return Pt;
5317 }
static const float FRCorrHighEta[kME2andMB2][2]
virtual float getLowEdge(unsigned packed) const =0
get the low edge of bin represented by packed
float Pt2Stn(int type, float eta, float dphi, int fr=-1) const
static const float AkLowEta_Fit1[kME2andMB2][kMaxParameters]
const L1MuTriggerPtScale * trigger_scale
const L1MuScale * getPtScale() const
get the Pt scale
static const float AkHighEta_Fit1[kME2andMB2][kMaxParameters]
T sqrt(T t)
Definition: SSEVec.h:19
static const float kGlobalScaleFactor
static const float FRCorrLowEta[kME2andMB2][2]

◆ Pt3Stn2010()

float CSCTFPtMethods::Pt3Stn2010 ( int  type,
float  eta,
float  dphi1,
float  dphi2,
int  fr = -1,
int  method = 11 
) const

Definition at line 6394 of file CSCTFPtMethods.cc.

References A_mu12Front, A_mu12Rare, A_mu13Front, A_mu13Rare, A_mu23, A_mu24, A_mu34, A_mu51, A_mu52, A_rho123FrontCSCTF, A_rho123RareCSCTF, A_rho124FrontCSCTF, A_rho124RareCSCTF, A_rho134FrontCSCTF, A_rho134RareCSCTF, A_rho234CSCTF, A_rho512, A_rho513, A_rho523, A_sig12Front, A_sig12Rare, A_sig13Front, A_sig13Rare, A_sig23, A_sig24, A_sig34, A_sig51, A_sig52, PVValHelper::eta, etabins, multPhiCorr_741_25nsDY_cfi::fx, L1MuScale::getLowEdge(), L1MuTriggerPtScale::getPtScale(), Likelihood(), AlcaSiPixelAliHarvester0T_cff::method, pfMETCorrectionType0_cfi::par1, pfMETCorrectionType0_cfi::par2, DiDispStaMuonMonitor_cfi::pt, Pt2Stn2010(), HLT_2024v12_cff::Pt_min, trigger_scale, and findQualityFiles::v.

Referenced by CSCTFPtLUT::calcPt().

6394  {
6395  if (fabs(eta) >= 2.4)
6396  eta = 2.35;
6397  float Pt = 0.;
6398  double PTsolv = 1.; // for muon plus hypothesis
6399  double PTsolvMinus = 1.; //for muon minus hypothesis
6400  for (int iETA = 0; iETA < 15; iETA++) {
6401  if (fabs(eta) >= etabins[iETA] && fabs(eta) < etabins[iETA + 1]) {
6402  // calculate curvers of mean and sigma
6403  // calculate phi12 mean
6404  double par1[4] = {0., 0., 0., 0.};
6405  //double phi12mean = fitf5(v, par1); //mu12
6406  double par_sig1[3] = {0., 0., 0.};
6407  // calculate phi23 mean
6408  double par2[4] = {0., 0., 0., 0.};
6409  // calculate phi23 sig
6410  double par_sig2[3] = {0., 0., 0.};
6411  // calculate correlation rho
6412  double par_rho[5] = {0., 0., 0., 0., 0.};
6413  int iETA1 = iETA;
6414  int iETA2 = iETA;
6415  switch (type) // type = mode here
6416  {
6417  case 2: //1-2-3
6418  if (fr == 1) {
6419  if (iETA1 < 3)
6420  iETA1 = 3;
6421  //if(iETA1 > 11)iETA1 = 11;
6422  //if(fabs(eta)>1.56 && fabs(eta) < 1.6) iETA1 = iETA +1;
6423  par1[0] = A_mu12Front[0][iETA1];
6424  par1[1] = A_mu12Front[1][iETA1];
6425  par1[2] = A_mu12Front[2][iETA1];
6426  par1[3] = A_mu12Front[3][iETA1];
6427  par_sig1[0] = A_sig12Front[0][iETA1];
6428  par_sig1[1] = A_sig12Front[1][iETA1];
6429  par_sig1[2] = A_sig12Front[2][iETA1];
6430  par_rho[0] = A_rho123FrontCSCTF[0][iETA1];
6431  par_rho[1] = A_rho123FrontCSCTF[1][iETA1];
6432  par_rho[2] = A_rho123FrontCSCTF[2][iETA1];
6433  par_rho[3] = A_rho123FrontCSCTF[3][iETA1];
6434  par_rho[4] = A_rho123FrontCSCTF[4][iETA1];
6435  }
6436  if (fr == 0) {
6437  if (iETA1 < 1)
6438  iETA1 = 1;
6439  //if(iETA1 > 11)iETA1 = 11;
6440  //if(fabs(eta)>1.56 && fabs(eta) < 1.6) iETA1 = iETA +1;
6441  par1[0] = A_mu12Rare[0][iETA1];
6442  par1[1] = A_mu12Rare[1][iETA1];
6443  par1[2] = A_mu12Rare[2][iETA1];
6444  par1[3] = A_mu12Rare[3][iETA1];
6445  par_sig1[0] = A_sig12Rare[0][iETA1];
6446  par_sig1[1] = A_sig12Rare[1][iETA1];
6447  par_sig1[2] = A_sig12Rare[2][iETA1];
6448  par_rho[0] = A_rho123RareCSCTF[0][iETA1];
6449  par_rho[1] = A_rho123RareCSCTF[1][iETA1];
6450  par_rho[2] = A_rho123RareCSCTF[2][iETA1];
6451  par_rho[3] = A_rho123RareCSCTF[3][iETA1];
6452  par_rho[4] = A_rho123RareCSCTF[4][iETA1];
6453  }
6454  if (iETA2 < 2)
6455  iETA2 = 2;
6456  par2[0] = A_mu23[0][iETA2];
6457  par2[1] = A_mu23[1][iETA2];
6458  par2[2] = A_mu23[2][iETA2];
6459  par2[3] = A_mu23[3][iETA2];
6460  par_sig2[0] = A_sig23[0][iETA2];
6461  par_sig2[1] = A_sig23[1][iETA2];
6462  par_sig2[2] = A_sig23[2][iETA2];
6463 
6464  break;
6465  case 3: //1-2-4
6466  if (fr == 1) {
6467  if (iETA1 < 3)
6468  iETA1 = 3;
6469  //if(iETA1 > 11)iETA1 = 11;
6470  par1[0] = A_mu12Front[0][iETA1];
6471  par1[1] = A_mu12Front[1][iETA1];
6472  par1[2] = A_mu12Front[2][iETA1];
6473  par1[3] = A_mu12Front[3][iETA1];
6474  par_sig1[0] = A_sig12Front[0][iETA1];
6475  par_sig1[1] = A_sig12Front[1][iETA1];
6476  par_sig1[2] = A_sig12Front[2][iETA1];
6477  par_rho[0] = A_rho124FrontCSCTF[0][iETA1];
6478  par_rho[1] = A_rho124FrontCSCTF[1][iETA1];
6479  par_rho[2] = A_rho124FrontCSCTF[2][iETA1];
6480  par_rho[3] = A_rho124FrontCSCTF[3][iETA1];
6481  par_rho[4] = A_rho124FrontCSCTF[4][iETA1];
6482  }
6483  if (fr == 0) {
6484  if (iETA1 < 1)
6485  iETA1 = 1;
6486  //if(iETA1 > 11)iETA1 = 11;
6487  par1[0] = A_mu12Rare[0][iETA1];
6488  par1[1] = A_mu12Rare[1][iETA1];
6489  par1[2] = A_mu12Rare[2][iETA1];
6490  par1[3] = A_mu12Rare[3][iETA1];
6491  par_sig1[0] = A_sig12Rare[0][iETA1];
6492  par_sig1[1] = A_sig12Rare[1][iETA1];
6493  par_sig1[2] = A_sig12Rare[2][iETA1];
6494  par_rho[0] = A_rho124RareCSCTF[0][iETA1];
6495  par_rho[1] = A_rho124RareCSCTF[1][iETA1];
6496  par_rho[2] = A_rho124RareCSCTF[2][iETA1];
6497  par_rho[3] = A_rho124RareCSCTF[3][iETA1];
6498  par_rho[4] = A_rho124RareCSCTF[4][iETA1];
6499  }
6500  if (iETA2 < 9)
6501  iETA2 = 9;
6502  par2[0] = A_mu24[0][iETA2];
6503  par2[1] = A_mu24[1][iETA2];
6504  par2[2] = A_mu24[2][iETA2];
6505  par2[3] = A_mu24[3][iETA2];
6506  par_sig2[0] = A_sig24[0][iETA2];
6507  par_sig2[1] = A_sig24[1][iETA2];
6508  par_sig2[2] = A_sig24[2][iETA2];
6509  break;
6510  case 4: //1-3-4
6511  if (fr == 1) {
6512  if (iETA1 < 3)
6513  iETA1 = 3;
6514  //if(iETA1 > 11)iETA1 = 11;
6515  par1[0] = A_mu13Front[0][iETA1];
6516  par1[1] = A_mu13Front[1][iETA1];
6517  par1[2] = A_mu13Front[2][iETA1];
6518  par1[3] = A_mu13Front[3][iETA1];
6519  par_sig1[0] = A_sig13Front[0][iETA1];
6520  par_sig1[1] = A_sig13Front[1][iETA1];
6521  par_sig1[2] = A_sig13Front[2][iETA1];
6522  par_rho[0] = A_rho134FrontCSCTF[0][iETA1];
6523  par_rho[1] = A_rho134FrontCSCTF[1][iETA1];
6524  par_rho[2] = A_rho134FrontCSCTF[2][iETA1];
6525  par_rho[3] = A_rho134FrontCSCTF[3][iETA1];
6526  par_rho[4] = A_rho134FrontCSCTF[4][iETA1];
6527  }
6528  if (fr == 0) {
6529  if (iETA1 < 2)
6530  iETA1 = 2;
6531  //if(iETA1 > 11)iETA1 = 11;
6532  par1[0] = A_mu13Rare[0][iETA1];
6533  par1[1] = A_mu13Rare[1][iETA1];
6534  par1[2] = A_mu13Rare[2][iETA1];
6535  par1[3] = A_mu13Rare[3][iETA1];
6536  par_sig1[0] = A_sig13Rare[0][iETA1];
6537  par_sig1[1] = A_sig13Rare[1][iETA1];
6538  par_sig1[2] = A_sig13Rare[2][iETA1];
6539  par_rho[0] = A_rho134RareCSCTF[0][iETA1];
6540  par_rho[1] = A_rho134RareCSCTF[1][iETA1];
6541  par_rho[2] = A_rho134RareCSCTF[2][iETA1];
6542  par_rho[3] = A_rho134RareCSCTF[3][iETA1];
6543  par_rho[4] = A_rho134RareCSCTF[4][iETA1];
6544  }
6545  if (iETA2 < 9)
6546  iETA2 = 9;
6547  par2[0] = A_mu34[0][iETA2];
6548  par2[1] = A_mu34[1][iETA2];
6549  par2[2] = A_mu34[2][iETA2];
6550  par2[3] = A_mu34[3][iETA2];
6551  par_sig2[0] = A_sig34[0][iETA2];
6552  par_sig2[1] = A_sig34[1][iETA2];
6553  par_sig2[2] = A_sig34[2][iETA2];
6554  break;
6555  case 5: //2-3-4
6556  if (iETA1 < 9)
6557  iETA1 = 9;
6558  par1[0] = A_mu23[0][iETA1];
6559  par1[1] = A_mu23[1][iETA1];
6560  par1[2] = A_mu23[2][iETA1];
6561  par1[3] = A_mu23[3][iETA1];
6562  par_sig1[0] = A_sig23[0][iETA1];
6563  par_sig1[1] = A_sig23[1][iETA1];
6564  par_sig1[2] = A_sig23[2][iETA1];
6565  par_rho[0] = A_rho234CSCTF[0][iETA1];
6566  par_rho[1] = A_rho234CSCTF[1][iETA1];
6567  par_rho[2] = A_rho234CSCTF[2][iETA1];
6568  par_rho[3] = A_rho234CSCTF[3][iETA1];
6569  par_rho[4] = A_rho234CSCTF[4][iETA1];
6570 
6571  par2[0] = A_mu34[0][iETA1];
6572  par2[1] = A_mu34[1][iETA1];
6573  par2[2] = A_mu34[2][iETA1];
6574  par2[3] = A_mu34[3][iETA1];
6575  par_sig2[0] = A_sig34[0][iETA1];
6576  par_sig2[1] = A_sig34[1][iETA1];
6577  par_sig2[2] = A_sig34[2][iETA1];
6578  break;
6579  case 11: // b1-1-3
6580  if (iETA1 != 2)
6581  iETA1 = 2;
6582  par1[0] = A_mu51[0][iETA1];
6583  par1[1] = A_mu51[1][iETA1];
6584  par1[2] = A_mu51[2][iETA1];
6585  par1[3] = A_mu51[3][iETA1];
6586  par_sig1[0] = A_sig51[0][iETA1];
6587  par_sig1[1] = A_sig51[1][iETA1];
6588  par_sig1[2] = A_sig51[2][iETA1];
6589  par_rho[0] = A_rho513[0][iETA1];
6590  par_rho[1] = A_rho513[0][iETA1];
6591  par_rho[2] = A_rho513[0][iETA1];
6592  par_rho[3] = A_rho513[0][iETA1];
6593  par_rho[4] = A_rho513[0][iETA1];
6594 
6595  par2[0] = A_mu13Rare[0][iETA1];
6596  par2[1] = A_mu13Rare[1][iETA1];
6597  par2[2] = A_mu13Rare[2][iETA1];
6598  par2[3] = A_mu13Rare[3][iETA1];
6599  par_sig2[0] = A_sig13Rare[0][iETA1];
6600  par_sig2[1] = A_sig13Rare[1][iETA1];
6601  par_sig2[2] = A_sig13Rare[2][iETA1];
6602  break;
6603  case 12: // b1-2-3
6604  if (iETA1 != 2)
6605  iETA1 = 2;
6606  par1[0] = A_mu52[0][iETA1];
6607  par1[1] = A_mu52[1][iETA1];
6608  par1[2] = A_mu52[2][iETA1];
6609  par1[3] = A_mu52[3][iETA1];
6610  par_sig1[0] = A_sig52[0][iETA1];
6611  par_sig1[1] = A_sig52[1][iETA1];
6612  par_sig1[2] = A_sig52[2][iETA1];
6613  par_rho[0] = A_rho523[0][iETA1];
6614  par_rho[1] = A_rho523[0][iETA1];
6615  par_rho[2] = A_rho523[0][iETA1];
6616  par_rho[3] = A_rho523[0][iETA1];
6617  par_rho[4] = A_rho523[0][iETA1];
6618 
6619  par2[0] = A_mu23[0][iETA1];
6620  par2[1] = A_mu23[1][iETA1];
6621  par2[2] = A_mu23[2][iETA1];
6622  par2[3] = A_mu23[3][iETA1];
6623  par_sig2[0] = A_sig23[0][iETA1];
6624  par_sig2[1] = A_sig23[1][iETA1];
6625  par_sig2[2] = A_sig23[2][iETA1];
6626  break;
6627  case 14: // b1-1-2-(3)
6628  if (iETA1 < 1)
6629  iETA1 = 1;
6630  if (iETA1 > 2)
6631  iETA1 = 2;
6632  par1[0] = A_mu51[0][iETA1];
6633  par1[1] = A_mu51[1][iETA1];
6634  par1[2] = A_mu51[2][iETA1];
6635  par1[3] = A_mu51[3][iETA1];
6636  par_sig1[0] = A_sig51[0][iETA1];
6637  par_sig1[1] = A_sig51[1][iETA1];
6638  par_sig1[2] = A_sig51[2][iETA1];
6639  par_rho[0] = A_rho512[0][iETA1];
6640  par_rho[1] = A_rho512[0][iETA1];
6641  par_rho[2] = A_rho512[0][iETA1];
6642  par_rho[3] = A_rho512[0][iETA1];
6643  par_rho[4] = A_rho512[0][iETA1];
6644 
6645  par2[0] = A_mu12Rare[0][iETA1];
6646  par2[1] = A_mu12Rare[1][iETA1];
6647  par2[2] = A_mu12Rare[2][iETA1];
6648  par2[3] = A_mu12Rare[3][iETA1];
6649  par_sig2[0] = A_sig12Rare[0][iETA1];
6650  par_sig2[1] = A_sig12Rare[1][iETA1];
6651  par_sig2[2] = A_sig12Rare[2][iETA1];
6652  break;
6653  //default:
6654  //return 0.0;
6655  }
6656 
6657  // Switch to 2-Station measurement if dphi is too small
6658  // box cut around Pt of 10 GeV
6659  if (fabs(static_cast<double>(dphi2)) < 0.004) {
6660  if (type == 2 || type == 3)
6661  type = 6; // 1-2-3(or 4) -> 1-2
6662  if (type == 4)
6663  type = 7; // 1-3-4 -> 1-3
6664  if (type == 5)
6665  type = 8; // 2-3-4 -> 2-3
6666  if (type == 11)
6667  type = 14; // b1-1-3 -> b1-1 for pt_method > 10
6668  Pt = Pt2Stn2010(type, eta, dphi1, fr, method);
6669  } else {
6670  //************* solve equation dLog(Likelihood)/dpt = 0 for muon + ;
6671  double pt = 140;
6672  double dpt = 0.1;
6673  double step = 5.;
6674  while (pt > 2.) {
6675  double par_phi12[1] = {dphi1};
6676  double par_phi23[1] = {dphi2};
6677  double v[1], lpt1_1, lpt1_2, lpt2_1, lpt2_2;
6678  v[0] = pt;
6679  lpt1_1 = Likelihood(par_phi12, par_phi23, par1, par2, par_sig1, par_sig2, par_rho, v);
6680  v[0] = pt + dpt;
6681  lpt1_2 = Likelihood(par_phi12, par_phi23, par1, par2, par_sig1, par_sig2, par_rho, v);
6682  double lpt1 = (lpt1_2 - lpt1_1) / dpt; // derivative at point pt1 = pt
6683  v[0] = pt - step;
6684  lpt2_1 = Likelihood(par_phi12, par_phi23, par1, par2, par_sig1, par_sig2, par_rho, v);
6685  v[0] = pt - step + dpt;
6686  lpt2_2 = Likelihood(par_phi12, par_phi23, par1, par2, par_sig1, par_sig2, par_rho, v);
6687  double lpt2 = (lpt2_2 - lpt2_1) / dpt; // derivative at point pt1 = pt - step
6688  // calculate 2nd derivative at point pt-0.5*step, it should be > 0 if minimum
6689  v[0] = pt - 0.5 * step;
6690  double fx = Likelihood(par_phi12, par_phi23, par1, par2, par_sig1, par_sig2, par_rho, v);
6691  v[0] = pt - 0.5 * step + dpt;
6692  double fxh = Likelihood(par_phi12, par_phi23, par1, par2, par_sig1, par_sig2, par_rho, v);
6693  v[0] = pt - 0.5 * step + 2 * dpt;
6694  double fx2h = Likelihood(par_phi12, par_phi23, par1, par2, par_sig1, par_sig2, par_rho, v);
6695 
6696  double lpt2nd = -(fx2h + fx - 2 * fxh) / dpt / dpt;
6697 
6698  if (lpt1 * lpt2 <= 0 && lpt2nd > 0) {
6699  PTsolv = pt - 0.5 * step;
6700  break;
6701  } // lpt = 0 between lpt1 and lpt2 => maximum pt_solv is a solution of the likelihood
6702  /*
6703  if(pt == 140.){
6704  v[0] = 200.;
6705  lpt2_1 = Likelihood(par_phi12, par_phi23, par1, par2, par_sig1, par_sig2, par_rho, v);
6706  v[0] = 200.+ 5.;
6707  lpt2_2 = Likelihood(par_phi12, par_phi23, par1, par2, par_sig1, par_sig2, par_rho, v);
6708  lpt2 = (lpt2_2-lpt2_1)/5.;
6709  v[0] = 170.;
6710  fx = Likelihood(par_phi12, par_phi23, par1, par2, par_sig1, par_sig2, par_rho, v);
6711  v[0] = 170.+5.;
6712  fxh = Likelihood(par_phi12, par_phi23, par1, par2, par_sig1, par_sig2, par_rho, v);
6713  v[0] = 170.+2*5.;
6714  fx2h = Likelihood(par_phi12, par_phi23, par1, par2, par_sig1, par_sig2, par_rho, v);
6715  lpt2nd = -(fx2h + fx - 2*fxh)/5./5.;
6716  }
6717 
6718  if(pt == 140. && lpt1*lpt2 <= 0 && lpt2nd > 0){PTsolv = 137.5; break;}
6719 */
6720  //double rho = fitfrho(v, par_rho); //rho
6721  if (pt > 25) {
6722  dpt = 0.1;
6723  step = 5.;
6724  } else if (pt <= 25) {
6725  dpt = 0.01;
6726  step = 0.5;
6727  }
6728  pt = pt - step;
6729  } // end while
6730  //*********** end solve equation for muon plus
6731  //************* solve equation dLog(Likelihood)/dpt = 0 for muon minus ;
6732  // for one station method we know sing of muon: dphi1 > 0 for muon minus!!! => dphi1 = -dphi1 < 0
6733  dphi1 = -dphi1;
6734  dphi2 = -dphi2;
6735  pt = 140;
6736  dpt = 0.1;
6737  step = 5.;
6738  while (pt > 2.) {
6739  double par_phi12[1] = {dphi1};
6740  double par_phi23[1] = {dphi2};
6741  double v[1], lpt1_1, lpt1_2, lpt2_1, lpt2_2;
6742  v[0] = pt;
6743  lpt1_1 = Likelihood(par_phi12, par_phi23, par1, par2, par_sig1, par_sig2, par_rho, v);
6744  v[0] = pt + dpt;
6745  lpt1_2 = Likelihood(par_phi12, par_phi23, par1, par2, par_sig1, par_sig2, par_rho, v);
6746  double lpt1 = (lpt1_2 - lpt1_1) / dpt; // derivative at point pt1 = pt
6747  v[0] = pt - step;
6748  lpt2_1 = Likelihood(par_phi12, par_phi23, par1, par2, par_sig1, par_sig2, par_rho, v);
6749  v[0] = pt - step + dpt;
6750  lpt2_2 = Likelihood(par_phi12, par_phi23, par1, par2, par_sig1, par_sig2, par_rho, v);
6751  double lpt2 = (lpt2_2 - lpt2_1) / dpt; // derivative at point pt1 = pt - step
6752  // calculate 2nd derivative at point pt-0.5*step, it should be > 0 if minimum
6753  v[0] = pt - 0.5 * step;
6754  double fx = Likelihood(par_phi12, par_phi23, par1, par2, par_sig1, par_sig2, par_rho, v);
6755  v[0] = pt - 0.5 * step + dpt;
6756  double fxh = Likelihood(par_phi12, par_phi23, par1, par2, par_sig1, par_sig2, par_rho, v);
6757  v[0] = pt - 0.5 * step + 2 * dpt;
6758  double fx2h = Likelihood(par_phi12, par_phi23, par1, par2, par_sig1, par_sig2, par_rho, v);
6759 
6760  double lpt2nd = -(fx2h + fx - 2 * fxh) / dpt / dpt;
6761 
6762  if (lpt1 * lpt2 <= 0 && lpt2nd > 0) {
6763  PTsolvMinus = pt - 0.5 * step;
6764  break;
6765  } // lpt = 0 between lpt1 and lpt2 => maximum pt_solv is a solution of the likelihood
6766  //if(iETA == 3 && v[0] < 4 && v[0] > 3) cout << "m12 = " << fitf5(v, par1) << " sig12 = " << fitf2(v, par_sig1) << endl;
6768  /*
6769  if(pt == 140.){
6770  v[0] = 200.;
6771  lpt2_1 = Likelihood(par_phi12, par_phi23, par1, par2, par_sig1, par_sig2, par_rho, v);
6772  v[0] = 200.+ 5.;
6773  lpt2_2 = Likelihood(par_phi12, par_phi23, par1, par2, par_sig1, par_sig2, par_rho, v);
6774  lpt2 = (lpt2_2-lpt2_1)/5.;
6775  v[0] = 170.;
6776  fx = Likelihood(par_phi12, par_phi23, par1, par2, par_sig1, par_sig2, par_rho, v);
6777  v[0] = 170.+5.;
6778  fxh = Likelihood(par_phi12, par_phi23, par1, par2, par_sig1, par_sig2, par_rho, v);
6779  v[0] = 170.+2*5.;
6780  fx2h = Likelihood(par_phi12, par_phi23, par1, par2, par_sig1, par_sig2, par_rho, v);
6781  lpt2nd = -(fx2h + fx - 2*fxh)/5./5.;
6782  }
6783  if(pt == 140. && lpt1*lpt2 <= 0 && lpt2nd > 0){PTsolvMinus = 137.5; break;}
6784 */
6785  //double rho = fitfrho(v, par_rho); //rho
6786  if (pt > 25) {
6787  dpt = 0.1;
6788  step = 5.;
6789  } else if (pt <= 25) {
6790  dpt = 0.01;
6791  step = 0.5;
6792  }
6793  pt = pt - step;
6794  } // end while
6795  //*********** end solve equation for muon minus
6796  PTsolv = (PTsolv > PTsolvMinus)
6797  ? PTsolv
6798  : PTsolvMinus; // select Maximum solution from muon plus and moun minus hypotesis
6799  PTsolv = PTsolv * 1.2; // correction to have 90% efficiency for trigger cuts
6800  if (PTsolv > 137.5)
6801  PTsolv = 137.5;
6802  //if(fabs(dphi1) < 0.002 && fabs(dphi2) <= CutPhi23){PTsolv = 140;}
6803  dphi1 = -dphi1; //return to correct sing dphi
6804  dphi2 = -dphi2; //return to correct sing dphi
6805  Pt = PTsolv;
6806  } // end 2 or 3 station method
6807  }
6808  }
6809  // if ( fabs(static_cast<double>(dphi2))>0.004 ) std::cout << "Pt = " << Pt << " Mode = " << type << " dphi1 = " << dphi1 << " dphi2 = " << dphi2 << std::endl;
6810 
6811  float Pt_min = trigger_scale->getPtScale()->getLowEdge(1); // 0 GeV
6812  if (method > 10)
6813  Pt_min = trigger_scale->getPtScale()->getLowEdge(3); // 2 GeV
6814 
6815  return (Pt > Pt_min) ? Pt : Pt_min;
6816 }
static const double A_rho123RareCSCTF[5][15]
static const double A_sig13Rare[3][15]
static const double A_sig12Front[3][15]
virtual float getLowEdge(unsigned packed) const =0
get the low edge of bin represented by packed
const L1MuTriggerPtScale * trigger_scale
const L1MuScale * getPtScale() const
get the Pt scale
static const double A_sig34[3][15]
double Likelihood(double *phi12, double *phi23, double *par_m12, double *par_m23, double *par_sig12, double *par_sig23, double *par_rho, double *v) const
static const double A_mu24[4][15]
static const double A_sig23[3][15]
static const double A_rho134RareCSCTF[5][15]
static const double A_mu23[4][15]
static const double A_rho512[5][15]
DT correlation.
float Pt2Stn2010(int type, float eta, float dphi, int fr=-1, int method=11) const
static const double A_sig12Rare[3][15]
static const double A_sig51[3][15]
static const double A_rho523[5][15]
static const double A_mu52[4][15]
static const double A_mu13Front[4][15]
static const double A_rho134FrontCSCTF[5][15]
static const double A_mu12Rare[4][15]
static const double A_mu13Rare[4][15]
static const double A_mu12Front[4][15]
static const double A_sig24[3][15]
static const double A_rho234CSCTF[5][15]
static const double A_sig13Front[3][15]
static const double A_mu51[4][15]
static const double A_rho123FrontCSCTF[5][15]
step
Definition: StallMonitor.cc:83
static const double A_rho124FrontCSCTF[5][15]
static const double A_sig52[3][15]
static const double A_rho513[5][15]
static const double A_rho124RareCSCTF[5][15]
static const double A_mu34[4][15]
static const float etabins[16]

◆ Pt3Stn2011()

float CSCTFPtMethods::Pt3Stn2011 ( int  type,
float  eta,
float  dphi1,
float  dphi2,
int  fr = -1,
int  method = 11 
) const

Definition at line 6817 of file CSCTFPtMethods.cc.

References AB_mu12F, AB_mu12R, AB_mu13F, AB_mu13R, AB_mu23, AB_mu24, AB_mu34, AB_mu5, AB_mu51, AB_mu52, AB_mu53, AB_rho123F, AB_rho123R, AB_rho124F, AB_rho124R, AB_rho134F, AB_rho134R, AB_rho234, AB_rho512, AB_rho513, AB_rho51B, AB_rho523, AB_rho52B, AB_rho53B, AB_sig12F, AB_sig12R, AB_sig13F, AB_sig13R, AB_sig23, AB_sig24, AB_sig34, AB_sig5, AB_sig51, AB_sig52, AB_sig53, PVValHelper::eta, etabins, multPhiCorr_741_25nsDY_cfi::fx, Likelihood2011(), AlcaSiPixelAliHarvester0T_cff::method, pfMETCorrectionType0_cfi::par1, pfMETCorrectionType0_cfi::par2, DiDispStaMuonMonitor_cfi::pt, Pt2Stn2011(), HLT_2024v12_cff::Pt_min, and findQualityFiles::v.

Referenced by CSCTFPtLUT::calcPt().

6817  {
6818  //if(fabs(eta) >= 2.4)eta = 2.35;
6819  if (fabs(eta) >= 2.2)
6820  eta = 2.15;
6821  float Pt = 0.;
6822  double PTsolv = 1.; // for muon plus hypothesis
6823  double PTsolvMinus = 1.; //for muon minus hypothesis
6824  for (int iETA = 0; iETA < 15; iETA++) {
6825  if (fabs(eta) >= etabins[iETA] && fabs(eta) < etabins[iETA + 1]) {
6826  // calculate curvers of mean and sigma
6827  // calculate phi12 mean
6828  double par1[4] = {0., 0., 0., 0.};
6829  //double phi12mean = fitf5(v, par1); //mu12
6830  double par_sig1[4] = {0., 0., 0., 0};
6831  // calculate phi23 mean
6832  double par2[4] = {0., 0., 0., 0.};
6833  // calculate phi23 sig
6834  double par_sig2[4] = {0., 0., 0., 0.};
6835  // calculate correlation rho
6836  double par_rho[5] = {0., 0., 0., 0., 0.};
6837  int iETA1 = iETA;
6838  int iETA2 = iETA;
6839 
6840  // defind which parameters will be use
6841  const double(*Amean12F)[15] = AB_mu12F;
6842  const double(*Asig12F)[15] = AB_sig12F;
6843  const double(*Amean12R)[15] = AB_mu12R;
6844  const double(*Asig12R)[15] = AB_sig12R;
6845 
6846  const double(*Amean13F)[15] = AB_mu13F;
6847  const double(*Asig13F)[15] = AB_sig13F;
6848  const double(*Amean13R)[15] = AB_mu13R;
6849  const double(*Asig13R)[15] = AB_sig13R;
6850 
6851  //const double(*Amean14F)[15] = AB_mu14F;
6852  //const double(*Asig14F)[15] = AB_sig14F;
6853  //const double(*Amean14R)[15] = AB_mu14R;
6854  //const double(*Asig14R)[15] = AB_sig14R;
6855 
6856  const double(*Amean23)[15] = AB_mu23;
6857  const double(*Asig23)[15] = AB_sig23;
6858  const double(*Amean24)[15] = AB_mu24;
6859  const double(*Asig24)[15] = AB_sig24;
6860  const double(*Amean34)[15] = AB_mu34;
6861  const double(*Asig34)[15] = AB_sig34;
6862 
6863  const double(*Amean5)[15] = AB_mu5;
6864  const double(*Asig5)[15] = AB_sig5;
6865  const double(*Amean51)[15] = AB_mu51;
6866  const double(*Asig51)[15] = AB_sig51;
6867  const double(*Amean52)[15] = AB_mu52;
6868  const double(*Asig52)[15] = AB_sig52;
6869  const double(*Amean53)[15] = AB_mu53;
6870  const double(*Asig53)[15] = AB_sig53;
6871 
6872  const double(*Arho123F)[15] = AB_rho123F;
6873  const double(*Arho123R)[15] = AB_rho123R;
6874  const double(*Arho124F)[15] = AB_rho124F;
6875  const double(*Arho124R)[15] = AB_rho124R;
6876  const double(*Arho134F)[15] = AB_rho134F;
6877  const double(*Arho134R)[15] = AB_rho134R;
6878  const double(*Arho234)[15] = AB_rho234;
6879 
6880  const double(*Arho51B)[15] = AB_rho51B;
6881  const double(*Arho52B)[15] = AB_rho52B;
6882  const double(*Arho53B)[15] = AB_rho53B;
6883  const double(*Arho512)[15] = AB_rho512;
6884  const double(*Arho513)[15] = AB_rho513;
6885  const double(*Arho523)[15] = AB_rho523;
6886 
6887  //cout << "iETA = " << iETA
6888  // << " AB_mu51[0][iETA] = " << AB_mu51[0][iETA] << " pointer = " << (*(Amean51+0))[iETA]
6889  // << " AB_mu51[3][iETA] = " << AB_mu51[3][iETA] << " pointer = " << (*(Amean51+3))[iETA]
6890  // << endl;
6891 
6892  switch (type) // type = mode here
6893  {
6894  case 2: //1-2-3
6895  if (iETA < 2)
6896  iETA2 = 2;
6897  if (fr == 1) {
6898  if (iETA < 3)
6899  iETA1 = 3;
6900  par1[0] = (*(Amean12F + 0))[iETA1];
6901  par1[1] = (*(Amean12F + 1))[iETA1];
6902  par1[2] = (*(Amean12F + 2))[iETA1];
6903  par1[3] = (*(Amean12F + 3))[iETA1];
6904  par_sig1[0] = (*(Asig12F + 0))[iETA1];
6905  par_sig1[1] = (*(Asig12F + 1))[iETA1];
6906  par_sig1[2] = (*(Asig12F + 2))[iETA1];
6907  par_sig1[3] = (*(Asig12F + 3))[iETA1];
6908  par_rho[0] = (*(Arho123F + 0))[iETA2];
6909  par_rho[1] = (*(Arho123F + 1))[iETA2];
6910  par_rho[2] = (*(Arho123F + 2))[iETA2];
6911  par_rho[3] = (*(Arho123F + 3))[iETA2];
6912  par_rho[4] = (*(Arho123F + 4))[iETA2];
6913  }
6914  if (fr == 0) {
6915  if (iETA < 1)
6916  iETA1 = 1;
6917  par1[0] = (*(Amean12R + 0))[iETA1];
6918  par1[1] = (*(Amean12R + 1))[iETA1];
6919  par1[2] = (*(Amean12R + 2))[iETA1];
6920  par1[3] = (*(Amean12R + 3))[iETA1];
6921  par_sig1[0] = (*(Asig12R + 0))[iETA1];
6922  par_sig1[1] = (*(Asig12R + 1))[iETA1];
6923  par_sig1[2] = (*(Asig12R + 2))[iETA1];
6924  par_sig1[3] = (*(Asig12R + 3))[iETA1];
6925  par_rho[0] = (*(Arho123R + 0))[iETA2];
6926  par_rho[1] = (*(Arho123R + 1))[iETA2];
6927  par_rho[2] = (*(Arho123R + 2))[iETA2];
6928  par_rho[3] = (*(Arho123R + 3))[iETA2];
6929  par_rho[4] = (*(Arho123R + 4))[iETA2];
6930  }
6931  par2[0] = (*(Amean23 + 0))[iETA2];
6932  par2[1] = (*(Amean23 + 1))[iETA2];
6933  par2[2] = (*(Amean23 + 2))[iETA2];
6934  par2[3] = (*(Amean23 + 3))[iETA2];
6935  par_sig2[0] = (*(Asig23 + 0))[iETA2];
6936  par_sig2[1] = (*(Asig23 + 1))[iETA2];
6937  par_sig2[2] = (*(Asig23 + 2))[iETA2];
6938  par_sig2[3] = (*(Asig23 + 3))[iETA2];
6939 
6940  break;
6941  case 3: //1-2-4
6942  if (iETA < 3)
6943  iETA2 = 3;
6944  if (fr == 1) {
6945  if (iETA < 3)
6946  iETA1 = 3;
6947  par1[0] = (*(Amean12F + 0))[iETA1];
6948  par1[1] = (*(Amean12F + 1))[iETA1];
6949  par1[2] = (*(Amean12F + 2))[iETA1];
6950  par1[3] = (*(Amean12F + 3))[iETA1];
6951  par_sig1[0] = (*(Asig12F + 0))[iETA1];
6952  par_sig1[1] = (*(Asig12F + 1))[iETA1];
6953  par_sig1[2] = (*(Asig12F + 2))[iETA1];
6954  par_sig1[3] = (*(Asig12F + 3))[iETA1];
6955  par_rho[0] = (*(Arho124F + 0))[iETA2];
6956  par_rho[1] = (*(Arho124F + 1))[iETA2];
6957  par_rho[2] = (*(Arho124F + 2))[iETA2];
6958  par_rho[3] = (*(Arho124F + 3))[iETA2];
6959  par_rho[4] = (*(Arho124F + 4))[iETA2];
6960  }
6961  if (fr == 0) {
6962  if (iETA < 1)
6963  iETA1 = 1;
6964  par1[0] = (*(Amean12R + 0))[iETA1];
6965  par1[1] = (*(Amean12R + 1))[iETA1];
6966  par1[2] = (*(Amean12R + 2))[iETA1];
6967  par1[3] = (*(Amean12R + 3))[iETA1];
6968  par_sig1[0] = (*(Asig12R + 0))[iETA1];
6969  par_sig1[1] = (*(Asig12R + 1))[iETA1];
6970  par_sig1[2] = (*(Asig12R + 2))[iETA1];
6971  par_sig1[3] = (*(Asig12R + 3))[iETA1];
6972  par_rho[0] = (*(Arho124R + 0))[iETA2];
6973  par_rho[1] = (*(Arho124R + 1))[iETA2];
6974  par_rho[2] = (*(Arho124R + 2))[iETA2];
6975  par_rho[3] = (*(Arho124R + 3))[iETA2];
6976  par_rho[4] = (*(Arho124R + 4))[iETA2];
6977  }
6978  par2[0] = (*(Amean24 + 0))[iETA2];
6979  par2[1] = (*(Amean24 + 1))[iETA2];
6980  par2[2] = (*(Amean24 + 2))[iETA2];
6981  par2[3] = (*(Amean24 + 3))[iETA2];
6982  par_sig2[0] = (*(Asig24 + 0))[iETA2];
6983  par_sig2[1] = (*(Asig24 + 1))[iETA2];
6984  par_sig2[2] = (*(Asig24 + 2))[iETA2];
6985  par_sig2[3] = (*(Asig24 + 3))[iETA2];
6986  break;
6987  case 4: //1-3-4
6988  if (iETA < 3)
6989  iETA2 = 3;
6990  if (fr == 1) {
6991  if (iETA < 3)
6992  iETA1 = 3;
6993  par1[0] = (*(Amean13F + 0))[iETA1];
6994  par1[1] = (*(Amean13F + 1))[iETA1];
6995  par1[2] = (*(Amean13F + 2))[iETA1];
6996  par1[3] = (*(Amean13F + 3))[iETA1];
6997  par_sig1[0] = (*(Asig13F + 0))[iETA1];
6998  par_sig1[1] = (*(Asig13F + 1))[iETA1];
6999  par_sig1[2] = (*(Asig13F + 2))[iETA1];
7000  par_sig1[3] = (*(Asig13F + 3))[iETA1];
7001  par_rho[0] = (*(Arho134F + 0))[iETA2];
7002  par_rho[1] = (*(Arho134F + 1))[iETA2];
7003  par_rho[2] = (*(Arho134F + 2))[iETA2];
7004  par_rho[3] = (*(Arho134F + 3))[iETA2];
7005  par_rho[4] = (*(Arho134F + 4))[iETA2];
7006  }
7007  if (fr == 0) {
7008  if (iETA < 3)
7009  iETA1 = 3;
7010  par1[0] = (*(Amean13R + 0))[iETA1];
7011  par1[1] = (*(Amean13R + 1))[iETA1];
7012  par1[2] = (*(Amean13R + 2))[iETA1];
7013  par1[3] = (*(Amean13R + 3))[iETA1];
7014  par_sig1[0] = (*(Asig13R + 0))[iETA1];
7015  par_sig1[1] = (*(Asig13R + 1))[iETA1];
7016  par_sig1[2] = (*(Asig13R + 2))[iETA1];
7017  par_sig1[3] = (*(Asig13R + 3))[iETA1];
7018  par_rho[0] = (*(Arho134R + 0))[iETA2];
7019  par_rho[1] = (*(Arho134R + 1))[iETA2];
7020  par_rho[2] = (*(Arho134R + 2))[iETA2];
7021  par_rho[3] = (*(Arho134R + 3))[iETA2];
7022  par_rho[4] = (*(Arho134R + 4))[iETA2];
7023  }
7024  par2[0] = (*(Amean34 + 0))[iETA2];
7025  par2[1] = (*(Amean34 + 1))[iETA2];
7026  par2[2] = (*(Amean34 + 2))[iETA2];
7027  par2[3] = (*(Amean34 + 3))[iETA2];
7028  par_sig2[0] = (*(Asig34 + 0))[iETA2];
7029  par_sig2[1] = (*(Asig34 + 1))[iETA2];
7030  par_sig2[2] = (*(Asig34 + 2))[iETA2];
7031  par_sig2[3] = (*(Asig34 + 3))[iETA2];
7032  break;
7033  case 5: //2-3-4
7034  if (iETA < 2)
7035  iETA1 = 2;
7036  if (iETA < 3)
7037  iETA2 = 3;
7038  par1[0] = (*(Amean23 + 0))[iETA1];
7039  par1[1] = (*(Amean23 + 1))[iETA1];
7040  par1[2] = (*(Amean23 + 2))[iETA1];
7041  par1[3] = (*(Amean23 + 3))[iETA1];
7042  par_sig1[0] = (*(Asig23 + 0))[iETA1];
7043  par_sig1[1] = (*(Asig23 + 1))[iETA1];
7044  par_sig1[2] = (*(Asig23 + 2))[iETA1];
7045  par_sig1[3] = (*(Asig23 + 3))[iETA1];
7046  par_rho[0] = (*(Arho234 + 0))[iETA2];
7047  par_rho[1] = (*(Arho234 + 1))[iETA2];
7048  par_rho[2] = (*(Arho234 + 2))[iETA2];
7049  par_rho[3] = (*(Arho234 + 3))[iETA2];
7050  par_rho[4] = (*(Arho234 + 4))[iETA2];
7051 
7052  par2[0] = (*(Amean34 + 0))[iETA2];
7053  par2[1] = (*(Amean34 + 1))[iETA2];
7054  par2[2] = (*(Amean34 + 2))[iETA2];
7055  par2[3] = (*(Amean34 + 3))[iETA2];
7056  par_sig2[0] = (*(Asig34 + 0))[iETA2];
7057  par_sig2[1] = (*(Asig34 + 1))[iETA2];
7058  par_sig2[2] = (*(Asig34 + 2))[iETA2];
7059  par_sig2[3] = (*(Asig34 + 3))[iETA2];
7060  break;
7061  case 11: // singles for method < 10, for method > 10: fr = 1 -> b1-1-3, fr = 0 -> b1-3-phiBend
7062  if (iETA != 2)
7063  iETA1 = 2;
7064  par1[0] = (*(Amean53 + 0))[iETA1];
7065  par1[1] = (*(Amean53 + 1))[iETA1];
7066  par1[2] = (*(Amean53 + 2))[iETA1];
7067  par1[3] = (*(Amean53 + 3))[iETA1];
7068  par_sig1[0] = (*(Asig53 + 0))[iETA1];
7069  par_sig1[1] = (*(Asig53 + 1))[iETA1];
7070  par_sig1[2] = (*(Asig53 + 2))[iETA1];
7071  par_sig1[3] = (*(Asig53 + 3))[iETA1];
7072  par_rho[0] = (*(Arho53B + 0))[iETA1];
7073  par_rho[1] = (*(Arho53B + 1))[iETA1];
7074  par_rho[2] = (*(Arho53B + 2))[iETA1];
7075  par_rho[3] = (*(Arho53B + 3))[iETA1];
7076  par_rho[4] = (*(Arho53B + 4))[iETA1];
7077 
7078  par2[0] = (*(Amean5 + 0))[iETA1];
7079  par2[1] = (*(Amean5 + 1))[iETA1];
7080  par2[2] = (*(Amean5 + 2))[iETA1];
7081  par2[3] = (*(Amean5 + 3))[iETA1];
7082  par_sig2[0] = (*(Asig5 + 0))[iETA1];
7083  par_sig2[1] = (*(Asig5 + 1))[iETA1];
7084  par_sig2[2] = (*(Asig5 + 2))[iETA1];
7085  par_sig2[3] = (*(Asig5 + 3))[iETA1];
7086 
7087  if (fr == 1) {
7088  par1[0] = (*(Amean51 + 0))[iETA1];
7089  par1[1] = (*(Amean51 + 1))[iETA1];
7090  par1[2] = (*(Amean51 + 2))[iETA1];
7091  par1[3] = (*(Amean51 + 3))[iETA1];
7092  par_sig1[0] = (*(Asig51 + 0))[iETA1];
7093  par_sig1[1] = (*(Asig51 + 1))[iETA1];
7094  par_sig1[2] = (*(Asig51 + 2))[iETA1];
7095  par_sig1[3] = (*(Asig51 + 3))[iETA1];
7096  par_rho[0] = (*(Arho513 + 0))[iETA1];
7097  par_rho[1] = (*(Arho513 + 1))[iETA1];
7098  par_rho[2] = (*(Arho513 + 2))[iETA1];
7099  par_rho[3] = (*(Arho513 + 3))[iETA1];
7100  par_rho[4] = (*(Arho513 + 4))[iETA1];
7101 
7102  par2[0] = (*(Amean13R + 0))[iETA1];
7103  par2[1] = (*(Amean13R + 1))[iETA1];
7104  par2[2] = (*(Amean13R + 2))[iETA1];
7105  par2[3] = (*(Amean13R + 3))[iETA1];
7106  par_sig2[0] = (*(Asig13R + 0))[iETA1];
7107  par_sig2[1] = (*(Asig13R + 1))[iETA1];
7108  par_sig2[2] = (*(Asig13R + 2))[iETA1];
7109  par_sig2[3] = (*(Asig13R + 3))[iETA1];
7110  }
7111  break;
7112  case 12: // b1-1-2 for method < 10; for method > 10: fr = 1 -> b1-2-3, fr = 0 -> b1-2-phiBend
7113  if (iETA < 1)
7114  iETA1 = 1;
7115  if (iETA > 2)
7116  iETA1 = 2;
7117  par1[0] = (*(Amean52 + 0))[iETA1];
7118  par1[1] = (*(Amean52 + 1))[iETA1];
7119  par1[2] = (*(Amean52 + 2))[iETA1];
7120  par1[3] = (*(Amean52 + 3))[iETA1];
7121  par_sig1[0] = (*(Asig52 + 0))[iETA1];
7122  par_sig1[1] = (*(Asig52 + 1))[iETA1];
7123  par_sig1[2] = (*(Asig52 + 2))[iETA1];
7124  par_sig1[3] = (*(Asig52 + 3))[iETA1];
7125  par_rho[0] = (*(Arho52B + 0))[iETA1];
7126  par_rho[1] = (*(Arho52B + 1))[iETA1];
7127  par_rho[2] = (*(Arho52B + 2))[iETA1];
7128  par_rho[3] = (*(Arho52B + 3))[iETA1];
7129  par_rho[4] = (*(Arho52B + 4))[iETA1];
7130 
7131  par2[0] = (*(Amean5 + 0))[iETA1];
7132  par2[1] = (*(Amean5 + 1))[iETA1];
7133  par2[2] = (*(Amean5 + 2))[iETA1];
7134  par2[3] = (*(Amean5 + 3))[iETA1];
7135  par_sig2[0] = (*(Asig5 + 0))[iETA1];
7136  par_sig2[1] = (*(Asig5 + 1))[iETA1];
7137  par_sig2[2] = (*(Asig5 + 2))[iETA1];
7138  par_sig2[3] = (*(Asig5 + 3))[iETA1];
7139 
7140  if (fr == 1) {
7141  if (iETA != 2)
7142  iETA1 = 2;
7143  par1[0] = (*(Amean52 + 0))[iETA1];
7144  par1[1] = (*(Amean52 + 1))[iETA1];
7145  par1[2] = (*(Amean52 + 2))[iETA1];
7146  par1[3] = (*(Amean52 + 3))[iETA1];
7147  par_sig1[0] = (*(Asig52 + 0))[iETA1];
7148  par_sig1[1] = (*(Asig52 + 1))[iETA1];
7149  par_sig1[2] = (*(Asig52 + 2))[iETA1];
7150  par_sig1[3] = (*(Asig52 + 3))[iETA1];
7151  par_rho[0] = (*(Arho523 + 0))[iETA1];
7152  par_rho[1] = (*(Arho523 + 1))[iETA1];
7153  par_rho[2] = (*(Arho523 + 2))[iETA1];
7154  par_rho[3] = (*(Arho523 + 3))[iETA1];
7155  par_rho[4] = (*(Arho523 + 4))[iETA1];
7156 
7157  par2[0] = (*(Amean23 + 0))[iETA1];
7158  par2[1] = (*(Amean23 + 1))[iETA1];
7159  par2[2] = (*(Amean23 + 2))[iETA1];
7160  par2[3] = (*(Amean23 + 3))[iETA1];
7161  par_sig2[0] = (*(Asig23 + 0))[iETA1];
7162  par_sig2[1] = (*(Asig23 + 1))[iETA1];
7163  par_sig2[2] = (*(Asig23 + 2))[iETA1];
7164  par_sig2[3] = (*(Asig23 + 3))[iETA1];
7165  }
7166  break;
7167  case 14: // b1-2 for method < 10; for method > 10: fr = 1 -> b1-1-2-(3), fr = 0 -> b1-1-phiBend
7168  if (iETA > 2)
7169  iETA1 = 2;
7170  par1[0] = (*(Amean51 + 0))[iETA1];
7171  par1[1] = (*(Amean51 + 1))[iETA1];
7172  par1[2] = (*(Amean51 + 2))[iETA1];
7173  par1[3] = (*(Amean51 + 3))[iETA1];
7174  par_sig1[0] = (*(Asig51 + 0))[iETA1];
7175  par_sig1[1] = (*(Asig51 + 1))[iETA1];
7176  par_sig1[2] = (*(Asig51 + 2))[iETA1];
7177  par_sig1[3] = (*(Asig51 + 3))[iETA1];
7178  par_rho[0] = (*(Arho51B + 0))[iETA1];
7179  par_rho[1] = (*(Arho51B + 1))[iETA1];
7180  par_rho[2] = (*(Arho51B + 2))[iETA1];
7181  par_rho[3] = (*(Arho51B + 3))[iETA1];
7182  par_rho[4] = (*(Arho51B + 4))[iETA1];
7183 
7184  par2[0] = (*(Amean5 + 0))[iETA1];
7185  par2[1] = (*(Amean5 + 1))[iETA1];
7186  par2[2] = (*(Amean5 + 2))[iETA1];
7187  par2[3] = (*(Amean5 + 3))[iETA1];
7188  par_sig2[0] = (*(Asig5 + 0))[iETA1];
7189  par_sig2[1] = (*(Asig5 + 1))[iETA1];
7190  par_sig2[2] = (*(Asig5 + 2))[iETA1];
7191  par_sig2[3] = (*(Asig5 + 3))[iETA1];
7192 
7193  if (fr == 1) {
7194  if (iETA < 1)
7195  iETA1 = 1;
7196  if (iETA > 2)
7197  iETA1 = 2;
7198  par1[0] = (*(Amean51 + 0))[iETA1];
7199  par1[1] = (*(Amean51 + 1))[iETA1];
7200  par1[2] = (*(Amean51 + 2))[iETA1];
7201  par1[3] = (*(Amean51 + 3))[iETA1];
7202  par_sig1[0] = (*(Asig51 + 0))[iETA1];
7203  par_sig1[1] = (*(Asig51 + 1))[iETA1];
7204  par_sig1[2] = (*(Asig51 + 2))[iETA1];
7205  par_sig1[3] = (*(Asig51 + 3))[iETA1];
7206  par_rho[0] = (*(Arho512 + 0))[iETA1];
7207  par_rho[1] = (*(Arho512 + 1))[iETA1];
7208  par_rho[2] = (*(Arho512 + 2))[iETA1];
7209  par_rho[3] = (*(Arho512 + 3))[iETA1];
7210  par_rho[4] = (*(Arho512 + 4))[iETA1];
7211 
7212  par2[0] = (*(Amean12R + 0))[iETA1];
7213  par2[1] = (*(Amean12R + 1))[iETA1];
7214  par2[2] = (*(Amean12R + 2))[iETA1];
7215  par2[3] = (*(Amean12R + 3))[iETA1];
7216  par_sig2[0] = (*(Asig12R + 0))[iETA1];
7217  par_sig2[1] = (*(Asig12R + 1))[iETA1];
7218  par_sig2[2] = (*(Asig12R + 2))[iETA1];
7219  par_sig2[3] = (*(Asig12R + 3))[iETA1];
7220  }
7221  break;
7222  //default:
7223  //return 0.0;
7224  }
7225 
7226  // Switch to 2-Station measurement if dphi is too small
7227  // box cut around Pt of 10 GeV
7228  if ((fabs(static_cast<double>(dphi2)) < 0.004 && type != 12 && method < 25) ||
7229  (fabs(static_cast<double>(dphi2)) < 0.004 && type != 12 && type != 14 && type != 11 && method >= 25)) {
7230  //if(type == 12 || type == 14 || type == 11) std::cout << "mode = " << type << " dphi23 = " << dphi2 << " method = " << method << std::endl; //test
7231  if (type == 2 || type == 3)
7232  type = 6; // 1-2-3(or 4) -> 1-2
7233  if (type == 4)
7234  type = 7; // 1-3-4 -> 1-3
7235  if (type == 5)
7236  type = 8; // 2-3-4 -> 2-3
7237  if (type == 11)
7238  type = 14; // b1-1-3 -> b1-1 for pt_method > 10
7239  //if(type == 14) type = 11;
7240  //phiSign
7241  Pt = Pt2Stn2011(type,
7242  eta,
7243  dphi1,
7244  fr,
7245  method,
7246  int(2)); //in 3 station track there is no information to which ME1/1 or ME1/2 track belong
7247  } else {
7248  //************* solve equation dLog(Likelihood)/dpt = 0 for muon + ;
7249  double pt = 140;
7250  double dpt = 0.1;
7251  double step = 5.;
7252  while (pt > 2.) {
7253  double par_phi12[1] = {dphi1};
7254  double par_phi23[1] = {dphi2};
7255  double v[1], lpt1_1, lpt1_2, lpt2_1, lpt2_2;
7256  lpt1_1 = Likelihood2011(par_phi12, par_phi23, par1, par2, par_sig1, par_sig2, par_rho, v);
7257  v[0] = pt + dpt;
7258  lpt1_2 = Likelihood2011(par_phi12, par_phi23, par1, par2, par_sig1, par_sig2, par_rho, v);
7259  double lpt1 = (lpt1_2 - lpt1_1) / dpt; // derivative at point pt1 = pt
7260  v[0] = pt - step;
7261  lpt2_1 = Likelihood2011(par_phi12, par_phi23, par1, par2, par_sig1, par_sig2, par_rho, v);
7262  v[0] = pt - step + dpt;
7263  lpt2_2 = Likelihood2011(par_phi12, par_phi23, par1, par2, par_sig1, par_sig2, par_rho, v);
7264  double lpt2 = (lpt2_2 - lpt2_1) / dpt; // derivative at point pt1 = pt - step
7265  // calculate 2nd derivative at point pt-0.5*step, it should be > 0 if minimum
7266  v[0] = pt - 0.5 * step;
7267  double fx = Likelihood2011(par_phi12, par_phi23, par1, par2, par_sig1, par_sig2, par_rho, v);
7268  v[0] = pt - 0.5 * step + dpt;
7269  double fxh = Likelihood2011(par_phi12, par_phi23, par1, par2, par_sig1, par_sig2, par_rho, v);
7270  v[0] = pt - 0.5 * step + 2 * dpt;
7271  double fx2h = Likelihood2011(par_phi12, par_phi23, par1, par2, par_sig1, par_sig2, par_rho, v);
7272 
7273  double lpt2nd = -(fx2h + fx - 2 * fxh) / dpt / dpt;
7274 
7275  if (lpt1 * lpt2 <= 0 && lpt2nd > 0) {
7276  PTsolv = pt - 0.5 * step;
7277  break;
7278  } // lpt = 0 between lpt1 and lpt2 => maximum pt_solv is a solution of the likelihood
7279  //double rho = fitfrho(v, par_rho); //rho
7280  if (pt > 25) {
7281  dpt = 0.1;
7282  step = 5.;
7283  } else if (pt <= 25) {
7284  dpt = 0.01;
7285  step = 0.5;
7286  }
7287  pt = pt - step;
7288  } // end while
7289  //*********** end solve equation for muon plus
7290  //************* solve equation dLog(Likelihood)/dpt = 0 for muon minus ;
7291  // for one station method we know sing of muon: dphi1 > 0 for muon minus!!! => dphi1 = -dphi1 < 0
7292  dphi1 = -dphi1;
7293  dphi2 = -dphi2;
7294  pt = 140;
7295  dpt = 0.1;
7296  step = 5.;
7297  while (pt > 2.) {
7298  double par_phi12[1] = {dphi1};
7299  double par_phi23[1] = {dphi2};
7300  double v[1], lpt1_1, lpt1_2, lpt2_1, lpt2_2;
7301  v[0] = pt;
7302  lpt1_1 = Likelihood2011(par_phi12, par_phi23, par1, par2, par_sig1, par_sig2, par_rho, v);
7303  v[0] = pt + dpt;
7304  lpt1_2 = Likelihood2011(par_phi12, par_phi23, par1, par2, par_sig1, par_sig2, par_rho, v);
7305  double lpt1 = (lpt1_2 - lpt1_1) / dpt; // derivative at point pt1 = pt
7306  v[0] = pt - step;
7307  lpt2_1 = Likelihood2011(par_phi12, par_phi23, par1, par2, par_sig1, par_sig2, par_rho, v);
7308  v[0] = pt - step + dpt;
7309  lpt2_2 = Likelihood2011(par_phi12, par_phi23, par1, par2, par_sig1, par_sig2, par_rho, v);
7310  double lpt2 = (lpt2_2 - lpt2_1) / dpt; // derivative at point pt1 = pt - step
7311  // calculate 2nd derivative at point pt-0.5*step, it should be > 0 if minimum
7312  v[0] = pt - 0.5 * step;
7313  double fx = Likelihood2011(par_phi12, par_phi23, par1, par2, par_sig1, par_sig2, par_rho, v);
7314  v[0] = pt - 0.5 * step + dpt;
7315  double fxh = Likelihood2011(par_phi12, par_phi23, par1, par2, par_sig1, par_sig2, par_rho, v);
7316  v[0] = pt - 0.5 * step + 2 * dpt;
7317  double fx2h = Likelihood2011(par_phi12, par_phi23, par1, par2, par_sig1, par_sig2, par_rho, v);
7318 
7319  double lpt2nd = -(fx2h + fx - 2 * fxh) / dpt / dpt;
7320 
7321  if (lpt1 * lpt2 <= 0 && lpt2nd > 0) {
7322  PTsolvMinus = pt - 0.5 * step;
7323  break;
7324  } // lpt = 0 between lpt1 and lpt2 => maximum pt_solv is a solution of the likelihood
7325  //double rho = fitfrho(v, par_rho); //rho
7326  if (pt > 25) {
7327  dpt = 0.1;
7328  step = 5.;
7329  } else if (pt <= 25) {
7330  dpt = 0.01;
7331  step = 0.5;
7332  }
7333  pt = pt - step;
7334  } // end while
7335  //*********** end solve equation for muon minus
7336  PTsolv = (PTsolv > PTsolvMinus)
7337  ? PTsolv
7338  : PTsolvMinus; // select Maximum solution from muon plus and moun minus hypotesis
7339  PTsolv = PTsolv * 1.2; // correction to have 90% efficiency for trigger cuts
7340  if (PTsolv > 137.5)
7341  PTsolv = 137.5;
7342  //if(fabs(dphi1) < 0.002 && fabs(dphi2) <= CutPhi23){PTsolv = 140;}
7343  dphi1 = -dphi1; //return to correct sing dphi
7344  dphi2 = -dphi2; //return to correct sing dphi
7345  Pt = PTsolv;
7346  } // end 2 or 3 station method
7347  }
7348  }
7349  // fix overlap region high pt:
7350  if (method >= 25 && (type == 12 || type == 14 || type == 11) && fabs(dphi1) < 0.003 && fabs(dphi2) < 2)
7351  Pt = 140.;
7352  // if ( fabs(static_cast<double>(dphi2))>0.004 ) std::cout << "Pt = " << Pt << " Mode = " << type << " dphi1 = " << dphi1 << " dphi2 = " << dphi2 << std::endl;
7353 
7354  //float Pt_min = trigger_scale->getPtScale()->getLowEdge(1);// 0 GeV
7355  //if(method > 10) Pt_min = trigger_scale->getPtScale()->getLowEdge(3);// 2 GeV
7356  float Pt_min = 2; // 2 GeV
7357 
7358  return (Pt > Pt_min) ? Pt : Pt_min;
7359 }
static const double AB_sig24[4][15]
static const double AB_sig52[4][15]
static const double AB_mu12R[4][15]
static const double AB_rho523[5][15]
static const double AB_sig13F[4][15]
static const double AB_mu24[4][15]
static const double AB_mu52[4][15]
static const double AB_rho513[5][15]
static const double AB_mu51[4][15]
static const double AB_mu23[4][15]
static const double AB_sig12R[4][15]
static const double AB_sig51[4][15]
static const double AB_sig53[4][15]
static const double AB_rho512[5][15]
static const double AB_mu13R[4][15]
static const double AB_rho134F[5][15]
double Likelihood2011(double *phi12, double *phi23, double *par_m12, double *par_m23, double *par_sig12, double *par_sig23, double *par_rho, double *v) const
static const double AB_sig34[4][15]
static const double AB_rho52B[5][15]
float Pt2Stn2011(int type, float eta, float dphi, int fr=-1, int method=11, int phiSign=2) const
static const double AB_sig5[4][15]
static const double AB_rho124F[5][15]
static const double AB_rho124R[5][15]
static const double AB_mu13F[4][15]
static const double AB_rho53B[5][15]
static const double AB_sig13R[4][15]
static const double AB_mu5[4][15]
static const double AB_mu53[4][15]
static const double AB_rho234[5][15]
static const double AB_sig23[4][15]
static const double AB_rho134R[5][15]
static const double AB_mu34[4][15]
step
Definition: StallMonitor.cc:83
static const double AB_rho123F[5][15]
static const double AB_sig12F[4][15]
static const double AB_rho51B[5][15]
static const double AB_mu12F[4][15]
static const double AB_rho123R[5][15]
static const float etabins[16]

◆ Pt3Stn2012()

float CSCTFPtMethods::Pt3Stn2012 ( int  type,
float  eta,
float  dphi1,
float  dphi2,
int  PtbyMLH,
float &  theLH,
int  fr = -1,
int  method = 11 
) const

Definition at line 7673 of file CSCTFPtMethods.cc.

References A_mu12Front, A_mu12Rare, A_mu13Front, A_mu13Rare, A_mu23, A_mu24, A_mu34, A_mu51, A_mu52, A_rho123FrontCSCTF, A_rho123RareCSCTF, A_rho124FrontCSCTF, A_rho124RareCSCTF, A_rho134FrontCSCTF, A_rho134RareCSCTF, A_rho234CSCTF, A_rho512, A_rho513, A_rho523, A_sig12Front, A_sig12Rare, A_sig13Front, A_sig13Rare, A_sig23, A_sig24, A_sig34, A_sig51, A_sig52, PVValHelper::eta, etabins, L1MuScale::getLowEdge(), L1MuTriggerPtScale::getPtScale(), Likelihood(), AlcaSiPixelAliHarvester0T_cff::method, pfMETCorrectionType0_cfi::par1, pfMETCorrectionType0_cfi::par2, DiDispStaMuonMonitor_cfi::pt, Pt2Stn2012(), HLT_2024v12_cff::Pt_min, trigger_scale, and findQualityFiles::v.

Referenced by CSCTFPtLUT::calcPt().

7674  {
7675  int useBestMLH = PtbyMLH;
7676  int use2Stn = false;
7677  int use2StnDT = true;
7678  if (type == 5)
7679  use2Stn = true; //switch 2 station assighment for mode = 5
7680 
7681  if (fabs(eta) >= 2.4)
7682  eta = 2.35;
7683  float Pt = 0.;
7684  double PTsolv = 1.; // for muon plus hypothesis
7685  double PTsolvMinus = 1.; //for muon minus hypothesis
7686  for (int iETA = 0; iETA < 15; iETA++) {
7687  if (fabs(eta) >= etabins[iETA] && fabs(eta) < etabins[iETA + 1]) {
7688  // calculate curvers of mean and sigma
7689  // calculate phi12 mean
7690  double par1[4] = {0., 0., 0., 0.};
7691  //double phi12mean = fitf5(v, par1); //mu12
7692  double par_sig1[3] = {0., 0., 0.};
7693  // calculate phi23 mean
7694  double par2[4] = {0., 0., 0., 0.};
7695  // calculate phi23 sig
7696  double par_sig2[3] = {0., 0., 0.};
7697  // calculate correlation rho
7698  double par_rho[5] = {0., 0., 0., 0., 0.};
7699  int iETA1 = iETA;
7700  int iETA2 = iETA;
7701  switch (type) // type = mode here
7702  {
7703  case 2: //1-2-3
7704  if (fr == 1) {
7705  if (iETA1 < 3)
7706  iETA1 = 3;
7707  //if(iETA1 > 11)iETA1 = 11;
7708  //if(fabs(eta)>1.56 && fabs(eta) < 1.6) iETA1 = iETA +1;
7709  par1[0] = A_mu12Front[0][iETA1];
7710  par1[1] = A_mu12Front[1][iETA1];
7711  par1[2] = A_mu12Front[2][iETA1];
7712  par1[3] = A_mu12Front[3][iETA1];
7713  par_sig1[0] = A_sig12Front[0][iETA1];
7714  par_sig1[1] = A_sig12Front[1][iETA1];
7715  par_sig1[2] = A_sig12Front[2][iETA1];
7716  par_rho[0] = A_rho123FrontCSCTF[0][iETA1];
7717  par_rho[1] = A_rho123FrontCSCTF[1][iETA1];
7718  par_rho[2] = A_rho123FrontCSCTF[2][iETA1];
7719  par_rho[3] = A_rho123FrontCSCTF[3][iETA1];
7720  par_rho[4] = A_rho123FrontCSCTF[4][iETA1];
7721  }
7722  if (fr == 0) {
7723  if (iETA1 < 1)
7724  iETA1 = 1;
7725  //if(iETA1 > 11)iETA1 = 11;
7726  //if(fabs(eta)>1.56 && fabs(eta) < 1.6) iETA1 = iETA +1;
7727  par1[0] = A_mu12Rare[0][iETA1];
7728  par1[1] = A_mu12Rare[1][iETA1];
7729  par1[2] = A_mu12Rare[2][iETA1];
7730  par1[3] = A_mu12Rare[3][iETA1];
7731  par_sig1[0] = A_sig12Rare[0][iETA1];
7732  par_sig1[1] = A_sig12Rare[1][iETA1];
7733  par_sig1[2] = A_sig12Rare[2][iETA1];
7734  par_rho[0] = A_rho123RareCSCTF[0][iETA1];
7735  par_rho[1] = A_rho123RareCSCTF[1][iETA1];
7736  par_rho[2] = A_rho123RareCSCTF[2][iETA1];
7737  par_rho[3] = A_rho123RareCSCTF[3][iETA1];
7738  par_rho[4] = A_rho123RareCSCTF[4][iETA1];
7739  }
7740  if (iETA2 < 2)
7741  iETA2 = 2;
7742  par2[0] = A_mu23[0][iETA2];
7743  par2[1] = A_mu23[1][iETA2];
7744  par2[2] = A_mu23[2][iETA2];
7745  par2[3] = A_mu23[3][iETA2];
7746  par_sig2[0] = A_sig23[0][iETA2];
7747  par_sig2[1] = A_sig23[1][iETA2];
7748  par_sig2[2] = A_sig23[2][iETA2];
7749 
7750  break;
7751  case 3: //1-2-4
7752  if (fr == 1) {
7753  if (iETA1 < 3)
7754  iETA1 = 3;
7755  //if(iETA1 > 11)iETA1 = 11;
7756  par1[0] = A_mu12Front[0][iETA1];
7757  par1[1] = A_mu12Front[1][iETA1];
7758  par1[2] = A_mu12Front[2][iETA1];
7759  par1[3] = A_mu12Front[3][iETA1];
7760  par_sig1[0] = A_sig12Front[0][iETA1];
7761  par_sig1[1] = A_sig12Front[1][iETA1];
7762  par_sig1[2] = A_sig12Front[2][iETA1];
7763  par_rho[0] = A_rho124FrontCSCTF[0][iETA1];
7764  par_rho[1] = A_rho124FrontCSCTF[1][iETA1];
7765  par_rho[2] = A_rho124FrontCSCTF[2][iETA1];
7766  par_rho[3] = A_rho124FrontCSCTF[3][iETA1];
7767  par_rho[4] = A_rho124FrontCSCTF[4][iETA1];
7768  }
7769  if (fr == 0) {
7770  if (iETA1 < 1)
7771  iETA1 = 1;
7772  //if(iETA1 > 11)iETA1 = 11;
7773  par1[0] = A_mu12Rare[0][iETA1];
7774  par1[1] = A_mu12Rare[1][iETA1];
7775  par1[2] = A_mu12Rare[2][iETA1];
7776  par1[3] = A_mu12Rare[3][iETA1];
7777  par_sig1[0] = A_sig12Rare[0][iETA1];
7778  par_sig1[1] = A_sig12Rare[1][iETA1];
7779  par_sig1[2] = A_sig12Rare[2][iETA1];
7780  par_rho[0] = A_rho124RareCSCTF[0][iETA1];
7781  par_rho[1] = A_rho124RareCSCTF[1][iETA1];
7782  par_rho[2] = A_rho124RareCSCTF[2][iETA1];
7783  par_rho[3] = A_rho124RareCSCTF[3][iETA1];
7784  par_rho[4] = A_rho124RareCSCTF[4][iETA1];
7785  }
7786  if (iETA2 < 9)
7787  iETA2 = 9;
7788  par2[0] = A_mu24[0][iETA2];
7789  par2[1] = A_mu24[1][iETA2];
7790  par2[2] = A_mu24[2][iETA2];
7791  par2[3] = A_mu24[3][iETA2];
7792  par_sig2[0] = A_sig24[0][iETA2];
7793  par_sig2[1] = A_sig24[1][iETA2];
7794  par_sig2[2] = A_sig24[2][iETA2];
7795  break;
7796  case 4: //1-3-4
7797  if (fr == 1) {
7798  if (iETA1 < 3)
7799  iETA1 = 3;
7800  //if(iETA1 > 11)iETA1 = 11;
7801  par1[0] = A_mu13Front[0][iETA1];
7802  par1[1] = A_mu13Front[1][iETA1];
7803  par1[2] = A_mu13Front[2][iETA1];
7804  par1[3] = A_mu13Front[3][iETA1];
7805  par_sig1[0] = A_sig13Front[0][iETA1];
7806  par_sig1[1] = A_sig13Front[1][iETA1];
7807  par_sig1[2] = A_sig13Front[2][iETA1];
7808  par_rho[0] = A_rho134FrontCSCTF[0][iETA1];
7809  par_rho[1] = A_rho134FrontCSCTF[1][iETA1];
7810  par_rho[2] = A_rho134FrontCSCTF[2][iETA1];
7811  par_rho[3] = A_rho134FrontCSCTF[3][iETA1];
7812  par_rho[4] = A_rho134FrontCSCTF[4][iETA1];
7813  }
7814  if (fr == 0) {
7815  if (iETA1 < 2)
7816  iETA1 = 2;
7817  //if(iETA1 > 11)iETA1 = 11;
7818  par1[0] = A_mu13Rare[0][iETA1];
7819  par1[1] = A_mu13Rare[1][iETA1];
7820  par1[2] = A_mu13Rare[2][iETA1];
7821  par1[3] = A_mu13Rare[3][iETA1];
7822  par_sig1[0] = A_sig13Rare[0][iETA1];
7823  par_sig1[1] = A_sig13Rare[1][iETA1];
7824  par_sig1[2] = A_sig13Rare[2][iETA1];
7825  par_rho[0] = A_rho134RareCSCTF[0][iETA1];
7826  par_rho[1] = A_rho134RareCSCTF[1][iETA1];
7827  par_rho[2] = A_rho134RareCSCTF[2][iETA1];
7828  par_rho[3] = A_rho134RareCSCTF[3][iETA1];
7829  par_rho[4] = A_rho134RareCSCTF[4][iETA1];
7830  }
7831  if (iETA2 < 9)
7832  iETA2 = 9;
7833  par2[0] = A_mu34[0][iETA2];
7834  par2[1] = A_mu34[1][iETA2];
7835  par2[2] = A_mu34[2][iETA2];
7836  par2[3] = A_mu34[3][iETA2];
7837  par_sig2[0] = A_sig34[0][iETA2];
7838  par_sig2[1] = A_sig34[1][iETA2];
7839  par_sig2[2] = A_sig34[2][iETA2];
7840  break;
7841  case 5: //2-3-4
7842  if (iETA1 < 9)
7843  iETA1 = 9;
7844  par1[0] = A_mu23[0][iETA1];
7845  par1[1] = A_mu23[1][iETA1];
7846  par1[2] = A_mu23[2][iETA1];
7847  par1[3] = A_mu23[3][iETA1];
7848  par_sig1[0] = A_sig23[0][iETA1];
7849  par_sig1[1] = A_sig23[1][iETA1];
7850  par_sig1[2] = A_sig23[2][iETA1];
7851  par_rho[0] = A_rho234CSCTF[0][iETA1];
7852  par_rho[1] = A_rho234CSCTF[1][iETA1];
7853  par_rho[2] = A_rho234CSCTF[2][iETA1];
7854  par_rho[3] = A_rho234CSCTF[3][iETA1];
7855  par_rho[4] = A_rho234CSCTF[4][iETA1];
7856 
7857  par2[0] = A_mu34[0][iETA1];
7858  par2[1] = A_mu34[1][iETA1];
7859  par2[2] = A_mu34[2][iETA1];
7860  par2[3] = A_mu34[3][iETA1];
7861  par_sig2[0] = A_sig34[0][iETA1];
7862  par_sig2[1] = A_sig34[1][iETA1];
7863  par_sig2[2] = A_sig34[2][iETA1];
7864  break;
7865  case 11: // b1-1-3
7866  if (iETA1 != 2)
7867  iETA1 = 2;
7868  par1[0] = A_mu51[0][iETA1];
7869  par1[1] = A_mu51[1][iETA1];
7870  par1[2] = A_mu51[2][iETA1];
7871  par1[3] = A_mu51[3][iETA1];
7872  par_sig1[0] = A_sig51[0][iETA1];
7873  par_sig1[1] = A_sig51[1][iETA1];
7874  par_sig1[2] = A_sig51[2][iETA1];
7875  par_rho[0] = A_rho513[0][iETA1];
7876  par_rho[1] = A_rho513[0][iETA1];
7877  par_rho[2] = A_rho513[0][iETA1];
7878  par_rho[3] = A_rho513[0][iETA1];
7879  par_rho[4] = A_rho513[0][iETA1];
7880 
7881  par2[0] = A_mu13Rare[0][iETA1];
7882  par2[1] = A_mu13Rare[1][iETA1];
7883  par2[2] = A_mu13Rare[2][iETA1];
7884  par2[3] = A_mu13Rare[3][iETA1];
7885  par_sig2[0] = A_sig13Rare[0][iETA1];
7886  par_sig2[1] = A_sig13Rare[1][iETA1];
7887  par_sig2[2] = A_sig13Rare[2][iETA1];
7888  break;
7889  case 12: // b1-2-3
7890  if (iETA1 != 2)
7891  iETA1 = 2;
7892  par1[0] = A_mu52[0][iETA1];
7893  par1[1] = A_mu52[1][iETA1];
7894  par1[2] = A_mu52[2][iETA1];
7895  par1[3] = A_mu52[3][iETA1];
7896  par_sig1[0] = A_sig52[0][iETA1];
7897  par_sig1[1] = A_sig52[1][iETA1];
7898  par_sig1[2] = A_sig52[2][iETA1];
7899  par_rho[0] = A_rho523[0][iETA1];
7900  par_rho[1] = A_rho523[0][iETA1];
7901  par_rho[2] = A_rho523[0][iETA1];
7902  par_rho[3] = A_rho523[0][iETA1];
7903  par_rho[4] = A_rho523[0][iETA1];
7904 
7905  par2[0] = A_mu23[0][iETA1];
7906  par2[1] = A_mu23[1][iETA1];
7907  par2[2] = A_mu23[2][iETA1];
7908  par2[3] = A_mu23[3][iETA1];
7909  par_sig2[0] = A_sig23[0][iETA1];
7910  par_sig2[1] = A_sig23[1][iETA1];
7911  par_sig2[2] = A_sig23[2][iETA1];
7912  break;
7913  case 14: // b1-1-2-(3)
7914  if (iETA1 < 1)
7915  iETA1 = 1;
7916  if (iETA1 > 2)
7917  iETA1 = 2;
7918  par1[0] = A_mu51[0][iETA1];
7919  par1[1] = A_mu51[1][iETA1];
7920  par1[2] = A_mu51[2][iETA1];
7921  par1[3] = A_mu51[3][iETA1];
7922  par_sig1[0] = A_sig51[0][iETA1];
7923  par_sig1[1] = A_sig51[1][iETA1];
7924  par_sig1[2] = A_sig51[2][iETA1];
7925  par_rho[0] = A_rho512[0][iETA1];
7926  par_rho[1] = A_rho512[0][iETA1];
7927  par_rho[2] = A_rho512[0][iETA1];
7928  par_rho[3] = A_rho512[0][iETA1];
7929  par_rho[4] = A_rho512[0][iETA1];
7930 
7931  par2[0] = A_mu12Rare[0][iETA1];
7932  par2[1] = A_mu12Rare[1][iETA1];
7933  par2[2] = A_mu12Rare[2][iETA1];
7934  par2[3] = A_mu12Rare[3][iETA1];
7935  par_sig2[0] = A_sig12Rare[0][iETA1];
7936  par_sig2[1] = A_sig12Rare[1][iETA1];
7937  par_sig2[2] = A_sig12Rare[2][iETA1];
7938  break;
7939  //default:
7940  //return 0.0;
7941  }
7942 
7943  // Switch to 2-Station measurement if dphi is too small
7944  // box cut around Pt of 10 GeV
7945  if (fabs(static_cast<double>(dphi2)) < 0.004 &&
7946  ((type >= 11 && use2StnDT) || (type >= 2 && type <= 5 && use2Stn))) {
7947  if (use2Stn) {
7948  if (type == 2 || type == 3)
7949  type = 6; // 1-2-3(or 4) -> 1-2
7950  if (type == 4)
7951  type = 7; // 1-3-4 -> 1-3
7952  Pt = Pt2Stn2012(type, eta, dphi1, useBestMLH, bestLH, fr, method);
7953  }
7954  if (use2StnDT) {
7955  if (type == 11)
7956  type = 14; // b1-1-3 -> b1-1 for pt_method > 10
7957  Pt = Pt2Stn2012(type, eta, dphi1, useBestMLH, bestLH, fr, method);
7958  }
7959  } else {
7960  //************* solve equation dLog(Likelihood)/dpt = 0 for muon + ;
7961  double muPlusMaxLH = -1e9;
7962  double pt = 140;
7963  double step = 5.;
7964  double maxLH = -1e9;
7965 
7966  while (pt > 2.) {
7967  double par_phi12[1] = {dphi1};
7968  double par_phi23[1] = {dphi2};
7969  double v[1], lpt1_1;
7970  v[0] = pt;
7971  lpt1_1 = Likelihood(par_phi12, par_phi23, par1, par2, par_sig1, par_sig2, par_rho, v);
7972 
7973  if (lpt1_1 > maxLH) {
7974  maxLH = lpt1_1;
7975  PTsolv = pt;
7976  }
7977 
7978  if (pt <= 5) {
7979  step = 0.5 / 4.0;
7980  } else if (pt <= 10) {
7981  step = 1.0 / 4.0;
7982  } else if (pt <= 20) {
7983  step = 2.0 / 4.0;
7984  } else if (pt <= 50) {
7985  step = 5.0 / 4.0;
7986  } else if (pt <= 100) {
7987  step = 10.0 / 4.0;
7988  }
7989  pt = pt - step;
7990  } // end while
7991  muPlusMaxLH = maxLH;
7992 
7993  //*********** end solve equation for muon plus
7994  //************* solve equation dLog(Likelihood)/dpt = 0 for muon minus ;
7995  // for one station method we know sing of muon: dphi1 > 0 for muon minus!!! => dphi1 = -dphi1 < 0
7996  double muMinusMaxLH = -1e9;
7997  dphi1 = -dphi1;
7998  dphi2 = -dphi2;
7999  pt = 140;
8000  step = 5.;
8001  maxLH = -1e9;
8002 
8003  while (pt > 2.) {
8004  double par_phi12[1] = {dphi1};
8005  double par_phi23[1] = {dphi2};
8006  double v[1], lpt1_1;
8007  v[0] = pt;
8008  lpt1_1 = Likelihood(par_phi12, par_phi23, par1, par2, par_sig1, par_sig2, par_rho, v);
8009 
8010  if (lpt1_1 > maxLH) {
8011  maxLH = lpt1_1;
8012  PTsolvMinus = pt;
8013  }
8014 
8015  if (pt <= 5) {
8016  step = 0.5 / 4.0;
8017  } else if (pt <= 10) {
8018  step = 1.0 / 4.0;
8019  } else if (pt <= 20) {
8020  step = 2.0 / 4.0;
8021  } else if (pt <= 50) {
8022  step = 5.0 / 4.0;
8023  } else if (pt <= 100) {
8024  step = 10.0 / 4.0;
8025  }
8026  pt = pt - step;
8027  } // end while
8028  muMinusMaxLH = maxLH;
8029 
8030  if (useBestMLH)
8031  PTsolv = (muPlusMaxLH > muMinusMaxLH)
8032  ? PTsolv
8033  : PTsolvMinus; // select Maximum solution from muon plus and moun minus hypotesis
8034  else
8035  PTsolv = (PTsolv > PTsolvMinus)
8036  ? PTsolv
8037  : PTsolvMinus; // select Maximum solution from muon plus and moun minus hypotesis
8038 
8039  bestLH = (muPlusMaxLH > muMinusMaxLH) ? muPlusMaxLH : muMinusMaxLH;
8040  //*********** end solve equation for muon minus
8041 
8042  PTsolv = PTsolv * 1.2; // correction to have 90% efficiency for trigger cuts
8043  if (PTsolv > 137.5)
8044  PTsolv = 137.5;
8045  //if(fabs(dphi1) < 0.002 && fabs(dphi2) <= CutPhi23){PTsolv = 140;}
8046  dphi1 = -dphi1; //return to correct sing dphi
8047  dphi2 = -dphi2; //return to correct sing dphi
8048  Pt = PTsolv;
8049  } // end 2 or 3 station method
8050  }
8051  }
8052  // if ( fabs(static_cast<double>(dphi2))>0.004 ) std::cout << "Pt = " << Pt << " Mode = " << type << " dphi1 = " << dphi1 << " dphi2 = " << dphi2 << std::endl;
8053 
8054  float Pt_min = trigger_scale->getPtScale()->getLowEdge(1); // 0 GeV
8055  if (method > 10)
8056  Pt_min = trigger_scale->getPtScale()->getLowEdge(3); // 2 GeV
8057 
8058  return (Pt > Pt_min) ? Pt : Pt_min;
8059 }
static const double A_rho123RareCSCTF[5][15]
static const double A_sig13Rare[3][15]
static const double A_sig12Front[3][15]
virtual float getLowEdge(unsigned packed) const =0
get the low edge of bin represented by packed
const L1MuTriggerPtScale * trigger_scale
const L1MuScale * getPtScale() const
get the Pt scale
static const double A_sig34[3][15]
double Likelihood(double *phi12, double *phi23, double *par_m12, double *par_m23, double *par_sig12, double *par_sig23, double *par_rho, double *v) const
static const double A_mu24[4][15]
static const double A_sig23[3][15]
static const double A_rho134RareCSCTF[5][15]
static const double A_mu23[4][15]
static const double A_rho512[5][15]
DT correlation.
static const double A_sig12Rare[3][15]
static const double A_sig51[3][15]
static const double A_rho523[5][15]
static const double A_mu52[4][15]
static const double A_mu13Front[4][15]
static const double A_rho134FrontCSCTF[5][15]
static const double A_mu12Rare[4][15]
static const double A_mu13Rare[4][15]
float Pt2Stn2012(int type, float eta, float dphi, int PtbyMLH, float &theLH, int fr=-1, int method=11) const
static const double A_mu12Front[4][15]
static const double A_sig24[3][15]
static const double A_rho234CSCTF[5][15]
static const double A_sig13Front[3][15]
static const double A_mu51[4][15]
static const double A_rho123FrontCSCTF[5][15]
step
Definition: StallMonitor.cc:83
static const double A_rho124FrontCSCTF[5][15]
static const double A_sig52[3][15]
static const double A_rho513[5][15]
static const double A_rho124RareCSCTF[5][15]
static const double A_mu34[4][15]
static const float etabins[16]

◆ Pt3Stn2012_DT()

float CSCTFPtMethods::Pt3Stn2012_DT ( int  type,
float  eta,
float  dphi1,
float  dphi2,
int  PtbyMLH,
float &  theLH,
int  fr = -1,
int  method = 11 
) const

Definition at line 8061 of file CSCTFPtMethods.cc.

References AB_mu12F, AB_mu12R, AB_mu13F, AB_mu13R, AB_mu23, AB_mu24, AB_mu34, AB_mu5, AB_mu51, AB_mu52, AB_mu53, AB_rho123F, AB_rho123R, AB_rho124F, AB_rho124R, AB_rho134F, AB_rho134R, AB_rho234, AB_rho512, AB_rho513, AB_rho51B, AB_rho523, AB_rho52B, AB_rho53B, AB_sig12F, AB_sig12R, AB_sig13F, AB_sig13R, AB_sig23, AB_sig24, AB_sig34, AB_sig5, AB_sig51, AB_sig52, AB_sig53, PVValHelper::eta, etabins, Likelihood2011(), AlcaSiPixelAliHarvester0T_cff::method, pfMETCorrectionType0_cfi::par1, pfMETCorrectionType0_cfi::par2, DiDispStaMuonMonitor_cfi::pt, Pt2Stn2012_DT(), HLT_2024v12_cff::Pt_min, and findQualityFiles::v.

Referenced by CSCTFPtLUT::calcPt().

8062  {
8063  int useBestMLH = PtbyMLH;
8064  int useBOXcutDT = true;
8065  int use2Stn = false;
8066  int use2StnDT = true;
8067 
8068  //if(fabs(eta) >= 2.4)eta = 2.35;
8069  if (fabs(eta) >= 2.2)
8070  eta = 2.15;
8071  float Pt = 0.;
8072  double PTsolv = 1.; // for muon plus hypothesis
8073  double PTsolvMinus = 1.; //for muon minus hypothesis
8074  for (int iETA = 0; iETA < 15; iETA++) {
8075  if (fabs(eta) >= etabins[iETA] && fabs(eta) < etabins[iETA + 1]) {
8076  // calculate curvers of mean and sigma
8077  // calculate phi12 mean
8078  double par1[4] = {0., 0., 0., 0.};
8079  //double phi12mean = fitf5(v, par1); //mu12
8080  double par_sig1[4] = {0., 0., 0., 0};
8081  // calculate phi23 mean
8082  double par2[4] = {0., 0., 0., 0.};
8083  // calculate phi23 sig
8084  double par_sig2[4] = {0., 0., 0., 0.};
8085  // calculate correlation rho
8086  double par_rho[5] = {0., 0., 0., 0., 0.};
8087  int iETA1 = iETA;
8088  int iETA2 = iETA;
8089 
8090  // defind which parameters will be use
8091  const double(*Amean12F)[15] = AB_mu12F;
8092  const double(*Asig12F)[15] = AB_sig12F;
8093  const double(*Amean12R)[15] = AB_mu12R;
8094  const double(*Asig12R)[15] = AB_sig12R;
8095 
8096  const double(*Amean13F)[15] = AB_mu13F;
8097  const double(*Asig13F)[15] = AB_sig13F;
8098  const double(*Amean13R)[15] = AB_mu13R;
8099  const double(*Asig13R)[15] = AB_sig13R;
8100 
8101  //const double(*Amean14F)[15] = AB_mu14F;
8102  //const double(*Asig14F)[15] = AB_sig14F;
8103  //const double(*Amean14R)[15] = AB_mu14R;
8104  //const double(*Asig14R)[15] = AB_sig14R;
8105 
8106  const double(*Amean23)[15] = AB_mu23;
8107  const double(*Asig23)[15] = AB_sig23;
8108  const double(*Amean24)[15] = AB_mu24;
8109  const double(*Asig24)[15] = AB_sig24;
8110  const double(*Amean34)[15] = AB_mu34;
8111  const double(*Asig34)[15] = AB_sig34;
8112 
8113  const double(*Amean5)[15] = AB_mu5;
8114  const double(*Asig5)[15] = AB_sig5;
8115  const double(*Amean51)[15] = AB_mu51;
8116  const double(*Asig51)[15] = AB_sig51;
8117  const double(*Amean52)[15] = AB_mu52;
8118  const double(*Asig52)[15] = AB_sig52;
8119  const double(*Amean53)[15] = AB_mu53;
8120  const double(*Asig53)[15] = AB_sig53;
8121 
8122  const double(*Arho123F)[15] = AB_rho123F;
8123  const double(*Arho123R)[15] = AB_rho123R;
8124  const double(*Arho124F)[15] = AB_rho124F;
8125  const double(*Arho124R)[15] = AB_rho124R;
8126  const double(*Arho134F)[15] = AB_rho134F;
8127  const double(*Arho134R)[15] = AB_rho134R;
8128  const double(*Arho234)[15] = AB_rho234;
8129 
8130  const double(*Arho51B)[15] = AB_rho51B;
8131  const double(*Arho52B)[15] = AB_rho52B;
8132  const double(*Arho53B)[15] = AB_rho53B;
8133  const double(*Arho512)[15] = AB_rho512;
8134  const double(*Arho513)[15] = AB_rho513;
8135  const double(*Arho523)[15] = AB_rho523;
8136 
8137  //cout << "iETA = " << iETA
8138  // << " AB_mu51[0][iETA] = " << AB_mu51[0][iETA] << " pointer = " << (*(Amean51+0))[iETA]
8139  // << " AB_mu51[3][iETA] = " << AB_mu51[3][iETA] << " pointer = " << (*(Amean51+3))[iETA]
8140  // << endl;
8141 
8142  switch (type) // type = mode here
8143  {
8144  case 2: //1-2-3
8145  if (iETA < 2)
8146  iETA2 = 2;
8147  if (fr == 1) {
8148  if (iETA < 3)
8149  iETA1 = 3;
8150  par1[0] = (*(Amean12F + 0))[iETA1];
8151  par1[1] = (*(Amean12F + 1))[iETA1];
8152  par1[2] = (*(Amean12F + 2))[iETA1];
8153  par1[3] = (*(Amean12F + 3))[iETA1];
8154  par_sig1[0] = (*(Asig12F + 0))[iETA1];
8155  par_sig1[1] = (*(Asig12F + 1))[iETA1];
8156  par_sig1[2] = (*(Asig12F + 2))[iETA1];
8157  par_sig1[3] = (*(Asig12F + 3))[iETA1];
8158  par_rho[0] = (*(Arho123F + 0))[iETA2];
8159  par_rho[1] = (*(Arho123F + 1))[iETA2];
8160  par_rho[2] = (*(Arho123F + 2))[iETA2];
8161  par_rho[3] = (*(Arho123F + 3))[iETA2];
8162  par_rho[4] = (*(Arho123F + 4))[iETA2];
8163  }
8164  if (fr == 0) {
8165  if (iETA < 1)
8166  iETA1 = 1;
8167  par1[0] = (*(Amean12R + 0))[iETA1];
8168  par1[1] = (*(Amean12R + 1))[iETA1];
8169  par1[2] = (*(Amean12R + 2))[iETA1];
8170  par1[3] = (*(Amean12R + 3))[iETA1];
8171  par_sig1[0] = (*(Asig12R + 0))[iETA1];
8172  par_sig1[1] = (*(Asig12R + 1))[iETA1];
8173  par_sig1[2] = (*(Asig12R + 2))[iETA1];
8174  par_sig1[3] = (*(Asig12R + 3))[iETA1];
8175  par_rho[0] = (*(Arho123R + 0))[iETA2];
8176  par_rho[1] = (*(Arho123R + 1))[iETA2];
8177  par_rho[2] = (*(Arho123R + 2))[iETA2];
8178  par_rho[3] = (*(Arho123R + 3))[iETA2];
8179  par_rho[4] = (*(Arho123R + 4))[iETA2];
8180  }
8181  par2[0] = (*(Amean23 + 0))[iETA2];
8182  par2[1] = (*(Amean23 + 1))[iETA2];
8183  par2[2] = (*(Amean23 + 2))[iETA2];
8184  par2[3] = (*(Amean23 + 3))[iETA2];
8185  par_sig2[0] = (*(Asig23 + 0))[iETA2];
8186  par_sig2[1] = (*(Asig23 + 1))[iETA2];
8187  par_sig2[2] = (*(Asig23 + 2))[iETA2];
8188  par_sig2[3] = (*(Asig23 + 3))[iETA2];
8189 
8190  break;
8191  case 3: //1-2-4
8192  if (iETA < 3)
8193  iETA2 = 3;
8194  if (fr == 1) {
8195  if (iETA < 3)
8196  iETA1 = 3;
8197  par1[0] = (*(Amean12F + 0))[iETA1];
8198  par1[1] = (*(Amean12F + 1))[iETA1];
8199  par1[2] = (*(Amean12F + 2))[iETA1];
8200  par1[3] = (*(Amean12F + 3))[iETA1];
8201  par_sig1[0] = (*(Asig12F + 0))[iETA1];
8202  par_sig1[1] = (*(Asig12F + 1))[iETA1];
8203  par_sig1[2] = (*(Asig12F + 2))[iETA1];
8204  par_sig1[3] = (*(Asig12F + 3))[iETA1];
8205  par_rho[0] = (*(Arho124F + 0))[iETA2];
8206  par_rho[1] = (*(Arho124F + 1))[iETA2];
8207  par_rho[2] = (*(Arho124F + 2))[iETA2];
8208  par_rho[3] = (*(Arho124F + 3))[iETA2];
8209  par_rho[4] = (*(Arho124F + 4))[iETA2];
8210  }
8211  if (fr == 0) {
8212  if (iETA < 1)
8213  iETA1 = 1;
8214  par1[0] = (*(Amean12R + 0))[iETA1];
8215  par1[1] = (*(Amean12R + 1))[iETA1];
8216  par1[2] = (*(Amean12R + 2))[iETA1];
8217  par1[3] = (*(Amean12R + 3))[iETA1];
8218  par_sig1[0] = (*(Asig12R + 0))[iETA1];
8219  par_sig1[1] = (*(Asig12R + 1))[iETA1];
8220  par_sig1[2] = (*(Asig12R + 2))[iETA1];
8221  par_sig1[3] = (*(Asig12R + 3))[iETA1];
8222  par_rho[0] = (*(Arho124R + 0))[iETA2];
8223  par_rho[1] = (*(Arho124R + 1))[iETA2];
8224  par_rho[2] = (*(Arho124R + 2))[iETA2];
8225  par_rho[3] = (*(Arho124R + 3))[iETA2];
8226  par_rho[4] = (*(Arho124R + 4))[iETA2];
8227  }
8228  par2[0] = (*(Amean24 + 0))[iETA2];
8229  par2[1] = (*(Amean24 + 1))[iETA2];
8230  par2[2] = (*(Amean24 + 2))[iETA2];
8231  par2[3] = (*(Amean24 + 3))[iETA2];
8232  par_sig2[0] = (*(Asig24 + 0))[iETA2];
8233  par_sig2[1] = (*(Asig24 + 1))[iETA2];
8234  par_sig2[2] = (*(Asig24 + 2))[iETA2];
8235  par_sig2[3] = (*(Asig24 + 3))[iETA2];
8236  break;
8237  case 4: //1-3-4
8238  if (iETA < 3)
8239  iETA2 = 3;
8240  if (fr == 1) {
8241  if (iETA < 3)
8242  iETA1 = 3;
8243  par1[0] = (*(Amean13F + 0))[iETA1];
8244  par1[1] = (*(Amean13F + 1))[iETA1];
8245  par1[2] = (*(Amean13F + 2))[iETA1];
8246  par1[3] = (*(Amean13F + 3))[iETA1];
8247  par_sig1[0] = (*(Asig13F + 0))[iETA1];
8248  par_sig1[1] = (*(Asig13F + 1))[iETA1];
8249  par_sig1[2] = (*(Asig13F + 2))[iETA1];
8250  par_sig1[3] = (*(Asig13F + 3))[iETA1];
8251  par_rho[0] = (*(Arho134F + 0))[iETA2];
8252  par_rho[1] = (*(Arho134F + 1))[iETA2];
8253  par_rho[2] = (*(Arho134F + 2))[iETA2];
8254  par_rho[3] = (*(Arho134F + 3))[iETA2];
8255  par_rho[4] = (*(Arho134F + 4))[iETA2];
8256  }
8257  if (fr == 0) {
8258  if (iETA < 3)
8259  iETA1 = 3;
8260  par1[0] = (*(Amean13R + 0))[iETA1];
8261  par1[1] = (*(Amean13R + 1))[iETA1];
8262  par1[2] = (*(Amean13R + 2))[iETA1];
8263  par1[3] = (*(Amean13R + 3))[iETA1];
8264  par_sig1[0] = (*(Asig13R + 0))[iETA1];
8265  par_sig1[1] = (*(Asig13R + 1))[iETA1];
8266  par_sig1[2] = (*(Asig13R + 2))[iETA1];
8267  par_sig1[3] = (*(Asig13R + 3))[iETA1];
8268  par_rho[0] = (*(Arho134R + 0))[iETA2];
8269  par_rho[1] = (*(Arho134R + 1))[iETA2];
8270  par_rho[2] = (*(Arho134R + 2))[iETA2];
8271  par_rho[3] = (*(Arho134R + 3))[iETA2];
8272  par_rho[4] = (*(Arho134R + 4))[iETA2];
8273  }
8274  par2[0] = (*(Amean34 + 0))[iETA2];
8275  par2[1] = (*(Amean34 + 1))[iETA2];
8276  par2[2] = (*(Amean34 + 2))[iETA2];
8277  par2[3] = (*(Amean34 + 3))[iETA2];
8278  par_sig2[0] = (*(Asig34 + 0))[iETA2];
8279  par_sig2[1] = (*(Asig34 + 1))[iETA2];
8280  par_sig2[2] = (*(Asig34 + 2))[iETA2];
8281  par_sig2[3] = (*(Asig34 + 3))[iETA2];
8282  break;
8283  case 5: //2-3-4
8284  if (iETA < 2)
8285  iETA1 = 2;
8286  if (iETA < 3)
8287  iETA2 = 3;
8288  par1[0] = (*(Amean23 + 0))[iETA1];
8289  par1[1] = (*(Amean23 + 1))[iETA1];
8290  par1[2] = (*(Amean23 + 2))[iETA1];
8291  par1[3] = (*(Amean23 + 3))[iETA1];
8292  par_sig1[0] = (*(Asig23 + 0))[iETA1];
8293  par_sig1[1] = (*(Asig23 + 1))[iETA1];
8294  par_sig1[2] = (*(Asig23 + 2))[iETA1];
8295  par_sig1[3] = (*(Asig23 + 3))[iETA1];
8296  par_rho[0] = (*(Arho234 + 0))[iETA2];
8297  par_rho[1] = (*(Arho234 + 1))[iETA2];
8298  par_rho[2] = (*(Arho234 + 2))[iETA2];
8299  par_rho[3] = (*(Arho234 + 3))[iETA2];
8300  par_rho[4] = (*(Arho234 + 4))[iETA2];
8301 
8302  par2[0] = (*(Amean34 + 0))[iETA2];
8303  par2[1] = (*(Amean34 + 1))[iETA2];
8304  par2[2] = (*(Amean34 + 2))[iETA2];
8305  par2[3] = (*(Amean34 + 3))[iETA2];
8306  par_sig2[0] = (*(Asig34 + 0))[iETA2];
8307  par_sig2[1] = (*(Asig34 + 1))[iETA2];
8308  par_sig2[2] = (*(Asig34 + 2))[iETA2];
8309  par_sig2[3] = (*(Asig34 + 3))[iETA2];
8310  break;
8311  case 11: // singles for method < 10, for method > 10: fr = 1 -> b1-1-3, fr = 0 -> b1-3-phiBend
8312  if (iETA != 2)
8313  iETA1 = 2;
8314  par1[0] = (*(Amean53 + 0))[iETA1];
8315  par1[1] = (*(Amean53 + 1))[iETA1];
8316  par1[2] = (*(Amean53 + 2))[iETA1];
8317  par1[3] = (*(Amean53 + 3))[iETA1];
8318  par_sig1[0] = (*(Asig53 + 0))[iETA1];
8319  par_sig1[1] = (*(Asig53 + 1))[iETA1];
8320  par_sig1[2] = (*(Asig53 + 2))[iETA1];
8321  par_sig1[3] = (*(Asig53 + 3))[iETA1];
8322  par_rho[0] = (*(Arho53B + 0))[iETA1];
8323  par_rho[1] = (*(Arho53B + 1))[iETA1];
8324  par_rho[2] = (*(Arho53B + 2))[iETA1];
8325  par_rho[3] = (*(Arho53B + 3))[iETA1];
8326  par_rho[4] = (*(Arho53B + 4))[iETA1];
8327 
8328  par2[0] = (*(Amean5 + 0))[iETA1];
8329  par2[1] = (*(Amean5 + 1))[iETA1];
8330  par2[2] = (*(Amean5 + 2))[iETA1];
8331  par2[3] = (*(Amean5 + 3))[iETA1];
8332  par_sig2[0] = (*(Asig5 + 0))[iETA1];
8333  par_sig2[1] = (*(Asig5 + 1))[iETA1];
8334  par_sig2[2] = (*(Asig5 + 2))[iETA1];
8335  par_sig2[3] = (*(Asig5 + 3))[iETA1];
8336 
8337  if (fr == 1) {
8338  par1[0] = (*(Amean51 + 0))[iETA1];
8339  par1[1] = (*(Amean51 + 1))[iETA1];
8340  par1[2] = (*(Amean51 + 2))[iETA1];
8341  par1[3] = (*(Amean51 + 3))[iETA1];
8342  par_sig1[0] = (*(Asig51 + 0))[iETA1];
8343  par_sig1[1] = (*(Asig51 + 1))[iETA1];
8344  par_sig1[2] = (*(Asig51 + 2))[iETA1];
8345  par_sig1[3] = (*(Asig51 + 3))[iETA1];
8346  par_rho[0] = (*(Arho513 + 0))[iETA1];
8347  par_rho[1] = (*(Arho513 + 1))[iETA1];
8348  par_rho[2] = (*(Arho513 + 2))[iETA1];
8349  par_rho[3] = (*(Arho513 + 3))[iETA1];
8350  par_rho[4] = (*(Arho513 + 4))[iETA1];
8351 
8352  par2[0] = (*(Amean13R + 0))[iETA1];
8353  par2[1] = (*(Amean13R + 1))[iETA1];
8354  par2[2] = (*(Amean13R + 2))[iETA1];
8355  par2[3] = (*(Amean13R + 3))[iETA1];
8356  par_sig2[0] = (*(Asig13R + 0))[iETA1];
8357  par_sig2[1] = (*(Asig13R + 1))[iETA1];
8358  par_sig2[2] = (*(Asig13R + 2))[iETA1];
8359  par_sig2[3] = (*(Asig13R + 3))[iETA1];
8360  }
8361  break;
8362  case 12: // b1-1-2 for method < 10; for method > 10: fr = 1 -> b1-2-3, fr = 0 -> b1-2-phiBend
8363  if (iETA < 1)
8364  iETA1 = 1;
8365  if (iETA > 2)
8366  iETA1 = 2;
8367  par1[0] = (*(Amean52 + 0))[iETA1];
8368  par1[1] = (*(Amean52 + 1))[iETA1];
8369  par1[2] = (*(Amean52 + 2))[iETA1];
8370  par1[3] = (*(Amean52 + 3))[iETA1];
8371  par_sig1[0] = (*(Asig52 + 0))[iETA1];
8372  par_sig1[1] = (*(Asig52 + 1))[iETA1];
8373  par_sig1[2] = (*(Asig52 + 2))[iETA1];
8374  par_sig1[3] = (*(Asig52 + 3))[iETA1];
8375  par_rho[0] = (*(Arho52B + 0))[iETA1];
8376  par_rho[1] = (*(Arho52B + 1))[iETA1];
8377  par_rho[2] = (*(Arho52B + 2))[iETA1];
8378  par_rho[3] = (*(Arho52B + 3))[iETA1];
8379  par_rho[4] = (*(Arho52B + 4))[iETA1];
8380 
8381  par2[0] = (*(Amean5 + 0))[iETA1];
8382  par2[1] = (*(Amean5 + 1))[iETA1];
8383  par2[2] = (*(Amean5 + 2))[iETA1];
8384  par2[3] = (*(Amean5 + 3))[iETA1];
8385  par_sig2[0] = (*(Asig5 + 0))[iETA1];
8386  par_sig2[1] = (*(Asig5 + 1))[iETA1];
8387  par_sig2[2] = (*(Asig5 + 2))[iETA1];
8388  par_sig2[3] = (*(Asig5 + 3))[iETA1];
8389 
8390  if (fr == 1) {
8391  if (iETA != 2)
8392  iETA1 = 2;
8393  par1[0] = (*(Amean52 + 0))[iETA1];
8394  par1[1] = (*(Amean52 + 1))[iETA1];
8395  par1[2] = (*(Amean52 + 2))[iETA1];
8396  par1[3] = (*(Amean52 + 3))[iETA1];
8397  par_sig1[0] = (*(Asig52 + 0))[iETA1];
8398  par_sig1[1] = (*(Asig52 + 1))[iETA1];
8399  par_sig1[2] = (*(Asig52 + 2))[iETA1];
8400  par_sig1[3] = (*(Asig52 + 3))[iETA1];
8401  par_rho[0] = (*(Arho523 + 0))[iETA1];
8402  par_rho[1] = (*(Arho523 + 1))[iETA1];
8403  par_rho[2] = (*(Arho523 + 2))[iETA1];
8404  par_rho[3] = (*(Arho523 + 3))[iETA1];
8405  par_rho[4] = (*(Arho523 + 4))[iETA1];
8406 
8407  par2[0] = (*(Amean23 + 0))[iETA1];
8408  par2[1] = (*(Amean23 + 1))[iETA1];
8409  par2[2] = (*(Amean23 + 2))[iETA1];
8410  par2[3] = (*(Amean23 + 3))[iETA1];
8411  par_sig2[0] = (*(Asig23 + 0))[iETA1];
8412  par_sig2[1] = (*(Asig23 + 1))[iETA1];
8413  par_sig2[2] = (*(Asig23 + 2))[iETA1];
8414  par_sig2[3] = (*(Asig23 + 3))[iETA1];
8415  }
8416  break;
8417  case 14: // b1-2 for method < 10; for method > 10: fr = 1 -> b1-1-2-(3), fr = 0 -> b1-1-phiBend
8418  if (iETA > 2)
8419  iETA1 = 2;
8420  par1[0] = (*(Amean51 + 0))[iETA1];
8421  par1[1] = (*(Amean51 + 1))[iETA1];
8422  par1[2] = (*(Amean51 + 2))[iETA1];
8423  par1[3] = (*(Amean51 + 3))[iETA1];
8424  par_sig1[0] = (*(Asig51 + 0))[iETA1];
8425  par_sig1[1] = (*(Asig51 + 1))[iETA1];
8426  par_sig1[2] = (*(Asig51 + 2))[iETA1];
8427  par_sig1[3] = (*(Asig51 + 3))[iETA1];
8428  par_rho[0] = (*(Arho51B + 0))[iETA1];
8429  par_rho[1] = (*(Arho51B + 1))[iETA1];
8430  par_rho[2] = (*(Arho51B + 2))[iETA1];
8431  par_rho[3] = (*(Arho51B + 3))[iETA1];
8432  par_rho[4] = (*(Arho51B + 4))[iETA1];
8433 
8434  par2[0] = (*(Amean5 + 0))[iETA1];
8435  par2[1] = (*(Amean5 + 1))[iETA1];
8436  par2[2] = (*(Amean5 + 2))[iETA1];
8437  par2[3] = (*(Amean5 + 3))[iETA1];
8438  par_sig2[0] = (*(Asig5 + 0))[iETA1];
8439  par_sig2[1] = (*(Asig5 + 1))[iETA1];
8440  par_sig2[2] = (*(Asig5 + 2))[iETA1];
8441  par_sig2[3] = (*(Asig5 + 3))[iETA1];
8442 
8443  if (fr == 1) {
8444  if (iETA < 1)
8445  iETA1 = 1;
8446  if (iETA > 2)
8447  iETA1 = 2;
8448  par1[0] = (*(Amean51 + 0))[iETA1];
8449  par1[1] = (*(Amean51 + 1))[iETA1];
8450  par1[2] = (*(Amean51 + 2))[iETA1];
8451  par1[3] = (*(Amean51 + 3))[iETA1];
8452  par_sig1[0] = (*(Asig51 + 0))[iETA1];
8453  par_sig1[1] = (*(Asig51 + 1))[iETA1];
8454  par_sig1[2] = (*(Asig51 + 2))[iETA1];
8455  par_sig1[3] = (*(Asig51 + 3))[iETA1];
8456  par_rho[0] = (*(Arho512 + 0))[iETA1];
8457  par_rho[1] = (*(Arho512 + 1))[iETA1];
8458  par_rho[2] = (*(Arho512 + 2))[iETA1];
8459  par_rho[3] = (*(Arho512 + 3))[iETA1];
8460  par_rho[4] = (*(Arho512 + 4))[iETA1];
8461 
8462  par2[0] = (*(Amean12R + 0))[iETA1];
8463  par2[1] = (*(Amean12R + 1))[iETA1];
8464  par2[2] = (*(Amean12R + 2))[iETA1];
8465  par2[3] = (*(Amean12R + 3))[iETA1];
8466  par_sig2[0] = (*(Asig12R + 0))[iETA1];
8467  par_sig2[1] = (*(Asig12R + 1))[iETA1];
8468  par_sig2[2] = (*(Asig12R + 2))[iETA1];
8469  par_sig2[3] = (*(Asig12R + 3))[iETA1];
8470  }
8471  break;
8472  //default:
8473  //return 0.0;
8474  }
8475 
8476  // Switch to 2-Station measurement if dphi is too small
8477  // box cut around Pt of 10 GeV
8478  if ((((fabs(static_cast<double>(dphi2)) < 0.004 && type != 12 && method < 25) ||
8479  (fabs(static_cast<double>(dphi2)) < 0.004 && type != 12 && type != 14 && type != 11 && method >= 25))) &&
8480  ((type >= 2 && type <= 5 && use2Stn) || (type >= 11 && use2StnDT))) {
8481  if (use2Stn) {
8482  //if(type == 12 || type == 14 || type == 11) std::cout << "mode = " << type << " dphi23 = " << dphi2 << " method = " << method << std::endl; //test
8483  if (type == 2 || type == 3)
8484  type = 6; // 1-2-3(or 4) -> 1-2
8485  if (type == 4)
8486  type = 7; // 1-3-4 -> 1-3
8487  if (type == 5)
8488  type = 8; // 2-3-4 -> 2-3
8489  Pt = Pt2Stn2012_DT(type,
8490  eta,
8491  dphi1,
8492  useBestMLH,
8493  bestLH,
8494  fr,
8495  method,
8496  int(2)); //in 3 station track there is no information to which ME1/1 or ME1/2 track belong
8497  }
8498  if (use2StnDT) {
8499  if (type == 11)
8500  type = 14; // b1-1-3 -> b1-1 for pt_method > 10
8501  //if(type == 14) type = 11;
8502  //phiSign
8503  Pt = Pt2Stn2012_DT(type,
8504  eta,
8505  dphi1,
8506  useBestMLH,
8507  bestLH,
8508  fr,
8509  method,
8510  int(2)); //in 3 station track there is no information to which ME1/1 or ME1/2 track belong
8511  }
8512  } else {
8513  //************* solve equation dLog(Likelihood)/dpt = 0 for muon + ;
8514  double muPlusMaxLH = -1e9;
8515  double pt = 140;
8516  double step = 5.;
8517  double maxLH = -1e9;
8518  while (pt > 2.) {
8519  double par_phi12[1] = {dphi1};
8520  double par_phi23[1] = {dphi2};
8521  double v[1], lpt1_1;
8522  v[0] = pt;
8523  lpt1_1 = Likelihood2011(par_phi12, par_phi23, par1, par2, par_sig1, par_sig2, par_rho, v);
8524 
8525  if (lpt1_1 > maxLH) {
8526  maxLH = lpt1_1;
8527  PTsolv = pt;
8528  }
8529 
8530  if (pt <= 5) {
8531  step = 0.5 / 4.0;
8532  } else if (pt <= 10) {
8533  step = 1.0 / 4.0;
8534  } else if (pt <= 20) {
8535  step = 2.0 / 4.0;
8536  } else if (pt <= 50) {
8537  step = 5.0 / 4.0;
8538  } else if (pt <= 100) {
8539  step = 10.0 / 4.0;
8540  }
8541  pt = pt - step;
8542  } // end while
8543  muPlusMaxLH = maxLH;
8544  //*********** end solve equation for muon plus
8545  //************* solve equation dLog(Likelihood)/dpt = 0 for muon minus ;
8546  // for one station method we know sing of muon: dphi1 > 0 for muon minus!!! => dphi1 = -dphi1 < 0
8547  double muMinusMaxLH = -1e9;
8548  dphi1 = -dphi1;
8549  dphi2 = -dphi2;
8550  pt = 140;
8551  step = 5.;
8552  maxLH = -1e9;
8553 
8554  while (pt > 2.) {
8555  double par_phi12[1] = {dphi1};
8556  double par_phi23[1] = {dphi2};
8557  double v[1], lpt1_1;
8558  v[0] = pt;
8559  lpt1_1 = Likelihood2011(par_phi12, par_phi23, par1, par2, par_sig1, par_sig2, par_rho, v);
8560 
8561  if (lpt1_1 > maxLH) {
8562  maxLH = lpt1_1;
8563  PTsolvMinus = pt;
8564  }
8565 
8566  if (pt <= 5) {
8567  step = 0.5 / 4.0;
8568  } else if (pt <= 10) {
8569  step = 1.0 / 4.0;
8570  } else if (pt <= 20) {
8571  step = 2.0 / 4.0;
8572  } else if (pt <= 50) {
8573  step = 5.0 / 4.0;
8574  } else if (pt <= 100) {
8575  step = 10.0 / 4.0;
8576  }
8577  pt = pt - step;
8578  } // end while
8579  muMinusMaxLH = maxLH;
8580 
8581  if (useBestMLH)
8582  PTsolv = (muPlusMaxLH > muMinusMaxLH)
8583  ? PTsolv
8584  : PTsolvMinus; // select Maximum solution from muon plus and moun minus hypotesis
8585  else
8586  PTsolv = (PTsolv > PTsolvMinus)
8587  ? PTsolv
8588  : PTsolvMinus; // select Maximum solution from muon plus and moun minus hypotesis
8589 
8590  bestLH = (muPlusMaxLH > muMinusMaxLH) ? muPlusMaxLH : muMinusMaxLH;
8591 
8592  PTsolv = PTsolv * 1.2; // correction to have 90% efficiency for trigger cuts
8593  if (PTsolv > 137.5)
8594  PTsolv = 137.5;
8595  //if(fabs(dphi1) < 0.002 && fabs(dphi2) <= CutPhi23){PTsolv = 140;}
8596  dphi1 = -dphi1; //return to correct sing dphi
8597  dphi2 = -dphi2; //return to correct sing dphi
8598  Pt = PTsolv;
8599  } // end 2 or 3 station method
8600  }
8601  }
8602  // fix overlap region high pt:
8603  if (useBOXcutDT)
8604  if (method >= 25 && (type == 12 || type == 14 || type == 11) && fabs(dphi1) < 0.003 && fabs(dphi2) < 2)
8605  Pt = 140.;
8606  // if ( fabs(static_cast<double>(dphi2))>0.004 ) std::cout << "Pt = " << Pt << " Mode = " << type << " dphi1 = " << dphi1 << " dphi2 = " << dphi2 << std::endl;
8607 
8608  //float Pt_min = trigger_scale->getPtScale()->getLowEdge(1);// 0 GeV
8609  //if(method > 10) Pt_min = trigger_scale->getPtScale()->getLowEdge(3);// 2 GeV
8610  float Pt_min = 2; // 2 GeV
8611 
8612  return (Pt > Pt_min) ? Pt : Pt_min;
8613 }
static const double AB_sig24[4][15]
static const double AB_sig52[4][15]
static const double AB_mu12R[4][15]
static const double AB_rho523[5][15]
static const double AB_sig13F[4][15]
static const double AB_mu24[4][15]
static const double AB_mu52[4][15]
static const double AB_rho513[5][15]
static const double AB_mu51[4][15]
static const double AB_mu23[4][15]
static const double AB_sig12R[4][15]
static const double AB_sig51[4][15]
static const double AB_sig53[4][15]
static const double AB_rho512[5][15]
static const double AB_mu13R[4][15]
static const double AB_rho134F[5][15]
double Likelihood2011(double *phi12, double *phi23, double *par_m12, double *par_m23, double *par_sig12, double *par_sig23, double *par_rho, double *v) const
static const double AB_sig34[4][15]
static const double AB_rho52B[5][15]
static const double AB_sig5[4][15]
static const double AB_rho124F[5][15]
static const double AB_rho124R[5][15]
static const double AB_mu13F[4][15]
static const double AB_rho53B[5][15]
static const double AB_sig13R[4][15]
static const double AB_mu5[4][15]
static const double AB_mu53[4][15]
float Pt2Stn2012_DT(int type, float eta, float dphi, int PtbyMLH, float &theLH, int fr=-1, int method=11, int phiSign=2) const
static const double AB_rho234[5][15]
static const double AB_sig23[4][15]
static const double AB_rho134R[5][15]
static const double AB_mu34[4][15]
step
Definition: StallMonitor.cc:83
static const double AB_rho123F[5][15]
static const double AB_sig12F[4][15]
static const double AB_rho51B[5][15]
static const double AB_mu12F[4][15]
static const double AB_rho123R[5][15]
static const float etabins[16]

◆ Pt3StnChiSq()

float CSCTFPtMethods::Pt3StnChiSq ( int  type,
float  eta,
int  dphi1,
int  dphi2,
int  fr 
) const

Definition at line 9848 of file CSCTFPtMethods.cc.

References funct::abs(), change_name::diff, dphifr0, dphifr1, PVValHelper::eta, etabins, beamvalidation::exit(), mps_fire::i, dqmiolumiharvest::j, dqmdumpme::k, SiStripPI::min, funct::pow(), Pt3Stn(), ptbins, muonTiming_cfi::ptmax, ptmin, CSCTFConstants::SECTOR_RAD, sigmafr0, and sigmafr1.

Referenced by CSCTFPtLUT::calcPt(), and Pt3StnHybrid().

9848  {
9849  float diff, min, ptmin, ptmax;
9850  float mypt = 0.0;
9851 
9852  int dphi1copy = dphi1, dphi2copy = dphi2;
9853 
9854  if (type < 4 || type > 5) {
9855  // std::cout << "PtParams: illegal track type for Chi-square method" << std::endl;
9856  edm::LogError("CSCTFPtMethods::Pt3StnChiSq()") << "Illegal track type for Chi-square method";
9857  return 0.;
9858  }
9859 
9860  // flip sign
9861  //dphi1 = -dphi1;
9862  //dphi2 = -dphi2;
9863 
9864  //determine which eta bin muon falls into
9865  int i = 0;
9866  for (i = 0; i < 15; i++) {
9867  if (eta >= etabins[i] && eta < etabins[i + 1])
9868  break;
9869  }
9870  if (i == 15) {
9871  //std::cout<<"muon not within any eta range";
9872  edm::LogWarning("CSCTFPtMethods::Pt3StnChiSq()") << "Muon not within any eta range";
9873  if (eta < etabins[0]) {
9874  eta = etabins[0];
9875  i = 0;
9876  } else if (eta >= etabins[15]) {
9877  eta = etabins[15];
9878  i = 15;
9879  } else
9880  exit(0);
9881  }
9882 
9883  bool bCallOldMethod = false;
9884 
9885  if (abs(dphi2) < 32)
9886  dphi2 = 0; //dphi2=dphi23 or dphi24
9887 
9888  //sta1-2-3, dphi1=dphi12, dphi2=dphi23
9889  if (type == 4) {
9890  if (fr == 0) {
9891  //advance past bins in array w/ default values
9892  //default is: dphifr0[x][y][z] = -1, sigmafr0[x][y][z] = 1
9893  int j = 0; //start from 1st column, j = 0
9894  while (
9895  ((dphifr0[0][i][j] == -1 && sigmafr0[0][i][j] == 1) || (dphifr0[2][i][j] == -1 && sigmafr0[2][i][j] == 1)) &&
9896  j != 28)
9897  j++;
9898  if (j == 28) {
9899  // std::cout<<" L1MuCSCPtParams: every entry in row is default"<<std::endl;
9900  edm::LogInfo("CSCTFPtMethods::Pt3StnChiSq()") << "Every entry in row is default";
9901  // exit(0); //normal termination
9902  bCallOldMethod = true;
9903  }
9904 
9905  if (!bCallOldMethod) {
9906  //set min, ptmin, ptmax to first bin
9907  //in row that is not default
9908  min = 1.5625 * ((pow((dphi1 - dphifr0[0][i][j]), 2) / pow(sigmafr0[0][i][j], 2)) +
9909  (pow((dphi2 - dphifr0[2][i][j]), 2) / pow(sigmafr0[2][i][j], 2)) -
9910  (1.2 * (dphi1 - dphifr0[0][i][j]) * (dphi2 - dphifr0[2][i][j]) /
9911  (sigmafr0[0][i][j] * sigmafr0[2][i][j]))); //calculate chi square
9912  ptmin = ptbins[j];
9913  ptmax = ptbins[j + 1];
9914 
9915  //loop through all pt bins. assign pt of bin w/ least diff
9916  //do not include default bins in calculation
9917  for (int k = j; k < 28; k++) {
9918  if ((dphifr0[0][i][k] != -1 || sigmafr0[0][i][k] != 1) &&
9919  (dphifr0[2][i][k] != -1 || sigmafr0[2][i][k] != 1)) {
9920  diff = 1.5625 * ((pow((dphi1 - dphifr0[0][i][k]), 2) / pow(sigmafr0[0][i][k], 2)) +
9921  (pow((dphi2 - dphifr0[2][i][k]), 2) / pow(sigmafr0[2][i][k], 2)) -
9922  (1.2 * (dphi1 - dphifr0[0][i][k]) * (dphi2 - dphifr0[2][i][k]) /
9923  (sigmafr0[0][i][k] * sigmafr0[2][i][k])));
9924  if (diff < min) {
9925  min = diff;
9926  ptmin = ptbins[k];
9927  ptmax = ptbins[k + 1];
9928  }
9929  }
9930  }
9931  mypt = (ptmin + ptmax) / 2;
9932  }
9933  }
9934 
9935  if (fr == 1) {
9936  //advance past bins in array w/ default values
9937  //default is: dphifr1[x][y][z] = -1, sigmafr1[x][y][z] = 1
9938  int j = 0; //start from 1st column, j = 0
9939  while (
9940  ((dphifr1[0][i][j] == -1 && sigmafr1[0][i][j] == 1) || (dphifr1[2][i][j] == -1 && sigmafr1[2][i][j] == 1)) &&
9941  j != 28)
9942  j++;
9943  if (j == 28) {
9944  // std::cout<<" L1MuCSCPtParams: every entry in row is default"<<std::endl;
9945  edm::LogInfo("CSCTFPtMethods::Pt3StnChiSq()") << "Every entry in row is default";
9946  // exit(0); //normal termination
9947  bCallOldMethod = true;
9948  }
9949 
9950  if (!bCallOldMethod) {
9951  //set min, ptmin, ptmax to first bin
9952  //in row that is not default
9953  min = 1.5625 * ((pow((dphi1 - dphifr1[0][i][j]), 2) / pow(sigmafr1[0][i][j], 2)) +
9954  (pow((dphi2 - dphifr1[2][i][j]), 2) / pow(sigmafr1[2][i][j], 2)) -
9955  (1.2 * (dphi1 - dphifr1[0][i][j]) * (dphi2 - dphifr1[2][i][j]) /
9956  (sigmafr1[0][i][j] * sigmafr1[2][i][j]))); //calculate chi square
9957  ptmin = ptbins[j];
9958  ptmax = ptbins[j + 1];
9959 
9960  //loop through all pt bins. assign pt of bin w/ least diff
9961  //do not include default bins in calculation
9962  for (int k = j; k < 28; k++) {
9963  if ((dphifr1[0][i][k] != -1 || sigmafr1[0][i][k] != 1) &&
9964  (dphifr1[2][i][k] != -1 || sigmafr1[2][i][k] != 1)) {
9965  diff = 1.5625 * ((pow((dphi1 - dphifr1[0][i][k]), 2) / pow(sigmafr1[0][i][k], 2)) +
9966  (pow((dphi2 - dphifr1[2][i][k]), 2) / pow(sigmafr1[2][i][k], 2)) -
9967  (1.2 * (dphi1 - dphifr1[0][i][k]) * (dphi2 - dphifr1[2][i][k]) /
9968  (sigmafr1[0][i][k] * sigmafr1[2][i][k])));
9969  if (diff < min) {
9970  min = diff;
9971  ptmin = ptbins[k];
9972  ptmax = ptbins[k + 1];
9973  }
9974  }
9975  mypt = (ptmin + ptmax) / 2;
9976  }
9977  }
9978  }
9979  }
9980 
9981  //sta1-2-4, dphi1=dphi12, dphi2=dphi24
9982  if (type == 5) {
9983  if (fr == 0) {
9984  //advance past bins in array w/ default values
9985  //default is: dphifr0[x][y][z] = -1, sigmafr0[x][y][z] = 1
9986  int j = 0; //start from 1st column, j = 0
9987  while (
9988  ((dphifr0[0][i][j] == -1 && sigmafr0[0][i][j] == 1) || (dphifr0[3][i][j] == -1 && sigmafr0[3][i][j] == 1)) &&
9989  j != 28)
9990  j++;
9991  if (j == 28) {
9992  // std::cout<<" L1MuCSCPtParams: every entry in row is default"<<std::endl;
9993  edm::LogInfo("CSCTFPtMethods::Pt3StnChiSq()") << "Every entry in row is default";
9994  // exit(0); //normal termination
9995  bCallOldMethod = true;
9996  }
9997 
9998  if (!bCallOldMethod) {
9999  //set min, ptmin, ptmax to first bin
10000  //in row that is not default
10001  min = 1.5625 * ((pow((dphi1 - dphifr0[0][i][j]), 2) / pow(sigmafr0[0][i][j], 2)) +
10002  (pow((dphi2 - dphifr0[3][i][j]), 2) / pow(sigmafr0[3][i][j], 2)) -
10003  (1.2 * (dphi1 - dphifr0[0][i][j]) * (dphi2 - dphifr0[3][i][j]) /
10004  (sigmafr0[0][i][j] * sigmafr0[3][i][j]))); //calculate chi square
10005  ptmin = ptbins[j];
10006  ptmax = ptbins[j + 1];
10007 
10008  //loop through all pt bins. assign pt of bin w/ least diff
10009  //do not include default bins in calculation
10010  for (int k = j; k < 28; k++) {
10011  if ((dphifr0[0][i][k] != -1 || sigmafr0[0][i][k] != 1) &&
10012  (dphifr0[3][i][k] != -1 || sigmafr0[3][i][k] != 1)) {
10013  diff = 1.5625 * ((pow((dphi1 - dphifr0[0][i][k]), 2) / pow(sigmafr0[0][i][k], 2)) +
10014  (pow((dphi2 - dphifr0[3][i][k]), 2) / pow(sigmafr0[3][i][k], 2)) -
10015  (1.2 * (dphi1 - dphifr0[0][i][k]) * (dphi2 - dphifr0[3][i][k]) /
10016  (sigmafr0[0][i][k] * sigmafr0[3][i][k])));
10017  if (diff < min) {
10018  min = diff;
10019  ptmin = ptbins[k];
10020  ptmax = ptbins[k + 1];
10021  }
10022  }
10023  }
10024  mypt = (ptmin + ptmax) / 2;
10025  }
10026  }
10027 
10028  if (fr == 1) {
10029  //advance past bins in array w/ default values
10030  //default is: dphifr1[x][y][z] = -1, sigmafr1[x][y][z] = 1
10031  int j = 0; //start from 1st column, j = 0
10032  while (
10033  ((dphifr1[0][i][j] == -1 && sigmafr1[0][i][j] == 1) || (dphifr1[3][i][j] == -1 && sigmafr1[3][i][j] == 1)) &&
10034  j != 28)
10035  j++;
10036  if (j == 28) {
10037  // std::cout<<" L1MuCSCPtParams: every entry in row is default"<<std::endl;
10038  edm::LogInfo("CSCTFPtMethods::Pt3StnChiSq()") << "Every entry in row is default";
10039  // exit(0); //normal termination
10040  bCallOldMethod = true;
10041  }
10042 
10043  if (!bCallOldMethod) {
10044  //set min, ptmin, ptmax to first bin
10045  //in row that is not default
10046  min = 1.5625 * ((pow((dphi1 - dphifr1[0][i][j]), 2) / pow(sigmafr1[0][i][j], 2)) +
10047  (pow((dphi2 - dphifr1[3][i][j]), 2) / pow(sigmafr1[3][i][j], 2)) -
10048  (1.2 * (dphi1 - dphifr1[0][i][j]) * (dphi2 - dphifr1[3][i][j]) /
10049  (sigmafr1[0][i][j] * sigmafr1[3][i][j]))); //calculate chi square
10050  ptmin = ptbins[j];
10051  ptmax = ptbins[j + 1];
10052 
10053  //loop through all pt bins. assign pt of bin w/ least diff
10054  //do not include default bins in calculation
10055  for (int k = j; k < 28; k++) {
10056  if ((dphifr1[0][i][k] != -1 || sigmafr1[0][i][k] != 1) &&
10057  (dphifr1[3][i][k] != -1 || sigmafr1[3][i][k] != 1)) {
10058  diff = 1.5625 * ((pow((dphi1 - dphifr1[0][i][k]), 2) / pow(sigmafr1[0][i][k], 2)) +
10059  (pow((dphi2 - dphifr1[3][i][k]), 2) / pow(sigmafr1[3][i][k], 2)) -
10060  (1.2 * (dphi1 - dphifr1[0][i][k]) * (dphi2 - dphifr1[3][i][k]) /
10061  (sigmafr1[0][i][k] * sigmafr1[3][i][k])));
10062  if (diff < min) {
10063  min = diff;
10064  ptmin = ptbins[k];
10065  ptmax = ptbins[k + 1];
10066  }
10067  }
10068  }
10069  mypt = (ptmin + ptmax) / 2;
10070  }
10071  }
10072  }
10073 
10074  if (bCallOldMethod) {
10075  float dphi12R = (static_cast<float>(dphi1copy)) / static_cast<float>(1 << 12) * CSCTFConstants::SECTOR_RAD;
10076  float dphi23R = (static_cast<float>(dphi2copy)) / static_cast<float>(1 << 12) * CSCTFConstants::SECTOR_RAD;
10077  // change defintion of track type to old method
10078  mypt = Pt3Stn(type - 3, eta, dphi12R, dphi23R, fr);
10079  }
10080  return mypt;
10081 }
static const float dphifr1[4][15][28]
Log< level::Error, false > LogError
static const float dphifr0[4][15][28]
static const float sigmafr0[4][15][28]
float Pt3Stn(int type, float eta, float dphi1, float dphi2, int fr=-1) const
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
Log< level::Info, false > LogInfo
double ptmin
Definition: HydjetWrapper.h:86
static const double SECTOR_RAD
static const float ptbins[29]
Definition: mypt.h:6
Log< level::Warning, false > LogWarning
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
static const float sigmafr1[4][15][28]
static const float etabins[16]
def exit(msg="")

◆ Pt3StnHybrid()

float CSCTFPtMethods::Pt3StnHybrid ( int  type,
float  eta,
int  dphi1,
int  dphi2,
int  fr 
) const

Definition at line 10095 of file CSCTFPtMethods.cc.

References PVValHelper::eta, Pt3Stn(), Pt3StnChiSq(), and CSCTFConstants::SECTOR_RAD.

Referenced by CSCTFPtLUT::calcPt().

10095  {
10096  float mypt = 0.0;
10097 
10098  mypt = Pt3StnChiSq(type, eta, dphi1, dphi2, fr);
10099  if (mypt >= 8.0) {
10100  float dphi12R = (static_cast<float>(dphi1)) / static_cast<float>(1 << 12) * CSCTFConstants::SECTOR_RAD;
10101  float dphi23R = (static_cast<float>(dphi2)) / static_cast<float>(1 << 12) * CSCTFConstants::SECTOR_RAD;
10102  // change defintion of track type to old method
10103  mypt = Pt3Stn(type - 3, eta, dphi12R, dphi23R, fr);
10104  }
10105 
10106  return mypt;
10107 }
float Pt3StnChiSq(int type, float eta, int dphi1, int dphi2, int fr) const
float Pt3Stn(int type, float eta, float dphi1, float dphi2, int fr=-1) const
static const double SECTOR_RAD
Definition: mypt.h:6

◆ PtEff90()

float CSCTFPtMethods::PtEff90 ( float  pt,
float  eta,
int  mode 
) const

Legacy Pt90 calculation function

Definition at line 10133 of file CSCTFPtMethods.cc.

References HltBtagPostValidation_cff::c, PVValHelper::eta, ALCARECOPromptCalibProdSiPixelAli0T_cff::mode, and DiDispStaMuonMonitor_cfi::pt.

10133  {
10134  // set pT resolution
10135  float c;
10136  switch (mode) {
10137  // 3-stn with ME1
10138  case 2:
10139  case 3:
10140  case 4:
10141  // leave as 2 Stn for now:
10142  // if (eta < 2.0)
10143  // c = 0.2;
10144  // else
10145  // c = 0.2 + (eta-2.0)*0.5;
10146  // break;
10147  // 2-stn with ME1
10148  case 6:
10149  case 7:
10150  // c=(-.2999 * (eta*eta*eta) + 2.030 * (eta*eta) - 4.235 * eta + 3.024)+0.02;
10151  // Try just fixed value from fits to Pt turn-on curves
10152  c = 0.3;
10153  break;
10154  // 2 or 3 stn without ME1
10155  case 5:
10156  case 8:
10157  case 9:
10158  c = (-2.484 * (eta * eta * eta) + 14.43 * (eta * eta) - 27.66 * eta + 18.47) * .72;
10159  break;
10160  case 10:
10161  c = 2.0;
10162  break;
10163  // MB1 tracks
10164  case 11:
10165  case 12:
10166  case 13:
10167  case 14:
10168  case 15:
10169  c = 0.3;
10170  break;
10171  default:
10172  c = 0.0;
10173  };
10174  // Calculation of 90% threshold from 50% one, assuming Gaussian resolution
10175  // 90% of Gaussian area extends to 1.28*sigma
10176  if (c > 0.78)
10177  c = 0.78;
10178  // return pt/(1.0 - 1.28*c);
10179  // Let's go back to old empirical method:
10180  return pt * (1.0 + 1.28 * c);
10181 }

Member Data Documentation

◆ A_mu12Front

const double CSCTFPtMethods::A_mu12Front
static

parameters for Anna's method 2010

Definition at line 104 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2010(), Pt2Stn2012(), Pt3Stn2010(), and Pt3Stn2012().

◆ A_mu12Rare

const double CSCTFPtMethods::A_mu12Rare
static

Definition at line 111 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2010(), Pt2Stn2012(), Pt3Stn2010(), and Pt3Stn2012().

◆ A_mu13Front

const double CSCTFPtMethods::A_mu13Front
static

Definition at line 106 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2010(), Pt2Stn2012(), Pt3Stn2010(), and Pt3Stn2012().

◆ A_mu13Rare

const double CSCTFPtMethods::A_mu13Rare
static

Definition at line 113 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2010(), Pt2Stn2012(), Pt3Stn2010(), and Pt3Stn2012().

◆ A_mu14Front

const double CSCTFPtMethods::A_mu14Front
static

Definition at line 108 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2010(), and Pt2Stn2012().

◆ A_mu14Rare

const double CSCTFPtMethods::A_mu14Rare
static

Definition at line 115 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2010(), and Pt2Stn2012().

◆ A_mu23

const double CSCTFPtMethods::A_mu23
static

Definition at line 125 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2010(), Pt2Stn2012(), Pt3Stn2010(), and Pt3Stn2012().

◆ A_mu24

const double CSCTFPtMethods::A_mu24
static

Definition at line 127 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2010(), Pt2Stn2012(), Pt3Stn2010(), and Pt3Stn2012().

◆ A_mu34

const double CSCTFPtMethods::A_mu34
static

Definition at line 129 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2010(), Pt2Stn2012(), Pt3Stn2010(), and Pt3Stn2012().

◆ A_mu51

const double CSCTFPtMethods::A_mu51
static
Initial value:
= {
{-0.30205049387075266765, -0.19825408793401680385, -0.10259572704977054647, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0.39029489236430164878, -0.99999999999950184293, -0.99999999991334242999, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{-0.0082240407388394932281, -0.008489109806000837144, -0.0096722775887914218262, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{1.4884036315353963431, -2.8577685774096766025, -3.1123617094902709113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}

Definition at line 118 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2010(), Pt2Stn2012(), Pt3Stn2010(), and Pt3Stn2012().

◆ A_mu52

const double CSCTFPtMethods::A_mu52
static
Initial value:
= {
{0, -0.31934822512291188845, -0.24671378669106625026, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, -0.99999999999980493381, -0.99999999999999167333, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, -0.0073087160764979198016, -0.0070564603063957591009, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, -5.0384103551069152616, -5.6736067150957572025, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}

Definition at line 120 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2010(), Pt2Stn2012(), Pt3Stn2010(), and Pt3Stn2012().

◆ A_mu53

const double CSCTFPtMethods::A_mu53
static
Initial value:
= {{0, 0, -0.2362111548723856147, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0.58675988413655344456, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, -0.0074765217760223816323, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 1.392910355886719076, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}

Definition at line 122 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2010(), and Pt2Stn2012().

◆ A_rho123FrontCSCTF

const double CSCTFPtMethods::A_rho123FrontCSCTF
static

Definition at line 140 of file CSCTFPtMethods.h.

Referenced by Pt3Stn2010(), and Pt3Stn2012().

◆ A_rho123RareCSCTF

const double CSCTFPtMethods::A_rho123RareCSCTF
static

Definition at line 144 of file CSCTFPtMethods.h.

Referenced by Pt3Stn2010(), and Pt3Stn2012().

◆ A_rho124FrontCSCTF

const double CSCTFPtMethods::A_rho124FrontCSCTF
static

Definition at line 141 of file CSCTFPtMethods.h.

Referenced by Pt3Stn2010(), and Pt3Stn2012().

◆ A_rho124RareCSCTF

const double CSCTFPtMethods::A_rho124RareCSCTF
static

Definition at line 145 of file CSCTFPtMethods.h.

Referenced by Pt3Stn2010(), and Pt3Stn2012().

◆ A_rho134FrontCSCTF

const double CSCTFPtMethods::A_rho134FrontCSCTF
static

Definition at line 142 of file CSCTFPtMethods.h.

Referenced by Pt3Stn2010(), and Pt3Stn2012().

◆ A_rho134RareCSCTF

const double CSCTFPtMethods::A_rho134RareCSCTF
static

Definition at line 146 of file CSCTFPtMethods.h.

Referenced by Pt3Stn2010(), and Pt3Stn2012().

◆ A_rho234CSCTF

const double CSCTFPtMethods::A_rho234CSCTF
static

Definition at line 148 of file CSCTFPtMethods.h.

Referenced by Pt3Stn2010(), and Pt3Stn2012().

◆ A_rho512

const double CSCTFPtMethods::A_rho512
static
Initial value:
= {
{0, -1.3270643828972497058, -0.40947841616853780655, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 2.025201781399017964, 0.58089265964690128818, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, -0.73760841017029699085, -0.060534778841327505083, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0.077735281441295198124, -0.017952905037001157251, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0.005510074476231469412, 0.26061236699994605459, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}

DT correlation.

Definition at line 150 of file CSCTFPtMethods.h.

Referenced by Pt3Stn2010(), and Pt3Stn2012().

◆ A_rho513

const double CSCTFPtMethods::A_rho513
static
Initial value:
= {{0, 0, 0.18116780706048338234, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, -0.10826967270771679919, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0.033488168126484141318, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, -0.0040355575386412517735, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, -0.4934185910548575249, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}

Definition at line 151 of file CSCTFPtMethods.h.

Referenced by Pt3Stn2010(), and Pt3Stn2012().

◆ A_rho523

const double CSCTFPtMethods::A_rho523
static
Initial value:
= {{0, 0, -1.9080285362497979573, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 3.2540326879755121503, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, -1.2246911037569772063, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0.13624286476587679773, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0.24605674796105389546, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}

Definition at line 152 of file CSCTFPtMethods.h.

Referenced by Pt3Stn2010(), and Pt3Stn2012().

◆ A_sig12Front

const double CSCTFPtMethods::A_sig12Front
static

Definition at line 105 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2010(), Pt2Stn2012(), Pt3Stn2010(), and Pt3Stn2012().

◆ A_sig12Rare

const double CSCTFPtMethods::A_sig12Rare
static

Definition at line 112 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2010(), Pt2Stn2012(), Pt3Stn2010(), and Pt3Stn2012().

◆ A_sig13Front

const double CSCTFPtMethods::A_sig13Front
static

Definition at line 107 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2010(), Pt2Stn2012(), Pt3Stn2010(), and Pt3Stn2012().

◆ A_sig13Rare

const double CSCTFPtMethods::A_sig13Rare
static

Definition at line 114 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2010(), Pt2Stn2012(), Pt3Stn2010(), and Pt3Stn2012().

◆ A_sig14Front

const double CSCTFPtMethods::A_sig14Front
static

Definition at line 109 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2010(), and Pt2Stn2012().

◆ A_sig14Rare

const double CSCTFPtMethods::A_sig14Rare
static

Definition at line 116 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2010(), and Pt2Stn2012().

◆ A_sig23

const double CSCTFPtMethods::A_sig23
static

Definition at line 126 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2010(), Pt2Stn2012(), Pt3Stn2010(), and Pt3Stn2012().

◆ A_sig24

const double CSCTFPtMethods::A_sig24
static

Definition at line 128 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2010(), Pt2Stn2012(), Pt3Stn2010(), and Pt3Stn2012().

◆ A_sig34

const double CSCTFPtMethods::A_sig34
static

Definition at line 130 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2010(), Pt2Stn2012(), Pt3Stn2010(), and Pt3Stn2012().

◆ A_sig51

const double CSCTFPtMethods::A_sig51
static
Initial value:
= {
{0.013883456707760059509, 0.011790507803505339071, 2.4609763012162222395e-15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0.33358000572065177325, 0.19837044850549298558, 0.21329994540971500272, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0.0026062373849642236565, 0.0026272077989507240485, 0.0025484832112267707081, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}

Definition at line 119 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2010(), Pt2Stn2012(), Pt3Stn2010(), and Pt3Stn2012().

◆ A_sig52

const double CSCTFPtMethods::A_sig52
static
Initial value:
= {
{0, 0.021754484285831678786, 0.0079969520010703034479, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0.31662456185786602703, 0.25320436095234394314, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0.0026259453672001680305, 0.0027192866432913216992, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}

Definition at line 121 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2010(), Pt2Stn2012(), Pt3Stn2010(), and Pt3Stn2012().

◆ A_sig53

const double CSCTFPtMethods::A_sig53
static
Initial value:
= {{0, 0, 0.010082748878246528337, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0.37397019929001934502, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0.002686637834141298968, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}

Definition at line 123 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2010(), and Pt2Stn2012().

◆ AB_mu12F

const double CSCTFPtMethods::AB_mu12F
static

Definition at line 62 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2011(), Pt2Stn2012_DT(), Pt3Stn2011(), and Pt3Stn2012_DT().

◆ AB_mu12FME11

const double CSCTFPtMethods::AB_mu12FME11
static

Definition at line 43 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2011(), and Pt2Stn2012_DT().

◆ AB_mu12FnoME11

const double CSCTFPtMethods::AB_mu12FnoME11
static

parameters for Anna's method 2011

Definition at line 37 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2011(), and Pt2Stn2012_DT().

◆ AB_mu12R

const double CSCTFPtMethods::AB_mu12R
static

Definition at line 65 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2011(), Pt2Stn2012_DT(), Pt3Stn2011(), and Pt3Stn2012_DT().

◆ AB_mu12RME11

const double CSCTFPtMethods::AB_mu12RME11
static

Definition at line 46 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2011(), and Pt2Stn2012_DT().

◆ AB_mu12RnoME11

const double CSCTFPtMethods::AB_mu12RnoME11
static

Definition at line 40 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2011(), and Pt2Stn2012_DT().

◆ AB_mu13F

const double CSCTFPtMethods::AB_mu13F
static

Definition at line 63 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2011(), Pt2Stn2012_DT(), Pt3Stn2011(), and Pt3Stn2012_DT().

◆ AB_mu13FME11

const double CSCTFPtMethods::AB_mu13FME11
static

Definition at line 44 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2011(), and Pt2Stn2012_DT().

◆ AB_mu13FnoME11

const double CSCTFPtMethods::AB_mu13FnoME11
static

Definition at line 38 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2011(), and Pt2Stn2012_DT().

◆ AB_mu13R

const double CSCTFPtMethods::AB_mu13R
static

Definition at line 66 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2011(), Pt2Stn2012_DT(), Pt3Stn2011(), and Pt3Stn2012_DT().

◆ AB_mu13RME11

const double CSCTFPtMethods::AB_mu13RME11
static

Definition at line 47 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2011(), and Pt2Stn2012_DT().

◆ AB_mu13RnoME11

const double CSCTFPtMethods::AB_mu13RnoME11
static

Definition at line 41 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2011(), and Pt2Stn2012_DT().

◆ AB_mu14F

const double CSCTFPtMethods::AB_mu14F
static

Definition at line 64 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2011(), and Pt2Stn2012_DT().

◆ AB_mu14FME11

const double CSCTFPtMethods::AB_mu14FME11
static

Definition at line 45 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2011(), and Pt2Stn2012_DT().

◆ AB_mu14FnoME11

const double CSCTFPtMethods::AB_mu14FnoME11
static

Definition at line 39 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2011(), and Pt2Stn2012_DT().

◆ AB_mu14R

const double CSCTFPtMethods::AB_mu14R
static

Definition at line 67 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2011(), and Pt2Stn2012_DT().

◆ AB_mu14RME11

const double CSCTFPtMethods::AB_mu14RME11
static

Definition at line 48 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2011(), and Pt2Stn2012_DT().

◆ AB_mu14RnoME11

const double CSCTFPtMethods::AB_mu14RnoME11
static

Definition at line 42 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2011(), and Pt2Stn2012_DT().

◆ AB_mu23

const double CSCTFPtMethods::AB_mu23
static

Definition at line 68 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2011(), Pt2Stn2012_DT(), Pt3Stn2011(), and Pt3Stn2012_DT().

◆ AB_mu24

const double CSCTFPtMethods::AB_mu24
static

Definition at line 69 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2011(), Pt2Stn2012_DT(), Pt3Stn2011(), and Pt3Stn2012_DT().

◆ AB_mu34

const double CSCTFPtMethods::AB_mu34
static

Definition at line 70 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2011(), Pt2Stn2012_DT(), Pt3Stn2011(), and Pt3Stn2012_DT().

◆ AB_mu5

const double CSCTFPtMethods::AB_mu5
static

Definition at line 74 of file CSCTFPtMethods.h.

Referenced by Pt3Stn2011(), and Pt3Stn2012_DT().

◆ AB_mu51

const double CSCTFPtMethods::AB_mu51
static

Definition at line 71 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2011(), Pt2Stn2012_DT(), Pt3Stn2011(), and Pt3Stn2012_DT().

◆ AB_mu52

const double CSCTFPtMethods::AB_mu52
static
Initial value:
= {
{0, 0.28757434234141143747, 0.22290303793570814817, 0.17273536730279337448, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, -0.42706501927164292054, -0.32770564806566382376, -0.24329418737097086023, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, -1.4010615867360699891e-05, -0.00025119211587389166183, 0.0004052999487437024392, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 1.3739531719045416924, 1.2264113571191062046, 1.5786429063982712062, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}

Definition at line 72 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2011(), Pt2Stn2012_DT(), Pt3Stn2011(), and Pt3Stn2012_DT().

◆ AB_mu53

const double CSCTFPtMethods::AB_mu53
static
Initial value:
= {
{0, 0, 0.26147063359849342934, 0.21941755760197284575, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, -0.62831662471165483641, -0.5360020970162280296, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, -0.00054456170542904129128, -5.2823850021272572564e-05, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0.90160457604797583642, 0.89939017343329996645, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}

Definition at line 73 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2011(), Pt2Stn2012_DT(), Pt3Stn2011(), and Pt3Stn2012_DT().

◆ AB_rho123F

const double CSCTFPtMethods::AB_rho123F
static

Definition at line 90 of file CSCTFPtMethods.h.

Referenced by Pt3Stn2011(), and Pt3Stn2012_DT().

◆ AB_rho123R

const double CSCTFPtMethods::AB_rho123R
static

Definition at line 93 of file CSCTFPtMethods.h.

Referenced by Pt3Stn2011(), and Pt3Stn2012_DT().

◆ AB_rho124F

const double CSCTFPtMethods::AB_rho124F
static

Definition at line 91 of file CSCTFPtMethods.h.

Referenced by Pt3Stn2011(), and Pt3Stn2012_DT().

◆ AB_rho124R

const double CSCTFPtMethods::AB_rho124R
static

Definition at line 94 of file CSCTFPtMethods.h.

Referenced by Pt3Stn2011(), and Pt3Stn2012_DT().

◆ AB_rho134F

const double CSCTFPtMethods::AB_rho134F
static

Definition at line 92 of file CSCTFPtMethods.h.

Referenced by Pt3Stn2011(), and Pt3Stn2012_DT().

◆ AB_rho134R

const double CSCTFPtMethods::AB_rho134R
static

Definition at line 95 of file CSCTFPtMethods.h.

Referenced by Pt3Stn2011(), and Pt3Stn2012_DT().

◆ AB_rho234

const double CSCTFPtMethods::AB_rho234
static

Definition at line 96 of file CSCTFPtMethods.h.

Referenced by Pt3Stn2011(), and Pt3Stn2012_DT().

◆ AB_rho512

const double CSCTFPtMethods::AB_rho512
static
Initial value:
= {
{0, -0.10435343690000213612, 0.057141083389519162217, 0.023329220607928163878, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0.061466220874112284522, -0.001239563289620342415, -0.028051900619679361049, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}

Definition at line 97 of file CSCTFPtMethods.h.

Referenced by Pt3Stn2011(), and Pt3Stn2012_DT().

◆ AB_rho513

const double CSCTFPtMethods::AB_rho513
static
Initial value:
= {
{0, 0, -0.089534856488077518843, -0.084337975857153926751, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0.058028755308100914145, 0.033446616671726735193, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}

Definition at line 98 of file CSCTFPtMethods.h.

Referenced by Pt3Stn2011(), and Pt3Stn2012_DT().

◆ AB_rho51B

const double CSCTFPtMethods::AB_rho51B
static

Definition at line 100 of file CSCTFPtMethods.h.

Referenced by Pt3Stn2011(), and Pt3Stn2012_DT().

◆ AB_rho523

const double CSCTFPtMethods::AB_rho523
static
Initial value:
= {
{0, -0.48242311538441046137, 0.25779875833780019345, -0.45638836512748476304, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0.28941463846496195966, -0.15113497713160561897, 0.36832995181674366147, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}

Definition at line 99 of file CSCTFPtMethods.h.

Referenced by Pt3Stn2011(), and Pt3Stn2012_DT().

◆ AB_rho52B

const double CSCTFPtMethods::AB_rho52B
static
Initial value:
= {
{0, -7.746830214751867949, -0.46812267787622985349, -0.41343591928047368489, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 12.920758877131683917, 2.1193678084821674368, 0.85191889903041662091, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, -7.1168839095051934507, -2.1008659109588445624, -0.69884960118479577673, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 1.239800569290119725, 0.49720027595717164459, 0.15699136302342500682, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 1.2582151000263612772, 1.2238929501776998343, 0.88233142702097189236, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}

Definition at line 101 of file CSCTFPtMethods.h.

Referenced by Pt3Stn2011(), and Pt3Stn2012_DT().

◆ AB_rho53B

const double CSCTFPtMethods::AB_rho53B
static
Initial value:
= {
{0, 0, 105.35018363918895545, 62.071727282426813588, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, -180.24672833591944254, -170.8283169841847382, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 109.89608697213377297, 171.57904987557179766, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, -25.005328082184355765, -60.507830469988306277, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 3.0701361165201541681, 4.0540449945183194558, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}

Definition at line 102 of file CSCTFPtMethods.h.

Referenced by Pt3Stn2011(), and Pt3Stn2012_DT().

◆ AB_sig12F

const double CSCTFPtMethods::AB_sig12F
static

Definition at line 76 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2011(), Pt2Stn2012_DT(), Pt3Stn2011(), and Pt3Stn2012_DT().

◆ AB_sig12FME11

const double CSCTFPtMethods::AB_sig12FME11
static

Definition at line 55 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2011(), and Pt2Stn2012_DT().

◆ AB_sig12FnoME11

const double CSCTFPtMethods::AB_sig12FnoME11
static

Definition at line 49 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2011(), and Pt2Stn2012_DT().

◆ AB_sig12R

const double CSCTFPtMethods::AB_sig12R
static

Definition at line 79 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2011(), Pt2Stn2012_DT(), Pt3Stn2011(), and Pt3Stn2012_DT().

◆ AB_sig12RME11

const double CSCTFPtMethods::AB_sig12RME11
static

Definition at line 58 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2011(), and Pt2Stn2012_DT().

◆ AB_sig12RnoME11

const double CSCTFPtMethods::AB_sig12RnoME11
static

Definition at line 52 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2011(), and Pt2Stn2012_DT().

◆ AB_sig13F

const double CSCTFPtMethods::AB_sig13F
static

Definition at line 77 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2011(), Pt2Stn2012_DT(), Pt3Stn2011(), and Pt3Stn2012_DT().

◆ AB_sig13FME11

const double CSCTFPtMethods::AB_sig13FME11
static

Definition at line 56 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2011(), and Pt2Stn2012_DT().

◆ AB_sig13FnoME11

const double CSCTFPtMethods::AB_sig13FnoME11
static

Definition at line 50 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2011(), and Pt2Stn2012_DT().

◆ AB_sig13R

const double CSCTFPtMethods::AB_sig13R
static

Definition at line 80 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2011(), Pt2Stn2012_DT(), Pt3Stn2011(), and Pt3Stn2012_DT().

◆ AB_sig13RME11

const double CSCTFPtMethods::AB_sig13RME11
static

Definition at line 59 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2011(), and Pt2Stn2012_DT().

◆ AB_sig13RnoME11

const double CSCTFPtMethods::AB_sig13RnoME11
static

Definition at line 53 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2011(), and Pt2Stn2012_DT().

◆ AB_sig14F

const double CSCTFPtMethods::AB_sig14F
static

Definition at line 78 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2011(), and Pt2Stn2012_DT().

◆ AB_sig14FME11

const double CSCTFPtMethods::AB_sig14FME11
static

Definition at line 57 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2011(), and Pt2Stn2012_DT().

◆ AB_sig14FnoME11

const double CSCTFPtMethods::AB_sig14FnoME11
static

Definition at line 51 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2011(), and Pt2Stn2012_DT().

◆ AB_sig14R

const double CSCTFPtMethods::AB_sig14R
static

Definition at line 81 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2011(), and Pt2Stn2012_DT().

◆ AB_sig14RME11

const double CSCTFPtMethods::AB_sig14RME11
static

Definition at line 60 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2011(), and Pt2Stn2012_DT().

◆ AB_sig14RnoME11

const double CSCTFPtMethods::AB_sig14RnoME11
static

Definition at line 54 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2011(), and Pt2Stn2012_DT().

◆ AB_sig23

const double CSCTFPtMethods::AB_sig23
static

Definition at line 82 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2011(), Pt2Stn2012_DT(), Pt3Stn2011(), and Pt3Stn2012_DT().

◆ AB_sig24

const double CSCTFPtMethods::AB_sig24
static

Definition at line 83 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2011(), Pt2Stn2012_DT(), Pt3Stn2011(), and Pt3Stn2012_DT().

◆ AB_sig34

const double CSCTFPtMethods::AB_sig34
static

Definition at line 84 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2011(), Pt2Stn2012_DT(), Pt3Stn2011(), and Pt3Stn2012_DT().

◆ AB_sig5

const double CSCTFPtMethods::AB_sig5
static

Definition at line 88 of file CSCTFPtMethods.h.

Referenced by Pt3Stn2011(), and Pt3Stn2012_DT().

◆ AB_sig51

const double CSCTFPtMethods::AB_sig51
static

Definition at line 85 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2011(), Pt2Stn2012_DT(), Pt3Stn2011(), and Pt3Stn2012_DT().

◆ AB_sig52

const double CSCTFPtMethods::AB_sig52
static
Initial value:
= {
{0, 0.015190485414726475483, 0.029402840059661459332, -0.03788341461455211473, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0.57880911770054299659, 0.086708840790683153199, 0.96143975820959226564, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0.0017431812547872745089, 0.0016439557621822475496, 0.0024073931799825833838, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, -1.4962480474138397657, 0.43719757342237014486, -2.5570410154645890621, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}

Definition at line 86 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2011(), Pt2Stn2012_DT(), Pt3Stn2011(), and Pt3Stn2012_DT().

◆ AB_sig53

const double CSCTFPtMethods::AB_sig53
static
Initial value:
= {
{0, 0, 0.0048807272389305694088, 0.072311934401593946919, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0.58247011082391897396, -0.031665576145842380673, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0.0019289670515048294459, -0.00057867999502623438789, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, -1.1919870686056455167, 1.8999999999981564969, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}

Definition at line 87 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2011(), Pt2Stn2012_DT(), Pt3Stn2011(), and Pt3Stn2012_DT().

◆ AkHighEta_Fit1

const float CSCTFPtMethods::AkHighEta_Fit1
static
Initial value:
= {
{0.6275, -0.2133, 0.0, 0.0},
{-1.124, 2.492, -1.347, 0.2204},
{0.5214, -0.7536, 0.3913, -.06739},
{1.394, -1.886, 0.8809, -0.1369},
{-0.5519E-02, 0.8496E-02, 0.0, 0.0},
{0.6644, -0.2312, 0.0, 0.0},
{0.80, -0.54, 0.0, 0.0},
{0.80, -0.54, 0.0, 0.0},
}

Definition at line 29 of file CSCTFPtMethods.h.

Referenced by Pt3Stn().

◆ AkHighEta_Fit2

const float CSCTFPtMethods::AkHighEta_Fit2
static
Initial value:
= {
{0.6425, -0.2308, 0.0, 0.0},
{0.6923, -0.2336, 0.0, 0.0},
{-0.7147, .01117, -0.5255E-04, 0.7991E-07},
{-1.377, 2.150, -1.046, 0.1667},
{-.02974, .04816, -.02105, .003640},
{0.6425, -0.2308, 0.0, 0.0},
{0.80, -0.54, 0.0, 0.0},
{0.80, -0.54, 0.0, 0.0},
}

Definition at line 21 of file CSCTFPtMethods.h.

Referenced by Pt2Stn().

◆ AkLowEta_Fit1

const float CSCTFPtMethods::AkLowEta_Fit1
static
Initial value:
= {
{3.900, -8.391, 6.062, -1.436},
{8.03602, -17.5355, 12.7725, -3.0616},
{0.8372, -2.220, 1.908, -0.5233},
{-0.04389, 0.05174, 0.0, 0.0},
{-0.5519E-02, 0.8496E-02, 0.0, 0.0},
{-4.228, 8.546, -5.617, 1.235},
{0.80, -0.54, 0.0, 0.0},
{0.80, -0.54, 0.0, 0.0},
}

The three station pt measument only needs a one constant fit, but the dependence on eta is still there dphi = A/pt

Definition at line 28 of file CSCTFPtMethods.h.

Referenced by Pt3Stn().

◆ AkLowEta_Fit2

const float CSCTFPtMethods::AkLowEta_Fit2
static
Initial value:
= {
{-0.6131, 0.6870, 0.0285, -0.1147},
{8.03602, -17.5355, 12.7725, -3.0616},
{5.765, -12.85, 9.543, -2.345},
{-4.068, 8.254, -5.491, 1.214},
{-.02974, .04816, -.02105, .003640},
{-3.358, 7.038, -4.766, 1.079},
{0.80, -0.54, 0.0, 0.0},
{0.80, -0.54, 0.0, 0.0},
}

First is the parameterizations of Acosta/McDonald The two station pt measument needs a two constant fit with a break in the detector depending on what detectors it hit (eta) dphi = A/pt + B/(pt^2)

Definition at line 20 of file CSCTFPtMethods.h.

Referenced by Pt2Stn().

◆ BkHighEta_Fit2

const float CSCTFPtMethods::BkHighEta_Fit2
static
Initial value:
= {
{14.79, -21.10, 10.16, -1.623},
{70.67, -105.7, 52.49, -8.631},
{15.70, -23.94, 11.89, -1.939},
{17.18, -26.38, 13.13, -2.139},
{0.0, 0.0, 0.0, 0.0},
{14.79, -21.10, 10.16, -1.623},
{0.0, 0.0, 0.0, 0.0},
{0.0, 0.0, 0.0, 0.0}
}

Definition at line 24 of file CSCTFPtMethods.h.

Referenced by Pt2Stn().

◆ BkLowEta_Fit2

const float CSCTFPtMethods::BkLowEta_Fit2
static
Initial value:
= {
{7.0509, -7.3282, -0.1465, 1.308},
{0.0, 0.0, 0.0, 0.0},
{-38.55, 82.95, -59.66, 14.29},
{20.71, -45.34, 32.05, -7.415},
{0.0, 0.0, 0.0, 0.0},
{-0.6167, 0.08421, 0.2454, 0.0},
{0.0, 0.0, 0.0, 0.0},
{0.0, 0.0, 0.0, 0.0}
}

Definition at line 23 of file CSCTFPtMethods.h.

Referenced by Pt2Stn().

◆ dphifr0

const float CSCTFPtMethods::dphifr0
static

Definition at line 194 of file CSCTFPtMethods.h.

Referenced by Pt2StnChiSq(), and Pt3StnChiSq().

◆ dphifr1

const float CSCTFPtMethods::dphifr1
static

Definition at line 195 of file CSCTFPtMethods.h.

Referenced by Pt2StnChiSq(), and Pt3StnChiSq().

◆ etabins

const float CSCTFPtMethods::etabins
static
Initial value:
= {
0.9, 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2.0, 2.1, 2.2, 2.3, 2.4}

Definition at line 193 of file CSCTFPtMethods.h.

Referenced by Pt2Stn2010(), Pt2Stn2011(), Pt2Stn2012(), Pt2Stn2012_DT(), Pt2StnChiSq(), Pt3Stn2010(), Pt3Stn2011(), Pt3Stn2012(), Pt3Stn2012_DT(), and Pt3StnChiSq().

◆ FRCorrHighEta

const float CSCTFPtMethods::FRCorrHighEta
static
Initial value:
= {
{0.966, 1.176},
{0.966, 1.176},
{1.0, 1.0},
{1.0, 1.0},
{1.0, 1.0},
{1.0, 1.0},
{1.0, 1.0},
{1.0, 1.0}
}

Definition at line 34 of file CSCTFPtMethods.h.

Referenced by Pt2Stn(), and Pt3Stn().

◆ FRCorrLowEta

const float CSCTFPtMethods::FRCorrLowEta
static
Initial value:
= {
{1.30, 1.0},
{1.30, 1.0},
{1.0, 1.0},
{1.0, 1.0},
{1.0, 1.0},
{1.0, 1.0},
{1.0, 1.0},
{1.0, 1.0}
}

Corrections for ME1 F/R bit

Definition at line 33 of file CSCTFPtMethods.h.

Referenced by Pt2Stn(), and Pt3Stn().

◆ kGlobalScaleFactor

const float CSCTFPtMethods::kGlobalScaleFactor = 1.36
static

Definition at line 31 of file CSCTFPtMethods.h.

Referenced by Pt2Stn(), and Pt3Stn().

◆ ptbins

const float CSCTFPtMethods::ptbins
static
Initial value:
= {2.0, 2.5, 3.0, 3.5, 4.0, 4.5, 5.0, 6.0, 7.0, 8.0,
10.0, 12.0, 14.0, 16.0, 18.0, 20.0, 25.0, 30.0, 35.0, 40.0,
45.0, 50.0, 60.0, 70.0, 80.0, 90.0, 100.0, 120.0, 140.0}

Second are the parameterizations of Acosta/Yeh

Definition at line 192 of file CSCTFPtMethods.h.

Referenced by Pt2StnChiSq(), and Pt3StnChiSq().

◆ sigmafr0

const float CSCTFPtMethods::sigmafr0
static

Definition at line 196 of file CSCTFPtMethods.h.

Referenced by Pt2StnChiSq(), and Pt3StnChiSq().

◆ sigmafr1

const float CSCTFPtMethods::sigmafr1
static

Definition at line 197 of file CSCTFPtMethods.h.

Referenced by Pt2StnChiSq(), and Pt3StnChiSq().

◆ trigger_scale

const L1MuTriggerPtScale* CSCTFPtMethods::trigger_scale
private

Definition at line 223 of file CSCTFPtMethods.h.

Referenced by Pt2Stn(), Pt2Stn2010(), Pt2Stn2012(), Pt3Stn(), Pt3Stn2010(), and Pt3Stn2012().