Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:21:42

0001 #ifndef CSCTrackFinder_CSCTFPtMethods_h
0002 #define CSCTrackFinder_CSCTFPtMethods_h
0003 
0004 #include <CondFormats/L1TObjects/interface/L1MuTriggerPtScale.h>
0005 
0006 class L1MuTriggerPtScale;
0007 
0008 class CSCTFPtMethods {
0009 public:
0010   enum { kMaxParameters = 4 };
0011   /** Allowed station combinations for extrapolation units */
0012   enum { kME1andME2 = 1, kME1andME3, kME2andME3, kME2andME4, kME3andME4, kME1andME2ovr, kME2andMB1, kME2andMB2 };
0013 
0014   CSCTFPtMethods(const L1MuTriggerPtScale *ptScale = nullptr);
0015 
0016   /** First is the parameterizations of Acosta/McDonald */
0017 
0018   /** The two station pt measument needs a two constant fit with a break in the detector depending on what detectors it hit (eta) */
0019   /** dphi = A/pt + B/(pt^2) */
0020   static const float AkLowEta_Fit2[kME2andMB2][kMaxParameters];
0021   static const float AkHighEta_Fit2[kME2andMB2][kMaxParameters];
0022 
0023   static const float BkLowEta_Fit2[kME2andMB2][kMaxParameters];
0024   static const float BkHighEta_Fit2[kME2andMB2][kMaxParameters];
0025 
0026   /** The three station pt measument only needs a one constant fit, but the dependence on eta is still there */
0027   /** dphi = A/pt */
0028   static const float AkLowEta_Fit1[kME2andMB2][kMaxParameters];
0029   static const float AkHighEta_Fit1[kME2andMB2][kMaxParameters];
0030 
0031   static const float kGlobalScaleFactor;
0032   /** Corrections for ME1 F/R bit */
0033   static const float FRCorrLowEta[kME2andMB2][2];
0034   static const float FRCorrHighEta[kME2andMB2][2];
0035 
0036   /** parameters for Anna's method 2011*/
0037   static const double AB_mu12FnoME11[4][15];
0038   static const double AB_mu13FnoME11[4][15];
0039   static const double AB_mu14FnoME11[4][15];
0040   static const double AB_mu12RnoME11[4][15];
0041   static const double AB_mu13RnoME11[4][15];
0042   static const double AB_mu14RnoME11[4][15];
0043   static const double AB_mu12FME11[4][15];
0044   static const double AB_mu13FME11[4][15];
0045   static const double AB_mu14FME11[4][15];
0046   static const double AB_mu12RME11[4][15];
0047   static const double AB_mu13RME11[4][15];
0048   static const double AB_mu14RME11[4][15];
0049   static const double AB_sig12FnoME11[4][15];
0050   static const double AB_sig13FnoME11[4][15];
0051   static const double AB_sig14FnoME11[4][15];
0052   static const double AB_sig12RnoME11[4][15];
0053   static const double AB_sig13RnoME11[4][15];
0054   static const double AB_sig14RnoME11[4][15];
0055   static const double AB_sig12FME11[4][15];
0056   static const double AB_sig13FME11[4][15];
0057   static const double AB_sig14FME11[4][15];
0058   static const double AB_sig12RME11[4][15];
0059   static const double AB_sig13RME11[4][15];
0060   static const double AB_sig14RME11[4][15];
0061 
0062   static const double AB_mu12F[4][15];
0063   static const double AB_mu13F[4][15];
0064   static const double AB_mu14F[4][15];
0065   static const double AB_mu12R[4][15];
0066   static const double AB_mu13R[4][15];
0067   static const double AB_mu14R[4][15];
0068   static const double AB_mu23[4][15];
0069   static const double AB_mu24[4][15];
0070   static const double AB_mu34[4][15];
0071   static const double AB_mu51[4][15];
0072   static const double AB_mu52[4][15];
0073   static const double AB_mu53[4][15];
0074   static const double AB_mu5[4][15];
0075 
0076   static const double AB_sig12F[4][15];
0077   static const double AB_sig13F[4][15];
0078   static const double AB_sig14F[4][15];
0079   static const double AB_sig12R[4][15];
0080   static const double AB_sig13R[4][15];
0081   static const double AB_sig14R[4][15];
0082   static const double AB_sig23[4][15];
0083   static const double AB_sig24[4][15];
0084   static const double AB_sig34[4][15];
0085   static const double AB_sig51[4][15];
0086   static const double AB_sig52[4][15];
0087   static const double AB_sig53[4][15];
0088   static const double AB_sig5[4][15];
0089 
0090   static const double AB_rho123F[5][15];
0091   static const double AB_rho124F[5][15];
0092   static const double AB_rho134F[5][15];
0093   static const double AB_rho123R[5][15];
0094   static const double AB_rho124R[5][15];
0095   static const double AB_rho134R[5][15];
0096   static const double AB_rho234[5][15];
0097   static const double AB_rho512[5][15];
0098   static const double AB_rho513[5][15];
0099   static const double AB_rho523[5][15];
0100   static const double AB_rho51B[5][15];
0101   static const double AB_rho52B[5][15];
0102   static const double AB_rho53B[5][15];
0103   /** parameters for Anna's method 2010*/
0104   static const double A_mu12Front[4][15];
0105   static const double A_sig12Front[3][15];
0106   static const double A_mu13Front[4][15];
0107   static const double A_sig13Front[3][15];
0108   static const double A_mu14Front[4][15];
0109   static const double A_sig14Front[3][15];
0110 
0111   static const double A_mu12Rare[4][15];
0112   static const double A_sig12Rare[3][15];
0113   static const double A_mu13Rare[4][15];
0114   static const double A_sig13Rare[3][15];
0115   static const double A_mu14Rare[4][15];
0116   static const double A_sig14Rare[3][15];
0117 
0118   static const double A_mu51[4][15];
0119   static const double A_sig51[3][15];
0120   static const double A_mu52[4][15];
0121   static const double A_sig52[3][15];
0122   static const double A_mu53[4][15];
0123   static const double A_sig53[3][15];
0124 
0125   static const double A_mu23[4][15];
0126   static const double A_sig23[3][15];
0127   static const double A_mu24[4][15];
0128   static const double A_sig24[3][15];
0129   static const double A_mu34[4][15];
0130   static const double A_sig34[3][15];
0131 
0132   /*
0133   static const double A_mu23CSCTF[4][15];
0134   static const double A_sig23CSCTF[3][15];
0135   static const double A_mu24CSCTF[4][15];
0136   static const double A_sig24CSCTF[3][15];
0137   static const double A_mu34CSCTF[4][15];
0138   static const double A_sig34CSCTF[3][15];
0139 */
0140   static const double A_rho123FrontCSCTF[5][15];
0141   static const double A_rho124FrontCSCTF[5][15];
0142   static const double A_rho134FrontCSCTF[5][15];
0143 
0144   static const double A_rho123RareCSCTF[5][15];
0145   static const double A_rho124RareCSCTF[5][15];
0146   static const double A_rho134RareCSCTF[5][15];
0147 
0148   static const double A_rho234CSCTF[5][15];
0149 
0150   static const double A_rho512[5][15];
0151   static const double A_rho513[5][15];
0152   static const double A_rho523[5][15];
0153 
0154   // don't care about Mode 12: 1-2-b1 yet, should add A_mu12CSCTF or A_mu51CSCTF depending how calculate dphi12
0155 
0156   /** 2-station Pt measurement for types (see SP class for 2-stn types) */
0157   float Pt2Stn(int type, float eta, float dphi, int fr = -1) const;
0158   float Pt2Stn2010(int type, float eta, float dphi, int fr = -1, int method = 11) const;
0159   float Pt2Stn2011(int type, float eta, float dphi, int fr = -1, int method = 11, int phiSign = 2) const;
0160   float Pt2Stn2012(int type, float eta, float dphi, int PtbyMLH, float &theLH, int fr = -1, int method = 11) const;
0161   float Pt2Stn2012_DT(
0162       int type, float eta, float dphi, int PtbyMLH, float &theLH, int fr = -1, int method = 11, int phiSign = 2) const;
0163   double Likelihood2(double *phi12, double *par_m12, double *par_sig12, double *v) const;
0164   double Likelihood2_2011(double *phi12, double *par_m12, double *par_sig12, double *v) const;
0165 
0166   /** 3-station Pt measurement for types (see SP class for 3-stn types) */
0167   float Pt3Stn(int type, float eta, float dphi1, float dphi2, int fr = -1) const;
0168   float Pt3Stn2010(int type, float eta, float dphi1, float dphi2, int fr = -1, int method = 11) const;
0169   float Pt3Stn2011(int type, float eta, float dphi1, float dphi2, int fr = -1, int method = 11) const;
0170   float Pt3Stn2012(
0171       int type, float eta, float dphi1, float dphi2, int PtbyMLH, float &theLH, int fr = -1, int method = 11) const;
0172   float Pt3Stn2012_DT(
0173       int type, float eta, float dphi1, float dphi2, int PtbyMLH, float &theLH, int fr = -1, int method = 11) const;
0174   double Likelihood(double *phi12,
0175                     double *phi23,
0176                     double *par_m12,
0177                     double *par_m23,
0178                     double *par_sig12,
0179                     double *par_sig23,
0180                     double *par_rho,
0181                     double *v) const;
0182   double Likelihood2011(double *phi12,
0183                         double *phi23,
0184                         double *par_m12,
0185                         double *par_m23,
0186                         double *par_sig12,
0187                         double *par_sig23,
0188                         double *par_rho,
0189                         double *v) const;
0190   /** Second are the parameterizations of Acosta/Yeh */
0191 
0192   static const float ptbins[29];
0193   static const float etabins[16];
0194   static const float dphifr0[4][15][28];
0195   static const float dphifr1[4][15][28];
0196   static const float sigmafr0[4][15][28];
0197   static const float sigmafr1[4][15][28];
0198 
0199   float Pt2StnChiSq(int type, float eta, int dphi, int fr) const;
0200   float Pt3StnChiSq(int type, float eta, int dphi1, int dphi2, int fr) const;
0201 
0202   /** Third is the hybrid method */
0203 
0204   float Pt2StnHybrid(int type, float eta, int dphi, int fr) const;
0205   float Pt3StnHybrid(int type, float eta, int dphi1, int dphi2, int fr) const;
0206 
0207   /** The hybrid method may be changing soon to:
0208    *  1st Calculate PT with Darin's method
0209    *  2nd if BELOW a certain cut call Cathy's method
0210    *  3rd if Cathy's < Darin's use Cathy's otherwise return Darin's
0211    *  A study needs to be performed to determine any gains from this procedure.
0212    */
0213 
0214   /** A method to calculate the charge valid bit
0215    *  Regions where this bit is were determined via simulation
0216    */
0217   bool chargeValid(unsigned Pt, unsigned Quality, unsigned Eta, unsigned method) const;
0218 
0219   /** Legacy Pt90 calculation function */
0220   float PtEff90(float pt, float eta, int mode) const;
0221 
0222 private:
0223   const L1MuTriggerPtScale *trigger_scale;
0224 };
0225 
0226 #endif