|
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 > &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 |
|
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) {
139 writeHandle.addDependency(ADC2MeVHdl);
152 larNoise = *NoiseHdl;
153 writeHandle.addDependency(NoiseHdl);
156 larPedestal = *PedestalHdl;
157 writeHandle.addDependency(PedestalHdl);
161 larfSampl = *fSamplHdl;
162 writeHandle.addDependency(fSamplHdl);
165 larMinBias = *MinBiasHdl;
166 writeHandle.addDependency(MinBiasHdl);
169 ATH_MSG_INFO(
"IOV found from intersection for AutoCorrTotal object: "
170 << writeHandle.getRange());
175 std::unique_ptr<LArAutoCorrTotal> larAutoCorrTotal =
176 std::make_unique<LArAutoCorrTotal>(larOnlineID, larOnOffIdMapping,
m_nGains);
192 const int nsamples_shape =
static_cast<int>(Shape.size());
195 larAutoCorr->autoCorr(chid,
igain);
197 if (
AC.size() == 0) {
203 int nsamples_AC_OFC =
AC.size() + 1;
210 unsigned int ihecshift = 0;
211 if (larOnlineID->
isHECchannel(chid) && nsamples_AC_OFC == 4 &&
231 SigmaNoise = RMSpedestal;
235 float fSampl = larfSampl->
FSAMPL(chid);
236 float MinBiasRMS = larMinBias->
minBiasRMS(chid);
238 MinBiasRMS /= fSampl;
239 const auto polynom_adc2mev =
242 if (polynom_adc2mev.size() > 0) {
243 Adc2MeV = (polynom_adc2mev)[1];
245 if (SigmaNoise != 0 && Adc2MeV != 0)
246 fSigma2 =
pow(MinBiasRMS / (SigmaNoise * Adc2MeV), 2);
248 if (fSampl == 0 || SigmaNoise == 0 || Adc2MeV == 0) {
252 <<
"fSampl (" << fSampl <<
"), SigmaNoise ("
253 << SigmaNoise <<
") or Adc2MeV (" << Adc2MeV
255 <<
"=> AutoCorrTotal = only AutoCorr elect. part ");
260 <<
") fSampl (" << fSampl <<
") "
261 <<
") SigmaNoise (" << SigmaNoise <<
") "
262 <<
") Adc2MeV (" << Adc2MeV <<
") "
274 int nsize_tot = (nsamples_AC_OFC - 1) * (nsamples_AC_OFC) / 2;
277 <<
") fSigma2 (" << fSigma2 <<
") "
278 <<
") nsamples_AC_OFC ( " << nsamples_AC_OFC);
279 std::vector<float> vTerms;
281 vTerms.resize(2 * nsize_tot + nsamples_AC_OFC, 0.);
284 for (
int j1 = 0;
j1 < nsamples_AC_OFC - 1;
j1++) {
285 for (
int j2 =
j1 + 1;
j2 < nsamples_AC_OFC;
j2++) {
286 int l = abs(
j2 -
j1) - 1;
288 j1 * nsamples_AC_OFC -
j1 * (
j1 + 1) / 2 +
j2 - (
j1 + 1);
294 <<
") vTerms[1] (" << vTerms[1] <<
") ");
296 for (
int j1 = 0;
j1 < nsamples_AC_OFC - 1; ++
j1) {
297 for (
int j2 =
j1 + 1;
j2 < nsamples_AC_OFC;
j2++) {
299 j1 * nsamples_AC_OFC -
j1 * (
j1 + 1) / 2 +
j2 - (
j1 + 1);
301 for (
int k = 0;
k < nsamples_shape; ++
k) {
302 if ((
j2 -
j1 +
k) >= 0 && (
j2 -
j1 +
k) < nsamples_shape) {
306 Rij += Shape[
k] * Shape[
j2 -
j1 +
k] * ibunch;
309 vTerms[nsize_tot +
index] = fSigma2 * Rij;
313 <<
") vTerms[mid] (" << vTerms[vTerms.size()/2] <<
") ");
316 for (
int j1 = 0;
j1 < nsamples_AC_OFC;
j1++) {
318 for (
int k = 0;
k < nsamples_shape; ++
k) {
322 Rms2i +=
pow(Shape[
k], 2) * ibunch;
324 vTerms[2 * nsize_tot +
j1] = fSigma2 * Rms2i;
327 <<
") vTerms[last] (" << vTerms[vTerms.size()-1] <<
") ");
331 larAutoCorrTotal->
set(hid,
igain, vTerms);
338 std::vector<float>
empty(nsize_tot, 0.);
339 larAutoCorrTotal->
set(hid,
igain, empty);
344 ATH_MSG_INFO(
"LArAutoCorrTotal Ncell * Ngain " << count3);
349 ATH_CHECK(writeHandle.record(std::move(larAutoCorrTotal)));
352 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
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
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
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
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
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
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
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