Skip to content
Snippets Groups Projects
Commit 86fe652a authored by Dave Casper's avatar Dave Casper
Browse files

Merge branch 'carl-example' into 'master'

Disable B-field for testbeam, and add example from Carl

See merge request faser/calypso!147
parents 1c3af9ab f10ee783
No related branches found
No related tags found
No related merge requests found
......@@ -14,6 +14,10 @@ def GeoModelTestCfg(flags, name="GeoModelTestAlg", **kwargs):
# Initialize field service
from MagFieldServices.MagFieldServicesConfig import MagneticFieldSvcCfg
a.merge(MagneticFieldSvcCfg(flags))
# Disable the field
cacheAlg = a.getCondAlgo("FaserFieldCacheCondAlg")
cacheAlg.UseDipoScale = 0.0
cacheAlg.UseDCS = False
# Configure the algorithm itself
GeoModelTestAlg = CompFactory.GeoModelTestAlg
......
atlas_subdir( WaveformAnalysisExample )
atlas_add_component( WaveformAnalysisExample
src/*.cxx
src/components/WaveformAnalysisExample_entries.cxx
LINK_LIBRARIES AthenaBaseComps xAODFaserWaveform
)
#include "WaveformHitAlg.h"
WaveformHitAlg::WaveformHitAlg(const std::string& name, ISvcLocator* pSvcLocator)
: AthHistogramAlgorithm(name, pSvcLocator) { }
WaveformHitAlg::~WaveformHitAlg() { }
StatusCode WaveformHitAlg::initialize()
{
//ATH_CHECK( m_faserWaveformHitKey.initialize() );
//ATH_MSG_INFO( "Using Faser WaveformHit collection with key " << m_faserWaveformHitKey.key());
return StatusCode::SUCCESS;
}
StatusCode WaveformHitAlg::execute()
{
return StatusCode::SUCCESS;
}
StatusCode WaveformHitAlg::finalize()
{
return StatusCode::SUCCESS;
}
#ifndef WAVEFORMANALYSISEXAMPLE_WAVEFORMHITALG_H
#define WAVEFORMANALYSISEXAMPLE_WAVEFORMHITALG_H
#include "AthenaBaseComps/AthHistogramAlgorithm.h"
#include "xAODFaserWaveform/WaveformHitContainer.h"
#include <TH1.h>
/* WaveformHit reading example - Carl Gwilliam + Lottie Cavanagh, Liverpool */
class WaveformHitAlg : public AthHistogramAlgorithm
{
public:
WaveformHitAlg(const std::string& name, ISvcLocator* pSvcLocator);
virtual ~WaveformHitAlg();
StatusCode initialize();
StatusCode execute();
StatusCode finalize();
private:
SG::ReadHandle<xAOD::WaveformHitContainer> m_waveformHits;
//SG::ReadHandleKey<xAOD::WaveformHitContainer> m_faserWaveformHitKey { this, "WaveformHitContainerKey", "CaloWaveformHits" };
};
#endif
#include "../WaveformHitAlg.h"
DECLARE_COMPONENT( WaveformHitAlg )
......@@ -112,6 +112,10 @@ if __name__ == "__main__":
#
acc.merge(FaserGeometryCfg(ConfigFlags))
acc.merge(G4FaserAlgCfg(ConfigFlags))
# Disable magnetic field
cacheAlg = acc.getCondAlgo("FaserFieldCacheCondAlg")
cacheAlg.UseDipoScale = 0.0
cacheAlg.UseDCS = False
acc.addService(G4GeometryNotifierSvcCfg(ConfigFlags, ActivateLVNotifier=True))
#
# Verbosity
......
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