Skip to content
Snippets Groups Projects
Commit 4fb2cc1c authored by Soshi Tsuno's avatar Soshi Tsuno
Browse files

Merge remote-tracking branch 'upstream/master' into atlasrects-4662.v3

parents 53f796d9 4bd7e054
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,!28528Revert 63f845ae,!27054Atr20369 210,!26342Monopole: Handle fractionally charged particles,!20394Improvement of pixel conditions (ATLASRECTS-4662)
Showing
with 231 additions and 228 deletions
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
*/
#include "BeamPipeDetectorFactory.h"
#include "GeoModelInterfaces/AbsMaterialManager.h"
#include "GeoModelKernel/GeoMaterial.h"
#include "GeoModelKernel/GeoPcon.h"
......@@ -16,11 +15,9 @@
#include "GeoModelKernel/GeoFullPhysVol.h"
#include "GeoModelKernel/GeoTransform.h"
#include "GeoModelKernel/GeoDefinitions.h"
#include "GeoModelKernel/Units.h"
#include "StoreGate/StoreGateSvc.h"
#include "GeoModelInterfaces/StoredMaterialManager.h"
#include "RDBAccessSvc/IRDBRecord.h"
......@@ -29,6 +26,7 @@
#include "AthenaKernel/getMessageSvc.h"
#include "GaudiKernel/MsgStream.h"
#include "GaudiKernel/SystemOfUnits.h"
#include <iomanip>
#include <vector>
......@@ -40,7 +38,7 @@ BeamPipeDetectorFactory::BeamPipeDetectorFactory(StoreGateSvc *detStore,
m_materialManager(0),
m_detectorStore(detStore),
m_access(pAccess),
m_centralRegionZMax(1500*GeoModelKernelUnits::mm)
m_centralRegionZMax(1500*Gaudi::Units::mm)
{}
BeamPipeDetectorFactory::~BeamPipeDetectorFactory()
......@@ -69,8 +67,8 @@ void BeamPipeDetectorFactory::create(GeoPhysVol *world)
// It is split into 3 sections.
// left, right and central. This is to allow different truth scoring in the different regions.
m_centralRegionZMax = 1500 * GeoModelKernelUnits::mm; // For backward compatibility in DB.
if (bpipeGeneral->size() != 0) m_centralRegionZMax = (*bpipeGeneral)[0]->getDouble("CENTRALZMAX") * GeoModelKernelUnits::mm;
m_centralRegionZMax = 1500 * Gaudi::Units::mm; // For backward compatibility in DB.
if (bpipeGeneral->size() != 0) m_centralRegionZMax = (*bpipeGeneral)[0]->getDouble("CENTRALZMAX") * Gaudi::Units::mm;
EnvelopeShapes envelopes;
......@@ -104,9 +102,9 @@ void BeamPipeDetectorFactory::create(GeoPhysVol *world)
double beamy = 0.0;
double beamz = 0.0;
if (bpipePosition->size() != 0) {
beamx = (*bpipePosition)[0]->getDouble("POSX") * GeoModelKernelUnits::mm;
beamy = (*bpipePosition)[0]->getDouble("POSY") * GeoModelKernelUnits::mm;
beamz = (*bpipePosition)[0]->getDouble("POSZ") * GeoModelKernelUnits::mm;
beamx = (*bpipePosition)[0]->getDouble("POSX") * Gaudi::Units::mm;
beamy = (*bpipePosition)[0]->getDouble("POSY") * Gaudi::Units::mm;
beamz = (*bpipePosition)[0]->getDouble("POSZ") * Gaudi::Units::mm;
}
// Only shift the central section
......@@ -124,7 +122,7 @@ void BeamPipeDetectorFactory::create(GeoPhysVol *world)
// FwdMinus
world->add(tag);
world->add(new GeoTransform(GeoTrf::RotateY3D(180*GeoModelKernelUnits::degree)));
world->add(new GeoTransform(GeoTrf::RotateY3D(180*Gaudi::Units::degree)));
world->add(pvMotherFwdMinus);
m_detectorManager->addTreeTop(pvMotherFwdMinus);
......@@ -150,12 +148,12 @@ void BeamPipeDetectorFactory::addSections(GeoPhysVol* parent, int region)
for (unsigned int itemp=0; itemp<bpipeSections->size(); itemp++)
{
std::string material = (*bpipeSections)[itemp]->getString("MATERIAL");
double rMin1 = (*bpipeSections)[itemp]->getDouble("RMIN1") * GeoModelKernelUnits::mm;
double rMax1 = (*bpipeSections)[itemp]->getDouble("RMAX1") * GeoModelKernelUnits::mm;
double rMin2 = (*bpipeSections)[itemp]->getDouble("RMIN2") * GeoModelKernelUnits::mm;
double rMax2 = (*bpipeSections)[itemp]->getDouble("RMAX2") * GeoModelKernelUnits::mm;
double z = (*bpipeSections)[itemp]->getDouble("Z") * GeoModelKernelUnits::mm;
double dZ = (*bpipeSections)[itemp]->getDouble("DZ") * GeoModelKernelUnits::mm;
double rMin1 = (*bpipeSections)[itemp]->getDouble("RMIN1") * Gaudi::Units::mm;
double rMax1 = (*bpipeSections)[itemp]->getDouble("RMAX1") * Gaudi::Units::mm;
double rMin2 = (*bpipeSections)[itemp]->getDouble("RMIN2") * Gaudi::Units::mm;
double rMax2 = (*bpipeSections)[itemp]->getDouble("RMAX2") * Gaudi::Units::mm;
double z = (*bpipeSections)[itemp]->getDouble("Z") * Gaudi::Units::mm;
double dZ = (*bpipeSections)[itemp]->getDouble("DZ") * Gaudi::Units::mm;
int secNum = (*bpipeSections)[itemp]->getInt("SECNUM");
double zmin = z - dZ;
......@@ -206,7 +204,7 @@ void BeamPipeDetectorFactory::addSections(GeoPhysVol* parent, int region)
shape = new GeoCons(rMin1,rMin2,
rMax1,rMax2,
dZnew,
0*GeoModelKernelUnits::deg,360*GeoModelKernelUnits::deg);
0*Gaudi::Units::deg,360*Gaudi::Units::deg);
isTube = false;
}
......@@ -223,7 +221,7 @@ void BeamPipeDetectorFactory::addSections(GeoPhysVol* parent, int region)
pvSection->ref();
// Determine if this is a geometry where the first section can act as the mother of the following
// sections. The following sections are only added to this if their ave GeoModelKernelUnits::radius is within the GeoModelKernelUnits::radial
// sections. The following sections are only added to this if their ave radius is within the radial
// extent and their ave z is within the z extent.
// As soon as one section fails to meet this the latter sections are not considered.
if(secNum==1) {
......@@ -272,7 +270,7 @@ void BeamPipeDetectorFactory::addSections(GeoPhysVol* parent, int region)
tfSectionRot = new GeoTransform(GeoTrf::TranslateZ3D(-znew));
} else {
// For cone we need to rotate around Y axis.
tfSectionRot = new GeoTransform(GeoTrf::TranslateZ3D(-znew)*GeoTrf::RotateY3D(180*GeoModelKernelUnits::deg));
tfSectionRot = new GeoTransform(GeoTrf::TranslateZ3D(-znew)*GeoTrf::RotateY3D(180*Gaudi::Units::deg));
}
parent->add(ntSection);
parent->add(tfSectionRot);
......@@ -305,8 +303,8 @@ BeamPipeDetectorFactory::makeEnvelope(IRDBRecordset_ptr bpipeEnvelope)
std::vector<EnvelopeEntry> fwdEntry;
for (unsigned int i=0; i<bpipeEnvelope->size(); i++) {
double z = (*bpipeEnvelope)[i]->getDouble("Z") * GeoModelKernelUnits::mm;
double r = (*bpipeEnvelope)[i]->getDouble("R") * GeoModelKernelUnits::mm;
double z = (*bpipeEnvelope)[i]->getDouble("Z") * Gaudi::Units::mm;
double r = (*bpipeEnvelope)[i]->getDouble("R") * Gaudi::Units::mm;
EnvelopeEntry entry(z,r);
if (z < m_centralRegionZMax) {
centralEntry.push_back(entry);
......@@ -329,7 +327,7 @@ BeamPipeDetectorFactory::makeEnvelope(IRDBRecordset_ptr bpipeEnvelope)
envelopes.centralShape = new GeoTube(0, rFwd, m_centralRegionZMax);
} else {
// This case probably will never get used and is untested.
GeoPcon* pcone = new GeoPcon(0, 360*GeoModelKernelUnits::deg);
GeoPcon* pcone = new GeoPcon(0, 360*Gaudi::Units::deg);
pcone->addPlane(-m_centralRegionZMax,0,rFwd);
for (int i=centralEntry.size()-1; i>=0; i--) {
......@@ -349,12 +347,12 @@ BeamPipeDetectorFactory::makeEnvelope(IRDBRecordset_ptr bpipeEnvelope)
// forward
{
GeoPcon* pcone = new GeoPcon(0, 360*GeoModelKernelUnits::deg);
GeoPcon* pcone = new GeoPcon(0, 360*Gaudi::Units::deg);
pcone->addPlane(m_centralRegionZMax,0,rFwd);
if (fwdEntry.size() == 0) {
// Unlikely case but for completeness
// we make small fwd region if everything is in central region.
pcone->addPlane(m_centralRegionZMax+0.1*GeoModelKernelUnits::mm,0,rFwd);
pcone->addPlane(m_centralRegionZMax+0.1*Gaudi::Units::mm,0,rFwd);
}
for (unsigned int i=0; i<fwdEntry.size(); i++) {
double z = fwdEntry[i].z();
......@@ -373,12 +371,12 @@ BeamPipeDetectorFactory::EnvelopeShapes
BeamPipeDetectorFactory::makeEnvelopeOld(IRDBRecordset_ptr atlasMother)
{
double iir = (*atlasMother)[0]->getDouble("IDETIR")*GeoModelKernelUnits::cm;
double cir = (*atlasMother)[0]->getDouble("CALOIR")*GeoModelKernelUnits::cm;
double mir = (*atlasMother)[0]->getDouble("MUONIR")*GeoModelKernelUnits::cm;
double totlen = (*atlasMother)[0]->getDouble("ZMAX")*GeoModelKernelUnits::cm;
double ilen = (*atlasMother)[0]->getDouble("IDETZMX")*GeoModelKernelUnits::cm;
double clen = (*atlasMother)[0]->getDouble("CALOZMX")*GeoModelKernelUnits::cm;
double iir = (*atlasMother)[0]->getDouble("IDETIR")*Gaudi::Units::cm;
double cir = (*atlasMother)[0]->getDouble("CALOIR")*Gaudi::Units::cm;
double mir = (*atlasMother)[0]->getDouble("MUONIR")*Gaudi::Units::cm;
double totlen = (*atlasMother)[0]->getDouble("ZMAX")*Gaudi::Units::cm;
double ilen = (*atlasMother)[0]->getDouble("IDETZMX")*Gaudi::Units::cm;
double clen = (*atlasMother)[0]->getDouble("CALOZMX")*Gaudi::Units::cm;
// Central Section.
GeoTube * bpipeCentralShape = new GeoTube(0, iir, m_centralRegionZMax);
......@@ -388,7 +386,7 @@ BeamPipeDetectorFactory::makeEnvelopeOld(IRDBRecordset_ptr atlasMother)
// Right section (+ve z)
GeoPcon* bpipeEnvPcone = new GeoPcon(0, 360*GeoModelKernelUnits::deg);
GeoPcon* bpipeEnvPcone = new GeoPcon(0, 360*Gaudi::Units::deg);
bpipeEnvPcone->addPlane(m_centralRegionZMax,0,iir);
bpipeEnvPcone->addPlane(ilen,0,iir);
bpipeEnvPcone->addPlane(ilen,0,cir);
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
*/
#ifndef BeamPipeDetectorFactory_h
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
*/
#include "BeamPipeGeoModel/BeamPipeDetectorManager.h"
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
*/
#include "BeamPipeDetectorTool.h"
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
*/
#ifndef BEAMPIPEDETECTORTOOL_H
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
*/
#ifndef CavernInfraDetectorFactory_h
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
*/
#ifndef CavernInfraDetectorFactory01_h
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
*/
#include "CavernInfraGeoModel/CavernInfraDetectorManager.h"
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
*/
#ifndef CAVERNINFRADETECTORTOOL_H
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
*/
#include "ForDetEnvelopeFactory.h"
#include "GeoModelInterfaces/AbsMaterialManager.h"
#include "GeoModelKernel/GeoMaterial.h"
#include "GeoModelKernel/GeoTube.h"
......@@ -15,6 +14,7 @@
#include "GeoModelKernel/GeoShapeUnion.h"
#include "StoreGate/StoreGateSvc.h"
#include "GaudiKernel/SystemOfUnits.h"
#include "GeoModelInterfaces/StoredMaterialManager.h"
......@@ -44,10 +44,10 @@ void ForDetEnvelopeFactory::create(GeoPhysVol *world)
const GeoMaterial* air = m_materialManager->getMaterial("std::Air");
// Build boolean shape: union of two tubes
const GeoTube* tube1 = new GeoTube(0.,2000.*GeoModelKernelUnits::mm,188750.*GeoModelKernelUnits::mm);
GeoTube* tube2 = new GeoTube(0.,2000.*GeoModelKernelUnits::mm,188750.*GeoModelKernelUnits::mm);
GeoTrf::TranslateZ3D xfRelativeA(211250.*GeoModelKernelUnits::mm);
GeoTrf::TranslateZ3D xfRelativeC(-211250.*GeoModelKernelUnits::mm);
const GeoTube* tube1 = new GeoTube(0.,2000.*Gaudi::Units::mm,188750.*Gaudi::Units::mm);
GeoTube* tube2 = new GeoTube(0.,2000.*Gaudi::Units::mm,188750.*Gaudi::Units::mm);
GeoTrf::TranslateZ3D xfRelativeA(211250.*Gaudi::Units::mm);
GeoTrf::TranslateZ3D xfRelativeC(-211250.*Gaudi::Units::mm);
const GeoShapeShift& envShape1 = (*tube1)<<xfRelativeA;
const GeoShapeUnion& envShape = envShape1.add((*tube2)<<xfRelativeC);
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
*/
#ifndef ForDetEnvelopeFactory_h
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
*/
#include "GeoModelEnvelopes/ForDetEnvelopeManager.h"
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
*/
#include "ForDetEnvelopeTool.h"
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
*/
#ifndef ForDetEnvelopeTool_h
......
......@@ -32,6 +32,8 @@ class TruthParticleContainer;
#include "CaloSimEvent/CaloCalibrationHitContainer.h"
#include "StoreGate/ReadHandleKeyArray.h"
#include "xAODTruth/TruthParticleContainer.h"
#include <string>
#include <vector>
#include <set>
......@@ -195,11 +197,9 @@ class CaloCalibClusterMomentsMaker2: public AthAlgTool, virtual public CaloClust
* hits outside the calorimeter systems - i.e. dead material hits ... */
SG::ReadHandleKeyArray<CaloCalibrationHitContainer> m_DMCalibrationHitContainerNames;
/**
* @brief name of truth particle container
*/
std::string m_truthParticleCollectionName;
/** ReadHandleKey for truth particle container */
SG::ReadHandleKey<xAOD::TruthParticleContainer> m_truthParticleContainerKey{this,"TruthParticles","TruthParticles","ReadHandleKey for truth particle container"};
const CaloDetDescrManager* m_calo_dd_man;
const CaloCell_ID* m_calo_id;
......@@ -235,11 +235,10 @@ class CaloCalibClusterMomentsMaker2: public AthAlgTool, virtual public CaloClust
float m_energyMinCalib;
float m_apars_alpha;
float m_apars_r0;
//double m_showerScale;
int m_MatchDmType;
double angle_mollier_factor(double x) const;
void get_calib_frac(const TruthParticleContainer& truthParticles,
void get_calib_frac(const std::map<unsigned int,int>& truthBarcodeToPdgCodeMap,
const MyClusInfo& clusInfo, std::vector<double> &engFrac) const;
};
......
......@@ -29,8 +29,6 @@
#include <set>
#include "CaloEvent/CaloCell.h"
//#include "CaloEvent/CaloClusterContainer.h"
//#include "CaloEvent/CaloCluster.h"
#include "CaloSimEvent/CaloCalibrationHit.h"
#include "CaloSimEvent/CaloCalibrationHitContainer.h"
#include "CaloDetDescr/CaloDetDescrManager.h"
......@@ -59,8 +57,6 @@ CaloCalibClusterMomentsMaker2::CaloCalibClusterMomentsMaker2(const std::string&
const std::string& name,
const IInterface* parent)
: AthAlgTool(type, name, parent),
//m_truthParticleCollectionName("INav4MomTruthEvent"),
m_truthParticleCollectionName(""),
m_calo_dd_man(0),
m_calo_id(0),
m_caloDM_ID(0),
......@@ -70,7 +66,6 @@ CaloCalibClusterMomentsMaker2::CaloCalibClusterMomentsMaker2(const std::string&
m_energyMinCalib(20*MeV),
m_apars_alpha(0.5),
m_apars_r0(0.2),
//m_showerScale(25*cm),
m_MatchDmType(kMatchDmLoose)
{
declareInterface<CaloClusterCollectionProcessor> (this);
......@@ -144,7 +139,6 @@ CaloCalibClusterMomentsMaker2::CaloCalibClusterMomentsMaker2(const std::string&
declareProperty("MatchDmType",m_MatchDmType);
declareProperty( "TruthParticles",m_truthParticleCollectionName);
declareProperty( "UseParticleID",m_useParticleID);
}
......@@ -288,6 +282,8 @@ StatusCode CaloCalibClusterMomentsMaker2::initialize()
ATH_CHECK( m_CalibrationHitContainerNames.initialize() );
ATH_CHECK( m_DMCalibrationHitContainerNames.initialize() );
ATH_CHECK(m_truthParticleContainerKey.initialize());
return StatusCode::SUCCESS;
}
......@@ -420,13 +416,11 @@ CaloCalibClusterMomentsMaker2::execute(const EventContext& ctx,
// reading particle information for later calcution of calibration enegry fraction caused
// by particles of different types
const TruthParticleContainer* truthParticles = nullptr;
if(doCalibFrac){
StatusCode sc = evtStore()->retrieve(truthParticles, m_truthParticleCollectionName);
if (sc.isFailure()||!truthParticles){
msg(MSG::WARNING) << "Truth particle collection '" << m_truthParticleCollectionName << "' not found, no cluster moments ENG_CALIB_FRAC_* will be available. "<< endmsg;
doCalibFrac = false;
}
SG::ReadHandle<xAOD::TruthParticleContainer> truthParticleContainerReadHandle(m_truthParticleContainerKey);
if (doCalibFrac && !truthParticleContainerReadHandle.isValid()){
ATH_MSG_WARNING("Invalid read handle to TruthParticleContainer with key: " << m_truthParticleContainerKey.key());
doCalibFrac = false;
}
std::vector<double> engCalibOut[3];
......@@ -670,6 +664,19 @@ CaloCalibClusterMomentsMaker2::execute(const EventContext& ctx,
std::vector<double> engCalibFrac;
engCalibFrac.resize(kCalibFracMax, 0.0);
std::map<unsigned int,int> truthBarcodeToPdgCodeMap;
//loop on truth particle container is slow, so put needed information in a map for faster key lookup in later loops
for ( auto thisTruthParticle : *truthParticleContainerReadHandle){
if (!thisTruthParticle){
ATH_MSG_WARNING("Got invalid pointer to TruthParticle");
continue;
}
truthBarcodeToPdgCodeMap[thisTruthParticle->barcode()] = thisTruthParticle->pdgId();
}//truth particle loop
// assign moments
for( clusIter = theClusColl->begin(),iClus=0; clusIter!=clusIterEnd;clusIter++,iClus++) {
xAOD::CaloCluster * theCluster = *clusIter;
......@@ -706,7 +713,7 @@ CaloCalibClusterMomentsMaker2::execute(const EventContext& ctx,
- eng_calib_dead_leakage;
if(doCalibFrac){
get_calib_frac(*truthParticles, clusInfo, engCalibFrac);
get_calib_frac(truthBarcodeToPdgCodeMap, clusInfo, engCalibFrac);
}
if ( m_momentsNames.size() > 0 ) {
......@@ -813,7 +820,7 @@ double CaloCalibClusterMomentsMaker2::angle_mollier_factor(double x) const
/* ****************************************************************************
Calculation of energy fraction caused by particles of different types
**************************************************************************** */
void CaloCalibClusterMomentsMaker2::get_calib_frac(const TruthParticleContainer& truthParticles,
void CaloCalibClusterMomentsMaker2::get_calib_frac(const std::map<unsigned int,int>& truthBarcodeToPdgCodeMap,
const MyClusInfo& clusInfo, std::vector<double> &engFrac) const
{
static unsigned int nWarnings = 0;
......@@ -821,17 +828,17 @@ void CaloCalibClusterMomentsMaker2::get_calib_frac(const TruthParticleContainer&
if(clusInfo.engCalibIn.engTot <= 0.0) return;
// each MyClusInfo has a map of particle's barcode and particle calibration deposits in given cluster
for(std::map<int, MyClusInfo::ClusCalibEnergy >::const_iterator it = clusInfo.engCalibParticle.begin(); it != clusInfo.engCalibParticle.end(); it++){
int barcode = it->first;
const TruthParticle* p( 0 );
p = truthParticles.truthParticle( barcode );
if( 0 == p ) {
if(nWarnings <10 ) {
std::cout << "CaloCalibClusterMomentsMaker2::get_calib_frac -> Error! No particle with barcode " << barcode << " found in TruthParticleContainer" << std::endl;
nWarnings++;
unsigned int barcode = it->first;
int pdg_id = 0;
try { pdg_id = truthBarcodeToPdgCodeMap.at(barcode); }
catch (const std::out_of_range& e){
if (nWarnings < 10 ){
ATH_MSG_WARNING("truthBarcodeToPdgCodeMap cannot find an entry with barcode " << barcode);
nWarnings++;
}
continue;
}
int pdg_id = p->genParticle()->pdg_id();
if( abs(pdg_id) == 211) {
engFrac[kCalibFracHAD] += it->second.engTot;
}else if( pdg_id == 111 || pdg_id == 22 || abs(pdg_id)==11) {
......
......@@ -3,14 +3,14 @@
# art-include: master/Athena
# art-ci: master
athena.py --threads=1 AthViews/ViewScheduling.py | tee ViewScheduling.log
if grep "INFO condTestAlg running with store view_1" ViewScheduling.log; then
athena.py --threads=1 AthViews/ViewScheduling.py | tee ViewScheduling_ath.log
if grep "INFO condTestAlg running with store view_1" ViewScheduling_ath.log; then
exit 1
fi
if ! grep "INFO condTestAlg running with store view_0" ViewScheduling.log; then
if ! grep "INFO condTestAlg running with store view_0" ViewScheduling_ath.log; then
exit 1
fi
if ! grep "INFO 109" ViewScheduling.log; then
if ! grep "INFO 109" ViewScheduling_ath.log; then
exit 1
fi
exit 0
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
*/
#include "MonitoredAlg.h"
#include "AthenaMonitoring/MonitoredScope.h"
#include "AthenaMonitoring/Monitored.h"
#include <vector>
#include <cmath>
......@@ -35,21 +35,20 @@ private:
StatusCode MonitoredAlg::execute()
{
using namespace Monitored;
std::vector<Track> tracks;
// In case you want to measure the execution time
auto timer = MonitoredTimer::declare("TIME_execute");
auto timer = Monitored::Timer("TIME_execute");
auto count = MonitoredScalar::declare<int>("nTracks", 0); // explicit type
auto count = Monitored::Scalar<int>("nTracks", 0); // explicit type
// Access via member
auto eta = MonitoredCollection::declare("eta", tracks, &Track::eta);
auto eta = Monitored::Collection("eta", tracks, &Track::eta);
// Access via function/lambda
auto absphi = MonitoredCollection::declare("AbsPhi", tracks, []( const Track& t ) { return abs(t.phi()); });
auto absphi = Monitored::Collection("AbsPhi", tracks, []( const Track& t ) { return abs(t.phi()); });
auto mon = MonitoredScope::declare(m_monTool, count, eta, absphi, timer);
auto mon = Monitored::Group(m_monTool, count, eta, absphi, timer);
count = 1 + (rand() % 10); // random number of tracks
......
///////////////////////// -*- C++ -*- /////////////////////////////
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2017, 2019 CERN for the benefit of the ATLAS collaboration
*/
#ifndef ATHENAKERNEL_ITHINNINGHDLR_H
......@@ -13,19 +13,12 @@
#include <list>
#include <utility> // for std::pair
// boost includes
#ifndef BOOST_MPL_IF_HPP_INCLUDED
#include <boost/mpl/if.hpp>
#endif
#ifndef BOOST_TT_IS_BASE_OF_HPP_INCLUDED
#include <boost/type_traits/is_base_of.hpp>
#endif
#ifndef BOOST_TT_REMOVE_POINTER_HPP_INCLUDED
#include <boost/type_traits/remove_pointer.hpp>
#endif
#ifndef GAUDIKERNEL_DATAOBJECT_H
#include "GaudiKernel/DataObject.h"
#endif
#include <boost/mpl/if.hpp>
#include <boost/type_traits/is_base_of.hpp>
#include <boost/type_traits/remove_pointer.hpp>
#include "GaudiKernel/DataObject.h"
#include "CxxUtils/checker_macros.h"
// FrameWork includes
......@@ -82,9 +75,11 @@ namespace detail {
* @brief Handle @c DataProxy holding @c DataVector.
* This class defines a (type-safe) protocol to pack and unpack
* thinned @c DataVector.
*
* This is not MT-safe!
*/
template <typename Container>
class DvThinningHdlr : public ::Athena::IThinningHdlr
class ATLAS_NOT_THREAD_SAFE DvThinningHdlr : public ::Athena::IThinningHdlr
{
typedef typename Container::PtrVector PtrVector;
/** Vector holding the pointers to the elements of @c DataVector, before
......@@ -130,9 +125,11 @@ public:
* @brief Handle @c DataProxy holding @c std::vector<T>
* This class defines a (type-safe) protocol to pack and unpack
* thinned @c DataVector.
*
* This is not MT-safe!
*/
template <typename Container>
class StdThinningHdlr : public ::Athena::IThinningHdlr
class ATLAS_NOT_THREAD_SAFE StdThinningHdlr : public ::Athena::IThinningHdlr
{
typedef Container Vector_t;
/** Vector holding the pointers to the elements of @c std::vector<T>, before
......@@ -178,9 +175,11 @@ public:
* @brief Handle @c DataProxy holding @c IdentifiableContainer
* This class defines a (type-safe) protocol to pack and unpack
* thinned @c IdentifiableContainer
*
* This is not MT-safe!
*/
template <typename Container>
class IdcThinningHdlr : public ::Athena::IThinningHdlr
class ATLAS_NOT_THREAD_SAFE IdcThinningHdlr : public ::Athena::IThinningHdlr
{
typedef Container Idc_t;
typedef typename Idc_t::IDENTIFIABLE Identifiable_t;
......
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