8 #ifndef LIBRARIES_TAC_DTACHIT_H_
9 #define LIBRARIES_TAC_DTACHIT_H_
11 #include <JANA/JObject.h>
12 #include <JANA/JFactory.h>
25 bool fadcPresent =
false;
26 bool tdcPresent =
false;
34 DTACHit(
const DTACHit& hit ) : jana::JObject(hit), E(hit.E), T(hit.T), integral(hit.integral),
35 pulsePeak(hit.pulsePeak), timeTDC(hit.timeTDC), timeFADC(hit.timeFADC), npeFADC(hit.npeFADC),
36 fadcPresent(hit.fadcPresent), tdcPresent(hit.tdcPresent) {
42 if(
this == &hit )
return *
this;
43 *(
dynamic_cast<jana::JObject*
>(
this)) = *
dynamic_cast<const jana::JObject*
>(&hit);
57 virtual void toStrings(vector<pair<string, string> > &items)
const override {
58 AddString(items,
"E(MeV)",
"%2.3f", E );
59 AddString(items,
"t(ns)",
"%2.3f", T);
60 AddString(items,
"time_tdc(ns)",
"%f", timeTDC);
61 AddString(items,
"time_fadc(ns)",
"%f", timeFADC);
62 AddString(items,
"integral",
"%f", integral);
63 AddString(items,
"pulse_peak",
"%f", pulsePeak);
64 AddString(items,
"npe_fadc",
"%f", npeFADC);
65 AddString(items,
"has_fADC",
"%d", (
int) fadcPresent);
66 AddString(items,
"has_TDC",
"%d", (
int) tdcPresent);
82 this->integral = integral;
98 this->pulsePeak = pulsePeak;
130 this->fadcPresent = fadcPresent;
138 this->tdcPresent = tdcPresent;
void setTimeTDC(double timeTdc=0)
double getPulsePeak() const
bool isTDCPresent() const
DTACHit(const DTACHit &hit)
void setTimeFADC(double timeFadc=0)
void setNpeFADC(double npeFadc=0)
virtual void toStrings(vector< pair< string, string > > &items) const override
void setFADCPresent(bool fadcPresent=false)
double getIntegral() const
void setPulsePeak(double pulsePeak=0)
bool isFADCPresent() const
double getTimeTDC() const
void setTDCPresent(bool tdcPresent=false)
void setIntegral(double integral=0)
double getNpeFADC() const
double getTimeFADC() const
DTACHit & operator=(const DTACHit &hit)