9#include "TInterpreter.h"
30 return ((one->GetDetector() == two->GetDetector()) &&
60 TVector3(TMath::Sin(TMath::DegToRad() * (0.0)) * TMath::Cos(TMath::DegToRad() * (0.0)),
61 TMath::Sin(TMath::DegToRad() * (0.0)) * TMath::Sin(TMath::DegToRad() * (0.0)),
62 TMath::Cos(TMath::DegToRad() * (0.0))),
64 TVector3(TMath::Sin(TMath::DegToRad() * (45.0)) * TMath::Cos(TMath::DegToRad() * (67.5)),
65 TMath::Sin(TMath::DegToRad() * (45.0)) * TMath::Sin(TMath::DegToRad() * (67.5)),
66 TMath::Cos(TMath::DegToRad() * (45.0))),
67 TVector3(TMath::Sin(TMath::DegToRad() * (45.0)) * TMath::Cos(TMath::DegToRad() * (157.5)),
68 TMath::Sin(TMath::DegToRad() * (45.0)) * TMath::Sin(TMath::DegToRad() * (157.5)),
69 TMath::Cos(TMath::DegToRad() * (45.0))),
70 TVector3(TMath::Sin(TMath::DegToRad() * (45.0)) * TMath::Cos(TMath::DegToRad() * (247.5)),
71 TMath::Sin(TMath::DegToRad() * (45.0)) * TMath::Sin(TMath::DegToRad() * (247.5)),
72 TMath::Cos(TMath::DegToRad() * (45.0))),
73 TVector3(TMath::Sin(TMath::DegToRad() * (45.0)) * TMath::Cos(TMath::DegToRad() * (337.5)),
74 TMath::Sin(TMath::DegToRad() * (45.0)) * TMath::Sin(TMath::DegToRad() * (337.5)),
75 TMath::Cos(TMath::DegToRad() * (45.0))),
77 TVector3(TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Cos(TMath::DegToRad() * (22.5)),
78 TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Sin(TMath::DegToRad() * (22.5)),
79 TMath::Cos(TMath::DegToRad() * (90.0))),
80 TVector3(TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Cos(TMath::DegToRad() * (67.5)),
81 TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Sin(TMath::DegToRad() * (67.5)),
82 TMath::Cos(TMath::DegToRad() * (90.0))),
83 TVector3(TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Cos(TMath::DegToRad() * (112.5)),
84 TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Sin(TMath::DegToRad() * (112.5)),
85 TMath::Cos(TMath::DegToRad() * (90.0))),
86 TVector3(TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Cos(TMath::DegToRad() * (157.5)),
87 TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Sin(TMath::DegToRad() * (157.5)),
88 TMath::Cos(TMath::DegToRad() * (90.0))),
89 TVector3(TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Cos(TMath::DegToRad() * (202.5)),
90 TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Sin(TMath::DegToRad() * (202.5)),
91 TMath::Cos(TMath::DegToRad() * (90.0))),
92 TVector3(TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Cos(TMath::DegToRad() * (247.5)),
93 TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Sin(TMath::DegToRad() * (247.5)),
94 TMath::Cos(TMath::DegToRad() * (90.0))),
95 TVector3(TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Cos(TMath::DegToRad() * (292.5)),
96 TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Sin(TMath::DegToRad() * (292.5)),
97 TMath::Cos(TMath::DegToRad() * (90.0))),
98 TVector3(TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Cos(TMath::DegToRad() * (337.5)),
99 TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Sin(TMath::DegToRad() * (337.5)),
100 TMath::Cos(TMath::DegToRad() * (90.0))),
102 TVector3(TMath::Sin(TMath::DegToRad() * (135.0)) * TMath::Cos(TMath::DegToRad() * (67.5)),
103 TMath::Sin(TMath::DegToRad() * (135.0)) * TMath::Sin(TMath::DegToRad() * (67.5)),
104 TMath::Cos(TMath::DegToRad() * (135.0))),
105 TVector3(TMath::Sin(TMath::DegToRad() * (135.0)) * TMath::Cos(TMath::DegToRad() * (157.5)),
106 TMath::Sin(TMath::DegToRad() * (135.0)) * TMath::Sin(TMath::DegToRad() * (157.5)),
107 TMath::Cos(TMath::DegToRad() * (135.0))),
108 TVector3(TMath::Sin(TMath::DegToRad() * (135.0)) * TMath::Cos(TMath::DegToRad() * (247.5)),
109 TMath::Sin(TMath::DegToRad() * (135.0)) * TMath::Sin(TMath::DegToRad() * (247.5)),
110 TMath::Cos(TMath::DegToRad() * (135.0))),
111 TVector3(TMath::Sin(TMath::DegToRad() * (135.0)) * TMath::Cos(TMath::DegToRad() * (337.5)),
112 TMath::Sin(TMath::DegToRad() * (135.0)) * TMath::Sin(TMath::DegToRad() * (337.5)),
113 TMath::Cos(TMath::DegToRad() * (135.0)))};
120#if ROOT_VERSION_CODE < ROOT_VERSION(6,0,0)
121 Class()->IgnoreTObjectStreamer(kTRUE);
129#if ROOT_VERSION_CODE < ROOT_VERSION(6,0,0)
130 Class()->IgnoreTObjectStreamer(kTRUE);
176 std::ostringstream str;
177 str<<
"TdrClover 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;
336 if(hit_vec.empty()) {
349 return ab_vec.size();
356 }
catch(
const std::out_of_range& oor) {
357 std::cerr<<ClassName()<<
" Suppressed addback hits are out of range: "<<oor.what()<<std::endl;
369 if(frag ==
nullptr || chan ==
nullptr) {
374 fHits.push_back(hit);
382 return TVector3(0, 0, 1);
395 case 0: shift.SetXYZ(-cp, cp,
id);
break;
396 case 1: shift.SetXYZ(cp, cp,
id);
break;
397 case 2: shift.SetXYZ(cp, -cp,
id);
break;
398 case 3: shift.SetXYZ(-cp, -cp,
id);
break;
399 default: shift.SetXYZ(0, 0, 1);
break;
401 shift.RotateY(temp_pos.Theta());
402 shift.RotateZ(temp_pos.Phi());
404 temp_pos.SetMag(dist);
406 return (temp_pos + shift);
ClassImp(THILMnemonic) void THILMnemonic
bool DefaultSuppression(TTdrCloverHit *clo, TBgoHit *bgo)
bool DefaultAddback(TTdrCloverHit *one, TTdrCloverHit *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)
UShort_t GetNAddbackFrags(const size_t &idx)
void Clear(Option_t *opt="all") override
!
Int_t GetAddbackMultiplicity()
std::vector< UShort_t > fAddbackFrags
! Number of crystals involved in creating in the addback hit
void AddFragment(const std::shared_ptr< const TFragment > &, TChannel *) override
!
static bool fSetCoreWave
! Flag for Waveforms ON/OFF
void Copy(TObject &) const override
!
std::vector< UShort_t > & GetAddbackFragVector()
!
std::vector< UShort_t > fSuppressedAddbackFrags
! Number of crystals involved in creating in the suppressed addback hit
void ClearStatus() const
!
UShort_t GetNSuppressedAddbackFrags(const size_t &idx)
std::vector< TDetectorHit * > & GetAddbackVector()
!
static std::function< bool(TTdrCloverHit *, TBgoHit *)> fSuppressionCriterion
Bool_t TestBitNumber(ETdrCloverBits bit) const
void SetSuppressed(bool flag=true) const
bool IsSuppressedSet() const
void SetAddback(bool flag=true) const
std::vector< TDetectorHit * > fAddbackHits
! Used to create addback hits on the fly
TTransientBits< UChar_t > fTdrCloverBits
std::vector< TDetectorHit * > fSuppressedAddbackHits
! Used to create suppressed addback hits on the fly
bool IsSuppressedAddbackSet() const
static std::map< int, TSpline * > fEnergyResiduals
!
std::vector< UShort_t > & GetSuppressedAddbackFragVector()
!
Int_t GetSuppressedMultiplicity(TBgo *)
TTdrClover & operator=(const TTdrClover &)
!
static TVector3 gCloverPosition[17]
! Position of each HPGe Clover
long fCycleStart
! The start of the cycle
static const char * GetColorFromNumber(Int_t number)
static TVector3 GetPosition(int DetNbr, int CryNbr=5, double dist=110.0)
!
std::vector< TDetectorHit * > & GetSuppressedAddbackVector()
!
TDetectorHit * GetAddbackHit(const int &i)
std::vector< TDetectorHit * > fSuppressedHits
! Used to create suppressed hits on the fly
TDetectorHit * GetSuppressedHit(const int &i)
void SetBitNumber(ETdrCloverBits bit, Bool_t set) const
std::vector< TDetectorHit * > & GetSuppressedVector()
!
void ResetSuppressedAddback()
bool IsAddbackSet() const
static std::function< bool(TTdrCloverHit *, TTdrCloverHit *)> fAddbackCriterion
void Print(Option_t *opt="") const override
!
TDetectorHit * GetSuppressedAddbackHit(const int &i)
void SetSuppressedAddback(bool flag=true) const
Int_t GetSuppressedAddbackMultiplicity(TBgo *)
void SetBit(T bit, Bool_t flag)