18 , XShiftOfModules(NULL)
19 , YShiftOfModules(NULL)
20 , ZShiftOfModules(NULL)
21 , ThicknessOfModules(NULL)
27 Double_t xpos_station,
28 Double_t ypos_station,
29 Double_t zpos_station)
30 : StationNumber(iStation)
41 , XPosition(xpos_station)
42 , YPosition(ypos_station)
43 , ZPosition(zpos_station)
44 , XShiftOfModules(NULL)
45 , YShiftOfModules(NULL)
46 , ZShiftOfModules(NULL)
47 , ThicknessOfModules(NULL)
50 Bool_t create_status = CreateConfigurationFromXMLNode(stationNode);
52 std::cerr <<
"Error: There are problems with creation of the configuration from XML node (in BmnSiBTStation)\n";
143 for (Int_t imodule = 0; imodule <
NModules; ++imodule) {
158 Int_t
module = GetPointModuleOwnership(xcoord, ycoord, zcoord);
161 if (
Modules[module]->AddRealPointFullOne(xcoord, ycoord, zcoord, px, py, pz, dEloss, refID)) {
174 Int_t points_sum = 0;
175 for (Int_t iModule = 0; iModule <
NModules; iModule++) {
183 for (Int_t iModule = 0; iModule <
NModules; iModule++) {
190 Int_t points_sum = 0;
191 for (Int_t iModule = 0; iModule <
NModules; iModule++) {
199 for (Int_t imodule = 0; imodule <
NModules; ++imodule) {
200 if (
Modules[imodule]->IsPointInsideModule(xcoord, ycoord, zcoord))
235Bool_t BmnSiBTStation::CreateConfigurationFromXMLNode(TXMLNode* node)
237 NModules = CountNumberOfModules(node);
256 node = node->GetChildren();
257 Int_t currentModuleNum = 0;
259 if (strcmp(node->GetNodeName(),
"Module") == 0) {
260 Bool_t parse_status = ParseModule(node, currentModuleNum);
265 node = node->GetNextNode();
271Int_t BmnSiBTStation::CountNumberOfModules(TXMLNode* node)
273 Int_t module_cnt = 0;
274 node = node->GetChildren();
276 if (strcmp(node->GetNodeName(),
"Module") == 0) {
279 node = node->GetNextNode();
284Bool_t BmnSiBTStation::ParseModule(TXMLNode* node, Int_t iModule)
287 if (node->HasAttributes()) {
288 TList* attrList = node->GetAttributes();
290 TIter next(attrList);
292 while ((attr = (TXMLAttr*)next()) !=
nullptr) {
293 if (strcmp(attr->GetName(),
"xShift") == 0) {
296 if (strcmp(attr->GetName(),
"yShift") == 0) {
299 if (strcmp(attr->GetName(),
"zShift") == 0) {
303 if (strcmp(attr->GetName(),
"thickness") == 0) {
312 node = node->GetChildren();
313 Int_t currentLayerNum = 0;
315 if (strcmp(node->GetNodeName(),
"Layer") == 0) {
319 node = node->GetNextNode();
325BmnSiBTLayer BmnSiBTStation::ParseLayer(TXMLNode* node, Int_t iLayer, Int_t iModule)
331 Double_t xsize, ysize, xorig, yorig;
333 Double_t lx_border, ly_border;
334 Double_t rx_border, ry_border;
336 if (node->HasAttributes()) {
337 TList* attrList = node->GetAttributes();
339 TIter next(attrList);
341 while ((attr = (TXMLAttr*)next()) !=
nullptr) {
342 if (strcmp(attr->GetName(),
"zoneNumber") == 0) {
343 zone_number = atoi(attr->GetValue());
345 if (strcmp(attr->GetName(),
"type") == 0) {
346 if (strcmp(attr->GetValue(),
"lower") == 0) {
349 if (strcmp(attr->GetValue(),
"upper") == 0) {
353 if (strcmp(attr->GetName(),
"stripAngle") == 0) {
354 adeg = atof(attr->GetValue());
356 if (strcmp(attr->GetName(),
"pitch") == 0) {
357 pitch = atof(attr->GetValue());
359 if (strcmp(attr->GetName(),
"xorig") == 0) {
360 xorig = -atof(attr->GetValue());
362 if (strcmp(attr->GetName(),
"yorig") == 0) {
363 yorig = atof(attr->GetValue());
365 if (strcmp(attr->GetName(),
"xsize") == 0) {
366 xsize = atof(attr->GetValue());
368 if (strcmp(attr->GetName(),
"ysize") == 0) {
369 ysize = atof(attr->GetValue());
371 if (strcmp(attr->GetName(),
"stripDirection") == 0) {
372 if (strcmp(attr->GetValue(),
"LeftToRight") == 0) {
375 if (strcmp(attr->GetValue(),
"RightToLeft") == 0) {
379 if (strcmp(attr->GetName(),
"lxborder") == 0) {
380 lx_border = -atof(attr->GetValue());
382 if (strcmp(attr->GetName(),
"lyborder") == 0) {
383 ly_border = atof(attr->GetValue());
385 if (strcmp(attr->GetName(),
"rxborder") == 0) {
386 rx_border = -atof(attr->GetValue());
388 if (strcmp(attr->GetName(),
"ryborder") == 0) {
389 ry_border = atof(attr->GetValue());
397 layer.SetStripNumberingOrder(strip_direction);
399 layer.SetStripNumberingBorders(
404 node = node->GetChildren();
405 Int_t currentDeadZoneNum = 0;
407 if (strcmp(node->GetNodeName(),
"DeadZone") == 0) {
408 layer.AddDeadZone(ParseDeadZone(node, iModule));
409 currentDeadZoneNum++;
411 node = node->GetNextNode();
421 Int_t n_dead_points = CountDeadZonePoints(node);
422 Double_t* xpoints =
new Double_t[n_dead_points];
423 Double_t* ypoints =
new Double_t[n_dead_points];
426 node = node->GetChildren();
427 Int_t currentDeadPointNum = 0;
429 if (strcmp(node->GetNodeName(),
"DeadPoint") == 0) {
431 if (node->HasAttributes()) {
432 TList* attrList = node->GetAttributes();
434 TIter next(attrList);
436 while ((attr = (TXMLAttr*)next()) !=
nullptr) {
437 if (strcmp(attr->GetName(),
"x") == 0) {
438 xpoints[currentDeadPointNum] =
441 if (strcmp(attr->GetName(),
"y") == 0) {
447 currentDeadPointNum++;
449 node = node->GetNextNode();
452 dead_zone.
SetDeadZone(n_dead_points, xpoints, ypoints);
460Int_t BmnSiBTStation::CountDeadZonePoints(TXMLNode* node)
462 Int_t dead_point_cnt = 0;
463 node = node->GetChildren();
465 if (strcmp(node->GetNodeName(),
"DeadPoint") == 0) {
468 node = node->GetNextNode();
470 return dead_point_cnt;
Double_t GetZStartModulePosition()
Double_t GetModuleThickness()
void AddStripLayer(BmnSiBTLayer strip_layer)
Int_t GetNIntersectionPoints()
void CalculateStripHitIntersectionPoints()
Double_t GetThicknessOfModule(Int_t module_num)
void ProcessPointsInStation()
Int_t CountNAddedToStationPoints()
Double_t GetZShiftOfModule(Int_t module_num)
virtual ~BmnSiBTStation()
BmnSiBTModule * GetModule(Int_t module_num)
Double_t * ThicknessOfModules
void DefineStationBorders()
Double_t GetYShiftOfModule(Int_t module_num)
Int_t CountNProcessedPointInStation()
Double_t * ZShiftOfModules
Double_t GetXShiftOfModule(Int_t module_num)
Double_t * YShiftOfModules
Double_t * XShiftOfModules
Int_t GetPointModuleOwnership(Double_t xcoord, Double_t ycoord, Double_t zcoord)
Int_t AddPointToStation(Double_t xcoord, Double_t ycoord, Double_t zcoord, Double_t px, Double_t py, Double_t pz, Double_t dEloss, Int_t refID)
Bool_t SetDeadZone(Int_t n_points, Double_t *xpoints, Double_t *ypoints)