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

Detailed Description

The TLaBr class defines the observables and algorithms used when analyzing LaBr data. It includes detector positions, etc.

Definition at line 28 of file TLaBr.h.

Public Types

enum class  ELaBrBits {
  kIsSuppressed = 1 << 0 , kBit1 = 1 << 1 , kBit2 = 1 << 2 , kBit3 = 1 << 3 ,
  kBit4 = 1 << 4 , kBit5 = 1 << 5 , kBit6 = 1 << 6 , kBit7 = 1 << 7
}
 

Public Member Functions

 TLaBr ()
 
 TLaBr (const TLaBr &rhs)
 
 TLaBr (TLaBr &&) noexcept=default
 
 ~TLaBr () override
 
virtual bool AddbackCriterion (const TDetectorHit *, const TDetectorHit *)
 
void AddFragment (const std::shared_ptr< const TFragment > &, TChannel *) override
 
virtual void AddHit (TDetectorHit *hit)
 
void BuildHits () override
 
void Clear (Option_t *opt="") override
 
virtual void ClearTransients ()
 
void Copy (TObject &rhs) const override
 
virtual TDetectorHitGetHit (const int &index) const
 
virtual const std::vector< TDetectorHit * > & GetHitVector () const
 
TLaBrHitGetLaBrHit (const int &i) const
 
virtual Short_t GetMultiplicity () const
 
TLaBrHitGetSuppressedHit (const int &i)
 
Short_t GetSuppressedMultiplicity (const TBgo *fBgo)
 
std::function< bool(const TDetectorHit *, const TDetectorHit *)> GetSuppressionCriterion () const
 
std::vector< TDetectorHit * > & Hits ()
 
const std::vector< TDetectorHit * > & Hits () const
 
bool IsSuppressed () const
 
virtual bool NoHits () const
 
TLaBroperator= (const TLaBr &)
 
TLaBroperator= (TLaBr &&) noexcept=default
 
void Print (Option_t *opt="") const override
 
void Print (std::ostream &out) const override
 
void ResetSuppressed ()
 
void SetSuppressed (bool flag)
 
void SetSuppressionCriterion (std::function< bool(const TDetectorHit *, const TDetectorHit *)> criterion)
 
bool SuppressionCriterion (const TDetectorHit *hit, const TDetectorHit *bgoHit) override
 

Static Public Member Functions

static TVector3 GetPosition (int DetNbr)
 

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 SetBitNumber (const ELaBrBits bit, const bool set) const
 
Bool_t TestBitNumber (const ELaBrBits bit) const
 

Private Attributes

std::vector< TDetectorHit * > fHits
 
TTransientBits< UChar_t > fLaBrBits
 
std::vector< TDetectorHit * > fSuppressedHits
 

Static Private Attributes

static std::array< TVector3, 9 > fPosition
 
static std::function< bool(const TDetectorHit *, const TDetectorHit *)> fSuppressionCriterion = DefaultLaBrSuppression
 
+ Inheritance diagram for TLaBr:
+ Collaboration diagram for TLaBr:

Member Enumeration Documentation

◆ ELaBrBits

enum class TLaBr::ELaBrBits
strong
Enumerator
kIsSuppressed 
kBit1 
kBit2 
kBit3 
kBit4 
kBit5 
kBit6 
kBit7 

Definition at line 30 of file TLaBr.h.

Constructor & Destructor Documentation

◆ TLaBr() [1/3]

TLaBr::TLaBr ( )

Definition at line 30 of file TLaBr.cxx.

References Clear().

◆ TLaBr() [2/3]

TLaBr::TLaBr ( const TLaBr & rhs)

Definition at line 44 of file TLaBr.cxx.

References Copy().

◆ TLaBr() [3/3]

TLaBr::TLaBr ( TLaBr && )
defaultnoexcept

◆ ~TLaBr()

TLaBr::~TLaBr ( )
override

Definition at line 36 of file TLaBr.cxx.

References fSuppressedHits.

Member Function Documentation

◆ AddbackCriterion()

virtual bool TSuppressed::AddbackCriterion ( const TDetectorHit * ,
const TDetectorHit *  )
inlinevirtualinherited

Reimplemented in TFipps, TGriffin, and TIfin.

Definition at line 30 of file TSuppressed.h.

Referenced by TSuppressed::CreateAddback(), and TSuppressed::CreateSuppressedAddback().

◆ AddFragment()

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

!

Reimplemented from TDetector.

Definition at line 143 of file TLaBr.cxx.

References TDetector::AddHit().

◆ AddHit()

◆ BuildHits()

void TLaBr::BuildHits ( )
inlineoverridevirtual

!

Reimplemented from TDetector.

Definition at line 70 of file TLaBr.h.

◆ Clear()

void TLaBr::Clear ( Option_t * opt = "")
override

!

Definition at line 50 of file TLaBr.cxx.

References TSuppressed::Clear(), fLaBrBits, and fSuppressedHits.

Referenced by TLaBr().

◆ ClearStatus()

void TLaBr::ClearStatus ( ) const
inlineprivate

!

Definition at line 84 of file TLaBr.h.

References fLaBrBits.

◆ 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 TLaBr::Copy ( TObject & rhs) const
override

Definition at line 61 of file TLaBr.cxx.

References TSuppressed::Copy(), fLaBrBits, and fSuppressedHits.

Referenced by TLaBr(), and operator=().

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

◆ GetHit()

◆ GetHitVector()

◆ GetLaBrHit()

TLaBrHit * TLaBr::GetLaBrHit ( const int & i) const
inline

Definition at line 49 of file TLaBr.h.

References TDetector::GetHit().

Referenced by main().

◆ GetMultiplicity()

◆ GetPosition()

static TVector3 TLaBr::GetPosition ( int DetNbr)
inlinestatic

!

Definition at line 72 of file TLaBr.h.

References fPosition.

Referenced by TLaBrHit::GetPosition().

◆ GetSuppressedHit()

TLaBrHit * TLaBr::GetSuppressedHit ( const int & i)

!

Definition at line 132 of file TLaBr.cxx.

References fSuppressedHits.

◆ GetSuppressedMultiplicity()

Short_t TLaBr::GetSuppressedMultiplicity ( const TBgo * fBgo)

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

Definition at line 111 of file TLaBr.cxx.

References TSuppressed::CreateSuppressed(), fSuppressedHits, TDetector::Hits(), IsSuppressed(), TDetector::NoHits(), and SetSuppressed().

◆ GetSuppressionCriterion()

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

Definition at line 56 of file TLaBr.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.

◆ IsSuppressed()

bool TLaBr::IsSuppressed ( ) const

Definition at line 92 of file TLaBr.cxx.

References kIsSuppressed, and TestBitNumber().

Referenced by GetSuppressedMultiplicity().

◆ NoHits()

virtual bool TDetector::NoHits ( ) const
inlinevirtualinherited

◆ operator=() [1/2]

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

!

Definition at line 73 of file TLaBr.cxx.

References Copy().

◆ operator=() [2/2]

TLaBr & TLaBr::operator= ( TLaBr && )
defaultnoexcept

◆ Print() [1/2]

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

!

Prints out TLaBr Multiplicity, currently does little.

Definition at line 79 of file TLaBr.cxx.

References Print().

Referenced by Print().

◆ Print() [2/2]

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

!

Reimplemented from TDetector.

Definition at line 85 of file TLaBr.cxx.

References TDetector::GetMultiplicity().

◆ ResetSuppressed()

void TLaBr::ResetSuppressed ( )

Definition at line 102 of file TLaBr.cxx.

References fSuppressedHits, and SetSuppressed().

◆ SetBitNumber()

void TLaBr::SetBitNumber ( const ELaBrBits bit,
const bool set ) const
inlineprivate

Definition at line 85 of file TLaBr.h.

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

Referenced by SetSuppressed().

◆ SetSuppressed()

void TLaBr::SetSuppressed ( bool flag)

Definition at line 97 of file TLaBr.cxx.

References kIsSuppressed, and SetBitNumber().

Referenced by GetSuppressedMultiplicity(), and ResetSuppressed().

◆ SetSuppressionCriterion()

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

Definition at line 52 of file TLaBr.h.

References fSuppressionCriterion.

◆ SuppressionCriterion()

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

Reimplemented from TSuppressed.

Definition at line 58 of file TLaBr.h.

References fSuppressionCriterion.

◆ TestBitNumber()

Bool_t TLaBr::TestBitNumber ( const ELaBrBits bit) const
inlineprivate

Definition at line 86 of file TLaBr.h.

References fLaBrBits, and TTransientBits< T >::TestBit().

Referenced by IsSuppressed().

Member Data Documentation

◆ fHits

◆ fLaBrBits

TTransientBits<UChar_t> TLaBr::fLaBrBits
mutableprivate

Definition at line 82 of file TLaBr.h.

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

◆ fPosition

std::array< TVector3, 9 > TLaBr::fPosition
staticprivate
Initial value:
= {
TVector3(0, 0, 1),
TVector3(14.3025, 4.6472, 22.8096),
TVector3(0, 15.0386, 22.8096),
TVector3(-14.3025, 4.6472, 22.8096),
TVector3(-8.8395, -12.1665, 22.8096),
TVector3(8.8395, -12.1665, 22.8096),
TVector3(19.7051, 6.4026, 6.2123),
TVector3(0, 20.7192, 6.2123),
TVector3(-19.7051, 6.4026, 6.2123),
}

! Position of each detectir

Definition at line 17 of file TLaBr.h.

Referenced by GetPosition().

◆ fSuppressedHits

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

◆ fSuppressionCriterion

std::function< bool(const TDetectorHit *, const TDetectorHit *)> TLaBr::fSuppressionCriterion = DefaultLaBrSuppression
staticprivate

Definition at line 76 of file TLaBr.h.

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