9#include "TInterpreter.h"
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))),
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))),
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))),
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)))};
117#if ROOT_VERSION_CODE < ROOT_VERSION(6, 0, 0)
118 Class()->IgnoreTObjectStreamer(kTRUE);
126#if ROOT_VERSION_CODE < ROOT_VERSION(6, 0, 0)
127 Class()->IgnoreTObjectStreamer(kTRUE);
172 std::ostringstream str;
173 str <<
"TdrTigress Contains: " << std::endl;
177 str << std::setw(6) <<
fAddbackHits.size() <<
" addback hits" << std::endl;
179 str << std::setw(6) <<
" "
180 <<
" Addback not set" << std::endl;
184 str << std::setw(6) <<
fSuppressedHits.size() <<
" suppressed hits" << std::endl;
186 str << std::setw(6) <<
" "
187 <<
" suppressed not set" << std::endl;
193 str << std::setw(6) <<
" "
194 <<
" suppressed Addback not set" << std::endl;
197 str << std::setw(6) <<
fCycleStart <<
" cycle start" << std::endl;
269 if(hit_vec.empty()) {
282 return ab_vec.size();
290 std::cerr <<
"Addback hits are out of range" << std::endl;
318 }
catch(
const std::out_of_range& oor) {
319 std::cerr << ClassName() <<
" Suppressed hits are out of range: " << oor.what() << std::endl;
334 if(hit_vec.empty()) {
347 return ab_vec.size();
354 }
catch(
const std::out_of_range& oor) {
355 std::cerr << ClassName() <<
" Suppressed addback hits are out of range: " << oor.what() << std::endl;
367 if(frag ==
nullptr || chan ==
nullptr) {
372 Hits().push_back(hit);
380 return TVector3(0, 0, 1);
393 case 0: shift.SetXYZ(-cp, cp,
id);
break;
394 case 1: shift.SetXYZ(cp, cp,
id);
break;
395 case 2: shift.SetXYZ(cp, -cp,
id);
break;
396 case 3: shift.SetXYZ(-cp, -cp,
id);
break;
397 default: shift.SetXYZ(0, 0, 1);
break;
399 shift.RotateY(temp_pos.Theta());
400 shift.RotateZ(temp_pos.Phi());
402 temp_pos.SetMag(dist);
404 return (temp_pos + shift);
bool DefaultSuppression(TTdrTigressHit *clo, TBgoHit *bgo)
bool DefaultAddback(TTdrTigressHit *one, TTdrTigressHit *two)
double SuppressionWindow() const
double AddbackWindow() const
double SuppressionEnergy() const
virtual double GetEnergy(Option_t *opt="") 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
virtual const std::vector< TDetectorHit * > & GetHitVector() const
std::vector< TDetectorHit * > & Hits()
static TAnalysisOptions * AnalysisOptions()
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)
void CreateSuppressed(const TBgo *bgo, const std::vector< T * > &hits, std::vector< T * > &suppressedHits)
void CreateSuppressedAddback(const TBgo *bgo, const std::vector< T * > &hits, std::vector< T * > &addbacks, std::vector< UShort_t > &nofFragments)
bool IsAddbackSet() const
void SetSuppressed(bool flag=true) const
TDetectorHit * GetSuppressedHit(const int &i)
TTdrTigress & operator=(const TTdrTigress &)
!
void ClearStatus() const
!
std::vector< TDetectorHit * > & GetSuppressedAddbackVector()
!
void AddFragment(const std::shared_ptr< const TFragment > &, TChannel *) override
!
Int_t GetSuppressedMultiplicity(TBgo *)
void SetBitNumber(ETdrTigressBits bit, Bool_t set) const
bool IsSuppressedAddbackSet() const
std::vector< TDetectorHit * > fSuppressedHits
! Used to create suppressed hits on the fly
Int_t GetAddbackMultiplicity()
static TVector3 GetPosition(int DetNbr, int CryNbr=5, double dist=110.0)
!
UShort_t GetNAddbackFrags(const size_t &idx)
long fCycleStart
! The start of the cycle
static const char * GetColorFromNumber(Int_t number)
void Clear(Option_t *opt="all") override
!
void ResetSuppressedAddback()
std::vector< TDetectorHit * > & GetSuppressedVector()
!
Int_t GetSuppressedAddbackMultiplicity(TBgo *)
static std::function< bool(TTdrTigressHit *, TBgoHit *)> fSuppressionCriterion
std::vector< UShort_t > fSuppressedAddbackFrags
! Number of crystals involved in creating in the suppressed addback hit
TTransientBits< UChar_t > fTdrTigressBits
static bool fSetCoreWave
! Flag for Waveforms ON/OFF
bool IsSuppressedSet() const
std::vector< TDetectorHit * > & GetAddbackVector()
!
void SetAddback(bool flag=true) const
TDetectorHit * GetAddbackHit(const int &i)
void Print(Option_t *opt="") const override
!
Bool_t TestBitNumber(ETdrTigressBits bit) const
UShort_t GetNSuppressedAddbackFrags(const size_t &idx)
static std::function< bool(TTdrTigressHit *, TTdrTigressHit *)> fAddbackCriterion
std::vector< UShort_t > & GetAddbackFragVector()
!
std::vector< TDetectorHit * > fSuppressedAddbackHits
! Used to create suppressed addback hits on the fly
static std::map< int, TSpline * > fEnergyResiduals
!
void Copy(TObject &) const override
!
TDetectorHit * GetSuppressedAddbackHit(const int &i)
void SetSuppressedAddback(bool flag=true) const
std::vector< UShort_t > & GetSuppressedAddbackFragVector()
!
std::vector< UShort_t > fAddbackFrags
! Number of crystals involved in creating in the addback hit
static TVector3 gTigressPosition[17]
! Position of each HPGe Tigress
std::vector< TDetectorHit * > fAddbackHits
! Used to create addback hits on the fly
void SetBit(T bit, Bool_t flag)