Skip to content

Commit 5592ca6

Browse files
mfasDasawenzel
authored andcommitted
[EMCAL-1144] Fix operator+ in EMCAL Hit
- operator+ must be declared outside the class as binary operator - Return object should be copy of the lhs hit and sum of the two energy losses In addition: - Fixing namespace of operator<< - Updating doxymodules.h with new features in calibration part.
1 parent 06e3750 commit 5592ca6

3 files changed

Lines changed: 26 additions & 12 deletions

File tree

Detectors/EMCAL/base/include/EMCALBase/Hit.h

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ namespace emcal
2222
/// \class Hit
2323
/// \brief EMCAL simulation hit information
2424
/// \ingroup EMCALbase
25+
/// \author Markus Fasel <markus.fasel@cern.ch>, Oak Ridge National Laboratory
26+
/// \since August 31st, 2017
2527
class Hit : public o2::BasicXYZEHit<float>
2628
{
2729
public:
@@ -63,11 +65,6 @@ class Hit : public o2::BasicXYZEHit<float>
6365
/// \return This point with the summed energy loss
6466
Hit& operator+=(const Hit& rhs);
6567

66-
/// \brief Creates a new point base on this point but adding the energy loss of the right hand side
67-
/// \param rhs Hit to add to
68-
/// \return New EMAL point base on this point
69-
Hit operator+(const Hit& rhs) const;
70-
7168
/// \brief Destructor
7269
~Hit() = default;
7370

@@ -99,6 +96,16 @@ class Hit : public o2::BasicXYZEHit<float>
9996
ClassDefNV(Hit, 1);
10097
};
10198

99+
/// \brief Creates a new point base on this point but adding the energy loss of the right hand side
100+
/// \param lhs Left hand side of the sum
101+
/// \param rhs Right hand side of the sum
102+
/// \return New EMAL point base on this point
103+
Hit operator+(const Hit& lhs, const Hit& rhs);
104+
105+
/// \brief Output stream operator for EMCAL hits
106+
/// \param stream Stream to write on
107+
/// \param point Hit to be printed
108+
/// \return Stream after printing
102109
std::ostream& operator<<(std::ostream& stream, const Hit& point);
103110
} // namespace emcal
104111
} // namespace o2

Detectors/EMCAL/base/src/Hit.cxx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Bool_t Hit::operator<(const Hit& rhs) const
3232

3333
Bool_t Hit::operator==(const Hit& rhs) const
3434
{
35-
return (GetDetectorID() == GetDetectorID()) && (GetTrackID() == rhs.GetTrackID());
35+
return (GetDetectorID() == rhs.GetDetectorID()) && (GetTrackID() == rhs.GetTrackID());
3636
}
3737

3838
Hit& Hit::operator+=(const Hit& rhs)
@@ -41,14 +41,14 @@ Hit& Hit::operator+=(const Hit& rhs)
4141
return *this;
4242
}
4343

44-
Hit Hit::operator+(const Hit& rhs) const
44+
Hit o2::emcal::operator+(const Hit& lhs, const Hit& rhs)
4545
{
46-
Hit result(*this);
46+
Hit result(lhs);
4747
result.SetEnergyLoss(result.GetEnergyLoss() + rhs.GetEnergyLoss());
48-
return *this;
48+
return result;
4949
}
5050

51-
std::ostream& operator<<(std::ostream& stream, const Hit& p)
51+
std::ostream& o2::emcal::operator<<(std::ostream& stream, const Hit& p)
5252
{
5353
p.PrintStream(stream);
5454
return stream;

Detectors/EMCAL/doxymodules.h

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,24 @@
3535
* EMCAL calibration objects for
3636
* - Bad channel map
3737
* - Time calibration
38+
* - Time slewing parameters
3839
* - Gain calibration
3940
* - Temperature calibration
41+
* - FEE DCS parameters
42+
* - Pedestal data
43+
* In addition providing an interface convenient CCDB access and methods
44+
* to recalibrate add cell level.
4045
*/
4146

4247
/**
4348
* @defgroup EMCALcalib EMCAL calib
4449
* @brief EMCAL bad channel calibration
4550
* @ingroup DetectorEMCAL
4651
*
47-
* Performs the EMCal bad channel calibration.
48-
*
52+
* EMCAL calibrator performing
53+
* - Bad channel calibration
54+
* - Time calibration
55+
* and corresponding workflows for calibration tasks.
4956
*/
5057

5158
/**

0 commit comments

Comments
 (0)