18 , XShiftOfModules(NULL)
19 , YShiftOfModules(NULL)
20 , ZShiftOfModules(NULL)
21 , DriftGapThicknessOfModules(NULL)
22 , FTransfGapThicknessOfModules(NULL)
23 , STransfGapThicknessOfModules(NULL)
24 , InductionGapThicknessOfModules(NULL)
31 Double_t xpos_station,
32 Double_t ypos_station,
33 Double_t zpos_station,
36 : StationNumber(iStation)
47 , XPosition(xpos_station)
48 , YPosition(ypos_station)
49 , ZPosition(zpos_station)
50 , XShiftOfModules(NULL)
51 , YShiftOfModules(NULL)
52 , ZShiftOfModules(NULL)
53 , DriftGapThicknessOfModules(NULL)
54 , FTransfGapThicknessOfModules(NULL)
55 , STransfGapThicknessOfModules(NULL)
56 , InductionGapThicknessOfModules(NULL)
57 , BeamHoleRadius(beamradius)
61 Bool_t create_status = CreateConfigurationFromXMLNode(stationNode);
64 <<
"Error: There are problems with creation of the configuration from XML node (in BmnGemStripStation)\n";
152 throw(
Station_Exception(
"Error in the function GetDriftGapThicknessOfModule()"));
161 throw(
Station_Exception(
"Error in the function GetFTransfGapThicknessOfModule()"));
170 throw(
Station_Exception(
"Error in the function GetSTransfGapThicknessOfModule()"));
179 throw(
Station_Exception(
"Error in the function GetInductionGapThicknessOfModule()"));
194 for (Int_t imodule = 0; imodule <
NModules; ++imodule) {
209 Int_t
module = GetPointModuleOwnership(xcoord, ycoord, zcoord);
213 if (
Modules[module]->AddRealPointFull(xcoord, ycoord, zcoord, px, py, pz, dEloss, refID)) {
225 Int_t points_sum = 0;
226 for (Int_t iModule = 0; iModule <
NModules; iModule++) {
234 for (Int_t iModule = 0; iModule <
NModules; iModule++) {
241 Int_t points_sum = 0;
242 for (Int_t iModule = 0; iModule <
NModules; iModule++) {
250 for (Int_t imodule = 0; imodule <
NModules; ++imodule) {
251 if (
Modules[imodule]->IsPointInsideModule(xcoord, ycoord, zcoord))
286Bool_t BmnGemStripStation::CreateConfigurationFromXMLNode(TXMLNode* node)
288 NModules = CountNumberOfModules(node);
313 node = node->GetChildren();
314 Int_t currentModuleNum = 0;
316 if (strcmp(node->GetNodeName(),
"Module") == 0) {
317 Bool_t parse_status = ParseModule(node, currentModuleNum);
322 node = node->GetNextNode();
328Int_t BmnGemStripStation::CountNumberOfModules(TXMLNode* node)
330 Int_t module_cnt = 0;
331 node = node->GetChildren();
333 if (strcmp(node->GetNodeName(),
"Module") == 0) {
336 node = node->GetNextNode();
341Bool_t BmnGemStripStation::ParseModule(TXMLNode* node, Int_t iModule)
346 if (node->HasAttributes()) {
347 TList* attrList = node->GetAttributes();
349 TIter next(attrList);
351 while ((attr = (TXMLAttr*)next()) !=
nullptr) {
352 if (strcmp(attr->GetName(),
"xShift") == 0) {
355 if (strcmp(attr->GetName(),
"yShift") == 0) {
358 if (strcmp(attr->GetName(),
"zShift") == 0) {
361 if (strcmp(attr->GetName(),
"driftDirection") == 0) {
362 if (strcmp(attr->GetValue(),
"forward") == 0) {
365 if (strcmp(attr->GetValue(),
"backward") == 0) {
370 if (strcmp(attr->GetName(),
"gap_drift_thick") == 0) {
373 if (strcmp(attr->GetName(),
"gap_ftransf_thick") == 0) {
376 if (strcmp(attr->GetName(),
"gap_stransf_thick") == 0) {
379 if (strcmp(attr->GetName(),
"gap_induct_thick") == 0) {
391 node = node->GetChildren();
392 Int_t currentLayerNum = 0;
394 if (strcmp(node->GetNodeName(),
"Layer") == 0) {
398 node = node->GetNextNode();
404BmnGemStripLayer BmnGemStripStation::ParseLayer(TXMLNode* node, Int_t iLayer, Int_t iModule)
410 Double_t xsize, ysize, xorig, yorig;
414 if (node->HasAttributes()) {
415 TList* attrList = node->GetAttributes();
417 TIter next(attrList);
419 while ((attr = (TXMLAttr*)next()) !=
nullptr) {
420 if (strcmp(attr->GetName(),
"zoneNumber") == 0) {
421 zone_number = atoi(attr->GetValue());
423 if (strcmp(attr->GetName(),
"type") == 0) {
424 if (strcmp(attr->GetValue(),
"lower") == 0) {
427 if (strcmp(attr->GetValue(),
"upper") == 0) {
431 if (strcmp(attr->GetName(),
"stripAngle") == 0) {
432 adeg = atof(attr->GetValue());
434 if (strcmp(attr->GetName(),
"pitch") == 0) {
435 pitch = atof(attr->GetValue());
437 if (strcmp(attr->GetName(),
"xorig") == 0) {
438 xorig = -atof(attr->GetValue());
440 if (strcmp(attr->GetName(),
"yorig") == 0) {
441 yorig = atof(attr->GetValue());
443 if (strcmp(attr->GetName(),
"xsize") == 0) {
444 xsize = atof(attr->GetValue());
446 if (strcmp(attr->GetName(),
"ysize") == 0) {
447 ysize = atof(attr->GetValue());
449 if (strcmp(attr->GetName(),
"stripDirection") == 0) {
450 if (strcmp(attr->GetValue(),
"LeftToRight") == 0) {
453 if (strcmp(attr->GetValue(),
"RightToLeft") == 0) {
457 if (strcmp(attr->GetName(),
"lborder") == 0) {
458 if (strcmp(attr->GetValue(),
"LeftTop") == 0) {
461 if (strcmp(attr->GetValue(),
"LeftBottom") == 0) {
465 if (strcmp(attr->GetName(),
"rborder") == 0) {
466 if (strcmp(attr->GetValue(),
"RightTop") == 0) {
469 if (strcmp(attr->GetValue(),
"RightBottom") == 0) {
479 layer.SetStripNumberingOrder(strip_direction);
480 layer.SetStripNumberingBorders(left_border, right_border);
483 node = node->GetChildren();
484 Int_t currentDeadZoneNum = 0;
486 if (strcmp(node->GetNodeName(),
"DeadZone") == 0) {
487 layer.AddDeadZone(ParseDeadZone(node, iModule));
488 currentDeadZoneNum++;
490 node = node->GetNextNode();
500 Int_t n_dead_points = CountDeadZonePoints(node);
501 Double_t* xpoints =
new Double_t[n_dead_points];
502 Double_t* ypoints =
new Double_t[n_dead_points];
505 node = node->GetChildren();
506 Int_t currentDeadPointNum = 0;
508 if (strcmp(node->GetNodeName(),
"DeadPoint") == 0) {
510 if (node->HasAttributes()) {
511 TList* attrList = node->GetAttributes();
513 TIter next(attrList);
515 while ((attr = (TXMLAttr*)next()) !=
nullptr) {
516 if (strcmp(attr->GetName(),
"x") == 0) {
517 xpoints[currentDeadPointNum] =
520 if (strcmp(attr->GetName(),
"y") == 0) {
526 currentDeadPointNum++;
528 node = node->GetNextNode();
531 dead_zone.
SetDeadZone(n_dead_points, xpoints, ypoints);
539Int_t BmnGemStripStation::CountDeadZonePoints(TXMLNode* node)
541 Int_t dead_point_cnt = 0;
542 node = node->GetChildren();
544 if (strcmp(node->GetNodeName(),
"DeadPoint") == 0) {
547 node = node->GetNextNode();
549 return dead_point_cnt;
void CalculateStripHitIntersectionPoints()
Double_t GetModuleThickness()
Int_t GetNIntersectionPoints()
Double_t GetZStartModulePosition()
void AddStripLayer(BmnGemStripLayer strip_layer)
Double_t * XShiftOfModules
Double_t * STransfGapThicknessOfModules
BmnGemStripModule ** Modules
Double_t * FTransfGapThicknessOfModules
Double_t GetDriftGapThicknessOfModule(Int_t module_num)
Double_t GetXShiftOfModule(Int_t module_num)
Double_t GetZShiftOfModule(Int_t module_num)
Int_t CountNProcessedPointInStation()
void ProcessPointsInStation()
BmnGemStripModule * GetModule(Int_t module_num)
Double_t * ZShiftOfModules
Double_t GetInductionGapThicknessOfModule(Int_t module_num)
Double_t GetSTransfGapThicknessOfModule(Int_t module_num)
Double_t * DriftGapThicknessOfModules
Double_t * YShiftOfModules
Double_t * InductionGapThicknessOfModules
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)
Int_t CountNAddedToStationPoints()
Int_t GetPointModuleOwnership(Double_t xcoord, Double_t ycoord, Double_t zcoord)
void DefineStationBorders()
Double_t GetFTransfGapThicknessOfModule(Int_t module_num)
Double_t GetYShiftOfModule(Int_t module_num)
virtual ~BmnGemStripStation()
Bool_t SetDeadZone(Int_t n_points, Double_t *xpoints, Double_t *ypoints)
ElectronDriftDirectionInModule