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

Added a lot of histograms with Hits

parent c2024d88
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
......@@ -84,13 +84,13 @@ def Run3AFPExampleMonitoringConfig(inputFlags):
layerList = ['P0','P1', 'P2', 'P3'] ## TODO XXX adapt to the enum/xAOD namespace names
#stationList = ['FarStation','NearStation'] # TODO XXX
#sideList = ['Aside' , 'Cside' ]
combinedList = [ "farAside", "nearAside" , "nearCside" , "farCside" ]
combinedList = [ 'farAside', 'nearAside' , 'nearCside' , 'farCside' ]
#array = helper.addArray([sideList,stationList,layerList],alg,'AFPSiLayerTool')
array = helper.addArray([combinedList,layerList],alg,'AFPSiLayerTool')
array.defineHistogram( 'h_hitMap', title='Map of hits', type='TH2F', path='AFPSiLayer', xbins=80,xmin=0.5,xmax=80.5, ybins=336,ymin=0.5,ymax=336.5)
array2D = helper.addArray([combinedList,layerList],alg,'AFPSiLayerTool', topPath = 'Hits')
array2D.defineHistogram( 'h_hitMap', title='Map of hits', type='TH2F', path='AFPSiLayer', xbins=80,xmin=0.5,xmax=80.5, ybins=336,ymin=0.5,ymax=336.5)
#array.defineHistogram('h_hitMap', title='hitmap for {0} {1} Layer {2}', path='Keys/{0}', xmax=3. )
array.defineHistogram('h_hitMap', title='hitmap for {0} Layer {1}', path='Keys/{0}', xmax=3. )
array2D.defineHistogram('h_hitMap', title='hitmap for {0} Layer {1}', path='Keys/{0}', xmax=3. )
### STEP 6 ###
# Finalize. The return value should be a tuple of the ComponentAccumulator
......@@ -146,4 +146,5 @@ if __name__=='__main__':
# exampleMonitorAcc.getEventAlgo('ExampleMonAlg').OutputLevel = 2 # DEBUG
# cfg.printConfig(withDetails=False) # set True for exhaustive info
cfg.run(10) #use cfg.run(20) to only run on first 20 events
cfg.run(100) #use cfg.run(20) to only run on first 20 events
......@@ -55,7 +55,7 @@ StatusCode AFPSiLayerAlgorithm::fillHistograms( const EventContext& ctx ) const
auto testweight = Monitored::Scalar<float>("testweight",1.0);
*/
auto lb = Monitored::Scalar<int>("lb", 0); // Nikola
auto nhits = Monitored::Scalar<float>("nhits", 1.0);
auto nhits = Monitored::Scalar<int>("nhits", 1);
/* // Two variables (value and passed) needed for TEfficiency
......@@ -149,18 +149,20 @@ StatusCode AFPSiLayerAlgorithm::fillHistograms( const EventContext& ctx ) const
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
for(const xAOD::AFPSiHit *hitsItr: *afpHitContainer)
{
pixelRowIDChip=hitsItr->pixelRowIDChip();
pixelColIDChip = hitsItr->pixelColIDChip();
std::cout << hitsItr->stationID() << std::endl;
std::cout << hitsItr->pixelLayerID() << std::endl;
std::cout << "Hits iteration -> stationID = " << hitsItr->stationID() << std::endl;
std::cout << "Hits iteration -> pixelLayerID = " << hitsItr->pixelLayerID() << std::endl;
if (hitsItr->stationID()<4 && hitsItr->stationID()>=0
&& hitsItr->pixelLayerID()<4 && hitsItr->pixelLayerID()>=0)
{
fill(m_tools[m_HitmapGroups.at( m_stationnames.at(hitsItr->stationID())).at( m_pixlayers.at(hitsItr->pixelLayerID()))] , pixelRowIDChip , pixelColIDChip);
std::cout << "I AM RIGHT BEFORE FILL METHOD\n" << std::endl;
//fill(m_tools[m_HitmapGroups.at( m_stationnames.at(hitsItr->stationID())).at( m_pixlayers.at(hitsItr->pixelLayerID()))] , pixelRowIDChip , pixelColIDChip);
fill(m_tools[m_HitmapGroups.at( m_stationnames.at(hitsItr->stationID())).at( m_pixlayers.at(hitsItr->pixelLayerID()))] , h_hitMap);
}
else ATH_MSG_WARNING("Unrecognised station index: " << hitsItr->stationID());
......
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