26 declareInterface<DerivationFramework::ClassifyAndCalculateHFTool>(
this);
49 return StatusCode::SUCCESS;
53 return StatusCode::SUCCESS;
63 const std::map<
const xAOD::Jet*, std::vector<xAOD::TruthParticleContainer::const_iterator>>& particleMatch,
64 const std::map<const xAOD::TruthParticle*, DerivationFramework::HadronOriginClassifier::HF_id>& hadronMap,
65 const std::string& hfDecorationName)
const{
76 decorator_flav(*
jet) = -999;
77 decorator_id(*
jet) = -999;
78 decorator_count(*
jet) = -999;
109 auto it = particleMatch.find (
jet);
110 if (
it != particleMatch.end()) {
119 int pdgId = (*hf)->pdgId();
123 auto h_it = hadronMap.find(*hf);
124 if(h_it!=hadronMap.end()){
125 hforigin=
static_cast<int>(h_it->second);
130 if(6==hforigin)
continue;
134 float ptratio = (*hf)->p4().Pt()/
jet->p4().Pt();
150 if(bid<hforigin)bid=hforigin;
165 if(cid>hforigin)cid=hforigin;
213 decorator_flav(*
jet) = flav;
214 decorator_id(*
jet) =
id;
240 int b=0, B=0,
c=0, C=0;
241 int b_prompt=0, B_prompt=0, c_prompt=0, C_prompt=0;
260 flav=hfflavAcc(*
jet);
262 ATH_MSG_WARNING(
"variable '" + hfDecorationName +
"_flav' not found.");
278 ATH_MSG_WARNING(
"variable '" + hfDecorationName +
"_count' not found.");
284 if(flav==5 &&
id < 3){
307 if(flav==4 && (
id==0 ||
id==-1 ||
id==-2)){
331 if(flav==5 &&
id==0){
353 if(flav==4 &&
id==0){
380 if(
id==1 && flav==5){
383 else if(
id==2 && flav==5){
386 else if(
id==-1 && flav==4){
389 else if(
id==-2 && flav==4) {
397 int ext_code = 1000*
b+100*B+10*
c+1*C;
398 int prompt_code = 1000*b_prompt+100*B_prompt+10*c_prompt+1*C_prompt;
402 if(prompt_code==0 && ext_code!=0){
421 if(std::abs(hfclassif)>=100){
430 else if(hfclassif==0){