ATLAS Offline Software
Loading...
Searching...
No Matches
FCS_StepInfo.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef ISF_FASTCALOSIMEVENT_ISF_FCS_STEPINFO_H
6#define ISF_FASTCALOSIMEVENT_ISF_FCS_STEPINFO_H
7
8// STL includes
9#include <iostream>
10#include <vector>
11#include <string>
12
13// CLHEP include for Hep3Vector
14#include "CLHEP/Vector/ThreeVector.h"
15
16// include for Hit
17// #include "LArSimEvent/LArHit.h"
19
21
22class MsgStream;
23
24// Namespace for the G4 step related classes
26
42
43using namespace ISF_FCS;
44
45class FCS_StepInfo : public TileHit, public MLogging {
46
47public:
49 FCS_StepInfo() : m_pos(), m_valid(false), m_detector(-1) {}
50
51 FCS_StepInfo(CLHEP::Hep3Vector l_vec, Identifier l_cell, double l_energy,
52 double l_time, bool l_valid, int l_detector)
53 : TileHit(l_cell, l_energy, l_time), m_pos(l_vec), m_valid(l_valid),
54 m_detector(l_detector) {}
55
56 // FCS_StepInfo(const FCS_StepInfo& first, const FCS_StepInfo& second);
57
58 /* access functions */
59
61 inline void setP(const CLHEP::Hep3Vector &p) { m_pos = p; }
63 inline void setX(const double x) { return m_pos.setX(x); }
65 inline void setY(const double y) { return m_pos.setY(y); }
67 inline void setZ(const double z) { return m_pos.setZ(z); }
69 // inline void setE(const double t) { m_energy = t; }
71 // inline void setTime(const double t) { m_time = t; }
73 inline void setValid(const bool flag) { m_valid = flag; }
75 // inline void setIdentifier(const Identifier id) { m_ID = id; }
76
77 inline void setDetector(const int det) { m_detector = det; }
79 inline CLHEP::Hep3Vector position() const { return m_pos; }
81 inline double x() const { return m_pos.x(); }
83 inline double y() const { return m_pos.y(); }
85 inline double z() const { return m_pos.z(); }
87 // inline double dep() const { return m_energy; }
89 // inline double time() const { return time(); }
91 inline bool valid() const { return m_valid; }
92
93 inline int detector() const { return m_detector; }
94
95 /* helper functions */
96
98 double diff2(const FCS_StepInfo &other) const;
99
101 FCS_StepInfo &operator+=(const FCS_StepInfo &other);
102
103private:
104 // data members
105 CLHEP::Hep3Vector m_pos;
106 bool m_valid;
108};
109
110} // namespace ISF_FCS_Parametrization
111
112#endif
MLogging(const std::string &name="ISF_FastCaloSimEvent")
Constructor.
Definition MLogging.cxx:91
CLHEP::Hep3Vector position() const
return spacial position
FCS_StepInfo & operator+=(const FCS_StepInfo &other)
energy weighted sum
int m_detector
dictionary value in which detector the hit is
void setP(const CLHEP::Hep3Vector &p)
set position
FCS_StepInfo()
empty default constructor
double z() const
return z position
double y() const
return y position
double diff2(const FCS_StepInfo &other) const
return spactial distance squared
void setX(const double x)
set x position
FCS_StepInfo(CLHEP::Hep3Vector l_vec, Identifier l_cell, double l_energy, double l_time, bool l_valid, int l_detector)
double x() const
return x position
CLHEP::Hep3Vector m_pos
spatial position
void setDetector(const int det)
set identifier
void setZ(const double z)
set z position
bool m_valid
flag, if hit is valid (if valid calculator?)
void setValid(const bool flag)
set depoisted energy
bool valid() const
return deposited energy
void setY(const double y)
set y position
TileHit()
Default constructor needed for POOL.