 |
ATLAS Offline Software
|
#include <LArOFPeakRecoTool.h>
|
| LArOFPeakRecoTool (const std::string &type, const std::string &name, const IInterface *parent) |
|
virtual | ~LArOFPeakRecoTool () |
|
LArOFIterResults | peak (const std::vector< short > &samples, HWIdentifier chID, CaloGain::CaloGain gain, int delay) const |
|
LArOFIterResults | peak (const std::vector< float > &samples, const HWIdentifier chID, const CaloGain::CaloGain gain, const float delayIn, const unsigned nIter=0, const unsigned npeak=2, unsigned peak_low=2, unsigned peak_high=2) const |
|
virtual StatusCode | initialize () |
|
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 |
|
Definition at line 29 of file LArOFPeakRecoTool.h.
◆ Result
◆ StoreGateSvc_t
◆ anonymous enum
◆ LArOFPeakRecoTool()
LArOFPeakRecoTool::LArOFPeakRecoTool |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ ~LArOFPeakRecoTool()
LArOFPeakRecoTool::~LArOFPeakRecoTool |
( |
| ) |
|
|
virtual |
◆ 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]
◆ 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
◆ initialize()
StatusCode LArOFPeakRecoTool::initialize |
( |
| ) |
|
|
virtual |
Definition at line 43 of file LArOFPeakRecoTool.cxx.
50 ATH_MSG_WARNING(
"jobOption 'UseShape' set to false. Will work without shape" );
57 ATH_MSG_ERROR(
"Unable to retrieve LArOnlineID from DetectorStore");
58 return StatusCode::FAILURE;
64 ATH_MSG_ERROR(
"Unable to retrieve LArOnlineID from DetectorStore");
65 return StatusCode::FAILURE;
68 return StatusCode::SUCCESS;
◆ 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& LArOFPeakRecoTool::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.
◆ peak() [1/2]
Definition at line 88 of file LArOFPeakRecoTool.cxx.
98 const float epsilon=0.001;
108 result.m_delay_final = delayIn;
109 result.m_peakSample_init = npeak;
110 result.m_peakSample_final = npeak;
113 unsigned& kMax =
result.m_peakSample_final;
116 unsigned& delayIdx=
result.m_ofcIndex;
127 const unsigned nSamples=samples.size();
149 const unsigned nOFCPhase=dd_ofc->
nTimeBins(chID,usedGain);
150 float timeOffset = dd_ofc->
timeOffset(chID,usedGain);
160 timeMax=(nOFCPhase-1)*timeBinWidth;
163 timeMax = (nOFCPhase-1)*timeBinWidth;
164 if (timeBinWidth==0.) {
178 const unsigned ofcSize=this_OFC_a.size();
181 if ( ofcSize == 0 || this_OFC_b.size() == 0 ) {
186 if ( this_OFC_a.size() != this_OFC_b.size() ) {
188 ")and b (" << this_OFC_b.size() <<
") are not the same size for channel 0x"
194 if (peak_low<2) peak_low=2;
196 if (peak_high<peak_low) {
198 <<
"Not enough ADC samples (" <<
nSamples <<
") to apply " << ofcSize <<
" OFCs." );
201 if(kMax<peak_low) kMax=peak_low;
202 if(kMax>peak_high) kMax=peak_high;
204 float amplitude_save=0.;
205 float tau_save= 99999.;
206 unsigned int kMax_save=0;
208 unsigned int delayIdx_save=0;
210 unsigned int mynIter = nIter;
233 for (
unsigned k=0 ; (
k<ofcSize);
k++ ) {
235 const float& this_sample = samples[kMax-2+
k];
236 A += this_OFC_a.
at(
k) * this_sample ;
237 At += this_OFC_b.
at(
k) * this_sample ;
252 delay = delayIdx*timeBinWidth;
257 if (samples.size() == ofcSize && nOFCPhase<2) {
258 delay = delayIdx*timeBinWidth;
263 if (std::abs(
result.m_tau) <= (0.5*timeBinWidth)) {
265 delay = delayIdx*timeBinWidth;
269 if (kIter>=mynIter) {
270 delay = delayIdx*timeBinWidth;
272 if (std::abs(tau_save) < std::abs(
result.m_tau)) {
273 result.m_amplitude = amplitude_save;
277 delayIdx = delayIdx_save;
280 if (std::abs(
result.m_tau) <= timeBinWidth)
result.m_converged=
true;
286 if (std::abs(
result.m_tau) <= timeBinWidth) {
287 result.m_converged =
true;
289 amplitude_save =
result.m_amplitude;
292 delay_save = delayIdx*timeBinWidth;
293 delayIdx_save = delayIdx;
298 if(
delay<(-0.5*timeBinWidth)) {
303 if (
delay > timeMax )
delay = timeMax-epsilon;
309 if(
delay>(timeMax+0.5*timeBinWidth) ) {
314 if(
delay > timeMax )
delay = timeMax-epsilon;
317 delay = timeMax-epsilon;
323 if (delayIdx>=nOFCPhase) delayIdx = nOFCPhase-1;
325 this_OFC_a = dd_ofc->
OFC_a(chID,(
int)usedGain,delayIdx);
326 this_OFC_b = dd_ofc->
OFC_b(chID,(
int)usedGain,delayIdx);
345 if( thisShape.size() >= ofcSize ) {
346 for (
unsigned k=0 ;
k<ofcSize ;
k++ ) {
347 const float& this_sample = samples[kMax-2+
k];
359 result.m_nIterPerf = kIter;
◆ peak() [2/2]
Definition at line 74 of file LArOFPeakRecoTool.cxx.
77 std::vector<float> newsamples;
78 for(
unsigned int i=0;
i<samples.size();
i++)
80 newsamples.push_back((
float)samples[
i]);
◆ renounce()
◆ renounceArray()
◆ 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_delayShift
int LArOFPeakRecoTool::m_delayShift |
|
private |
◆ m_detStore
◆ m_evtStore
◆ m_forceHighGain
bool LArOFPeakRecoTool::m_forceHighGain |
|
private |
◆ m_isSC
bool LArOFPeakRecoTool::m_isSC |
|
private |
◆ m_iterate
bool LArOFPeakRecoTool::m_iterate |
|
private |
◆ m_keyOFC
◆ m_keyShape
◆ m_lar_on_id
◆ m_samplingPeriod
float LArOFPeakRecoTool::m_samplingPeriod |
|
private |
◆ m_useShape
bool LArOFPeakRecoTool::m_useShape |
|
private |
◆ m_useShapeDer
bool LArOFPeakRecoTool::m_useShapeDer |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
virtual OFCRef_t OFC_b(const HWIdentifier &id, int gain, int tbin=0) const =0
virtual ShapeRef_t ShapeDer(const HWIdentifier &id, int gain, int tbin=0, int mode=0) const =0
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
value_type get_compact() const
Get the compact id.
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual void setOwner(IDataHandleHolder *o)=0
virtual float timeOffset(const HWIdentifier &CellID, int gain) const =0
value_type at(size_t i) const
Vector indexing with bounds check.
virtual bool isHECchannel(const HWIdentifier id) const =0
::StatusCode StatusCode
StatusCode definition for legacy code.
virtual float timeBinWidth(const HWIdentifier &CellID, int gain) const =0
double delay(std::size_t d)
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
Helper for the Liquid Argon Calorimeter cell identifiers.
StatusCode initialize(bool used=true)
#define ATH_MSG_WARNING(x)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
virtual OFCRef_t OFC_a(const HWIdentifier &id, int gain, int tbin=0) const =0
access to OFCs by online ID, gain, and tbin (!=0 for testbeam)
virtual unsigned nTimeBins(const HWIdentifier &CellID, int gain) const =0
std::string channel_name(const HWIdentifier id) const
Return a string corresponding to a feedthrough name given an identifier.
constexpr int pow(int base, int exp) noexcept
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Proxy for accessing a range of float values like a vector.
virtual ShapeRef_t Shape(const HWIdentifier &id, int gain, int tbin=0, int mode=0) const =0