|
ATLAS Offline Software
|
#include <TileFCSmStepToTileHitVec.h>
|
| TileFCSmStepToTileHitVec (const std::string &name, ISvcLocator *pSvcLocator) |
|
virtual | ~TileFCSmStepToTileHitVec () |
|
StatusCode | initialize () |
|
StatusCode | execute () |
|
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 45 of file TileFCSmStepToTileHitVec.h.
◆ StoreGateSvc_t
◆ TileFCSmStepToTileHitVec()
TileFCSmStepToTileHitVec::TileFCSmStepToTileHitVec |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ ~TileFCSmStepToTileHitVec()
TileFCSmStepToTileHitVec::~TileFCSmStepToTileHitVec |
( |
| ) |
|
|
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]
◆ execute()
StatusCode TileFCSmStepToTileHitVec::execute |
( |
| ) |
|
Definition at line 116 of file TileFCSmStepToTileHitVec.cxx.
126 const double tile_radius[13] = { 2300.,
133 const double M_PI_32 =
M_PI/32.;
134 const double M_PI_64 =
M_PI/64.;
135 const double TAN_PI_64 =
tan(
M_PI/64.);
138 const double size_correction = 2.75 + 1.5/2.;
141 std::unique_ptr<TileHitVector> FCS_hits = std::make_unique<TileHitVector>();
152 double ene = stepInfo->energy();
153 double time = stepInfo->time();
166 <<
" nHit=" << nHit <<
" energy=" << ene <<
" time=" <<
time);
172 <<
" nHit=" << nHit <<
" energy=" << ene <<
" time=" <<
time);
182 bool Ecell = (
sample == 3);
186 if ( Ecell || spC10 ) {
192 <<
" nHit=" << nHit <<
" energy=" << ene );
198 "Iterating over Steps: extra E/C10 hit with id " <<
m_tileID->
to_string(hit_id,-1)
199 <<
" nHit=" << nHit <<
" energy=" << ene );
204 double x = stepInfo->x();
205 double y = stepInfo->y();
210 double phi_module=(
module + 0.5) * M_PI_32;
211 double phi_hit = atan2(
y,
x);
212 if (phi_hit<0) phi_hit += 2*
M_PI;
213 double dphi = phi_hit - phi_module;
214 if (dphi < -M_PI_64 || dphi > M_PI_64) {
216 <<
" x " <<
x <<
" y " <<
y
217 <<
" phi_module " << phi_module <<
" phi_hit " << phi_hit
218 <<
" dphi " << dphi );
220 dphi -= trunc(dphi/M_PI_64) * M_PI_64;
224 double radius_corrected =
radius *
cos(dphi);
227 double halfYLocal = radius_corrected * TAN_PI_64 - size_correction;
228 if (fabs(yLocal) > halfYLocal) {
230 <<
" x " <<
x <<
" y " <<
y
231 <<
" radius_corr " << radius_corrected
232 <<
" yLocal " << yLocal <<
" halfYlocal_corr " << halfYLocal
233 <<
" delta " << fabs(yLocal) - halfYLocal );
235 yLocal = copysign(halfYLocal,yLocal);
239 int tile_ind = std::lower_bound (tile_radius, tile_radius+12,radius_corrected)-tile_radius-1;
240 if (tile_ind < 0 || tile_ind > 10 ) {
242 <<
" x " <<
x <<
" y " <<
y
243 <<
" radius " <<
radius <<
" corrected " << radius_corrected
244 <<
" tile_index " << tile_ind );
246 if (tile_ind<0) tile_ind = 0;
247 if (tile_ind>10) tile_ind = 10;
253 m_calc->pmtEdepFromFCS_StepInfo(hitData, ene, yLocal, halfYLocal, zLocal,
m_uShape);
257 for (
int pm=0; pm<2; ++pm) {
264 const double ref_ind_tile = 1.59;
266 if (
pmt) tim -= 2 * yLocal * inv_speed;
267 else tim += 2 * yLocal * inv_speed;
276 <<
" nHit=" << nHit <<
" pmt " <<
pmt <<
" energy=" << edep[pm] <<
" time="
277 <<
time <<
" + " << tim-
time <<
" = " << tim);
283 <<
" nHit=" << nHit <<
" pmt " <<
pmt <<
" energy=" << edep[pm] <<
" time="
284 <<
time <<
" + " << tim-
time <<
" = " << tim);
298 ATH_MSG_DEBUG(
"End of Iterating over Steps: nHit=" << nHit <<
" newHits=" << newHits <<
" Etot=" << Etot );
304 std::vector<TileHit*>::const_iterator curr =
m_allHits.begin();
305 std::vector<TileHit*>::const_iterator iend =
m_allHits.end();
306 for ( ; curr != iend; ++curr) {
312 "Iterating over Hits: nHit=" << nHit <<
" size="
313 << pHit->
size() <<
" energy=" << pHit->
energy() );
316 for (
int ii=0; ii<pHit->
size(); ++ii ) Etot += pHit->
energy(ii);
317 sum_size += pHit->
size();
324 ATH_MSG_DEBUG(
"Execution completed, nHit=" << nHit <<
" sum_size=" << sum_size <<
" Etot=" << Etot );
327 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 TileFCSmStepToTileHitVec::finalize |
( |
| ) |
|
◆ getUshapeFromGM()
int TileFCSmStepToTileHitVec::getUshapeFromGM |
( |
| ) |
const |
|
private |
◆ initialize()
StatusCode TileFCSmStepToTileHitVec::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.
◆ 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()
◆ 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_allHits
std::vector<TileHit*> TileFCSmStepToTileHitVec::m_allHits |
|
private |
◆ m_calc
◆ m_deltaT
float TileFCSmStepToTileHitVec::m_deltaT |
|
private |
◆ m_detStore
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_FCS_StepInfo
std::string TileFCSmStepToTileHitVec::m_FCS_StepInfo |
|
private |
◆ m_geoModSvc
◆ m_hitVec
std::string TileFCSmStepToTileHitVec::m_hitVec |
|
private |
◆ m_infoName
std::string TileFCSmStepToTileHitVec::m_infoName |
|
private |
◆ m_tileID
◆ m_tileInfo
◆ m_tileMgr
◆ m_uShape
int TileFCSmStepToTileHitVec::m_uShape |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
const TileDetDescrManager * m_tileMgr
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
int pmt(const Identifier &id) const
int side(const Identifier &id) const
ServiceHandle< ITileCalculator > m_calc
int sample(const Identifier &id) const
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
#define ATH_MSG_VERBOSE(x)
Variables to identify Hit objects.
int size(void) const
Return length of energy/time vectors
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual void setOwner(IDataHandleHolder *o)=0
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysInitialize() override
Override sysInitialize.
int module(const Identifier &id) const
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
::StatusCode StatusCode
StatusCode definition for legacy code.
#define CHECK(...)
Evaluate an expression and check for errors.
bool is_tile(Identifier id) const
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
ServiceHandle< IGeoModelSvc > m_geoModSvc
virtual int get_hash(const Identifier &id, IdentifierHash &hash_id, const IdContext *context=0) const
create hash id from compact id (return == 0 for OK)
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
std::vector< TileHit * > m_allHits
size_type pmt_hash_max(void) const
DataObjIDColl m_extendedExtraObjects
const TileInfo * m_tileInfo
def time(flags, cells_name, *args, **kw)
std::string to_string(const Identifier &id, int level=0) const
#define ATH_MSG_WARNING(x)
float energy(int ind=0) const
Return energy of ind-th sub-hit
Identifier pmt_id(const Identifier &any_id) const
std::string m_FCS_StepInfo
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
IdContext pmt_context(void) const
id for PMTs
Class for collection of StepInfo class (G4 hits) copied and modified version to ISF.
AthAlgorithm()
Default constructor:
int getUshapeFromGM() const
int section(const Identifier &id) const
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Identifier cell_id(const Identifier &any_id) const
This class saves the "context" of an expanded identifier (ExpandedIdentifier) for compact or hash ver...
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
void push_back(const T &t)