9#include "TInterpreter.h"
56 TVector3(TMath::Sin(TMath::DegToRad() * (0.0)) * TMath::Cos(TMath::DegToRad() * (0.0)),
57 TMath::Sin(TMath::DegToRad() * (0.0)) * TMath::Sin(TMath::DegToRad() * (0.0)),
58 TMath::Cos(TMath::DegToRad() * (0.0))),
60 TVector3(TMath::Sin(TMath::DegToRad() * (45.0)) * TMath::Cos(TMath::DegToRad() * (67.5)),
61 TMath::Sin(TMath::DegToRad() * (45.0)) * TMath::Sin(TMath::DegToRad() * (67.5)),
62 TMath::Cos(TMath::DegToRad() * (45.0))),
63 TVector3(TMath::Sin(TMath::DegToRad() * (45.0)) * TMath::Cos(TMath::DegToRad() * (157.5)),
64 TMath::Sin(TMath::DegToRad() * (45.0)) * TMath::Sin(TMath::DegToRad() * (157.5)),
65 TMath::Cos(TMath::DegToRad() * (45.0))),
66 TVector3(TMath::Sin(TMath::DegToRad() * (45.0)) * TMath::Cos(TMath::DegToRad() * (247.5)),
67 TMath::Sin(TMath::DegToRad() * (45.0)) * TMath::Sin(TMath::DegToRad() * (247.5)),
68 TMath::Cos(TMath::DegToRad() * (45.0))),
69 TVector3(TMath::Sin(TMath::DegToRad() * (45.0)) * TMath::Cos(TMath::DegToRad() * (337.5)),
70 TMath::Sin(TMath::DegToRad() * (45.0)) * TMath::Sin(TMath::DegToRad() * (337.5)),
71 TMath::Cos(TMath::DegToRad() * (45.0))),
73 TVector3(TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Cos(TMath::DegToRad() * (22.5)),
74 TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Sin(TMath::DegToRad() * (22.5)),
75 TMath::Cos(TMath::DegToRad() * (90.0))),
76 TVector3(TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Cos(TMath::DegToRad() * (67.5)),
77 TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Sin(TMath::DegToRad() * (67.5)),
78 TMath::Cos(TMath::DegToRad() * (90.0))),
79 TVector3(TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Cos(TMath::DegToRad() * (112.5)),
80 TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Sin(TMath::DegToRad() * (112.5)),
81 TMath::Cos(TMath::DegToRad() * (90.0))),
82 TVector3(TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Cos(TMath::DegToRad() * (157.5)),
83 TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Sin(TMath::DegToRad() * (157.5)),
84 TMath::Cos(TMath::DegToRad() * (90.0))),
85 TVector3(TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Cos(TMath::DegToRad() * (202.5)),
86 TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Sin(TMath::DegToRad() * (202.5)),
87 TMath::Cos(TMath::DegToRad() * (90.0))),
88 TVector3(TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Cos(TMath::DegToRad() * (247.5)),
89 TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Sin(TMath::DegToRad() * (247.5)),
90 TMath::Cos(TMath::DegToRad() * (90.0))),
91 TVector3(TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Cos(TMath::DegToRad() * (292.5)),
92 TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Sin(TMath::DegToRad() * (292.5)),
93 TMath::Cos(TMath::DegToRad() * (90.0))),
94 TVector3(TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Cos(TMath::DegToRad() * (337.5)),
95 TMath::Sin(TMath::DegToRad() * (90.0)) * TMath::Sin(TMath::DegToRad() * (337.5)),
96 TMath::Cos(TMath::DegToRad() * (90.0))),
98 TVector3(TMath::Sin(TMath::DegToRad() * (135.0)) * TMath::Cos(TMath::DegToRad() * (67.5)),
99 TMath::Sin(TMath::DegToRad() * (135.0)) * TMath::Sin(TMath::DegToRad() * (67.5)),
100 TMath::Cos(TMath::DegToRad() * (135.0))),
101 TVector3(TMath::Sin(TMath::DegToRad() * (135.0)) * TMath::Cos(TMath::DegToRad() * (157.5)),
102 TMath::Sin(TMath::DegToRad() * (135.0)) * TMath::Sin(TMath::DegToRad() * (157.5)),
103 TMath::Cos(TMath::DegToRad() * (135.0))),
104 TVector3(TMath::Sin(TMath::DegToRad() * (135.0)) * TMath::Cos(TMath::DegToRad() * (247.5)),
105 TMath::Sin(TMath::DegToRad() * (135.0)) * TMath::Sin(TMath::DegToRad() * (247.5)),
106 TMath::Cos(TMath::DegToRad() * (135.0))),
107 TVector3(TMath::Sin(TMath::DegToRad() * (135.0)) * TMath::Cos(TMath::DegToRad() * (337.5)),
108 TMath::Sin(TMath::DegToRad() * (135.0)) * TMath::Sin(TMath::DegToRad() * (337.5)),
109 TMath::Cos(TMath::DegToRad() * (135.0)))};
116#if ROOT_VERSION_CODE < ROOT_VERSION(6, 0, 0)
117 Class()->IgnoreTObjectStreamer(kTRUE);
125#if ROOT_VERSION_CODE < ROOT_VERSION(6, 0, 0)
126 Class()->IgnoreTObjectStreamer(kTRUE);
172 std::ostringstream str;
173 str <<
"TdrClover 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;
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 Hits().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);
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!
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)
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)