BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
add_Si_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 PutAlign(0, 0, -0.124, -0.026, -0.017, shiftValues);
10 PutAlign(0, 1, +0.006, -0.010, -0.010, shiftValues);
11 PutAlign(0, 2, +0.001, -0.000, -0.001, shiftValues);
12 PutAlign(0, 3, -0.006, -0.003, +0.002, shiftValues);
13 PutAlign(1, 0, -0.101, +0.015, +0.008, shiftValues);
14 PutAlign(1, 1, +0.044, +0.033, +0.009, shiftValues);
15 PutAlign(2, 0, +0.042, +0.094, +0.044, shiftValues);
16 PutAlign(2, 1, -0.042, +0.051, +0.037, shiftValues);
17 PutAlign(2, 2, +0.046, +0.039, +0.023, shiftValues);
18 PutAlign(2, 3, -0.063, +0.008, +0.039, shiftValues);
19 PutAlign(2, 4, -0.004, +0.003, +0.001, shiftValues);
20 PutAlign(2, 5, +0.000, +0.000, -0.001, shiftValues);
21 PutAlign(2, 6, +0.000, +0.000, +0.000, shiftValues);
22 PutAlign(2, 7, +0.000, +0.000, +0.000, shiftValues);
23
24 UniDetectorParameter* pDetectorParameter =
25 UniDetectorParameter::CreateDetectorParameter("Silicon", "alignment_shift", run, 3681, run, 5184, shiftValues);
26 if (pDetectorParameter == nullptr)
27 return_error = true;
28 // clean memory after work
29 for (int i = 0; i < shiftValues.size(); i++)
30 delete shiftValues[i];
31 if (pDetectorParameter)
32 delete pDetectorParameter;
33
34 if (return_error)
35 cout << "\nMacro finished with errors" << endl;
36 else
37 cout << "\nMacro finished successfully" << endl;
38}
39
40void PutAlign(Int_t st, Int_t mod, Double_t x, Double_t y, Double_t z, vector<UniValue*>& values)
41{
42 AlignmentValue* pValue = new AlignmentValue;
43 pValue->station = st;
44 pValue->module = mod;
45 pValue->value[0] = x;
46 pValue->value[1] = y;
47 pValue->value[2] = z;
48 values.push_back(pValue);
49}
int i
Definition P4_F32vec4.h:22
int Int_t
double Double_t
void add_Si_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