|
ATLAS Offline Software
|
#include <LArCaliWaveBuilderXtalk.h>
|
| LArCaliWaveBuilderXtalk (const std::string &name, ISvcLocator *pSvcLocator) |
|
| ~LArCaliWaveBuilderXtalk () |
|
StatusCode | initialize () |
|
StatusCode | execute () |
|
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 |
|
Definition at line 68 of file LArCaliWaveBuilderXtalk.h.
◆ StoreGateSvc_t
◆ WaveContainer
◆ WaveMap
◆ LArCaliWaveBuilderXtalk()
LArCaliWaveBuilderXtalk::LArCaliWaveBuilderXtalk |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ ~LArCaliWaveBuilderXtalk()
LArCaliWaveBuilderXtalk::~LArCaliWaveBuilderXtalk |
( |
| ) |
|
|
default |
◆ 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 LArCaliWaveBuilderXtalk::execute |
( |
| ) |
|
Definition at line 357 of file LArCaliWaveBuilderXtalk.cxx.
364 return StatusCode::FAILURE;
371 return StatusCode::FAILURE;
384 ATH_MSG_ERROR (
"Key list is empty! No containers to process!" );
385 return StatusCode::FAILURE;
390 std::vector<std::string>::const_iterator key_it=
m_keylist.begin();
391 std::vector<std::string>::const_iterator key_it_e=
m_keylist.end();
393 for (;key_it!=key_it_e; ++key_it) {
396 if (
sc.isFailure()) {
397 ATH_MSG_WARNING (
"Cannot read LArAccumulatedCalibDigitContainer from StoreGate! key=" << *key_it );
405 ATH_MSG_DEBUG (
"LArAccumulatedCalibDigitContainer with key=" << *key_it <<
" is empty " );
409 const float delayScale = larAccumulatedCalibDigitContainer->
getDelayScale();
410 const float deltaDelay = 25*
ns/(delayScale*
m_NStep);
413 bool relevantForXtalk =
false;
416 std::vector<int> nbOfEventSlot;
417 nbOfEventSlot.resize(15);
419 std::vector<int> nbOfEventPart;
420 nbOfEventPart.resize(8);
428 const std::vector<HWIdentifier>& calibLine = clCont->calibSlotLine((*it)->hardwareID());
429 if (!calibLine.empty()) {
433 relevantForXtalk =
true;
440 if ((*it)->isPulsed()){
445 nbOfEventSlot[iSlot-1]++;
447 if (ipos_neg==1)
sideA++;
451 if (iSlot==1) nbOfEventPart[4*ibarrel_ec]++;
452 else if (iSlot < 9 - ibarrel_ec) nbOfEventPart[4*ibarrel_ec + 1]++;
453 else if (iSlot > 10 - ibarrel_ec) nbOfEventPart[4*ibarrel_ec + 2]++;
454 else nbOfEventPart[4*ibarrel_ec + 3]++;
460 while ((!relevantForXtalk) && (
it != it_end));
473 msg() <<
MSG::DEBUG <<
"Entries : EMB PS/F/M/B=" << nbOfEventPart[0] <<
"/" << nbOfEventPart[1] <<
"/" << nbOfEventPart[2] <<
"/" << nbOfEventPart[3];
474 msg() <<
MSG::DEBUG <<
" - EMEC Std PS/F/M/B=" << nbOfEventPart[4] <<
"/" << nbOfEventPart[5] <<
"/" << nbOfEventPart[6] <<
"/" << nbOfEventPart[7];
476 if (!relevantForXtalk)
483 if (relevantForXtalk){
484 bool hasbeenprinted =
false;
485 for (
it=larAccumulatedCalibDigitContainer->
begin();
it!=it_end; ++
it) {
493 if (
m_isInnerWheel) {
if (iFT!=3 && iFT!=10 && iFT!=16 && iFT!=22)
continue;}
494 else {
if (iFT!=2 && iFT!=9 && iFT!=15 && iFT!=21)
continue;}
495 else if (iFT==2 || iFT==9 || iFT==15 || iFT==21 || iFT==3 || iFT==10 || iFT==16 || iFT==22 || iFT==6)
502 if (!hasbeenprinted){
503 ATH_MSG_DEBUG (
"This event is relevant for the studied partition" );
504 hasbeenprinted =
true;
511 return StatusCode::FAILURE;
516 std::vector<double> samplesum;
517 std::vector < uint64_t >::const_iterator samplesum_it=(*it)->sampleSum().begin();
518 std::vector < uint64_t >::const_iterator samplesum_it_e=(*it)->sampleSum().end();
521 samplesum.push_back((
double)(*samplesum_it));
525 while ( (samplesum_it!=samplesum_it_e) && (nSample!=0) );
529 std::vector<double> sample2sum;
530 std::vector < uint64_t >::const_iterator sample2sum_it=(*it)->sample2Sum().begin();
531 std::vector < uint64_t >::const_iterator sample2sum_it_e=(*it)->sample2Sum().end();
534 sample2sum.push_back((
double)(*sample2sum_it));
538 while ( (sample2sum_it!=sample2sum_it_e) && (nSample!=0) );
543 if ( itm == waveMap.end() ) {
551 itm = (waveMap.insert(WaveMap::value_type((*it)->DAC(), wave))).
first;
554 (*itm).second.addAccumulatedEvent((
int)roundf((*it)->delay()/deltaDelay),
m_NStep,
555 samplesum, sample2sum, (*it)->nTriggers());
561 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 LArCaliWaveBuilderXtalk::finalize |
( |
| ) |
|
|
inline |
◆ initialize()
StatusCode LArCaliWaveBuilderXtalk::initialize |
( |
| ) |
|
Definition at line 73 of file LArCaliWaveBuilderXtalk.cxx.
78 log << MSG::INFO <<
"Initialize LArCaliWaveBuilderXtalk" <<
endmsg;
98 emecSpecialRegion_test.ToLower();
99 if (emecSpecialRegion_test.Contains(
"inner"))
103 if (! emecSpecialRegion_test.Contains(
"outer"))
104 ATH_MSG_WARNING (
"Can't read EMEC special region (Inner/Outer Wheel) - set SpecialRegion to OuterWheel." );
165 return StatusCode::SUCCESS;
◆ initializeCabling()
Definition at line 169 of file LArCaliWaveBuilderXtalk.cxx.
201 const std::vector<HWIdentifier>& calibLine = clCont->
calibSlotLine(theConsidChannel);
204 ATH_MSG_DEBUG (
"Number of associated calib line " << calibLine.size() );
205 if (!calibLine.empty()) {
224 const std::vector<HWIdentifier>& calibLine = clCont->
calibSlotLine(theConsidChannel);
226 if (!calibLine.empty()) {
241 const std::vector<HWIdentifier>& calibLine = clCont->
calibSlotLine(theConsidChannel);
243 if (!calibLine.empty()) {
260 ATH_MSG_WARNING (
"There is no StripSingle pattern for EMEC inner wheel. You should try another pattern (MiddleSingle[1-4] or BackSingle[1-4])." );
261 else if(
m_calibPattern.find(
"StripSingle",0) != std::string::npos ){
272 const std::vector<HWIdentifier>& calibLine = clCont->
calibSlotLine(theConsidChannel);
275 ATH_MSG_DEBUG (
"Number of associated calib line " << calibLine.size() );
276 if (!calibLine.empty()) {
304 const std::vector<HWIdentifier>& calibLine = clCont->
calibSlotLine(theConsidChannel);
307 ATH_MSG_DEBUG (
"Number of associated calib line " << calibLine.size() );
308 if (!calibLine.empty()) {
321 int pulsedCell3 = 33;
322 int pulsedCell4 = 34;
343 const std::vector<HWIdentifier>& calibLine = clCont->
calibSlotLine(theConsidChannel);
345 if (!calibLine.empty()) {
353 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()
◆ 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()
◆ stop()
StatusCode LArCaliWaveBuilderXtalk::stop |
( |
| ) |
|
get iterator for all channels for a gain
Definition at line 565 of file LArCaliWaveBuilderXtalk.cxx.
569 auto caliWaveContainer = std::make_unique<LArCaliWaveContainer>();
572 ATH_MSG_DEBUG (
"Set groupingType for LArCaliWaveContainer object" );
574 ATH_CHECK( caliWaveContainer->initialize() );
596 return StatusCode::FAILURE;
614 for (; cell_it!=cell_it_e; ++cell_it) {
624 if (!
cabling->isOnlineConnected(hwId))
continue;
626 const WaveMap& waveMap = (*cell_it);
627 if (waveMap.empty()) {
628 ATH_MSG_INFO (
"Empty accumulated wave. Last id: " << MSG::hex
629 << lastId << MSG::dec );
639 if (
m_isInnerWheel) {
if (iFT!=3 && iFT!=10 && iFT!=16 && iFT!=22)
continue;}
640 else {
if (iFT!=2 && iFT!=9 && iFT!=15 && iFT!=21)
continue;}
641 else if (iFT==2 || iFT==9 || iFT==15 || iFT==21 || iFT==3 || iFT==10 || iFT==16 || iFT==22 || iFT==6)
648 std::map<int, LArCaliWave>::const_iterator dac_it = cell_it->begin();
649 std::map<int, LArCaliWave>::const_iterator dac_it_e = cell_it->end();
651 for (; dac_it != dac_it_e; ++dac_it) {
658 ATH_MSG_INFO (
"Absolute ADC saturation at DAC = " << thisWave.
getDAC() <<
" ... skip!" );
662 LArCaliWave newWave( ((thisWave)+(-pedAve)).getWave() ,
670 dacWaves.push_back(newWave);
682 ATH_MSG_INFO (
"Summary : Number of cells with a CaliWave reconstructed : " << NCaliWave );
683 ATH_MSG_INFO (
"Size of LAr calibration waves container : " << caliWaveContainer->size() );
688 ATH_MSG_INFO (
"LArCaliWaveBuilderXtalk has finished." );
689 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()
◆ m_ADCsatur
int LArCaliWaveBuilderXtalk::m_ADCsatur |
|
private |
◆ m_barrelEndcap
int LArCaliWaveBuilderXtalk::m_barrelEndcap |
|
private |
◆ m_cablingKey
◆ m_CalibLineHW
std::vector<HWIdentifier> LArCaliWaveBuilderXtalk::m_CalibLineHW |
|
private |
◆ m_calibPattern
std::string LArCaliWaveBuilderXtalk::m_calibPattern |
|
private |
◆ m_CLKey
◆ m_cutOnSample
int LArCaliWaveBuilderXtalk::m_cutOnSample |
|
private |
◆ m_detStore
◆ m_dt
float LArCaliWaveBuilderXtalk::m_dt |
|
private |
◆ m_emecSpecialRegion
std::string LArCaliWaveBuilderXtalk::m_emecSpecialRegion |
|
private |
◆ m_event_counter
unsigned LArCaliWaveBuilderXtalk::m_event_counter |
|
private |
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_feedthroughNumber
int LArCaliWaveBuilderXtalk::m_feedthroughNumber |
|
private |
◆ m_groupingType
std::string LArCaliWaveBuilderXtalk::m_groupingType |
|
private |
◆ m_isInnerWheel
bool LArCaliWaveBuilderXtalk::m_isInnerWheel |
|
private |
◆ m_isSpecialCrate
bool LArCaliWaveBuilderXtalk::m_isSpecialCrate |
|
private |
◆ m_keylist
std::vector<std::string> LArCaliWaveBuilderXtalk::m_keylist |
|
private |
◆ m_keylistproperty
std::vector<std::string> LArCaliWaveBuilderXtalk::m_keylistproperty |
|
private |
◆ m_keyoutput
std::string LArCaliWaveBuilderXtalk::m_keyoutput |
|
private |
◆ m_NStep
int LArCaliWaveBuilderXtalk::m_NStep |
|
private |
◆ m_onlineHelper
◆ m_partition
std::string LArCaliWaveBuilderXtalk::m_partition |
|
private |
◆ m_posOrNeg
int LArCaliWaveBuilderXtalk::m_posOrNeg |
|
private |
◆ m_SamplingPeriod
float LArCaliWaveBuilderXtalk::m_SamplingPeriod |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
◆ m_waves
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
JetConstituentVector::iterator iterator
std::string m_emecSpecialRegion
Const iterator class for DataVector/DataList.
std::string find(const std::string &s)
return a remapped string
unsigned getFlag() const
flag: ...
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
const std::vector< HWIdentifier > & calibSlotLine(const HWIdentifier id) const
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...
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
int getDAC() const
DAC value.
std::vector< std::string > m_keylistproperty
const std::string & key() const
Return the StoreGate ID for the referenced object.
unsigned int getMax(const LArWave &theWave) const
return index of maximum sample
int barrel_ec(const HWIdentifier id) const
Return the position barrel or endcap of a hardware cell identifier: barrel_ec = [0,...
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual void setOwner(IDataHandleHolder *o)=0
int getIsPulsedInt() const
isPulsed value
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
const double & getSample(const unsigned int i) const
Amplitude per time bin.
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysInitialize() override
Override sysInitialize.
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
msgSvc
Provide convenience handles for various services.
ConstConditionsMapIterator end(unsigned int gain) const
end of all channels for this gain
::StatusCode StatusCode
StatusCode definition for legacy code.
ConstReference get(const HWIdentifier id, unsigned int gain=0) const
get data with online identifier
HWIdentifier channel_Id(int barrel_ec, int pos_neg, int feedthrough, int slot, int channel) const
create channel identifier from fields
int pos_neg(const HWIdentifier id) const
Return the side of a hardware cell identifier pos_neg = [0,1] positive-side or negative-side Barrel...
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
SG::ReadCondHandleKey< LArCalibLineMapping > m_CLKey
ConditionsMap::iterator ConditionsMapIterator
std::vector< HWIdentifier > m_CalibLineHW
unsigned constexpr int sideA
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
StatusCode initializeCabling(const LArOnOffIdMapping *cabling, const LArCalibLineMapping *clCont)
StatusCode initialize(bool used=true)
bool isEmEndcapSpecialOnline(const HWIdentifier id) const
std::map< int, LArCaliWave > WaveMap
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
DataObjIDColl m_extendedExtraObjects
int feedthrough(const HWIdentifier id) const
Return the feedthrough of a hardware cell identifier : feedthrough = [0,31] Barrel - A/C side or H/...
std::string m_calibPattern
std::string show_to_string(Identifier id, const IdContext *context=0, char sep='.') const
or provide the printout in string form
double getDelayScale() const
get the delay Scale
virtual StatusCode initialize()
Initialization done after creation or read back - derived classes may augment the functionality.
#define ATH_MSG_WARNING(x)
std::string m_groupingType
unsigned constexpr int sideC
ConstConditionsMapIterator begin(unsigned int gain) const
get iterator for all channels for a gain
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
AthAlgorithm()
Default constructor:
std::vector< std::string > m_keylist
Container class for LArAccumulatedCalibDigit.
const LArOnlineID * m_onlineHelper
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
const std::vector< double > & getErrors() const
error vector
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
const std::vector< int > & getTriggers() const
trigger vector