GRSISort "v4.1.1.0"
An extension of the ROOT analysis Framework
Loading...
Searching...
No Matches
TGriffin.cxx
Go to the documentation of this file.
1#include "TGriffin.h"
2
3#include <sstream>
4#include <iostream>
5#include <iomanip>
6
7#include "TMath.h"
8#include "TInterpreter.h"
9#include "TMnemonic.h"
10
11#include "TGRSIOptions.h"
12
13////////////////////////////////////////////////////////////
14//
15// TGriffin
16//
17// The TGriffin class defines the observables and algorithms used
18// when analyzing GRIFFIN data. It includes detector positions,
19// add-back methods, etc.
20//
21////////////////////////////////////////////////////////////
22
24{
25 return ((one->GetDetector() == two->GetDetector()) &&
26 (std::fabs(one->GetTime() - two->GetTime()) < TGRSIOptions::AnalysisOptions()->AddbackWindow()));
27}
28
30
32{
33 //return ((hit.GetDetector() == bgoHit.GetDetector() && hit.GetCrystal() == bgoHit.GetCrystal()) &&
34 return ((hit->GetDetector() == bgoHit->GetDetector()) &&
35 (std::fabs(hit->GetTime() - bgoHit->GetTime()) < TGRSIOptions::AnalysisOptions()->SuppressionWindow()) &&
37}
38
40
41// This seems unnecessary, and why 17?;// they are static members, and need
42// to be defined outside the header
43// 17 is to have the detectors go from 1-16
44// plus we can use position zero
45// when the detector winds up back in
46// one of the stands like Alex used in the
47// gps run. pcb.
48// Initiallizes the HPGe Clover positions as per the wiki
49// <https://www.triumf.info/wiki/tigwiki/index.php/HPGe_Coordinate_Table>
50// theta phi
51// theta phi
52// theta
53std::array<TVector3, 17> TGriffin::fCloverPosition = {
54 TVector3(TMath::Sin(TMath::DegToRad() * (0.0)) * TMath::Cos(TMath::DegToRad() * (0.0)),
55 TMath::Sin(TMath::DegToRad() * (0.0)) * TMath::Sin(TMath::DegToRad() * (0.0)),
56 TMath::Cos(TMath::DegToRad() * (0.0))),
57 // Downstream lampshade
58 TVector3(TMath::Sin(TMath::DegToRad() * (45.0)) * TMath::Cos(TMath::DegToRad() * (67.5)),
59 TMath::Sin(TMath::DegToRad() * (45.0)) * TMath::Sin(TMath::DegToRad() * (67.5)),
60 TMath::Cos(TMath::DegToRad() * (45.0))),
61 TVector3(TMath::Sin(TMath::DegToRad() * (45.0)) * TMath::Cos(TMath::DegToRad() * (157.5)),
62 TMath::Sin(TMath::DegToRad() * (45.0)) * TMath::Sin(TMath::DegToRad() * (157.5)),
63 TMath::Cos(TMath::DegToRad() * (45.0))),
64 TVector3(TMath::Sin(TMath::DegToRad() * (45.0)) * TMath::Cos(TMath::DegToRad() * (247.5)),
65 TMath::Sin(TMath::DegToRad() * (45.0)) * TMath::Sin(TMath::DegToRad() * (247.5)),
66 TMath::Cos(TMath::DegToRad() * (45.0))),
67 TVector3(TMath::Sin(TMath::DegToRad() * (45.0)) * TMath::Cos(TMath::DegToRad() * (337.5)),
68 TMath::Sin(TMath::DegToRad() * (45.0)) * TMath::Sin(TMath::DegToRad() * (337.5)),
69 TMath::Cos(TMath::DegToRad() * (45.0))),
70 // Corona
71 TVector3(TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Cos(TMath::DegToRad() * (22.5)),
72 TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Sin(TMath::DegToRad() * (22.5)),
73 TMath::Cos(TMath::DegToRad() * (90.0))),
74 TVector3(TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Cos(TMath::DegToRad() * (67.5)),
75 TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Sin(TMath::DegToRad() * (67.5)),
76 TMath::Cos(TMath::DegToRad() * (90.0))),
77 TVector3(TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Cos(TMath::DegToRad() * (112.5)),
78 TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Sin(TMath::DegToRad() * (112.5)),
79 TMath::Cos(TMath::DegToRad() * (90.0))),
80 TVector3(TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Cos(TMath::DegToRad() * (157.5)),
81 TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Sin(TMath::DegToRad() * (157.5)),
82 TMath::Cos(TMath::DegToRad() * (90.0))),
83 TVector3(TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Cos(TMath::DegToRad() * (202.5)),
84 TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Sin(TMath::DegToRad() * (202.5)),
85 TMath::Cos(TMath::DegToRad() * (90.0))),
86 TVector3(TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Cos(TMath::DegToRad() * (247.5)),
87 TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Sin(TMath::DegToRad() * (247.5)),
88 TMath::Cos(TMath::DegToRad() * (90.0))),
89 TVector3(TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Cos(TMath::DegToRad() * (292.5)),
90 TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Sin(TMath::DegToRad() * (292.5)),
91 TMath::Cos(TMath::DegToRad() * (90.0))),
92 TVector3(TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Cos(TMath::DegToRad() * (337.5)),
93 TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Sin(TMath::DegToRad() * (337.5)),
94 TMath::Cos(TMath::DegToRad() * (90.0))),
95 // Upstream lampshade
96 TVector3(TMath::Sin(TMath::DegToRad() * (135.0)) * TMath::Cos(TMath::DegToRad() * (67.5)),
97 TMath::Sin(TMath::DegToRad() * (135.0)) * TMath::Sin(TMath::DegToRad() * (67.5)),
98 TMath::Cos(TMath::DegToRad() * (135.0))),
99 TVector3(TMath::Sin(TMath::DegToRad() * (135.0)) * TMath::Cos(TMath::DegToRad() * (157.5)),
100 TMath::Sin(TMath::DegToRad() * (135.0)) * TMath::Sin(TMath::DegToRad() * (157.5)),
101 TMath::Cos(TMath::DegToRad() * (135.0))),
102 TVector3(TMath::Sin(TMath::DegToRad() * (135.0)) * TMath::Cos(TMath::DegToRad() * (247.5)),
103 TMath::Sin(TMath::DegToRad() * (135.0)) * TMath::Sin(TMath::DegToRad() * (247.5)),
104 TMath::Cos(TMath::DegToRad() * (135.0))),
105 TVector3(TMath::Sin(TMath::DegToRad() * (135.0)) * TMath::Cos(TMath::DegToRad() * (337.5)),
106 TMath::Sin(TMath::DegToRad() * (135.0)) * TMath::Sin(TMath::DegToRad() * (337.5)),
107 TMath::Cos(TMath::DegToRad() * (135.0)))};
108
110{
111 /// Default ctor. Ignores TObjectStreamer in ROOT < 6
112 Clear();
113}
114
116{
117 /// Copy ctor. Ignores TObjectStreamer in ROOT < 6
118 rhs.Copy(*this);
119}
120
121void TGriffin::Copy(TObject& rhs) const
122{
123 // Copy function.
125
126 // no need to copy hits, this is already taken care of by TDetector::Copy (called by TSuppressed::Copy)
127 // not copying addback or suppressed vectors
128 for(auto& hit : static_cast<TGriffin&>(rhs).fAddbackHits) {
129 delete hit;
130 }
131 for(auto& hit : static_cast<TGriffin&>(rhs).fSuppressedHits) {
132 delete hit;
133 }
134 for(auto& hit : static_cast<TGriffin&>(rhs).fSuppressedAddbackHits) {
135 delete hit;
136 }
137 static_cast<TGriffin&>(rhs).fGriffinBits = 0;
138 static_cast<TGriffin&>(rhs).fAddbackHits.clear();
139 static_cast<TGriffin&>(rhs).fAddbackFrags.clear();
140 static_cast<TGriffin&>(rhs).fSuppressedHits.clear();
141 static_cast<TGriffin&>(rhs).fSuppressedAddbackHits.clear();
142 static_cast<TGriffin&>(rhs).fSuppressedAddbackFrags.clear();
143
144 static_cast<TGriffin&>(rhs).fCycleStart = fCycleStart;
145}
146
148{
149 // Default Destructor
150 // no need to delete hits, this is taken care of by the destructor of TDetector
151 for(auto& hit : fAddbackHits) {
152 delete hit;
153 }
154 for(auto& hit : fSuppressedHits) {
155 delete hit;
156 }
157 for(auto& hit : fSuppressedAddbackHits) {
158 delete hit;
159 }
160}
161
162void TGriffin::Clear(Option_t* opt)
163{
164 // Clears the mother, and all of the hits
165 ClearStatus();
167 // hits cleared by TDetector::Clear
168 for(auto& hit : fAddbackHits) {
169 delete hit;
170 }
171 for(auto& hit : fSuppressedHits) {
172 delete hit;
173 }
174 for(auto& hit : fSuppressedAddbackHits) {
175 delete hit;
176 }
177 fAddbackHits.clear();
178 fAddbackFrags.clear();
179 fSuppressedHits.clear();
182
183 fCycleStart = 0;
184}
185
186void TGriffin::Print(Option_t*) const
187{
188 Print(std::cout);
189}
190
191void TGriffin::Print(std::ostream& out) const
192{
193 std::ostringstream str;
194 str << "Griffin Contains: " << std::endl;
195 str << std::setw(6) << GetMultiplicity() << " hits" << std::endl;
196 //if(TString(opt).Contains("all", TString::ECaseCompare::kIgnoreCase)) {
197 for(const auto& hit : Hits()) {
198 static_cast<TGriffinHit*>(hit)->Print(str);
199 }
200 //}
201
202 if(IsAddbackSet()) {
203 str << std::setw(6) << fAddbackHits.size() << " addback hits" << std::endl;
204 } else {
205 str << std::setw(6) << " "
206 << " Addback not set" << std::endl;
207 }
208
209 str << std::setw(6) << " "
210 << " Cross-talk Set? " << IsCrossTalkSet() << std::endl;
211 str << std::setw(6) << fCycleStart << " cycle start" << std::endl;
212 out << str.str();
213}
214
216{
217 rhs.Copy(*this);
218 return *this;
219}
220
225
230
231void TGriffin::SetAddback(const bool flag) const
232{
234}
235
236void TGriffin::SetCrossTalk(const bool flag) const
237{
239}
240
242{
243 /// Get Griffin hit indicated by index i.
244 /// Throws an out of range exception if the index is out of the range of the hit vector.
245 /// Applies cross-talk corrections if they haven't already been applied and are enabled.
246 /// Note: This is different from using TDetector::GetHit and casting the result to a `TGriffinHit*`
247 /// as in that case no cross-talk corrections are applied.
248 try {
249 if(!IsCrossTalkSet()) {
250 FixCrossTalk();
251 }
252 return static_cast<TGriffinHit*>(Hits().at(i));
253 } catch(const std::out_of_range& oor) {
254 std::cerr << ClassName() << " Hits are out of range: " << oor.what() << std::endl;
255 if(!gInterpreter) {
256 throw grsi::exit_exception(1);
257 }
258 }
259 return nullptr;
260}
261
263{
264 // Automatically builds the addback hits using the fAddbackCriterion (if the size of the fAddbackHits vector is zero)
265 // and return the number of addback hits.
266 if(!IsCrossTalkSet()) {
267 // Calculate Cross Talk on each hit
268 FixCrossTalk();
269 }
270 auto& hitVector = Hits();
271 if(hitVector.empty()) {
272 return 0;
273 }
274 // if the addback has been reset, clear the addback hits
275 if(!IsAddbackSet()) {
276 ResetAddback();
277 }
278 if(fAddbackHits.empty()) {
280 SetAddback(true);
281 }
282
283 return fAddbackHits.size();
284}
285
287{
288 if(i < GetAddbackMultiplicity()) {
289 return static_cast<TGriffinHit*>(fAddbackHits[i]);
290 }
291 std::cerr << "Addback hits are out of range" << std::endl;
292 throw grsi::exit_exception(1);
293 return nullptr;
294}
295
296void TGriffin::AddFragment(const std::shared_ptr<const TFragment>& frag, TChannel* chan)
297{
298 // Builds the GRIFFIN Hits directly from the TFragment. Basically, loops through the hits for an event and sets
299 // observables.
300 // This is done for both GRIFFIN and it's suppressors.
301 if(frag == nullptr || chan == nullptr) {
302 return;
303 }
304 const TMnemonic* mnemonic = chan->GetMnemonic();
305 if(mnemonic == nullptr) {
306 std::cerr << "Trying to add fragment to TGriffin w/o mnemonic in TChannel!" << std::endl;
307 return;
308 }
309
310 if(mnemonic->SubSystem() != TMnemonic::EMnemonic::kG) {
311 std::cerr << __PRETTY_FUNCTION__ << ": not a GRIFFIN detector: " << static_cast<std::underlying_type_t<TMnemonic::EMnemonic>>(mnemonic->SubSystem()) << std::endl; // NOLINT(cppcoreguidelines-pro-bounds-array-to-pointer-decay)
312 return;
313 }
314
315 // only create the hit if we have a HPGe signal (A), not a suppressor (S) or backup HPGe signal (B)
316 switch(mnemonic->OutputSensor()) {
318 auto* hit = new TGriffinHit(*frag);
319 AddHit(hit);
320 } break;
322 break;
323 default:
324 std::cout << "output sensor " << static_cast<std::underlying_type_t<TMnemonic::EMnemonic>>(mnemonic->OutputSensor()) << ", skipping it" << std::endl;
325 break;
326 };
327}
328
329TVector3 TGriffin::GetPosition(int DetNbr, int CryNbr, double dist)
330{
331 // Gets the position vector for a crystal specified by CryNbr within Clover DetNbr at a distance of dist mm away.
332 // This is calculated to the most likely interaction point within the crystal.
333 if(DetNbr > 16) {
334 return {0, 0, 1};
335 }
336
337 TVector3 temp_pos(fCloverPosition[DetNbr]);
338
339 // Interaction points may eventually be set externally. May make these members of each crystal, or pass from
340 // waveforms.
341 Double_t cp = 26.0; // Crystal Center Point mm.
342 Double_t id = 45.0; // 45.0; //Crystal interaction depth mm.
343 // Set Theta's of the center of each DETECTOR face
344 ////Define one Detector position
345 TVector3 shift;
346 switch(CryNbr) {
347 case 0: shift.SetXYZ(-cp, cp, id); break;
348 case 1: shift.SetXYZ(cp, cp, id); break;
349 case 2: shift.SetXYZ(cp, -cp, id); break;
350 case 3: shift.SetXYZ(-cp, -cp, id); break;
351 default: shift.SetXYZ(0, 0, 1); break;
352 };
353 shift.RotateY(temp_pos.Theta());
354 shift.RotateZ(temp_pos.Phi());
355
356 temp_pos.SetMag(dist);
357
358 return (temp_pos + shift);
359}
360
362{
363 // Gets the position vector for a Clover DetNbr.
364 if(DetNbr > 16) {
365 return {0, 0, 1};
366 }
367
368 return fCloverPosition[DetNbr];
369}
370
372{
373 fGriffinBits = 0;
374}
375
377{
378 SetAddback(false);
379 SetCrossTalk(false);
380 for(auto& hit : fAddbackHits) {
381 delete hit;
382 }
383 fAddbackHits.clear();
384 fAddbackFrags.clear();
385}
386
387UShort_t TGriffin::GetNAddbackFrags(const size_t& idx)
388{
389 // Get the number of addback "fragments" contributing to the total addback hit
390 // with index idx.
391 if(idx < fAddbackFrags.size()) {
392 return fAddbackFrags[idx];
393 }
394 return 0;
395}
396
397void TGriffin::SetBitNumber(enum EGriffinBits bit, Bool_t set) const
398{
399 // Used to set the flags that are stored in TGriffin.
400 fGriffinBits.SetBit(bit, set);
401}
402
403Double_t TGriffin::CTCorrectedEnergy(const TGriffinHit* const hit_to_correct, const TGriffinHit* const other_hit,
404 Bool_t time_constraint)
405{
406 if((hit_to_correct == nullptr) || (other_hit == nullptr)) {
407 std::cerr << "One of the hits is invalid in TGriffin::CTCorrectedEnergy" << std::endl;
408 return 0;
409 }
410
411 if(time_constraint) {
412 // Figure out if this passes the selected window
413 if(TMath::Abs(other_hit->GetTime() - hit_to_correct->GetTime()) >
414 TGRSIOptions::AnalysisOptions()->AddbackWindow()) { // placeholder
415 return hit_to_correct->GetEnergy();
416 }
417 }
418
419 if(hit_to_correct->GetDetector() != other_hit->GetDetector()) {
420 return hit_to_correct->GetEnergy();
421 }
422 static std::array<bool, 256> been_warned = {false};
423 double fixed_energy = hit_to_correct->GetEnergy();
424 try {
425 if(hit_to_correct->GetChannel() != nullptr) {
426 fixed_energy -= hit_to_correct->GetChannel()->GetCTCoeff().at(other_hit->GetCrystal()) * other_hit->GetNoCTEnergy();
427 }
428 } catch(const std::out_of_range& oor) {
429 int id = 16 * hit_to_correct->GetDetector() + 4 * hit_to_correct->GetCrystal() + other_hit->GetCrystal();
430 if(!been_warned[id]) {
431 been_warned[id] = true;
432 std::cerr << DRED << "Missing CT correction for Det: " << hit_to_correct->GetDetector()
433 << " Crystals: " << hit_to_correct->GetCrystal() << " " << other_hit->GetCrystal() << " (id " << id << ")" << RESET_COLOR << std::endl;
434 }
435 return hit_to_correct->GetEnergy();
436 }
437
438 return fixed_energy;
439}
440
442{
443 if(!TGRSIOptions::AnalysisOptions()->IsCorrectingCrossTalk()) { return; }
444
445 auto& hitVector = Hits();
446 if(hitVector.size() < 2) {
447 SetCrossTalk(true);
448 return;
449 }
450 for(auto& hit : hitVector) {
451 static_cast<TGriffinHit*>(hit)->ClearEnergy();
452 }
453
454 for(auto& one : hitVector) {
455 for(auto& two : hitVector) {
456 one->SetEnergy(CTCorrectedEnergy(static_cast<TGriffinHit*>(one), static_cast<TGriffinHit*>(two)));
457 }
458 }
459 SetCrossTalk(true);
460}
461
462const char* TGriffin::GetColorFromNumber(int number)
463{
464 switch(number) {
465 case(0): return "B";
466 case(1): return "G";
467 case(2): return "R";
468 case(3): return "W";
469 };
470 return "X";
471}
472
477
482
484{
485 try {
486 if(!IsCrossTalkSet()) {
487 FixCrossTalk();
488 }
489 return static_cast<TGriffinHit*>(fSuppressedHits.at(i));
490 } catch(const std::out_of_range& oor) {
491 std::cerr << ClassName() << " Suppressed hits are out of range: " << oor.what() << std::endl;
492 if(!gInterpreter) {
493 throw grsi::exit_exception(1);
494 }
495 }
496 return nullptr;
497}
498
500{
501 /// Automatically builds the suppressed hits using the fSuppressionCriterion and returns the number of suppressed hits
502 if(!IsCrossTalkSet()) {
503 // Calculate Cross Talk on each hit
504 FixCrossTalk();
505 }
506 auto& hitVector = Hits();
507 if(hitVector.empty()) {
508 return 0;
509 }
510 // if the suppressed has been reset, clear the suppressed hits
511 if(!IsSuppressed()) {
513 }
514 if(fSuppressedHits.empty()) {
515 CreateSuppressed(bgo, hitVector, fSuppressedHits);
516 SetSuppressed(true);
517 }
518
519 return fSuppressedHits.size();
520}
521
522void TGriffin::SetSuppressed(const bool flag) const
523{
525}
526
528{
529 SetSuppressed(false);
530 for(auto& hit : fSuppressedHits) {
531 delete hit;
532 }
533 fSuppressedHits.clear();
534}
535
537{
538 try {
539 if(!IsCrossTalkSet()) {
540 FixCrossTalk();
541 }
542 return static_cast<TGriffinHit*>(fSuppressedAddbackHits.at(i));
543 } catch(const std::out_of_range& oor) {
544 std::cerr << ClassName() << " Suppressed addback hits are out of range: " << oor.what() << std::endl;
545 if(!gInterpreter) {
546 throw grsi::exit_exception(1);
547 }
548 }
549 return nullptr;
550}
551
553{
554 /// Automatically builds the suppressed addback hits using the fAddbackCriterion (if the size of the fAddbackHits vector is zero)
555 /// and return the number of suppressed addback hits.
556 if(!IsCrossTalkSet()) {
557 // Calculate Cross Talk on each hit
558 FixCrossTalk();
559 }
560 auto& hitVector = Hits();
561 if(hitVector.empty()) {
562 return 0;
563 }
564 // if the addback has been reset, clear the addback hits
567 }
568 if(fSuppressedAddbackHits.empty()) {
571 }
572
573 return fSuppressedAddbackHits.size();
574}
575
580
582{
584 for(auto& hit : fSuppressedAddbackHits) {
585 delete hit;
586 }
589}
590
591UShort_t TGriffin::GetNSuppressedAddbackFrags(const size_t& idx)
592{
593 try {
594 return fSuppressedAddbackFrags.at(idx);
595 } catch(const std::out_of_range& oor) {
596 std::cerr << ClassName() << " Suppressed addback frags are out of range: " << oor.what() << std::endl;
597 if(!gInterpreter) {
598 throw grsi::exit_exception(1);
599 }
600 }
601 return 0;
602}
#define DRED
Definition Globals.h:18
#define RESET_COLOR
Definition Globals.h:5
bool DefaultGriffinAddback(const TDetectorHit *one, const TDetectorHit *two)
Definition TGriffin.cxx:23
bool DefaultGriffinSuppression(const TDetectorHit *hit, const TDetectorHit *bgoHit)
Definition TGriffin.cxx:31
double SuppressionWindow() const
double AddbackWindow() const
double SuppressionEnergy() const
Definition TBgo.h:16
std::vector< double > GetCTCoeff() const
Definition TChannel.h:194
const TMnemonic * GetMnemonic() const
virtual double GetEnergy(Option_t *opt="") const
virtual Int_t GetCrystal() const
!
TChannel * GetChannel() const
!
virtual Int_t GetDetector() const
!
virtual Double_t GetTime(const ETimeFlag &correct_flag=ETimeFlag::kAll, Option_t *opt="") const
Returns a time value to the nearest nanosecond!
virtual Short_t GetMultiplicity() const
Definition TDetector.h:70
std::vector< TDetectorHit * > & Hits()
Definition TDetector.h:74
virtual void AddHit(TDetectorHit *hit)
Definition TDetector.h:60
static TAnalysisOptions * AnalysisOptions()
Double_t GetNoCTEnergy(Option_t *opt="") const
bool IsSuppressedAddbackSet() const
Definition TGriffin.cxx:478
void ResetSuppressedAddback()
Definition TGriffin.cxx:581
static const char * GetColorFromNumber(int number)
Definition TGriffin.cxx:462
std::vector< TDetectorHit * > fSuppressedHits
! The set of suppressed crystal hits
Definition TGriffin.h:119
void Clear(Option_t *opt="all") override
!
Definition TGriffin.cxx:162
TGriffinHit * GetAddbackHit(const int &i)
Definition TGriffin.cxx:286
Short_t GetAddbackMultiplicity()
Definition TGriffin.cxx:262
static std::function< bool(const TDetectorHit *, const TDetectorHit *)> fAddbackCriterion
Definition TGriffin.h:109
std::vector< TDetectorHit * > fSuppressedAddbackHits
! Used to create suppressed addback hits on the fly
Definition TGriffin.h:121
void Print(Option_t *opt="") const override
!
Definition TGriffin.cxx:186
int64_t fCycleStart
! The start of the cycle
Definition TGriffin.h:113
static std::array< TVector3, 17 > fCloverPosition
! Position of each HPGe Clover
Definition TGriffin.h:53
static TVector3 GetPosition(int DetNbr, int CryNbr=5, double dist=110.0)
!
Definition TGriffin.cxx:329
void ResetAddback()
!
Definition TGriffin.cxx:376
void ClearStatus() const
!
Definition TGriffin.h:125
UShort_t GetNSuppressedAddbackFrags(const size_t &idx)
Definition TGriffin.cxx:591
std::vector< TDetectorHit * > fAddbackHits
! Used to create addback hits on the fly
Definition TGriffin.h:116
~TGriffin() override
Definition TGriffin.cxx:147
UShort_t GetNAddbackFrags(const size_t &idx)
Definition TGriffin.cxx:387
TGriffinHit * GetSuppressedAddbackHit(const int &i)
Definition TGriffin.cxx:536
bool IsAddbackSet() const
Definition TGriffin.cxx:221
void ResetFlags() const
Definition TGriffin.cxx:371
TGriffin & operator=(const TGriffin &)
!
Definition TGriffin.cxx:215
TTransientBits< UChar_t > fGriffinBits
Definition TGriffin.h:114
void SetSuppressed(bool flag=true) const
Definition TGriffin.cxx:522
static std::function< bool(const TDetectorHit *, const TDetectorHit *)> fSuppressionCriterion
Definition TGriffin.h:110
Short_t GetSuppressedMultiplicity(const TBgo *bgo)
Definition TGriffin.cxx:499
Short_t GetSuppressedAddbackMultiplicity(const TBgo *bgo)
Definition TGriffin.cxx:552
void SetBitNumber(EGriffinBits bit, Bool_t set) const
Definition TGriffin.cxx:397
void ResetSuppressed()
Definition TGriffin.cxx:527
void FixCrossTalk()
Definition TGriffin.cxx:441
void SetSuppressedAddback(bool flag=true) const
Definition TGriffin.cxx:576
void AddFragment(const std::shared_ptr< const TFragment > &, TChannel *) override
!
Definition TGriffin.cxx:296
bool IsSuppressed() const
Definition TGriffin.cxx:473
TGriffinHit * GetSuppressedHit(const int &i)
!
Definition TGriffin.cxx:483
std::vector< UShort_t > fAddbackFrags
! Number of crystals involved in creating in the addback hit
Definition TGriffin.h:117
void SetAddback(bool flag=true) const
Definition TGriffin.cxx:231
TGriffinHit * GetGriffinHit(const int &i)
!
Definition TGriffin.cxx:241
static Double_t CTCorrectedEnergy(const TGriffinHit *hit_to_correct, const TGriffinHit *other_hit, bool time_constraint=true)
Definition TGriffin.cxx:403
static TVector3 GetDetectorPosition(int DetNbr)
!
Definition TGriffin.cxx:361
Bool_t IsCrossTalkSet() const
Definition TGriffin.cxx:226
Bool_t TestBitNumber(EGriffinBits bit) const
Definition TGriffin.h:127
std::vector< UShort_t > fSuppressedAddbackFrags
! Number of crystals involved in creating in the suppressed addback hit
Definition TGriffin.h:122
void Copy(TObject &) const override
!
Definition TGriffin.cxx:121
void SetCrossTalk(bool flag=true) const
Definition TGriffin.cxx:236
virtual EMnemonic OutputSensor() const
Definition TMnemonic.h:66
virtual EMnemonic SubSystem() const
Definition TMnemonic.h:62
void Clear(Option_t *opt="all") override
!
void Copy(TObject &) const override
!
void CreateAddback(const std::vector< T * > &hits, std::vector< T * > &addbacks, std::vector< UShort_t > &nofFragments)
Definition TSuppressed.h:38
void CreateSuppressed(const TBgo *bgo, const std::vector< T * > &hits, std::vector< T * > &suppressedHits)
Definition TSuppressed.h:69
void CreateSuppressedAddback(const TBgo *bgo, const std::vector< T * > &hits, std::vector< T * > &addbacks, std::vector< UShort_t > &nofFragments)
Definition TSuppressed.h:94
void SetBit(T bit, Bool_t flag)