diff --git a/Phys/FlavourTagging/src/Combination/CombineTaggersNN.cpp b/Phys/FlavourTagging/src/Combination/CombineTaggersNN.cpp index cb7d646f1d01f97da83f8fd994d7d1ccaf3957d6..434ea4359a3b5c9b08df039508cdb41dea894bee 100644 --- a/Phys/FlavourTagging/src/Combination/CombineTaggersNN.cpp +++ b/Phys/FlavourTagging/src/Combination/CombineTaggersNN.cpp @@ -60,28 +60,28 @@ int CombineTaggersNN::combineTaggers( FlavourTag& theTag, std::vector& // obtain pn(omega) and tagdec for each tagger for ( int i = 0; i != vtgsize; ++i ) { // multiply all probabilities if ( !vtg.at( i )->decision() ) continue; - int type = vtg.at( i )->type(); - if ( type == 2 ) { + auto type = vtg.at( i )->type(); + if ( type == Tagger::TaggerType::OS_Muon ) { pmu = 1 - ( vtg.at( i ) )->omega(); // probability of 'right' mu mutag = vtg.at( i )->decision(); if ( msgLevel( MSG::DEBUG ) ) debug() << "muon -> pmu: " << pmu << ", mutag:" << mutag << endmsg; - } else if ( type == 3 ) { + } else if ( type == Tagger::TaggerType::OS_Electron ) { pe = 1 - ( vtg.at( i ) )->omega(); // probability of 'right' e etag = vtg.at( i )->decision(); if ( msgLevel( MSG::DEBUG ) ) debug() << "ele -> pe: " << pe << ", etag:" << etag << endmsg; - } else if ( type == 4 ) { + } else if ( type == Tagger::TaggerType::OS_Kaon ) { pk = 1 - ( vtg.at( i ) )->omega(); // probability of 'right' k ktag = vtg.at( i )->decision(); if ( msgLevel( MSG::DEBUG ) ) debug() << "kaon -> pk: " << pk << ", ktag:" << ktag << endmsg; - } else if ( type == 5 ) { + } else if ( type == Tagger::TaggerType::SS_Kaon ) { pss = 1 - ( vtg.at( i ) )->omega(); // probability of 'right' kaonSS sstag = vtg.at( i )->decision(); if ( msgLevel( MSG::DEBUG ) ) debug() << "kaonSS -> pss: " << pss << ", sstag:" << sstag << endmsg; - } else if ( type == 6 ) { + } else if ( type == Tagger::TaggerType::SS_Pion ) { pss = 1 - ( vtg.at( i ) )->omega(); // probability of 'right' pionSS sstag = vtg.at( i )->decision(); if ( msgLevel( MSG::DEBUG ) ) debug() << "pionSS -> pss: " << pss << ", sstag:" << sstag << endmsg; - } else if ( type == 10 ) { + } else if ( type == Tagger::TaggerType::VtxCharge ) { pvtx = 1 - ( vtg.at( i ) )->omega(); // probability of 'right' vtx vtxtag = vtg.at( i )->decision(); if ( msgLevel( MSG::DEBUG ) ) debug() << "pvtx: " << pvtx << ", vtxtag:" << vtxtag << endmsg; diff --git a/Phys/FlavourTagging/src/Combination/CombineTaggersOSTDR.cpp b/Phys/FlavourTagging/src/Combination/CombineTaggersOSTDR.cpp index 6c7a5ed4f079e711ac69ab6d4a7b06d7cd2124cc..ed49ef3f89ea8136ecaccc1293cf542b7214161e 100644 --- a/Phys/FlavourTagging/src/Combination/CombineTaggersOSTDR.cpp +++ b/Phys/FlavourTagging/src/Combination/CombineTaggersOSTDR.cpp @@ -48,28 +48,28 @@ int CombineTaggersOSTDR::combineTaggers( FlavourTag& theTag, std::vectordecision(); if ( msgLevel( MSG::DEBUG ) ) debug() << "Muon decision = " << itag[0] << endmsg; if ( itag[0] != 0 ) theTag.addTagger( **iter ); } - if ( ( *iter )->type() == Tagger::OS_Electron ) { + if ( ( *iter )->type() == Tagger::TaggerType::OS_Electron ) { if ( msgLevel( MSG::DEBUG ) ) debug() << "Electron tool present" << endmsg; ostaggers.push_back( *iter ); itag[1] = ( *iter )->decision(); if ( msgLevel( MSG::DEBUG ) ) debug() << "Electron decision = " << itag[1] << endmsg; if ( itag[1] != 0 ) theTag.addTagger( **iter ); } - if ( ( *iter )->type() == Tagger::OS_Kaon ) { + if ( ( *iter )->type() == Tagger::TaggerType::OS_Kaon ) { if ( msgLevel( MSG::DEBUG ) ) debug() << "Kaon tool present " << endmsg; ostaggers.push_back( *iter ); itag[2] = ( *iter )->decision(); if ( msgLevel( MSG::DEBUG ) ) debug() << "Kaon decision = " << itag[2] << endmsg; if ( itag[2] != 0 ) theTag.addTagger( **iter ); } - if ( ( *iter )->type() == Tagger::VtxCharge ) { + if ( ( *iter )->type() == Tagger::TaggerType::VtxCharge ) { if ( msgLevel( MSG::DEBUG ) ) debug() << "Vertex tool present " << endmsg; ostaggers.push_back( *iter ); itag[3] = ( *iter )->decision(); diff --git a/Phys/FlavourTagging/src/Combination/CombineTaggersPID.cpp b/Phys/FlavourTagging/src/Combination/CombineTaggersPID.cpp index c9c372c95e7c8ae5172a1abd1a5ba1367ceeb5bb..96f7044b7afb0154bcca5e65798d1561d4dbbc62 100644 --- a/Phys/FlavourTagging/src/Combination/CombineTaggersPID.cpp +++ b/Phys/FlavourTagging/src/Combination/CombineTaggersPID.cpp @@ -87,35 +87,36 @@ int CombineTaggersPID::combineTaggers( FlavourTag& theTag, std::vector& // Fill the taggers for ( std::vector::const_iterator iter = vtg.begin(); iter != vtg.end(); ++iter ) { - if ( ( *iter )->type() == Tagger::OS_Muon ) { + if ( ( *iter )->type() == Tagger::TaggerType::OS_Muon ) { if ( msgLevel( MSG::DEBUG ) ) debug() << "Muon tool present " << endmsg; ostaggers.push_back( *iter ); itag[0] = ( *iter )->decision(); if ( msgLevel( MSG::DEBUG ) ) debug() << "Muon decision = " << itag[0] << endmsg; if ( itag[0] != 0 ) theTag.addTagger( **iter ); } - if ( ( *iter )->type() == Tagger::OS_Electron ) { + if ( ( *iter )->type() == Tagger::TaggerType::OS_Electron ) { if ( msgLevel( MSG::DEBUG ) ) debug() << "Electron tool present" << endmsg; ostaggers.push_back( *iter ); itag[1] = ( *iter )->decision(); if ( msgLevel( MSG::DEBUG ) ) debug() << "Electron decision = " << itag[1] << endmsg; if ( itag[1] != 0 ) theTag.addTagger( **iter ); } - if ( ( *iter )->type() == Tagger::OS_Kaon ) { + if ( ( *iter )->type() == Tagger::TaggerType::OS_Kaon ) { if ( msgLevel( MSG::DEBUG ) ) debug() << "Kaon tool present " << endmsg; ostaggers.push_back( *iter ); itag[2] = ( *iter )->decision(); if ( msgLevel( MSG::DEBUG ) ) debug() << "Kaon decision = " << itag[2] << endmsg; if ( itag[2] != 0 ) theTag.addTagger( **iter ); } - if ( ( ( *iter )->type() == Tagger::SS_Kaon ) || ( ( *iter )->type() == Tagger::SS_Pion ) ) { + if ( ( ( *iter )->type() == Tagger::TaggerType::SS_Kaon ) || + ( ( *iter )->type() == Tagger::TaggerType::SS_Pion ) ) { if ( msgLevel( MSG::DEBUG ) ) debug() << "Kaon/Pion SS tool present " << endmsg; ostaggers.push_back( *iter ); itag[3] = ( *iter )->decision(); if ( msgLevel( MSG::DEBUG ) ) debug() << "Kaon/Pion SS decision = " << itag[3] << endmsg; if ( itag[3] != 0 ) theTag.addTagger( **iter ); } - if ( ( *iter )->type() == Tagger::VtxCharge ) { + if ( ( *iter )->type() == Tagger::TaggerType::VtxCharge ) { if ( msgLevel( MSG::DEBUG ) ) debug() << "Vertex tool present " << endmsg; ostaggers.push_back( *iter ); itag[4] = ( *iter )->decision(); diff --git a/Phys/FlavourTagging/src/Combination/CombineTaggersProbability.cpp b/Phys/FlavourTagging/src/Combination/CombineTaggersProbability.cpp index 390ed8320d68f54d6ac999d9fc371153a317522b..9d5b96f11382cb8e440ca5ae36cd2dee1a6e2fc0 100644 --- a/Phys/FlavourTagging/src/Combination/CombineTaggersProbability.cpp +++ b/Phys/FlavourTagging/src/Combination/CombineTaggersProbability.cpp @@ -72,14 +72,16 @@ int CombineTaggersProbability::combineTaggers( FlavourTag& theTag, std::vectortype() == ( Tagger::SS_Pion ) || vtg.at( i )->type() == ( Tagger::SS_PionBDT ) || - vtg.at( i )->type() == ( Tagger::SS_Proton ) || vtg.at( i )->type() == ( Tagger::SS_Kaon ) || - vtg.at( i )->type() == ( Tagger::SS_nnetKaon ) ) + if ( vtg.at( i )->type() == ( Tagger::TaggerType::SS_Pion ) || + vtg.at( i )->type() == ( Tagger::TaggerType::SS_PionBDT ) || + vtg.at( i )->type() == ( Tagger::TaggerType::SS_Proton ) || + vtg.at( i )->type() == ( Tagger::TaggerType::SS_Kaon ) || + vtg.at( i )->type() == ( Tagger::TaggerType::SS_nnetKaon ) ) continue; // Just combine the prob of OS taggers - if ( !flag_nnetTaggers && vtg.at( i )->type() == ( Tagger::OS_nnetKaon ) ) continue; - if ( flag_nnetTaggers && vtg.at( i )->type() == ( Tagger::OS_Kaon ) ) continue; - if ( !flag_CharmTagger && vtg.at( i )->type() == ( Tagger::OS_Charm ) ) continue; + if ( !flag_nnetTaggers && vtg.at( i )->type() == ( Tagger::TaggerType::OS_nnetKaon ) ) continue; + if ( flag_nnetTaggers && vtg.at( i )->type() == ( Tagger::TaggerType::OS_Kaon ) ) continue; + if ( !flag_CharmTagger && vtg.at( i )->type() == ( Tagger::TaggerType::OS_Charm ) ) continue; const double mtag = vtg.at( i )->decision(); if ( !mtag ) continue; @@ -131,10 +133,10 @@ int CombineTaggersProbability::combineTaggers( FlavourTag& theTag, std::vectortype() == ( Tagger::SS_Pion ) ) || - ( signalType == 1 && vtg.at( i )->type() == ( Tagger::SS_Proton ) ) || - ( signalType == 2 && !flag_nnetTaggers && vtg.at( i )->type() == ( Tagger::SS_Kaon ) ) || - ( signalType == 2 && flag_nnetTaggers && vtg.at( i )->type() == ( Tagger::SS_nnetKaon ) ) ) { + if ( ( signalType == 1 && vtg.at( i )->type() == ( Tagger::TaggerType::SS_Pion ) ) || + ( signalType == 1 && vtg.at( i )->type() == ( Tagger::TaggerType::SS_Proton ) ) || + ( signalType == 2 && !flag_nnetTaggers && vtg.at( i )->type() == ( Tagger::TaggerType::SS_Kaon ) ) || + ( signalType == 2 && flag_nnetTaggers && vtg.at( i )->type() == ( Tagger::TaggerType::SS_nnetKaon ) ) ) { const double mtagss = vtg.at( i )->decision(); if ( !mtagss ) continue; const double pnss = 1 - ( vtg.at( i ) )->omega(); // probability of 'right' diff --git a/Phys/FlavourTagging/src/Combination/CombineTaggersTDR.cpp b/Phys/FlavourTagging/src/Combination/CombineTaggersTDR.cpp index 6934f4722ae89c0f35d444d0e5be3cc577cc8577..de8f9b1575d0adf235882a22afa22ae25039f69f 100644 --- a/Phys/FlavourTagging/src/Combination/CombineTaggersTDR.cpp +++ b/Phys/FlavourTagging/src/Combination/CombineTaggersTDR.cpp @@ -61,7 +61,7 @@ int CombineTaggersTDR::combineTaggers( FlavourTag& theTag, std::vector& // if pion same side fill only category nr7 //(pion SS is only considered when no other tagger is present) - if ( ( vtg.at( 4 - 1 ) )->type() == Tagger::SS_Pion && itag.at( 4 ) && ic > 1 ) ic--; + if ( ( vtg.at( 4 - 1 ) )->type() == Tagger::TaggerType::SS_Pion && itag.at( 4 ) && ic > 1 ) ic--; if ( ic == 1000 || ic == 1100 ) { // only muon category = 1; diff --git a/Phys/FlavourTagging/src/DoubleTagging.cpp b/Phys/FlavourTagging/src/DoubleTagging.cpp index b40eca48af54a940ade2f2f428133a79eb843583..c910d6a3a20a691c83957658f517e19e9afeba67 100644 --- a/Phys/FlavourTagging/src/DoubleTagging.cpp +++ b/Phys/FlavourTagging/src/DoubleTagging.cpp @@ -141,7 +141,7 @@ StatusCode DoubleTagging::execute() { for ( size_t i = 0; i < taggers.size(); ++i ) { if ( msgLevel( MSG::DEBUG ) ) debug() << "Type of taggers ran in BTaggingTool = " << taggers[i].type() << endmsg; - if ( taggers[i].type() == Tagger::SS_Kaon ) { + if ( taggers[i].type() == Tagger::TaggerType::SS_Kaon ) { sskaondec = taggers[i].decision(); if ( msgLevel( MSG::DEBUG ) ) debug() << "SS Kaon decision = " << sskaondec << endmsg; } else diff --git a/Phys/FlavourTagging/src/Taggers/OSCharm/TaggerCharmTool.cpp b/Phys/FlavourTagging/src/Taggers/OSCharm/TaggerCharmTool.cpp index c0387e178995c8c48c9bba695a8822ea247ea4f4..9d2f7fa2811475b17bccf592fb8ea7b9ac43c34b 100644 --- a/Phys/FlavourTagging/src/Taggers/OSCharm/TaggerCharmTool.cpp +++ b/Phys/FlavourTagging/src/Taggers/OSCharm/TaggerCharmTool.cpp @@ -425,7 +425,7 @@ Tagger TaggerCharmTool::tag( const Particle* signalB, const RecVertex* RecVert, tcharm.setOmega( omega ); debug() << "Charm tagger decision is " << decision << " after flipping by " << sign << endmsg; tcharm.setDecision( decision ); - tcharm.setType( Tagger::OS_Charm ); + tcharm.setType( Tagger::TaggerType::OS_Charm ); // add charm candidate and daughters to tagger particles tcharm.addToTaggerParts( thecharm->part ); diff --git a/Phys/FlavourTagging/src/Taggers/OSKaon/TaggerNEWKaonOppositeTool.cpp b/Phys/FlavourTagging/src/Taggers/OSKaon/TaggerNEWKaonOppositeTool.cpp index 8cd0e2de22451d9ea90730709a5f6bebcdca2a52..f9a4d2921ef229922c6fc2098e4348ff21e58c71 100644 --- a/Phys/FlavourTagging/src/Taggers/OSKaon/TaggerNEWKaonOppositeTool.cpp +++ b/Phys/FlavourTagging/src/Taggers/OSKaon/TaggerNEWKaonOppositeTool.cpp @@ -393,7 +393,7 @@ Tagger TaggerNEWKaonOppositeTool::tagReco12( const Particle* AXB0, const RecVert tkaon.setOmega( my_os_k_eta ); tkaon.setDecision( my_os_k_dec ); - tkaon.setType( Tagger::OS_nnetKaon ); + tkaon.setType( Tagger::TaggerType::OS_nnetKaon ); for ( int i = 0; i < cands_nn_2; i++ ) { tkaon.addToTaggerParts( *event_map[i].second ); }