ATLAS Offline Software
LArTBH6BeamInfo.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef LArTBH6BeamInfo_H
6 #define LArTBH6BeamInfo_H
7 
9 
10 #include "Identifier/Identifier.h"
11 
12 #include <string>
13 
14 #include "StoreGate/WriteHandle.h"
15 #include "StoreGate/ReadHandle.h"
16 #include "TBEvent/TBTrack.h"
17 #include "TBEvent/TBEventInfo.h"
20 
21 class LArTBH6BeamInfo : public AthAlgorithm {
22 
23 public:
24 
25 // Constructor
26  LArTBH6BeamInfo(const std::string& name, ISvcLocator* pSvcLocator);
27 
28 // Destructor
29  virtual ~LArTBH6BeamInfo() = default;
30 
31 // Gaudi
32  virtual StatusCode initialize() override;
33  virtual StatusCode execute() override;
34  virtual StatusCode finalize() override;
35 
36 private:
37  typedef std::vector<double> dVect;
38 
43  bool fitVect(const dVect &vec_x, const dVect &vec_xz, const dVect &vec_ex,
44  double &a1, double &a2, double &chi2, dVect &residual);
45 
46  Gaudi::Property<std::vector<std::string>> m_HitsCollNames{this, "HitsContainer"};
47  Gaudi::Property<bool> m_Primary{this, "PrimaryTrackOnly", true};
48  Gaudi::Property<int> m_pcode{this, "PrimaryParticle", 999};
49 
50  float m_cryoX{0.f};
51  int m_numEv{0};
52 
55  std::vector< SG::ReadHandle< AthenaHitsVector<LArG4H6FrontHit> > > m_hitcoll;
56 };
57 #endif
AthenaHitsVector.h
LArTBH6BeamInfo::m_theEventInfo
SG::ReadHandle< TBEventInfo > m_theEventInfo
Definition: LArTBH6BeamInfo.h:53
ClusterSeg::residual
@ residual
Definition: ClusterNtuple.h:20
SG::ReadHandle< TBEventInfo >
LArTBH6BeamInfo::LArTBH6BeamInfo
LArTBH6BeamInfo(const std::string &name, ISvcLocator *pSvcLocator)
Definition: LArTBH6BeamInfo.cxx:16
LArTBH6BeamInfo::execute
virtual StatusCode execute() override
Definition: LArTBH6BeamInfo.cxx:46
LArTBH6BeamInfo::m_track
SG::WriteHandle< TBTrack > m_track
Definition: LArTBH6BeamInfo.h:54
LArTBH6BeamInfo::fitVect
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.
Definition: LArTBH6BeamInfo.cxx:176
LArTBH6BeamInfo::m_numEv
int m_numEv
Definition: LArTBH6BeamInfo.h:51
LArTBH6BeamInfo::~LArTBH6BeamInfo
virtual ~LArTBH6BeamInfo()=default
LArTBH6BeamInfo::dVect
std::vector< double > dVect
Definition: LArTBH6BeamInfo.h:37
LArTBH6BeamInfo::m_cryoX
float m_cryoX
Definition: LArTBH6BeamInfo.h:50
AthAlgorithm.h
WriteHandle.h
Handle class for recording to StoreGate.
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
chi2
double chi2(TH1 *h0, TH1 *h1)
Definition: comparitor.cxx:525
TBTrack.h
LArG4H6FrontHitCollection.h
AthAlgorithm
Definition: AthAlgorithm.h:47
LArTBH6BeamInfo::initialize
virtual StatusCode initialize() override
Definition: LArTBH6BeamInfo.cxx:29
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
LArTBH6BeamInfo::m_HitsCollNames
Gaudi::Property< std::vector< std::string > > m_HitsCollNames
Definition: LArTBH6BeamInfo.h:46
SG::WriteHandle< TBTrack >
LArTBH6BeamInfo::m_pcode
Gaudi::Property< int > m_pcode
Definition: LArTBH6BeamInfo.h:48
LArTBH6BeamInfo::finalize
virtual StatusCode finalize() override
Definition: LArTBH6BeamInfo.cxx:169
LArTBH6BeamInfo
Definition: LArTBH6BeamInfo.h:21
TBEventInfo.h
ReadHandle.h
Handle class for reading from StoreGate.
LArTBH6BeamInfo::m_Primary
Gaudi::Property< bool > m_Primary
Definition: LArTBH6BeamInfo.h:47
LArTBH6BeamInfo::m_hitcoll
std::vector< SG::ReadHandle< AthenaHitsVector< LArG4H6FrontHit > > > m_hitcoll
Definition: LArTBH6BeamInfo.h:55