//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ // 15.06.2011, MCP working group //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ////////////////// // HEADER FILES // ////////////////// #include "StacoTightScaleEffFactors.h" //***************************************************************************** ///////////////// // CONSTRUCTOR // ///////////////// Analysis::StacoTightScaleEffFactors::StacoTightScaleEffFactors(void) { m_last_run_periodB = 178109; //////////////////////////////////////////////////////////////// // FILL THE SCALE FACTOR AND SCALE FACTOR UNCERTAINTY VECTORS // //////////////////////////////////////////////////////////////// m_scale_factor_A = std::vector(10); m_scale_factor_uncertainty_A = std::vector(10); m_scale_factor_C = std::vector(10); m_scale_factor_uncertainty_C = std::vector(10); m_scale_factor_A[0] = 0.99717; m_scale_factor_A[1] = 1.01198; m_scale_factor_A[2] = 0.99516; m_scale_factor_A[3] = 0.96767; m_scale_factor_A[4] = 0.95199; m_scale_factor_A[5] = 0.99719; m_scale_factor_A[6] = 0.99927; m_scale_factor_A[7] = 1.00045; m_scale_factor_A[8] = 1.00846; m_scale_factor_A[9] = 0.99240; m_scale_factor_uncertainty_A[0] = 0.00315; m_scale_factor_uncertainty_A[1] = 0.00276; m_scale_factor_uncertainty_A[2] = 0.00355; m_scale_factor_uncertainty_A[3] = 0.00634; m_scale_factor_uncertainty_A[4] = 0.00453; m_scale_factor_uncertainty_A[5] = 0.00216; m_scale_factor_uncertainty_A[6] = 0.00176; m_scale_factor_uncertainty_A[7] = 0.00362; m_scale_factor_uncertainty_A[8] = 0.00490; m_scale_factor_uncertainty_A[9] = 0.00340; m_scale_factor_C[0] = 0.99064; m_scale_factor_C[1] = 1.00586; m_scale_factor_C[2] = 1.00400; m_scale_factor_C[3] = 0.97547; m_scale_factor_C[4] = 0.94820; m_scale_factor_C[5] = 1.00298; m_scale_factor_C[6] = 1.00003; m_scale_factor_C[7] = 0.99159; m_scale_factor_C[8] = 0.99449; m_scale_factor_C[9] = 0.99111; m_scale_factor_uncertainty_C[0] = 0.00342; m_scale_factor_uncertainty_C[1] = 0.00309; m_scale_factor_uncertainty_C[2] = 0.00353; m_scale_factor_uncertainty_C[3] = 0.00661; m_scale_factor_uncertainty_C[4] = 0.00467; m_scale_factor_uncertainty_C[5] = 0.00172; m_scale_factor_uncertainty_C[6] = 0.00166; m_scale_factor_uncertainty_C[7] = 0.00439; m_scale_factor_uncertainty_C[8] = 0.00494; m_scale_factor_uncertainty_C[9] = 0.00343; // separate values for period B // m_scale_factor_A_periodB = std::vector(10); m_scale_factor_uncertainty_A_periodB = std::vector(10); m_scale_factor_C_periodB = std::vector(10); m_scale_factor_uncertainty_C_periodB = std::vector(10); m_scale_factor_A_periodB[0] = 0.9780; m_scale_factor_A_periodB[1] = 1.0064; m_scale_factor_A_periodB[2] = 0.9719; m_scale_factor_A_periodB[3] = 0.9533; m_scale_factor_A_periodB[4] = 0.9639; m_scale_factor_A_periodB[5] = 0.9787; m_scale_factor_A_periodB[6] = 1.0098; m_scale_factor_A_periodB[7] = 0.9913; m_scale_factor_A_periodB[8] = 0.9799; m_scale_factor_A_periodB[9] = 1.0078; m_scale_factor_uncertainty_A_periodB[0] = 0.0188; m_scale_factor_uncertainty_A_periodB[1] = 0.0147; m_scale_factor_uncertainty_A_periodB[2] = 0.0207; m_scale_factor_uncertainty_A_periodB[3] = 0.0363; m_scale_factor_uncertainty_A_periodB[4] = 0.0228; m_scale_factor_uncertainty_A_periodB[5] = 0.0158; m_scale_factor_uncertainty_A_periodB[6] = 0.0061; m_scale_factor_uncertainty_A_periodB[7] = 0.0284; m_scale_factor_uncertainty_A_periodB[8] = 0.0351; m_scale_factor_uncertainty_A_periodB[9] = 0.0184; m_scale_factor_C_periodB[0] = 0.9821; m_scale_factor_C_periodB[1] = 0.9739; m_scale_factor_C_periodB[2] = 0.9721; m_scale_factor_C_periodB[3] = 0.9756; m_scale_factor_C_periodB[4] = 0.9712; m_scale_factor_C_periodB[5] = 0.9829; m_scale_factor_C_periodB[6] = 1.0090; m_scale_factor_C_periodB[7] = 0.9619; m_scale_factor_C_periodB[8] = 0.9896; m_scale_factor_C_periodB[9] = 0.9761; m_scale_factor_uncertainty_C_periodB[0] = 0.0204; m_scale_factor_uncertainty_C_periodB[1] = 0.0182; m_scale_factor_uncertainty_C_periodB[2] = 0.0224; m_scale_factor_uncertainty_C_periodB[3] = 0.0384; m_scale_factor_uncertainty_C_periodB[4] = 0.0224; m_scale_factor_uncertainty_C_periodB[5] = 0.0138; m_scale_factor_uncertainty_C_periodB[6] = 0.0063; m_scale_factor_uncertainty_C_periodB[7] = 0.0462; m_scale_factor_uncertainty_C_periodB[8] = 0.0298; m_scale_factor_uncertainty_C_periodB[9] = 0.0201; } //***************************************************************************** //////////////////////// // METHOD scaleFactor // //////////////////////// double Analysis::StacoTightScaleEffFactors::scaleFactor( const TLorentzVector & tlv) const { return scaleFactor(tlv, m_last_run_periodB+1); } //***************************************************************************** /////////////////////////////////// // METHOD scaleFactorUncertainty // /////////////////////////////////// double Analysis::StacoTightScaleEffFactors::scaleFactorUncertainty( const TLorentzVector & tlv) const { return scaleFactorUncertainty(tlv, m_last_run_periodB+1); } //***************************************************************************** ////////////////////////////// // METHOD scaleFactor(., .) // ////////////////////////////// double Analysis::StacoTightScaleEffFactors::scaleFactor( const TLorentzVector & tlv, const unsigned int & run_nb) const { int bin(m_eta_phi_binning.symmetricBin(&tlv)-1); if(bin<0) return 1.; //UNKNOWN BIN if (tlv.Eta()>0) { if (run_nb>m_last_run_periodB) { return m_scale_factor_A[bin]; } else { return m_scale_factor_A_periodB[bin]; } } if (run_nb>m_last_run_periodB) { return m_scale_factor_C[bin]; } else { return m_scale_factor_C_periodB[bin]; } } //***************************************************************************** ///////////////////////////////////////// // METHOD scaleFactorUncertainty(., .) // ///////////////////////////////////////// double Analysis::StacoTightScaleEffFactors::scaleFactorUncertainty( const TLorentzVector & tlv, const unsigned int & run_nb) const { int bin(m_eta_phi_binning.symmetricBin(&tlv)-1); if(bin<0) return 1.; //UNKNOWN BIN if (tlv.Eta()>0) { if (run_nb>m_last_run_periodB) { return m_scale_factor_uncertainty_A[bin]; } else { return m_scale_factor_uncertainty_A_periodB[bin]; } } if (run_nb>m_last_run_periodB) { return m_scale_factor_uncertainty_C[bin]; } else { return m_scale_factor_uncertainty_C_periodB[bin]; } } //***************************************************************************** ///////////////////////////////////////////// // METHOD scaleFactorSystematicUncertainty // ///////////////////////////////////////////// double Analysis::StacoTightScaleEffFactors::scaleFactorSystematicUncertainty( const TLorentzVector & tlv) const { return 0.002+4.2e-6*tlv.E()/1000.0; }