54 std::ostringstream str;
67 if(frag ==
nullptr || chan ==
nullptr) {
122TVector3
TEmma::GetPosition(
double left,
double right,
double top,
double bottom,
double delayL,
double delayR,
double delayT,
double delayB)
125 double Xdiff = (left + delayL) - (right + delayR);
126 double Xsum = (left) + (right);
127 double Ydiff = (bottom + delayB) - (top + delayT);
128 double Ysum = (bottom) + (top);
130 double Xpos = (Xdiff / Xsum) *
fXlength;
131 double Ypos = (Ydiff / Ysum) *
fYlength;
133 return {Xpos, Ypos, 1};
141 std::cerr <<
"EMMA IC hits are out of range" << std::endl;
151 std::cerr <<
"EMMA PGAC Anode hits are out of range" << std::endl;
161 std::cerr <<
"EMMA TDC hits are out of range" << std::endl;
171 std::cerr <<
"EMMA Si hits are out of range" << std::endl;
181 std::cerr <<
"EMMA Trigger hits are out of range" << std::endl;
191 std::cerr <<
"EMMA SSB hits are out of range" << std::endl;
202 std::vector<double> tdcArray;
203 std::vector<double> icArray;
207 hit->SetTimeStamp(emmaTdcHit.GetTimeStamp());
208 hit->SetAddress(emmaTdcHit.GetAddress());
209 if(emmaTdcHit.GetTdcNumber() < 10) { tdcArray.push_back(emmaTdcHit.GetEnergy()); }
210 if(emmaTdcHit.GetTdcNumber() == 10) { hit->SetLeft(emmaTdcHit.GetEnergy()); }
211 if(emmaTdcHit.GetTdcNumber() == 11) { hit->SetRight(emmaTdcHit.GetEnergy()); }
212 if(emmaTdcHit.GetTdcNumber() == 12) { hit->SetTop(emmaTdcHit.GetEnergy()); }
213 if(emmaTdcHit.GetTdcNumber() == 13) { hit->SetBottom(emmaTdcHit.GetEnergy()); }
216 if(!tdcArray.empty()) {
217 fAnodeTrigger = *std::min_element(tdcArray.begin(), tdcArray.end());
218 if(hit->GetLeft() != 0 && hit->GetRight() != 0 && hit->GetTop() != 0 && hit->GetBottom() != 0 &&
fAnodeTrigger != 0) {
228 if(hit->GetLeft() == 0) {
fFail++; }
229 if(hit->GetRight() == 0) {
fFail++; }
230 if(hit->GetTop() == 0) {
fFail++; }
231 if(hit->GetBottom() == 0) {
fFail++; }
232 hit->SetFailedFill(
fFail);
const TMnemonic * GetMnemonic() const
void Copy(TObject &) const override
!
virtual Short_t GetMultiplicity() const
void Clear(Option_t *="") override
!
virtual void AddHit(TDetectorHit *hit)
std::vector< TEmmaHit > fEmmaAnodeHits
void Print(Option_t *opt="") const override
!
Short_t GetICMultiplicity() const
std::vector< TEmmaHit > fEmmaSSBHits
void AddFragment(const std::shared_ptr< const TFragment > &, TChannel *) override
!
std::vector< TEmmaHit > fEmmaTriggerHits
TEmma & operator=(const TEmma &)
!
Short_t GetTriggerMultiplicity() const
TEmmaHit * GetTdcHit(const int &i)
TEmmaHit * GetSiHit(const int &i)
Short_t GetAnodeMultiplicity() const
void BuildHits() override
!
Short_t GetTdcMultiplicity() const
void Clear(Option_t *opt="all") override
!
Short_t GetSSBMultiplicity() const
TEmmaHit * GetSSBHit(const int &i)
void Copy(TObject &) const override
!
Short_t GetSiMultiplicity() const
TEmmaHit * GetAnodeHit(const int &i)
TEmmaHit * GetTriggerHit(const int &i)
static double fAnodeTrigger
!
std::vector< TEmmaHit > fEmmaTdcHits
std::vector< TEmmaHit > fEmmaICHits
static TVector3 GetPosition(double left, double right, double top, double bottom, double delayL, double delayR, double delayT, double delayB)
TEmmaHit * GetICHit(const int &i)
std::vector< TEmmaHit > fEmmaSiHits
virtual EMnemonic OutputSensor() const
virtual EMnemonic SubSystem() const
virtual EMnemonic CollectedCharge() const