1 #ifndef ecaltimingevent_hh
2 #define ecaltimingevent_hh
5 #include "DataFormats/EcalRecHit/interface/EcalRecHit.h"
6 #include "DataFormats/EcalDetId/interface/EcalDetIdCollections.h"
13 #define MAX_TIME 32.767
14 #define MAX_ENERGY 655.35
23 setEnergy(MAX_ENERGY);
28 setEnergy(MAX_ENERGY);
33 setEnergy(rec.energy());
37 float time()
const{
return float(time_)/1000.0f; }
39 float energy()
const {
return float(energy_)/100.0f; }
40 const DetId& detid()
const {
return detid_; }
42 void setTime(
float t);
43 void setEnergy(
float e);
51 friend std::ostream& operator << (std::ostream& os,
const EcalTimingEvent& event)
53 if(event.detid().subdetId() == EcalBarrel) {
54 EBDetId id(event.detid());
55 os <<
id.ieta() <<
"\t" <<
id.iphi() <<
"\t" <<
id.zside() <<
"\t";
57 EEDetId id(event.detid());
58 os <<
id.ix() <<
"\t" <<
id.iy() <<
"\t" <<
id.zside() <<
"\t";
61 os <<
event.time() <<
"\t" <<
event.energy();
78 typedef std::vector<EcalTimingEvent> EcalTimingCollection;
Definition: EcalTimingEvent.h:16
float time() const
Time is stored in a int16_t in ps. time() returns a float in ns.
Definition: EcalTimingEvent.h:37
float energy() const
Energy is stored in a uint16_t in 10's of MeV. energy() returns a float in GeV.
Definition: EcalTimingEvent.h:39