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

Detailed Description

The TIfin class defines the observables and algorithms used when analyzing IFIN data. It includes detector positions, add-back methods, etc.

Definition at line 32 of file TIfin.h.

Public Types

enum class  EIfinBits {
  kIsAddbackSet = 1<<0 , kIsCrossTalkSet = 1<<1 , kIsSuppressedSet = 1<<2 , kIsSuppressedAddbackSet = 1<<3 ,
  kBit4 = 1<<4 , kBit5 = 1<<5 , kBit6 = 1<<6 , kBit7 = 1<<7
}
 

Public Member Functions

 TIfin ()
 
 TIfin (const TIfin &)
 
 ~TIfin () 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
 
virtual void ClearTransients ()
 
void Copy (TObject &) const override
 
void FixCrossTalk ()
 
std::function< bool(const TDetectorHit *, const TDetectorHit *)> GetAddbackCriterion () const
 
TIfinHitGetAddbackHit (const int &i)
 
Int_t GetAddbackMultiplicity ()
 
virtual TDetectorHitGetHit (const int &index) const
 
virtual const std::vector< TDetectorHit * > & GetHitVector () const
 
TIfinHitGetIfinHit (const Int_t &i)
 
virtual Short_t GetMultiplicity () const
 
UShort_t GetNAddbackFrags (const size_t &idx)
 
TIfinHitGetSuppressedAddbackHit (const int &i)
 
Int_t GetSuppressedAddbackMultiplicity (const TBgo *bgo)
 
TIfinHitGetSuppressedHit (const int &i)
 
Int_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
 
TIfinoperator= (const TIfin &)
 
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 TIfinHit *const hit_to_correct, const TIfinHit *const other_hit, Bool_t time_constraint=true)
 
static const char * GetColorFromNumber (int number)
 
static TVector3 GetPosition (int DetNbr, int CryNbr=5, double dist=90.0)
 

Static Public Attributes

static const Double_t gCrossTalkPar [2][4][4]
 
static const Double_t gStrongCT [2] = {-0.02674, -0.000977}
 
static const Double_t gWeakCT [2] = {0.005663, -0.00028014}
 

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
 
std::vector< UShort_t > & GetAddbackFragVector ()
 
std::vector< TDetectorHit * > & GetAddbackVector ()
 
std::vector< UShort_t > & GetSuppressedAddbackFragVector ()
 
std::vector< TDetectorHit * > & GetSuppressedAddbackVector ()
 
std::vector< TDetectorHit * > & GetSuppressedVector ()
 
void SetAddback (bool flag=true) const
 
void SetBitNumber (EIfinBits 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 (EIfinBits bit) const
 

Private Attributes

std::vector< UShort_t > fAddbackFrags
 
std::vector< TDetectorHit * > fAddbackHits
 
std::vector< TDetectorHit * > fHits
 
TTransientBits< UChar_t > fIfinBits
 
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 = DefaultIfinAddback
 
static std::function< bool(const TDetectorHit *, const TDetectorHit *)> fSuppressionCriterion = DefaultIfinSuppression
 
static TVector3 gCloverPosition [17]
 
+ Inheritance diagram for TIfin:
+ Collaboration diagram for TIfin:

Member Enumeration Documentation

◆ EIfinBits

enum class TIfin::EIfinBits
strong
Enumerator
kIsAddbackSet 
kIsCrossTalkSet 
kIsSuppressedSet 
kIsSuppressedAddbackSet 
kBit4 
kBit5 
kBit6 
kBit7 

Definition at line 34 of file TIfin.h.

Constructor & Destructor Documentation

◆ TIfin() [1/2]

TIfin::TIfin ( )

Definition at line 112 of file TIfin.cxx.

References Clear().

◆ TIfin() [2/2]

TIfin::TIfin ( const TIfin & rhs)

Definition at line 121 of file TIfin.cxx.

References Copy().

◆ ~TIfin()

TIfin::~TIfin ( )
override

Definition at line 147 of file TIfin.cxx.

References fAddbackHits, fSuppressedAddbackHits, and fSuppressedHits.

Member Function Documentation

◆ AddbackCriterion()

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

Reimplemented from TSuppressed.

Definition at line 69 of file TIfin.h.

References fAddbackCriterion.

◆ AddFragment()

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

!

Reimplemented from TDetector.

Definition at line 423 of file TIfin.cxx.

References TDetector::fHits, TChannel::GetMnemonic(), TMnemonic::kG, and TMnemonic::SubSystem().

◆ AddHit()

◆ BuildHits()

void TIfin::BuildHits ( )
inlineoverridevirtual

!

Reimplemented from TDetector.

Definition at line 57 of file TIfin.h.

◆ Clear()

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

◆ ClearStatus()

void TIfin::ClearStatus ( ) const
inlineprivate

!

Definition at line 119 of file TIfin.h.

References fIfinBits.

Referenced by Clear().

◆ ClearTransients()

void TDetector::ClearTransients ( )
virtualinherited

!

Reimplemented in TGriffin, TS3, TTigress, and TTrific.

Definition at line 54 of file TDetector.cxx.

References TDetector::fHits.

Referenced by TGriffin::ClearTransients(), TTigress::ClearTransients(), and TTrific::ClearTransients().

◆ Copy()

void TIfin::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(), TGriffin::GetAddbackMultiplicity(), 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(), TGriffin::GetSuppressedMultiplicity(), 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(), TGriffin::GetSuppressedAddbackMultiplicity(), GetSuppressedAddbackMultiplicity(), TTdrClover::GetSuppressedAddbackMultiplicity(), and TTdrTigress::GetSuppressedAddbackMultiplicity().

◆ CTCorrectedEnergy()

Double_t TIfin::CTCorrectedEnergy ( const TIfinHit *const hit_to_correct,
const TIfinHit *const other_hit,
Bool_t time_constraint = true )
static

Corrects the energy of the hit to correct by ADDING the uncorrected energy of the other hit times the parameter for this combination This is different to the very similar TGriffin function that SUBTRACTS instead of ADDING. If time_constraint is true it also checks that the two hits are within the addback window to each other.

Definition at line 534 of file TIfin.cxx.

References TAnalysisOptions::AddbackWindow(), TGRSIOptions::AnalysisOptions(), DRED, TDetectorHit::GetChannel(), TDetectorHit::GetCrystal(), TChannel::GetCTCoeff(), TDetectorHit::GetDetector(), TDetectorHit::GetEnergy(), TIfinHit::GetNoCTEnergy(), and TDetectorHit::GetTime().

Referenced by FixCrossTalk().

◆ FixCrossTalk()

◆ GetAddbackCriterion()

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

Definition at line 67 of file TIfin.h.

References fAddbackCriterion.

◆ GetAddbackFragVector()

std::vector< UShort_t > & TIfin::GetAddbackFragVector ( )
private

!

Definition at line 208 of file TIfin.cxx.

References fAddbackFrags.

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

◆ GetAddbackHit()

TIfinHit * TIfin::GetAddbackHit ( const int & i)

Definition at line 391 of file TIfin.cxx.

References FixCrossTalk(), GetAddbackVector(), and IsCrossTalkSet().

◆ GetAddbackMultiplicity()

◆ GetAddbackVector()

std::vector< TDetectorHit * > & TIfin::GetAddbackVector ( )
private

!

Definition at line 203 of file TIfin.cxx.

References fAddbackHits.

Referenced by GetAddbackHit(), GetAddbackMultiplicity(), and ResetAddback().

◆ GetColorFromNumber()

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

Definition at line 597 of file TIfin.cxx.

◆ GetHit()

◆ GetHitVector()

◆ GetIfinHit()

TIfinHit * TIfin::GetIfinHit ( const Int_t & i)

Definition at line 268 of file TIfin.cxx.

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

◆ GetMultiplicity()

◆ GetNAddbackFrags()

UShort_t TIfin::GetNAddbackFrags ( const size_t & idx)

Definition at line 518 of file TIfin.cxx.

References GetAddbackFragVector().

◆ GetPosition()

TVector3 TIfin::GetPosition ( int DetNbr,
int CryNbr = 5,
double dist = 90.0 )
static

!

Definition at line 444 of file TIfin.cxx.

References gCloverPosition.

Referenced by TIfinHit::GetPosition().

◆ GetSuppressedAddbackFragVector()

std::vector< UShort_t > & TIfin::GetSuppressedAddbackFragVector ( )
private

Definition at line 223 of file TIfin.cxx.

References fSuppressedAddbackFrags.

Referenced by GetSuppressedAddbackMultiplicity(), and ResetSuppressedAddback().

◆ GetSuppressedAddbackHit()

TIfinHit * TIfin::GetSuppressedAddbackHit ( const int & i)

Definition at line 407 of file TIfin.cxx.

References FixCrossTalk(), GetSuppressedAddbackVector(), and IsCrossTalkSet().

◆ GetSuppressedAddbackMultiplicity()

◆ GetSuppressedAddbackVector()

std::vector< TDetectorHit * > & TIfin::GetSuppressedAddbackVector ( )
private

◆ GetSuppressedHit()

TIfinHit * TIfin::GetSuppressedHit ( const int & i)

Definition at line 284 of file TIfin.cxx.

References FixCrossTalk(), fSuppressedHits, and IsCrossTalkSet().

◆ GetSuppressedMultiplicity()

Int_t TIfin::GetSuppressedMultiplicity ( const TBgo * bgo)

Automatically builds the suppressed hits using the fSuppressionCriterion and returns the number of suppressed hits

Definition at line 300 of file TIfin.cxx.

References TSuppressed::CreateSuppressed(), FixCrossTalk(), TDetector::GetHitVector(), GetSuppressedVector(), IsCrossTalkSet(), IsSuppressed(), and SetSuppressed().

◆ GetSuppressedVector()

std::vector< TDetectorHit * > & TIfin::GetSuppressedVector ( )
private

Definition at line 213 of file TIfin.cxx.

References fSuppressedHits.

Referenced by GetSuppressedMultiplicity(), and ResetSuppressed().

◆ GetSuppressionCriterion()

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

Definition at line 89 of file TIfin.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 TIfin::IsAddbackSet ( ) const

Definition at line 228 of file TIfin.cxx.

References kIsAddbackSet, and TestBitNumber().

Referenced by GetAddbackMultiplicity(), and Print().

◆ IsCrossTalkSet()

◆ IsSuppressed()

bool TIfin::IsSuppressed ( ) const

Definition at line 238 of file TIfin.cxx.

References kIsSuppressedSet, and TestBitNumber().

Referenced by GetSuppressedMultiplicity().

◆ IsSuppressedAddbackSet()

bool TIfin::IsSuppressedAddbackSet ( ) const

Definition at line 243 of file TIfin.cxx.

References kIsSuppressedAddbackSet, and TestBitNumber().

Referenced by GetSuppressedAddbackMultiplicity().

◆ NoHits()

virtual bool TDetector::NoHits ( ) const
inlinevirtualinherited

◆ operator=()

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

!

Definition at line 196 of file TIfin.cxx.

References Copy().

◆ Print() [1/2]

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

!

Definition at line 175 of file TIfin.cxx.

References Print().

Referenced by Print().

◆ Print() [2/2]

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

Reimplemented from TDetector.

Definition at line 180 of file TIfin.cxx.

References fAddbackHits, TDetector::GetMultiplicity(), IsAddbackSet(), and IsCrossTalkSet().

◆ ResetAddback()

void TIfin::ResetAddback ( )

Definition at line 487 of file TIfin.cxx.

References GetAddbackFragVector(), GetAddbackVector(), SetAddback(), and SetCrossTalk().

◆ ResetFlags()

void TIfin::ResetFlags ( ) const

Definition at line 482 of file TIfin.cxx.

References fIfinBits.

◆ ResetSuppressed()

void TIfin::ResetSuppressed ( )

Definition at line 498 of file TIfin.cxx.

References GetSuppressedVector(), and SetSuppressed().

◆ ResetSuppressedAddback()

void TIfin::ResetSuppressedAddback ( )

◆ SetAddback()

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

Definition at line 248 of file TIfin.cxx.

References kIsAddbackSet, and SetBitNumber().

Referenced by GetAddbackMultiplicity(), and ResetAddback().

◆ SetAddbackCriterion()

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

Definition at line 63 of file TIfin.h.

References fAddbackCriterion.

◆ SetBitNumber()

void TIfin::SetBitNumber ( EIfinBits bit,
Bool_t set ) const
private

Definition at line 528 of file TIfin.cxx.

References fIfinBits, and TTransientBits< T >::SetBit().

Referenced by SetAddback(), SetCrossTalk(), SetSuppressed(), and SetSuppressedAddback().

◆ SetCrossTalk()

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

Definition at line 253 of file TIfin.cxx.

References kIsCrossTalkSet, and SetBitNumber().

Referenced by FixCrossTalk(), ResetAddback(), and ResetSuppressedAddback().

◆ SetSuppressed()

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

Definition at line 258 of file TIfin.cxx.

References kIsSuppressedSet, and SetBitNumber().

Referenced by GetSuppressedMultiplicity(), and ResetSuppressed().

◆ SetSuppressedAddback()

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

Definition at line 263 of file TIfin.cxx.

References kIsSuppressedAddbackSet, and SetBitNumber().

Referenced by GetSuppressedAddbackMultiplicity(), and ResetSuppressedAddback().

◆ SetSuppressionCriterion()

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

Definition at line 85 of file TIfin.h.

References fSuppressionCriterion.

◆ SuppressionCriterion()

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

Reimplemented from TSuppressed.

Definition at line 91 of file TIfin.h.

References fSuppressionCriterion.

◆ TestBitNumber()

Bool_t TIfin::TestBitNumber ( EIfinBits bit) const
inlineprivate

Member Data Documentation

◆ fAddbackCriterion

std::function< bool(const TDetectorHit *, const TDetectorHit *)> TIfin::fAddbackCriterion = DefaultIfinAddback
staticprivate

Definition at line 100 of file TIfin.h.

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

◆ fAddbackFrags

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

! Number of crystals involved in creating the addback hit

Definition at line 109 of file TIfin.h.

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

◆ fAddbackHits

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

! Used to create addback hits on the fly

Definition at line 108 of file TIfin.h.

Referenced by ~TIfin(), Clear(), Copy(), GetAddbackVector(), and Print().

◆ fHits

◆ fIfinBits

TTransientBits<UChar_t> TIfin::fIfinBits
mutableprivate

Definition at line 106 of file TIfin.h.

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

◆ fSuppressedAddbackFrags

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

! Number of crystals involved in creating the suppressed addback hit

Definition at line 112 of file TIfin.h.

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

◆ fSuppressedAddbackHits

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

! Used to create suppressed addback hits on the fly

Definition at line 111 of file TIfin.h.

Referenced by ~TIfin(), Clear(), Copy(), and GetSuppressedAddbackVector().

◆ fSuppressedHits

std::vector<TDetectorHit*> TIfin::fSuppressedHits
mutableprivate

! Used to create suppressed hits on the fly

Definition at line 110 of file TIfin.h.

Referenced by ~TIfin(), Clear(), Copy(), GetSuppressedHit(), and GetSuppressedVector().

◆ fSuppressionCriterion

std::function< bool(const TDetectorHit *, const TDetectorHit *)> TIfin::fSuppressionCriterion = DefaultIfinSuppression
staticprivate

Definition at line 101 of file TIfin.h.

Referenced by GetSuppressionCriterion(), SetSuppressionCriterion(), and SuppressionCriterion().

◆ gCloverPosition

TVector3 TIfin::gCloverPosition
staticprivate

! Position of each HPGe Clover

Definition at line 43 of file TIfin.h.

Referenced by GetPosition().

◆ gCrossTalkPar

const Double_t TIfin::gCrossTalkPar
static
Initial value:
= {{{0.0, gStrongCT[0], gWeakCT[0], gWeakCT[0]},
{gStrongCT[0], 0.0, gWeakCT[0], gWeakCT[0]},
{gWeakCT[0], gWeakCT[0], 0.0, gStrongCT[0]},
{gWeakCT[0], gWeakCT[0], gStrongCT[0], 0.0}},
{{0.0, gStrongCT[1], gWeakCT[1], gWeakCT[1]},
{gStrongCT[1], 0.0, gWeakCT[1], gWeakCT[1]},
{gWeakCT[1], gWeakCT[1], 0.0, gStrongCT[1]},
{gWeakCT[1], gWeakCT[1], gStrongCT[1], 0.0}}}
static const Double_t gStrongCT[2]
!
Definition TIfin.h:101
static const Double_t gWeakCT[2]
!
Definition TIfin.h:102

!

Definition at line 103 of file TIfin.h.

◆ gStrongCT

const Double_t TIfin::gStrongCT = {-0.02674, -0.000977}
static

!

Definition at line 101 of file TIfin.h.

◆ gWeakCT

const Double_t TIfin::gWeakCT = {0.005663, -0.00028014}
static

!

Definition at line 102 of file TIfin.h.