|
ATLAS Offline Software
|
#include <LArTBH6BeamInfo.h>
|
| LArTBH6BeamInfo (const std::string &name, ISvcLocator *pSvcLocator) |
|
virtual | ~LArTBH6BeamInfo () |
|
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 |
|
|
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 > &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...
|
|
Definition at line 21 of file LArTBH6BeamInfo.h.
◆ dVect
◆ StoreGateSvc_t
◆ LArTBH6BeamInfo()
LArTBH6BeamInfo::LArTBH6BeamInfo |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ ~LArTBH6BeamInfo()
LArTBH6BeamInfo::~LArTBH6BeamInfo |
( |
| ) |
|
|
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 LArTBH6BeamInfo::execute |
( |
| ) |
|
Definition at line 59 of file LArTBH6BeamInfo.cxx.
62 CLHEP::Hep3Vector
pos;
82 if(hit->GetSC() > 0)
continue;
84 if(hit->GetTrackID() != 1)
continue;
86 if(hit->GetPcode() !=
m_pcode)
continue;
90 v_x.push_back(
pos.x());
91 v_xz.push_back(
pos.z()+21600.*
mm);
94 v_y.push_back(
pos.y());
95 v_yz.push_back(
pos.z()+21600.*
mm);
102 if(v_x.size() < 2 || v_y.size() < 2) {
103 ATH_MSG_DEBUG (
"Could not fit, setting zero. "<<v_x.size()<<
"/"<<v_y.size() );
104 m_track = std::make_unique<TBTrack>(0,0);
116 return StatusCode::FAILURE;
121 std::vector<double> residual_x, residual_y;
128 check =
fitVect(v_x, v_xz, v_ex, a1_x, a2_x, chi2_x, residual_x);
132 return StatusCode::FAILURE;
135 check =
fitVect(v_y, v_yz, v_ey, a1_y, a2_y, chi2_y, residual_y);
138 return StatusCode::FAILURE;
146 m_track = std::make_unique<TBTrack>(v_x.size(), v_y.size());
154 for(
size_t i = 0;
i < v_x.size(); ++
i){
159 for(
size_t i = 0;
i < v_y.size(); ++
i){
175 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 |
( |
| ) |
|
◆ 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 189 of file LArTBH6BeamInfo.cxx.
214 int hitNum =
vec.size();
215 for(
i = 0;
i < hitNum; ++
i){
221 s += 1 / (vec_e[
i]*vec_e[
i]);
222 su +=
vec[
i] / (vec_e[
i]*vec_e[
i]);
223 sww += vec_z[
i]*vec_z[
i] / (vec_e[
i]*vec_e[
i]);
224 sw += vec_z[
i] / (vec_e[
i]*vec_e[
i]);
225 suw +=
vec[
i]*vec_z[
i] / (vec_e[
i]*vec_e[
i]);
228 const double denom = (
s*sww-sw*sw);
234 const double inv_denom = 1. /
denom;
235 a1 = (su*sww - sw*suw) * inv_denom;
236 a2 = (
s*suw - su*sw) * inv_denom;
237 ATH_MSG_DEBUG (
"Fit results:" <<
" intercept = " << a1 <<
" and slope = " << a2 );
241 for (
i = 0;
i < hitNum; ++
i) {
246 for(
i = 0;
i < hitNum; ++
i){
247 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 |
( |
| ) |
|
Definition at line 42 of file LArTBH6BeamInfo.cxx.
46 ATH_MSG_ERROR (
"Pcode should be in jO, if not PrimaryTrackOnly !" );
47 return StatusCode::FAILURE;
51 ATH_MSG_INFO (
"LArTBH6BeamInfo initialisation completed" );
52 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 |
|
private |
◆ m_detStore
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_hitcoll
◆ m_HitsCollNames
std::vector<std::string> LArTBH6BeamInfo::m_HitsCollNames |
|
private |
◆ m_numEv
int LArTBH6BeamInfo::m_numEv |
|
private |
◆ m_pcode
int LArTBH6BeamInfo::m_pcode |
|
private |
◆ m_Primary
bool LArTBH6BeamInfo::m_Primary |
|
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
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
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
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.
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)
std::vector< std::string > m_HitsCollNames
DataObjIDColl m_extendedExtraObjects
#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::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
std::vector< SG::ReadHandle< AthenaHitsVector< LArG4H6FrontHit > > > m_hitcoll