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

Added ToF histograms - HitBarVsTrain

parent 7def25a6
8 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
......@@ -21,12 +21,16 @@ public:
virtual StatusCode fillHistograms( const EventContext& ctx ) const override;
private:
//std::map<std::string,std::map<std::string,int>> m_HitmapGroupsToF;
//std::map<std::string, int> m_HitmapGroupsToF;
//std::vector<std::string> m_HitmapGroupsToF;
std::map<std::string,int> m_HitmapGroupsToF;
SG::ReadHandleKey<xAOD::AFPToFHitContainer> m_afpToFHitContainerKey;
protected:
std::vector<std::string> m_pixlayers = { "P0", "P1", "P2", "P3"};
std::vector<std::string> m_stationnames = { "farAside", "nearAside" , "nearCside" , "farCside"};
// Only 0 and 3 are ToF stations (farAside and farCside)
std::vector<std::string> m_stationNamesToF = { "farAside", "nearAside" , "nearCside" , "farCside" };
};
#endif
......@@ -31,6 +31,7 @@ def Run3AFPExampleMonitoringConfig(inputFlags):
AFPToFGroup.defineHistogram('numberOfHit_S0', title='Number of hit per bar station 0;total number of Hits', path='ToF/',xbins=4,xmin=-0.5,xmax=3.5)
AFPToFGroup.defineHistogram('numberOfHit_S3', title='Number of hit per bar station 3;total number of Hits', path='ToF/',xbins=4,xmin=-0.5,xmax=3.5)
#AFPToFGroup.defineHistogram('trainID,barInTrainID', title='ToF hit bar vs train side A;trainID;barInTrainID', type='TH2F', path='ToF/',xbins=4,xmin=-0.5,xmax=3.5,ybins=4,ymin=-0.5,ymax=3.5)
# Using a map of groups
......@@ -43,7 +44,11 @@ def Run3AFPExampleMonitoringConfig(inputFlags):
array.defineHistogram('pixelColIDChip,pixelRowIDChip', title='hitmap for {0} Layer {1}', type='TH2F', path='pixelColRow2D', xbins=80, xmin=0.5, xmax=80.5, ybins=336, ymin=0.5, ymax=336.5)
array.defineHistogram('timeOverThreshold', title='1D Time over threshold for {0} Layer {1}', path='SiTimeOverThreshold', xbins=60, xmin=0, xmax=20)
#array.defineHistogram('pixelColIDChip,pixelColIDChip', title='Correlation Row {0} Row {1}', type='TH2F', path='Correlation', xbins=80, xmin=0.5, xmax=80.5, ybins=336, ymin=0.5, ymax=336.5)
#tofStations = [ 'Aside', 'Cside' ]
arrayToF = helper.addArray([combinedList], afpToFAlgorithm, 'AFPToFTool', topPath='AFP/ToF/')
arrayToF.defineHistogram('trainID,barInTrainID', title='ToF hit bar vs train {0};trainID;barInTrainID', type='TH2F', path='HitBarvsTrain/',xbins=4,xmin=-0.5,xmax=3.5,ybins=4,ymin=-0.5,ymax=3.5)
#array.defineHistogram('pixelColIDChip,pixelColIDChip', title='Correlation Row {0} Row {1}', type='TH2F', path='Correlation', xbins=80, xmin=0.5, xmax=80.5, ybins=80, ymin=0.5, ymax=80.5)
#array.defineHistogram('pixelRowIDChip,pixelRowIDChip', title='Correlation Col {0} Col {1}', type='TH2F', path='Correlation', xbins=80, xmin=0.5, xmax=80.5, ybins=336, ymin=0.5, ymax=336.5)
# Finalize. The return value should be a tuple of the ComponentAccumulator
......@@ -81,6 +86,6 @@ if __name__=='__main__':
exampleMonitorAcc = Run3AFPExampleMonitoringConfig(ConfigFlags)
cfg.merge(exampleMonitorAcc)
cfg.run(10000) #use cfg.run(20) to only run on first 20 events
cfg.run(1000) #use cfg.run(20) to only run on first 20 events
......@@ -26,7 +26,11 @@ AFPToFAlgorithm::~AFPToFAlgorithm() {}
StatusCode AFPToFAlgorithm::initialize() {
using namespace Monitored;
//m_HitmapGroupsToF = buildToolMap<std::map<std::string,int>>(m_tools,"AFPToFAlgorithm", m_stationNamesToF);
//m_HitmapGroupsToF = buildToolMap<std::map<std::string,int>>(m_tools,"AFPToFAlgorithm", m_stationNamesToF);
//m_HitmapGroupsToF = buildToolMap<std::vector<int>>(m_tools,"AFPToFTool", m_stationNamesToF);
m_HitmapGroupsToF = buildToolMap<int>(m_tools,"AFPToFTool", m_stationNamesToF);
// We must declare to the framework in initialize what SG objects we are going to use
SG::ReadHandleKey<xAOD::AFPToFHitContainer> afpToFHitContainerKey("AFPToFHits");
ATH_CHECK(m_afpToFHitContainerKey.initialize());
......@@ -43,7 +47,6 @@ StatusCode AFPToFAlgorithm::fillHistograms( const EventContext& ctx ) const {
auto nTofHits = Monitored::Scalar<int>("nTofHits", 1);
lb = GetEventInfo(ctx)->lumiBlock();
SG::ReadHandle<xAOD::AFPToFHitContainer> afpToFHitContainer(m_afpToFHitContainerKey, ctx);
if(! afpToFHitContainer.isValid())
......@@ -73,14 +76,27 @@ StatusCode AFPToFAlgorithm::fillHistograms( const EventContext& ctx ) const {
{
numberOfHit_S0 = hitsItr->trainID();
fill("AFPToFTool", numberOfHit_S0);
fill("AFPToFTool", trainID, barInTrainID);
//std::cout << "\n\t" << hitsItr->stationID() << "\n";
//fill(m_tools[m_HitmapGroupsToF.at("Aside")], trainID, barInTrainID);
//fill(m_tools[m_HitmapGroupsToF.at(m_stationNamesToF.at(0))], trainID, barInTrainID);
//fill(m_tools[m_HitmapGroupsToF[0]], trainID, barInTrainID);
//fill("AFPToFTool", trainID, barInTrainID);
}
else if(hitsItr->isSideC())
{
numberOfHit_S3 = hitsItr->trainID();
fill("AFPToFTool", numberOfHit_S3);
fill("AFPToFTool", trainID, barInTrainID);
fill("AFPToFTool", numberOfHit_S3);
//std::cout << "\n\t" << hitsItr->stationID() << "\n";
//fill(m_tools[m_HitmapGroupsToF.at(m_stationnames.at(hitsItr->stationID()))], trainID, barInTrainID);
//fill(m_tools[m_HitmapGroupsToF.at("Cside")], trainID, barInTrainID);
//fill(m_tools[m_HitmapGroupsToF[1]], trainID, barInTrainID);
//fill("AFPToFTool", trainID, barInTrainID);
}
if (hitsItr->stationID() == 0 || hitsItr->stationID() == 3)
fill(m_tools[m_HitmapGroupsToF.at(m_stationNamesToF.at(hitsItr->stationID()))], trainID, barInTrainID);
}
return StatusCode::SUCCESS;
......
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