Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-03-30 08:51:03

0001 #ifndef Validation_HGCalBValidation_ValidHit_h
0002 #define Validation_HGCalBValidation_ValidHit_h
0003 
0004 #include "TObject.h"
0005 #include <iostream>
0006 #include <vector>
0007 
0008 class ValidHit {
0009 public:
0010   ValidHit() : energy_(0), time_(0), timeError_(0), id_(0), flagBits_(0), son_(0) {}
0011   ValidHit(float energy, float time, float timeError, uint32_t id, uint32_t flagBits, uint8_t son)
0012       : energy_(energy), time_(time), timeError_(timeError), id_(id), flagBits_(flagBits), son_(son) {}
0013   ValidHit(const ValidHit &other) {
0014     energy_ = other.energy_;
0015     time_ = other.time_;
0016     timeError_ = other.timeError_;
0017     id_ = other.id_;
0018     flagBits_ = other.flagBits_;
0019     son_ = other.son_;
0020   }
0021 
0022   virtual ~ValidHit() {}
0023 
0024   float energy() { return energy_; }
0025   float time() { return time_; }
0026   float timeError() { return timeError_; }
0027   uint32_t id() { return id_; }
0028   uint32_t flagBits() { return flagBits_; }
0029   uint8_t son() { return son_; }
0030 
0031   float energy_;       //calibrated energy of the rechit
0032   float time_;         //time jitter of the UncalibRecHit
0033   float timeError_;    //time resolution
0034   uint32_t id_;        //rechit detId
0035   uint32_t flagBits_;  //rechit flags describing its status (DataFormats/HGCRecHit/interface/HGCRecHit.h)
0036   uint8_t son_;        //signal over noise
0037 
0038   ClassDef(ValidHit, 1)
0039 };
0040 
0041 typedef std::vector<ValidHit> ValidHitCollection;
0042 
0043 #endif  //Validation_HGCalBValidation_ValidHit_h