24 fCellSlopeXZCutMin(nullptr),
25 fCellSlopeXZCutMax(nullptr),
26 fCellSlopeYZCutMin(nullptr),
27 fCellSlopeYZCutMax(nullptr)
34 fDiffSlopeXZ0 = fMarkerValue;
35 fDiffSlopeYZ0 = fMarkerValue;
36 fDiffSlopeXZSlope = fMarkerValue;
37 fDiffSlopeYZSlope = fMarkerValue;
38 fChiSquareCut = fMarkerValue;
40 fNIter = fMarkerValue;
41 fNHitsCut = fMarkerValue;
42 fNHitsCutTotal = fMarkerValue;
44 ParseSteerFile(fSteerFile);
48void BmnSteering::TestParsedInput() {
50 vector <Double_t> test1;
51 vector <Double_t> test2;
53 test1.resize(fNStatsInnerTracker);
54 test2.resize(fNStatsInnerTracker);
56 for (Int_t iEle = 0; iEle < fNStatsInnerTracker; iEle++) {
60 test1.push_back(fHitXCutMin[iEle]);
61 test1.push_back(fHitXCutMax[iEle]);
62 test1.push_back(fHitYCutMin[iEle]);
63 test1.push_back(fHitYCutMax[iEle]);
64 test1.push_back(fCellSlopeXZCutMin[iEle]);
65 test1.push_back(fCellSlopeXZCutMax[iEle]);
66 test1.push_back(fCellSlopeYZCutMin[iEle]);
67 test1.push_back(fCellSlopeYZCutMax[iEle]);
69 test2.push_back(Abs(fHitXCutMin[iEle] - fHitXCutMax[iEle]));
70 test2.push_back(Abs(fHitYCutMin[iEle] - fHitYCutMax[iEle]));
71 test2.push_back(Abs(fCellSlopeXZCutMin[iEle] - fCellSlopeXZCutMax[iEle]));
72 test2.push_back(Abs(fCellSlopeYZCutMin[iEle] - fCellSlopeYZCutMax[iEle]));
75 if (Abs(it - fMarkerValue) < DBL_EPSILON) {
76 cout <<
"Steering containes missing / incorrect elements!!!" << endl;
81 if (it <= DBL_EPSILON) {
82 cout <<
"Steering containes missing / incorrect elements!!!" << endl;
87 if (Abs(fDiffSlopeXZ0 - fMarkerValue) < DBL_EPSILON ||
88 Abs(fDiffSlopeYZ0 - fMarkerValue) < DBL_EPSILON ||
89 Abs(fDiffSlopeXZSlope - fMarkerValue) < DBL_EPSILON ||
90 Abs(fDiffSlopeYZSlope - fMarkerValue) < DBL_EPSILON ||
91 Abs(fChiSquareCut - fMarkerValue) < DBL_EPSILON) {
92 cout <<
"Steering containes missing / incorrect elements!!!" << endl;
96 if (fNIter == fMarkerValue || fNHitsCut == fMarkerValue ||
97 fNHitsCutTotal == fMarkerValue) {
98 cout <<
"Steering containes missing / incorrect elements!!!" << endl;
104 cout <<
"Steering file: " << fSteerFile << endl;
106 cout <<
"fNStations = " << fNStatsInnerTracker << endl;
108 cout <<
"hitXCutMin: " << endl;
109 for (Int_t iStat = 0; iStat < fNStatsInnerTracker; iStat++)
110 cout << iStat <<
" " << fHitXCutMin[iStat] << endl;
112 cout <<
"hitXCutMax: " << endl;
113 for (Int_t iStat = 0; iStat < fNStatsInnerTracker; iStat++)
114 cout << iStat <<
" " << fHitXCutMax[iStat] << endl;
116 cout <<
"hitYCutMin: " << endl;
117 for (Int_t iStat = 0; iStat < fNStatsInnerTracker; iStat++)
118 cout << iStat <<
" " << fHitYCutMin[iStat] << endl;
120 cout <<
"hitYCutMax: " << endl;
121 for (Int_t iStat = 0; iStat < fNStatsInnerTracker; iStat++)
122 cout << iStat <<
" " << fHitYCutMax[iStat] << endl;
124 cout <<
"cellSlopeXZCutMin: " << endl;
125 for (Int_t iStat = 0; iStat < fNStatsInnerTracker; iStat++)
126 cout << iStat <<
" " << fCellSlopeXZCutMin[iStat] << endl;
128 cout <<
"cellSlopeXZCutMax: " << endl;
129 for (Int_t iStat = 0; iStat < fNStatsInnerTracker; iStat++)
130 cout << iStat <<
" " << fCellSlopeXZCutMax[iStat] << endl;
132 cout <<
"cellSlopeYZCutMin: " << endl;
133 for (Int_t iStat = 0; iStat < fNStatsInnerTracker; iStat++)
134 cout << iStat <<
" " << fCellSlopeYZCutMin[iStat] << endl;
136 cout <<
"cellSlopeYZCutMax: " << endl;
137 for (Int_t iStat = 0; iStat < fNStatsInnerTracker; iStat++)
138 cout << iStat <<
" " << fCellSlopeYZCutMax[iStat] << endl;
140 cout <<
"diffSlopeXZ0 = " << fDiffSlopeXZ0 << endl;
141 cout <<
"diffSlopeXZSlope = " << fDiffSlopeXZSlope << endl;
142 cout <<
"diffSlopeYZ0 = " << fDiffSlopeYZ0 << endl;
143 cout <<
"diffSlopeYZSlope = " << fDiffSlopeYZSlope << endl;
144 cout <<
"chiSquareCut = " << fChiSquareCut << endl;
145 cout <<
"nIter = " << fNIter << endl;
146 cout <<
"nHitsCut = " << fNHitsCut << endl;
147 cout <<
"nHitsCutTotal = " << fNHitsCutTotal << endl;
150void BmnSteering::ParseSteerFile(TString fileName) {
151 TString gPathConfig = gSystem->Getenv(
"VMCWORKDIR");
152 TString gPathFull = gPathConfig +
"/macro/steering/" + fileName;
156 ifstream
f(gPathFull.Data(), ios::in);
158 f >> tmp >> fNStatsInnerTracker;
160 fHitXCutMin =
new Double_t[fNStatsInnerTracker];
161 fHitXCutMax =
new Double_t[fNStatsInnerTracker];
163 fHitYCutMin =
new Double_t[fNStatsInnerTracker];
164 fHitYCutMax =
new Double_t[fNStatsInnerTracker];
166 fCellSlopeXZCutMin =
new Double_t[fNStatsInnerTracker];
167 fCellSlopeXZCutMax =
new Double_t[fNStatsInnerTracker];
169 fCellSlopeYZCutMin =
new Double_t[fNStatsInnerTracker];
170 fCellSlopeYZCutMax =
new Double_t[fNStatsInnerTracker];
172 for (Int_t iEle = 0; iEle < fNStatsInnerTracker; iEle++) {
173 fHitXCutMin[iEle] = fMarkerValue;
174 fHitXCutMax[iEle] = fMarkerValue;
175 fHitYCutMin[iEle] = fMarkerValue;
176 fHitYCutMax[iEle] = fMarkerValue;
177 fCellSlopeXZCutMin[iEle] = fMarkerValue;
178 fCellSlopeXZCutMax[iEle] = fMarkerValue;
179 fCellSlopeYZCutMin[iEle] = fMarkerValue;
180 fCellSlopeYZCutMax[iEle] = fMarkerValue;
185 for (Int_t iStat = 0; iStat < fNStatsInnerTracker; iStat++)
186 f >> fHitXCutMin[iStat];
190 for (Int_t iStat = 0; iStat < fNStatsInnerTracker; iStat++)
191 f >> fHitXCutMax[iStat];
195 for (Int_t iStat = 0; iStat < fNStatsInnerTracker; iStat++)
196 f >> fHitYCutMin[iStat];
200 for (Int_t iStat = 0; iStat < fNStatsInnerTracker; iStat++)
201 f >> fHitYCutMax[iStat];
205 for (Int_t iStat = 0; iStat < fNStatsInnerTracker; iStat++)
206 f >> fCellSlopeXZCutMin[iStat];
210 for (Int_t iStat = 0; iStat < fNStatsInnerTracker; iStat++)
211 f >> fCellSlopeXZCutMax[iStat];
215 for (Int_t iStat = 0; iStat < fNStatsInnerTracker; iStat++)
216 f >> fCellSlopeYZCutMin[iStat];
220 for (Int_t iStat = 0; iStat < fNStatsInnerTracker; iStat++)
221 f >> fCellSlopeYZCutMax[iStat];
224 f >> tmp >> fDiffSlopeXZ0;
227 f >> tmp >> fDiffSlopeXZSlope;
230 f >> tmp >> fDiffSlopeYZ0;
233 f >> tmp >> fDiffSlopeYZSlope;
236 f >> tmp >> fChiSquareCut;
242 f >> tmp >> fNHitsCut;
245 f >> tmp >> fNHitsCutTotal;