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