HFRecHit

Macros

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
#ifndef DATAFORMATS_HCALRECHIT_HFRECHIT_H
#define DATAFORMATS_HCALRECHIT_HFRECHIT_H 1

#include "DataFormats/HcalDetId/interface/HcalDetId.h"
#include "DataFormats/CaloRecHit/interface/CaloRecHit.h"

/** \class HFRecHit
 *  
 *\author J. Mans - Minnesota
 */
class HFRecHit : public CaloRecHit {
public:
  typedef HcalDetId key_type;

  constexpr HFRecHit() : CaloRecHit(), timeFalling_(0.f), auxHF_(0) {}

  //HFRecHit(const HcalDetId& id, float energy, float time);
  /// get the id
  constexpr HFRecHit(const HcalDetId& id, float en, float timeRising, float timeFalling = 0)
      : CaloRecHit(id, en, timeRising), timeFalling_(timeFalling), auxHF_(0) {}

  /// get the amplitude (generally fC, but can vary)
  /// get the hit time
  constexpr float timeFalling() const { return timeFalling_; }
  constexpr void setTimeFalling(float timeFalling) { timeFalling_ = timeFalling; }
  constexpr HcalDetId id() const { return HcalDetId(detid()); }

  constexpr void setAuxHF(const uint32_t u) { auxHF_ = u; }
  constexpr uint32_t getAuxHF() const { return auxHF_; }

private:
  float timeFalling_;
  uint32_t auxHF_;
};

std::ostream& operator<<(std::ostream& s, const HFRecHit& hit);

#endif