Skip to content
Snippets Groups Projects
Commit 0d8c72b8 authored by Ruby Ferguson's avatar Ruby Ferguson
Browse files

Working to some degree, saved before messing with the fill methods

parent 176c2d56
No related branches found
No related tags found
No related merge requests found
...@@ -71,13 +71,73 @@ def tauMonitoringConfig(inputFlags): ...@@ -71,13 +71,73 @@ def tauMonitoringConfig(inputFlags):
for itup in [(myKinGroupBA,'BA'),(myKinGroupCR,'CR'),(myKinGroupEC,'EC')]: for itup in [(myKinGroupBA,'BA'),(myKinGroupCR,'CR'),(myKinGroupEC,'EC')]:
(igroup, postfix) = itup (igroup, postfix) = itup
igroup.defineHistogram('Eflow', title='Eflow;Eflow;Events', path='Kinematics',
xbins=100, xmin=0., xmax=1000.) ### 1 ###
### 2 ###
igroup.defineHistogram('ntaus', title='Number of tau candidates;Number of Taus per Event', path='Kinematics',
xbins=30, xmin=0., xmax=30.)
### 3 ###
igroup.defineHistogram('eta', title='Eta of tau candidates);Eta);Number of Candidates', path='Kinematics',
xbins=40, xmin=-2., xmax=2.)
### 4 ###
igroup.defineHistogram('phi', title='Phi of tau candidates);Phi);Number of Candidates', path='Kinematics',
xbins=80, xmin=-4., xmax=4.)
### 5 ###
igroup.defineHistogram('pt', title='Pt of tau candidates);pt);Number of Candidates', path='Kinematics',
xbins=300, xmin=0., xmax=100000.)
### 6 ###
igroup.defineHistogram('charge', title='Charge of tau candidates;Charge;Number of Candidates', path='Kinematics',
xbins=120, xmin=-6., xmax=6.)
### 7 ###
igroup.defineHistogram('nTracks', title='nTracks;nTracks;Events', path='Kinematics',
xbins=10, xmin=0., xmax=10.)
### 8 ###
igroup.defineHistogram('nClusters', title='nClusters;nClusters;Events', path='Kinematics',
xbins=40, xmin=0., xmax=40.)
### 9 ### ?????
igroup.defineHistogram('pt15', title='Pt15 of tau candidates);pt);Number of Candidates', path='Kinematics',
xbins=300, xmin=0., xmax=100000.)
### 10 ###
igroup.defineHistogram('pt,eta', type='TH2F', title='PtVsEtaTitle;#eta;pt', path='Kinematics',
xbins=300.,xmin=0.,xmax=100000.,ybins=40.,ymin=-2.,ymax=2.)
### 11 ###
igroup.defineHistogram('pt,phi', type='TH2F', title='PtVsPhiTitle;#eta;#phi',path='Kinematics',
xbins=300.,xmin=0.,xmax=100000.,ybins=80.,ymin=-4.,ymax=4.)
### 12 ###
igroup.defineHistogram('eta,phi', type='TH2F', title='PhiVsEtaTitle;#eta;#phi', path='Kinematics', igroup.defineHistogram('eta,phi', type='TH2F', title='PhiVsEtaTitle;#eta;#phi', path='Kinematics',
#xbins=[0,.1,.2,.4,.8,1.6],ybins=[0,10,30,40,60,70,90])
#xbins=[0,4.,8.,10.,15.],ybins=[0.,1.,2.,3.,4.])
xbins=30,xmin=-3.0,xmax=3.0,ybins=32,ymin=-3.15,ymax=3.15) xbins=30,xmin=-3.0,xmax=3.0,ybins=32,ymin=-3.15,ymax=3.15)
### 13 ###
igroup.defineHistogram('eta15,phi15', type='TH2F', title='PhiVsEtaTitle;#eta;#phi', path='Kinematics',
xbins=30,xmin=-3.0,xmax=3.0,ybins=32,ymin=-3.15,ymax=3.15)
### 14 ###
### STEP 6 ### ### STEP 6 ###
......
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
#include "tauMonitoring/tauMonitorAlgorithm.h" #include "tauMonitoring/tauMonitorAlgorithm.h"
tauMonitorAlgorithm::tauMonitorAlgorithm( const std::string& name, ISvcLocator* pSvcLocator ) tauMonitorAlgorithm::tauMonitorAlgorithm( const std::string& name, ISvcLocator* pSvcLocator )
:AthMonitorAlgorithm(name,pSvcLocator) :AthMonitorAlgorithm(name,pSvcLocator)
,m_doRandom(true) ,m_doRandom(true)
...@@ -34,9 +36,17 @@ StatusCode tauMonitorAlgorithm::fillHistograms( const EventContext& ctx ) const ...@@ -34,9 +36,17 @@ StatusCode tauMonitorAlgorithm::fillHistograms( const EventContext& ctx ) const
using namespace Monitored; using namespace Monitored;
auto Eflow = Monitored::Scalar<float>("Eflow",-1.); auto Eflow = Monitored::Scalar<float>("Eflow");
auto eta = Monitored::Scalar<float>("eta",-4.0); auto eta = Monitored::Scalar<float>("eta");
auto phi = Monitored::Scalar<float>("phi",-1.0); auto phi = Monitored::Scalar<float>("phi");
auto pt = Monitored::Scalar<float>("pt");
auto charge = Monitored::Scalar<int>("charge");
auto nTracks = Monitored::Scalar<int>("nTracks");
auto ntaus = Monitored::Scalar<int>("ntaus");
auto nClusters = Monitored::Scalar<int>("nClusters");
auto pt15 = Monitored::Scalar<float>("pt15");
auto phi15 = Monitored::Scalar<float>("phi15");
auto eta15 = Monitored::Scalar<float>("eta15");
SG::ReadHandle<xAOD::TauJetContainer> taus(m_TauContainerKey, ctx); SG::ReadHandle<xAOD::TauJetContainer> taus(m_TauContainerKey, ctx);
...@@ -45,20 +55,37 @@ StatusCode tauMonitorAlgorithm::fillHistograms( const EventContext& ctx ) const ...@@ -45,20 +55,37 @@ StatusCode tauMonitorAlgorithm::fillHistograms( const EventContext& ctx ) const
return StatusCode::FAILURE; return StatusCode::FAILURE;
} }
ATH_MSG_DEBUG("Number of taus: " << taus->size()); ntaus = taus->size();
bool test = false;
for (const auto& tau : *taus) { for (const auto& tau : *taus) {
// do stuff with taus // do stuff with taus
eta = tau->eta(); eta = tau->eta();
phi = tau->phi(); phi = tau->phi();
ATH_MSG_DEBUG(m_etaMin << m_etaMax << eta); pt = tau->pt();
if ( (fabs(eta) < m_etaMin) || (fabs(eta) > m_etaMax)) continue; charge = tau->charge();
nTracks = tau->nTracks();
nClusters = tau->detail<int>(xAOD::TauJetParameters::numTopoClusters) ;
if (pt>15000){
pt15 = tau->pt();
eta15 = tau->eta();
phi15 = tau->phi();
}
/*
test=tau->detail(xAOD::TauJetParameters::mEflowApprox, Eflow); test=tau->detail(xAOD::TauJetParameters::mEflowApprox, Eflow);
if (test) fill(m_kinGroupName, Eflow, eta, phi ); if (test) fill(m_kinGroupName, Eflow, eta, phi, pt, charge, nTracks, ntaus, nClusters,pt15);
*/
if(pt>15000){
fill(m_kinGroupName, Eflow, eta, phi, pt, charge, nTracks, ntaus, nClusters,pt15, eta15, phi15);
}else{
fill(m_kinGroupName, Eflow, eta, phi, pt, charge, nTracks, ntaus, nClusters);
}
} }
......
/*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
*/
#include "tauMonitoring/tauMonitorAlgorithm.h"
tauMonitorAlgorithm::tauMonitorAlgorithm( const std::string& name, ISvcLocator* pSvcLocator )
:AthMonitorAlgorithm(name,pSvcLocator)
,m_doRandom(true)
{
declareProperty("TauRecContainer", m_TauContainerKey="TauJets");
declareProperty("etaMin", m_etaMin=-1.);
declareProperty("etaMax", m_etaMax=2.6);
declareProperty("kinGroupName", m_kinGroupName="tauMonKinGroupBA");
}
tauMonitorAlgorithm::~tauMonitorAlgorithm() {}
StatusCode tauMonitorAlgorithm::initialize() {
using namespace Monitored;
ATH_CHECK( m_TauContainerKey.initialize() );
return AthMonitorAlgorithm::initialize();
}
StatusCode tauMonitorAlgorithm::fillHistograms( const EventContext& ctx ) const {
using namespace Monitored;
auto Eflow = Monitored::Scalar<float>("Eflow");
auto eta = Monitored::Scalar<float>("eta");
auto phi = Monitored::Scalar<float>("phi");
auto pt = Monitored::Scalar<float>("pt");
auto charge = Monitored::Scalar<int>("charge");
auto nTracks = Monitored::Scalar<int>("nTracks");
auto ntaus = Monitored::Scalar<int>("ntaus");
auto nClusters = Monitored::Scalar<int>("nClusters");
auto pt15 = Monitored::Scalar<float>("pt15");
auto phi15 = Monitored::Scalar<float>("phi15");
auto eta15 = Monitored::Scalar<float>("eta15");
SG::ReadHandle<xAOD::TauJetContainer> taus(m_TauContainerKey, ctx);
if (! taus.isValid() ) {
ATH_MSG_ERROR("evtStore() does not contain tau Collection with name "<< m_TauContainerKey);
return StatusCode::FAILURE;
}
ntaus = taus->size();
for (const auto& tau : *taus) {
// do stuff with taus
eta = tau->eta();
phi = tau->phi();
pt = tau->pt();
charge = tau->charge();
nTracks = tau->nTracks();
nClusters = tau->detail<int>(xAOD::TauJetParameters::numTopoClusters) ;
if (pt>15000){
pt15 = tau->pt();
eta15 = tau->eta();
phi15 = tau->phi();
}
/*
test=tau->detail(xAOD::TauJetParameters::mEflowApprox, Eflow);
if (test) fill(m_kinGroupName, Eflow, eta, phi, pt, charge, nTracks, ntaus, nClusters,pt15);
*/
if(pt>15000){
fill(m_kinGroupName, Eflow, eta, phi, pt, charge, nTracks, ntaus, nClusters,pt15, eta15, phi15);
}else{
fill(m_kinGroupName, Eflow, eta, phi, pt, charge, nTracks, ntaus, nClusters);
}
}
return StatusCode::SUCCESS;
}
todo.txt 0 → 100644
***************************************
List of histograms from the tool file
***************************************
1 - TH1* h_ntaus_vs_LB;
2 - TH1* h_ntaus;
3 - TH1* h_eta;
4 - TH1* h_phi;
5 - TH1* h_et;
6 - TH1* h_charge;
7 - TH1* h_numTracks;
8 - TH1* h_nclst;
9 - TH1* h_nHighPTtaus;
10 - TH2* h_EtVsEta;
11 - TH2* h_EtVsPhi;
12 - TH2* h_PhiVsEta;
13 - TH2* h_PhiVsEta_et15;
14 - TH2* h_PhiVsEta_et15_BDTLoose ;
*******************
Variables obtained
*******************
Eflow
eta
phi
pt
charge
numTracks
**************************
Meaning of the Variables
*************************
LB - luminosity block
eta - pseudorapidity
phi - azimuthal angle
pt - transverse momentum
charge - charge of taus???
tree.txt 0 → 100644
.
|-- Control
| `-- AthenaMonitoring
| |-- AthenaMonitoring
| | |-- ATLAS_CHECK_THREAD_SAFETY
| | |-- AthMonitorAlgorithm.h
| | |-- AthenaMon.h
| | |-- AthenaMonManager.h
| | |-- DQAtlasReadyFilterTool.h
| | |-- DQBadLBFilterAlg.h
| | |-- DQBadLBFilterTool.h
| | |-- DQDummyFilterTool.h
| | |-- DQEventFlagFilterTool.h
| | |-- DQFilledBunchFilterTool.h
| | |-- ExampleMonitorAlgorithm.h
| | |-- FastPhysMonToolBase.h
| | |-- GenericMonitoringTool.h
| | |-- IDQFilterTool.h
| | |-- IMonitorToolBase.h
| | |-- ITriggerTranslatorTool.h
| | |-- LogFileMsgStream.h
| | |-- ManagedMonitorToolBase.h
| | |-- ManagedMonitorToolTest.h
| | |-- MonitorToolBase.h
| | |-- Monitored.h
| | |-- OHLockedHist.h
| | `-- TriggerTranslatorSimple.h
| |-- CMakeLists.txt
| |-- python
| | |-- AthMonitorCfgHelper.py
| | |-- AthenaMonitoringCfg.py
| | |-- AtlasReadyFilterTool.py
| | |-- BadLBFilterTool.py
| | |-- DQConfigFlags.py
| | |-- DQMonFlags.py
| | |-- EventFlagFilterTool.py
| | |-- ExampleMonitorAlgorithm.py
| | |-- FilledBunchFilterTool.py
| | |-- GenericMonitoringTool.py
| | |-- TriggerInterface.py
| | `-- __init__.py
| |-- share
| | |-- AtlasReadyFilterTool_jobOptions.py
| | |-- CondDB_jobOptions.py
| | |-- DQMonFlagsConfig_jobOptions.py
| | |-- DataQualityInit_jobOptions.py
| | |-- DataQualitySteering_jobOptions.py
| | |-- ManagedMonitorToolTest.py
| | |-- Run3DQTestingDriver.py
| | |-- TrigDecTool_jobOptions.py
| | `-- aod2hist_topoptions.py
| |-- src
| | |-- AthMonBench.cxx
| | |-- AthMonBench.h
| | |-- AthMonitorAlgorithm.cxx
| | |-- AthenaMon.cxx
| | |-- AthenaMonManager.cxx
| | |-- DQAtlasReadyFilterTool.cxx
| | |-- DQBadLBFilterAlg.cxx
| | |-- DQBadLBFilterTool.cxx
| | |-- DQDummyFilterTool.cxx
| | |-- DQEventFlagFilterTool.cxx
| | |-- DQFilledBunchFilterTool.cxx
| | |-- ExampleMonitorAlgorithm.cxx
| | |-- FastPhysMonToolBase.cxx
| | |-- LWHistAthMonWrapper.h
| | |-- LWHistAthMonWrapper.icc
| | |-- ManagedMonitorToolBase.cxx
| | |-- ManagedMonitorToolTest.cxx
| | |-- MonitorToolBase.cxx
| | |-- TriggerTranslatorSimple.cxx
| | `-- components
| | `-- AthenaMonitoring_entries.cxx
| `-- test
| `-- HistogramFillerRebinable1DTestSuiteExtendAxes.cxx
|-- Projects
| `-- WorkDir
| |-- CMakeLists.txt
| |-- Doxyfile.in
| |-- README.md
| `-- package_filters_example.txt
|-- Reconstruction
| `-- tauMonitoring
| |-- CMakeLists.txt
| |-- python
| | |-- TauMonitoringConfig.py
| | `-- tauMonitorAlgorithm.py
| |-- share
| | `-- tauMonitoring_jobOptions.py
| |-- src
| | |-- components
| | | `-- tauMonitoring_entries.cxx
| | |-- tauMonTool.cxx
| | `-- tauMonitorAlgorithm.cxx
| `-- tauMonitoring
| |-- tauMonTool.h
| `-- tauMonitorAlgorithm.h
|-- todo.txt
`-- tree.txt
17 directories, 81 files
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment