diff --git a/Event/EventOverlay/OverlayExamples/CMakeLists.txt b/Event/EventOverlay/OverlayExamples/CMakeLists.txt deleted file mode 100644 index 60b7593bc5fd5bbfefa06803081d47be1b1f34db..0000000000000000000000000000000000000000 --- a/Event/EventOverlay/OverlayExamples/CMakeLists.txt +++ /dev/null @@ -1,27 +0,0 @@ -################################################################################ -# Package: OverlayExamples -################################################################################ - -# Declare the package name: -atlas_subdir( OverlayExamples ) - -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - GaudiKernel - PRIVATE - Control/AthenaBaseComps - Control/PileUpTools - Event/EventInfo - LArCalorimeter/LArRawEvent - LArCalorimeter/LArSimEvent ) - -# Component(s) in the package: -atlas_add_component( OverlayExamples - src/*.cxx - src/components/*.cxx - LINK_LIBRARIES GaudiKernel AthenaBaseComps PileUpToolsLib EventInfo LArRawEvent LArSimEvent ) - -# Install files from the package: -atlas_install_headers( OverlayExamples ) -atlas_install_joboptions( share/*.py ) - diff --git a/Event/EventOverlay/OverlayExamples/share/HitRdoOverlayExample_topOptions.py b/Event/EventOverlay/OverlayExamples/share/HitRdoOverlayExample_topOptions.py deleted file mode 100644 index a8a220ac119a85feba52253237c19f17ef8e1d0c..0000000000000000000000000000000000000000 --- a/Event/EventOverlay/OverlayExamples/share/HitRdoOverlayExample_topOptions.py +++ /dev/null @@ -1,121 +0,0 @@ -# example jobOption to use pileUp infrastructure to overlay HITS from one signal stream -# to RDO from one background stream -# One background event is read for each signal event -# -# to run this job : athena.py HitRdoOverlayExample_topOptions.py -# (note that since 13.X.0, beginning 2008, the -p pileUpBootStrap.py is not needed anymore) - -# Overall common flags -DetDescrVersion='ATLAS-CSC-01-02-00' -include( "AthenaCommon/AthenaCommonFlags.py" ) - -EvtMax = 20 -PoolHitsInput = ["rfio:/castor/cern.ch/user/g/gunal/HITS.014280._81495.pool.root.1"] -minBiasInputCols = ["rfio:/castor/cern.ch/user/g/gunal/misal1_mc12_V1.005001.pythia.DIGITS.pool.root"] - -from AthenaCommon.DetFlags import DetFlags -DetFlags.ID_setOff() -DetFlags.Calo_setOn() -DetFlags.Muon_setOff() -DetFlags.Truth_setOff() -DetFlags.LVL1_setOff() - -include ( "Digitization/Digitization_flags.py" ) - -# EventInfo Converters -import AthenaPoolCnvSvc.ReadAthenaPool -include( "EventAthenaPool/EventAthenaPool_joboptions.py" ) - -# GeoModel stuff: -#-------------------------------------------------------------- -from AthenaCommon.GlobalFlags import jobproperties -jobproperties.Global.DetDescrVersion=DetDescrVersion -from AtlasGeoModel import SetGeometryVersion -from AtlasGeoModel import GeoModelInit - - -from AthenaCommon.AppMgr import ServiceMgr -from PileUpComps.PileUpCompsConf import PileUpEventLoopMgr - -# ad-hoc configuration of pileup event loop manager - -theApp.EventLoop = "PileUpEventLoopMgr" - -pileUpEventLoopMgr = PileUpEventLoopMgr() -from Digitization.DigitizationFlags import jobproperties -pupStream = "PileUpCollXingStream" -jobproperties.Digitization.rndmSeedList.addSeed( pupStream, 123, 345 ) -#define inputs -pileUpEventLoopMgr.OrigSelector="EventSelector" - -from PileUpComps.PileUpCompsConf import BkgStreamsCache -from EventSelectorAthenaPool.EventSelectorAthenaPoolConf import EventSelectorAthenaPool -minBiasCache = BkgStreamsCache("MinBiasCache") -minBiasCache.CollPerXing=1 -minBiasCache.CollDistribution="Fixed" -minBiasCache.ReadDownscaleFactor=1 # read one new event every event -minBiasCache.RndmGenSvc=digitizationRndmSvc -minBiasCache.RndmStreamName=pupStream -minBiasEvtSel = EventSelectorAthenaPool("minBiasEventSelector") -minBiasEvtSel.InputCollections = minBiasInputCols -minBiasEvtSel.KeepInputFilesOpen = True -ServiceMgr += minBiasEvtSel -minBiasCache.EventSelector="minBiasEventSelector" -pileUpEventLoopMgr.bkgCaches += [ minBiasCache ] - -from AthenaCommon.AppMgr import ToolSvc -from LArRecUtils.LArRecUtilsConf import LArAutoCorrTotalTool -try: - ToolSvc.LArAutoCorrTotalTool.NMinBias=1.; # FIXME <ncol> per crossing -except AttributeError: - ToolSvc += LArAutoCorrTotalTool(NMinBias=1.) - - -#define output stream -pileUpEventLoopMgr.OutStreamType = "AthenaOutputStream" - -#define time range to be studied. t0 at t=0, xing=0 -pileUpEventLoopMgr.XingFrequency=25; -pileUpEventLoopMgr.firstXing=0 -pileUpEventLoopMgr.lastXing=0 - -pileUpEventLoopMgr.OutputLevel=VERBOSE - -ServiceMgr += pileUpEventLoopMgr - -# in any case we need the PileUpMergeSvc for the digitize algos -if not hasattr(ServiceMgr, 'PileUpMergeSvc'): - from PileUpTools.PileUpToolsConf import PileUpMergeSvc - ServiceMgr += PileUpMergeSvc() - -# Pool input (Change this to use a different file) -if not hasattr(ServiceMgr, 'EventSelector'): - import AthenaPoolCnvSvc.ReadAthenaPool -ServiceMgr.EventSelector.InputCollections = PoolHitsInput - -# the LAr and Calo detector description package -include( "CaloDetMgrDetDescrCnv/CaloDetMgrDetDescrCnv_joboptions.py" ) -include( "LArDetMgrDetDescrCnv/LArDetMgrDetDescrCnv_joboptions.py" ) -# Pool Converters -include( "LArAthenaPool/LArAthenaPool_joboptions.py" ) - -#algorithm -from AthenaCommon.AlgSequence import AlgSequence -topSequence = AlgSequence() - -from OverlayExamples.OverlayExamplesConf import HitRdoOverlayExample -HitRdoOverlayExample = HitRdoOverlayExample("HIT_RDO_OVERLAY") -topSequence += HitRdoOverlayExample - -# -#-------------------------------------------------------------- -# Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL ) -#-------------------------------------------------------------- -ServiceMgr.MessageSvc.OutputLevel = 3 -#-------------------------------------------------------------- -# Event related parameters -#-------------------------------------------------------------- -# Number of events to be processed (default is 10) -theApp.EvtMax = EvtMax -# Number of input events to be skipped -ServiceMgr.EventSelector.SkipEvents = SkipEvents diff --git a/Event/EventOverlay/OverlayExamples/src/HitRdoOverlayExample.cxx b/Event/EventOverlay/OverlayExamples/src/HitRdoOverlayExample.cxx deleted file mode 100644 index 895cf7b95a9ba855ebe189175eba26cfed5d25b9..0000000000000000000000000000000000000000 --- a/Event/EventOverlay/OverlayExamples/src/HitRdoOverlayExample.cxx +++ /dev/null @@ -1,207 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -////////////////////////////////////////////////////////////// -/// Author: Guillaume Unal -/// Date: december 2007 -/// See HitRdoOverlayExample.h for details -///////////////////////////////////////////////////////////// - -#include "HitRdoOverlayExample.h" - -#include "EventInfo/PileUpTimeEventIndex.h" - -#include "LArSimEvent/LArHit.h" -#include "LArSimEvent/LArHitContainer.h" -#include "LArRawEvent/LArDigit.h" -#include "LArRawEvent/LArDigitContainer.h" - -//Constructor - -HitRdoOverlayExample::HitRdoOverlayExample(const std::string& name, ISvcLocator* pSvcLocator): - AthAlgorithm(name,pSvcLocator), - m_mergeSvc("PileUpMergeSvc", name), - m_nevt(0) -{ - -} - -//Destructor - -HitRdoOverlayExample::~HitRdoOverlayExample() -{ - ATH_MSG_DEBUG ( "HitRdoOverlayExample destructor called" ); -} - -//__________________________________________________________________________ - -StatusCode HitRdoOverlayExample::initialize() -{ - ATH_MSG_DEBUG ("HitRdoOverlayExample initialize()" ); - - CHECK(m_mergeSvc.retrieve()); - m_nevt=0; - return StatusCode::SUCCESS; - -} - -//__________________________________________________________________________ -StatusCode HitRdoOverlayExample::finalize() -{ - - - ATH_MSG_DEBUG ( "HitRdoOverlayExample finalize()" ); - - return StatusCode::SUCCESS; - -} - -//__________________________________________________________________________ -StatusCode HitRdoOverlayExample::execute() -{ - - - ATH_MSG_DEBUG ( "HitRdoOverlayExample execute()" ); - - m_nevt++; - - if ((m_nevt%100)==1) { - ATH_MSG_INFO ( " ***** Event " << m_nevt ); -} - // get LArHit - - std::vector <std::string> hitContainer; - - hitContainer.push_back("LArHitEMB"); - - hitContainer.push_back("LArHitEMEC"); - - hitContainer.push_back("LArHitHEC"); - - hitContainer.push_back("LArHitFCAL"); - - int nhit_tot=0; - - for (unsigned int iHitContainer=0;iHitContainer<hitContainer.size();iHitContainer++) - - { - - typedef PileUpMergeSvc::TimedList<LArHitContainer>::type TimedHitContList; - - TimedHitContList hitContList; - - if (!(m_mergeSvc->retrieveSubEvtsData(hitContainer[iHitContainer] - - ,hitContList).isSuccess()) && hitContList.size()==0) { - - ATH_MSG_WARNING ( " cannot retrieve hit container " ); - - } - - else - - { - - TimedHitContList::iterator iFirstCont(hitContList.begin()); - - TimedHitContList::iterator iEndCont(hitContList.end()); - - double SubEvtTimOffset; - - while (iFirstCont != iEndCont) { - - // get time for this subevent - - const PileUpTimeEventIndex* time_evt = &(iFirstCont->first); - - SubEvtTimOffset = time_evt->time(); - - ATH_MSG_INFO ( " hit subevt time " << SubEvtTimOffset ); - - // get LArHitContainer for this subevent - - const LArHitContainer& firstCont = *(iFirstCont->second); - - LArHitContainer::const_iterator hititer; - - for(hititer=firstCont.begin(); - - hititer != firstCont.end();hititer++) - - { - - //LArHit* hit = (*hititer); - - nhit_tot++; - - } - - iFirstCont++; - - } - - } - - } - - ATH_MSG_INFO ( " Number of LAr hits read " << nhit_tot ); - - // get LArDigit - - int ndigit_tot=0; - - typedef PileUpMergeSvc::TimedList<LArDigitContainer>::type TimedDigitContList; - - TimedDigitContList digitContList; - - if ( m_mergeSvc->retrieveSubEvtsData("LArDigitContainer_MC",digitContList).isFailure() ) { - ATH_MSG_WARNING ( " cannot retrieve digit container " ); - } - else - { - ATH_MSG_INFO ( "DigititContainer size is " << digitContList.size() ); - - TimedDigitContList::iterator iFirstCont(digitContList.begin()); - - TimedDigitContList::iterator iEndCont(digitContList.end()); - - double SubEvtTimOffset; - - while (iFirstCont != iEndCont) { - - // get time for this subevent - - const PileUpTimeEventIndex* time_evt = &(iFirstCont->first); - - SubEvtTimOffset = time_evt->time(); - - ATH_MSG_INFO ( " digit subevt time " << SubEvtTimOffset ); - - const LArDigitContainer& digit_container = *(iFirstCont->second); - - LArDigitContainer::const_iterator digititer; - - for (digititer=digit_container.begin(); - - digititer!=digit_container.end();digititer++) - - { - - //LArDigit* digit = (*digititer); - - ndigit_tot++; - - } - - iFirstCont++; - - } - - } - - ATH_MSG_INFO ( " Number of LAr digits read " << ndigit_tot ); - - return StatusCode::SUCCESS; - -} diff --git a/Event/EventOverlay/OverlayExamples/src/HitRdoOverlayExample.h b/Event/EventOverlay/OverlayExamples/src/HitRdoOverlayExample.h deleted file mode 100644 index 5d0227d52549227bafff9970bb3c8977abbfaea8..0000000000000000000000000000000000000000 --- a/Event/EventOverlay/OverlayExamples/src/HitRdoOverlayExample.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef OVERLAY_EXAMPLE_HITRDOOVERLAY_H -#define OVERLAY_EXAMPLE_HITRDOOVERLAY_H -///////////////////////////////////////////////////////////////////////////////////////////////////// -/// Name : HitRdoOverlayExample.h -/// Package : offline/Event/EventOverlay/OverlayExamples -/// Author : Guillaume Unal -/// Created : December 2007 -/// -/// DESCRIPTION: -/// An example to demonstrate how to overlay G4 simulated Hits onto real data RDo events -/// -/////////////////////////////////////////////////////////////////////////////////////////////////////// - -#include "AthenaBaseComps/AthAlgorithm.h" -#include "PileUpTools/PileUpMergeSvc.h" -#include <string> - -class HitRdoOverlayExample : public AthAlgorithm { - -public: - - HitRdoOverlayExample(const std::string& name, ISvcLocator* pSvcLocator); - ~HitRdoOverlayExample(); - - StatusCode initialize(); - StatusCode finalize(); - StatusCode execute(); - -private: - - /// a handle of PileUpMergwSvc - ServiceHandle<PileUpMergeSvc> m_mergeSvc; - - int m_nevt; -}; - -#endif // OVERLAY_EXAMPLE_HITRDOOVERLAY_H diff --git a/Event/EventOverlay/OverlayExamples/src/components/OverlayExamples_entries.cxx b/Event/EventOverlay/OverlayExamples/src/components/OverlayExamples_entries.cxx deleted file mode 100644 index 38f9236e2bd334a14f155bbce3f51187f112073d..0000000000000000000000000000000000000000 --- a/Event/EventOverlay/OverlayExamples/src/components/OverlayExamples_entries.cxx +++ /dev/null @@ -1,5 +0,0 @@ -#include "../HitRdoOverlayExample.h" - - -DECLARE_COMPONENT( HitRdoOverlayExample ) -