|
ATLAS Offline Software
|
Retrieves all Calo
Cluster objects
.
More...
#include <CaloMBTSRetriever.h>
|
| CaloMBTSRetriever (const std::string &type, const std::string &name, const IInterface *parent) |
| Standard Constructor. More...
|
|
virtual StatusCode | retrieve (ToolHandle< IFormatTool > &FormatTool) |
| Retrieve all the data. More...
|
|
const DataMap | getMBTSData (const TileCellContainer *tileMBTSCellContainer) |
| Retrieve MBTS cell location and details. More...
|
|
virtual std::string | dataTypeName () const |
| Return the name of the data type. More...
|
|
StatusCode | initialize () |
| Default AthAlgTool methods. 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 | 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 |
|
Retrieves all Calo
Cluster objects
.
- Properties
- StoreGateKeyMBTS: default is 'MBTSContainer'. Don't change.
- MBTSThreshold: default is 0.05 (geV)
- RetrieveMBTS: activate retriever, default is true
- DoMBTSDigits: write MBTS digits (ADC), default is false
- Retrieved Data
- location in phi and eta
- numCells: number of cells in each cluster
- cells: identifier and adc counts of each cell
Definition at line 47 of file CaloMBTSRetriever.h.
◆ StoreGateSvc_t
◆ CaloMBTSRetriever()
JiveXML::CaloMBTSRetriever::CaloMBTSRetriever |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
Standard Constructor.
This is the standard AthAlgTool constructor.
- Parameters
-
type | AlgTool type name |
name | AlgTool instance name |
parent | AlgTools parent owning this tool |
Definition at line 29 of file CaloMBTSRetriever.cxx.
34 declareInterface<IDataRetriever>(
this);
43 "Input collection to retrieve Tile digits, used when doTileDigit is True");
49 "Input collection to retrieve Tile raw channels, used when DoMBTSCellDetails is True.");
◆ dataTypeName()
virtual std::string JiveXML::CaloMBTSRetriever::dataTypeName |
( |
| ) |
const |
|
inlinevirtual |
◆ 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
◆ getMBTSData()
Retrieve MBTS cell location and details.
- Parameters
-
FormatTool | the tool that will create formated output from the DataMap |
< Unit for TileRawChannels (ADC, pCb, etc.)
Definition at line 103 of file CaloMBTSRetriever.cxx.
113 DataVect sampling; sampling.reserve(tileMBTSCellContainer->
size());
114 DataVect timeVec; timeVec.reserve(tileMBTSCellContainer->
size());
115 DataVect quality; quality.reserve(tileMBTSCellContainer->
size());
119 DataVect cellPedestal; cellPedestal.reserve(tileMBTSCellContainer->
size());
120 DataVect cellRawAmplitude; cellRawAmplitude.reserve(tileMBTSCellContainer->
size());
121 DataVect cellRawTime; cellRawTime.reserve(tileMBTSCellContainer->
size());
122 DataVect adcCounts; adcCounts.reserve(tileMBTSCellContainer->
size() * 10);
124 std::string adcCountsStr=
"adcCounts multiple=\"0\"";
130 bool offlineRch =
false;
133 ATH_MSG_ERROR(
"in getMBTSData(), Could not retrieve m_tileTBID" );
137 ATH_MSG_ERROR(
"in getMBTSData(), Could not retrieve TileHWID" );
141 ATH_MSG_ERROR(
"in getMBTSData(), Could not retrieve TileInfo" );
151 RChUnit = RawChannelCnt->
get_unit();
171 double energyMeV = 0.;
173 double amplitude = 0.;
174 unsigned long int cellid;
175 std::map<unsigned long int,double> theMbtspedestal;
176 std::map<unsigned long int,double> theMbtsrawamp;
177 std::map<unsigned long int,double> theMbtsrawtime;
178 std::map<unsigned long int,std::vector<float> > theMbtsdigit;
179 std::string myCellRawTimeStr =
"0.";
186 for (
const auto rawChannel : *RawChannelCnt) {
187 for (
const auto cell : *rawChannel) {
191 cellid =
id.get_identifier32().get_compact();
193 int adc = tileHWID->
adc(hwid);
196 int ros = tileHWID->
ros(hwid);
199 amplitude =
cell->amplitude();
206 theMbtspedestal.insert(std::make_pair( cellid,
cell->pedestal() ) );
207 theMbtsrawamp.insert(std::make_pair( cellid, amplitude ));
208 theMbtsrawtime.insert(std::make_pair( cellid,
cell->time(
cell->uncorrTime()) ));
223 for (
const auto digitChannel : *tileDigits) {
225 for (
const auto cell : *digitChannel) {
231 cellid =
id.get_identifier32().get_compact();
233 nTileSamples =
cell->NtimeSamples();
234 std::vector<float> tileSamples =
cell->samples();
235 theMbtsdigit.insert(std::make_pair( cellid, tileSamples));
244 for (
const auto cell : *tileMBTSCellContainer) {
253 energyMeV =
cell->energy();
283 cellPedestal.push_back(
DataType( theMbtspedestal[
id.get_identifier32().get_compact()] ));
284 cellRawAmplitude.push_back(
DataType( theMbtsrawamp[
id.get_identifier32().get_compact()] ));
285 myCellRawTimeStr =
DataType(theMbtsrawtime[
id.get_identifier32().get_compact()]).toString();
287 if ( myCellRawTimeStr.find(
'n') == 1 ) myCellRawTimeStr=
"0.";
288 cellRawTime.push_back( myCellRawTimeStr );
297 if (gain<0 || gain>1) {
298 cellRawAmplitude.push_back(
DataType(0));
300 cellPedestal.push_back(
DataType(0));
305 int adc = tileHWID->
adc(hwid);
308 int ros = tileHWID->
ros(hwid);
318 if ((
qual != 0 || amp != 0.0) && (fabs(
time) < maxTime &&
time != 0.0)) {
322 cellRawAmplitude.push_back(
DataType(amp));
324 cellPedestal.push_back(
DataType(0));
331 if ( !theMbtsdigit[
id.get_identifier32().get_compact()].
empty() ) {
332 for (
int i=0;
i<nTileSamples;
i++) {
333 adcCountsStr=
"adcCounts multiple=\""+
DataType(nTileSamples).toString()+
"\"";
334 adcCounts.push_back(
DataType(
int(theMbtsdigit[
id.get_identifier32().get_compact()][
i]) ));
338 for (
int i=0;
i<nTileSamples;
i++) {
339 adcCountsStr=
"adcCounts multiple=\""+
DataType(nTileSamples).toString()+
"\"";
347 <<
", energy MeV pC: " << energyMeV );
355 if (!theMbtspedestal.empty()) theMbtspedestal.clear();
356 if (!theMbtsrawamp.empty() ) theMbtsrawamp.clear();
357 if (!theMbtsrawtime.empty()) theMbtsrawtime.clear();
365 DataMap[
"sampling"] = std::move(sampling);
366 DataMap[
"time"] = std::move(timeVec);
367 DataMap[
"quality"] = std::move(quality);
371 DataMap[
"cellPedestal"] = std::move(cellPedestal);
372 DataMap[
"cellRawAmplitude"] = std::move(cellRawAmplitude);
373 DataMap[
"cellRawTime"] = std::move(cellRawTime);
374 DataMap[adcCountsStr] = std::move(adcCounts);
◆ initialize()
StatusCode JiveXML::CaloMBTSRetriever::initialize |
( |
| ) |
|
◆ 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()
const InterfaceID & JiveXML::IDataRetriever::interfaceID |
( |
| ) |
|
|
inlinestaticinherited |
Return the interface identifier.
Definition at line 40 of file IDataRetriever.h.
40 {
return IID_IDataRetriever; }
◆ 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()
◆ retrieve()
StatusCode JiveXML::CaloMBTSRetriever::retrieve |
( |
ToolHandle< IFormatTool > & |
FormatTool | ) |
|
|
virtual |
◆ 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_detStore
◆ m_evtStore
◆ m_mbts
bool JiveXML::CaloMBTSRetriever::m_mbts |
|
private |
◆ m_mbtsCellDetails
bool JiveXML::CaloMBTSRetriever::m_mbtsCellDetails |
|
private |
◆ m_mbtsdigit
bool JiveXML::CaloMBTSRetriever::m_mbtsdigit |
|
private |
◆ m_mbtsThreshold
double JiveXML::CaloMBTSRetriever::m_mbtsThreshold |
|
private |
◆ m_sgKeyMBTS
◆ m_sgKeyTileDigits
◆ m_sgKeyTileRawChannel
◆ m_tileTBID
◆ m_tileToolEmscale
Initial value:{this,
"TileCondToolEmscale", "TileCondToolEmscale", "Tile EM scale calibration tool"}
Definition at line 69 of file CaloMBTSRetriever.h.
◆ m_tileToolTiming
Initial value:{this,
"TileCondToolTiming", "TileCondToolTiming", "Tile timing tool"}
Definition at line 66 of file CaloMBTSRetriever.h.
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
const TileTBID * m_tileTBID
char data[hepevt_bytes_allocation_ATLAS]
Scalar phi() const
phi method
bool is_tiletb(const Identifier &id) const
Test ID if it is TileTBID.
static const TileCablingService * getInstance()
get pointer to service instance
int NdigitSamples() const
Returns the number of sammples (digits) per event.
Scalar eta() const
pseudorapidity method
SG::ReadHandleKey< TileDigitsContainer > m_sgKeyTileDigits
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
std::vector< DataType > DataVect
Defines a map with a key and a vector of DataType objects e.g.
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
int type(const Identifier &id) const
extract type field from TileTB identifier
std::map< std::string, DataVect > DataMap
int module(const Identifier &id) const
extract module field from TileTB identifier
int channel(const HWIdentifier &id) const
extract channel field from HW identifier
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual void setOwner(IDataHandleHolder *o)=0
int ros(const HWIdentifier &id) const
extract ros field from HW identifier
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Helper class for TileCal online (hardware) identifiers.
int adc(const HWIdentifier &id) const
extract adc field from HW identifier
virtual std::string dataTypeName() const
Return the name of the data type.
ToolHandle< TileCondToolEmscale > m_tileToolEmscale
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
int channel(const Identifier &id) const
extract channel field from TileTB identifier
virtual bool isValid() override final
Can the handle be successfully dereferenced?
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
virtual StatusCode retrieve(ToolHandle< IFormatTool > &FormatTool)
Retrieve all the data.
SG::ReadHandleKey< TileCellContainer > m_sgKeyMBTS
properties:
ToolHandle< TileCondToolTiming > m_tileToolTiming
HWIdentifier adc_id(int ros, int drawer, int channel, int adc) const
adc HWIdentifer
SG::ReadHandleKey< TileRawChannelContainer > m_sgKeyTileRawChannel
const DataMap getMBTSData(const TileCellContainer *tileMBTSCellContainer)
Retrieve MBTS cell location and details.
int drawer(const HWIdentifier &id) const
extract drawer field from HW identifier
def time(flags, cells_name, *args, **kw)
#define ATH_MSG_WARNING(x)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
static unsigned int getDrawerIdx(unsigned int ros, unsigned int drawer)
Returns a drawer hash.
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>