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