class THaSpectrometer: public THaApparatus, public THaTrackingModule, public THaVertexModule


 Abstract base class for a spectrometer.

 It implements a generic Reconstruct() method that should be
 useful for most situations. See specific description below.

 It also provides support for lists of different detector types
 (e.g. tracking/non-tracking/PID) for efficient processing.

Function Members (Methods)

    This is an abstract class, constructors will not be documented.
    Look at the header to check for available constructors.

voidTObject::AbstractMethod(const char* method) const
virtual Int_tAddDetector(THaDetector* det)
virtual Int_tAddPidParticle(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_tCalcPID()
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidClear(Option_t* opt = "")
virtual TObject*TNamed::Clone(const char* newname = "") const
virtual Int_tCoarseReconstruct()
virtual Int_tCoarseTrack()
virtual Int_tTNamed::Compare(const TObject* obj) const
virtual voidTNamed::Copy(TObject& named) const
virtual Int_tTHaApparatus::Decode(const THaEvData&)
virtual voidDefinePidParticles()
virtual Int_tDefineVariables(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)
Double_tGetCollDist() 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*GetGoldenTrack() const
virtual const char*TObject::GetIconName() const
TDatimeTHaAnalysisObject::GetInitDate() const
virtual const char*TNamed::GetName() const
Int_tGetNpidDetectors() const
Int_tGetNpidParticles() const
Int_tGetNTracks() const
Int_tTHaApparatus::GetNumDets() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
Double_tGetPcentral() const
Double_tGetPhiGeo() const
Double_tGetPhiSph() const
const THaPidDetector*GetPidDetector(Int_t i) const
const THaParticleInfo*GetPidParticleInfo(Int_t i) const
const TVector3&GetPointingOffset() const
const char*THaAnalysisObject::GetPrefix() const
static const RVarDef*THaTrackingModule::GetRVarDef()
Double_tGetThetaGeo() const
Double_tGetThetaSph() const
virtual const char*TNamed::GetTitle() const
const TRotation&GetToLabRot() const
const TRotation&GetToTraRot() const
TClonesArray*GetTrackPID() const
TClonesArray*GetTracks() const
virtual UInt_tTObject::GetUniqueID() const
virtual const TVector3&GetVertex() const
virtual const TVector3&THaVertexModule::GetVertexError() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTNamed::Hash() const
virtual Bool_tHasVertex() 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_tIsDone(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_tTObject::IsOnHeap() const
Bool_tIsPID() const
virtual Bool_tTNamed::IsSortable() const
Bool_tTObject::IsZombie() const
voidLabToTransport(const TVector3& vertex, const TVector3& pvect, Double_t* ray) const
virtual voidLabToTransport(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)
static Int_tTHaAnalysisObject::LoadDB(FILE* file, const TDatime& date, const TagDef* tags, const char* prefix = "", Int_t search = 0)
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()
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
virtual Int_tTObject::Read(const char* name)
virtual Int_tReconstruct()
virtual voidTObject::RecursiveRemove(TObject* obj)
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(basic_ostream<char,char_traits<char> >& 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)
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)
voidSetGoldenTrack(THaTrack* t)
virtual voidTHaAnalysisObject::SetName(const char* name)
virtual voidTHaAnalysisObject::SetNameTitle(const char* name, const char* title)
static voidTObject::SetObjectStat(Bool_t stat)
voidSetPID(Bool_t b = kTRUE)
virtual voidTNamed::SetTitle(const char* title = "")MENU
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
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& b)
voidStreamerNVirtual(TBuffer& 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_tTrack()
virtual Int_tTrackCalc()
virtual voidTrackToLab(THaTrack& track, TVector3& pvect) const
virtual voidTransportToLab(Double_t p, Double_t th, Double_t ph, TVector3& pvect) const
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
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 voidTObject::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
virtual voidTHaApparatus::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_tTHaAnalysisObject::ReadDatabase(const TDatime& date)
virtual Int_tReadRunDatabase(const TDatime& date)
virtual Int_tTHaAnalysisObject::RemoveVariables()

Data Members

enum EStagesDone { kCoarseTrack
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
Double_tfCollDistDistance from collimator to target center (m)
TStringTHaAnalysisObject::fConfigConfiguration to use from database
Double_tfCosPhGeoin geographical coordinates
Double_tfCosPhSphspherical coordinates
Double_tfCosThGeoSine and cosine of central angles
Double_tfCosThSphSine and cosine of central angles in
Int_tTHaAnalysisObject::fDebugDebug level
TList*THaApparatus::fDetectorsList of all detectors for this apparatus
THaTrack*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*fNonTrackingDetectorsNon-tracking detectors
Bool_tTHaAnalysisObject::fOKOutFlag indicating object-output prepared
Bool_tfPIDPID enabled
Double_tfPcentralCentral momentum (GeV)
Double_tfPhiGeoOut-of-plane geographic central angle (rad)
Double_tfPhiSphCentral angles in spherical coords. (rad)
TObjArray*fPidDetectorsPID detectors
TObjArray*fPidParticlesParticles for which we want PID
TVector3fPointingOffsetOptical point in lab coordinate system
char*THaAnalysisObject::fPrefixName prefix for global variables
UInt_tTHaAnalysisObject::fPropertiesProperties of this object (see EProperties)
UInt_tfStagesDoneBitfield of completed analysis stages
THaAnalysisObject::EStatusTHaAnalysisObject::fStatusInitialization status flag
Double_tfThetaGeoIn-plane geographic central angle (rad)
TStringTNamed::fTitleobject title
TRotationfToLabRotRotation matrix from TRANSPORT to lab
TRotationfToTraRotRotation matrix from lab to TRANSPORT
TClonesArray*fTrackPIDPID info for the tracks
TList*fTrackingDetectorsTracking detectors
THaTrack*THaTrackingModule::fTrk! Pointer to associated track
THaTrackInfoTHaTrackingModule::fTrkIfoTrack information
TVector3THaVertexModule::fVertexVertex position (m)
TVector3THaVertexModule::fVertexErrorUncertainties in fVertex coordinates
static const Int_tkInitTrackMultiplicity
Bool_tfListInitDetector lists initialized

Class Charts

Inheritance Chart:

Function documentation

 Destructor. Delete the lists of specialized detectors.
 FIXME: delete tracks, pid, vertices too?
Int_t AddDetector(THaDetector* det)
 Add a detector to the internal lists of spectrometer detectors.
 This method is useful for quick testing of a new detector class that
 one doesn't want to include permanently in an Apparatus yet.
 The detector object must be allocated and deleted by the caller.
 Duplicate detector names are not allowed.
Int_t AddPidParticle(const char* shortname, const char* name, Double_t mass, Int_t charge = 0)
 Add a particle type to the list of particles for which we want PID.
 The "charge" argument is optional.
Int_t CalcPID()
 Combine the PID information from all detectors into an overall PID
 for each track.  The actual work is done in the THaPIDinfo class.
 This is just a loop over all tracks.
 Called by Reconstruct().
void Clear(Option_t* opt = "")
 Clear the spectrometer data for next event.
void DefinePidParticles()
 Define the default set of PID particles:
  pion, kaon, proton
Int_t DefineVariables(THaAnalysisObject::EMode mode = kDefine)
 Define/delete standard variables for a spectrometer (tracks etc.)
 Can be overridden or extended by derived (actual) apparatuses
const TVector3& GetVertex()
 Return vertex vector of the Golden Track.
 Overrides standard method of THaVertexModule.
Bool_t HasVertex()
void ListInit()
 Initialize lists of specialized detectors.
 Private function called by Reconstruct().
Int_t CoarseTrack()
 Coarse Tracking: First step of spectrometer analysis
Int_t CoarseReconstruct()
 2nd step: Coarse processing.  Pass the coarse tracks to the remaining
 detectors for any processing that can be done at this stage.
 This may include clustering and preliminary PID.
 PID information is tacked onto the tracks as a THaPIDinfo object.
Int_t Track()
 Fine tracking.  Compute the tracks with high precision.
 If coarse tracking was done, this step should simply "refine" the
 tracks found earlier, not add new tracks to fTrack.
Int_t Reconstruct()
 This method implements a fairly generic algorithm for spectrometer
 reconstruction which should be useful for most situations.
 Additional, equipment-specific processing can be done in
 a derived class that calls this method first.

 The algorithm is as follows:

 For all tracking detectors:
 For all non-tracking detectors:
 For all tracking detectors:
 Reconstruct tracks to target
 For all non-tracking detectors:
 Compute additional attributes of tracks (e.g. momentum, beta)
 Find "Golden Track"
 Combine all PID detectors to get overall PID for each track

void TrackToLab(THaTrack& track, TVector3& pvect) const
 Convert TRANSPORT coordinates of 'track' to momentum vector 'pvect'
 in the lab coordinate system (z = beam, y = up).
 Uses the spectrometer angles from the database (loaded during Init())
 for the transformation.

 The track origin (vertex) is not calculated here because
 doing so requires knowledge of beam positions and and angles.
 Vertex calculations are done in a separate physics module.
void TransportToLab(Double_t p, Double_t th, Double_t ph, TVector3& pvect) const
 Convert TRANSPORT vector to lab vector.
  p:  TRANSPORT momentum (absolute)
  th: Tangent of TRANSPORT theta
  ph: Tangent of TRANSPORT phi
  pvect: Vector in lab frame (z = beam, y = up) in same units as p.

 Note: Simple vector transformation can be done trivially by multiplying
 with the appropriate rotation matrix, e.g.:
  TVector3 lab_vector = spect->GetToLabRot() * transport_vector;
void LabToTransport(const TVector3& vertex, const TVector3& pvect, TVector3& tvertex, Double_t* ray) const
 Convert lab coordinates to TRANSPORT coordinates in the spectrometer
 coordinate system.
  vertex:  Reaction point in lab system
  pvect:   Momentum vector in lab
  tvertex: The vertex point in the TRANSPORT system, without any
           coordinate projections applied
  ray:     The TRANSPORT ray according to TRANSPORT conventions.
           This is an array of size 6 with elements x, tan(theta),
           y, tan(y), z, and delta.
           z is set to 0, and accordingly x and y are the TRANSPORT
           coordinates in the z=0 plane. delta is computed with respect
           to the present spectrometer's central momentum.
           Units are the same as of the input vectors.
Int_t ReadRunDatabase(const TDatime& date)
 Query the run database for parameters specific to this spectrometer
 (central angles, momentum, offsets, drift, etc.)
Int_t GetNpidParticles()
Int_t GetNpidDetectors()
const THaParticleInfo* GetPidParticleInfo(Int_t i) const
const THaPidDetector* GetPidDetector(Int_t i) const
Bool_t IsDone(UInt_t stage) const
void LabToTransport(const TVector3& vertex, const TVector3& pvect, Double_t* ray) const
Int_t FindVertices(TClonesArray& tracks)
Int_t TrackCalc()
THaTrack* GetGoldenTrack()
{ return fGoldenTrack; }
Int_t GetNTracks()
{ return fTracks->GetLast()+1; }
TClonesArray* GetTracks()
{ return fTracks; }
TClonesArray* GetTrackPID()
{ return fTrackPID; }
Bool_t IsPID()
{ return fPID; }
void SetGoldenTrack(THaTrack* t)
{ fGoldenTrack = t; }
void SetPID(Bool_t b = kTRUE)
{ fPID = b; }
const TRotation& GetToLabRot()
 The following is specific to small-acceptance pointing spectrometers
 using spectrometer-specific coordinates such as TRANSPORT
{ return fToLabRot; }
const TRotation& GetToTraRot()
{ return fToTraRot; }
const TVector3& GetPointingOffset()
{ return fPointingOffset; }
Double_t GetThetaGeo()
{ return fThetaGeo; }
Double_t GetPhiGeo()
{ return fPhiGeo; }
Double_t GetThetaSph()
{ return fThetaSph; }
Double_t GetPhiSph()
{ return fPhiSph; }
Double_t GetPcentral()
{ return fPcentral; }
Double_t GetCollDist()
{ return fCollDist; }

Last change: Sat Nov 7 21:26:52 2009
Last generated: 2009-11-07 21:26

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.