Commit ccdd3248 authored by Elemer Nagy's avatar Elemer Nagy Committed by Frank Winklmeier
Browse files

Introducing btag variables with MT access.

For the moment finished only in the legacy framework.
All Run2 variables are monitored except wMV2c00 and wMV2c20.
Running fine on ART test file of 310820.
parent eade5f04
...@@ -304,14 +304,85 @@ def TrigBjetMonConfig(inputFlags): ...@@ -304,14 +304,85 @@ def TrigBjetMonConfig(inputFlags):
# b-tagging quantities # b-tagging quantities
HistName = 'wMV2c20_' + chain[2:] HistName = 'IP3D_pu_tr_' + chain[2:]
if chain[0:1] == "E" : if chain[0:1] == "E" :
BjetMonGroup.defineHistogram(HistName, title='Distribution of MV2c20 discriminant;MV2c20;Events', BjetMonGroup.defineHistogram(HistName, title='IP3D_pu probability distribution;IP3D_pu;Events',
path='Expert/'+chain[2:],xbins=200,xmin=0.0,xmax=1.0)
if chain[0:1] == "S" :
BjetMonGroup.defineHistogram(HistName, title='IP3D_pu probability distribution;IP3D_pu;Events',
path='Shifter/'+chain[2:],xbins=200,xmin=0.0,xmax=1.0)
HistName = 'IP3D_pb_tr_' + chain[2:]
if chain[0:1] == "E" :
BjetMonGroup.defineHistogram(HistName, title='IP3D_pb probability distribution;IP3D_pb;Events',
path='Expert/'+chain[2:],xbins=200,xmin=0.0,xmax=1.0)
if chain[0:1] == "S" :
BjetMonGroup.defineHistogram(HistName, title='IP3D_pb probability distribution;IP3D_pb;Events',
path='Shifter/'+chain[2:],xbins=200,xmin=0.0,xmax=1.0)
HistName = 'IP3D_pc_tr_' + chain[2:]
if chain[0:1] == "E" :
BjetMonGroup.defineHistogram(HistName, title='IP3D_pc probability distribution;IP3D_pc;Events',
path='Expert/'+chain[2:],xbins=200,xmin=0.0,xmax=1.0)
if chain[0:1] == "S" :
BjetMonGroup.defineHistogram(HistName, title='IP3D_pc probability distribution;IP3D_pc;Events',
path='Shifter/'+chain[2:],xbins=200,xmin=0.0,xmax=1.0)
HistName = 'wIP3D_Rbu_tr_' + chain[2:]
if chain[0:1] == "E" :
BjetMonGroup.defineHistogram(HistName, title='LogLH IP3D_pb/IP3D_pu probability ratio distribution;LogLH IP3D_pb/IP3D_pu;Events',
path='Expert/'+chain[2:],xbins=200,xmin=-4.0,xmax=6.0)
if chain[0:1] == "S" :
BjetMonGroup.defineHistogram(HistName, title='LogLH IP3D_pb/IP3D_pu probability ratio distribution;LogLH IP3D_pb/IP3D_pu;Events',
path='Shifter/'+chain[2:],xbins=200,xmin=-4.0,xmax=6.0)
HistName = 'wSV1_Rbu_tr_' + chain[2:]
if chain[0:1] == "E" :
BjetMonGroup.defineHistogram(HistName, title='LogLH SV1_pb/SV1_pu probability ratio distribution;LogLH SV1_pb/SV1_pu;Events',
path='Expert/'+chain[2:],xbins=200,xmin=-4.0,xmax=6.0)
if chain[0:1] == "S" :
BjetMonGroup.defineHistogram(HistName, title='LogLH SV1_pb/SV1_pu probability ratio distribution;LogLH SV1_pb/SV1_pu;Events',
path='Shifter/'+chain[2:],xbins=200,xmin=-4.0,xmax=6.0)
HistName = 'wCOMB_Rbu_tr_' + chain[2:]
if chain[0:1] == "E" :
BjetMonGroup.defineHistogram(HistName, title='LogLH IP3D+SV1 probability ratio distribution;LogLH IP3D+SV1 probability ratio;Events',
path='Expert/'+chain[2:],xbins=200,xmin=-4.0,xmax=6.0)
if chain[0:1] == "S" :
BjetMonGroup.defineHistogram(HistName, title='LogLH IP3D+SV1 probability ratio distribution;LogLH IP3D+SV1 probability ratio;Events',
path='Shifter/'+chain[2:],xbins=200,xmin=-4.0,xmax=6.0)
HistName = 'wMV2c10_tr_' + chain[2:]
if chain[0:1] == "E" :
BjetMonGroup.defineHistogram(HistName, title='Distribution of MV2c10 discriminant;MV2c10;Events',
path='Expert/'+chain[2:],xbins=200,xmin=-1.0,xmax=1.0) path='Expert/'+chain[2:],xbins=200,xmin=-1.0,xmax=1.0)
# print " ==> histogram ",HistName," is defined for Expert folder"
if chain[0:1] == "S" : if chain[0:1] == "S" :
BjetMonGroup.defineHistogram(HistName, title='Distribution of MV2c20 discriminant;MV2c20;Events', BjetMonGroup.defineHistogram(HistName, title='Distribution of MV2c10 discriminant;MV2c10;Events',
path='Shifter/'+chain[2:],xbins=200,xmin=-1.0,xmax=1.0) path='Shifter/'+chain[2:],xbins=200,xmin=-1.0,xmax=1.0)
HistName = 'xMVtx_tr_' + chain[2:]
if chain[0:1] == "E" :
BjetMonGroup.defineHistogram(HistName, title='SV1 mass distribution;SV1 mass;Events',
path='Expert/'+chain[2:],xbins=50,xmin=0.0,xmax=10.0)
if chain[0:1] == "S" :
BjetMonGroup.defineHistogram(HistName, title='SV1 mass distribution;SV1 mass;Events',
path='Shifter/'+chain[2:],xbins=50,xmin=0.0,xmax=10.0)
HistName = 'xEVtx_tr_' + chain[2:]
if chain[0:1] == "E" :
BjetMonGroup.defineHistogram(HistName, title='SV1 E-fraction distribution;SV1 E-fraction;Events',
path='Expert/'+chain[2:],xbins=50,xmin=0.0,xmax=1.0)
if chain[0:1] == "S" :
BjetMonGroup.defineHistogram(HistName, title='SV1 E-fraction distribution;SV1 E-fraction;Events',
path='Shifter/'+chain[2:],xbins=50,xmin=0.0,xmax=1.0)
HistName = 'xNVtx_tr_' + chain[2:]
if chain[0:1] == "E" :
BjetMonGroup.defineHistogram(HistName, title='Distribution of number of 2-track SV1;Number of 2-track SV1;Events',
path='Expert/'+chain[2:],xbins=40,xmin=0.0,xmax=40.0)
if chain[0:1] == "S" :
BjetMonGroup.defineHistogram(HistName, title='Distribution of number of 2-track SV1;Number of 2-track SV1;Events',
path='Shifter/'+chain[2:],xbins=40,xmin=0.0,xmax=40.0)
continue continue
...@@ -366,7 +437,7 @@ if __name__=='__main__': ...@@ -366,7 +437,7 @@ if __name__=='__main__':
# file to be run w/ doRun2 = False # file to be run w/ doRun2 = False
# file = '/afs/cern.ch/user/e/ebergeas/work/public/triggermonitoring/nightly_2019-10-20T2130/AOD.pool.root' # file = '/afs/cern.ch/user/e/ebergeas/work/public/triggermonitoring/nightly_2019-10-20T2130/AOD.pool.root'
# file = '/afs/cern.ch/work/e/enagy/public/GenerateAOD/Gen_MT_240919/AOD.pool.root' # file = '/afs/cern.ch/work/e/enagy/public/GenerateAOD/Gen_MT_240919/AOD.pool.root'
file = '/afs/cern.ch/work/e/enagy/public/ARTfiles/MCtest010720.AOD.pool.root' file = '/afs/cern.ch/work/e/enagy/public/ARTfiles/MCtest310720.AOD.pool.root'
# file to be run w/ doRun2 = True # file to be run w/ doRun2 = True
# file = '/afs/cern.ch/work/e/enagy/public/GenerateAOD/Gen_ST_240919/AOD.pool.root' # file = '/afs/cern.ch/work/e/enagy/public/GenerateAOD/Gen_ST_240919/AOD.pool.root'
# file = '/eos/atlas/atlascerngroupdisk/data-art/build-output/master/Athena/x86_64-centos7-gcc8-opt/2019-09-16T2129/TrigAnalysisTest/test_trigAna_q221_RDOtoAOD_mt1_build/AOD.pool.root' # file = '/eos/atlas/atlascerngroupdisk/data-art/build-output/master/Athena/x86_64-centos7-gcc8-opt/2019-09-16T2129/TrigAnalysisTest/test_trigAna_q221_RDOtoAOD_mt1_build/AOD.pool.root'
......
...@@ -128,6 +128,7 @@ StatusCode HLTBjetMonTool::init() { ...@@ -128,6 +128,7 @@ StatusCode HLTBjetMonTool::init() {
ATH_CHECK( m_offlineVertexContainerKey.initialize() ); ATH_CHECK( m_offlineVertexContainerKey.initialize() );
ATH_CHECK( m_onlineVertexContainerKey.initialize() ); ATH_CHECK( m_onlineVertexContainerKey.initialize() );
ATH_CHECK( m_onlineTrackContainerKey.initialize() ); ATH_CHECK( m_onlineTrackContainerKey.initialize() );
ATH_CHECK( m_onlineBTaggingContainerKey.initialize() );
return StatusCode::SUCCESS; return StatusCode::SUCCESS;
} }
...@@ -1083,6 +1084,8 @@ StatusCode HLTBjetMonTool::book(){ ...@@ -1083,6 +1084,8 @@ StatusCode HLTBjetMonTool::book(){
if(HistJet) hist2("jetEtaPhi"+HistExt,"HLT/BjetMon/"+HistDir)->Fill(jet->eta(),jet->phi()); if(HistJet) hist2("jetEtaPhi"+HistExt,"HLT/BjetMon/"+HistDir)->Fill(jet->eta(),jet->phi());
// zPV associated to the jets in the same event: they are the same for every jet in the same event so only the first zPV should be plotted // zPV associated to the jets in the same event: they are the same for every jet in the same event so only the first zPV should be plotted
if (ijet == 0) { if (ijet == 0) {
// Fetch and plot PV
std::string vtxname = m_onlineVertexContainerKey.key(); std::string vtxname = m_onlineVertexContainerKey.key();
if ( vtxname.find("HLT_")==0 ) vtxname.erase(0,4); if ( vtxname.find("HLT_")==0 ) vtxname.erase(0,4);
auto vertexLinkInfo = TrigCompositeUtils::findLink<xAOD::VertexContainer>(jetLinkInfo.source, vtxname ); // CV 200120 & MS 290620 auto vertexLinkInfo = TrigCompositeUtils::findLink<xAOD::VertexContainer>(jetLinkInfo.source, vtxname ); // CV 200120 & MS 290620
...@@ -1090,7 +1093,70 @@ StatusCode HLTBjetMonTool::book(){ ...@@ -1090,7 +1093,70 @@ StatusCode HLTBjetMonTool::book(){
const xAOD::Vertex* vtx = *(vertexLinkInfo.link); const xAOD::Vertex* vtx = *(vertexLinkInfo.link);
ATH_MSG_DEBUG(" PVz_jet from jet link info: " << vtx->z()); ATH_MSG_DEBUG(" PVz_jet from jet link info: " << vtx->z());
// if(HistPV) hist("PVz_tr"+HistExt,"HLT/BjetMon/"+HistDir)->Fill(vtx->z()); // if(HistPV) hist("PVz_tr"+HistExt,"HLT/BjetMon/"+HistDir)->Fill(vtx->z());
}
// Fetch and plot BTagging information
std::string btagname = m_onlineBTaggingContainerKey.key();
if ( btagname.find("HLT_")==0 ) btagname.erase(0,4);
auto btaggingLinkInfo = TrigCompositeUtils::findLink<xAOD::BTaggingContainer>(jetLinkInfo.source, btagname );
ATH_CHECK( btaggingLinkInfo.isValid() ) ;
const xAOD::BTagging* btag = *(btaggingLinkInfo.link);
double wIP3D, wSV1, wCOMB, wMV2c10 = 0.; // discriminant variables
float svp_efrc, svp_mass = -1.; int svp_n2t = -1; // SV1 variables
btag->loglikelihoodratio("IP3D", wIP3D);
btag->loglikelihoodratio("SV1", wSV1);
double SV1_loglikelihoodratioLZ = btag->SV1_loglikelihoodratio();
wCOMB = wIP3D+wSV1;
wMV2c10 = btag->auxdata<double>("MV2c10_discriminant");
// Suggestion of LZ
btag->variable<float>("SV1", "masssvx", svp_mass);
btag->variable<float>("SV1", "efracsvx", svp_efrc);
btag->variable<int>("SV1", "N2Tpair", svp_n2t);
ATH_MSG_DEBUG(" - Before SV1 check - MVTX / EVTX / NVTX: " << svp_mass << " / " << svp_efrc << " / " << svp_n2t ) ;
if (HistBjet) hist("xNVtx_tr"+HistExt,"HLT/BjetMon/"+HistDir)->Fill(svp_n2t);
if ( svp_n2t > 0 ) {
if (HistBjet) hist("xMVtx_tr"+HistExt,"HLT/BjetMon/"+HistDir)->Fill( svp_mass * 1.e-3 );
if (HistBjet) hist("xEVtx_tr"+HistExt,"HLT/BjetMon/"+HistDir)->Fill( svp_efrc );
} // if svp_n2t
// end of suggestion of LZ
ATH_MSG_DEBUG(" - IP3Dpu / IP3Dpb / IP3Dpc: " << btag->IP3D_pu() << " / " << btag->IP3D_pb() << " / " << btag->IP3D_pc() );
if (HistBjet) hist("IP3D_pu_tr"+HistExt,"HLT/BjetMon/"+HistDir)->Fill(btag->IP3D_pu());
if (HistBjet) hist("IP3D_pb_tr"+HistExt,"HLT/BjetMon/"+HistDir)->Fill(btag->IP3D_pb());
if (HistBjet) hist("IP3D_pc_tr"+HistExt,"HLT/BjetMon/"+HistDir)->Fill(btag->IP3D_pc());
ATH_MSG_DEBUG(" - IP3D / SV1 / IP3D+SV1: " << wIP3D << " / " << wSV1 << " / " << wCOMB );
ATH_MSG_DEBUG(" - SV1 LZ: " << SV1_loglikelihoodratioLZ );
ATH_MSG_DEBUG(" - MV2c10 : " << wMV2c10 );
if (HistBjet) hist("wIP3D_Rbu_tr"+HistExt,"HLT/BjetMon/"+HistDir)->Fill(wIP3D);
if (HistBjet) hist("wSV1_Rbu_tr"+HistExt,"HLT/BjetMon/"+HistDir)->Fill(wSV1);
if (HistBjet) hist("wCOMB_Rbu_tr"+HistExt,"HLT/BjetMon/"+HistDir)->Fill(wCOMB);
if (HistBjet) hist("wMV2c10_tr"+HistExt,"HLT/BjetMon/"+HistDir)->Fill(wMV2c10);
// Get SV1 secondary vtx information, see:
// /PhysicsAnalysis/JetTagging/JetTagTools/src/MV2Tag.cxx#0486 and
// /PhysicsAnalysis/JetTagging/JetTagTools/src/GaiaNNTool.cxx#0349
std::vector< ElementLink< xAOD::VertexContainer > > myVertices;
ATH_MSG_DEBUG(" SV1 info source name before calling VertexContainer: " << m_sv1_infosource ) ;
btag->variable<std::vector<ElementLink<xAOD::VertexContainer> > >(m_sv1_infosource, "vertices", myVertices);
ATH_MSG_DEBUG(" SV1 info source name after calling VertexContainer: " << m_sv1_infosource ) ;
if ( myVertices.size() > 0 && myVertices[0].isValid() ) {
ATH_MSG_DEBUG(" SV1 vertex size: " << myVertices.size() << " is it valid? " << myVertices[0].isValid() ) ;
btag->variable<float>(m_sv1_infosource, "masssvx", svp_mass);
btag->variable<float>(m_sv1_infosource, "efracsvx", svp_efrc);
btag->variable<int>(m_sv1_infosource, "N2Tpair", svp_n2t);
ATH_MSG_DEBUG(" - MVTX / EVTX / NVTX: " << svp_mass << " / " << svp_efrc << " / " << svp_n2t ) ;
if ( svp_n2t > 0 ) {
} // if svp_n2t
} else {
ATH_MSG_DEBUG(" No valid SV1 vertex found -- SV1 vertex size: " << myVertices.size() );
if ( myVertices.size() > 0 ) ATH_MSG_DEBUG(" No valid SV1 vertex found -- myVertices[0].isValid(): " << myVertices[0].isValid() ) ;
} // if vertex valid
} // if (ijet == 0)
ijet++; ijet++;
// Tracks associated to triggered jets ( featurs = onlinejets ) courtesy of Tim Martin on 12/05/2020 // Tracks associated to triggered jets ( featurs = onlinejets ) courtesy of Tim Martin on 12/05/2020
......
...@@ -72,6 +72,7 @@ class HLTBjetMonTool : public IHLTMonTool { ...@@ -72,6 +72,7 @@ class HLTBjetMonTool : public IHLTMonTool {
SG::ReadHandleKey<xAOD::VertexContainer> m_offlineVertexContainerKey {this,"OfflineVertexContainerName","PrimaryVertices","Key of offline primary vertexes"}; SG::ReadHandleKey<xAOD::VertexContainer> m_offlineVertexContainerKey {this,"OfflineVertexContainerName","PrimaryVertices","Key of offline primary vertexes"};
SG::ReadHandleKey<xAOD::VertexContainer> m_onlineVertexContainerKey {this,"OnlineVertexContainerName","HLT_IDVertex_FS","Key of online bjet primary vertexes"}; // MS 290620 SG::ReadHandleKey<xAOD::VertexContainer> m_onlineVertexContainerKey {this,"OnlineVertexContainerName","HLT_IDVertex_FS","Key of online bjet primary vertexes"}; // MS 290620
SG::ReadHandleKey<xAOD::TrackParticleContainer> m_onlineTrackContainerKey {this,"OnlineTrackContainerName","HLT_IDTrack_Bjet_IDTrig","Key of online tracks of bjets"}; SG::ReadHandleKey<xAOD::TrackParticleContainer> m_onlineTrackContainerKey {this,"OnlineTrackContainerName","HLT_IDTrack_Bjet_IDTrig","Key of online tracks of bjets"};
SG::ReadHandleKey<xAOD::BTaggingContainer> m_onlineBTaggingContainerKey {this,"OnlineBTaggingContainerName","HLT_BTagging","Key of online b-tagging object"};
ToolHandle<Trig::TrigDecisionTool> m_trigDec; //! ToolHandle<Trig::TrigDecisionTool> m_trigDec; //!
......
...@@ -4,12 +4,19 @@ ...@@ -4,12 +4,19 @@
#include "TrigBjetMonitorAlgorithm.h" #include "TrigBjetMonitorAlgorithm.h"
#include "AthenaMonitoring/AthenaMonManager.h"
#include "AthenaMonitoring/ManagedMonitorToolTest.h"
#include "AthenaMonitoring/ManagedMonitorToolBase.h" //EN
#include "xAODTracking/TrackParticle.h" #include "xAODTracking/TrackParticle.h"
#include "xAODTracking/VertexContainer.h" #include "xAODTracking/VertexContainer.h"
#include "xAODBTagging/BTaggingAuxContainer.h" #include "xAODBTagging/BTaggingAuxContainer.h"
#include "xAODBTagging/BTaggingContainer.h" #include "xAODBTagging/BTaggingContainer.h"
#include "xAODBTagging/BTagging.h" #include "xAODBTagging/BTagging.h"
#include "EventPrimitives/EventPrimitivesHelpers.h"
#include "Particle/TrackParticleContainer.h" #include "Particle/TrackParticleContainer.h"
#include "GeoPrimitives/GeoPrimitives.h" #include "GeoPrimitives/GeoPrimitives.h"
...@@ -48,6 +55,7 @@ StatusCode TrigBjetMonitorAlgorithm::initialize() { ...@@ -48,6 +55,7 @@ StatusCode TrigBjetMonitorAlgorithm::initialize() {
ATH_CHECK( m_offlineVertexContainerKey.initialize() ); ATH_CHECK( m_offlineVertexContainerKey.initialize() );
ATH_CHECK( m_onlineVertexContainerKey.initialize() ); ATH_CHECK( m_onlineVertexContainerKey.initialize() );
ATH_CHECK( m_onlineTrackContainerKey.initialize() ); ATH_CHECK( m_onlineTrackContainerKey.initialize() );
ATH_CHECK( m_onlineBTaggingContainerKey.initialize() );
return AthMonitorAlgorithm::initialize(); return AthMonitorAlgorithm::initialize();
} }
...@@ -370,9 +378,10 @@ StatusCode TrigBjetMonitorAlgorithm::fillHistograms( const EventContext& ctx ) c ...@@ -370,9 +378,10 @@ StatusCode TrigBjetMonitorAlgorithm::fillHistograms( const EventContext& ctx ) c
// zPV associated to the jets in the same event: they are the same for every jet in the same event so only the first zPV should be plotted // zPV associated to the jets in the same event: they are the same for every jet in the same event so only the first zPV should be plotted
if (ijet == 0) { if (ijet == 0) {
// Fetch and plot PV
std::string vtxname = m_onlineVertexContainerKey.key(); std::string vtxname = m_onlineVertexContainerKey.key();
if ( vtxname.find("HLT_")==0 ) vtxname.erase(0,4); if ( vtxname.find("HLT_")==0 ) vtxname.erase(0,4);
auto vertexLinkInfo = TrigCompositeUtils::findLink<xAOD::VertexContainer>(jetLinkInfo.source, vtxname ); // CV 200120 & MS 290620 auto vertexLinkInfo = TrigCompositeUtils::findLink<xAOD::VertexContainer>(jetLinkInfo.source, vtxname ); // CV 200120 & MS 290620
ATH_CHECK( vertexLinkInfo.isValid() ) ; // TM 200120 ATH_CHECK( vertexLinkInfo.isValid() ) ; // TM 200120
const xAOD::Vertex* vtx = *(vertexLinkInfo.link); const xAOD::Vertex* vtx = *(vertexLinkInfo.link);
...@@ -394,7 +403,93 @@ StatusCode TrigBjetMonitorAlgorithm::fillHistograms( const EventContext& ctx ) c ...@@ -394,7 +403,93 @@ StatusCode TrigBjetMonitorAlgorithm::fillHistograms( const EventContext& ctx ) c
PVy_jet = vtx->y(); PVy_jet = vtx->y();
ATH_MSG_DEBUG(" PVy_jet: " << PVy_jet); ATH_MSG_DEBUG(" PVy_jet: " << PVy_jet);
fill("TrigBjetMonitor",PVy_jet); fill("TrigBjetMonitor",PVy_jet);
}
// Fetch and plot BTagging information
std::string btagname = m_onlineBTaggingContainerKey.key();
if ( btagname.find("HLT_")==0 ) btagname.erase(0,4);
auto btaggingLinkInfo = TrigCompositeUtils::findLink<xAOD::BTaggingContainer>(jetLinkInfo.source, btagname );
ATH_CHECK( btaggingLinkInfo.isValid() ) ;
const xAOD::BTagging* btag = *(btaggingLinkInfo.link);
// IP3D variables
NameH = "IP3D_pu_tr_"+trigName;
ATH_MSG_DEBUG( " NameH: " << NameH );
auto IP3D_pu = Monitored::Scalar<float>(NameH,0.0);
IP3D_pu = btag->IP3D_pu();
ATH_MSG_DEBUG(" IP3D_pu: " << IP3D_pu);
fill("TrigBjetMonitor",IP3D_pu);
NameH = "IP3D_pb_tr_"+trigName;
ATH_MSG_DEBUG( " NameH: " << NameH );
auto IP3D_pb = Monitored::Scalar<float>(NameH,0.0);
IP3D_pb = btag->IP3D_pb();
ATH_MSG_DEBUG(" IP3D_pb: " << IP3D_pb);
fill("TrigBjetMonitor",IP3D_pb);
NameH = "IP3D_pc_tr_"+trigName;
ATH_MSG_DEBUG( " NameH: " << NameH );
auto IP3D_pc = Monitored::Scalar<float>(NameH,0.0);
IP3D_pc = btag->IP3D_pc();
ATH_MSG_DEBUG(" IP3D_pc: " << IP3D_pc);
fill("TrigBjetMonitor",IP3D_pc);
// LogLH variables
NameH = "wIP3D_Rbu_tr_"+trigName;
ATH_MSG_DEBUG( " NameH: " << NameH );
auto wIP3D = Monitored::Scalar<double>(NameH,0.0);
btag->loglikelihoodratio("IP3D", wIP3D);
ATH_MSG_DEBUG(" wIP3D: " << wIP3D);
fill("TrigBjetMonitor",wIP3D);
NameH = "wSV1_Rbu_tr_"+trigName;
ATH_MSG_DEBUG( " NameH: " << NameH );
auto wSV1 = Monitored::Scalar<double>(NameH,0.0);
btag->loglikelihoodratio("SV1", wSV1);
ATH_MSG_DEBUG(" wSV1: " << wSV1);
fill("TrigBjetMonitor",wSV1);
NameH = "wCOMB_Rbu_tr_"+trigName;
ATH_MSG_DEBUG( " NameH: " << NameH );
auto wCOMB = Monitored::Scalar<double>(NameH,0.0);
wCOMB = wIP3D+wSV1;
ATH_MSG_DEBUG(" wCOMB: " << wCOMB);
fill("TrigBjetMonitor",wCOMB);
// Discriminants
NameH = "wMV2c10_tr_"+trigName;
ATH_MSG_DEBUG( " NameH: " << NameH );
auto wMV2c10 = Monitored::Scalar<double>(NameH,0.0);
wMV2c10 = btag->auxdata<double>("MV2c10_discriminant");
ATH_MSG_DEBUG(" wMV2c10: " << wMV2c10);
fill("TrigBjetMonitor",wMV2c10);
// SV1 variables (credit LZ)
NameH = "xNVtx_tr_"+trigName;
ATH_MSG_DEBUG( " NameH: " << NameH );
auto svp_n2t = Monitored::Scalar<int>(NameH,0.0);
btag->variable<int>("SV1", "N2Tpair", svp_n2t);
ATH_MSG_DEBUG(" svp_n2t: " << svp_n2t);
fill("TrigBjetMonitor",svp_n2t);
NameH = "xMVtx_tr_"+trigName;
ATH_MSG_DEBUG( " NameH: " << NameH );
auto svp_mass = Monitored::Scalar<float>(NameH,0.0);
btag->variable<float>("SV1", "masssvx", svp_mass);
ATH_MSG_DEBUG(" svp_mass: " << svp_mass );
svp_mass *= 1.e-3;
ATH_MSG_DEBUG(" svp_mass: " << svp_mass );
fill("TrigBjetMonitor",svp_mass);
NameH = "xEVtx_tr_"+trigName;
ATH_MSG_DEBUG( " NameH: " << NameH );
auto svp_efrc = Monitored::Scalar<float>(NameH,0.0);
btag->variable<float>("SV1", "efracsvx", svp_efrc);
ATH_MSG_DEBUG(" svp_efrc: " << svp_efrc);
fill("TrigBjetMonitor",svp_efrc);
} // if (ijet == 0)
ijet++; ijet++;
// Tracks associated to triggered jets ( featurs = onlinejets ) courtesy of Tim Martin on 12/05/2020 // Tracks associated to triggered jets ( featurs = onlinejets ) courtesy of Tim Martin on 12/05/2020
......
...@@ -33,6 +33,7 @@ class TrigBjetMonitorAlgorithm : public AthMonitorAlgorithm { ...@@ -33,6 +33,7 @@ class TrigBjetMonitorAlgorithm : public AthMonitorAlgorithm {
SG::ReadHandleKey<xAOD::VertexContainer> m_offlineVertexContainerKey {this,"OfflineVertexContainerName","PrimaryVertices","Key of offline primary vertexes"}; SG::ReadHandleKey<xAOD::VertexContainer> m_offlineVertexContainerKey {this,"OfflineVertexContainerName","PrimaryVertices","Key of offline primary vertexes"};
SG::ReadHandleKey<xAOD::VertexContainer> m_onlineVertexContainerKey {this,"OnlineVertexContainerName","HLT_IDVertex_FS","Key of online bjet primary vertexes"}; // MS 290620 SG::ReadHandleKey<xAOD::VertexContainer> m_onlineVertexContainerKey {this,"OnlineVertexContainerName","HLT_IDVertex_FS","Key of online bjet primary vertexes"}; // MS 290620
SG::ReadHandleKey<xAOD::TrackParticleContainer> m_onlineTrackContainerKey {this,"OnlineTrackContainerName","HLT_IDTrack_Bjet_IDTrig","Key of online tracks of bjets"}; SG::ReadHandleKey<xAOD::TrackParticleContainer> m_onlineTrackContainerKey {this,"OnlineTrackContainerName","HLT_IDTrack_Bjet_IDTrig","Key of online tracks of bjets"};
SG::ReadHandleKey<xAOD::BTaggingContainer> m_onlineBTaggingContainerKey {this,"OnlineBTaggingContainerName","HLT_BTagging","Key of online b-tagging object"};
ToolHandle<Trig::TrigDecisionTool> m_trigDec; //! ToolHandle<Trig::TrigDecisionTool> m_trigDec; //!
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment