9#include "TInterpreter.h"
30 return ((one->GetDetector() == two->GetDetector()) &&
61 TVector3(TMath::Sin(TMath::DegToRad() * (0.0)) * TMath::Cos(TMath::DegToRad() * (0.0)),
62 TMath::Sin(TMath::DegToRad() * (0.0)) * TMath::Sin(TMath::DegToRad() * (0.0)),
63 TMath::Cos(TMath::DegToRad() * (0.0))),
65 TVector3(TMath::Sin(TMath::DegToRad() * (45.0)) * TMath::Cos(TMath::DegToRad() * (67.5)),
66 TMath::Sin(TMath::DegToRad() * (45.0)) * TMath::Sin(TMath::DegToRad() * (67.5)),
67 TMath::Cos(TMath::DegToRad() * (45.0))),
68 TVector3(TMath::Sin(TMath::DegToRad() * (45.0)) * TMath::Cos(TMath::DegToRad() * (157.5)),
69 TMath::Sin(TMath::DegToRad() * (45.0)) * TMath::Sin(TMath::DegToRad() * (157.5)),
70 TMath::Cos(TMath::DegToRad() * (45.0))),
71 TVector3(TMath::Sin(TMath::DegToRad() * (45.0)) * TMath::Cos(TMath::DegToRad() * (247.5)),
72 TMath::Sin(TMath::DegToRad() * (45.0)) * TMath::Sin(TMath::DegToRad() * (247.5)),
73 TMath::Cos(TMath::DegToRad() * (45.0))),
74 TVector3(TMath::Sin(TMath::DegToRad() * (45.0)) * TMath::Cos(TMath::DegToRad() * (337.5)),
75 TMath::Sin(TMath::DegToRad() * (45.0)) * TMath::Sin(TMath::DegToRad() * (337.5)),
76 TMath::Cos(TMath::DegToRad() * (45.0))),
78 TVector3(TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Cos(TMath::DegToRad() * (22.5)),
79 TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Sin(TMath::DegToRad() * (22.5)),
80 TMath::Cos(TMath::DegToRad() * (90.0))),
81 TVector3(TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Cos(TMath::DegToRad() * (67.5)),
82 TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Sin(TMath::DegToRad() * (67.5)),
83 TMath::Cos(TMath::DegToRad() * (90.0))),
84 TVector3(TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Cos(TMath::DegToRad() * (112.5)),
85 TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Sin(TMath::DegToRad() * (112.5)),
86 TMath::Cos(TMath::DegToRad() * (90.0))),
87 TVector3(TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Cos(TMath::DegToRad() * (157.5)),
88 TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Sin(TMath::DegToRad() * (157.5)),
89 TMath::Cos(TMath::DegToRad() * (90.0))),
90 TVector3(TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Cos(TMath::DegToRad() * (202.5)),
91 TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Sin(TMath::DegToRad() * (202.5)),
92 TMath::Cos(TMath::DegToRad() * (90.0))),
93 TVector3(TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Cos(TMath::DegToRad() * (247.5)),
94 TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Sin(TMath::DegToRad() * (247.5)),
95 TMath::Cos(TMath::DegToRad() * (90.0))),
96 TVector3(TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Cos(TMath::DegToRad() * (292.5)),
97 TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Sin(TMath::DegToRad() * (292.5)),
98 TMath::Cos(TMath::DegToRad() * (90.0))),
99 TVector3(TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Cos(TMath::DegToRad() * (337.5)),
100 TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Sin(TMath::DegToRad() * (337.5)),
101 TMath::Cos(TMath::DegToRad() * (90.0))),
103 TVector3(TMath::Sin(TMath::DegToRad() * (135.0)) * TMath::Cos(TMath::DegToRad() * (67.5)),
104 TMath::Sin(TMath::DegToRad() * (135.0)) * TMath::Sin(TMath::DegToRad() * (67.5)),
105 TMath::Cos(TMath::DegToRad() * (135.0))),
106 TVector3(TMath::Sin(TMath::DegToRad() * (135.0)) * TMath::Cos(TMath::DegToRad() * (157.5)),
107 TMath::Sin(TMath::DegToRad() * (135.0)) * TMath::Sin(TMath::DegToRad() * (157.5)),
108 TMath::Cos(TMath::DegToRad() * (135.0))),
109 TVector3(TMath::Sin(TMath::DegToRad() * (135.0)) * TMath::Cos(TMath::DegToRad() * (247.5)),
110 TMath::Sin(TMath::DegToRad() * (135.0)) * TMath::Sin(TMath::DegToRad() * (247.5)),
111 TMath::Cos(TMath::DegToRad() * (135.0))),
112 TVector3(TMath::Sin(TMath::DegToRad() * (135.0)) * TMath::Cos(TMath::DegToRad() * (337.5)),
113 TMath::Sin(TMath::DegToRad() * (135.0)) * TMath::Sin(TMath::DegToRad() * (337.5)),
114 TMath::Cos(TMath::DegToRad() * (135.0)))};
121#if ROOT_VERSION_CODE < ROOT_VERSION(6,0,0)
122 Class()->IgnoreTObjectStreamer(kTRUE);
130#if ROOT_VERSION_CODE < ROOT_VERSION(6,0,0)
131 Class()->IgnoreTObjectStreamer(kTRUE);
176 std::ostringstream str;
177 str<<
"TdrTigress Contains: "<<std::endl;
181 str<<std::setw(6)<<
fAddbackHits.size()<<
" addback hits"<<std::endl;
183 str<<std::setw(6)<<
" "<<
" Addback not set"<<std::endl;
187 str<<std::setw(6)<<
fSuppressedHits.size()<<
" suppressed hits"<<std::endl;
189 str<<std::setw(6)<<
" "<<
" suppressed not set"<<std::endl;
195 str<<std::setw(6)<<
" "<<
" suppressed Addback not set"<<std::endl;
198 str<<std::setw(6)<<
fCycleStart<<
" cycle start"<<std::endl;
270 if(hit_vec.empty()) {
283 return ab_vec.size();
291 std::cerr<<
"Addback hits are out of range"<<std::endl;
319 }
catch(
const std::out_of_range& oor) {
320 std::cerr<<ClassName()<<
" Suppressed hits are out of range: "<<oor.what()<<std::endl;
335 if(hit_vec.empty()) {
348 return ab_vec.size();
355 }
catch(
const std::out_of_range& oor) {
356 std::cerr<<ClassName()<<
" Suppressed addback hits are out of range: "<<oor.what()<<std::endl;
368 if(frag ==
nullptr || chan ==
nullptr) {
373 fHits.push_back(hit);
381 return TVector3(0, 0, 1);
394 case 0: shift.SetXYZ(-cp, cp,
id);
break;
395 case 1: shift.SetXYZ(cp, cp,
id);
break;
396 case 2: shift.SetXYZ(cp, -cp,
id);
break;
397 case 3: shift.SetXYZ(-cp, -cp,
id);
break;
398 default: shift.SetXYZ(0, 0, 1);
break;
400 shift.RotateY(temp_pos.Theta());
401 shift.RotateZ(temp_pos.Phi());
403 temp_pos.SetMag(dist);
405 return (temp_pos + shift);
ClassImp(THILMnemonic) void THILMnemonic
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!
std::vector< TDetectorHit * > fHits
virtual Short_t GetMultiplicity() const
virtual const std::vector< TDetectorHit * > & GetHitVector() const
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)