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

Definition at line 36 of file TCSM.h.

Public Member Functions

 TCSM ()
 
 ~TCSM () override
 
void AddFragment (const std::shared_ptr< const TFragment > &, TChannel *) override
 
void BuildHits () override
 
void Clear (Option_t *="") override
 
virtual void ClearTransients ()
 
virtual void Copy (TObject &) const override
 
TCSMHitGetCSMHit (const int &i) const
 
virtual TDetectorHitGetHit (const int &) const
 
virtual const std::vector< TDetectorHit * > & GetHitVector () const
 
virtual Short_t GetMultiplicity () const
 
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)
 

Protected Attributes

std::vector< TDetectorHit * > fHits
 

Private Member Functions

bool AlmostEqual (int, int)
 
bool AlmostEqual (double, double)
 
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
 

Static Private Attributes

static int fCfdBuildDiff = 5
 

#include <TCSM.h>

+ Inheritance diagram for TCSM:
+ Collaboration diagram for TCSM:

Constructor & Destructor Documentation

◆ TCSM()

TCSM::TCSM ( )

Definition at line 12 of file TCSM.cxx.

References fAlmostEqualWindow.

◆ ~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 23 of file TCSM.cxx.

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

◆ AlmostEqual() [1/2]

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

Definition at line 627 of file TCSM.cxx.

References fAlmostEqualWindow.

Referenced by BuildVH(), and OldBuilddEE().

◆ AlmostEqual() [2/2]

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

Definition at line 635 of file TCSM.cxx.

References fAlmostEqualWindow.

◆ BuilddEE()

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

Definition at line 342 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 61 of file TCSM.cxx.

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

◆ 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 131 of file TCSM.cxx.

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

Referenced by BuildHits().

◆ Clear()

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

◆ CombineHits()

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

Definition at line 599 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 42 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 78 of file TCSM.cxx.

Referenced by MakeHit(), and RecoverHit().

◆ MakedEE()

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

Definition at line 378 of file TCSM.cxx.

References CombineHits().

Referenced by BuilddEE().

◆ MakeHit() [1/2]

◆ MakeHit() [2/2]

◆ OldBuilddEE()

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

Definition at line 449 of file TCSM.cxx.

References AlmostEqual(), CombineHits(), DGREEN, and RESET_COLOR.

◆ Print() [1/2]

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

!

Default print statement for TDetector.

Definition at line 47 of file TDetector.cxx.

◆ Print() [2/2]

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

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

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

Definition at line 53 of file TDetector.cxx.

References TDetector::fHits.

◆ RecoverHit()

Member Data Documentation

◆ fAlmostEqualWindow

double TCSM::fAlmostEqualWindow
private

Definition at line 54 of file TCSM.h.

Referenced by AlmostEqual(), and TCSM().

◆ fCfdBuildDiff

int TCSM::fCfdBuildDiff = 5
staticprivate

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

Definition at line 56 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 53 of file TCSM.h.

Referenced by AddFragment(), and BuildHits().

◆ fHits

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

Definition at line 72 of file TDetector.h.

Referenced by TSiLi::AddCluster(), TEaglePulser::AddFragment(), TGenericDetector::AddFragment(), TFippsPulser::AddFragment(), TPaces::AddFragment(), TTdrSiLi::AddFragment(), TBgo::AddFragment(), TSiLi::AddFragment(), TTip::AddFragment(), TSceptar::AddFragment(), TTdrPlastic::AddFragment(), TTAC::AddFragment(), TFippsTAC::AddFragment(), TEagle::AddFragment(), TZeroDegree::AddFragment(), TDescant::AddFragment(), TTdrClover::AddFragment(), TTdrTigress::AddFragment(), TFipps::AddFragment(), TIfin::AddFragment(), TTrific::AddFragment(), TLaBr::AddFragment(), TFippsLaBr::AddFragment(), TTigress::AddFragment(), TEmma::BuildHits(), 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(), TLaBr::GetSuppressedMultiplicity(), TTdrClover::GetSuppressedMultiplicity(), TTdrTigress::GetSuppressedMultiplicity(), TSiLi::Print(), TTdrSiLi::Print(), TTAC::Print(), TFippsTAC::Print(), TPaces::Print(), TTip::Print(), TZeroDegree::Print(), TSceptar::Print(), TTdrPlastic::Print(), TEagle::Print(), TDetector::Print(), TDescant::Print(), TEmma::Print(), TLaBr::Print(), TFippsLaBr::Print(), TTrific::Print(), TTigress::Print(), TSiLi::UseFitCharge(), and TDetector::~TDetector().