 |
ATLAS Offline Software
|
#include <LArTBH6BeamInfo.h>
|
| LArTBH6BeamInfo (const std::string &name, ISvcLocator *pSvcLocator) |
|
virtual | ~LArTBH6BeamInfo ()=default |
|
virtual StatusCode | initialize () override |
|
virtual StatusCode | execute () override |
|
virtual StatusCode | finalize () override |
|
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, V, H > &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 |
|
|
bool | fitVect (const dVect &vec_x, const dVect &vec_xz, const dVect &vec_ex, double &a1, double &a2, double &chi2, dVect &residual) |
| Fit data to the function u = a1 + a2*w. More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKey> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyArrayType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleType &) |
| specialization for handling Gaudi::Property<SG::VarHandleBase> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &t, const SG::NotHandleType &) |
| specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
|
|
Definition at line 21 of file LArTBH6BeamInfo.h.
◆ dVect
◆ StoreGateSvc_t
◆ LArTBH6BeamInfo()
LArTBH6BeamInfo::LArTBH6BeamInfo |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ ~LArTBH6BeamInfo()
virtual LArTBH6BeamInfo::~LArTBH6BeamInfo |
( |
| ) |
|
|
virtualdefault |
◆ 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 LArTBH6BeamInfo::execute |
( |
| ) |
|
|
overridevirtual |
Definition at line 46 of file LArTBH6BeamInfo.cxx.
49 CLHEP::Hep3Vector
pos;
69 if(hit->GetSC() > 0)
continue;
71 if(hit->GetTrackID() != 1)
continue;
73 if(hit->GetPcode() !=
m_pcode)
continue;
77 v_x.push_back(
pos.x());
78 v_xz.push_back(
pos.z()+21600.*
mm);
81 v_y.push_back(
pos.y());
82 v_yz.push_back(
pos.z()+21600.*
mm);
89 if(v_x.size() < 2 || v_y.size() < 2) {
90 ATH_MSG_DEBUG (
"Could not fit, setting zero. "<<v_x.size()<<
"/"<<v_y.size() );
91 m_track = std::make_unique<TBTrack>(0,0);
103 return StatusCode::FAILURE;
108 std::vector<double> residual_x, residual_y;
115 check =
fitVect(v_x, v_xz, v_ex, a1_x, a2_x, chi2_x, residual_x);
119 return StatusCode::FAILURE;
122 check =
fitVect(v_y, v_yz, v_ey, a1_y, a2_y, chi2_y, residual_y);
125 return StatusCode::FAILURE;
133 m_track = std::make_unique<TBTrack>(v_x.size(), v_y.size());
141 for(
size_t i = 0;
i < v_x.size(); ++
i){
146 for(
size_t i = 0;
i < v_y.size(); ++
i){
162 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 LArTBH6BeamInfo::finalize |
( |
| ) |
|
|
overridevirtual |
◆ fitVect()
Fit data to the function u = a1 + a2*w.
and determines intercept, slope, residual for each BPC, and chi2 on fit
Definition at line 176 of file LArTBH6BeamInfo.cxx.
201 int hitNum =
vec.size();
202 for(
i = 0;
i < hitNum; ++
i){
208 s += 1 / (vec_e[
i]*vec_e[
i]);
209 su +=
vec[
i] / (vec_e[
i]*vec_e[
i]);
210 sww += vec_z[
i]*vec_z[
i] / (vec_e[
i]*vec_e[
i]);
211 sw += vec_z[
i] / (vec_e[
i]*vec_e[
i]);
212 suw +=
vec[
i]*vec_z[
i] / (vec_e[
i]*vec_e[
i]);
215 const double denom = (
s*sww-sw*sw);
221 const double inv_denom = 1. /
denom;
222 a1 = (su*sww - sw*suw) * inv_denom;
223 a2 = (
s*suw - su*sw) * inv_denom;
224 ATH_MSG_DEBUG (
"Fit results:" <<
" intercept = " << a1 <<
" and slope = " << a2 );
228 for (
i = 0;
i < hitNum; ++
i) {
233 for(
i = 0;
i < hitNum; ++
i){
234 chi2 += (
vec[
i] - a1 - a2*vec_z[
i])*(
vec[
i] - a1 - a2*vec_z[
i])/(vec_e[
i]*vec_e[
i]);
◆ initialize()
StatusCode LArTBH6BeamInfo::initialize |
( |
| ) |
|
|
overridevirtual |
Definition at line 29 of file LArTBH6BeamInfo.cxx.
33 ATH_MSG_ERROR (
"Pcode should be in jO, if not PrimaryTrackOnly !" );
34 return StatusCode::FAILURE;
38 ATH_MSG_INFO (
"LArTBH6BeamInfo initialisation completed" );
39 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()
◆ 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_cryoX
float LArTBH6BeamInfo::m_cryoX {0.f} |
|
private |
◆ m_detStore
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_hitcoll
◆ m_HitsCollNames
Gaudi::Property<std::vector<std::string> > LArTBH6BeamInfo::m_HitsCollNames {this, "HitsContainer"} |
|
private |
◆ m_numEv
int LArTBH6BeamInfo::m_numEv {0} |
|
private |
◆ m_pcode
Gaudi::Property<int> LArTBH6BeamInfo::m_pcode {this, "PrimaryParticle", 999} |
|
private |
◆ m_Primary
Gaudi::Property<bool> LArTBH6BeamInfo::m_Primary {this, "PrimaryTrackOnly", true} |
|
private |
◆ m_theEventInfo
◆ m_track
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
void setChi2_v(double chi2v)
void setVslope(double vslope)
SG::ReadHandle< TBEventInfo > m_theEventInfo
void setVintercept(double vintercept)
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
SG::WriteHandle< TBTrack > m_track
std::vector< SG::VarHandleKeyArray * > m_vhka
void setCryoHitv(float cryov)
void setCryoHitu(float cryou)
std::vector< size_t > vec
void setUslope(double uslope)
bool fitVect(const dVect &vec_x, const dVect &vec_xz, const dVect &vec_ex, double &a1, double &a2, double &chi2, dVect &residual)
Fit data to the function u = a1 + a2*w.
std::vector< double > dVect
virtual void setOwner(IDataHandleHolder *o)=0
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
virtual StatusCode sysInitialize() override
Override sysInitialize.
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
void setUintercept(double uintercept)
::StatusCode StatusCode
StatusCode definition for legacy code.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
double chi2(TH1 *h0, TH1 *h1)
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
void setCryoHitw(float cryow)
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
void setResidualv(int ind, double residualv)
Gaudi::Property< std::vector< std::string > > m_HitsCollNames
DataObjIDColl m_extendedExtraObjects
Gaudi::Property< int > m_pcode
#define ATH_MSG_WARNING(x)
void setChi2_u(double chi2u)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
AthAlgorithm()
Default constructor:
void setResidualu(int ind, double residualu)
Gaudi::Property< bool > m_Primary
std::vector< SG::ReadHandle< AthenaHitsVector< LArG4H6FrontHit > > > m_hitcoll