Skip to content
Snippets Groups Projects
Commit 0b41eb1e authored by Nikola Dikic's avatar Nikola Dikic
Browse files

ToF histograms obtaining - version 0.9

parent 8c5a4fca
9 merge requests!58791DataQualityConfigurations: Modify L1Calo config for web display,!46784MuonCondInterface: Enable thread-safety checking.,!46776Updated LArMonitoring config file for WD to match new files produced using MT,!45405updated ART test cron job,!42417Draft: DIRE and VINCIA Base Fragments for Pythia 8.3,!36664AFP DQM [rel 22],!36035AFP Run3 merge request - added automatic check,!32548AFP Run3 Monitoring DQ Data Quality - changes in python file,!28689First template for AFP Run3 Monitoring DQ Data Quality
......@@ -14,6 +14,7 @@ atlas_depends_on_subdirs(
GaudiKernel
Event/xAOD/xAODForward
xAODForward/AFPSiHit
xAODForward/AFPToFHit #Nikola
LumiBlock/LumiBlockComps
LumiBlock/LumiBlockData
Trigger/TrigEvent/TrigDecisionInterface
......
......@@ -21,13 +21,13 @@ public:
virtual StatusCode initialize() override;
virtual StatusCode fillHistograms( const EventContext& ctx ) const override;
private:
Gaudi::Property<bool> m_doRandom {this,"RandomHist",false};
std::vector<int> m_abGroups1;
std::vector<std::vector<int>> m_abGroups2;
std::map<std::string,int> m_cGroups1;
//Gaudi::Property<bool> m_doRandom {this,"RandomHist",false};
//std::vector<int> m_abGroups1;
//std::vector<std::vector<int>> m_abGroups2;
//std::map<std::string,int> m_cGroups1;
//std::map<std::string,std::map<std::string,std::map<std::string,int>>> m_HitmapGroups;
std::map<std::string,std::map<std::string,int>> m_HitmapGroups;
SG::ReadHandleKey<xAOD::AFPSiHitContainer> m_afpHitContainerKey;
//std::map<std::string,std::map<std::string,int>> m_HitmapGroups;
SG::ReadHandleKey<xAOD::AFPToFHitContainer> m_afpToFHitContainerKey;
// m_HitmapGroups = buildToolMap<std::string,std::map<std::string,int>>
protected:
......
......@@ -73,6 +73,7 @@ def Run3AFPExampleMonitoringConfig(inputFlags):
# Add a GMT for the other example monitor algorithm
# anotherGroup = helper.addGroup(anotherExampleMonAlg,'AFPSiLayer')
AFPGroup.defineHistogram('lb', title='Luminosity Block;lb;total number of Hits', path='Global',xbins=1000,xmin=-0.5,xmax=999.5,weight='nhits')
AFPToFGroup.defineHistogram('lb', title='Luminosity Block;lb;total number of Hits', path='Global',xbins=1000,xmin=-0.5,xmax=999.5,weight='nhits')
### STEP 5 ###
# Configure histogramsIf you want to create histograms with variable bin widths, ROOT provides another constructor suited for this purpose. Instead of passing the data interval and the number of bins, you have to pass an array (single or double precision) of bin edges. When the histogram has n bins, then there are n+1 distinct edges, so the array you pass must be of size n+1.
......
......@@ -14,13 +14,10 @@
AFPToFAlgorithm::AFPToFAlgorithm( const std::string& name, ISvcLocator* pSvcLocator )
:AthMonitorAlgorithm(name,pSvcLocator)
//, m_histsDirectoryName ("AFP/")
//, m_cNearStation (s_cNearStationIndex)
//, m_cFarStation (s_cFarStationIndex)
, m_afpToFContainerKey("AFPToFContainer")
, m_afpToFHitContainerKey("AFPToFHitContainer")
{
declareProperty( "AFPToFContainer", m_afpToFContainerKey );
declareProperty( "AFPToFHitContainer", m_afpToFHitContainerKey );
}
......@@ -30,12 +27,12 @@ AFPToFAlgorithm::~AFPToFAlgorithm() {}
StatusCode AFPToFAlgorithm::initialize() {
using namespace Monitored;
m_HitmapGroups = buildToolMap<std::map<std::string,int>>(m_tools,"AFPToFTool",m_stationnames,m_pixlayers);
//m_HitmapGroups = buildToolMap<std::map<std::string,int>>(m_tools,"AFPToFTool",m_stationnames,m_pixlayers);
// std::map<std::string,std::map<std::string,int>> <std::map<std::string,int>>
// We must declare to the framework in initialize what SG objects we are going to use
SG::ReadHandleKey<xAOD::AFPToFContainer> afpToFContainerKey("AFPToFHits");
ATH_CHECK(m_afpToFContainerKey.initialize());
SG::ReadHandleKey<xAOD::AFPToFHitContainer> afpToFHitContainerKey("AFPToFHits");
ATH_CHECK(m_afpToFHitContainerKey.initialize());
// ...
return AthMonitorAlgorithm::initialize();
}
......@@ -57,10 +54,10 @@ StatusCode AFPToFAlgorithm::fillHistograms( const EventContext& ctx ) const {
lb = GetEventInfo(ctx)->lumiBlock(); // Nikola
SG::ReadHandle<xAOD::AFPToFContainer> afpToFContainer(m_afpToFContainerKey, ctx);
if(! afpToFContainer.isValid())
SG::ReadHandle<xAOD::AFPToFHitContainer> afpToFHitContainer(m_afpToFHitContainerKey, ctx);
if(! afpToFHitContainer.isValid())
{
ATH_MSG_ERROR("evtStore() does not contain hits collection with name " << m_afpToFContainerKey);
ATH_MSG_ERROR("evtStore() does not contain hits collection with name " << m_afpToFHitContainerKey);
return StatusCode::FAILURE;
}
......@@ -73,11 +70,11 @@ StatusCode AFPToFAlgorithm::fillHistograms( const EventContext& ctx ) const {
*
******************************************/
ATH_CHECK( afpToFContainer.initialize() );
ATH_CHECK( afpToFHitContainer.initialize() );
nhits = afpToFContainer->size();
nhits = afpToFHitContainer->size();
fill("AFPSiLayerTool", lb, nhits);
/*
auto pixelRowIDChip = Monitored::Scalar<int>("pixelRowIDChip", 0); // Nikola
auto pixelColIDChip = Monitored::Scalar<int>("pixelColIDChip", 0); // Nikola
auto h_hitMap = Monitored::Scalar<int>("h_hitMap", 0); // Nikola
......@@ -98,7 +95,7 @@ StatusCode AFPToFAlgorithm::fillHistograms( const EventContext& ctx ) const {
ATH_MSG_WARNING("Unrecognised station index: " << hitsItr->stationID());
}
*/
return StatusCode::SUCCESS;
}
......
......@@ -6,4 +6,4 @@
#include "Run3AFPMonitoring/AFPToFAlgorithm.h"
DECLARE_COMPONENT( AFPSiLayerAlgorithm )
//DECLARE_COMPONENT( AFPToFAlgorithm )
DECLARE_COMPONENT( AFPToFAlgorithm )
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