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

Detailed Description

The TRcmp class defines the observables and algorithms used when analyzing RCMP data.

Definition at line 35 of file TRcmp.h.

Public Types

enum class  ERcmpBits {
  kFrontSet = BIT(0) , kBackSet = BIT(1) , kPixelSet = BIT(2) , kBit3 = BIT(3) ,
  kBit4 = BIT(4) , kBit5 = BIT(5) , kBit6 = BIT(6) , kBit7 = BIT(7)
}
 

Public Member Functions

 TRcmp ()
 
 TRcmp (const TRcmp &)
 
 TRcmp (TRcmp &&) noexcept=default
 
 ~TRcmp () 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
 
size_t GetBackFragmentMultiplicity () const
 
Short_t GetBackMultiplicity ()
 
Int_t GetCoincidenceTime () const
 
size_t GetFrontFragmentMultiplicity () const
 
Short_t GetFrontMultiplicity ()
 
virtual TDetectorHitGetHit (const int &index) const
 
virtual const std::vector< TDetectorHit * > & GetHitVector () const
 
virtual Short_t GetMultiplicity () const
 
Short_t GetPixelMultiplicity ()
 
TFragment GetRcmpBackFrag (const int &i) const
 
TRcmpHitGetRcmpBackHit (const int &i) const
 
TFragment GetRcmpFrontFrag (const int &i) const
 
TRcmpHitGetRcmpFrontHit (const int &i) const
 
TRcmpHitGetRcmpHit (const int &i) const
 
Int_t GetZeroMultiplicity () const
 
std::vector< TDetectorHit * > & Hits ()
 
const std::vector< TDetectorHit * > & Hits () const
 
virtual bool NoHits () const
 
TRcmpoperator= (const TRcmp &)
 
TRcmpoperator= (TRcmp &&) noexcept=default
 
void Print (Option_t *opt="") const override
 
void Print (std::ostream &out) const override
 
void SetCoincidenceTime (const int coincTime)
 

Private Member Functions

void ClearStatus ()
 
void SetBitNumber (ERcmpBits bit, Bool_t set=true)
 
Bool_t TestBitNumber (ERcmpBits bit) const
 

Private Attributes

std::vector< TFragmentfBackNFragVector
 
std::vector< TRcmpHit * > fBackNMulVector
 
Int_t fCoincidenceTime = 50
 
std::vector< TFragmentfFrontPFragVector
 
std::vector< TRcmpHit * > fFrontPMulVector
 
std::vector< TDetectorHit * > fHits
 
std::vector< TRcmpHit * > fPixelMulVector
 
TTransientBits< UChar_t > fRcmpBits
 
Int_t fZeroMultiplicity = 0
 
+ Inheritance diagram for TRcmp:
+ Collaboration diagram for TRcmp:

Member Enumeration Documentation

◆ ERcmpBits

enum class TRcmp::ERcmpBits
strong
Enumerator
kFrontSet 
kBackSet 
kPixelSet 
kBit3 
kBit4 
kBit5 
kBit6 
kBit7 

Definition at line 40 of file TRcmp.h.

Constructor & Destructor Documentation

◆ TRcmp() [1/3]

TRcmp::TRcmp ( )

default constructor

this is the default constructor

Definition at line 15 of file TRcmp.cxx.

References Clear().

◆ TRcmp() [2/3]

TRcmp::TRcmp ( const TRcmp & rhs)

copy constructor

this is the copy constructor

Definition at line 43 of file TRcmp.cxx.

References Copy().

◆ TRcmp() [3/3]

TRcmp::TRcmp ( TRcmp && )
defaultnoexcept

◆ ~TRcmp()

TRcmp::~TRcmp ( )
override

destructor

this is the destructor for the class that deletes the pointers to avoid memory leaks

Definition at line 21 of file TRcmp.cxx.

References fBackNMulVector, fFrontPMulVector, and fPixelMulVector.

Member Function Documentation

◆ AddFragment()

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

! //adds front and back fragments to their respective fragment vectors

this function takes the fragments and stores them into separate front and back vectors

Reimplemented from TDetector.

Definition at line 105 of file TRcmp.cxx.

References TMnemonic::CollectedCharge(), fBackNFragVector, fFrontPFragVector, TChannel::GetMnemonic(), TMnemonic::kN, and TMnemonic::kP.

◆ AddHit()

◆ BuildHits()

void TRcmp::BuildHits ( )
inlineoverridevirtual

even though we are not using this function, we still need to override it to avoid warning during the sorting process

Reimplemented from TDetector.

Definition at line 62 of file TRcmp.h.

◆ Clear()

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

◆ ClearStatus()

void TRcmp::ClearStatus ( )
inlineprivate

Definition at line 104 of file TRcmp.h.

References fRcmpBits.

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

◆ GetBackFragmentMultiplicity()

size_t TRcmp::GetBackFragmentMultiplicity ( ) const
inline

returns the size of the vector that contains all the back fragments (within a build window)

Definition at line 80 of file TRcmp.h.

References fBackNFragVector.

Referenced by GetPixelMultiplicity(), and Print().

◆ GetBackMultiplicity()

Short_t TRcmp::GetBackMultiplicity ( )

returns the size of the vector that contains all the back hits (within a build window)

this function returns the multiplicity of back strip hits

Definition at line 156 of file TRcmp.cxx.

References fBackNFragVector, fBackNMulVector, fRcmpBits, kBackSet, SetBitNumber(), and TTransientBits< T >::TestBit().

◆ GetCoincidenceTime()

Int_t TRcmp::GetCoincidenceTime ( ) const
inline

returns the coincidence time between front and back strip of a detector in nanoseconds

Definition at line 89 of file TRcmp.h.

References fCoincidenceTime.

◆ GetFrontFragmentMultiplicity()

size_t TRcmp::GetFrontFragmentMultiplicity ( ) const
inline

returns the size of the vector that contains all the front fragments (within a build window)

Definition at line 79 of file TRcmp.h.

References fFrontPFragVector.

Referenced by GetPixelMultiplicity(), and Print().

◆ GetFrontMultiplicity()

Short_t TRcmp::GetFrontMultiplicity ( )

returns the size of the vector that contains all the front hits (within a build window)

this function returns the multiplicity of front strip hits

Definition at line 129 of file TRcmp.cxx.

References fFrontPFragVector, fFrontPMulVector, fRcmpBits, kFrontSet, SetBitNumber(), and TTransientBits< T >::TestBit().

◆ GetHit()

◆ GetHitVector()

◆ GetMultiplicity()

◆ GetPixelMultiplicity()

Short_t TRcmp::GetPixelMultiplicity ( )

returns the size of the vector that contains all the pixel hits (within a build window)

this function returns the multiplicity of hits that were combined for front and back strips (i.e., pixels)

Definition at line 183 of file TRcmp.cxx.

References fBackNFragVector, fFrontPFragVector, fPixelMulVector, fRcmpBits, fZeroMultiplicity, GetBackFragmentMultiplicity(), GetFrontFragmentMultiplicity(), kPixelSet, SetBitNumber(), and TTransientBits< T >::TestBit().

◆ GetRcmpBackFrag()

TFragment TRcmp::GetRcmpBackFrag ( const int & i) const
inline

returns the back fragment stored at the index

Definition at line 66 of file TRcmp.h.

References fBackNFragVector.

◆ GetRcmpBackHit()

TRcmpHit * TRcmp::GetRcmpBackHit ( const int & i) const
inline

returns a back strip hit in RCMP (this hit can be used to fill histograms when looping over back multiplicity)

Definition at line 70 of file TRcmp.h.

References fBackNMulVector.

◆ GetRcmpFrontFrag()

TFragment TRcmp::GetRcmpFrontFrag ( const int & i) const
inline

returns the front fragment stored at the index

Definition at line 65 of file TRcmp.h.

References fFrontPFragVector.

◆ GetRcmpFrontHit()

TRcmpHit * TRcmp::GetRcmpFrontHit ( const int & i) const
inline

returns a front strip hit in RCMP (this hit can be used to fill histograms when looping over front multiplicity)

Definition at line 69 of file TRcmp.h.

References fFrontPMulVector.

◆ GetRcmpHit()

TRcmpHit * TRcmp::GetRcmpHit ( const int & i) const
inline

returns a pixel hit in RCMP (this hit can be used to fill histograms when looping over pixel multiplicity)

Definition at line 71 of file TRcmp.h.

References fPixelMulVector.

◆ GetZeroMultiplicity()

Int_t TRcmp::GetZeroMultiplicity ( ) const
inline

returns the zero multiplicty counter

Definition at line 85 of file TRcmp.h.

References fZeroMultiplicity.

◆ 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.

◆ NoHits()

virtual bool TDetector::NoHits ( ) const
inlinevirtualinherited

◆ operator=() [1/2]

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

Definition at line 37 of file TRcmp.cxx.

References Copy().

◆ operator=() [2/2]

TRcmp & TRcmp::operator= ( TRcmp && )
defaultnoexcept

◆ Print() [1/2]

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

!

Definition at line 218 of file TRcmp.cxx.

References Print().

Referenced by Print().

◆ Print() [2/2]

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

!

Reimplemented from TDetector.

Definition at line 223 of file TRcmp.cxx.

References GetBackFragmentMultiplicity(), and GetFrontFragmentMultiplicity().

◆ SetBitNumber()

void TRcmp::SetBitNumber ( ERcmpBits bit,
Bool_t set = true )
private

second argument shows that set is true by default

Used to set the flags that are stored in TRcmp

Definition at line 233 of file TRcmp.cxx.

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

Referenced by GetBackMultiplicity(), GetFrontMultiplicity(), and GetPixelMultiplicity().

◆ SetCoincidenceTime()

void TRcmp::SetCoincidenceTime ( const int coincTime)
inline

sets the coincidence time between front and back strip of a detector in nanoseconds

Definition at line 90 of file TRcmp.h.

References fCoincidenceTime.

◆ TestBitNumber()

Bool_t TRcmp::TestBitNumber ( ERcmpBits bit) const
inlineprivate

returns true if the bit is set

Definition at line 106 of file TRcmp.h.

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

Member Data Documentation

◆ fBackNFragVector

std::vector<TFragment> TRcmp::fBackNFragVector
private

stores all back strip fragments

Definition at line 96 of file TRcmp.h.

Referenced by AddFragment(), Clear(), Copy(), GetBackFragmentMultiplicity(), GetBackMultiplicity(), GetPixelMultiplicity(), and GetRcmpBackFrag().

◆ fBackNMulVector

std::vector<TRcmpHit*> TRcmp::fBackNMulVector
private

! transient vector that stores hits for the back strips (i.e., back multiplicity)

Definition at line 100 of file TRcmp.h.

Referenced by ~TRcmp(), Clear(), Copy(), GetBackMultiplicity(), and GetRcmpBackHit().

◆ fCoincidenceTime

Int_t TRcmp::fCoincidenceTime = 50
private

GetTime for TDetectorHit is in nanoseconds, so this is in nanoseconds, too!

Definition at line 111 of file TRcmp.h.

Referenced by Copy(), GetCoincidenceTime(), and SetCoincidenceTime().

◆ fFrontPFragVector

std::vector<TFragment> TRcmp::fFrontPFragVector
private

stores all front strip fragments

Definition at line 95 of file TRcmp.h.

Referenced by AddFragment(), Clear(), Copy(), GetFrontFragmentMultiplicity(), GetFrontMultiplicity(), GetPixelMultiplicity(), and GetRcmpFrontFrag().

◆ fFrontPMulVector

std::vector<TRcmpHit*> TRcmp::fFrontPMulVector
private

! transient vector that stores hits for the front strips (i.e., front multiplicity)

Definition at line 99 of file TRcmp.h.

Referenced by ~TRcmp(), Clear(), Copy(), GetFrontMultiplicity(), and GetRcmpFrontHit().

◆ fHits

◆ fPixelMulVector

std::vector<TRcmpHit*> TRcmp::fPixelMulVector
private

! transient vector that stores hits for front+back (i.e., pixel multiplicity)

Definition at line 101 of file TRcmp.h.

Referenced by ~TRcmp(), Clear(), Copy(), GetPixelMultiplicity(), and GetRcmpHit().

◆ fRcmpBits

TTransientBits<UChar_t> TRcmp::fRcmpBits
private

flags for transient members

Definition at line 103 of file TRcmp.h.

Referenced by ClearStatus(), GetBackMultiplicity(), GetFrontMultiplicity(), GetPixelMultiplicity(), SetBitNumber(), and TestBitNumber().

◆ fZeroMultiplicity

Int_t TRcmp::fZeroMultiplicity = 0
private

keep track of zero multiplicty with this counter (it is incremented every time the Pixel Multiplicity loops are entered, but the hits are not built)

Definition at line 108 of file TRcmp.h.

Referenced by Clear(), Copy(), GetPixelMultiplicity(), and GetZeroMultiplicity().