GRSISort
Created by P.C. Bender
Developement Team: P.C. Bender, R. Dunlop, V. Bildstein
An extension of the ROOT analysis Framework
TLaBr Class Reference

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  ELaBrBits {
  ELaBrBits::kIsSuppressed = 1<<0, ELaBrBits::kBit1 = 1<<1, ELaBrBits::kBit2 = 1<<2, ELaBrBits::kBit3 = 1<<3,
  ELaBrBits::kBit4 = 1<<4, ELaBrBits::kBit5 = 1<<5, ELaBrBits::kBit6 = 1<<6, ELaBrBits::kBit7 = 1<<7
}
 

Public Member Functions

 TLaBr ()
 
 TLaBr (const TLaBr &rhs)
 
 ~TLaBr () override
 
virtual bool AddbackCriterion (const TDetectorHit *, const TDetectorHit *)
 
void AddFragment (const std::shared_ptr< const TFragment > &, TChannel *) override
 
void BuildHits () override
 
void Clear (Option_t *opt="") override
 
virtual void ClearTransients ()
 
void Copy (TObject &rhs) const override
 
virtual TDetectorHitGetHit (const int &) 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
 
bool IsSuppressed () const
 
TLaBroperator= (const TLaBr &)
 
void Print (Option_t *opt="") const override
 
void Print (std::ostream &out) const override
 
void ResetSuppressed ()
 
void SetSuppressed (const 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)
 

Protected Attributes

std::vector< TDetectorHit * > fHits
 

Private Member Functions

void ClearStatus () const
 
void SetBitNumber (const ELaBrBits bit, const bool set) const
 
Bool_t TestBitNumber (const ELaBrBits bit) const
 

Private Attributes

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

Static Private Attributes

static std::function< bool(const TDetectorHit *, const TDetectorHit *)> fSuppressionCriterion = DefaultLaBrSuppression
 
static TVector3 gPosition [9]
 

#include <TLaBr.h>

+ Inheritance diagram for TLaBr:
+ Collaboration diagram for TLaBr:

Member Enumeration Documentation

◆ ELaBrBits

enum 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/2]

TLaBr::TLaBr ( )

Definition at line 34 of file TLaBr.cxx.

References Clear().

◆ ~TLaBr()

TLaBr::~TLaBr ( )
override

Definition at line 43 of file TLaBr.cxx.

References fSuppressedHits.

◆ TLaBr() [2/2]

TLaBr::TLaBr ( const TLaBr rhs)

Definition at line 51 of file TLaBr.cxx.

References Copy().

Member Function Documentation

◆ AddbackCriterion()

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

Reimplemented in TGriffin, TFipps, and TIfin.

Definition at line 26 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 153 of file TLaBr.cxx.

References TDetector::fHits.

◆ BuildHits()

void TLaBr::BuildHits ( )
inlineoverridevirtual

!

Reimplemented from TDetector.

Definition at line 67 of file TLaBr.h.

◆ Clear()

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

!

Definition at line 60 of file TLaBr.cxx.

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

Referenced by TLaBr().

◆ ClearStatus()

void TLaBr::ClearStatus ( ) const
inlineprivate

!

Definition at line 83 of file TLaBr.h.

References fLaBrBits.

◆ ClearTransients()

void TDetector::ClearTransients ( )
virtualinherited

!

Reimplemented in TS3, TTigress, TTrific, and TGriffin.

Definition at line 63 of file TDetector.cxx.

References TDetector::fHits.

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

◆ Copy()

void TLaBr::Copy ( TObject &  rhs) const
overridevirtual

!

Reimplemented from TDetector.

Definition at line 71 of file TLaBr.cxx.

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

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

◆ 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 34 of file TSuppressed.h.

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

Referenced by TTdrClover::GetAddbackMultiplicity(), TTdrTigress::GetAddbackMultiplicity(), TFipps::GetAddbackMultiplicity(), TIfin::GetAddbackMultiplicity(), and TGriffin::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 65 of file TSuppressed.h.

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

Referenced by TFippsLaBr::GetSuppressedMultiplicity(), GetSuppressedMultiplicity(), TTdrTigress::GetSuppressedMultiplicity(), TTdrClover::GetSuppressedMultiplicity(), TIfin::GetSuppressedMultiplicity(), TFipps::GetSuppressedMultiplicity(), and TGriffin::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 90 of file TSuppressed.h.

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

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

◆ GetHit()

◆ GetHitVector()

◆ GetLaBrHit()

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

Definition at line 46 of file TLaBr.h.

References TDetector::GetHit().

Referenced by main().

◆ GetMultiplicity()

◆ GetPosition()

static TVector3 TLaBr::GetPosition ( int  DetNbr)
inlinestatic

!

Definition at line 69 of file TLaBr.h.

References gPosition.

Referenced by TLaBrHit::GetPosition().

◆ GetSuppressedHit()

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

!

Definition at line 142 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 121 of file TLaBr.cxx.

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

◆ GetSuppressionCriterion()

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

Definition at line 53 of file TLaBr.h.

References fSuppressionCriterion.

◆ IsSuppressed()

bool TLaBr::IsSuppressed ( ) const

Definition at line 102 of file TLaBr.cxx.

References kIsSuppressed, and TestBitNumber().

Referenced by GetSuppressedMultiplicity().

◆ operator=()

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

!

Definition at line 83 of file TLaBr.cxx.

References Copy().

◆ Print() [1/2]

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

!

Prints out TLaBr Multiplicity, currently does little.

Definition at line 89 of file TLaBr.cxx.

◆ Print() [2/2]

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

!

Reimplemented from TDetector.

Definition at line 95 of file TLaBr.cxx.

References TDetector::fHits.

◆ ResetSuppressed()

void TLaBr::ResetSuppressed ( )

Definition at line 112 of file TLaBr.cxx.

References fSuppressedHits, and SetSuppressed().

◆ SetBitNumber()

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

Definition at line 84 of file TLaBr.h.

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

Referenced by SetSuppressed().

◆ SetSuppressed()

void TLaBr::SetSuppressed ( const bool  flag)

Definition at line 107 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 49 of file TLaBr.h.

References fSuppressionCriterion.

◆ SuppressionCriterion()

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

Reimplemented from TSuppressed.

Definition at line 55 of file TLaBr.h.

References fSuppressionCriterion.

◆ TestBitNumber()

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

Definition at line 85 of file TLaBr.h.

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

Referenced by IsSuppressed().

Member Data Documentation

◆ fHits

std::vector<TDetectorHit*> TDetector::fHits
protectedinherited

Definition at line 72 of file TDetector.h.

Referenced by TSiLi::AddCluster(), TEaglePulser::AddFragment(), TFippsPulser::AddFragment(), TGenericDetector::AddFragment(), TPaces::AddFragment(), TTdrSiLi::AddFragment(), TBgo::AddFragment(), TSiLi::AddFragment(), TTip::AddFragment(), TSceptar::AddFragment(), TTdrPlastic::AddFragment(), TTAC::AddFragment(), TFippsTAC::AddFragment(), TEagle::AddFragment(), TDescant::AddFragment(), TZeroDegree::AddFragment(), TTdrClover::AddFragment(), TTdrTigress::AddFragment(), TFipps::AddFragment(), TIfin::AddFragment(), TTrific::AddFragment(), AddFragment(), TFippsLaBr::AddFragment(), TTigress::AddFragment(), TEmma::BuildHits(), TCSM::BuildHits(), TSharc::BuildHits(), TTigress::BuildHits(), TSharc::Clear(), TDetector::Clear(), TEmma::Clear(), TTrific::Clear(), TDetector::ClearTransients(), TDetector::Copy(), TSiLi::GetAddbackMultiplicity(), TTigress::GetAddbackMultiplicity(), TFipps::GetFippsHit(), TDetector::GetHit(), TDetector::GetHitVector(), TIfin::GetIfinHit(), TDetector::GetMultiplicity(), TTrific::GetMultiplicity(), TSharc::GetSize(), TFippsLaBr::GetSuppressedMultiplicity(), GetSuppressedMultiplicity(), TTdrTigress::GetSuppressedMultiplicity(), TTdrClover::GetSuppressedMultiplicity(), TSiLi::Print(), TTdrSiLi::Print(), TTAC::Print(), TPaces::Print(), TFippsTAC::Print(), TTip::Print(), TZeroDegree::Print(), TTdrPlastic::Print(), TSceptar::Print(), TEagle::Print(), TDetector::Print(), TDescant::Print(), TEmma::Print(), TFippsLaBr::Print(), Print(), TTrific::Print(), TTigress::Print(), TSiLi::UseFitCharge(), and TDetector::~TDetector().

◆ fLaBrBits

TTransientBits<UChar_t> TLaBr::fLaBrBits
mutableprivate

Definition at line 81 of file TLaBr.h.

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

◆ fSuppressedHits

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

◆ fSuppressionCriterion

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

Definition at line 75 of file TLaBr.h.

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

◆ gPosition

TVector3 TLaBr::gPosition
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 79 of file TLaBr.h.

Referenced by GetPosition().