11 #include "GaudiKernel/PhysicalConstants.h"
20 const std::string&
name,
40 return StatusCode::SUCCESS;
48 const float defaultBDTthreshold = 0.33482806;
50 if(
mu<10 || 80<
mu )
return defaultBDTthreshold;
51 if(
eff<0.5 || 1.<
eff )
return defaultBDTthreshold;
54 const std::vector<std::vector<float>>
par = {
55 { 2.9044277, -6.3516751, -4.0085606, 25.456841, -18.208683 },
56 { 0.066196623, -0.098157640, 0.027455008, -0.19900459, 0.16721183 },
57 { -0.00091570959, 1.4831281e-05, 0.0028768317, -0.00053051617, 0.00040427140 },
58 { 2.5249073e-06, 1.7882097e-06, -7.1741129e-06, -9.7309257e-07, -3.2151707e-05 },
59 { -8.2905419e-08, 3.9337893e-07, -5.8968642e-07, 2.6341441e-07, 2.4551736e-07 }
62 float thres = defaultBDTthreshold;
63 for (
size_t i = 0;
i < 5;
i++) {
64 for (
size_t j = 0; j < 5; j++) {
66 for (
size_t imu = 0; imu <
i; imu++)
tmp *=
mu;
67 for (
size_t jeff = 0; jeff < j; jeff++)
tmp *=
eff;
80 const float defaultBDTthreshold = 0.27072057;
82 if(
mu<10 || 80<
mu )
return defaultBDTthreshold;
83 if(
eff<0.5 || 1.<
eff )
return defaultBDTthreshold;
86 const std::vector<std::vector<float>>
par = {
87 { 1.8938782, -1.7096217, -8.7938548, 19.779355, -10.656187 },
88 { 0.048863505, -0.18192399, 0.30932576, -0.11527519, -0.13591443 },
89 { -0.00060239060, 0.00096109052, -0.0015378287, -0.0030951666, 0.0063958596 },
90 { 2.5855329e-06, 7.3128949e-06, -6.9676558e-06, 4.2141737e-05, -7.1813827e-05 },
91 { -4.8077006e-08, 1.0646790e-07, -8.0539473e-08, -1.9821312e-07, 3.4713098e-07 }
94 float thres = defaultBDTthreshold;
95 for (
size_t i = 0;
i < 5;
i++) {
96 for (
size_t j = 0; j < 5; j++) {
98 for (
size_t imu = 0; imu <
i; imu++)
tmp *=
mu;
99 for (
size_t jeff = 0; jeff < j; jeff++)
tmp *=
eff;
112 const float defaultBDTthreshold = 0.03773;
114 if(
mu<10 || 60<
mu )
return defaultBDTthreshold;
117 const float par0 = 0.404727;
118 const float par1 = -0.00344154;
119 const float par2 = -6.54218e-05;
120 const float par3 = -3.39841e-07;
121 const float par4 = 9.93062e-09;
133 size_t numHitDVs = toolInputs.size();
137 if ( numTrigger == 1 ) {
146 return StatusCode::SUCCESS;
154 bool isJetCutPassed =
false;
155 for (
auto&
input: toolInputs ) {
158 isJetCutPassed =
true;
164 if( ! isJetCutPassed )
return StatusCode::SUCCESS;
166 bool isPassed =
false;
168 for (
auto&
input: toolInputs ) {
182 ATH_MSG_DEBUG(
"Inclusive selection isPassed = " << isPassed);
183 return StatusCode::SUCCESS;
191 unsigned int n_jetpassed = 0;
192 for (
size_t cutIndex=0; cutIndex <
m_cutJetPtGeV.size(); ++cutIndex ) {
193 bool isJetCutPassed =
false;
194 for (
auto&
input: toolInputs ) {
197 isJetCutPassed =
true;
202 if( isJetCutPassed ) ++n_jetpassed;
204 if( n_jetpassed <
m_cutJetPtGeV.size() )
return StatusCode::SUCCESS;
209 for (
size_t cutIndex=0; cutIndex <
m_cutJetPtGeV.size(); ++cutIndex ) {
210 size_t elementIndex{ 0 };
211 for (
auto&
input: toolInputs ) {
215 passingSelection[cutIndex].push_back( elementIndex );
224 if ( passingSelection[cutIndex].
empty() ) {
225 ATH_MSG_DEBUG(
"No object passed selection " << cutIndex <<
" rejecting" );
226 return StatusCode::SUCCESS;
230 std::set<size_t> passingIndices;
233 if ( passingIndices.empty() ) {
235 return StatusCode::SUCCESS;
238 for (
auto idx: passingIndices ) {
243 return StatusCode::SUCCESS;
256 int seed_type =
dv->getDetail<
int> (
"hitDV_seed_type");
257 float seed_eta =
dv->getDetail<
float>(
"hitDV_seed_eta");
258 float seed_pt =
dv->getDetail<
float>(
"hitDV_seed_pt");
262 if( seed_type != SeedType::HLTJet )
return false;
263 if( std::abs(seed_eta) > etaThreshold )
return false;
264 if( seed_pt < ptThreshold )
return false;
269 if(
input.isSPOverflow )
return true;
274 float bdt_score =
dv->getDetail<
float>(
"hitDV_bdt_score");
276 if ( std::abs(seed_eta) < 1 ) {
278 }
else if ( std::abs(seed_eta) < 2 ) {
282 if( ! doSPseed && seed_type==SeedType::SP )
return false;
283 if( seed_type==SeedType::HLTJet && seed_pt < ptThreshold )
return false;
284 if( std::abs(seed_eta) > etaThreshold )
return false;
285 if( bdt_score < BDTthreshold )
return false;
287 ATH_MSG_DEBUG(
" Selected, cut index / seed_type / seed_eta / bdt_score = " << cutIndex <<
" / " << seed_type <<
" / " << seed_eta <<
" / " << bdt_score);