Commit 930405d8 authored by Ruby Alice Molly Ferguson's avatar Ruby Alice Molly Ferguson Committed by Vakhtang Tsulaia
Browse files

Removed unnecessary Histograms and Algorithms

parent 1b3be88d
......@@ -40,12 +40,8 @@ def tauMonitoringConfig(inputFlags):
tauMonAlgTauTrig5 = cfgHelper.addAlgorithm( tauMonitorAlgorithm, name='tauMonAlgTauTrig5')
tauMonAlgTauTrig6 = cfgHelper.addAlgorithm( tauMonitorAlgorithm, name='tauMonAlgTauTrig6')
tauMonAlgTauTrig7 = cfgHelper.addAlgorithm( tauMonitorAlgorithm, name='tauMonAlgTauTrig7')
tauMonAlgEleTrig = cfgHelper.addAlgorithm( tauMonitorAlgorithm, name='tauMonAlgEleTrig')
tauMonAlgJetTrig = cfgHelper.addAlgorithm( tauMonitorAlgorithm, name='tauMonAlgJetTrig')
tauMonAlgHighPt = cfgHelper.addAlgorithm( tauMonitorAlgorithm, name='tauMonAlgHighPt')
tauMonAlgHighPtRNNLoose = cfgHelper.addAlgorithm( tauMonitorAlgorithm, name='tauMonAlgHighPtRNNLoose')
......@@ -84,10 +80,6 @@ def tauMonitoringConfig(inputFlags):
tauMonAlgEleTrig.etaMax = 100
tauMonAlgJetTrig.etaMin = -100
tauMonAlgJetTrig.etaMax = 100
tauMonAlgHighPt.etaMin = -100
tauMonAlgHighPt.etaMax = 100
tauMonAlgHighPtRNNLoose.etaMin = -100
tauMonAlgHighPtRNNLoose.etaMax = 100
tauMonAlgBA.kinGroupName = 'tauMonKinGroupBA'
tauMonAlgCR.kinGroupName = 'tauMonKinGroupCR'
......@@ -103,8 +95,6 @@ def tauMonitoringConfig(inputFlags):
tauMonAlgEleTrig.kinGroupName = 'tauMonKinGroupEleTrig'
tauMonAlgJetTrig.kinGroupName = 'tauMonKinGroupJetTrig'
tauMonAlgHighPt.kinGroupName = 'tauMonKinGroupHighPt'
tauMonAlgHighPtRNNLoose.kinGroupName = 'tauMonKinGroupHighPtRNNLoose'
### STEP 4 ###
# Add some tools. N.B. Do not use your own trigger decion tool. Use the
......@@ -126,17 +116,12 @@ def tauMonitoringConfig(inputFlags):
myKinGroupEleTrig = cfgHelper.addGroup(alg=tauMonAlgEleTrig, name='tauMonKinGroupEleTrig', topPath='Tau/Trigger/EleTrig/' )
myKinGroupJetTrig = cfgHelper.addGroup(alg=tauMonAlgJetTrig, name='tauMonKinGroupJetTrig', topPath='Tau/Trigger/JetTrig/' )
myKinGroupHighPt = cfgHelper.addGroup(alg=tauMonAlgHighPt, name='tauMonKinGroupHighPt', topPath='Tau/' )
myKinGroupHighPtRNNLoose = cfgHelper.addGroup(alg=tauMonAlgHighPtRNNLoose, name='tauMonKinGroupHighPtRNNLoose', topPath='Tau/' )
naming= {
'BA': "Tau_TauB_",
'CR': "Tau_TauCR_",
'EC': "Tau_TauE_",
'Global': "",
'HighPt': "",
'HighPtRNNLoose': "",
'EleTrig': "emTriggered_",
'JetTrig': "jetTriggered_",
'TauTrig1': "tauTriggered1_",
......@@ -169,8 +154,6 @@ def tauMonitoringConfig(inputFlags):
(myKinGroupCR,'CR'),
(myKinGroupEC,'EC'),
(myKinGroupGlobal,'Global'),
(myKinGroupHighPt,'HighPt'),
(myKinGroupHighPtRNNLoose,'HighPtRNNLoose'),
(myKinGroupEleTrig,'EleTrig'),
(myKinGroupJetTrig,'JetTrig'),
(myKinGroupTauTrig1, 'TauTrig1'),
......@@ -190,6 +173,11 @@ def tauMonitoringConfig(inputFlags):
if(postfix =="BA" or postfix =="CR" or postfix=="EC" or postfix == "Global" or postfix.startswith('TauTrig') or postfix=="EleTrig" or postfix =="JetTrig"):
#potentialHigh Pt replacement
igroup.defineHistogram(namer('tauEtaEt15,tauPhiEt15','tauPhiVsEta_et15','',postfix), type='TH2F', title='EtaVsEtTitle;Eta;Phi',
xbins=30,xmin=-2.55,xmax=2.55,ybins=32,ymin=PHIMIN,ymax=PHIMAX)
igroup.defineHistogram(namer('nTauCandidates', 'nTauCandidates',"",postfix), title='Number of tau candidates;Number of Taus per Event',
xbins=30, xmin=-0.5, xmax=30.5,path=folder)
......@@ -273,6 +261,10 @@ def tauMonitoringConfig(inputFlags):
igroup.defineHistogram(namer('panModeEt15RNNLoose','panMode','Identification_RNNLoose15GeV',postfix), title='tau decay mode from panTau upon JetRNNSigMedium;mode',
xbins=5, xmin=0., xmax=5., path=folder+"Identification/RNNLoose15GeV", xlabels=["1p0n","1p1n","1pXn","3p0n","3pXn"])
igroup.defineHistogram(namer('tauEtaEt15RNNLoose,tauPhiEt15RNNLoose','tauPhiVsEta_et15_RNNLoose','',postfix), type='TH2F', title='Phi vs Eta (Et>15, RNNLoose) ;Eta;Phi',
xbins=30,xmin=-2.55,xmax=2.55,ybins=32,ymin=PHIMIN,ymax=PHIMAX)
igroup.defineHistogram(namer('jetSeedEta','jetSeedEta','Calo',postfix), title='Calorimeter eta of tau candidates;Eta;Numbers of Candidates',path=folder+"Calo",
xbins=50, xmin=-2.5, xmax=2.5 )
......@@ -582,15 +574,6 @@ def tauMonitoringConfig(inputFlags):
igroup.defineHistogram(namer('tauEta,tauEt','tau_pTVsEta','',postfix), type='TH2F', title='Tau Et Vs Eta;#eta;Transverse Energy (Gev)',
xbins=40,xmin=-2.55,xmax=2.55 ,ybins=300,ymin=0,ymax=300,path=folder+"Physics/W")
if postfix == 'HighPt':
igroup.defineHistogram(namer('tauEtaEt15,tauPhiEt15','tauPhiVsEta_et15','',postfix), type='TH2F', title='EtaVsEtTitle;Eta;Phi',
xbins=30,xmin=-2.55,xmax=2.55,ybins=32,ymin=PHIMIN,ymax=PHIMAX)
if postfix == 'HighPtRNNLoose':
igroup.defineHistogram(namer('tauEtaEt15RNNLoose,tauPhiEt15RNNLoose','tauPhiVsEta_et15_RNNLoose','',postfix), type='TH2F', title='Phi vs Eta (Et>15, RNNLoose) ;Eta;Phi',
xbins=30,xmin=-2.55,xmax=2.55,ybins=32,ymin=PHIMIN,ymax=PHIMAX)
### STEP 6 ###
......@@ -652,8 +635,6 @@ if __name__=='__main__':
exampleMonitorAcc.getEventAlgo('tauMonAlgTauTrig7').OutputLevel = 2 # DEBUG
exampleMonitorAcc.getEventAlgo('tauMonAlgEleTrig').OutputLevel = 2 # DEBUG
exampleMonitorAcc.getEventAlgo('tauMonAlgJetTrig').OutputLevel = 2 # DEBUG
exampleMonitorAcc.getEventAlgo('tauMonAlgHighPt').OutputLevel = 2 # DEBUG
exampleMonitorAcc.getEventAlgo('tauMonAlgHighPtRNNLoose').OutputLevel = 2 # DEBUG
cfg.printConfig(withDetails=True) # set True for exhaustive info
......
......@@ -49,10 +49,7 @@ StatusCode tauMonitorAlgorithm::fillHistograms( const EventContext& ctx ) const
auto tauEtEt15RNNLoose = Monitored::Scalar<float>("tauEtEt15RNNLoose",0.0);
auto panModeEt15RNNLoose = Monitored::Scalar<float>("panModeEt15RNNLoose",0.0);
auto panModeSubstructure = Monitored::Scalar<float>("panModeSubstructure",0.0);
auto coreTrk = Monitored::Scalar<float>("coreTrk",0.0);
auto PtTESMVA = Monitored::Scalar<float>("PtTESMVA",0.0);
auto PtCombined = Monitored::Scalar<float>("PtCombined",0.0);
auto lumiPerBCID = Monitored::Scalar<float>("lumiPerBCID",0.0);
auto tauPhiEt15 = Monitored::Scalar<float>("tauPhiEt15",0.0);
auto tauEtaEt15 = Monitored::Scalar<float>("tauEtaEt15",0.0);
......@@ -103,10 +100,8 @@ StatusCode tauMonitorAlgorithm::fillHistograms( const EventContext& ctx ) const
auto tauRNNMedium = Monitored::Scalar<float>("tauRNNMedium",0.0);
auto tauRNNTight = Monitored::Scalar<float>("tauRNNight",0.0);
auto hadLeakFracFixed = Monitored::Scalar<float>("hadLeakFracFixed",0.0);
auto PSSFrac = Monitored::Scalar<float>("PSSFrac",0.0);
auto EMFrac = Monitored::Scalar<float>("EMFrac",0.0);
auto etHotShotWinOverPtLeadTrk = Monitored::Scalar<float>("etHotShotWinOverPtLeadTrk",0.0);
auto EMFracTrk = Monitored::Scalar<float>("EMFracTrk",0.0);
auto EfracL2EffCluster = Monitored::Scalar<float>("EfracL2EffCluster",0.0);
......@@ -118,10 +113,6 @@ StatusCode tauMonitorAlgorithm::fillHistograms( const EventContext& ctx ) const
auto BDTScoreAsP0 = Monitored::Scalar<float>("BDTScoreAsP0",0.0);
auto dRmax = Monitored::Scalar<float>("dRmax",0.0);
auto EMPOverTrkSysP = Monitored::Scalar<float>("EMPOverTrkSysP",0.0);
auto SumPtTrkFracCorrected = Monitored::Scalar<float>("SumPtTrkFracCorrected",0.0);
auto mEflowApprox = Monitored::Scalar<float>("mEflowApprox",0.0);
auto ptIntermediateAxis = Monitored::Scalar<float>("ptIntermediateAxis",0.0);
auto ipSigLeadTrk = Monitored::Scalar<float>("ipSigLeadTrk",0.0);
auto massTrkSys = Monitored::Scalar<float>("massTrkSys",0.0);
......@@ -135,11 +126,7 @@ StatusCode tauMonitorAlgorithm::fillHistograms( const EventContext& ctx ) const
auto panPt = Monitored::Scalar<float>("panPt",0.0);
auto d0 = Monitored::Scalar<float>("d0",0.0);
auto eProbabilityHT = Monitored::Scalar<float>("eProbabilityHT",0.0);
auto leadTrackDeltaEta = Monitored::Scalar<float>("leadTrackDeltaEta",0.0);
auto leadTrackDeltaPhi = Monitored::Scalar<float>("leadTrackDeltaPhi",0.0);
auto dRJetSeedAxis = Monitored::Scalar<float>("dRJetSeedAxis",0.0);
auto z0TJVA = Monitored::Scalar<float>("z0TJVA",0.0);
auto z0PriVtx = Monitored::Scalar<float>("z0PriVtx",0.0);
auto z0 = Monitored::Scalar<float>("z0",0.0);
auto etaTrack = Monitored::Scalar<float>("etaTrack",0.0);
......@@ -154,7 +141,6 @@ StatusCode tauMonitorAlgorithm::fillHistograms( const EventContext& ctx ) const
auto trkWidth2 = Monitored::Scalar<float>("trkWidth2",0.0);
auto ipZ0SinThetaSigLeadTrk = Monitored::Scalar<float>("ipZ0SinThetaSigLeadTrk",0.0);
auto numberOfPixelHits = Monitored::Scalar<float>("numberOfPixelHits",0.0);
auto numberOfInnermostPixelLayerHits = Monitored::Scalar<float>("numberOfInnermostPixelLayerHits",0.0);
auto numberOfPixelSharedHits = Monitored::Scalar<float>("numberOfPixelSharedHits",0.0);
auto numberOfSCTHits = Monitored::Scalar<float>("numberOfSCTHits",0.0);
auto numberOfSCTSharedHits = Monitored::Scalar<float>("numberOfSCTSharedHits",0.0);
......@@ -189,10 +175,6 @@ StatusCode tauMonitorAlgorithm::fillHistograms( const EventContext& ctx ) const
auto trackIdScoreConv = Monitored::Scalar<float>("track",0.0);
auto trackIdScoreFake = Monitored::Scalar<float>("track",0.0);
auto clusterLogEt = Monitored::Scalar<float>("clusterLogEt",0.0);
auto clusterEta = Monitored::Scalar<float>("clusterEta",0.0);
auto clusterPhi = Monitored::Scalar<float>("clusterPhi",0.0);
......@@ -211,9 +193,6 @@ StatusCode tauMonitorAlgorithm::fillHistograms( const EventContext& ctx ) const
nTauCandidates = 0;
for (const auto tau : *shallowTaus) {
......@@ -230,10 +209,6 @@ StatusCode tauMonitorAlgorithm::fillHistograms( const EventContext& ctx ) const
NumTracks = tau->nTracks();
nClusters = tau->detail<int>(xAOD::TauJetParameters::numTopoClusters) ;
LB = GetEventInfo(ctx)->lumiBlock();
lumiPerBCID = lbAverageInteractionsPerCrossing(ctx);
coreTrk = tau->nTracks( xAOD::TauJetParameters::coreTrack ) ;
PtTESMVA = tau->ptFinalCalib() /GeV;
PtCombined = tau->auxdata<float>( "ptCombined" )/GeV;
//calo
EMRadius = tau->detail<float>(xAOD::TauJetParameters::EMRadius);
......@@ -248,7 +223,6 @@ StatusCode tauMonitorAlgorithm::fillHistograms( const EventContext& ctx ) const
jetSeedEta = tau->etaJetSeed();
jetSeedPhi = tau->phiJetSeed();
jetSeedPt = tau->ptJetSeed()/GeV;
ptIntermediateAxis = tau->ptIntermediateAxis()/GeV;
//identification
RNNJetScore = tau->discriminant(xAOD::TauJetParameters::TauID::RNNJetScore);
......@@ -260,9 +234,6 @@ StatusCode tauMonitorAlgorithm::fillHistograms( const EventContext& ctx ) const
tauRNNTight = tau->isTau(xAOD::TauJetParameters::JetRNNSigTight);
dRmax = tau->detail<float>(xAOD::TauJetParameters::dRmax);
EMPOverTrkSysP = tau->detail<float>(xAOD::TauJetParameters::EMPOverTrkSysP);
SumPtTrkFracCorrected = tau->detail<float>(xAOD::TauJetParameters::SumPtTrkFracCorrected);
mEflowApprox = tau->detail<float>(xAOD::TauJetParameters::mEflowApprox)/GeV;
ptRatioEflowApprox = tau->detail<float>( xAOD::TauJetParameters::ptRatioEflowApprox );
trkAvgDist = tau->detail<float>(xAOD::TauJetParameters::trkAvgDist);
......@@ -274,14 +245,8 @@ StatusCode tauMonitorAlgorithm::fillHistograms( const EventContext& ctx ) const
PSSFrac = tau->detail<float>(xAOD::TauJetParameters::PSSFraction ) ;
EMFrac = tau->auxdata<float>( "EMFracFixed" );
if ( tau->isAvailable<float>("hadLeakFracFixed")){
hadLeakFracFixed = tau->auxdata<float>( "hadLeakFracFixed" );
}
if ( tau->isAvailable<float>( "etHotShotWinOverPtLeadTrk" ) ){
etHotShotWinOverPtLeadTrk = tau->auxdata<float>( "etHotShotWinOverPtLeadTrk" );
}
//TauB/SubStructure
EMFracTrk = tau->detail<float>( xAOD::TauJetParameters::ChPiEMEOverCaloEME ) ;
......@@ -298,7 +263,6 @@ StatusCode tauMonitorAlgorithm::fillHistograms( const EventContext& ctx ) const
nullptr : getTrigDecisionTool().operator->());
if (m_etaMin < std::abs(tauEta) && std::abs(tauEta) < m_etaMax){
if (m_kinGroupName != "tauMonKinGroupHighPt"&& m_kinGroupName!="tauMonKinGroupHighPtRNNLoose"){
if (
(
......@@ -417,11 +381,6 @@ StatusCode tauMonitorAlgorithm::fillHistograms( const EventContext& ctx ) const
numberOfPixelSharedHits = dummy;
fill(tool,numberOfPixelSharedHits);
}
if (track->summaryValue(dummy, xAOD::numberOfInnermostPixelLayerHits)){
numberOfInnermostPixelLayerHits = dummy;
fill(tool,numberOfInnermostPixelLayerHits);
}
if (track->summaryValue(dummy, xAOD::numberOfPixelHits)){
numberOfPixelHits = dummy;
......@@ -712,15 +671,20 @@ StatusCode tauMonitorAlgorithm::fillHistograms( const EventContext& ctx ) const
fill(tool,BDTScoreAsP0);
}
if (tauEt > lowerEtThreshold){
tauPhiEt15 = tau->phi();
tauEtaEt15 = tau->eta();
fill(tool,tauPhiEt15,tauEtaEt15);
}
fill(tool
,tauPhi
,tauEta
,LB,tauEt
,centFrac
,isolFrac
,coreTrk
,PtTESMVA
,PtCombined
,EMRadius
,hadRadius
,stripWidth2
......@@ -735,8 +699,6 @@ StatusCode tauMonitorAlgorithm::fillHistograms( const EventContext& ctx ) const
,tauRNNMedium
,tauRNNTight
,PSSFrac
,hadLeakFracFixed
,etHotShotWinOverPtLeadTrk
,EMFrac
,EMFracTrk
,EfracL2EffCluster
......@@ -750,13 +712,8 @@ StatusCode tauMonitorAlgorithm::fillHistograms( const EventContext& ctx ) const
,jetSeedPhi
,jetSeedPt
,dRmax
,EMPOverTrkSysP
,SumPtTrkFracCorrected
,mEflowApprox
,ptIntermediateAxis
,ptRatioEflowApprox
,trkAvgDist
,lumiPerBCID);
,trkAvgDist);
tau->panTauDetail(xAOD::TauJetParameters::PanTau_DecayMode, panModeSubstructureDummy);
panModeSubstructure = panModeSubstructureDummy;
......@@ -769,29 +726,7 @@ StatusCode tauMonitorAlgorithm::fillHistograms( const EventContext& ctx ) const
,panPt);
}
}
}
if ((m_kinGroupName == "tauMonKinGroupHighPt") && tauEt > lowerEtThreshold){
tauPhiEt15 = tau->phi();
tauEtaEt15 = tau->eta();
fill(tool,LB,tauPhiEt15,tauEtaEt15);
}
if ((m_kinGroupName == "tauMonKinGroupHighPtRNNLoose") && tauEt > lowerEtThreshold &&tauRNNLoose){
tauPhiEt15RNNLoose = tau->phi();
tauEtaEt15RNNLoose = tau->eta();
tauEtEt15RNNLoose = tau->pt()/GeV; //GeV
nClustersEt15RNNLoose = tau->detail<int>(xAOD::TauJetParameters::numTopoClusters) ;
NumTracksEt15RNNLoose = tau->nTracks();
fill(tool
,LB
,tauPhiEt15RNNLoose
,tauEtaEt15RNNLoose
,nClustersEt15RNNLoose
,NumTracksEt15RNNLoose
,tauEtEt15RNNLoose);
}
}
}
......
Supports Markdown
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