 |
ATLAS Offline Software
|
#include <LArAutoCorrTotalCondAlg.h>
|
| | LArAutoCorrTotalCondAlg (const std::string &name, ISvcLocator *pSvcLocator) |
| |
| virtual | ~LArAutoCorrTotalCondAlg () override |
| |
| virtual StatusCode | initialize () override |
| |
| virtual StatusCode | execute () override |
| |
| virtual StatusCode | sysInitialize () override |
| | Override sysInitialize. More...
|
| |
| virtual const DataObjIDColl & | extraOutputDeps () const override |
| | Return the list of extra output dependencies. More...
|
| |
| 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, V, H > &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 |
| |
|
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &) |
| | specialization for handling Gaudi::Property<SG::VarHandleKey> More...
|
| |
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyArrayType &) |
| | specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
|
| |
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleType &) |
| | specialization for handling Gaudi::Property<SG::VarHandleBase> More...
|
| |
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &t, const SG::NotHandleType &) |
| | specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
|
| |
Definition at line 26 of file LArAutoCorrTotalCondAlg.h.
◆ StoreGateSvc_t
◆ LArAutoCorrTotalCondAlg()
| LArAutoCorrTotalCondAlg::LArAutoCorrTotalCondAlg |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
Definition at line 15 of file LArAutoCorrTotalCondAlg.cxx.
31 "Key to read LArADC2MeV object");
33 "Key to read LArOnOffIdMapping object");
35 "Key to read LArShape object");
37 "Key to read LArAutoCorr object");
39 "Key to read LArNoise object");
41 "Key to read LArPedestal object");
43 "Key to read LArfSampl object");
45 "Key to read LArMinBias object");
47 "Key to write LArAutoCorrTotal object");
54 "First sample to use for in-time event on the full pulse shape");
56 "Delta between filled bunches in 25 ns units");
◆ ~LArAutoCorrTotalCondAlg()
| LArAutoCorrTotalCondAlg::~LArAutoCorrTotalCondAlg |
( |
| ) |
|
|
overridevirtual |
◆ 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);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ 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.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ 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.
338 return PBASE::declareProperty(
name, property,
doc);
◆ 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 LArAutoCorrTotalCondAlg::execute |
( |
| ) |
|
|
overridevirtual |
Definition at line 88 of file LArAutoCorrTotalCondAlg.cxx.
93 if (writeHandle.isValid()) {
96 << writeHandle.fullKey() <<
" is already valid.");
97 return StatusCode::SUCCESS;
105 larOnlineID = scidhelper;
109 larOnlineID = idhelper;
116 larOnOffIdMapping = *larOnOffIdMappingHdl;
117 if (larOnOffIdMapping ==
nullptr) {
118 ATH_MSG_ERROR(
"Failed to retrieve LArOnOffIdMapping object");
127 writeHandle.addDependency(ShapeHdl);
131 writeHandle.addDependency(AutoCorrHdl);
135 larADC2MeV = *ADC2MeVHdl;
136 if (larADC2MeV ==
nullptr) {
138 return StatusCode::FAILURE;
140 writeHandle.addDependency(ADC2MeVHdl);
153 larNoise = *NoiseHdl;
154 writeHandle.addDependency(NoiseHdl);
157 larPedestal = *PedestalHdl;
158 writeHandle.addDependency(PedestalHdl);
162 larfSampl = *fSamplHdl;
163 writeHandle.addDependency(fSamplHdl);
166 larMinBias = *MinBiasHdl;
167 writeHandle.addDependency(MinBiasHdl);
170 ATH_MSG_INFO(
"IOV found from intersection for AutoCorrTotal object: "
171 << writeHandle.getRange());
176 std::unique_ptr<LArAutoCorrTotal> larAutoCorrTotal =
177 std::make_unique<LArAutoCorrTotal>(larOnlineID, larOnOffIdMapping,
m_nGains);
193 const int nsamples_shape =
static_cast<int>(Shape.size());
196 larAutoCorr->autoCorr(chid,
igain);
198 if (
AC.size() == 0) {
204 int nsamples_AC_OFC =
AC.size() + 1;
211 unsigned int ihecshift = 0;
212 if (larOnlineID->
isHECchannel(chid) && nsamples_AC_OFC == 4 &&
232 SigmaNoise = RMSpedestal;
236 float fSampl = larfSampl->
FSAMPL(chid);
237 float MinBiasRMS = larMinBias->
minBiasRMS(chid);
239 MinBiasRMS /= fSampl;
240 const auto polynom_adc2mev =
243 if (polynom_adc2mev.size() > 0) {
244 Adc2MeV = (polynom_adc2mev)[1];
246 if (SigmaNoise != 0 && Adc2MeV != 0)
247 fSigma2 =
pow(MinBiasRMS / (SigmaNoise * Adc2MeV), 2);
249 if (fSampl == 0 || SigmaNoise == 0 || Adc2MeV == 0) {
253 <<
"fSampl (" << fSampl <<
"), SigmaNoise ("
254 << SigmaNoise <<
") or Adc2MeV (" << Adc2MeV
256 <<
"=> AutoCorrTotal = only AutoCorr elect. part ");
261 <<
") fSampl (" << fSampl <<
") "
262 <<
") SigmaNoise (" << SigmaNoise <<
") "
263 <<
") Adc2MeV (" << Adc2MeV <<
") "
275 int nsize_tot = (nsamples_AC_OFC - 1) * (nsamples_AC_OFC) / 2;
278 <<
") fSigma2 (" << fSigma2 <<
") "
279 <<
") nsamples_AC_OFC ( " << nsamples_AC_OFC);
280 std::vector<float> vTerms;
282 vTerms.resize(2 * nsize_tot + nsamples_AC_OFC, 0.);
285 for (
int j1 = 0;
j1 < nsamples_AC_OFC - 1;
j1++) {
286 for (
int j2 =
j1 + 1;
j2 < nsamples_AC_OFC;
j2++) {
287 int l = abs(
j2 -
j1) - 1;
289 j1 * nsamples_AC_OFC -
j1 * (
j1 + 1) / 2 +
j2 - (
j1 + 1);
295 <<
") vTerms[1] (" << vTerms[1] <<
") ");
297 for (
int j1 = 0;
j1 < nsamples_AC_OFC - 1; ++
j1) {
298 for (
int j2 =
j1 + 1;
j2 < nsamples_AC_OFC;
j2++) {
300 j1 * nsamples_AC_OFC -
j1 * (
j1 + 1) / 2 +
j2 - (
j1 + 1);
302 for (
int k = 0;
k < nsamples_shape; ++
k) {
303 if ((
j2 -
j1 +
k) >= 0 && (
j2 -
j1 +
k) < nsamples_shape) {
307 Rij += Shape[
k] * Shape[
j2 -
j1 +
k] * ibunch;
310 vTerms[nsize_tot +
index] = fSigma2 * Rij;
314 <<
") vTerms[mid] (" << vTerms[vTerms.size()/2] <<
") ");
317 for (
int j1 = 0;
j1 < nsamples_AC_OFC;
j1++) {
319 for (
int k = 0;
k < nsamples_shape; ++
k) {
323 Rms2i +=
pow(Shape[
k], 2) * ibunch;
325 vTerms[2 * nsize_tot +
j1] = fSigma2 * Rms2i;
328 <<
") vTerms[last] (" << vTerms[vTerms.size()-1] <<
") ");
332 larAutoCorrTotal->
set(hid,
igain, vTerms);
339 std::vector<float>
empty(nsize_tot, 0.);
340 larAutoCorrTotal->
set(hid,
igain, empty);
345 ATH_MSG_INFO(
"LArAutoCorrTotal Ncell * Ngain " << count3);
350 ATH_CHECK(writeHandle.record(std::move(larAutoCorrTotal)));
353 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 & AthAlgorithm::extraOutputDeps |
( |
| ) |
const |
|
overridevirtualinherited |
Return the list of extra output dependencies.
This list is extended to include symlinks implied by inheritance relations.
Definition at line 50 of file AthAlgorithm.cxx.
57 return Algorithm::extraOutputDeps();
◆ initialize()
| StatusCode LArAutoCorrTotalCondAlg::initialize |
( |
| ) |
|
|
overridevirtual |
◆ 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.
◆ 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()
◆ sysInitialize()
| StatusCode AthAlgorithm::sysInitialize |
( |
| ) |
|
|
overridevirtualinherited |
◆ 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_deltaBunch
| int LArAutoCorrTotalCondAlg::m_deltaBunch |
|
private |
◆ m_detStore
◆ m_evtStore
◆ m_extendedExtraObjects
| DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_firstSample
| unsigned int LArAutoCorrTotalCondAlg::m_firstSample |
|
private |
◆ m_isMC
| bool LArAutoCorrTotalCondAlg::m_isMC |
|
private |
◆ m_isSuperCell
| bool LArAutoCorrTotalCondAlg::m_isSuperCell |
|
private |
◆ m_LArADC2MeVObjKey
◆ m_LArAutoCorrObjKey
◆ m_LArAutoCorrTotalObjKey
◆ m_LArfSamplObjKey
◆ m_LArMinBiasObjKey
◆ m_LArNoiseObjKey
◆ m_LArOnOffIdMappingObjKey
◆ m_LArPedestalObjKey
◆ m_LArShapeObjKey
◆ m_nGains
| size_t LArAutoCorrTotalCondAlg::m_nGains = 0UL |
|
private |
◆ m_NoPile
| bool LArAutoCorrTotalCondAlg::m_NoPile |
|
private |
◆ m_Nsamples
| int LArAutoCorrTotalCondAlg::m_Nsamples |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
const LArVectorProxy ADC2MEV(const HWIdentifier &id, int gain) const
IdentifierHash channel_Hash(HWIdentifier channelId) const
Create channel_hash from channel_Id.
SG::ReadCondHandleKey< LArADC2MeV > m_LArADC2MeVObjKey
bool set(const IdentifierHash &hid, const int gain, std::vector< float > &autocorrtotal)
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual void setOwner(IDataHandleHolder *o)=0
This class defines the interface for accessing AutoCorrelation parameters for each channel @stereotyp...
unsigned int m_firstSample
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
virtual StatusCode sysInitialize() override
Override sysInitialize.
id_range channel_range() const
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
virtual bool isHECchannel(const HWIdentifier id) const =0
::StatusCode StatusCode
StatusCode definition for legacy code.
virtual const float & FSAMPL(const HWIdentifier &id) const =0
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
virtual const float & noise(const HWIdentifier &id, int gain) const =0
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
SG::WriteCondHandleKey< LArAutoCorrTotal > m_LArAutoCorrTotalObjKey
Helper for the Liquid Argon Calorimeter cell identifiers.
SG::ReadCondHandleKey< ILArPedestal > m_LArPedestalObjKey
StatusCode initialize(bool used=true)
DataObjIDColl m_extendedExtraObjects
SG::ReadCondHandleKey< ILArMinBias > m_LArMinBiasObjKey
bool empty() const noexcept
std::string show_to_string(Identifier id, const IdContext *context=0, char sep='.') const
or provide the printout in string form
SG::ReadCondHandleKey< LArOnOffIdMapping > m_LArOnOffIdMappingObjKey
Identifier cnvToIdentifier(const HWIdentifier &sid) const
create an Identifier from a HWIdentifier (inline)
#define ATH_MSG_WARNING(x)
virtual const float & minBiasRMS(const HWIdentifier &id) const =0
access to RMS of E in minimum bias events index by Identifier
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
AthAlgorithm()
Default constructor:
SG::ReadCondHandleKey< ILArfSampl > m_LArfSamplObjKey
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
SG::ReadCondHandleKey< ILArNoise > m_LArNoiseObjKey
std::string channel_name(const HWIdentifier id) const
Return a string corresponding to a feedthrough name given an identifier.
SG::ReadCondHandleKey< ILArAutoCorr > m_LArAutoCorrObjKey
constexpr int pow(int base, int exp) noexcept
virtual float pedestalRMS(const HWIdentifier &id, int gain) const =0
access to RMS of Pedestal index by Identifier, and gain setting
bool isOnlineConnected(const HWIdentifier &sid) const
Test whether a HWIdentifier is connected of not (inline)
Proxy for accessing a range of float values like a vector.
SG::ReadCondHandleKey< ILArShape > m_LArShapeObjKey