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