ROOT logo
Podd » SRC » THaHRS

class THaHRS: public THaSpectrometer


 THaHRS

 The standard Hall A High Resolution Spectrometers (HRS).
 Contains three standard detectors,
    VDC
    Scintillator S1
    Scintillator S2

 The usual name of this object is either "R" or "L", for Left
 and Right HRS, respectively.

 Defines the functions FindVertices() and TrackCalc(), which are common
 to both the LeftHRS and the RightHRS.

 Special configurations of the HRS (e.g. more detectors, different
 detectors) can be supported in on e of three ways:

   1. Use the AddDetector() method to include a new detector
      in this apparatus.  The detector will be decoded properly,
      and its variables will be available for cuts and histograms.
      Its processing methods will also be called by the generic Reconstruct()
      algorithm implemented in THaSpectrometer::Reconstruct() and should
      be correctly handled if the detector class follows the standard
      interface design.

   2. Write a derived class that creates the detector in the
      constructor.  Write a new Reconstruct() method or extend the existing
      one if necessary.

   3. Write a new class inheriting from THaSpectrometer, using this
      class as an example.  This is appropriate if your HRS
      configuration has fewer or different detectors than the
      standard HRS. (It might not be sensible to provide a RemoveDetector()
      method since Reconstruct() relies on the presence of the
      standard detectors to some extent.)

  For timing calculations, S1 is treated as the scintillator at the
  'reference distance', corresponding to the pathlength correction
  matrix.


Function Members (Methods)

public:
THaHRS(const char* name, const char* description)
virtual~THaHRS()
voidTObject::AbstractMethod(const char* method) const
virtual Int_tTHaSpectrometer::AddDetector(THaDetector* det)
virtual Int_tTHaSpectrometer::AddPidParticle(const char* shortname, const char* name, Double_t mass, Int_t charge = 0)
virtual voidTObject::AppendPad(Option_t* option = "")
virtual Int_tTHaApparatus::Begin(THaRunBase* r = 0)
virtual voidTObject::Browse(TBrowser* b)
virtual Int_tTHaSpectrometer::CalcPID()
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTHaSpectrometer::Clear(Option_t* opt = "")
virtual TObject*TNamed::Clone(const char* newname = "") const
virtual Int_tTHaSpectrometer::CoarseReconstruct()
virtual Int_tTHaSpectrometer::CoarseTrack()
virtual Int_tTNamed::Compare(const TObject* obj) const
virtual voidTNamed::Copy(TObject& named) const
virtual Int_tTHaApparatus::Decode(const THaEvData&)
virtual voidTHaSpectrometer::DefinePidParticles()
virtual Int_tTHaSpectrometer::DefineVariables(THaAnalysisObject::EMode mode = kDefine)
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_tTHaApparatus::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)
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
virtual Int_tFindVertices(TClonesArray& tracks)
static voidTHaAnalysisObject::GeoToSph(Double_t th_geo, Double_t ph_geo, Double_t& th_sph, Double_t& ph_sph)
const char*THaAnalysisObject::GetClassName() const
Double_tTHaSpectrometer::GetCollDist() const
const char*THaAnalysisObject::GetConfig() const
virtual const char*THaAnalysisObject::GetDBFileName() const
Int_tTHaAnalysisObject::GetDebug() const
virtual THaDetector*THaApparatus::GetDetector(const char* name)
const TList*THaApparatus::GetDetectors()
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
THaTrack*THaSpectrometer::GetGoldenTrack() const
virtual const char*TObject::GetIconName() const
TDatimeTHaAnalysisObject::GetInitDate() const
virtual const char*TNamed::GetName() const
Int_tTHaSpectrometer::GetNpidDetectors() const
Int_tTHaSpectrometer::GetNpidParticles() const
Int_tTHaSpectrometer::GetNTracks() const
Int_tTHaApparatus::GetNumDets() 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
Double_tTHaSpectrometer::GetPcentral() const
Double_tTHaSpectrometer::GetPhiGeo() const
Double_tTHaSpectrometer::GetPhiSph() const
const THaPidDetector*THaSpectrometer::GetPidDetector(Int_t i) const
const THaParticleInfo*THaSpectrometer::GetPidParticleInfo(Int_t i) const
const TVector3&THaSpectrometer::GetPointingOffset() const
const char*THaAnalysisObject::GetPrefix() const
static const RVarDef*THaTrackingModule::GetRVarDef()
Double_tTHaSpectrometer::GetThetaGeo() const
Double_tTHaSpectrometer::GetThetaSph() const
virtual const char*TNamed::GetTitle() const
const TRotation&THaSpectrometer::GetToLabRot() const
const TRotation&THaSpectrometer::GetToTraRot() const
THaTrack*THaTrackingModule::GetTrack()
THaTrackInfo*THaTrackingModule::GetTrackInfo()
TClonesArray*THaSpectrometer::GetTrackPID() const
TClonesArray*THaSpectrometer::GetTracks() const
Bool_tGetTrSorting() const
virtual UInt_tTObject::GetUniqueID() const
virtual const TVector3&THaSpectrometer::GetVertex() const
virtual const TVector3&THaVertexModule::GetVertexError() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTNamed::Hash() const
virtual Bool_tTHaSpectrometer::HasVertex() 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::EStatusTHaApparatus::Init(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
Bool_tTHaSpectrometer::IsDone(UInt_t stage) const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTHaAnalysisObject::IsInit() const
Bool_tTHaAnalysisObject::IsOK() const
Bool_tTHaAnalysisObject::IsOKOut()
Bool_tTObject::IsOnHeap() const
Bool_tTHaSpectrometer::IsPID() const
virtual Bool_tTNamed::IsSortable() const
static boolTHaAnalysisObject::IsTag(const char* buf)
Bool_tTObject::IsZombie() const
voidTHaSpectrometer::LabToTransport(const TVector3& vertex, const TVector3& pvect, Double_t* ray) const
virtual voidTHaSpectrometer::LabToTransport(const TVector3& vertex, const TVector3& pvect, TVector3& tvertex, Double_t* ray) 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 voidTHaApparatus::Print(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 Int_tTHaSpectrometer::Reconstruct()
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)
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
voidTHaSpectrometer::SetCentralAngles(Double_t th, Double_t ph, Bool_t bend_down)
voidTHaAnalysisObject::SetConfig(const char* label)
virtual voidTHaAnalysisObject::SetDebug(Int_t level)
virtual voidTHaApparatus::SetDebugAll(Int_t level)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
voidTHaSpectrometer::SetGoldenTrack(THaTrack* t)
virtual voidTHaAnalysisObject::SetName(const char* name)
virtual voidTHaAnalysisObject::SetNameTitle(const char* name, const char* title)
static voidTObject::SetObjectStat(Bool_t stat)
voidTHaSpectrometer::SetPID(Bool_t b = kTRUE)
virtual voidTNamed::SetTitle(const char* title = "")MENU
Bool_tSetTrSorting(Bool_t set = kFALSE)
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 Int_tTHaSpectrometer::Track()
virtual Int_tTrackCalc()
virtual Int_tTrackTimes(TClonesArray* tracks)
virtual voidTHaSpectrometer::TrackToLab(THaTrack& track, TVector3& pvect) const
virtual voidTHaSpectrometer::TransportToLab(Double_t p, Double_t th, Double_t ph, TVector3& pvect) const
voidTHaTrackingModule::TrkIfoClear()
virtual voidTObject::UseCurrentStyle()
virtual voidTHaVertexModule::VertexClear()
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
protected:
virtual const char*THaAnalysisObject::ClassNameHere(const char*) const
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 voidTHaAnalysisObject::MakePrefix()
voidTHaAnalysisObject::MakePrefix(const char* basename)
voidTObject::MakeZombie()
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_tTHaAnalysisObject::ReadDatabase(const TDatime& date)
virtual Int_tTHaSpectrometer::ReadRunDatabase(const TDatime& date)
virtual Int_tTHaAnalysisObject::RemoveVariables()

Data Members

public:
enum THaSpectrometer::EStagesDone { kCoarseTrack
kCoarseRecon
kTracking
kReconstruct
};
enum THaAnalysisObject::EStatus { kOK
kNotinit
kInitError
kFileError
};
enum THaAnalysisObject::EType { kVarDef
kRVarDef
};
enum THaAnalysisObject::EMode { kDefine
kDelete
};
enum THaAnalysisObject::EProperties { kNeedsRunDB
kConfigOverride
};
enum TObject::EStatusBits { kCanDelete
kMustCleanup
kObjInCanvas
kIsReferenced
kHasUUID
kCannotPick
kNoContextMenu
kInvalidObject
};
enum TObject::[unnamed] { kIsOnHeap
kNotDeleted
kZombie
kBitMask
kSingleKey
kOverwrite
kWriteDelete
};
public:
static const Double_tTHaAnalysisObject::kBig= 1.e38; // default junk value
protected:
Double_tTHaSpectrometer::fCollDistDistance from collimator to target center (m)
TStringTHaAnalysisObject::fConfigConfiguration to use from database
Double_tTHaSpectrometer::fCosPhGeoin geographical coordinates
Double_tTHaSpectrometer::fCosPhSphspherical coordinates
Double_tTHaSpectrometer::fCosThGeoSine and cosine of central angles
Double_tTHaSpectrometer::fCosThSphSine and cosine of central angles in
Int_tTHaAnalysisObject::fDebugDebug level
TList*THaApparatus::fDetectorsList of all detectors for this apparatus
THaTrack*THaSpectrometer::fGoldenTrackGolden track within fTracks
TDatimeTHaAnalysisObject::fInitDateDate passed to Init
Bool_tTHaAnalysisObject::fIsInitFlag indicating that ReadDatabase done
Bool_tTHaAnalysisObject::fIsSetupFlag indicating that DefineVariables done.
TStringTNamed::fNameobject identifier
TList*THaSpectrometer::fNonTrackingDetectorsNon-tracking detectors
Bool_tTHaAnalysisObject::fOKOutFlag indicating object-output prepared
Bool_tTHaSpectrometer::fPIDPID enabled
Double_tTHaSpectrometer::fPcentralCentral momentum (GeV)
Double_tTHaSpectrometer::fPhiGeoOut-of-plane geographic central angle (rad)
Double_tTHaSpectrometer::fPhiSphCentral angles in spherical coords. (rad)
TObjArray*THaSpectrometer::fPidDetectorsPID detectors
TObjArray*THaSpectrometer::fPidParticlesParticles for which we want PID
TVector3THaSpectrometer::fPointingOffsetOptical point in lab coordinate system
char*THaAnalysisObject::fPrefixName prefix for global variables
UInt_tTHaAnalysisObject::fPropertiesProperties of this object (see EProperties)
Double_tTHaSpectrometer::fSinPhGeo
Double_tTHaSpectrometer::fSinPhSph
Double_tTHaSpectrometer::fSinThGeo
Double_tTHaSpectrometer::fSinThSph
UInt_tTHaSpectrometer::fStagesDoneBitfield of completed analysis stages
THaAnalysisObject::EStatusTHaAnalysisObject::fStatusInitialization status flag
Double_tTHaSpectrometer::fThetaGeoIn-plane geographic central angle (rad)
Double_tTHaSpectrometer::fThetaSph
TStringTNamed::fTitleobject title
TRotationTHaSpectrometer::fToLabRotRotation matrix from TRANSPORT to lab
TRotationTHaSpectrometer::fToTraRotRotation matrix from lab to TRANSPORT
TClonesArray*THaSpectrometer::fTrackPIDPID info for the tracks
TList*THaSpectrometer::fTrackingDetectorsTracking detectors
TClonesArray*THaSpectrometer::fTracksTracks
THaTrack*THaTrackingModule::fTrk! Pointer to associated track
THaTrackInfoTHaTrackingModule::fTrkIfoTrack information
TVector3THaVertexModule::fVertexVertex position (m)
TVector3THaVertexModule::fVertexErrorUncertainties in fVertex coordinates
Bool_tTHaVertexModule::fVertexOK
static const Int_tTHaSpectrometer::kInitTrackMultiplicity
static const UInt_tkSortTracks
THaScintillator*sc_refcalculate time track hits this plane

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

THaHRS(const char* name, const char* description)
 Constructor. Defines the standard detectors for the HRS.
~THaHRS()
 Destructor
Bool_t SetTrSorting(Bool_t set = kFALSE)
Bool_t GetTrSorting() const
Int_t FindVertices(TClonesArray& tracks)
 Reconstruct target coordinates for all tracks found in the focal plane.
Int_t TrackCalc()
 Additioal track calculations. At present, we only calculate beta here.
Int_t TrackTimes(TClonesArray* tracks)
 Do the actual track-timing (beta) calculation.
 Use multiple scintillators to average together and get "best" time at S1.

 To be useful, a meaningful timing resolution should be assigned
 to each Scintillator object (part of the database).