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

Detailed Description

Definition at line 36 of file TCSM.h.

Public Member Functions

 TCSM ()
 
 TCSM (const TCSM &)=default
 
 TCSM (TCSM &&) noexcept=default
 
 ~TCSM () override=default
 
void AddFragment (const std::shared_ptr< const TFragment > &, TChannel *) override
 
virtual void AddHit (TDetectorHit *hit)
 
void BuildHits () override
 
void Clear (Option_t *="") override
 
virtual void ClearTransients ()
 
void Copy (TObject &) const override
 
TCSMHitGetCSMHit (const int &i) const
 
virtual TDetectorHitGetHit (const int &index) const
 
virtual const std::vector< TDetectorHit * > & GetHitVector () const
 
virtual Short_t GetMultiplicity () const
 
std::vector< TDetectorHit * > & Hits ()
 
const std::vector< TDetectorHit * > & Hits () const
 
virtual bool NoHits () const
 
TCSMoperator= (const TCSM &)=default
 
TCSMoperator= (TCSM &&) noexcept=default
 
void Print (Option_t *opt="") const override
 
virtual void Print (std::ostream &out) const
 

Static Public Member Functions

static TVector3 GetPosition (int detector, char pos, int horizontalstrip, int verticalstrip, double X=0.00, double Y=0.00, double Z=0.00)
 

Private Member Functions

bool AlmostEqual (double, double) const
 
bool AlmostEqual (int, int) const
 
void BuilddEE (std::vector< std::vector< TDetectorHit * > > &, std::vector< TDetectorHit * > &)
 
void BuildVH (std::vector< std::vector< std::pair< TFragment, TGRSIMnemonic > > > &, std::vector< TDetectorHit * > &)
 
TCSMHitCombineHits (TDetectorHit *, TDetectorHit *)
 
void MakedEE (std::vector< TDetectorHit * > &DHitVec, std::vector< TDetectorHit * > &EHitVec, std::vector< TDetectorHit * > &BuiltHits)
 
TCSMHitMakeHit (std::pair< TFragment, TGRSIMnemonic > &, std::pair< TFragment, TGRSIMnemonic > &)
 
TCSMHitMakeHit (std::vector< std::pair< TFragment, TGRSIMnemonic > > &, std::vector< std::pair< TFragment, TGRSIMnemonic > > &)
 
void OldBuilddEE (std::vector< TDetectorHit * > &, std::vector< TDetectorHit * > &, std::vector< TDetectorHit * > &)
 
void RecoverHit (char, std::pair< TFragment, TGRSIMnemonic > &, std::vector< TDetectorHit * > &)
 

Private Attributes

double fAlmostEqualWindow
 
std::map< int16_t, std::vector< std::vector< std::vector< std::pair< TFragment, TGRSIMnemonic > > > > > fFragments
 
std::vector< TDetectorHit * > fHits
 

Static Private Attributes

static int fCfdBuildDiff = 5
 
+ Inheritance diagram for TCSM:
+ Collaboration diagram for TCSM:

Constructor & Destructor Documentation

◆ TCSM() [1/3]

TCSM::TCSM ( )

Definition at line 9 of file TCSM.cxx.

◆ TCSM() [2/3]

TCSM::TCSM ( const TCSM & )
default

◆ TCSM() [3/3]

TCSM::TCSM ( TCSM && )
defaultnoexcept

◆ ~TCSM()

TCSM::~TCSM ( )
overridedefault

Member Function Documentation

◆ AddFragment()

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

!

This function just stores the fragments and mnemonics in vectors, separated by detector number and type (horizontal/vertical strip or pad). The hits themselves are built in the BuildHits function because the way we build them depends on the number of hits.

Reimplemented from TDetector.

Definition at line 14 of file TCSM.cxx.

References TMnemonic::ArrayPosition(), TMnemonic::ArraySubPositionString(), TMnemonic::CollectedChargeString(), fFragments, and TChannel::GetMnemonic().

◆ AddHit()

◆ AlmostEqual() [1/2]

bool TCSM::AlmostEqual ( double val1,
double val2 ) const
private

Definition at line 628 of file TCSM.cxx.

References fAlmostEqualWindow.

◆ AlmostEqual() [2/2]

bool TCSM::AlmostEqual ( int val1,
int val2 ) const
private

Definition at line 620 of file TCSM.cxx.

References fAlmostEqualWindow.

Referenced by BuildVH(), and OldBuilddEE().

◆ BuilddEE()

void TCSM::BuilddEE ( std::vector< std::vector< TDetectorHit * > > & hitVec,
std::vector< TDetectorHit * > & builtHits )
private

Definition at line 335 of file TCSM.cxx.

References MakedEE().

Referenced by BuildHits().

◆ BuildHits()

void TCSM::BuildHits ( )
overridevirtual

!

This function takes the fragments that were stored in the successive AddFragment calls and builds hits out of them

Reimplemented from TDetector.

Definition at line 52 of file TCSM.cxx.

References BuilddEE(), BuildVH(), fFragments, and TDetector::Hits().

◆ BuildVH()

void TCSM::BuildVH ( std::vector< std::vector< std::pair< TFragment, TGRSIMnemonic > > > & strips,
std::vector< TDetectorHit * > & hitVector )
private

Build hits from horizontal (index = 0) and vertical (index = 1) strips into the hitVector

Definition at line 124 of file TCSM.cxx.

References AlmostEqual(), MakeHit(), RecoverHit(), and SumHits.

Referenced by BuildHits().

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

◆ CombineHits()

TCSMHit * TCSM::CombineHits ( TDetectorHit * d_hit,
TDetectorHit * e_hit )
private

Definition at line 592 of file TCSM.cxx.

References TCSMHit::SetEHorizontalStrip().

Referenced by MakedEE(), and OldBuilddEE().

◆ Copy()

◆ GetCSMHit()

TCSMHit * TCSM::GetCSMHit ( const int & i) const
inline

Definition at line 45 of file TCSM.h.

References TDetector::GetHit().

◆ GetHit()

◆ GetHitVector()

◆ GetMultiplicity()

◆ GetPosition()

TVector3 TCSM::GetPosition ( int detector,
char pos,
int horizontalstrip,
int verticalstrip,
double X = 0.00,
double Y = 0.00,
double Z = 0.00 )
static

Definition at line 69 of file TCSM.cxx.

Referenced by MakeHit(), MakeHit(), and RecoverHit().

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

◆ MakedEE()

void TCSM::MakedEE ( std::vector< TDetectorHit * > & DHitVec,
std::vector< TDetectorHit * > & EHitVec,
std::vector< TDetectorHit * > & BuiltHits )
private

Definition at line 371 of file TCSM.cxx.

References CombineHits(), TCSMHit::GetDPosition(), and TCSMHit::GetEPosition().

Referenced by BuilddEE().

◆ MakeHit() [1/2]

TCSMHit * TCSM::MakeHit ( std::pair< TFragment, TGRSIMnemonic > & h,
std::pair< TFragment, TGRSIMnemonic > & v )
private

Definition at line 190 of file TCSM.cxx.

References GetPosition().

Referenced by BuildVH().

◆ MakeHit() [2/2]

TCSMHit * TCSM::MakeHit ( std::vector< std::pair< TFragment, TGRSIMnemonic > > & hhV,
std::vector< std::pair< TFragment, TGRSIMnemonic > > & vvV )
private

Definition at line 234 of file TCSM.cxx.

References TCSMHit::GetEnergy(), and GetPosition().

◆ NoHits()

virtual bool TDetector::NoHits ( ) const
inlinevirtualinherited

◆ OldBuilddEE()

void TCSM::OldBuilddEE ( std::vector< TDetectorHit * > & DHitVec,
std::vector< TDetectorHit * > & EHitVec,
std::vector< TDetectorHit * > & BuiltHits )
private

◆ operator=() [1/2]

TCSM & TCSM::operator= ( const TCSM & )
default

◆ operator=() [2/2]

TCSM & TCSM::operator= ( TCSM && )
defaultnoexcept

◆ Print() [1/2]

void TDetector::Print ( Option_t * opt = "") const
overrideinherited

!

Default print statement for TDetector.

Definition at line 37 of file TDetector.cxx.

References TDetector::Print().

Referenced by TDetector::Print().

◆ Print() [2/2]

void TDetector::Print ( std::ostream & out) const
virtualinherited

Print detector to stream out. Iterates over hits and prints them.

Reimplemented in TAries, TBgo, TDescant, TEagle, TEaglePulser, TEmma, TFipps, TFippsLaBr, TFippsPulser, TFippsTAC, TGenericDetector, TGriffin, TIfin, TLaBr, TPaces, TRcmp, TRF, TS3, TSceptar, TSharc2, TSharc, TSiLi, TTAC, TTdrClover, TTdrPlastic, TTdrSiLi, TTdrTigress, TTigress, TTip, TTrific, TTriFoil, and TZeroDegree.

Definition at line 43 of file TDetector.cxx.

References TDetector::fHits.

◆ RecoverHit()

void TCSM::RecoverHit ( char orientation,
std::pair< TFragment, TGRSIMnemonic > & hit,
std::vector< TDetectorHit * > & hits )
private

Definition at line 514 of file TCSM.cxx.

References GetPosition(), and RecoverHits.

Referenced by BuildVH().

Member Data Documentation

◆ fAlmostEqualWindow

double TCSM::fAlmostEqualWindow
private

Definition at line 57 of file TCSM.h.

Referenced by AlmostEqual(), and AlmostEqual().

◆ fCfdBuildDiff

int TCSM::fCfdBuildDiff = 5
staticprivate

! largest acceptable time difference between events (clock ticks) (50 ns)

Definition at line 59 of file TCSM.h.

◆ fFragments

std::map<int16_t, std::vector<std::vector<std::vector<std::pair<TFragment, TGRSIMnemonic> > > > > TCSM::fFragments
private

!

Definition at line 56 of file TCSM.h.

Referenced by AddFragment(), and BuildHits().

◆ fHits