|
ATLAS Offline Software
|
Make a dummy supercell LArRawChannelContainer
from a CaloCallContainer
.
More...
#include <LArSCSimpleMaker.h>
|
| LArSCSimpleMaker (const std::string &name, ISvcLocator *pSvcLocator) |
| Standard Gaudi algorithm constructor. More...
|
|
| ~LArSCSimpleMaker () |
|
StatusCode | initialize () |
| Standard Gaudi initialize method. More...
|
|
StatusCode | execute (const EventContext &context) const |
| Algorithm execute method. More...
|
|
virtual StatusCode | sysInitialize () override |
| Override sysInitialize. More...
|
|
virtual bool | isClonable () const override |
| Specify if the algorithm is clonable. More...
|
|
virtual unsigned int | cardinality () const override |
| Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant. More...
|
|
virtual StatusCode | sysExecute (const EventContext &ctx) override |
| Execute an algorithm. More...
|
|
virtual const DataObjIDColl & | extraOutputDeps () const override |
| Return the list of extra output dependencies. More...
|
|
virtual bool | filterPassed (const EventContext &ctx) const |
|
virtual void | setFilterPassed (bool state, const EventContext &ctx) const |
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
|
ToolHandle< ICaloSuperCellIDTool > | m_scidtool |
| Property: Offline / supercell mapping tool. More...
|
|
SG::ReadHandleKey< CaloCellContainer > | m_cellContainerKey |
| Property: SG key for the input calorimeter cell container. More...
|
|
SG::WriteHandleKey< CaloCellContainer > | m_sCellContainerKey |
| Property: SG key for the output supercell LAr channel container. More...
|
|
SG::ReadCondHandleKey< CaloNoiseSigmaDiff > | m_noise_per_cell_Key { this, "CaloNoiseSigmaDiff", "CaloNoiseSigmaDiff", "Sigma Diff for CaloNoise with High and Medium gain"} |
| Property SG Key for the Expected Noise Sigma diff in diff gains. More...
|
|
SG::ReadHandleKey< CaloBCIDAverage > | m_bcidAvgKey {this, "BCIDAvgKey", "CaloBCIDAverage", "" } |
| Property SG Key for the CaloLumiBCID. More...
|
|
Gaudi::Property< bool > | m_compNoise {this,"CompNoise",true,"Compensate for Noise difference in LAr between high and medium gain"} |
|
Gaudi::Property< bool > | m_addBCID {this,"addBCID",true,"Add BCID compensation back to cells prior to sum them up"} |
|
SG::ReadCondHandleKey< CaloSuperCellDetDescrManager > | m_caloSuperCellMgrKey |
|
const CaloIdManager * | m_calo_id_manager |
| Entry point for calorimeter ID helpers. More...
|
|
DataObjIDColl | m_extendedExtraObjects |
| Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks. More...
|
|
StoreGateSvc_t | m_evtStore |
| Pointer to StoreGate (event store by default) More...
|
|
StoreGateSvc_t | m_detStore |
| Pointer to StoreGate (detector store by default) More...
|
|
std::vector< SG::VarHandleKeyArray * > | m_vhka |
|
bool | m_varHandleArraysDeclared |
|
Make a dummy supercell LArRawChannelContainer
from a CaloCallContainer
.
Definition at line 41 of file LArSCSimpleMaker.h.
◆ StoreGateSvc_t
◆ LArSCSimpleMaker()
LArSCSimpleMaker::LArSCSimpleMaker |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ ~LArSCSimpleMaker()
LArSCSimpleMaker::~LArSCSimpleMaker |
( |
| ) |
|
|
inline |
◆ cardinality()
unsigned int AthReentrantAlgorithm::cardinality |
( |
| ) |
const |
|
overridevirtualinherited |
Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.
Override this to return 0 for reentrant algorithms.
Override this to return 0 for reentrant algorithms.
Definition at line 55 of file AthReentrantAlgorithm.cxx.
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute()
StatusCode LArSCSimpleMaker::execute |
( |
const EventContext & |
context | ) |
const |
Algorithm execute method.
Definition at line 53 of file LArSCSimpleMaker.cxx.
60 if ( not noise_per_cell_handle.isValid() ) {
61 ATH_MSG_DEBUG(
"Found invalid read handle for CaloNoiseSigmaDiff");
62 return StatusCode::FAILURE;
64 noise_per_cell = noise_per_cell_handle.cptr();
71 if ( not caloLumiBCIDHandle.isValid() ) {
72 ATH_MSG_DEBUG(
"Found invalid read handle for CaloBCIDAverage");
73 return StatusCode::FAILURE;
75 caloLumiBCID = caloLumiBCIDHandle.cptr();
90 if ( not cellsHandle.isValid() ) {
92 return StatusCode::FAILURE;
98 std::vector<float> energies (hash_max,0);
99 std::vector<float> enTime (hash_max,0);
100 std::vector<float> enForTime (hash_max,0);
101 std::vector<bool> timeDef (hash_max,
false);
102 std::vector<uint16_t> gains (hash_max,0);
103 std::vector<uint16_t> qualities (hash_max,0);
104 std::vector<float> sigma_noise_per_scell(hash_max,0);
117 assert (
hash < energies.size() );
118 float pedestalshift = 0.0;
120 energies[
hash] +=
cell->energy() + pedestalshift;
123 sigma_noise_per_scell[
hash]+=(*noise_per_cell)[cell_hash];
126 if ( ((prov & 0x2000) == 0x2000) && (
cell->et()>50) ) {
128 timeDef[
hash] =
true;
134 if ( qualities[
hash] + (
int)
cell->quality() > 65535 ){
135 qualities[
hash] = 65535 ;
144 int side = tile_cell_id->
side (cell_id);
146 int tower = tile_cell_id->
tower (cell_id);
174 energies[hash1] +=
cell->energy()*0.5;
175 energies[hash2] +=
cell->energy()*0.5;
182 auto superCellContainer = std::make_unique<CaloCellContainer> ();
187 superCellContainer->reserve(energies.size());
190 for (
unsigned int i=0;
i < energies.size();
i++) {
199 float add_noise = 0.0;
201 if ( (!dde->
is_tile()) && (sigma_noise_per_scell[
hash] > 0.0) ){
202 std::normal_distribution<double> distribution(0.0,sigma_noise_per_scell[
hash] );
205 energies[
i]+=add_noise;
210 ss->setEnergy( energies[
i] );
213 float time = enTime[
i] / enForTime[
i];
219 }
else ss->setTime( 999.0 );
221 ss->setQuality( qualities[
i] );
224 ss->setProvenance( 0 );
229 ss->setProvenance( prov );
232 superCellContainer->push_back(
ss);
235 ATH_CHECK( scellContainerHandle.record( std::move(superCellContainer) ) );
237 return StatusCode::SUCCESS;
◆ extraDeps_update_handler()
Add StoreName to extra input/output deps as needed.
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given
◆ extraOutputDeps()
const DataObjIDColl & AthReentrantAlgorithm::extraOutputDeps |
( |
| ) |
const |
|
overridevirtualinherited |
Return the list of extra output dependencies.
This list is extended to include symlinks implied by inheritance relations.
Definition at line 79 of file AthReentrantAlgorithm.cxx.
86 return Algorithm::extraOutputDeps();
◆ filterPassed()
virtual bool AthReentrantAlgorithm::filterPassed |
( |
const EventContext & |
ctx | ) |
const |
|
inlinevirtualinherited |
◆ initialize()
StatusCode LArSCSimpleMaker::initialize |
( |
| ) |
|
◆ inputHandles()
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ isClonable()
bool AthReentrantAlgorithm::isClonable |
( |
| ) |
const |
|
overridevirtualinherited |
Specify if the algorithm is clonable.
Reentrant algorithms are clonable.
Reimplemented in Simulation::BeamEffectsAlg, InDet::SiTrackerSpacePointFinder, InDet::SCT_Clusterization, InDet::SiSPSeededTrackFinder, SCTRawDataProvider, InDet::GNNSeedingTrackMaker, SCT_PrepDataToxAOD, RoIBResultToxAOD, InDet::SiSPGNNTrackMaker, SCT_CablingCondAlgFromCoraCool, SCT_ReadCalibDataTestAlg, SCT_CablingCondAlgFromText, SCT_ReadCalibChipDataTestAlg, SCT_TestCablingAlg, SCT_ConfigurationConditionsTestAlg, ITkPixelCablingAlg, ITkStripCablingAlg, SCTEventFlagWriter, SCT_ConditionsSummaryTestAlg, SCT_ModuleVetoTestAlg, SCT_MonitorConditionsTestAlg, SCT_LinkMaskingTestAlg, SCT_MajorityConditionsTestAlg, SCT_RODVetoTestAlg, SCT_SensorsTestAlg, SCT_TdaqEnabledTestAlg, SCT_SiliconConditionsTestAlg, SCTSiLorentzAngleTestAlg, SCT_ByteStreamErrorsTestAlg, SCT_ConditionsParameterTestAlg, SCT_FlaggedConditionTestAlg, SCT_StripVetoTestAlg, SCT_RawDataToxAOD, and SCTSiPropertiesTestAlg.
Definition at line 44 of file AthReentrantAlgorithm.cxx.
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
Return this algorithm's output handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ renounce()
◆ renounceArray()
◆ setFilterPassed()
virtual void AthReentrantAlgorithm::setFilterPassed |
( |
bool |
state, |
|
|
const EventContext & |
ctx |
|
) |
| const |
|
inlinevirtualinherited |
◆ sysExecute()
StatusCode AthReentrantAlgorithm::sysExecute |
( |
const EventContext & |
ctx | ) |
|
|
overridevirtualinherited |
Execute an algorithm.
We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.
Definition at line 67 of file AthReentrantAlgorithm.cxx.
69 return Gaudi::Algorithm::sysExecute (ctx);
◆ sysInitialize()
StatusCode AthReentrantAlgorithm::sysInitialize |
( |
| ) |
|
|
overridevirtualinherited |
Override sysInitialize.
Override sysInitialize from the base class.
Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc
Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc
Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.
Reimplemented in InputMakerBase, and HypoBase.
Definition at line 96 of file AthReentrantAlgorithm.cxx.
107 if ( cs.retrieve().isFailure() ) {
109 return StatusCode::SUCCESS;
111 if (cs->regHandle(
this,*
h).isFailure()) {
112 sc = StatusCode::FAILURE;
113 ATH_MSG_ERROR(
"unable to register WriteCondHandle " <<
h->fullKey()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_addBCID
Gaudi::Property<bool> LArSCSimpleMaker::m_addBCID {this,"addBCID",true,"Add BCID compensation back to cells prior to sum them up"} |
|
private |
◆ m_bcidAvgKey
◆ m_calo_id_manager
◆ m_caloSuperCellMgrKey
Initial value:{
this,"CaloSuperCellDetDescrManager","CaloSuperCellDetDescrManager","SG key of the resulting CaloSuperCellDetDescrManager"}
Definition at line 85 of file LArSCSimpleMaker.h.
◆ m_cellContainerKey
Initial value:{ this, "CellContainer", "AllCalo",
"SG key for the input calorimeter cell container"}
Property: SG key for the input calorimeter cell container.
Definition at line 62 of file LArSCSimpleMaker.h.
◆ m_compNoise
Gaudi::Property<bool> LArSCSimpleMaker::m_compNoise {this,"CompNoise",true,"Compensate for Noise difference in LAr between high and medium gain"} |
|
private |
◆ m_detStore
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthReentrantAlgorithm::m_extendedExtraObjects |
|
privateinherited |
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Empty if no symlinks were found.
Definition at line 153 of file AthReentrantAlgorithm.h.
◆ m_noise_per_cell_Key
◆ m_sCellContainerKey
Initial value:{ this, "SCellContainer", "SCellContainer",
"SG key for the output supercell LAr channel container"}
Property: SG key for the output supercell LAr channel container.
Definition at line 67 of file LArSCSimpleMaker.h.
◆ m_scidtool
Initial value:{ this, "SCIDTool", "CaloSuperCellIDTool" ,
"Offline / supercell mapping tool."}
Property: Offline / supercell mapping tool.
Definition at line 57 of file LArSCSimpleMaker.h.
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
std::vector< float > CaloNoiseSigmaDiff
NAME : CaloNoiseSigmaDiff.h PACKAGE : Calorimeter/CaloConditions.
Extra patterns decribing particle interation process.
SG::ReadCondHandleKey< CaloNoiseSigmaDiff > m_noise_per_cell_Key
Property SG Key for the Expected Noise Sigma diff in diff gains.
IdentifierHash calo_cell_hash(const Identifier cellId) const
create hash id from 'global' cell id
ToolHandle< ICaloSuperCellIDTool > m_scidtool
Property: Offline / supercell mapping tool.
Gaudi::Property< bool > m_compNoise
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
const CaloDetDescrElement * get_element(const Identifier &cellId) const
get element by its identifier
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)
int side(const Identifier &id) const
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
void reserve(unsigned int size)
Set the desired capacity.
Helper class for Tile offline identifiers for supercells.
int tower(const Identifier &id) const
const Tile_SuperCell_ID * getTile_SuperCell_ID(void) const
bool is_tile(const Identifier id) const
test if the id belongs to the Tiles
bool is_valid() const
Check if id is in a valid state.
SG::WriteHandleKey< CaloCellContainer > m_sCellContainerKey
Property: SG key for the output supercell LAr channel container.
const CaloIdManager * m_calo_id_manager
Entry point for calorimeter ID helpers.
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual void setOwner(IDataHandleHolder *o)=0
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
const TileID * getTileID(void) const
IdentifierHash calo_hash() const
cell calo hash
AthReentrantAlgorithm()
Default constructor:
int module(const Identifier &id) const
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
Helper class for offline supercell identifiers.
Helper class for TileCal offline identifiers.
::StatusCode StatusCode
StatusCode definition for legacy code.
int sampling(const Identifier &id) const
Helper class for offline cell identifiers.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
bool is_tile() const
cell belongs to Tile
SG::ReadCondHandleKey< CaloSuperCellDetDescrManager > m_caloSuperCellMgrKey
SG::ReadHandleKey< CaloCellContainer > m_cellContainerKey
Property: SG key for the input calorimeter cell container.
Gaudi::Property< bool > m_addBCID
const CaloCell_ID * getCaloCell_ID(void) const
Access to IdHelper.
virtual StatusCode sysInitialize() override
Override sysInitialize.
StatusCode initialize(bool used=true)
Container class for CaloCell.
float average(const Identifier &id) const
generator
Configure Herwig7 These are the commands corresponding to what would go into the regular Herwig infil...
Data object for each calorimeter readout cell.
def time(flags, cells_name, *args, **kw)
#define ATH_MSG_WARNING(x)
const CaloCell_SuperCell_ID * getCaloCell_SuperCell_ID(void) const
a typed memory pool that saves time spent allocation small object. This is typically used by containe...
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
int section(const Identifier &id) const
SG::ReadHandleKey< CaloBCIDAverage > m_bcidAvgKey
Property SG Key for the CaloLumiBCID.
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Identifier cell_id(const Identifier &any_id) const
unsigned int allocated()
return size already allocated OK
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
size_type calo_cell_hash_max(void) const
cell 'global' hash table max size