Skip to content
Snippets Groups Projects
Commit f5dfd245 authored by Yero1990's avatar Yero1990 Committed by Stephen Wood
Browse files

Mispoint param (#408)

* updated mispointing calculations

* added TMath::Abs() for HMS angles, since it has a '-' sign in the kin. file
parent 0d5b2a80
No related branches found
No related tags found
No related merge requests found
...@@ -285,29 +285,62 @@ Int_t THcHallCSpectrometer::ReadDatabase( const TDatime& date ) ...@@ -285,29 +285,62 @@ Int_t THcHallCSpectrometer::ReadDatabase( const TDatime& date )
fMispointing_x=999.; fMispointing_x=999.;
fMispointing_y=999.; 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 // mispointing in transport system y is horizontal and +x is vertical down
if (fMispointing_y == 999.) { if (fMispointing_y == 999.) {
if (prefix[0]=='h') { 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 (TMath::Abs(fTheta_lab) < 40) {fMispointing_y = 0.1*(0.52-0.012*TMath::Abs(fTheta_lab)+0.002*TMath::Abs(fTheta_lab)*TMath::Abs(fTheta_lab));}
else {fMispointing_y = 0.1*(0.52-0.012*40.+0.002*40.*40.);}
gHcParms->Define("hmispointing_y","HMS Y-Mispointing", fMispointing_y);
} }
if (prefix[0]=='p') fMispointing_y = 0.1*(-0.6);
cout << prefix[0] << " From Formula Mispointing_y = " << fMispointing_y << endl; if (prefix[0]=='p') {
} else {
fMispointing_y = 0.1*(-0.6);
gHcParms->Define("pmispointing_y","SHMS Y-Mispointing", fMispointing_y);
cout << prefix[0] << " From Formula Mispointing_y = " << fMispointing_y << endl;
}
}
else {
cout << prefix[0] << " From Parameter Set Mispointing_y = " << fMispointing_y << endl; cout << prefix[0] << " From Parameter Set Mispointing_y = " << fMispointing_y << endl;
} }
if (fMispointing_x == 999.) { if (fMispointing_x == 999.) {
if (prefix[0]=='h') { 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 (TMath::Abs(fTheta_lab) < 50) {fMispointing_x = 0.1*(2.37-0.086*TMath::Abs(fTheta_lab)+0.0012*TMath::Abs(fTheta_lab)*TMath::Abs(fTheta_lab));}
else {fMispointing_x = 0.1*(2.37-0.086*50+0.0012*50.*50.);}
gHcParms->Define("hmispointing_x","HMS X-Mispointing", fMispointing_x);
cout << prefix[0] << " From Formula Mispointing_x = " << fMispointing_x << endl;
} }
if (prefix[0]=='p') fMispointing_x = 0.1*(-1.26);
cout << prefix[0] << " From Formula Mispointing_x = " << fMispointing_x << endl; if (prefix[0]=='p') {
} else {
fMispointing_x = 0.1*(-1.26);
gHcParms->Define("pmispointing_x","SHMS X-Mispointing", fMispointing_x);
cout << prefix[0] << " From Formula Mispointing_x = " << fMispointing_x << endl;
}
}
else {
cout << prefix[0] << " From Parameter Set Mispointing_x = " << fMispointing_x << endl; cout << prefix[0] << " From Parameter Set Mispointing_x = " << fMispointing_x << endl;
} }
// //
EnforcePruneLimits(); EnforcePruneLimits();
#ifdef WITH_DEBUG #ifdef WITH_DEBUG
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment