1 #ifndef L1Trigger_Phase2L1GT_L1GTDeltaCut_h 2 #define L1Trigger_Phase2L1GT_L1GTDeltaCut_h 28 bool enable_sanity_checks =
false,
36 maxDEta_(getOptionalParam<int, double>(
38 minDPhi_(getOptionalParam<int, double>(
40 maxDPhi_(getOptionalParam<int, double>(
42 minDz_(getOptionalParam<int, double>(
44 maxDz_(getOptionalParam<int, double>(
72 std::optional<uint32_t>
dEta;
76 : obj2.
hwEta().to_int() - obj1.
hwEta().to_int();
84 std::optional<uint32_t> dPhi;
88 dPhi = HW_PI -
abs(
abs(obj1.
hwPhi().to_int() - obj2.
hwPhi().to_int()) - HW_PI);
101 uint32_t dRSquared =
dEta.value() *
dEta.value() + dPhi.value() * dPhi.value();
109 int32_t lutCoshDEta = 0;
115 int32_t lutCosDPhi = 0;
126 edm::LogError(
"COSH LUT") <<
"Difference larger than max LUT error: " << coshEtaLUTMax
127 <<
", lut: " << lutCoshDEta
129 <<
", dEta: " <<
dEta.value() <<
", scale: " << etaLUTScale;
135 <<
", lut: " << lutCosDPhi <<
", calc: " 141 int64_t invMassSqrDiv2;
144 invMassSqrDiv2 = obj1.
hwPT().to_int64() * obj2.
hwPT().to_int64() * (lutCoshDEta - lutCosDPhi);
153 invMassSqrDiv2 = obj1.
hwPT().to_int64() * obj2.
hwPT().to_int64() * lutCoshDEta;
178 int64_t pTSquared = obj1.
hwPT().to_int64() * obj1.
hwPT().to_int64() *
180 obj2.
hwPT().to_int64() * obj2.
hwPT().to_int64() *
182 2 * obj1.
hwPT().to_int64() * obj2.
hwPT().to_int64() * lutCosDPhi;
188 int64_t transMassDiv2 = obj1.
hwPT().to_int64() * obj2.
hwPT().to_int64() *
216 desc.addOptional<
double>(
"minDEta");
217 desc.addOptional<
double>(
"maxDEta");
218 desc.addOptional<
double>(
"minDPhi");
219 desc.addOptional<
double>(
"maxDPhi");
220 desc.addOptional<
double>(
"minDR");
221 desc.addOptional<
double>(
"maxDR");
222 desc.addOptional<
double>(
"minDz");
223 desc.addOptional<
double>(
"maxDz");
224 desc.addOptional<
double>(
"minInvMass");
225 desc.addOptional<
double>(
"maxInvMass");
226 desc.addOptional<
double>(
"minTransMass");
227 desc.addOptional<
double>(
"maxTransMass");
228 desc.addOptional<
double>(
"minCombPt");
229 desc.addOptional<
double>(
"maxCombPt");
230 desc.add<
bool>(
"os",
false);
231 desc.add<
bool>(
"ss",
false);
268 #endif // L1Trigger_Phase2L1GT_L1GTDeltaCut_h static constexpr uint32_t DETA_LUT_SPLIT
const std::optional< double > minPTSquared_
const std::optional< int > minDz_
const std::optional< double > maxTransMassSqrDiv2_
const std::optional< int > minDRSquared_
const std::optional< int > maxDRSquared_
const bool enable_sanity_checks_
const std::optional< int > minDPhi_
const L1GTSingleInOutLUT coshEtaLUT_
Log< level::Error, false > LogError
std::vector< InvariantMassError > InvariantMassErrorCollection
std::optional< T > getOptionalParam(const std::string &name, const edm::ParameterSet &config, std::function< T(K)> conv)
double hwMax_error() const
const std::optional< int > minDEta_
const std::optional< double > minInvMassSqrDiv2_
double output_scale() const
hwCharge_t hwCharge() const
Cos< T >::type cos(const T &t)
Abs< T >::type abs(const T &t)
bool checkObjects(const P2GTCandidate &obj1, const P2GTCandidate &obj2, InvariantMassErrorCollection &massErrors) const
const L1GTSingleInOutLUT coshEtaLUT2_
const std::optional< int > maxDEta_
const std::optional< double > maxPTSquared_
L1GTDeltaCut(const edm::ParameterSet &config, const edm::ParameterSet &lutConfig, const L1GTScales &scales, bool enable_sanity_checks=false, bool inv_mass_checks=false)
static void fillLUTDescriptions(edm::ParameterSetDescription &desc)
const std::optional< int > maxDPhi_
ParameterSet const & getParameterSet(ParameterSetID const &id)
const std::optional< double > maxInvMassSqrDiv2_
static void fillLUTDescriptions(edm::ParameterSetDescription &desc)
static void fillPSetDescription(edm::ParameterSetDescription &desc)
const std::optional< int > maxDz_
const std::optional< double > minTransMassSqrDiv2_
const L1GTSingleInOutLUT cosPhiLUT_
const L1GTScales & scales_
const bool inv_mass_checks_