GRSISort "v4.0.0.5"
An extension of the ROOT analysis Framework
Loading...
Searching...
No Matches
TGriffin Class Reference

Detailed Description

Definition at line 23 of file TGriffin.h.

Public Types

enum class  EGriffinBits {
  kIsAddbackSet = 1 << 0 , kSpare1 = 1 << 1 , kIsCrossTalkSet = 1 << 2 , kSpare3 = 1 << 3 ,
  kIsSuppressed = 1 << 4 , kSpare5 = 1 << 5 , kIsSuppressedAddbackSet = 1 << 6 , kSpare7 = 1 << 7
}
 

Public Member Functions

 TGriffin ()
 
 TGriffin (const TGriffin &)
 
 TGriffin (TGriffin &&) noexcept=default
 
 ~TGriffin () override
 
bool AddbackCriterion (const TDetectorHit *hit1, const TDetectorHit *hit2) override
 
void AddFragment (const std::shared_ptr< const TFragment > &, TChannel *) override
 
virtual void AddHit (TDetectorHit *hit)
 
void BuildHits () override
 
void Clear (Option_t *opt="all") override
 
void ClearTransients () override
 
void Copy (TObject &) const override
 
void FixCrossTalk ()
 
std::function< bool(const TDetectorHit *, const TDetectorHit *)> GetAddbackCriterion () const
 
TGriffinHitGetAddbackHit (const int &i)
 
Short_t GetAddbackMultiplicity ()
 
TGriffinHitGetGriffinHit (const int &i)
 
virtual TDetectorHitGetHit (const int &index) const
 
virtual const std::vector< TDetectorHit * > & GetHitVector () const
 
virtual Short_t GetMultiplicity () const
 
UShort_t GetNAddbackFrags (const size_t &idx)
 
UShort_t GetNSuppressedAddbackFrags (const size_t &idx)
 
TGriffinHitGetSuppressedAddbackHit (const int &i)
 
Short_t GetSuppressedAddbackMultiplicity (const TBgo *bgo)
 
TGriffinHitGetSuppressedHit (const int &i)
 
Short_t GetSuppressedMultiplicity (const TBgo *bgo)
 
std::function< bool(const TDetectorHit *, const TDetectorHit *)> GetSuppressionCriterion () const
 
std::vector< TDetectorHit * > & Hits ()
 
const std::vector< TDetectorHit * > & Hits () const
 
bool IsAddbackSet () const
 
Bool_t IsCrossTalkSet () const
 
bool IsSuppressed () const
 
bool IsSuppressedAddbackSet () const
 
virtual bool NoHits () const
 
TGriffinoperator= (const TGriffin &)
 
TGriffinoperator= (TGriffin &&) noexcept=default
 
void Print (Option_t *opt="") const override
 
void Print (std::ostream &out) const override
 
void ResetAddback ()
 
void ResetFlags () const
 
void ResetSuppressed ()
 
void ResetSuppressedAddback ()
 
void SetAddbackCriterion (std::function< bool(const TDetectorHit *, const TDetectorHit *)> criterion)
 
void SetSuppressionCriterion (std::function< bool(const TDetectorHit *, const TDetectorHit *)> criterion)
 
bool SuppressionCriterion (const TDetectorHit *hit, const TDetectorHit *bgoHit) override
 

Static Public Member Functions

static Double_t CTCorrectedEnergy (const TGriffinHit *hit_to_correct, const TGriffinHit *other_hit, bool time_constraint=true)
 
static const char * GetColorFromNumber (int number)
 
static TVector3 GetDetectorPosition (int DetNbr)
 
static TVector3 GetPosition (int DetNbr, int CryNbr=5, double dist=110.0)
 
static bool SetCoreWave ()
 

Protected Member Functions

template<class T >
void CreateAddback (const std::vector< T * > &hits, std::vector< T * > &addbacks, std::vector< UShort_t > &nofFragments)
 
template<class T >
void CreateSuppressed (const TBgo *bgo, const std::vector< T * > &hits, std::vector< T * > &suppressedHits)
 
template<class T >
void CreateSuppressedAddback (const TBgo *bgo, const std::vector< T * > &hits, std::vector< T * > &addbacks, std::vector< UShort_t > &nofFragments)
 

Private Member Functions

void ClearStatus () const
 
void SetAddback (bool flag=true) const
 
void SetBitNumber (EGriffinBits bit, Bool_t set) const
 
void SetCrossTalk (bool flag=true) const
 
void SetSuppressed (bool flag=true) const
 
void SetSuppressedAddback (bool flag=true) const
 
Bool_t TestBitNumber (EGriffinBits bit) const
 

Private Attributes

std::vector< UShort_t > fAddbackFrags
 
std::vector< TDetectorHit * > fAddbackHits
 
int64_t fCycleStart
 
TTransientBits< UChar_t > fGriffinBits
 
std::vector< TDetectorHit * > fHits
 
std::vector< UShort_t > fSuppressedAddbackFrags
 
std::vector< TDetectorHit * > fSuppressedAddbackHits
 
std::vector< TDetectorHit * > fSuppressedHits
 

Static Private Attributes

static std::function< bool(const TDetectorHit *, const TDetectorHit *)> fAddbackCriterion = DefaultGriffinAddback
 
static std::array< TVector3, 17 > fCloverPosition
 
static bool fSetCoreWave = false
 
static std::function< bool(const TDetectorHit *, const TDetectorHit *)> fSuppressionCriterion = DefaultGriffinSuppression
 
+ Inheritance diagram for TGriffin:
+ Collaboration diagram for TGriffin:

Member Enumeration Documentation

◆ EGriffinBits

enum class TGriffin::EGriffinBits
strong
Enumerator
kIsAddbackSet 
kSpare1 
kIsCrossTalkSet 
kSpare3 
kIsSuppressed 
kSpare5 
kIsSuppressedAddbackSet 
kSpare7 

Definition at line 25 of file TGriffin.h.

Constructor & Destructor Documentation

◆ TGriffin() [1/3]

TGriffin::TGriffin ( )

Default ctor. Ignores TObjectStreamer in ROOT < 6

Definition at line 112 of file TGriffin.cxx.

References Clear().

◆ TGriffin() [2/3]

TGriffin::TGriffin ( const TGriffin & rhs)

Copy ctor. Ignores TObjectStreamer in ROOT < 6

Definition at line 118 of file TGriffin.cxx.

References Copy().

◆ TGriffin() [3/3]

TGriffin::TGriffin ( TGriffin && )
defaultnoexcept

◆ ~TGriffin()

TGriffin::~TGriffin ( )
override

Definition at line 150 of file TGriffin.cxx.

References fAddbackHits, fSuppressedAddbackHits, and fSuppressedHits.

Member Function Documentation

◆ AddbackCriterion()

bool TGriffin::AddbackCriterion ( const TDetectorHit * hit1,
const TDetectorHit * hit2 )
inlineoverridevirtual

Reimplemented from TSuppressed.

Definition at line 67 of file TGriffin.h.

References fAddbackCriterion.

◆ AddFragment()

void TGriffin::AddFragment ( const std::shared_ptr< const TFragment > & frag,
TChannel * chan )
overridevirtual

◆ AddHit()

◆ BuildHits()

void TGriffin::BuildHits ( )
inlineoverridevirtual

!

Reimplemented from TDetector.

Definition at line 51 of file TGriffin.h.

◆ Clear()

void TGriffin::Clear ( Option_t * opt = "all")
override

◆ ClearStatus()

void TGriffin::ClearStatus ( ) const
inlineprivate

!

Definition at line 121 of file TGriffin.h.

References fGriffinBits.

Referenced by Clear().

◆ ClearTransients()

void TGriffin::ClearTransients ( )
inlineoverridevirtual

!

Reimplemented from TDetector.

Definition at line 53 of file TGriffin.h.

References TDetector::ClearTransients().

◆ Copy()

void TGriffin::Copy ( TObject & rhs) const
override

◆ CreateAddback()

template<class T >
void TSuppressed::CreateAddback ( const std::vector< T * > & hits,
std::vector< T * > & addbacks,
std::vector< UShort_t > & nofFragments )
inlineprotectedinherited

This funxtion always(!) re-creates the vectors of addback hits and number of fragments per addback hit based on the provided vector of hits

Because the functions to return hit vectors etc. are almost always returning vectors of TDetectorHits, T is most likely TDetectorHit. This means we can't use T directly to create a new hit, we need to use TClass::New().

Definition at line 38 of file TSuppressed.h.

References TSuppressed::AddbackCriterion(), TDetectorHit::kIsEnergySet, and TDetectorHit::kIsTimeSet.

Referenced by TFipps::GetAddbackMultiplicity(), GetAddbackMultiplicity(), TIfin::GetAddbackMultiplicity(), TTdrClover::GetAddbackMultiplicity(), and TTdrTigress::GetAddbackMultiplicity().

◆ CreateSuppressed()

template<class T >
void TSuppressed::CreateSuppressed ( const TBgo * bgo,
const std::vector< T * > & hits,
std::vector< T * > & suppressedHits )
inlineprotectedinherited

This function always(!) re-creates the vector of suppressed hits based on the provided TBgo and vector of hits

Because the functions to return hit vectors etc. are almost always returning vectors of TDetectorHits, T is most likely TDetectorHit. This means we can't use T directly to create a new hit, we need to use TClass::New().

Definition at line 69 of file TSuppressed.h.

References TDetector::GetHitVector(), and TSuppressed::SuppressionCriterion().

Referenced by TFipps::GetSuppressedMultiplicity(), TFippsLaBr::GetSuppressedMultiplicity(), GetSuppressedMultiplicity(), TIfin::GetSuppressedMultiplicity(), TLaBr::GetSuppressedMultiplicity(), TTdrClover::GetSuppressedMultiplicity(), and TTdrTigress::GetSuppressedMultiplicity().

◆ CreateSuppressedAddback()

template<class T >
void TSuppressed::CreateSuppressedAddback ( const TBgo * bgo,
const std::vector< T * > & hits,
std::vector< T * > & addbacks,
std::vector< UShort_t > & nofFragments )
inlineprotectedinherited

This funxtion always(!) re-creates the vectors of suppressed addback hits and number of fragments per suppressed addback hit based on the provided TBgo and vector of hits

Because the functions to return hit vectors etc. are almost always returning vectors of TDetectorHits, T is most likely TDetectorHit. This means we can't use T directly to create a new hit, we need to use TClass::New().

Definition at line 94 of file TSuppressed.h.

References TSuppressed::AddbackCriterion(), TDetector::GetHitVector(), TDetectorHit::kIsEnergySet, TDetectorHit::kIsTimeSet, and TSuppressed::SuppressionCriterion().

Referenced by TFipps::GetSuppressedAddbackMultiplicity(), GetSuppressedAddbackMultiplicity(), TIfin::GetSuppressedAddbackMultiplicity(), TTdrClover::GetSuppressedAddbackMultiplicity(), and TTdrTigress::GetSuppressedAddbackMultiplicity().

◆ CTCorrectedEnergy()

Double_t TGriffin::CTCorrectedEnergy ( const TGriffinHit * hit_to_correct,
const TGriffinHit * other_hit,
bool time_constraint = true )
static

◆ FixCrossTalk()

◆ GetAddbackCriterion()

std::function< bool(const TDetectorHit *, const TDetectorHit *)> TGriffin::GetAddbackCriterion ( ) const
inline

Definition at line 65 of file TGriffin.h.

References fAddbackCriterion.

◆ GetAddbackHit()

◆ GetAddbackMultiplicity()

◆ GetColorFromNumber()

const char * TGriffin::GetColorFromNumber ( int number)
static

Definition at line 469 of file TGriffin.cxx.

Referenced by CrossTalkFix().

◆ GetDetectorPosition()

TVector3 TGriffin::GetDetectorPosition ( int DetNbr)
static

!

Definition at line 368 of file TGriffin.cxx.

References fCloverPosition.

◆ GetGriffinHit()

TGriffinHit * TGriffin::GetGriffinHit ( const int & i)

!

Get Griffin hit indicated by index i. Throws an out of range exception if the index is out of the range of the hit vector. Applies cross-talk corrections if they haven't already been applied and are enabled. Note: This is different from using TDetector::GetHit and casting the result to a TGriffinHit* as in that case no cross-talk corrections are applied.

Definition at line 244 of file TGriffin.cxx.

References FixCrossTalk(), TDetector::Hits(), and IsCrossTalkSet().

Referenced by ComptonHists(), AlphanumericHelper::Exec(), ComptonPolarimetryHelper::Exec(), DirectoryHelper::Exec(), EfficiencyHelper::Exec(), ExampleEventHelper::Exec(), TimeWalkHelper::Exec(), AlphanumericSelector::FillHistograms(), AngularCorrelationSelector::FillHistograms(), ExampleEventSelector::FillHistograms(), TimeWalkSelector::FillHistograms(), main(), and MakeAnalysisHistograms().

◆ GetHit()

◆ GetHitVector()

◆ GetMultiplicity()

◆ GetNAddbackFrags()

UShort_t TGriffin::GetNAddbackFrags ( const size_t & idx)

Definition at line 394 of file TGriffin.cxx.

References fAddbackFrags.

◆ GetNSuppressedAddbackFrags()

UShort_t TGriffin::GetNSuppressedAddbackFrags ( const size_t & idx)

Definition at line 605 of file TGriffin.cxx.

References fSuppressedAddbackFrags.

Referenced by CrossTalkHelper::Exec(), and CrossTalk::FillHistograms().

◆ GetPosition()

◆ GetSuppressedAddbackHit()

◆ GetSuppressedAddbackMultiplicity()

Short_t TGriffin::GetSuppressedAddbackMultiplicity ( const TBgo * bgo)

◆ GetSuppressedHit()

◆ GetSuppressedMultiplicity()

Short_t TGriffin::GetSuppressedMultiplicity ( const TBgo * bgo)

◆ GetSuppressionCriterion()

std::function< bool(const TDetectorHit *, const TDetectorHit *)> TGriffin::GetSuppressionCriterion ( ) const
inline

Definition at line 81 of file TGriffin.h.

References fSuppressionCriterion.

◆ Hits() [1/2]

◆ Hits() [2/2]

const std::vector< TDetectorHit * > & TDetector::Hits ( ) const
inlineinherited

Definition at line 79 of file TDetector.h.

References TDetector::fHits.

◆ IsAddbackSet()

bool TGriffin::IsAddbackSet ( ) const

Definition at line 224 of file TGriffin.cxx.

References kIsAddbackSet, and TestBitNumber().

Referenced by GetAddbackMultiplicity(), and Print().

◆ IsCrossTalkSet()

◆ IsSuppressed()

bool TGriffin::IsSuppressed ( ) const

Definition at line 480 of file TGriffin.cxx.

References kIsSuppressed, and TestBitNumber().

Referenced by GetSuppressedMultiplicity().

◆ IsSuppressedAddbackSet()

bool TGriffin::IsSuppressedAddbackSet ( ) const

Definition at line 485 of file TGriffin.cxx.

References kIsSuppressedAddbackSet, and TestBitNumber().

Referenced by GetSuppressedAddbackMultiplicity().

◆ NoHits()

virtual bool TDetector::NoHits ( ) const
inlinevirtualinherited

◆ operator=() [1/2]

TGriffin & TGriffin::operator= ( const TGriffin & rhs)

!

Definition at line 218 of file TGriffin.cxx.

References Copy().

◆ operator=() [2/2]

TGriffin & TGriffin::operator= ( TGriffin && )
defaultnoexcept

◆ Print() [1/2]

void TGriffin::Print ( Option_t * opt = "") const
override

!

Definition at line 189 of file TGriffin.cxx.

References Print().

Referenced by Print(), and Print().

◆ Print() [2/2]

void TGriffin::Print ( std::ostream & out) const
overridevirtual

◆ ResetAddback()

void TGriffin::ResetAddback ( )

!

Definition at line 383 of file TGriffin.cxx.

References fAddbackFrags, fAddbackHits, SetAddback(), and SetCrossTalk().

Referenced by ComptonHists().

◆ ResetFlags()

void TGriffin::ResetFlags ( ) const

Definition at line 378 of file TGriffin.cxx.

References fGriffinBits.

◆ ResetSuppressed()

void TGriffin::ResetSuppressed ( )

Definition at line 537 of file TGriffin.cxx.

References fSuppressedHits, and SetSuppressed().

◆ ResetSuppressedAddback()

void TGriffin::ResetSuppressedAddback ( )

◆ SetAddback()

void TGriffin::SetAddback ( bool flag = true) const
private

Definition at line 234 of file TGriffin.cxx.

References kIsAddbackSet, and SetBitNumber().

Referenced by GetAddbackMultiplicity(), and ResetAddback().

◆ SetAddbackCriterion()

void TGriffin::SetAddbackCriterion ( std::function< bool(const TDetectorHit *, const TDetectorHit *)> criterion)
inline

Definition at line 61 of file TGriffin.h.

References fAddbackCriterion.

◆ SetBitNumber()

void TGriffin::SetBitNumber ( EGriffinBits bit,
Bool_t set ) const
private

◆ SetCoreWave()

static bool TGriffin::SetCoreWave ( )
inlinestatic

!

Definition at line 117 of file TGriffin.h.

References fSetCoreWave.

◆ SetCrossTalk()

void TGriffin::SetCrossTalk ( bool flag = true) const
private

Definition at line 239 of file TGriffin.cxx.

References kIsCrossTalkSet, and SetBitNumber().

Referenced by FixCrossTalk(), and ResetAddback().

◆ SetSuppressed()

void TGriffin::SetSuppressed ( bool flag = true) const
private

Definition at line 532 of file TGriffin.cxx.

References kIsSuppressed, and SetBitNumber().

Referenced by GetSuppressedMultiplicity(), and ResetSuppressed().

◆ SetSuppressedAddback()

void TGriffin::SetSuppressedAddback ( bool flag = true) const
private

◆ SetSuppressionCriterion()

void TGriffin::SetSuppressionCriterion ( std::function< bool(const TDetectorHit *, const TDetectorHit *)> criterion)
inline

Definition at line 77 of file TGriffin.h.

References fSuppressionCriterion.

◆ SuppressionCriterion()

bool TGriffin::SuppressionCriterion ( const TDetectorHit * hit,
const TDetectorHit * bgoHit )
inlineoverridevirtual

Reimplemented from TSuppressed.

Definition at line 83 of file TGriffin.h.

References fSuppressionCriterion.

◆ TestBitNumber()

Bool_t TGriffin::TestBitNumber ( EGriffinBits bit) const
inlineprivate

Member Data Documentation

◆ fAddbackCriterion

std::function< bool(const TDetectorHit *, const TDetectorHit *)> TGriffin::fAddbackCriterion = DefaultGriffinAddback
staticprivate

Definition at line 99 of file TGriffin.h.

Referenced by AddbackCriterion(), GetAddbackCriterion(), and SetAddbackCriterion().

◆ fAddbackFrags

std::vector<UShort_t> TGriffin::fAddbackFrags
mutableprivate

! Number of crystals involved in creating in the addback hit

Definition at line 109 of file TGriffin.h.

Referenced by Clear(), Copy(), GetAddbackMultiplicity(), GetNAddbackFrags(), and ResetAddback().

◆ fAddbackHits

std::vector<TDetectorHit*> TGriffin::fAddbackHits
mutableprivate

! Used to create addback hits on the fly

Definition at line 108 of file TGriffin.h.

Referenced by ~TGriffin(), Clear(), Copy(), GetAddbackHit(), GetAddbackMultiplicity(), Print(), and ResetAddback().

◆ fCloverPosition

std::array< TVector3, 17 > TGriffin::fCloverPosition
staticprivate

! Position of each HPGe Clover

Definition at line 56 of file TGriffin.h.

Referenced by GetDetectorPosition(), and GetPosition().

◆ fCycleStart

int64_t TGriffin::fCycleStart
private

! The start of the cycle

Definition at line 105 of file TGriffin.h.

Referenced by Clear(), Copy(), and Print().

◆ fGriffinBits

TTransientBits<UChar_t> TGriffin::fGriffinBits
mutableprivate

Definition at line 106 of file TGriffin.h.

Referenced by ClearStatus(), Copy(), ResetFlags(), SetBitNumber(), and TestBitNumber().

◆ fHits

◆ fSetCoreWave

bool TGriffin::fSetCoreWave = false
staticprivate

! Flag for Waveforms ON/OFF

Definition at line 103 of file TGriffin.h.

Referenced by SetCoreWave().

◆ fSuppressedAddbackFrags

std::vector<UShort_t> TGriffin::fSuppressedAddbackFrags
mutableprivate

! Number of crystals involved in creating in the suppressed addback hit

Definition at line 114 of file TGriffin.h.

Referenced by Clear(), Copy(), GetNSuppressedAddbackFrags(), GetSuppressedAddbackMultiplicity(), and ResetSuppressedAddback().

◆ fSuppressedAddbackHits

std::vector<TDetectorHit*> TGriffin::fSuppressedAddbackHits
mutableprivate

! Used to create suppressed addback hits on the fly

Definition at line 113 of file TGriffin.h.

Referenced by ~TGriffin(), Clear(), Copy(), GetSuppressedAddbackHit(), GetSuppressedAddbackMultiplicity(), and ResetSuppressedAddback().

◆ fSuppressedHits

std::vector<TDetectorHit*> TGriffin::fSuppressedHits
private

! The set of suppressed crystal hits

Definition at line 111 of file TGriffin.h.

Referenced by ~TGriffin(), Clear(), Copy(), GetSuppressedHit(), GetSuppressedMultiplicity(), and ResetSuppressed().

◆ fSuppressionCriterion

std::function< bool(const TDetectorHit *, const TDetectorHit *)> TGriffin::fSuppressionCriterion = DefaultGriffinSuppression
staticprivate