25 declareInterface<DerivationFramework::ClassifyAndCalculateHFTool>(
this);
48 return StatusCode::SUCCESS;
52 return StatusCode::SUCCESS;
67 if(
pdgId>1e9)
return false;
73 int rest1(std::abs(
pdgId)%1000);
74 int rest2(std::abs(
pdgId)%10000);
78 if((rest2 >= 5000 && rest2 < 6000) || (rest1 >= 500 && rest1 < 600))
return true;
90 if(
pdgId>1e9)
return false;
96 int rest1(std::abs(
pdgId)%1000);
97 int rest2(std::abs(
pdgId)%10000);
103 if((rest2 >= 4000 && rest2 < 5000) || (rest1 >= 400 && rest1 < 500))
return true;
115 const std::map<
const xAOD::Jet*, std::vector<xAOD::TruthParticleContainer::const_iterator>>& particleMatch,
116 const std::map<const xAOD::TruthParticle*, DerivationFramework::HadronOriginClassifier::HF_id>& hadronMap,
117 const std::string& hfDecorationName)
const{
128 decorator_flav(*
jet) = -999;
129 decorator_id(*
jet) = -999;
130 decorator_count(*
jet) = -999;
161 auto it = particleMatch.find (
jet);
162 if (
it != particleMatch.end()) {
171 int pdgId = (*hf)->pdgId();
175 auto h_it = hadronMap.find(*hf);
176 if(h_it!=hadronMap.end()){
177 hforigin=
static_cast<int>(h_it->second);
182 if(6==hforigin)
continue;
186 float ptratio = (*hf)->p4().Pt()/
jet->p4().Pt();
202 if(bid<hforigin)bid=hforigin;
217 if(cid>hforigin)cid=hforigin;
265 decorator_flav(*
jet) = flav;
266 decorator_id(*
jet) =
id;
292 int b=0, B=0,
c=0, C=0;
293 int b_prompt=0, B_prompt=0, c_prompt=0, C_prompt=0;
312 flav=hfflavAcc(*
jet);
314 ATH_MSG_WARNING(
"variable '" + hfDecorationName +
"_flav' not found.");
330 ATH_MSG_WARNING(
"variable '" + hfDecorationName +
"_count' not found.");
336 if(flav==5 &&
id < 3){
359 if(flav==4 && (
id==0 ||
id==-1 ||
id==-2)){
383 if(flav==5 &&
id==0){
405 if(flav==4 &&
id==0){
432 if(
id==1 && flav==5){
435 else if(
id==2 && flav==5){
438 else if(
id==-1 && flav==4){
441 else if(
id==-2 && flav==4) {
449 int ext_code = 1000*
b+100*B+10*
c+1*C;
450 int prompt_code = 1000*b_prompt+100*B_prompt+10*c_prompt+1*C_prompt;
454 if(prompt_code==0 && ext_code!=0){
473 if(std::abs(hfclassif)>=100){
482 else if(hfclassif==0){