![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
#include <LArDigitOscillationCorrTool.h>
|
| LArDigitOscillationCorrTool (const std::string &type, const std::string &name, const IInterface *parent) |
|
| ~LArDigitOscillationCorrTool () |
|
virtual StatusCode | initialize () |
|
virtual StatusCode | finalize () |
|
virtual void | handle (const Incident &) |
|
StatusCode | calculateEventPhase (const LArDigitContainer &theDC) |
|
StatusCode | correctLArDigits (LArDigitContainer &theDC) |
|
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 | sysInitialize () override |
| Perform system initialization for an algorithm. 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 |
|
◆ StoreGateSvc_t
◆ LArDigitOscillationCorrTool()
LArDigitOscillationCorrTool::LArDigitOscillationCorrTool |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ ~LArDigitOscillationCorrTool()
LArDigitOscillationCorrTool::~LArDigitOscillationCorrTool |
( |
| ) |
|
|
inline |
◆ calculateEventPhase()
Implements ILArDigitOscillationCorrTool.
Definition at line 67 of file LArDigitOscillationCorrTool.cxx.
77 ATH_MSG_DEBUG (
"Retrieving channel phases and amplituides " );
80 unsigned int iHECChan(0);
81 std::vector<std::vector<short> > theSamples;
82 std::vector<float> thePedestals;
83 std::vector<double> theChannelAmplitudes;
84 std::vector<double> theChannelPhases;
85 std::vector<float> theRMSValues;
94 return StatusCode::FAILURE;
98 for (
unsigned int i=0;
i<theDC.
size();
i++) {
116 ATH_MSG_DEBUG (
"No pedestal RMS found for this cell. Exiting ...." );
117 return StatusCode::FAILURE;
120 const double& DBchannelPhase=larH6Oscillations->
channelPhase(chid);
124 if( DBpedestalRMS > 0 && DBchannelAmplitude>0 ) {
125 theRMSValues.push_back(DBpedestalRMS);
127 theChannelPhases.push_back(DBchannelPhase);
128 theChannelAmplitudes.push_back(DBchannelAmplitude);
131 thePedestals.push_back(DBpedestal);
133 ATH_MSG_DEBUG (
"No valid pedestal found for this cell. Exiting ...." );
134 return StatusCode::FAILURE;
144 for(
double myEventPhase = -
M_PI; myEventPhase<
M_PI; myEventPhase+=0.1) {
146 for (
unsigned int i=0;
i<iHECChan;
i++) {
147 unsigned int nSamples = theSamples[
i].size();
148 for(
unsigned int j=0;j<
nSamples;j++) {
151 if ( j == 0 || (std::abs(theSamples[
i][j] - theSamples[
i][0]) <=
m_nSigma*theRMSValues[
i]
152 && ( j <= 0 || std::abs(theSamples[
i][j-1] - theSamples[
i][0]) <=
m_nSigma*theRMSValues[
i])
153 && ( j >=
nSamples-1 || std::abs(theSamples[
i][j+1] - theSamples[
i][0]) <=
m_nSigma*theRMSValues[
i])) ) {
157 lchitest +=
pow((theSamples[
i][j] - thePedestals[
i]
159 +theChannelPhases[
i]+myEventPhase))
164 if ( lchitest < lchimin || lchimin < 0 ) {
170 ATH_MSG_DEBUG (
"Ending eventphase calculation. Phase = <" <<
m_eventPhase <<
">, Number of Channels used = <" << iHECChan <<
">, Average Number of Samples Used = <"
171 << (iHECChan > 0 ? (
double)nTotSamples/iHECChan : 0)
173 return StatusCode::SUCCESS;
◆ correctLArDigits()
StatusCode LArDigitOscillationCorrTool::correctLArDigits |
( |
LArDigitContainer & |
theDC | ) |
|
|
virtual |
Implements ILArDigitOscillationCorrTool.
Definition at line 177 of file LArDigitOscillationCorrTool.cxx.
185 std::vector<double> theChannelAmplitudes;
186 std::vector<double> theChannelPhases;
195 return StatusCode::FAILURE;
198 for (
unsigned int i=0;
i<theDC.
size();
i++) {
215 const double& DBchannelPhase=larH6Oscillations->
channelPhase(chid);
219 <<
", the ChannelAmplitude is " << DBchannelAmplitude
220 <<
", the ChannelPhase is " << DBchannelPhase );
222 if( DBchannelAmplitude>0 ) {
223 std::vector<short> new_samples(
nSamples);
224 for(
unsigned int j=0;j<
nSamples;j++)
225 new_samples[j] = (
short)(
samples[j] + 0.5
230 theDC[
i] = theNewDigit;
234 return StatusCode::SUCCESS;
◆ 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]
◆ 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
◆ finalize()
virtual StatusCode LArDigitOscillationCorrTool::finalize |
( |
| ) |
|
|
inlinevirtual |
◆ handle()
void LArDigitOscillationCorrTool::handle |
( |
const Incident & |
| ) |
|
|
virtual |
◆ initialize()
StatusCode LArDigitOscillationCorrTool::initialize |
( |
| ) |
|
|
virtual |
◆ 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.
◆ interfaceID()
static const InterfaceID& LArDigitOscillationCorrTool::interfaceID |
( |
| ) |
|
|
inlinestatic |
◆ 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()
◆ retrieveDB()
StatusCode LArDigitOscillationCorrTool::retrieveDB |
( |
| ) |
|
|
private |
◆ sysInitialize()
◆ 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_cablingKey
◆ m_detStore
◆ m_emId
◆ m_eventPhase
double LArDigitOscillationCorrTool::m_eventPhase |
|
private |
◆ m_evtStore
◆ m_fcalId
◆ m_hecId
◆ m_lar_on_id
◆ m_nSigma
double LArDigitOscillationCorrTool::m_nSigma |
|
private |
◆ m_omega
double LArDigitOscillationCorrTool::m_omega |
|
private |
◆ m_priority
int LArDigitOscillationCorrTool::m_priority |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
virtual float pedestal(const HWIdentifier &id, int gain) const =0
const LArEM_ID * em_idHelper() const
access to EM idHelper
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
const std::vector< short > & samples() const
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
const std::string & key() const
Return the StoreGate ID for the referenced object.
const LArHEC_ID * hec_idHelper() const
access to HEC idHelper
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual void setOwner(IDataHandleHolder *o)=0
Liquid Argon digit base class.
bool is_lar_hec(Identifier id) const
Helper class for offline cell identifiers.
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
virtual const double & channelAmplitude(const HWIdentifier &id) const =0
access to channel amplitude index by Identifier
StatusCode initialize(bool used=true)
CaloGain::CaloGain gain() const
std::string show_to_string(Identifier id, const IdContext *context=0, char sep='.') const
or provide the printout in string form
virtual const double & channelPhase(const HWIdentifier &id) const =0
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
const HWIdentifier & channelID() const
virtual float pedestalRMS(const HWIdentifier &id, int gain) const =0
access to RMS of Pedestal index by Identifier, and gain setting
size_type size() const noexcept
Returns the number of elements in the collection.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
const LArFCAL_ID * fcal_idHelper() const
access to FCAL idHelper