55 std::ostringstream str;
68 if(frag ==
nullptr || chan ==
nullptr) {
123TVector3
TEmma::GetPosition(
double left,
double right,
double top,
double bottom,
double delayL,
double delayR,
double delayT,
double delayB)
126 double Xdiff = (left + delayL) - (right + delayR);
127 double Xsum = (left) + (right);
128 double Ydiff = (bottom + delayB) - (top + delayT);
129 double Ysum = (bottom) + (top);
131 double Xpos = (Xdiff / Xsum) *
fXlength;
132 double Ypos = (Ydiff / Ysum) *
fYlength;
134 return {Xpos, Ypos, 1};
142 std::cerr <<
"EMMA IC hits are out of range" << std::endl;
152 std::cerr <<
"EMMA PGAC Anode hits are out of range" << std::endl;
162 std::cerr <<
"EMMA TDC hits are out of range" << std::endl;
172 std::cerr <<
"EMMA Si hits are out of range" << std::endl;
182 std::cerr <<
"EMMA Trigger hits are out of range" << std::endl;
192 std::cerr <<
"EMMA SSB hits are out of range" << std::endl;
203 std::vector<double> tdcArray;
204 std::vector<double> icArray;
208 hit->SetTimeStamp(emmaTdcHit.GetTimeStamp());
209 hit->SetAddress(emmaTdcHit.GetAddress());
210 if(emmaTdcHit.GetTdcNumber() < 10) { tdcArray.push_back(emmaTdcHit.GetEnergy()); }
211 if(emmaTdcHit.GetTdcNumber() == 10) { hit->SetLeft(emmaTdcHit.GetEnergy()); }
212 if(emmaTdcHit.GetTdcNumber() == 11) { hit->SetRight(emmaTdcHit.GetEnergy()); }
213 if(emmaTdcHit.GetTdcNumber() == 12) { hit->SetTop(emmaTdcHit.GetEnergy()); }
214 if(emmaTdcHit.GetTdcNumber() == 13) { hit->SetBottom(emmaTdcHit.GetEnergy()); }
217 if(!tdcArray.empty()) {
218 fAnodeTrigger = *std::min_element(tdcArray.begin(), tdcArray.end());
219 if(hit->GetLeft() != 0 && hit->GetRight() != 0 && hit->GetTop() != 0 && hit->GetBottom() != 0 &&
fAnodeTrigger != 0) {
229 if(hit->GetLeft() == 0) {
fFail++; }
230 if(hit->GetRight() == 0) {
fFail++; }
231 if(hit->GetTop() == 0) {
fFail++; }
232 if(hit->GetBottom() == 0) {
fFail++; }
233 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