ROOT logo
Podd » SRC » THaScintillator

class THaScintillator: public THaNonTrackingDetector


Class for a generic scintillator (hodoscope) consisting of multiple
paddles with phototubes on both ends.

Function Members (Methods)

THaScintillator(const char* name, const char* description = "", THaApparatus* a = NULL)
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
virtual Int_tApplyCorrections()
virtual Int_tTHaAnalysisObject::Begin(THaRunBase* r = 0)
virtual voidTObject::Browse(TBrowser* b)
boolTHaSpectrometerDetector::CalcInterceptCoords(THaTrack* track, Double_t& x, Double_t& y)
boolTHaSpectrometerDetector::CalcPathLen(THaTrack* track, Double_t& t)
boolTHaSpectrometerDetector::CheckIntercept(THaTrack* track)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidClear(Option_t* = "")
virtual TObject*TNamed::Clone(const char* newname = "") const
virtual Int_tCoarseProcess(TClonesArray& tracks)
virtual Int_tTNamed::Compare(const TObject* obj) const
virtual voidTNamed::Copy(TObject& named) const
virtual Int_tDecode(const THaEvData&)
static Int_tTHaAnalysisObject::DefineVarsFromList(const void* list, THaAnalysisObject::EType type, THaAnalysisObject::EMode mode, const char* var_prefix, const TObject* obj, const char* prefix, const char* here)
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
virtual Int_tTHaAnalysisObject::End(THaRunBase* r = 0)
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual voidTNamed::FillBuffer(char*& buffer)
Int_tTHaDetectorBase::FillDetMap(const vector<Int_t>& values, UInt_t flags = 0, const char* here = "FillDetMap")
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
virtual Int_tFineProcess(TClonesArray& tracks)
static voidTHaAnalysisObject::GeoToSph(Double_t th_geo, Double_t ph_geo, Double_t& th_sph, Double_t& ph_sph)
const Double_t*GetAmplitudes() const
THaApparatus*THaDetector::GetApparatus() const
const char*THaAnalysisObject::GetClassName() const
const char*THaAnalysisObject::GetConfig() const
virtual const char*THaAnalysisObject::GetDBFileName() const
Int_tTHaAnalysisObject::GetDebug() const
THaDetMap*THaDetectorBase::GetDetMap() const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual const char*TObject::GetIconName() const
TDatimeTHaAnalysisObject::GetInitDate() const
virtual const char*TNamed::GetName() const
Int_tTHaDetectorBase::GetNelem() const
Int_tGetNHits() const
Int_tTHaNonTrackingDetector::GetNTracks() const
static TString&THaAnalysisObject::GetObjArrayString(const TObjArray* params, Int_t pos)
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
const TVector3&THaDetectorBase::GetOrigin() const
const char*THaAnalysisObject::GetPrefix() const
const Double_t*THaDetectorBase::GetSize() const
const Double_t*GetTimes() const
virtual const char*TNamed::GetTitle() const
const TClonesArray*THaNonTrackingDetector::GetTrackHits() const
const Double_t*GetTuncer() const
virtual UInt_tTObject::GetUniqueID() const
const TVector3&THaDetectorBase::GetXax() const
Double_tTHaDetectorBase::GetXSize() const
const Double_t*GetYampl() const
const TVector3&THaDetectorBase::GetYax() const
Double_tTHaDetectorBase::GetYSize() const
const Double_t*GetYtime() const
const TVector3&THaDetectorBase::GetZax() const
Double_tTHaDetectorBase::GetZSize() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTNamed::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual THaAnalysisObject::EStatusInit(const TDatime& run_time)
virtual Int_tTHaAnalysisObject::InitOutput(THaOutput*)
virtual voidTObject::Inspect() constMENU
static Bool_tTHaAnalysisObject::IntersectPlaneWithRay(const TVector3& xax, const TVector3& yax, const TVector3& org, const TVector3& ray_start, const TVector3& ray_vect, Double_t& length, TVector3& intersect)
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTHaDetectorBase::IsInActiveArea(Double_t x, Double_t y) const
Bool_tTHaAnalysisObject::IsInit() const
Bool_tTHaAnalysisObject::IsOK() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTHaNonTrackingDetector::IsPid()
virtual Bool_tTNamed::IsSortable() const
static boolTHaAnalysisObject::IsTag(const char* buf)
virtual Bool_tTHaNonTrackingDetector::IsTracking()
Bool_tTObject::IsZombie() const
static Int_tTHaAnalysisObject::LoadDB(FILE* file, const TDatime& date, const DBRequest* request, const char* prefix, Int_t search = 0, const char* here = "THaAnalysisObject::LoadDB")
static Int_tTHaAnalysisObject::LoadDBvalue(FILE* file, const TDatime& date, const char* tag, Double_t& value)
static Int_tTHaAnalysisObject::LoadDBvalue(FILE* file, const TDatime& date, const char* tag, Int_t& value)
static Int_tTHaAnalysisObject::LoadDBvalue(FILE* file, const TDatime& date, const char* tag, string& text)
static Int_tTHaAnalysisObject::LoadDBvalue(FILE* file, const TDatime& date, const char* tag, TString& text)
virtual voidTNamed::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
static FILE*THaAnalysisObject::OpenFile(const char* name, const TDatime& date, const char* here = "OpenFile()", const char* filemode = "r", const int debug_flag = 1)
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
TNamed&TNamed::operator=(const TNamed& rhs)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTHaAnalysisObject::Print(Option_t* opt = "") const
voidTHaDetectorBase::PrintDetMap(Option_t* opt = "") const
static voidTHaAnalysisObject::PrintObjects(Option_t* opt = "")
virtual Int_tTObject::Read(const char* name)
static Int_tTHaAnalysisObject::ReadDBline(FILE* fp, char* buf, size_t bufsiz, string& line)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(ostream& out, Option_t* option = "")
static Int_tTHaAnalysisObject::SeekDBconfig(FILE* file, const char* tag, const char* label = "config", Bool_t end_on_tag = false)
static Int_tTHaAnalysisObject::SeekDBdate(FILE* file, const TDatime& date, Bool_t end_on_tag = false)
virtual voidTHaDetector::SetApparatus(THaApparatus*)
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
voidTHaAnalysisObject::SetConfig(const char* label)
virtual voidTHaAnalysisObject::SetDebug(Int_t level)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
virtual voidTHaAnalysisObject::SetName(const char* name)
virtual voidTHaAnalysisObject::SetNameTitle(const char* name, const char* title)
static voidTObject::SetObjectStat(Bool_t stat)
virtual voidTNamed::SetTitle(const char* title = "")MENU
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector&)
virtual Int_tTNamed::Sizeof() const
static voidTHaAnalysisObject::SphToGeo(Double_t th_sph, Double_t ph_sph, Double_t& th_geo, Double_t& ph_geo)
THaAnalysisObject::EStatusTHaAnalysisObject::Status() const
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual voidTObject::UseCurrentStyle()
static vector<std::string>THaAnalysisObject::vsplit(const string& s)
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
boolTHaSpectrometerDetector::CalcTrackIntercept(THaTrack* track, Double_t& t, Double_t& ycross, Double_t& xcross)
Int_tTHaNonTrackingDetector::CalcTrackProj(TClonesArray& tracks)
virtual const char*THaAnalysisObject::ClassNameHere(const char*) const
virtual voidTHaDetectorBase::DefineAxes(Double_t rotation_angle)
virtual Int_tDefineVariables(THaAnalysisObject::EMode mode = kDefine)
Int_tTHaAnalysisObject::DefineVarsFromList(const VarDef* list, THaAnalysisObject::EMode mode = kDefine, const char* var_prefix = "") const
Int_tTHaAnalysisObject::DefineVarsFromList(const RVarDef* list, THaAnalysisObject::EMode mode = kDefine, const char* var_prefix = "") const
Int_tTHaAnalysisObject::DefineVarsFromList(const void* list, THaAnalysisObject::EType type, THaAnalysisObject::EMode mode, const char* var_prefix = "") const
virtual voidTHaAnalysisObject::DoError(int level, const char* location, const char* fmt, va_list va) const
THaAnalysisObject*THaAnalysisObject::FindModule(const char* name, const char* classname, bool do_error = true)
static vector<std::string>THaAnalysisObject::GetDBFileList(const char* name, const TDatime& date, const char* here = "GetDBFileList()")
virtual const char*THaAnalysisObject::Here(const char*) const
Int_tTHaAnalysisObject::LoadDB(FILE* f, const TDatime& date, const DBRequest* req, Int_t search = 0)
virtual voidTHaDetector::MakePrefix()
virtual FILE*THaAnalysisObject::OpenFile(const TDatime& date)
virtual FILE*THaAnalysisObject::OpenRunDBFile(const TDatime& date)
static char*THaAnalysisObject::ReadComment(FILE* fp, char* buf, const int len)
virtual Int_tReadDatabase(const TDatime& date)
virtual Int_tTHaDetectorBase::ReadGeometry(FILE* file, const TDatime& date, Bool_t required = kFALSE)
virtual Int_tTHaAnalysisObject::ReadRunDatabase(const TDatime& date)
virtual Int_tTHaAnalysisObject::RemoveVariables()
virtual Double_tTimeWalkCorrection(const Int_t& paddle, const THaScintillator::ESide side)

Data Members

enum ESide { kLeft
enum THaAnalysisObject::EStatus { kOK
enum THaAnalysisObject::EType { kVarDef
enum THaAnalysisObject::EMode { kDefine
enum THaAnalysisObject::EProperties { kNeedsRunDB
enum TObject::EStatusBits { kCanDelete
enum TObject::[unnamed] { kIsOnHeap
static const Double_tTHaAnalysisObject::kBig= 1.e38; // default junk value
static const Int_tNDEST
Double_tfAdcMIPnominal ADC above pedestal for MIP
Double_t*fAmpl[fNelem] overall amplitude for the paddle
Double_tfAttenuationin m^-1: attenuation length of material
Double_tfCnspeed of light in material (meters/second)
TStringTHaAnalysisObject::fConfigConfiguration to use from database
THaScintillator::DataDestfDataDest[2]Lookup table for decoder
Int_tTHaAnalysisObject::fDebugDebug level
THaDetMap*THaDetectorBase::fDetMapHardware channel map for this detector
Int_t*fHitPad[fNhit] list of paddles with complete TDC hits
TDatimeTHaAnalysisObject::fInitDateDate passed to Init
Bool_tTHaAnalysisObject::fIsInitFlag indicating that ReadDatabase done
Bool_tTHaAnalysisObject::fIsSetupFlag indicating that DefineVariables done.
Double_t*fLA[fNelem] Array of Left paddles ADC amplitudes
Int_tfLANhitNumber of Left paddles ADC amplitudes
Double_t*fLA_c[fNelem] Array of Left paddles corrected ADC ampl-s
Double_t*fLA_p[fNelem] Array of Left paddles ADC minus ped values
Double_t*fLGain[fNelem] ADC gains for left paddles
Double_t*fLOff[fNelem] TDC offsets for left paddles
Double_t*fLPed[fNelem] ADC pedestals for left paddles
Double_t*fLT[fNelem] Array of Left paddles TDC times (channels)
Int_tfLTNhitNumber of Left paddles TDC times
Double_t*fLT_c[fNelem] Array of Left PMT corrected TDC times (s)
Int_tfNTWalkParnumber of timewalk correction parameters
TStringTNamed::fNameobject identifier
Int_tTHaDetectorBase::fNelemNumber of detector elements (paddles, mirrors)
Int_tfNhitNumber of paddles with complete TDC hits (l&r)
Bool_tTHaAnalysisObject::fOKOutFlag indicating object-output prepared
TVector3THaDetectorBase::fOriginCenter position of detector (m)
char*THaAnalysisObject::fPrefixName prefix for global variables
UInt_tTHaAnalysisObject::fPropertiesProperties of this object (see EProperties)
Double_t*fRA[fNelem] Array of Right paddles ADC amplitudes
Int_tfRANhitNumber of Right paddles ADC amplitudes
Double_t*fRA_c[fNelem] Array of Right paddles corrected ADC ampl-s
Double_t*fRA_p[fNelem] Array of Right paddles ADC minus ped values
Double_t*fRGain[fNelem] ADC gains for right paddles
Double_t*fROff[fNelem] TDC offsets for right paddles
Double_t*fRPed[fNelem] ADC pedestals for right paddles
Double_t*fRT[fNelem] Array of Right paddles TDC times (channels)
Int_tfRTNhitNumber of Right paddles TDC times
Double_t*fRT_c[fNelem] Array of Right PMT corrected TDC times (s)
Double_tfResolutionaverage time resolution per PMT (s)
Double_tTHaDetectorBase::fSize[3]Detector size in x,y,z (m) - x,y are half-widths
THaAnalysisObject::EStatusTHaAnalysisObject::fStatusInitialization status flag
Double_t*fTWalkPar[fNTWalkPar] time walk correction parameters
Double_tfTdc2Tlinear conversion between TDC and time (s/ch)
Double_t*fTime[fNelem] corrected time for the paddle (s)
TStringTNamed::fTitleobject title
TClonesArray*THaNonTrackingDetector::fTrackProjprojection of track(s) onto detector plane
Double_t*fTrigOff[fNelem] Induced offset of trigger time from
TVector3THaDetectorBase::fXaxX axis of the detector plane
Double_t*fYa[fNelem] y-position of hit in paddle from ADC (m)
TVector3THaDetectorBase::fYaxY axis of the detector plane
Double_t*fYt[fNelem] y-position of hit in paddle from TDC (m)
TVector3THaDetectorBase::fZaxNormal to the detector plane
Double_t*fdTime[fNelem] uncertainty in time (s)

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

THaScintillator(const char* name, const char* description = "", THaApparatus* a = NULL)
THaAnalysisObject::EStatus Init(const TDatime& run_time)
 Extra initialization for scintillators: set up DataDest map
Int_t ReadDatabase(const TDatime& date)
 Read this detector's parameters from the database file 'fi'.
 This function is called by THaDetectorBase::Init() once at the
 beginning of the analysis.
 'date' contains the date/time of the run being analyzed.
Int_t DefineVariables(THaAnalysisObject::EMode mode = kDefine)
 Initialize global variables and lookup table for decoder
 Destructor. Remove variables from global list.
void DeleteArrays()
 Delete member arrays. Used by destructor.
void Clear(Option_t* = "")
 Reset per-event data.
Int_t Decode(const THaEvData& )
 Decode scintillator data, correct TDC times and ADC amplitudes, and copy
 the data to the local data members.
 This implementation makes the following assumptions about the detector map:
 - The first half of the map entries corresponds to ADCs,
   the second half, to TDCs.
 - The first fNelem detector channels correspond to the PMTs on the
   right hand side, the next fNelem channels, to the left hand side.
   (Thus channel numbering for each module must be consecutive.)
Int_t ApplyCorrections()
 Apply the ADC/TDC corrections to get the 'REAL' relevant
 TDC and ADC values. No tracking needs to have been done yet.

 Permits the dividing up of the decoding step (events could come from
 a different source) to the applying of corrections. For ease when
 trying to optimize calibrations

Double_t TimeWalkCorrection(const Int_t& paddle, const THaScintillator::ESide side)
 Calculate the time-walk correction. The timewalk might be
 dependent upon the specific PMT, so information about exactly
 which PMT fired is required.
Int_t CoarseProcess(TClonesArray& tracks)
 Scintillator coarse processing:

 - Apply timewalk corrections
 - Calculate rough transverse (y) position and energy deposition for hits
   for which PMTs on both ends of the paddle fired
 - Calculate rough track crossing points
Int_t FineProcess(TClonesArray& tracks)
 Scintillator fine processing:

 - Reconstruct coordinates of track cross point with scintillator plane
 - For each crossing track, determine position residual and paddle number

 The position residuals are calculated along the x-coordinate (dispersive
 direction) only. They are useful to determine whether a track has a
 matching hit ( if abs(dx) <= 0.5*paddle x-width ) and, if so, how close
 to the edge of the paddle the track crossed. This assumes scintillator
 paddles oriented along the transverse (non-dispersive, y) direction.
Int_t GetNHits() const
{ return fNhit; }
const Double_t* GetTimes() const
{ return fTime; }
const Double_t* GetTuncer() const
{ return fdTime; }
const Double_t* GetAmplitudes() const
{ return fAmpl; }
const Double_t* GetYtime() const
{ return fYt; }
const Double_t* GetYampl() const
{ return fYa; }