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

Cleaning the code

parent 0fefcf29
No related branches found
No related tags found
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
......@@ -19,25 +19,14 @@ public:
virtual ~AFPSiLayerAlgorithm();
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;
//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;
// m_HitmapGroups = buildToolMap<std::string,std::map<std::string,int>>
protected:
std::vector<std::string> m_pixlayers = { "P0", "P1", "P2", "P3"};
std::vector<std::string> m_stationnames = { "farAside", "nearAside" , "nearCside" , "farCside"};
static const int s_cNearStationIndex;
static const int s_cFarStationIndex;
const std::string m_histsDirectoryName;
protected:
std::vector<std::string> m_pixlayers = { "P0", "P1", "P2", "P3"};
std::vector<std::string> m_stationnames = { "farAside", "nearAside" , "nearCside" , "farCside"};
};
#endif
......
......@@ -11,7 +11,6 @@
#include "xAODForward/AFPToFHitContainer.h"
#include "xAODForward/AFPToFHit.h"
#include "TRandom3.h"
class AFPToFAlgorithm : public AthMonitorAlgorithm {
......@@ -20,26 +19,14 @@ public:
virtual ~AFPToFAlgorithm();
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;
//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::AFPToFHitContainer> m_afpToFHitContainerKey;
// m_HitmapGroups = buildToolMap<std::string,std::map<std::string,int>>
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"};
//static const int s_cNearStationIndex;
//static const int s_cFarStationIndex;
//const std::string m_histsDirectoryName;
};
#endif
......@@ -12,106 +12,39 @@
def Run3AFPExampleMonitoringConfig(inputFlags):
'''Function to configures some algorithms in the monitoring system.'''
### STEP 1 ###
# If you need to set up special tools, etc., you will need your own ComponentAccumulator;
# uncomment the following 2 lines and use the last three lines of this function instead of the ones
# just before
# from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
# result = ComponentAccumulator()
# The following class will make a sequence, configure algorithms, and link
# them to GenericMonitoringTools
from AthenaMonitoring import AthMonitorCfgHelper
helper = AthMonitorCfgHelper(inputFlags,'Run3AFPMonitorCfg')
### STEP 2 ###
# Adding an algorithm to the helper. Here, we will use the example
# algorithm in the AthenaMonitoring package. Just pass the type to the
# helper. Then, the helper will instantiate an instance and set up the
# base class configuration following the inputFlags. The returned object
# is the algorithm.
from Run3AFPMonitoring.Run3AFPMonitoringConf import AFPSiLayerAlgorithm
afpSiLayerAlgorithm = helper.addAlgorithm(AFPSiLayerAlgorithm,'AFPSiLayerAlg')
from Run3AFPMonitoring.Run3AFPMonitoringConf import AFPToFAlgorithm
afpToFAlgorithm = helper.addAlgorithm(AFPToFAlgorithm,'AFPToFAlg')
# You can actually make multiple instances of the same algorithm and give
# them different configuration
#anotherExampleMonAlg = helper.addAlgorithm(AFPSiLayerAlgorithm,'AnotherExampleMonAlg')
# # If for some really obscure reason you need to instantiate an algorithm
# # yourself, the AddAlgorithm method will still configure the base
# # properties and add the algorithm to the monitoring sequence.
# helper.AddAlgorithm(myExistingAlg)
### STEP 3 ###
# Edit properties of a algorithm
# some generic property
#exampleMonAlg.RandomHist = True
# to enable a trigger filter, for example:
#exampleMonAlg.TriggerChain = 'HLT_mu26_ivarmedium'
### STEP 4 ###
# Add some tools. N.B. Do not use your own trigger decion tool. Use the
# standard one that is included with AthMonitorAlgorithm.
# # Then, add a tool that doesn't have its own configuration function. In
# # this example, no accumulator is returned, so no merge is necessary.
# from MyDomainPackage.MyDomainPackageConf import MyDomainTool
# exampleMonAlg.MyDomainTool = MyDomainTool()
# Add a generic monitoring tool (a "group" in old language). The returned
# object here is the standard GenericMonitoringTool.
AFPGroup = helper.addGroup( afpSiLayerAlgorithm, 'AFPSiLayerTool', 'AFP/' )
AFPToFGroup = helper.addGroup( afpToFAlgorithm, 'AFPToFTool', 'AFP/' )
AFPSiGroup = helper.addGroup(afpSiLayerAlgorithm, 'AFPSiLayerTool', 'AFP/')
AFPToFGroup = helper.addGroup(afpToFAlgorithm, 'AFPToFTool', 'AFP/')
# station0_1 = helper.addGroup(afpSiLayerAlgorithm, 'AFPSiLayer','Station0/')
# 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='nsihits')
AFPSiGroup.defineHistogram('lb', title='Luminosity Block;lb;total number of Hits', path='Global',xbins=1000,xmin=-0.5,xmax=999.5,weight='nsihits')
AFPToFGroup.defineHistogram('lb', title='Luminosity Block;lb;total number of Hits', path='ToF',xbins=1000,xmin=-0.5,xmax=999.5,weight='ntofhits')
AFPToFGroup.defineHistogram('numberOfHit_S0', title='Number of hit per bar station 0;total number of Hits', path='ToF',xbins=3,xmin=-0.5,xmax=2.5)
AFPToFGroup.defineHistogram('numberOfHit_S3', title='Number of hit per bar station 3;total number of Hits', path='ToF',xbins=3,xmin=-0.5,xmax=2.5)
### 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.
# Example defining an array of histograms. This is useful if one seeks to create a
# number of histograms in an organized manner. (For instance, one plot for each ASIC
# in the subdetector, and these components are mapped in eta, phi, and layer.) Thus,
# one might have an array of TH1's such as quantity[etaIndex][phiIndex][layerIndex].
for alg in [afpSiLayerAlgorithm]:
for alg in [afpSiLayerAlgorithm]:
# Using a map of groups
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')
array2D = helper.addArray([combinedList,layerList],alg,'AFPSiLayerTool', topPath = 'Hits')
array2D.defineHistogram( 'pixelColIDChip,pixelRowIDChip', title='hitmap for {0} Layer {1}', 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. )
array2D = helper.addArray([combinedList,layerList], alg, 'AFPSiLayerTool', topPath = 'Hits')
array2D.defineHistogram('pixelColIDChip,pixelRowIDChip', title='hitmap for {0} Layer {1}', type='TH2F', path='AFPSiLayer', xbins=80, xmin=0.5, xmax=80.5, ybins=336, ymin=0.5, ymax=336.5)
#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
# and the sequence containing the created algorithms. If we haven't called
# any configuration other than the AthMonitorCfgHelper here, then we can
# just return directly (and not create "result" above)
return helper.result()
# # Otherwise, merge with result object and return
# acc = helper.result()
# result.merge(acc)
# return result
if __name__=='__main__':
# Setup the Run III behavior
......@@ -129,14 +62,14 @@ if __name__=='__main__':
#file = 'data18_13TeV.00348618.physics_Main.recon.AOD.v220._lb0295._0009.1'
file = '/afs/cern.ch/work/k/kristin/dataAFP/data17_13TeV.00337176.physics_Main.merge.AOD.r10258_p3399_tid13243079_00/AOD.13243079._000003.pool.root.1' #ToF
#file = '/afs/cern.ch/work/k/kristin/dataAFP/data17_13TeV.00337176.physics_Main.merge.AOD.r10258_p3399_tid13243079_00/AOD.13243079._000005.pool.root.1' #SiT
#/afs/cern.ch/work/k/kristin/dataAFP/data17_13TeV.00337176.physics_Main.deriv.DAOD_STDM7.r10258_p3399_p4030/DAOD_STDM7.20036794._000007.pool.root.1'
#/afs/cern.ch/work/k/kristin/dataAFP/data17_13TeV.00337176.physics_Main.recon.AOD.r10258_p3412_r11501/AOD.18508508._000007.pool.root.1'
#/eos/atlas/atlastier0/tzero/prod/data18_13TeV/physics_Main/00354309/data18_13TeV.00354309.physics_Main.recon.AOD.f946/data18_13TeV.00354309.physics_Main.recon.AOD.f946._lb0130._0001.1'
# nightly = '/eos/atlas/atlastier0/tzero/prod/data18_13TeV/physics_Main/00357750/data18_13TeV.00357750.physics_Main.recon.AOD.f1041/'
# file = 'data18_13TeV.00357750.physics_Main.recon.AOD.f1041._lb0105._SFO-7._0103.1'
#/afs/cern.ch/work/k/kristin/dataAFP/data17_13TeV.00337176.physics_Main.deriv.DAOD_STDM7.r10258_p3399_p4030/DAOD_STDM7.20036794._000007.pool.root.1'
#/afs/cern.ch/work/k/kristin/dataAFP/data17_13TeV.00337176.physics_Main.recon.AOD.r10258_p3412_r11501/AOD.18508508._000007.pool.root.1'
#/eos/atlas/atlastier0/tzero/prod/data18_13TeV/physics_Main/00354309/data18_13TeV.00354309.physics_Main.recon.AOD.f946/data18_13TeV.00354309.physics_Main.recon.AOD.f946._lb0130._0001.1'
#nightly = '/eos/atlas/atlastier0/tzero/prod/data18_13TeV/physics_Main/00357750/data18_13TeV.00357750.physics_Main.recon.AOD.f1041/'
#file = 'data18_13TeV.00357750.physics_Main.recon.AOD.f1041._lb0105._SFO-7._0103.1'
#nightly = '/eos/atlas/atlastier0/tzero/prod/data17_13TeV/physics_Main/00337176/data17_13TeV.00337176.physics_Main.recon.AOD.f871/'
#file = 'data17_13TeV.00337176.physics_Main.recon.AOD.f871._lb0142._0006.1'
ConfigFlags.Input.Files = [nightly+file]
ConfigFlags.Input.isMC = False
ConfigFlags.Output.HISTFileName = 'AFPOutput.root'
......@@ -152,9 +85,5 @@ if __name__=='__main__':
exampleMonitorAcc = Run3AFPExampleMonitoringConfig(ConfigFlags)
cfg.merge(exampleMonitorAcc)
# If you want to turn on more detailed messages ...
# exampleMonitorAcc.getEventAlgo('ExampleMonAlg').OutputLevel = 2 # DEBUG
# cfg.printConfig(withDetails=False) # set True for exhaustive info
cfg.run(100) #use cfg.run(20) to only run on first 20 events
......@@ -8,17 +8,12 @@
*/
#include "Run3AFPMonitoring/AFPSiLayerAlgorithm.h"
//#include <xAODForward/AFPSiHit.h>
//#include <xAODForward/AFPSiHitContainer.h>
#include "StoreGate/ReadHandleKey.h"
#include "xAODForward/AFPStationID.h"
AFPSiLayerAlgorithm::AFPSiLayerAlgorithm( const std::string& name, ISvcLocator* pSvcLocator )
:AthMonitorAlgorithm(name,pSvcLocator)
//, m_histsDirectoryName ("AFP/")
//, m_cNearStation (s_cNearStationIndex)
//, m_cFarStation (s_cFarStationIndex)
, m_afpHitContainerKey("AFPSiHitContainer")
{
......@@ -32,13 +27,12 @@ AFPSiLayerAlgorithm::~AFPSiLayerAlgorithm() {}
StatusCode AFPSiLayerAlgorithm::initialize() {
using namespace Monitored;
m_HitmapGroups = buildToolMap<std::map<std::string,int>>(m_tools,"AFPSiLayerTool",m_stationnames,m_pixlayers);
m_HitmapGroups = buildToolMap<std::map<std::string,int>>(m_tools,"AFPSiLayerTool", 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
// We must declare to the framework in initialize what SG objects we are going to use:
SG::ReadHandleKey<xAOD::AFPSiHitContainer> afpHitContainerKey("AFPSiHits");
ATH_CHECK(m_afpHitContainerKey.initialize());
// ...
ATH_CHECK(m_afpHitContainerKey.initialize());
return AthMonitorAlgorithm::initialize();
}
......@@ -46,91 +40,14 @@ StatusCode AFPSiLayerAlgorithm::initialize() {
StatusCode AFPSiLayerAlgorithm::fillHistograms( const EventContext& ctx ) const {
using namespace Monitored;
// Declare the quantities which should be monitored
// My histograms:
// auto h_hitMultiplicity = Monitored::Scalar<int>("h_hitMultiplicity", 0);
// auto h_timeOverThreshold = Monitored::Scalar<int>("h_timeOverThreshold", 0);
//auto h_hitMap = Monitored::Scalar<int>("h_hitMap", 0);
// End
/*
auto lumiPerBCID = Monitored::Scalar<float>("lumiPerBCID",0.0);
auto lb = Monitored::Scalar<int>("lb",0);
auto run = Monitored::Scalar<int>("run",0);
auto random = Monitored::Scalar<float>("random",0.0);
auto testweight = Monitored::Scalar<float>("testweight",1.0);
*/
auto lb = Monitored::Scalar<int>("lb", 0); // Nikola
auto nsihits = Monitored::Scalar<int>("nsihits", 1);
// Declare the quantities which should be monitored:
auto lb = Monitored::Scalar<int>("lb", 0);
auto nSiHits = Monitored::Scalar<int>("nSiHits", 1);
auto pixelRowIDChip = Monitored::Scalar<int>("pixelRowIDChip", 0);
auto pixelColIDChip = Monitored::Scalar<int>("pixelColIDChip", 0);
/* // Two variables (value and passed) needed for TEfficiency
auto pT = Monitored::Scalar<float>("pT",0.0);
auto pT_passed = Monitored::Scalar<bool>("pT_passed",false);
*/
// Set the values of the monitored variables for the event
// h_timeOverThreshold = lbAverageInteractionsPerCrossing(ctx);
// h_hitMultiplicity = lbAverageInteractionsPerCrossing(ctx);
// h_hitMap = lbAverageInteractionsPerCrossing(ctx);
lb = GetEventInfo(ctx)->lumiBlock(); // Nikola
/*
lumiPerBCID = lbAverageInteractionsPerCrossing(ctx);
lb = GetEventInfo(ctx)->lumiBlock();
run = GetEventInfo(ctx)->runNumber();
testweight = 2.0;
TRandom3 r(ctx.eventID().event_number());
// Example of using flags
if (m_doRandom) {
random = r.Rndm();
}
// Fake efficiency calculator
pT = r.Landau(15);
pT_passed = pT>r.Poisson(15);
*/
// Fill. First argument is the tool name, all others are the variables to be saved.
//fill("AFPSiLayer", h_timeOverThreshold, h_hitMultiplicity,lumiPerBCID,lb,random,pT,pT_passed,testweight);
//fill("AFPSiLayerAlgorithm",h_hitMultiplicity,lb,random,pT,pT_passed,testweight);
//////////fill("AFPSiLayer", h_timeOverThreshold, h_hitMultiplicity);
//fill("AFPSiLayerTool", lb);
// Alternative fill method. Get the group yourself, and pass it to the fill function.
//auto tool = getGroup("AFPSiLayer");
//fill(tool,run);
// Fill with a vector; useful in some circumstances.
/*
std::vector<std::reference_wrapper<Monitored::IMonitoredVariable>> varVec = {lumiPerBCID,pT};
fill("AFPSiLayer",varVec);
fill(tool,varVec);
*/
/*
// Filling using a pre-defined array of groups.
auto a = Scalar<float>("a",0.0);
auto b = Scalar<float>("b",1.0);
auto c = Scalar<float>("c",2.0);
for ( auto iEta : {0,1} ) {
// 1) Valid but inefficient fill
fill("AFPSiLayer_"+std::to_string(iEta),a,b,c);
// 2) Faster way to fill a vector of histograms
fill(m_tools[m_abGroups1[iEta]],a,b,c);
for ( auto iPhi : {0,1} ) {
// Same efficient method for 2D array
fill(m_tools[m_abGroups2[iEta][iPhi]],a,b);
}
}
// Filling using a pre-defined map of groups.
for ( auto& layer : std::vector<std::string>({"layer1","layer2"}) ) {
fill(m_tools[m_cGroups1.at(layer)],c);
for ( auto& cluster : std::vector<std::string>({"clusterX","clusterB"}) ) {
// Same efficient method for 2D map
fill(m_tools[m_cGroups2.at(layer).at(cluster)],c);
}
}
*/
SG::ReadHandle<xAOD::AFPSiHitContainer> afpHitContainer(m_afpHitContainerKey, ctx);
if(! afpHitContainer.isValid())
{
......@@ -140,55 +57,30 @@ StatusCode AFPSiLayerAlgorithm::fillHistograms( const EventContext& ctx ) const
/**
*
* const int xAOD::AFPStationID::farA = 0;
* const int xAOD::AFPStationID::farA = 0;
* const int xAOD::AFPStationID::nearA = 1;
* const int xAOD::AFPStationID::nearC = 2;
* const int xAOD::AFPStationID::farC = 3;
* const int xAOD::AFPStationID::farC = 3;
*
*/
ATH_CHECK( afpHitContainer.initialize() );
nsihits = afpHitContainer->size();
fill("AFPSiLayerTool", lb, nsihits);
nSiHits = afpHitContainer->size();
fill("AFPSiLayerTool", lb, nSiHits);
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();
pixelRowIDChip = hitsItr->pixelRowIDChip();
pixelColIDChip = hitsItr->pixelColIDChip();
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)
if (hitsItr->stationID()<4 && hitsItr->stationID()>=0 && hitsItr->pixelLayerID()<4 && hitsItr->pixelLayerID()>=0)
{
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()))] , pixelRowIDChip, pixelColIDChip);
}
else ATH_MSG_WARNING("Unrecognised station index: " << hitsItr->stationID());
}
/*
// Filling using a pre-defined map of groups.
for ( auto& layer : std::vector<std::string>({"layer1","layer2"}) ) {
fill(m_tools[m_cGroups1.at(layer)],c);
for ( auto& cluster : std::vector<std::string>({"clusterX","clusterB"}) ) {
// Same efficient method for 2D map
fill(m_tools[m_cGroups2.at(layer).at(cluster)],c);
}
}
*/
//m_cNearStation.eventEnd();
//m_cFarStation.eventEnd();
fill(m_tools[m_HitmapGroups.at(m_stationnames.at(hitsItr->stationID())).at(m_pixlayers.at(hitsItr->pixelLayerID()))], pixelRowIDChip, pixelColIDChip);
}
else ATH_MSG_WARNING("Unrecognised station index: " << hitsItr->stationID());
}
return StatusCode::SUCCESS;
}
......@@ -27,13 +27,10 @@ AFPToFAlgorithm::~AFPToFAlgorithm() {}
StatusCode AFPToFAlgorithm::initialize() {
using namespace Monitored;
//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::AFPToFHitContainer> afpToFHitContainerKey("AFPToFHits");
ATH_CHECK(m_afpToFHitContainerKey.initialize());
// ...
ATH_CHECK(m_afpToFHitContainerKey.initialize());
return AthMonitorAlgorithm::initialize();
}
......@@ -42,16 +39,10 @@ StatusCode AFPToFAlgorithm::fillHistograms( const EventContext& ctx ) const {
using namespace Monitored;
// Declare the quantities which should be monitored
// My histograms:
// auto h_hitMultiplicity = Monitored::Scalar<int>("h_hitMultiplicity", 0);
// auto h_timeOverThreshold = Monitored::Scalar<int>("h_timeOverThreshold", 0);
// auto h_hitMap = Monitored::Scalar<int>("h_hitMap", 0);
// End
auto lb = Monitored::Scalar<int>("lb", 0); // Nikola
auto ntofhits = Monitored::Scalar<int>("ntofhits", 1);
auto lb = Monitored::Scalar<int>("lb", 0);
auto nTofHits = Monitored::Scalar<int>("nTofHits", 1);
lb = GetEventInfo(ctx)->lumiBlock(); // Nikola
lb = GetEventInfo(ctx)->lumiBlock()
SG::ReadHandle<xAOD::AFPToFHitContainer> afpToFHitContainer(m_afpToFHitContainerKey, ctx);
......@@ -72,9 +63,10 @@ StatusCode AFPToFAlgorithm::fillHistograms( const EventContext& ctx ) const {
ATH_CHECK( afpToFHitContainer.initialize() );
ntofhits = afpToFHitContainer->size();
fill("AFPToFTool", lb, ntofhits);
/* TO BE researched: difference between trainID and barInTrainID
nTofHits = afpToFHitContainer->size();
fill("AFPToFTool", lb, nTofHits);
/* TO BE researched: difference between trainID and barInTrainID
auto numberOfHit_S0 = Monitored::Scalar<int>("numberOfHit_S0", 0);
auto numberOfHit_S3 = Monitored::Scalar<int>("numberOfHit_S3", 0);
......@@ -90,28 +82,7 @@ StatusCode AFPToFAlgorithm::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: *afpToFContainer)
{
pixelRowIDChip=hitsItr->pixelRowIDChip();
pixelColIDChip = hitsItr->pixelColIDChip();
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)
{
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);
}
else
ATH_MSG_WARNING("Unrecognised station index: " << hitsItr->stationID());
}
*/
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