diff --git a/Recon/include/Recon/Event/CalorimeterHit.h b/Recon/include/Recon/Event/CalorimeterHit.h index aed17a9ea..3a963cf7c 100644 --- a/Recon/include/Recon/Event/CalorimeterHit.h +++ b/Recon/include/Recon/Event/CalorimeterHit.h @@ -32,7 +32,7 @@ class CalorimeterHit { /** * Class destructor. */ - virtual ~CalorimeterHit() {} + virtual ~CalorimeterHit() = default; /** * Clear the data in the object. @@ -167,21 +167,21 @@ class CalorimeterHit { float time_{0}; /** X Position of the hit */ - float xpos_; + float xpos_{-9999.}; /** Y Position of the hit */ - float ypos_; + float ypos_{-9999.}; /** Z Position of the hit */ - float zpos_; + float zpos_{-9999.}; /** Is this a noise hit? */ - bool isNoise_; + bool isNoise_{false}; /** * The ROOT class definition. */ - ClassDef(CalorimeterHit, 1); + ClassDef(CalorimeterHit, 2); }; } // namespace ldmx diff --git a/Recon/src/Recon/Event/CalorimeterHit.cxx b/Recon/src/Recon/Event/CalorimeterHit.cxx index 79355bacc..0674f0eaa 100644 --- a/Recon/src/Recon/Event/CalorimeterHit.cxx +++ b/Recon/src/Recon/Event/CalorimeterHit.cxx @@ -3,24 +3,24 @@ // STL #include -ClassImp(ldmx::CalorimeterHit) +ClassImp(ldmx::CalorimeterHit); - namespace ldmx { - void CalorimeterHit::Clear() { - id_ = 0; - amplitude_ = 0; - energy_ = 0; - time_ = 0; - xpos_ = 0; - ypos_ = 0; - zpos_ = 0; - isNoise_ = false; - } +namespace ldmx { +void CalorimeterHit::Clear() { + id_ = 0; + amplitude_ = 0; + energy_ = 0; + time_ = 0; + xpos_ = 0; + ypos_ = 0; + zpos_ = 0; + isNoise_ = false; +} - void CalorimeterHit::Print() const { - std::cout << "CalorimeterHit { " - << "id: " << std::hex << id_ << std::dec - << ", energy: " << energy_ << "MeV, time: " << time_ - << "ns, amplitude: " << amplitude_ << "}" << std::endl; - } +void CalorimeterHit::Print() const { + std::cout << "CalorimeterHit { " + << "id: " << std::hex << id_ << std::dec << ", energy: " << energy_ + << "MeV, time: " << time_ << "ns, amplitude: " << amplitude_ << "}" + << std::endl; +} } // namespace ldmx