GRSISort "v4.0.0.5"
An extension of the ROOT analysis Framework
Loading...
Searching...
No Matches
TIfin.cxx
Go to the documentation of this file.
1#include "TIfin.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
14bool DefaultIfinAddback(const TDetectorHit* one, const TDetectorHit* two)
15{
16 return ((one->GetDetector() == two->GetDetector()) &&
17 (std::fabs(one->GetTime() - two->GetTime()) < TGRSIOptions::AnalysisOptions()->AddbackWindow()));
18}
19
20std::function<bool(const TDetectorHit*, const TDetectorHit*)> TIfin::fAddbackCriterion = DefaultIfinAddback;
21
22bool DefaultIfinSuppression(const TDetectorHit* hit, const TDetectorHit* bgoHit)
23{
24 return ((hit->GetDetector() == bgoHit->GetDetector()) &&
25 (std::fabs(hit->GetTime() - bgoHit->GetTime()) < TGRSIOptions::AnalysisOptions()->SuppressionWindow()) &&
27}
28
30
31// Ifin detector locations.
32// Angles are in ISO standard
33// x = cos(theta)*sin(phi) // Points port
34// y = sin(theta)*sin(phi) // Points upwards
35// z = sin(theta) // Points in the direction of the neutrons
36// TVector(x,y,z)
37// TODO: Add link to picture showing detector positions when uploaded
38TVector3 TIfin::gCloverPosition[17] = {
39 TVector3(TMath::Sin(TMath::DegToRad() * (0.0)) * TMath::Cos(TMath::DegToRad() * (0.0)),
40 TMath::Sin(TMath::DegToRad() * (0.0)) * TMath::Sin(TMath::DegToRad() * (0.0)),
41 TMath::Cos(TMath::DegToRad() * (0.0))), // Zeroth Position
42 // Corona
43 TVector3(TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Cos(TMath::DegToRad() * (90.0)),
44 TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Sin(TMath::DegToRad() * (90.0)),
45 TMath::Cos(TMath::DegToRad() * (90.0))), // Ifin Pos 0
46 TVector3(TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Cos(TMath::DegToRad() * (45.0)),
47 TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Sin(TMath::DegToRad() * (45.0)),
48 TMath::Cos(TMath::DegToRad() * (90.0))), // Ifin Pos 1
49 TVector3(TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Cos(TMath::DegToRad() * (0.0)),
50 TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Sin(TMath::DegToRad() * (0.0)),
51 TMath::Cos(TMath::DegToRad() * (90.0))), // Ifin Pos 2
52 TVector3(TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Cos(TMath::DegToRad() * (315.0)),
53 TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Sin(TMath::DegToRad() * (315.0)),
54 TMath::Cos(TMath::DegToRad() * (90.0))), // Ifin Pos 3
55 TVector3(TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Cos(TMath::DegToRad() * (270.0)),
56 TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Sin(TMath::DegToRad() * (270.0)),
57 TMath::Cos(TMath::DegToRad() * (90.0))), // Ifin Pos 4
58 TVector3(TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Cos(TMath::DegToRad() * (225.0)),
59 TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Sin(TMath::DegToRad() * (225.0)),
60 TMath::Cos(TMath::DegToRad() * (90.0))), // Ifin Pos 5
61 TVector3(TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Cos(TMath::DegToRad() * (180.0)),
62 TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Sin(TMath::DegToRad() * (180.0)),
63 TMath::Cos(TMath::DegToRad() * (90.0))), // Ifin Pos 6
64 TVector3(TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Cos(TMath::DegToRad() * (135.0)),
65 TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Sin(TMath::DegToRad() * (135.0)),
66 TMath::Cos(TMath::DegToRad() * (90.0))), // Ifin Pos 7
67 // Downstream lampshade
68 TVector3(TMath::Sin(TMath::DegToRad() * (45.0)) * TMath::Cos(TMath::DegToRad() * (90.0)),
69 TMath::Sin(TMath::DegToRad() * (45.0)) * TMath::Sin(TMath::DegToRad() * (90.0)),
70 TMath::Cos(TMath::DegToRad() * (45.0))), // Ifin Pos 8
71 TVector3(TMath::Sin(TMath::DegToRad() * (45.0)) * TMath::Cos(TMath::DegToRad() * (0.0)),
72 TMath::Sin(TMath::DegToRad() * (45.0)) * TMath::Sin(TMath::DegToRad() * (0.0)),
73 TMath::Cos(TMath::DegToRad() * (45.0))), // Ifin Pos 9
74 TVector3(TMath::Sin(TMath::DegToRad() * (45.0)) * TMath::Cos(TMath::DegToRad() * (270.0)),
75 TMath::Sin(TMath::DegToRad() * (45.0)) * TMath::Sin(TMath::DegToRad() * (270.0)),
76 TMath::Cos(TMath::DegToRad() * (45.0))), // Ifin Pos 10
77 TVector3(TMath::Sin(TMath::DegToRad() * (45.0)) * TMath::Cos(TMath::DegToRad() * (180.0)),
78 TMath::Sin(TMath::DegToRad() * (45.0)) * TMath::Sin(TMath::DegToRad() * (180.0)),
79 TMath::Cos(TMath::DegToRad() * (45.0))), // Ifin Pos 11
80 // Upstream lampshade
81 TVector3(TMath::Sin(TMath::DegToRad() * (135.0)) * TMath::Cos(TMath::DegToRad() * (90.0)),
82 TMath::Sin(TMath::DegToRad() * (135.0)) * TMath::Sin(TMath::DegToRad() * (90.0)),
83 TMath::Cos(TMath::DegToRad() * (135.0))), // G: 13 F: 12
84 TVector3(TMath::Sin(TMath::DegToRad() * (135.0)) * TMath::Cos(TMath::DegToRad() * (0.0)),
85 TMath::Sin(TMath::DegToRad() * (135.0)) * TMath::Sin(TMath::DegToRad() * (0.0)),
86 TMath::Cos(TMath::DegToRad() * (135.0))), // G: 16 F: 13
87 TVector3(TMath::Sin(TMath::DegToRad() * (135.0)) * TMath::Cos(TMath::DegToRad() * (270.0)),
88 TMath::Sin(TMath::DegToRad() * (135.0)) * TMath::Sin(TMath::DegToRad() * (270.0)),
89 TMath::Cos(TMath::DegToRad() * (135.0))), // G: 15 F: 14
90 TVector3(TMath::Sin(TMath::DegToRad() * (135.0)) * TMath::Cos(TMath::DegToRad() * (180.0)),
91 TMath::Sin(TMath::DegToRad() * (135.0)) * TMath::Sin(TMath::DegToRad() * (180.0)),
92 TMath::Cos(TMath::DegToRad() * (135.0))) // G: 14 F: 15
93};
94
95// Cross Talk stuff
96const Double_t TIfin::gStrongCT[2] = {-0.02674, -0.000977}; // This is for the 0-1 and 2-3 combination
97const Double_t TIfin::gWeakCT[2] = {0.005663, -0.00028014};
98const Double_t TIfin::gCrossTalkPar[2][4][4] = {{{0.0, gStrongCT[0], gWeakCT[0], gWeakCT[0]},
99 {gStrongCT[0], 0.0, gWeakCT[0], gWeakCT[0]},
100 {gWeakCT[0], gWeakCT[0], 0.0, gStrongCT[0]},
101 {gWeakCT[0], gWeakCT[0], gStrongCT[0], 0.0}},
102 {{0.0, gStrongCT[1], gWeakCT[1], gWeakCT[1]},
103 {gStrongCT[1], 0.0, gWeakCT[1], gWeakCT[1]},
104 {gWeakCT[1], gWeakCT[1], 0.0, gStrongCT[1]},
105 {gWeakCT[1], gWeakCT[1], gStrongCT[1], 0.0}}};
106
108{
109// Default ctor. Ignores TObjectStreamer in ROOT < 6
110#if MAJOR_ROOT_VERSION < 6
111 Class()->IgnoreTObjectStreamer(kTRUE);
112#endif
113 Clear();
114}
115
117{
118// Copy ctor. Ignores TObjectStreamer in ROOT < 6
119#if MAJOR_ROOT_VERSION < 6
120 Class()->IgnoreTObjectStreamer(kTRUE);
121#endif
122 rhs.Copy(*this);
123}
124
125void TIfin::Copy(TObject& rhs) const
126{
127 // Copy function.
129
130 for(auto& hit : static_cast<TIfin&>(rhs).fAddbackHits) delete hit;
131 for(auto& hit : static_cast<TIfin&>(rhs).fSuppressedHits) delete hit;
132 for(auto& hit : static_cast<TIfin&>(rhs).fSuppressedAddbackHits) delete hit;
133
134 static_cast<TIfin&>(rhs).fAddbackHits.clear();
135 static_cast<TIfin&>(rhs).fAddbackFrags.clear();
136 static_cast<TIfin&>(rhs).fSuppressedHits.clear();
137 static_cast<TIfin&>(rhs).fSuppressedAddbackHits.clear();
138 static_cast<TIfin&>(rhs).fSuppressedAddbackFrags.clear();
139 static_cast<TIfin&>(rhs).fIfinBits = 0;
140}
141
143{
144 // Default Destructor
145
146 // fHits automatically deleted in TDetector
147 for(auto& hit : fAddbackHits) delete hit;
148 for(auto& hit : fSuppressedHits) delete hit;
149 for(auto& hit : fSuppressedAddbackHits) delete hit;
150}
151
152void TIfin::Clear(Option_t* opt)
153{
154 // Clears the mother, and all of the hits
155 ClearStatus();
157
158 for(auto& hit : fAddbackHits) delete hit;
159 for(auto& hit : fSuppressedHits) delete hit;
160 for(auto& hit : fSuppressedAddbackHits) delete hit;
161
162 fAddbackHits.clear();
163 fSuppressedHits.clear();
165 fAddbackFrags.clear();
167}
168
169void TIfin::Print(Option_t*) const
170{
171 Print(std::cout);
172}
173
174void TIfin::Print(std::ostream& out) const
175{
176 std::ostringstream str;
177 str << "Ifin Contains: " << std::endl;
178 str << std::setw(6) << GetMultiplicity() << " hits" << std::endl;
179
180 if(IsAddbackSet()) {
181 str << std::setw(6) << fAddbackHits.size() << " addback hits" << std::endl;
182 } else {
183 str << std::setw(6) << " "
184 << " Addback not set" << std::endl;
185 }
186
187 str << std::setw(6) << " "
188 << " Cross-talk Set? " << IsCrossTalkSet() << std::endl;
189 out << str.str();
190}
191
193{
194 rhs.Copy(*this);
195 return *this;
196}
197
198std::vector<TDetectorHit*>& TIfin::GetAddbackVector()
199{
200 return fAddbackHits;
201}
202
203std::vector<UShort_t>& TIfin::GetAddbackFragVector()
204{
205 return fAddbackFrags;
206}
207
208std::vector<TDetectorHit*>& TIfin::GetSuppressedVector()
209{
210 return fSuppressedHits;
211}
212
213std::vector<TDetectorHit*>& TIfin::GetSuppressedAddbackVector()
214{
216}
217
219{
221}
222
227
232
237
242
243void TIfin::SetAddback(const Bool_t flag) const
244{
246}
247
248void TIfin::SetCrossTalk(const Bool_t flag) const
249{
251}
252
253void TIfin::SetSuppressed(const Bool_t flag) const
254{
256}
257
258void TIfin::SetSuppressedAddback(const Bool_t flag) const
259{
261}
262
264{
265 try {
266 if(!IsCrossTalkSet()) {
267 FixCrossTalk();
268 }
269 return static_cast<TIfinHit*>(Hits().at(i));
270 } catch(const std::out_of_range& oor) {
271 std::cerr << ClassName() << " Hits are out of range: " << oor.what() << std::endl;
272 if(!gInterpreter) {
273 throw grsi::exit_exception(1);
274 }
275 }
276 return nullptr;
277}
278
280{
281 try {
282 if(!IsCrossTalkSet()) {
283 FixCrossTalk();
284 }
285 return static_cast<TIfinHit*>(fSuppressedHits.at(i));
286 } catch(const std::out_of_range& oor) {
287 std::cerr << ClassName() << "Suppressed hits are out of range: " << oor.what() << std::endl;
288 if(!gInterpreter) {
289 throw grsi::exit_exception(1);
290 }
291 }
292 return nullptr;
293}
294
296{
297 /// Automatically builds the suppressed hits using the fSuppressionCriterion and returns the number of suppressed hits
298 if(!IsCrossTalkSet()) {
299 // Calculate Cross Talk on each hit
300 FixCrossTalk();
301 }
302 auto& hit_vec = GetHitVector();
303 auto& sup_vec = GetSuppressedVector();
304 if(hit_vec.empty()) {
305 return 0;
306 }
307 // if the suppressed has been reset, clear the suppressed hits
308 if(!IsSuppressed()) {
309 for(auto& hit : sup_vec) {
310 delete hit;
311 }
312 sup_vec.clear();
313 }
314 if(sup_vec.empty()) {
315 CreateSuppressed(bgo, hit_vec, sup_vec);
316 SetSuppressed(true);
317 }
318
319 return sup_vec.size();
320}
321
323{
324 // Automatically builds the addback hits using the fAddbackCriterion (if
325 // the size of the fAddbackHits vector is zero) and return the number of
326 // addback hits.
327 if(!IsCrossTalkSet()) {
328 FixCrossTalk();
329 }
330 auto& hit_vec = GetHitVector();
331 auto& ab_vec = GetAddbackVector();
332 auto& frag_vec = GetAddbackFragVector();
333 if(hit_vec.empty()) {
334 return 0;
335 }
336
337 // if the addback has been reset, clear the addback hits
338 if(!IsAddbackSet()) {
339 for(auto& hit : ab_vec) {
340 delete hit;
341 }
342 ab_vec.clear();
343 frag_vec.clear();
344 }
345 if(ab_vec.empty()) {
346 CreateAddback(hit_vec, ab_vec, frag_vec);
347 SetAddback(true);
348 }
349
350 return ab_vec.size();
351}
352
354{
355 // Automatically builds the addback hits using the fAddbackCriterion (if
356 // the size of the fAddbackHits vector is zero) and return the number of
357 // addback hits.
358 if(!IsCrossTalkSet()) {
359 FixCrossTalk();
360 }
361 auto& hit_vec = GetHitVector();
362 auto& ab_vec = GetSuppressedAddbackVector();
363 auto& frag_vec = GetSuppressedAddbackFragVector();
364 if(hit_vec.empty()) {
365 return 0;
366 }
367
368 // if the addback has been reset, clear the addback hits
370 for(auto& hit : ab_vec) {
371 delete hit;
372 }
373 ab_vec.clear();
374 frag_vec.clear();
375 }
376 if(ab_vec.empty()) {
377 CreateSuppressedAddback(bgo, hit_vec, ab_vec, frag_vec);
379 }
380
381 return ab_vec.size();
382}
383
385{
386 try {
387 if(!IsCrossTalkSet()) {
388 FixCrossTalk();
389 }
390 return static_cast<TIfinHit*>(GetAddbackVector().at(i));
391 } catch(const std::out_of_range& oor) {
392 std::cerr << ClassName() << " Addback hits are out of range: " << oor.what() << std::endl;
393 if(!gInterpreter) {
394 throw grsi::exit_exception(1);
395 }
396 }
397 return nullptr;
398}
399
401{
402 try {
403 if(!IsCrossTalkSet()) {
404 FixCrossTalk();
405 }
406 return static_cast<TIfinHit*>(GetSuppressedAddbackVector().at(i));
407 } catch(const std::out_of_range& oor) {
408 std::cerr << ClassName() << " Suppressed addback hits are out of range: " << oor.what() << std::endl;
409 if(!gInterpreter) {
410 throw grsi::exit_exception(1);
411 }
412 }
413 return nullptr;
414}
415
416void TIfin::AddFragment(const std::shared_ptr<const TFragment>& frag, TChannel* chan)
417{
418 // Builds the FIPPS Hits directly from the TFragment. Basically, loops through the hits for an event and sets
419 // observables.
420 // This is done for both FIPPS and it's suppressors.
421 if(frag == nullptr || chan == nullptr) {
422 return;
423 }
424
425 switch(chan->GetMnemonic()->SubSystem()) {
427 auto geHit = new TIfinHit(*frag);
428 Hits().push_back(std::move(geHit));
429 } break;
430 default:
431 break;
432 };
433}
434
435TVector3 TIfin::GetPosition(int DetNbr, int CryNbr, double dist)
436{
437 // Gets the position vector for a crystal specified by CryNbr within Clover DetNbr at a distance of dist mm away.
438 // This is calculated to the most likely interaction point within the crystal.
439 if(DetNbr > 16) {
440 return TVector3(0, 0, 1);
441 }
442
443 TVector3 CloverPosition(gCloverPosition[DetNbr]);
444
445 // XAxis: Array's Port
446 // YAxis: Upwards
447 // ZAxis: Points in the neutron beam direction
448
449 // Interaction points may eventually be set externally. May make these members of each crystal, or pass from
450 // waveforms.
451 Double_t cp = 17.678; //25.0; // Crystal Center Point mm. (diameter 50mm)
452 Double_t id = 40.0; // Crystal interaction depth mm. (length 80mm)
453 // Set Theta's of the center of each DETECTOR face
454 ////Define one Detector position
455 TVector3 CrystalPosition;
456 switch(CryNbr) {
457 case 0: CrystalPosition.SetXYZ(-cp, cp, id); break; // BLUE
458 case 1: CrystalPosition.SetXYZ(cp, cp, id); break; // GREEN
459 case 2: CrystalPosition.SetXYZ(cp, -cp, id); break; // RED
460 case 3: CrystalPosition.SetXYZ(-cp, -cp, id); break; // WHITE
461 default: CrystalPosition.SetXYZ(0, 0, 1); break;
462 };
463 // Rotate counterclockwise from the downstream position
464 CrystalPosition.RotateY(CloverPosition.Theta());
465 // Rotate around the neutron beam
466 CrystalPosition.RotateZ(CloverPosition.Phi());
467 // Set distance of detector from target
468 CloverPosition.SetMag(dist);
469
470 return (CloverPosition + CrystalPosition);
471}
472
474{
475 fIfinBits = 0;
476}
477
479{
480 SetAddback(false);
481 SetCrossTalk(false);
482 for(auto& hit : GetAddbackVector()) {
483 delete hit;
484 }
485 GetAddbackVector().clear();
486 GetAddbackFragVector().clear();
487}
488
490{
491 SetSuppressed(false);
492 for(auto& hit : GetSuppressedVector()) {
493 delete hit;
494 }
495 GetSuppressedVector().clear();
496}
497
499{
501 SetCrossTalk(false);
502 for(auto& hit : GetSuppressedAddbackVector()) {
503 delete hit;
504 }
507}
508
509UShort_t TIfin::GetNAddbackFrags(const size_t& idx)
510{
511 // Get the number of addback "fragments" contributing to the total addback hit
512 // with index idx.
513 if(idx < GetAddbackFragVector().size()) {
514 return GetAddbackFragVector().at(idx);
515 }
516 return 0;
517}
518
519void TIfin::SetBitNumber(enum EIfinBits bit, Bool_t set) const
520{
521 // Used to set the flags that are stored in TIfin.
522 fIfinBits.SetBit(bit, set);
523}
524
525Double_t TIfin::CTCorrectedEnergy(const TIfinHit* const hit_to_correct, const TIfinHit* const other_hit,
526 Bool_t time_constraint)
527{
528 /// Corrects the energy of the hit to correct by ADDING the uncorrected energy of the other hit times the parameter for this combination
529 /// This is different to the very similar TGriffin function that SUBTRACTS instead of ADDING.
530 /// If time_constraint is true it also checks that the two hits are within the addback window to each other.
531 if((hit_to_correct == nullptr) || (other_hit == nullptr)) {
532 std::cerr << "One of the hits is invalid in TIfin::CTCorrectedEnergy" << std::endl;
533 return 0;
534 }
535
536 if(time_constraint) {
537 // Figure out if this passes the selected window
538 if(TMath::Abs(other_hit->GetTime() - hit_to_correct->GetTime()) >
539 TGRSIOptions::AnalysisOptions()->AddbackWindow()) { // placeholder
540 return hit_to_correct->GetEnergy();
541 }
542 }
543
544 if(hit_to_correct->GetDetector() != other_hit->GetDetector()) {
545 return hit_to_correct->GetEnergy();
546 }
547 static bool been_warned[256] = {false};
548 double fixed_energy = hit_to_correct->GetEnergy();
549 try {
550 if(hit_to_correct->GetChannel() != nullptr) {
551 fixed_energy += hit_to_correct->GetChannel()->GetCTCoeff().at(other_hit->GetCrystal()) * other_hit->GetNoCTEnergy();
552 }
553 } catch(const std::out_of_range& oor) {
554 int id = 16 * hit_to_correct->GetDetector() + 4 * hit_to_correct->GetCrystal() + other_hit->GetCrystal();
555 if(!been_warned[id]) {
556 been_warned[id] = true;
557 std::cerr << DRED << "Missing CT correction for Det: " << hit_to_correct->GetDetector()
558 << " Crystals: " << hit_to_correct->GetCrystal() << " " << other_hit->GetCrystal() << " (id " << id << ")" << std::endl;
559 }
560 return hit_to_correct->GetEnergy();
561 }
562
563 return fixed_energy;
564}
565
567{
568 auto hit_vec = GetHitVector();
569 if(hit_vec.size() < 2) {
570 SetCrossTalk(true);
571 return;
572 }
573 for(auto& i : hit_vec) {
574 i->ClearEnergy();
575 }
576
577 if(TGRSIOptions::AnalysisOptions()->IsCorrectingCrossTalk()) {
578 for(auto& one : hit_vec) {
579 for(auto& two : hit_vec) {
580 if(one == two) continue;
581 one->SetEnergy(TIfin::CTCorrectedEnergy(static_cast<TIfinHit*>(one), static_cast<TIfinHit*>(two)));
582 }
583 }
584 }
585 SetCrossTalk(true);
586}
587
588const char* TIfin::GetColorFromNumber(int number)
589{
590 switch(number) {
591 case 0: return "R";
592 case 1: return "W";
593 case 2: return "B";
594 case 3: return "G";
595 }
596 return "X";
597}
#define DRED
Definition Globals.h:18
bool DefaultIfinSuppression(const TDetectorHit *hit, const TDetectorHit *bgoHit)
Definition TIfin.cxx:22
bool DefaultIfinAddback(const TDetectorHit *one, const TDetectorHit *two)
Definition TIfin.cxx:14
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
virtual const std::vector< TDetectorHit * > & GetHitVector() const
Definition TDetector.h:75
std::vector< TDetectorHit * > & Hits()
Definition TDetector.h:78
static TAnalysisOptions * AnalysisOptions()
Double_t GetNoCTEnergy(Option_t *opt="") const
Definition TIfinHit.cxx:102
Definition TIfin.h:32
std::vector< TDetectorHit * > fAddbackHits
! Used to create addback hits on the fly
Definition TIfin.h:109
TIfin()
Definition TIfin.cxx:107
std::vector< TDetectorHit * > & GetAddbackVector()
!
Definition TIfin.cxx:198
void ResetSuppressed()
Definition TIfin.cxx:489
std::vector< UShort_t > fAddbackFrags
! Number of crystals involved in creating the addback hit
Definition TIfin.h:110
void ResetAddback()
Definition TIfin.cxx:478
std::vector< UShort_t > & GetSuppressedAddbackFragVector()
Definition TIfin.cxx:218
std::vector< TDetectorHit * > & GetSuppressedAddbackVector()
Definition TIfin.cxx:213
EIfinBits
Definition TIfin.h:34
static const char * GetColorFromNumber(int number)
Definition TIfin.cxx:588
bool IsAddbackSet() const
Definition TIfin.cxx:223
UShort_t GetNAddbackFrags(const size_t &idx)
Definition TIfin.cxx:509
~TIfin() override
Definition TIfin.cxx:142
Int_t GetSuppressedAddbackMultiplicity(const TBgo *bgo)
Definition TIfin.cxx:353
std::vector< UShort_t > & GetAddbackFragVector()
!
Definition TIfin.cxx:203
Bool_t IsCrossTalkSet() const
Definition TIfin.cxx:228
TIfin & operator=(const TIfin &)
!
Definition TIfin.cxx:192
TIfinHit * GetSuppressedAddbackHit(const int &i)
Definition TIfin.cxx:400
std::vector< TDetectorHit * > fSuppressedAddbackHits
! Used to create suppressed addback hits on the fly
Definition TIfin.h:112
void SetBitNumber(EIfinBits bit, Bool_t set) const
Definition TIfin.cxx:519
TTransientBits< UChar_t > fIfinBits
Definition TIfin.h:107
static TVector3 gCloverPosition[17]
! Position of each HPGe Clover
Definition TIfin.h:38
bool IsSuppressed() const
Definition TIfin.cxx:233
void ClearStatus() const
!
Definition TIfin.h:120
std::vector< TDetectorHit * > fSuppressedHits
! Used to create suppressed hits on the fly
Definition TIfin.h:111
bool IsSuppressedAddbackSet() const
Definition TIfin.cxx:238
void ResetFlags() const
Definition TIfin.cxx:473
TIfinHit * GetAddbackHit(const int &i)
Definition TIfin.cxx:384
void ResetSuppressedAddback()
Definition TIfin.cxx:498
Int_t GetAddbackMultiplicity()
Definition TIfin.cxx:322
void SetSuppressedAddback(bool flag=true) const
Definition TIfin.cxx:258
std::vector< TDetectorHit * > & GetSuppressedVector()
Definition TIfin.cxx:208
void FixCrossTalk()
Definition TIfin.cxx:566
Int_t GetSuppressedMultiplicity(const TBgo *bgo)
Definition TIfin.cxx:295
Bool_t TestBitNumber(EIfinBits bit) const
Definition TIfin.h:122
static Double_t CTCorrectedEnergy(const TIfinHit *const hit_to_correct, const TIfinHit *const other_hit, Bool_t time_constraint=true)
Definition TIfin.cxx:525
static std::function< bool(const TDetectorHit *, const TDetectorHit *)> fSuppressionCriterion
Definition TIfin.h:102
TIfinHit * GetSuppressedHit(const int &i)
Definition TIfin.cxx:279
static const Double_t gCrossTalkPar[2][4][4]
!
Definition TIfin.h:98
static TVector3 GetPosition(int DetNbr, int CryNbr=5, double dist=90.0)
!
Definition TIfin.cxx:435
std::vector< UShort_t > fSuppressedAddbackFrags
! Number of crystals involved in creating the suppressed addback hit
Definition TIfin.h:113
TIfinHit * GetIfinHit(const Int_t &i)
Definition TIfin.cxx:263
static const Double_t gStrongCT[2]
!
Definition TIfin.h:96
void SetAddback(bool flag=true) const
Definition TIfin.cxx:243
void Clear(Option_t *opt="all") override
!
Definition TIfin.cxx:152
static const Double_t gWeakCT[2]
!
Definition TIfin.h:97
void SetSuppressed(bool flag=true) const
Definition TIfin.cxx:253
void AddFragment(const std::shared_ptr< const TFragment > &, TChannel *) override
!
Definition TIfin.cxx:416
static std::function< bool(const TDetectorHit *, const TDetectorHit *)> fAddbackCriterion
Definition TIfin.h:101
void SetCrossTalk(bool flag=true) const
Definition TIfin.cxx:248
void Copy(TObject &) const override
!
Definition TIfin.cxx:125
void Print(Option_t *opt="") const override
!
Definition TIfin.cxx:169
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)