THaOpticsAnalytical Author: Jin Huang <mailto:jinhuang@jlab.org> Feb 2008 Modify History:
THaOpticsAnalytical is a derived class of THaOptics, which uses a analytical approach calculating track back to target for BigBite spectrometer. One can mount it to a THaOptics-supporting spectrometer by following line and fill up database according to last section.
Bool_t mr=MountOptics(new THaOpticsAnalytical("opticstest","BigBite Optics",this)); assert(mr);
Since the solid angle of bigbite is relatively large, it will not be possible to use a single matrix to describe backward optics calculation for this spectrometer. This is because for backward matrix, it will be deeply involved with parameters such as distance between magnetic and target. This dependancy is not simple and a matrix for one experiment will not be able to be used on the other. Besides, the angle of spectrometer will also affect the matrix element. The overall error of matrix methord is equivalent to the spacial resolusion of detector is worth by the following amount :
$$\Delta x_{error}=\tan( \theta_{Target} )(\Delta L+\cos(\Theta_0)z_{react})$$
To solve these problem, a general, fitting free model is developped.
This class use a analytical model calculating the whole track back to target given infomation of the track on the detector side. It based on the following assumption:
thus, this optics class will be suitable for online replay, in which case, usually optics data is not available.
accuracy of this model will not meet the requirement of further offline analysis. Therefore, the following steps is suggested for improvement of precision:
Base on the assumptions, a particle going through the whole system could be devided into 3 stages: drift in the target region, helix movement in magnetic feild and free drift in detector region. Following is a figure of a typical track, projected to midplane:
This also shows the temporary coordinate system used in internal function THaOpticsAnalytical::CalxA and THaOpticsAnalytical::CalR. These two fucntion use infomation of track parameter on the detector side and aprox. beam position to calculate position of point A(enter point), B(exit point) and bending radius R. For the y position, which is perpendicular to midplane, this model first assume a simple reflectiong model (get FirstVertex) and then correct it with calculated particle path (and get SecendVertex). Aproximate beam position is also corrected according to y position.
P=q*B*R=K*I*R, in which,
there are two method
of scaling bending radius to momentum:
this class will try
both of above method. Priority
of method 1 is higher.
a K<=0 will a push this class to use method 2
This class will acquire following information from database (in additional to general THaOptics). All length units are meter and angle are degrees.
virtual Int_t | THaAnalysisObject::DefineVariables(THaAnalysisObject::EMode mode = kDefine) |
Int_t | THaAnalysisObject::DefineVarsFromList(const VarDef* list, THaAnalysisObject::EMode mode = kDefine, const char* var_prefix = "") const |
Int_t | THaAnalysisObject::DefineVarsFromList(const RVarDef* list, THaAnalysisObject::EMode mode = kDefine, const char* var_prefix = "") const |
Int_t | THaAnalysisObject::DefineVarsFromList(const void* list, THaAnalysisObject::EType type, THaAnalysisObject::EMode mode, const char* var_prefix = "") const |
virtual void | TObject::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) |
virtual THaAnalysisObject* | THaOptics::FindModuleNoCheck(const char* name, const char* classname) |
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 void | THaOptics::MakePrefix() |
void | TObject::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_t | ReadDatabase(const TDatime& date) |
virtual Int_t | THaOptics::ReadRunDatabase(const TDatime& date) |
virtual Int_t | THaAnalysisObject::RemoveVariables() |
enum THaAnalysisObject::EStatus { | kOK | |
kNotinit | ||
kInitError | ||
kFileError | ||
}; | ||
enum THaAnalysisObject::EType { | kVarDef | |
kRVarDef | ||
}; | ||
enum THaAnalysisObject::EMode { | kDefine | |
kDelete | ||
}; | ||
enum THaAnalysisObject::EProperties { | kNeedsRunDB | |
}; | ||
enum TObject::EStatusBits { | kCanDelete | |
kMustCleanup | ||
kObjInCanvas | ||
kIsReferenced | ||
kHasUUID | ||
kCannotPick | ||
kNoContextMenu | ||
kInvalidObject | ||
}; | ||
enum TObject::[unnamed] { | kIsOnHeap | |
kNotDeleted | ||
kZombie | ||
kBitMask | ||
kSingleKey | ||
kOverwrite | ||
kWriteDelete | ||
}; |
static const Double_t | THaAnalysisObject::kBig | = 1.e38; // default junk value |
TRef | THaOptics::fBeam | |
TString | THaAnalysisObject::fConfig | Configuration to use from database |
Double_t | THaOptics::fCurrent | Central momentum (GeV) |
Int_t | THaAnalysisObject::fDebug | Debug level |
TString | THaOptics::fDefBeamName | |
TRotation | THaOptics::fHCS2TCS | |
TDatime | THaAnalysisObject::fInitDate | Date passed to Init |
Bool_t | THaAnalysisObject::fIsInit | Flag indicating that ReadDatabase done |
Bool_t | THaAnalysisObject::fIsSetup | Flag indicating that DefineVariables done. |
Double_t | fMagDL | shift of front surface of magnetic field from sieve |
Double_t | fMagS | the distance between crossing line of two surfaces of magnetic field and central point of front surface |
Double_t | fMagTheta | in rad, the angle between two surfaces of magnetic field |
TString | TNamed::fName | object identifier |
Bool_t | THaAnalysisObject::fOKOut | Flag indicating object-output prepared |
Double_t | THaOptics::fPShift | |
Double_t | THaOptics::fPathLenShift | |
Double_t | THaOptics::fPhShift | |
char* | THaAnalysisObject::fPrefix | Name prefix for global variables |
UInt_t | THaAnalysisObject::fProperties | Properties of this object (see EProperties) |
Double_t | fRCentral | the curve radius in magnetic field for a particle with central momentum |
Double_t | fRadius2Momentum | conversion constant of bending radius to momentum, units: GeV/m/c |
TRef | THaOptics::fSpec | pointer to BigBite |
THaAnalysisObject::EStatus | THaAnalysisObject::fStatus | Initialization status flag |
TRotation | THaOptics::fTCS2HCS | |
TRotation | THaOptics::fTCS2TRCS | |
TVector3 | THaOptics::fTCSOffSetInHCS | |
TRotation | THaOptics::fTRCS2TCS | |
TVector3 | THaOptics::fTRCSOffSetInTCS | |
Double_t | THaOptics::fThShift | |
TString | TNamed::fTitle | object title |
Inheritance Chart: | |||||||||||||||||||||
|
constructor function of THaOpticsAnalytical
calcuate the radius of curve of a central ray central ray is the ray go through z axis of TRCS and target coord. sys. origin point How it works. Set a dummy run of ApplyOptics for central ray at an arbitary R_Central. Then real R_Central will be proportional to the reconstructed p magnitude if fRCentral is read in from database and valid then no need for calculation again. It will keep unchanged.
apply optics : do the job