Skip to content
Snippets Groups Projects
Commit 5a558673 authored by hallc-online's avatar hallc-online Committed by Mark K Jones
Browse files

Update THcHallCSpectrometer.cxx

Added setting of spectrometer mispointing according the the input
spectrometer angle if the mispointing is not set by a parameter.

The formulas for deteriming the mispointing comes from fits to sureys.

If one wants to use different spectrometer mispointings then
it is best to set hmispointing_x,hmispointing_y for HMS
and pmispointing_x,pmispointing_y for SHMS in the kinematics setting file
such as standard.kinematics .
parent 7837f271
Branches
Tags
No related merge requests found
...@@ -282,9 +282,31 @@ Int_t THcHallCSpectrometer::ReadDatabase( const TDatime& date ) ...@@ -282,9 +282,31 @@ Int_t THcHallCSpectrometer::ReadDatabase( const TDatime& date )
fSelUsingPrune = 0; fSelUsingPrune = 0;
fPhi_lab = 0.; fPhi_lab = 0.;
fSatCorr=0.; fSatCorr=0.;
fMispointing_x=0.; fMispointing_x=999.;
fMispointing_y=0.; fMispointing_y=999.;
gHcParms->LoadParmValues((DBRequest*)&list,prefix); gHcParms->LoadParmValues((DBRequest*)&list,prefix);
// mispointing in transport system y is horizontal and +x is vertical down
if (fMispointing_y == 999.) {
if (prefix[0]=='h') {
fMispointing_y = 0.1*(0.52-0.012*40.+0.002*40.*40.);
if (fTheta_lab < 40) fMispointing_y = 0.1*(0.52-0.012*TMath::Abs(fTheta_lab)+0.002*fTheta_lab*fTheta_lab);
}
if (prefix[0]=='p') fMispointing_y = 0.1*(-0.6);
cout << prefix[0] << " From Formula Mispointing_y = " << fMispointing_y << endl;
} else {
cout << prefix[0] << " From Parameter Set Mispointing_y = " << fMispointing_y << endl;
}
if (fMispointing_x == 999.) {
if (prefix[0]=='h') {
fMispointing_x = 0.1*(2.37-0.086*50+0.0012*50.*50.);
if (fTheta_lab < 50)fMispointing_x = 0.1*(2.37-0.086*TMath::Abs(fTheta_lab)+0.0012*fTheta_lab*fTheta_lab);
}
if (prefix[0]=='p') fMispointing_x = 0.1*(-1.26);
cout << prefix[0] << " From Formula Mispointing_x = " << fMispointing_x << endl;
} else {
cout << prefix[0] << " From Parameter Set Mispointing_x = " << fMispointing_x << endl;
}
//
EnforcePruneLimits(); EnforcePruneLimits();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment