|
ATLAS Offline Software
|
#include <LArOFCAlg.h>
|
| LArOFCAlg (const std::string &name, ISvcLocator *pSvcLocator) |
|
StatusCode | initialize () |
|
StatusCode | execute () |
|
virtual StatusCode | stop () |
|
StatusCode | finalize () |
|
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 |
|
|
void | process (perChannelData_t &, const LArOnOffIdMapping *cabling) const |
|
bool | verify (const HWIdentifier chid, const std::vector< float > &OFCa, const std::vector< float > &OFCb, const std::vector< float > &Shape, const char *ofcversion, const unsigned phase) const |
|
StatusCode | initPhysWaveContainer (const LArOnOffIdMapping *cabling) |
|
StatusCode | initCaliWaveContainer () |
|
Eigen::VectorXd | getDelta (std::vector< float > &samples, const HWIdentifier chid, unsigned nSamples) const |
|
bool | useDelta (const HWIdentifier chid, const int jobOFlag, const LArOnOffIdMapping *cabling) const |
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKey> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &) |
| specialization for handling Gaudi::Property<SG::VarHandleBase> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &) |
| specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
|
|
|
static void | optFilt (const std::vector< float > &gWave_in, const std::vector< float > &gDerivWave_in, const Eigen::MatrixXd &autoCorrInv, std::vector< float > &OFCa, std::vector< float > &OFCb) |
|
static void | optFiltDelta (const std::vector< float > &gWave_in, const std::vector< float > &gDerivWave_in, const Eigen::MatrixXd &autoCorrInv, const Eigen::VectorXd &delta, std::vector< float > &vecOFCa, std::vector< float > &vecOFCb) |
|
static void | printOFCVec (const std::vector< float > &vec, MsgStream &mLog) |
|
|
SG::ReadCondHandleKey< LArOnOffIdMapping > | m_cablingKey {this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"} |
|
SG::ReadCondHandleKey< LArOnOffIdMapping > | m_cablingKeySC {this,"ScCablingKey","LArOnOffIdMapSC","SG Key of SC LArOnOffIdMapping object"} |
|
SG::ReadCondHandleKey< CaloDetDescrManager > | m_caloMgrKey |
|
SG::ReadCondHandleKey< CaloSuperCellDetDescrManager > | m_caloSuperCellMgrKey |
|
std::vector< perChannelData_t > | m_allChannelData |
|
std::string | m_dumpOFCfile |
|
std::vector< std::string > | m_keylist |
|
bool | m_verify |
|
bool | m_normalize |
|
bool | m_timeShift |
|
int | m_timeShiftByIndex |
|
LArCaliWaveContainer * | m_waveCnt_nc =nullptr |
|
unsigned int | m_nSamples |
|
unsigned int | m_nPhases |
|
unsigned int | m_dPhases |
|
unsigned int | m_nDelays |
|
unsigned int | m_nPoints |
|
float | m_addOffset |
|
ToolHandle< ILArAutoCorrDecoderTool > | m_AutoCorrDecoder {this,"DecoderTool",{} } |
|
ToolHandle< ILArAutoCorrDecoderTool > | m_AutoCorrDecoderV2 {this,"DecoderToolV2", {} } |
|
const CaloDetDescrManager_Base * | m_calo_dd_man |
|
const LArOnlineID_Base * | m_onlineID |
|
const LArOFCBinComplete * | m_larPhysWaveBin |
|
double | m_errAmpl |
|
double | m_errTime |
|
bool | m_readCaliWave |
|
bool | m_fillShape |
|
std::string | m_ofcKey |
|
std::string | m_ofcKeyV2 |
|
std::string | m_shapeKey |
|
bool | m_storeMaxPhase |
|
std::string | m_ofcBinKey |
|
std::string | m_groupingType |
|
std::string | m_larPhysWaveBinKey |
|
int | m_useDelta |
|
int | m_useDeltaV2 |
|
bool | m_computeV2 |
|
int | m_nThreads |
|
bool | m_readDSPConfig |
|
std::string | m_DSPConfigFolder |
|
std::unique_ptr< LArDSPConfig > | m_DSPConfig |
|
bool | m_forceShift |
|
bool | m_isSC |
|
DataObjIDColl | m_extendedExtraObjects |
|
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 |
|
|
static const float | m_fcal3Delta [5] ={0.0790199937765, 0.0952000226825, 0.0790199937765, 0.0952000226825, 0.0790199937765} |
|
static const float | m_fcal2Delta [5] ={-0.01589001104, -0.0740399733186, -0.01589001104, -0.0740399733186, -0.01589001104} |
|
static const float | m_fcal1Delta [5] ={0.0679600232979, -0.139479996869, 0.0679600232979, -0.139479996869, 0.0679600232979} |
|
Definition at line 39 of file LArOFCAlg.h.
◆ StoreGateSvc_t
◆ LArOFCAlg()
LArOFCAlg::LArOFCAlg |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ 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 LArOFCAlg::execute |
( |
| ) |
|
|
inline |
Definition at line 46 of file LArOFCAlg.h.
46 {
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();
◆ finalize()
StatusCode LArOFCAlg::finalize |
( |
| ) |
|
|
inline |
Definition at line 48 of file LArOFCAlg.h.
48 {
return StatusCode::SUCCESS;}
◆ getDelta()
Eigen::VectorXd LArOFCAlg::getDelta |
( |
std::vector< float > & |
samples, |
|
|
const HWIdentifier |
chid, |
|
|
unsigned |
nSamples |
|
) |
| const |
|
private |
Definition at line 850 of file LArOFCAlg.cxx.
878 for (
unsigned int i = 0;
i<samples.size();++
i) {
◆ initCaliWaveContainer()
StatusCode LArOFCAlg::initCaliWaveContainer |
( |
| ) |
|
|
private |
Definition at line 667 of file LArOFCAlg.cxx.
680 ATH_MSG_INFO(
"LArCaliWaveContainer: Corrections not yet applied, applying them now..." );
682 ATH_MSG_ERROR(
"Failed to apply corrections to LArCaliWaveContainer!" );
683 return StatusCode::FAILURE;
686 ATH_MSG_INFO(
"Applied corrections to non-const Wave container");
694 return StatusCode::FAILURE;
703 WAVEIT it_e=waveCnt->
end(
gain);
704 for (;
it!=it_e;++
it) {
706 for (
const auto& cw : wVec) {
715 return StatusCode::SUCCESS;
◆ initialize()
StatusCode LArOFCAlg::initialize |
( |
| ) |
|
Definition at line 98 of file LArOFCAlg.cxx.
104 return StatusCode::FAILURE;
108 if (
sc.isFailure()) {
110 return StatusCode::FAILURE;
118 if (
sc.isFailure()) {
120 return StatusCode::FAILURE;
129 if (
sc.isFailure()) {
130 msg(MSG::ERROR) <<
"Could not get LArOnlineID helper !" <<
endmsg;
131 return StatusCode::FAILURE;
140 if (
sc.isFailure()) {
141 msg(MSG::ERROR) <<
"Could not get LArOnlineID helper !" <<
endmsg;
142 return StatusCode::FAILURE;
161 return StatusCode::SUCCESS;
◆ initPhysWaveContainer()
Definition at line 633 of file LArOFCAlg.cxx.
642 if (
sc.isFailure()) {
651 WAVEIT it_e=waveCnt->
end(
gain);
652 for (;
it!=it_e;++
it) {
654 if (
cabling->isOnlineConnected (chid)){
663 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.
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ optFilt()
void LArOFCAlg::optFilt |
( |
const std::vector< float > & |
gWave_in, |
|
|
const std::vector< float > & |
gDerivWave_in, |
|
|
const Eigen::MatrixXd & |
autoCorrInv, |
|
|
std::vector< float > & |
OFCa, |
|
|
std::vector< float > & |
OFCb |
|
) |
| |
|
staticprivate |
Definition at line 719 of file LArOFCAlg.cxx.
721 assert(gWave.size()==gDerivWave.size());
723 const int optNpt = gWave.size();
725 Eigen::VectorXd gResp(optNpt), gDerivResp(optNpt);
726 for (
int i=0;
i<optNpt;
i++) {
728 gDerivResp[
i] = gDerivWave[
i];
731 Eigen::Matrix2d isol;
733 (gResp.transpose()*acInverse*gResp)[0],
734 (gResp.transpose()*acInverse*gDerivResp)[0],
735 (gDerivResp.transpose()*acInverse*gResp)[0],
736 (gDerivResp.transpose()*acInverse*gDerivResp)[0];
739 Eigen::Vector2d Atau;
740 Eigen::Vector2d Ktemp;
741 Eigen::Matrix2d isolInv = isol.inverse();
750 Atau = isolInv*Ktemp;
753 Eigen::VectorXd OFCa = Amp[0]*acInverse*gResp + Amp[1]*acInverse*gDerivResp;
754 Eigen::VectorXd OFCb = Atau[0]*acInverse*gResp + Atau[1]*acInverse*gDerivResp;
757 vecOFCa.resize(optNpt);
758 vecOFCb.resize(optNpt);
759 for (
int i=0;
i<optNpt;
i++) {
◆ optFiltDelta()
void LArOFCAlg::optFiltDelta |
( |
const std::vector< float > & |
gWave_in, |
|
|
const std::vector< float > & |
gDerivWave_in, |
|
|
const Eigen::MatrixXd & |
autoCorrInv, |
|
|
const Eigen::VectorXd & |
delta, |
|
|
std::vector< float > & |
vecOFCa, |
|
|
std::vector< float > & |
vecOFCb |
|
) |
| |
|
staticprivate |
HepVector delta(5) ;
delta[0]=3.79198742146; delta[1]=-4.84165741965; delta[2]=3.20189843985; delta[3]=-5.90850592618; delta[4]=1.8260451328;
Definition at line 770 of file LArOFCAlg.cxx.
776 assert(gWave.size()==gDerivWave.size());
778 const int optNpt = gWave.size();
780 Eigen::VectorXd gResp(optNpt), gDerivResp(optNpt);
781 for (
int i=0;
i<optNpt;
i++) {
783 gDerivResp[
i] = gDerivWave[
i];
798 Eigen::Matrix3d isol;
800 (gResp.transpose()*acInverse*gResp)[0],
801 (gResp.transpose()*acInverse*gDerivResp),
802 (gResp.transpose()*acInverse*delta)[0],
804 (gDerivResp.transpose()*acInverse*gResp)[0],
805 (gDerivResp.transpose()*acInverse*gDerivResp)[0],
806 (gDerivResp.transpose()*acInverse*delta)[0],
808 (delta.transpose()*acInverse*gResp)[0],
809 (delta.transpose()*acInverse*gDerivResp)[0],
810 (delta.transpose()*acInverse*delta)[0];
814 Eigen::Vector3d Atau;
815 Eigen::Vector3d Ktemp;
816 Eigen::Matrix3d isolInv = isol.inverse();
828 Atau = isolInv*Ktemp;
831 Eigen::VectorXd OFCa = Amp[0]*acInverse*gResp + Amp[1]*acInverse*gDerivResp + Amp[2]*acInverse * delta;
832 Eigen::VectorXd OFCb = Atau[0]*acInverse*gResp + Atau[1]*acInverse*gDerivResp + Atau[2]*acInverse * delta ;
836 vecOFCa.resize(optNpt);
837 vecOFCb.resize(optNpt);
838 for (
int i=0;
i<optNpt;
i++) {
◆ 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.
◆ printOFCVec()
void LArOFCAlg::printOFCVec |
( |
const std::vector< float > & |
vec, |
|
|
MsgStream & |
mLog |
|
) |
| |
|
staticprivate |
Definition at line 989 of file LArOFCAlg.cxx.
990 mLog << MSG::WARNING <<
"OFCs";
◆ process()
Definition at line 447 of file LArOFCAlg.cxx.
459 const unsigned gain=chanData.gain;
466 <<
") is too small to fit your OFC request (" <<
m_nPoints <<
" points)" ) ;
467 chanData.shortWave=
true;
494 aWave = aWave * (1./peak);
501 chanData.tstart = larWaveHelper.
getStart(aWave) ;
514 float maxSampleValAt3=-1;
529 Eigen::MatrixXd acInverseV2;
543 for (
unsigned iPhase=0;iPhase<
m_nPhases;iPhase++) {
546 <<
", Gain = " <<
gain <<
", Phase = " << iPhase <<
":");
550 std::vector<float>& theSamples=chanData.shape[iPhase];
551 std::vector<float>& theSamplesDer=chanData.shapeDer[iPhase];
557 for (
unsigned iSample=0;iSample<
m_nSamples;++iSample){
558 const unsigned tbin = chanData.tstart + iPhase*
m_dPhases + (iSample+tShift)*
m_nDelays ;
559 theSamples.push_back( aWave.
getSample(tbin) );
560 theSamplesDer.push_back( aDerivedWave.
getSample(tbin) );
565 maxSampleValAt3=theSamples[2];
566 chanData.phasewMaxAt3=iPhase;
571 Eigen::VectorXd delta;
573 if (thisChanUseDelta || thisChanUseDeltaV2) {
574 std::vector<float> theSamples32;
575 theSamples32.reserve(32);
576 for (
unsigned iSample=0;iSample<32 ;++iSample){
577 const unsigned tbin = chanData.tstart + iPhase*
m_dPhases + (iSample+tShift)*
m_nDelays ;
578 if (tbin>=aWave.
getSize())
continue;
579 theSamples32.push_back( aWave.
getSample(tbin) );
586 std::vector<float>& vOFC_a= chanData.ofc_a[iPhase];
587 std::vector<float>& vOFC_b= chanData.ofc_b[iPhase];
589 if (thisChanUseDelta) {
590 optFiltDelta(theSamples,theSamplesDer,acInverse,delta,vOFC_a,vOFC_b);
593 optFilt(theSamples,theSamplesDer,acInverse,vOFC_a,vOFC_b);
598 chanData.faultyOFC |=
verify(chanData.chid,vOFC_a,vOFC_b,theSamples,
"OFC",iPhase);
605 std::vector<float>& vOFCV2_a= chanData.ofcV2_a[iPhase];
606 std::vector<float>& vOFCV2_b= chanData.ofcV2_b[iPhase];
608 if (thisChanUseDeltaV2) {
609 optFiltDelta(theSamples,theSamplesDer,acInverseV2,delta,vOFCV2_a,vOFCV2_b);
612 optFilt(theSamples,theSamplesDer,acInverseV2,vOFCV2_a,vOFCV2_b);
617 chanData.faultyOFC |=
verify(chanData.chid,vOFCV2_a,vOFCV2_b,theSamples,
"OFCV2",iPhase);
◆ renounce()
◆ renounceArray()
◆ stop()
StatusCode LArOFCAlg::stop |
( |
| ) |
|
|
virtual |
TBB global control parameter
Definition at line 165 of file LArOFCAlg.cxx.
184 ATH_CHECK(caloSuperCellMgrHandle.isValid());
202 ATH_MSG_INFO(
" Will use helper class for start time." );
227 m_DSPConfig = std::make_unique<LArDSPConfig>(attrList);
233 return StatusCode::FAILURE;
258 std::unique_ptr<tbb::global_control> tbbgc;
261 tbbgc=std::make_unique<tbb::global_control>( tbb::global_control::max_allowed_parallelism,
m_nThreads);
268 tbb::parallel_for(tbb::blocked_range<size_t>(0,
m_allChannelData.size()),looper);
283 std::unique_ptr<LArOFCComplete> larOFCComplete=std::make_unique<LArOFCComplete>();
285 if (
sc.isFailure()) {
286 ATH_MSG_ERROR(
"Failed to set groupingType for LArOFCComplete object" );
290 if (
sc.isFailure()) {
296 std::unique_ptr<LArOFCComplete> larOFCCompleteV2=std::make_unique<LArOFCComplete>();
298 if (
sc.isFailure()) {
299 ATH_MSG_ERROR(
"Failed to set groupingType for LArOFCComplete object" );
303 if (
sc.isFailure()) {
309 std::unique_ptr<LArOFCBinComplete> larOFCBinComplete;
311 larOFCBinComplete=std::make_unique<LArOFCBinComplete>();
313 if (
sc.isFailure()) {
314 ATH_MSG_ERROR(
"Failed to set groupingType for LArOFCBinComplete object" );
318 if (
sc.isFailure() ) {
319 ATH_MSG_ERROR(
"Could not initialize LArOFCComplete data object - exit!" ) ;
325 std::unique_ptr<LArShapeComplete> larShapeComplete;
327 larShapeComplete = std::make_unique<LArShapeComplete>();
329 if (
sc.isFailure()) {
330 ATH_MSG_ERROR(
"Failed to set groupingType for LArShapeComplete object" );
334 if (
sc.isFailure()) {
335 ATH_MSG_ERROR(
"Failed initialize LArShapeComplete object" );
347 if (chanData.faultyOFC) ++nFailed;
350 const int gain=chanData.gain;
352 const std::vector<std::vector<float> > & allPhaseOFCa=chanData.ofc_a;
353 const std::vector<std::vector<float> > & allPhaseOFCb=chanData.ofc_b;
354 const std::vector<std::vector<float> > & allPhaseShape=chanData.shape;
355 const std::vector<std::vector<float> > & allPhaseShapeDer=chanData.shapeDer;
356 larOFCComplete->
set(ch_id,
gain,allPhaseOFCa,allPhaseOFCb,chanData.tstart,chanData.timeBinWidthOFC);
357 if (larOFCBinComplete) larOFCBinComplete->
set(ch_id,
gain,chanData.phasewMaxAt3);
358 if (
m_fillShape ) larShapeComplete->
set(ch_id,
gain,allPhaseShape,allPhaseShapeDer,chanData.tstart,chanData.timeBinWidthOFC);
362 const std::vector<std::vector<float> > & allPhaseOFCV2a=chanData.ofcV2_a;
363 const std::vector<std::vector<float> > & allPhaseOFCV2b=chanData.ofcV2_b;
364 larOFCCompleteV2->
set(ch_id,
gain,allPhaseOFCV2a,allPhaseOFCV2b,chanData.tstart,chanData.timeBinWidthOFC);
371 ATH_MSG_ERROR(
"Number of channels * gains with failed OFC verification: " << nFailed );
379 if (
sc.isFailure()) {
381 return StatusCode::FAILURE;
386 if (
sc.isFailure()) {
387 ATH_MSG_ERROR(
"Could not symlink ILArOFC with LArOFCComplete." );
388 return StatusCode::FAILURE;
396 if (
sc.isFailure()) {
398 return StatusCode::FAILURE;
403 if (
sc.isFailure()) {
404 ATH_MSG_ERROR(
"Could not symlink ILArOFC with LArOFCComplete." );
405 return StatusCode::FAILURE;
410 if (larOFCBinComplete) {
412 if (
sc.isFailure()) {
414 return StatusCode::FAILURE;
422 if (
sc.isFailure()) {
424 return StatusCode::FAILURE;
427 ATH_MSG_DEBUG(
"Trying to symlink ILArShape with LArShapeComplete");
429 if (
sc.isFailure()) {
430 ATH_MSG_ERROR(
"Could not symlink ILArShape with LArShapeComplete." );
431 return StatusCode::FAILURE;
433 ATH_MSG_INFO(
"ILArShape symlink with LArShapeComplete successfully" ) ;
440 ATH_MSG_INFO(
"Reverted corrections of non-cost wave container");
443 return StatusCode::SUCCESS;
◆ 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()
◆ useDelta()
Definition at line 899 of file LArOFCAlg.cxx.
917 if (
cabling->isOnlineConnected (chid)){
921 ATH_MSG_ERROR(
" dde = 0 , onl_id, ofl_id= "<< chid<<
" "<<ofl_id );
930 if (fabs(dde->
eta())>4.0){
940 if (fabs(dde->
eta())>4.0){
◆ verify()
Definition at line 955 of file LArOFCAlg.cxx.
959 float recAmpl=0, recTime=0;
960 for (
unsigned iSample=0;iSample<
m_nSamples;++iSample){
962 #ifdef LAROFCALG_DEBUGOUTPUT
963 ATH_MSG_VERBOSE(
"a["<<iSample<<
"]="<<vOFC_a[iSample] <<
" b["<<iSample<<
"]="<<vOFC_b[iSample]
964 <<
" Sample=" << aWave.getSample(tbin));
966 recAmpl += OFCa[iSample] * Shape[iSample];
967 recTime += OFCb[iSample] * Shape[iSample];
975 ATH_MSG_WARNING(
"Applying phase " <<
phase <<
" of " << ofcversion <<
" to original wave yields an Amplitude of "<< recAmpl
981 ATH_MSG_WARNING(
"Applying phase " <<
phase <<
" of " << ofcversion <<
" to original wave yields a time offset of " << recTime
◆ m_addOffset
float LArOFCAlg::m_addOffset |
|
private |
◆ m_allChannelData
◆ m_AutoCorrDecoder
◆ m_AutoCorrDecoderV2
◆ m_cablingKey
◆ m_cablingKeySC
◆ m_calo_dd_man
◆ m_caloMgrKey
Initial value:{ this
, "CaloDetDescrManager"
, "CaloDetDescrManager"
, "SG Key for CaloDetDescrManager in the Condition Store" }
Definition at line 55 of file LArOFCAlg.h.
◆ m_caloSuperCellMgrKey
Initial value:{ this
, "CaloSuperCellDetDescrManager"
, "CaloSuperCellDetDescrManager"
, "SG Key for CaloSuperCellDetDescrManager in the Condition Store" }
Definition at line 60 of file LArOFCAlg.h.
◆ m_computeV2
bool LArOFCAlg::m_computeV2 |
|
private |
◆ m_detStore
◆ m_dPhases
unsigned int LArOFCAlg::m_dPhases |
|
private |
◆ m_DSPConfig
◆ m_DSPConfigFolder
std::string LArOFCAlg::m_DSPConfigFolder |
|
private |
◆ m_dumpOFCfile
std::string LArOFCAlg::m_dumpOFCfile |
|
private |
◆ m_errAmpl
double LArOFCAlg::m_errAmpl |
|
private |
◆ m_errTime
double LArOFCAlg::m_errTime |
|
private |
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_fcal1Delta
const float LArOFCAlg::m_fcal1Delta ={0.0679600232979, -0.139479996869, 0.0679600232979, -0.139479996869, 0.0679600232979} |
|
staticprivate |
◆ m_fcal2Delta
const float LArOFCAlg::m_fcal2Delta ={-0.01589001104, -0.0740399733186, -0.01589001104, -0.0740399733186, -0.01589001104} |
|
staticprivate |
◆ m_fcal3Delta
const float LArOFCAlg::m_fcal3Delta ={0.0790199937765, 0.0952000226825, 0.0790199937765, 0.0952000226825, 0.0790199937765} |
|
staticprivate |
◆ m_fillShape
bool LArOFCAlg::m_fillShape |
|
private |
◆ m_forceShift
bool LArOFCAlg::m_forceShift |
|
private |
◆ m_groupingType
std::string LArOFCAlg::m_groupingType |
|
private |
◆ m_isSC
◆ m_keylist
std::vector<std::string> LArOFCAlg::m_keylist |
|
private |
◆ m_larPhysWaveBin
◆ m_larPhysWaveBinKey
std::string LArOFCAlg::m_larPhysWaveBinKey |
|
private |
◆ m_nDelays
unsigned int LArOFCAlg::m_nDelays |
|
private |
◆ m_normalize
bool LArOFCAlg::m_normalize |
|
private |
◆ m_nPhases
unsigned int LArOFCAlg::m_nPhases |
|
private |
◆ m_nPoints
unsigned int LArOFCAlg::m_nPoints |
|
private |
◆ m_nSamples
unsigned int LArOFCAlg::m_nSamples |
|
private |
◆ m_nThreads
int LArOFCAlg::m_nThreads |
|
private |
◆ m_ofcBinKey
std::string LArOFCAlg::m_ofcBinKey |
|
private |
◆ m_ofcKey
std::string LArOFCAlg::m_ofcKey |
|
private |
◆ m_ofcKeyV2
std::string LArOFCAlg::m_ofcKeyV2 |
|
private |
◆ m_onlineID
◆ m_readCaliWave
bool LArOFCAlg::m_readCaliWave |
|
private |
◆ m_readDSPConfig
bool LArOFCAlg::m_readDSPConfig |
|
private |
◆ m_shapeKey
std::string LArOFCAlg::m_shapeKey |
|
private |
◆ m_storeMaxPhase
bool LArOFCAlg::m_storeMaxPhase |
|
private |
◆ m_timeShift
bool LArOFCAlg::m_timeShift |
|
private |
◆ m_timeShiftByIndex
int LArOFCAlg::m_timeShiftByIndex |
|
private |
◆ m_useDelta
int LArOFCAlg::m_useDelta |
|
private |
◆ m_useDeltaV2
int LArOFCAlg::m_useDeltaV2 |
|
private |
◆ m_varHandleArraysDeclared
◆ m_verify
◆ m_vhka
◆ m_waveCnt_nc
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
std::string m_DSPConfigFolder
Eigen::VectorXd getDelta(std::vector< float > &samples, const HWIdentifier chid, unsigned nSamples) const
unsigned constexpr int nChannels
static void optFilt(const std::vector< float > &gWave_in, const std::vector< float > &gDerivWave_in, const Eigen::MatrixXd &autoCorrInv, std::vector< float > &OFCa, std::vector< float > &OFCb)
SG::ReadCondHandleKey< CaloSuperCellDetDescrManager > m_caloSuperCellMgrKey
StatusCode applyCorrections()
apply correction set
void set(const HWIdentifier &CellID, int gain, const std::vector< std::vector< float > > &vOFC_a, const std::vector< std::vector< float > > &vOFC_b, float timeOffset=0, float timeBinWidth=25./24.)
size_t getSize() const
number of time samples
unsigned getStart(const LArWave &theWave) const
unsigned getFlag() const
flag: ...
virtual const int & bin(const HWIdentifier &chid, const int &gain) const
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
StatusCode undoCorrections()
undo corrections that have been already applied
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
virtual bool isEMECIW(const HWIdentifier id) const =0
Declaration of const iterator.
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::string m_larPhysWaveBinKey
const double & getDt() const
delta time
int slot(const HWIdentifier id) const
Return the slot number of a hardware cell identifier: slot = [1,15] Slot-ID in top part of the crat...
LArWave translate(const LArWave &theWave, int nShift, double baseline=0.) const
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Identifier32 get_identifier32() const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
bool useDelta(const HWIdentifier chid, const int jobOFlag, const LArOnOffIdMapping *cabling) const
std::vector< SG::VarHandleKeyArray * > m_vhka
const coral::AttributeList & coralList() const
std::vector< size_t > vec
#define ATH_MSG_VERBOSE(x)
unsigned int getMax(const LArWave &theWave) const
return index of maximum sample
static const float m_fcal1Delta[5]
value_type get_compact() const
Get the compact id.
Liquid Argon Physics Wave Container.
Liquid Argon Cumulative Wave Container.
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual void setOwner(IDataHandleHolder *o)=0
static const float m_fcal3Delta[5]
ToolHandle< ILArAutoCorrDecoderTool > m_AutoCorrDecoder
void process(perChannelData_t &, const LArOnOffIdMapping *cabling) const
bool isFCALchannel(const HWIdentifier id) const
const double & getSample(const unsigned int i) const
Amplitude per time bin.
std::vector< perChannelData_t > m_allChannelData
bool verify(const HWIdentifier chid, const std::vector< float > &OFCa, const std::vector< float > &OFCb, const std::vector< float > &Shape, const char *ofcversion, const unsigned phase) const
virtual StatusCode sysInitialize() override
Override sysInitialize.
bool isEmpty() const
is LArWave uninitialized?
StatusCode initPhysWaveContainer(const LArOnOffIdMapping *cabling)
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
ConstConditionsMapIterator end(unsigned int gain) const
end of all channels for this gain
const LArOnlineID_Base * m_onlineID
virtual bool isHECchannel(const HWIdentifier id) const =0
const CaloDetDescrManager_Base * m_calo_dd_man
::StatusCode StatusCode
StatusCode definition for legacy code.
static const float m_fcal2Delta[5]
Default, invalid implementation of ClassID_traits.
static void printOFCVec(const std::vector< float > &vec, MsgStream &mLog)
An AttributeList represents a logical row of attributes in a metadata table. The name and type of eac...
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
ToolHandle< ILArAutoCorrDecoderTool > m_AutoCorrDecoderV2
int getTimeOffset() const
std::unique_ptr< LArDSPConfig > m_DSPConfig
StatusCode initCaliWaveContainer()
HWIdentifier feb_Id(int barrel_ec, int pos_neg, int feedthrough, int slot) const
Create feb_Id from fields.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
static void optFiltDelta(const std::vector< float > &gWave_in, const std::vector< float > &gDerivWave_in, const Eigen::MatrixXd &autoCorrInv, const Eigen::VectorXd &delta, std::vector< float > &vecOFCa, std::vector< float > &vecOFCb)
Helper for the Liquid Argon Calorimeter cell identifiers.
void set(const HWIdentifier &CellID, int gain, const std::vector< std::vector< float > > &vShape, const std::vector< std::vector< float > > &vShapeDer, float timeOffset=0, float timeBinWidth=25./24.)
const LArOFCBinComplete * m_larPhysWaveBin
StatusCode initialize(bool used=true)
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKeySC
std::string m_dumpOFCfile
DataObjIDColl m_extendedExtraObjects
LArCaliWaveContainer * m_waveCnt_nc
CaloCell_ID::CaloSample getSampling() const
cell sampling
virtual StatusCode initialize()
Initialization done after creation or read back - derived classes may augment the functionality.
#define ATH_MSG_WARNING(x)
ConstConditionsMapIterator begin(unsigned int gain) const
get iterator for all channels for a gain
LArWave derive_smooth(const LArWave &theWave) const
smoothed derivative
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
std::string m_groupingType
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
float eta() const
cell eta
AthAlgorithm()
Default constructor:
void dumpOFC(const std::string &output_file_name) const
void set(const HWIdentifier &chid, const int &gain, const int &bin)
std::string channel_name(const HWIdentifier id) const
Return a string corresponding to a feedthrough name given an identifier.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
bool correctionsApplied() const
Have corrections been applied?
std::vector< std::string > m_keylist