BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
add_GEM_AlgnShift.C
Go to the documentation of this file.
1
2void PutAlign(Int_t st, Int_t mod, Double_t x, Double_t y, Double_t z, vector<UniValue*>& values);
3
5{
6 bool return_error = false;
7 vector<UniValue*> shiftValues;
8
9 // FOR BM@N RUNS (3681 - 5184)
10 // PutAlign(0, 0, -0.018, -0.002, -0.024, shiftValues);
11 // PutAlign(0, 1, +0.152, -0.070, -0.045, shiftValues);
12 // PutAlign(1, 0, +0.002, -0.153, -0.086, shiftValues);
13 // PutAlign(1, 1, +0.145, +0.046, -0.047, shiftValues);
14 // PutAlign(2, 0, +0.065, -0.064, +0.036, shiftValues);
15 // PutAlign(2, 1, +0.031, +0.056, +0.038, shiftValues);
16 // PutAlign(3, 0, -0.123, +0.001, -0.002, shiftValues);
17 // PutAlign(3, 1, -0.111, -0.196, -0.027, shiftValues);
18 // PutAlign(4, 0, +0.076, -0.131, -0.006, shiftValues);
19 // PutAlign(4, 1, +0.022, +0.154, +0.026, shiftValues);
20 // PutAlign(5, 0, -0.041, +0.171, +0.007, shiftValues);
21 // PutAlign(5, 1, +0.000, -0.017, -0.005, shiftValues);
22
23 // FOR SRC RUNS (2213 - 3588)
24 // For SRC corrections are sum of alignment corrections and lorentz shift corrections, for fieldscale = 2
25 PutAlign(0, 0, 0.0, 0.0, 0.0, shiftValues);
26 PutAlign(0, 0, 0.0, 0.0, 0.0, shiftValues);
27 PutAlign(1, 0, 0.0, 0.0, 0.0, shiftValues);
28 PutAlign(1, 0, 0.0, 0.0, 0.0, shiftValues);
29 PutAlign(2, 0, 0.0, 0.0, 0.0, shiftValues);
30 PutAlign(2, 0, 0.0, 0.0, 0.0, shiftValues);
31 PutAlign(3, 0, 0.0, 0.0, 0.0, shiftValues);
32 PutAlign(3, 0, 0.0, 0.0, 0.0, shiftValues);
33 PutAlign(4, 0, -0.033, +0.0, 0.0, shiftValues);
34 PutAlign(4, 1, -0.033, +0.0, 0.0, shiftValues);
35 PutAlign(5, 0, +0.183, -0.027, 0.0, shiftValues);
36 PutAlign(5, 1, +0.183, -0.027, 0.0, shiftValues);
37 PutAlign(6, 0, -0.231, +0.067, 0.0, shiftValues);
38 PutAlign(6, 1, -0.231, +0.067, 0.0, shiftValues);
39 PutAlign(7, 0, +0.167, +0.035, 0.0, shiftValues);
40 PutAlign(7, 1, +0.167, +0.035, 0.0, shiftValues);
41 PutAlign(8, 0, -0.252, -0.001, 0.0, shiftValues);
42 PutAlign(8, 1, -0.252, -0.001, 0.0, shiftValues);
43 PutAlign(9, 0, +0.156, +0.023, 0.0, shiftValues);
44 PutAlign(9, 1, +0.156, +0.023, 0.0, shiftValues);
45
46 UniDetectorParameter* pDetectorParameter =
47 UniDetectorParameter::CreateDetectorParameter("GEM", "alignment_shift", run, 2214, run, 3588, shiftValues);
48 if (pDetectorParameter == nullptr)
49 return_error = true;
50 // clean memory after work
51 for (int i = 0; i < shiftValues.size(); i++)
52 delete shiftValues[i];
53 if (pDetectorParameter)
54 delete pDetectorParameter;
55
56 if (return_error)
57 cout << "\nMacro finished with errors" << endl;
58 else
59 cout << "\nMacro finished successfully" << endl;
60}
61
62void PutAlign(Int_t st, Int_t mod, Double_t x, Double_t y, Double_t z, vector<UniValue*>& values)
63{
64 AlignmentValue* pValue = new AlignmentValue;
65 pValue->station = st;
66 pValue->module = mod;
67 pValue->value[0] = x;
68 pValue->value[1] = y;
69 pValue->value[2] = z;
70 values.push_back(pValue);
71}
int i
Definition P4_F32vec4.h:22
int Int_t
double Double_t
void add_GEM_AlgnShift(Int_t run=7)
void PutAlign(Int_t st, Int_t mod, Double_t x, Double_t y, Double_t z, vector< UniValue * > &values)
static UniDetectorParameter * CreateDetectorParameter(TString detector_name, int parameter_id, int start_period, int start_run, int end_period, int end_run, int value_key, unsigned char *parameter_value, Long_t size_parameter_value, TDatime *expiry_date)
add new detector parameter to the database