FairRoot/PandaRoot
PndSttGeometryMap.cxx
Go to the documentation of this file.
1 // PndSttGeometryMap
3 //
4 // integration between PndSttStrawMap class and
5 // /development/lia/stt/PndSttMapCreator functions to create
6 // a map of the STT and retrieve layerID, sectorID, neighboring
7 // tubes.
8 //
9 // This class is called directly inside PndSttMapCreator and
10 // fills the PndSttTube with the relevant information.
11 //
12 // The user does not need to call this class but can retrieve all
13 // the info in the PndSttTube obj after having filled the
14 // fTubeArray via the PndSttMapCreator.
15 //
16 // created: May 2013
17 // authors: L. Lavezzi (PndSttMapCreator
18 // in development branch - Nov 2012)
19 // M. Mertens (PndSttStrawMap - Apr 16, 2013)
20 // modified: Apr 2014 (S. Costanza)
21 //
23 
24 #include "PndSttGeometryMap.h"
25 #include "PndSttTubeParameters.h"
26 #include "PndSttTube.h"
27 #include "PndSttHit.h"
28 #include "PndGeoSttPar.h"
29 
30 #include "FairGeoNode.h"
31 #include "FairGeoTransform.h"
32 #include "FairGeoVector.h"
33 #include "FairGeoRotation.h"
34 #include "FairGeoTube.h"
35 #include "FairRun.h"
36 #include "FairHit.h"
37 
38 #include "TGeoTube.h"
39 #include "TVector3.h"
40 #include "TObjArray.h"
41 #include "TString.h"
42 #include "TGeoVolume.h"
43 #include "TGeoTube.h"
44 #include "TClonesArray.h"
45 #include "TGeoManager.h"
46 #include "TGeoVolume.h"
47 #include "TList.h"
48 
49 #include <iostream>
50 
51 using namespace std;
52 
53 PndSttGeometryMap::PndSttGeometryMap() : fGeoType(-1), fVerbose(0), fTubeArray(0) {}
54 
55 
56 PndSttGeometryMap::PndSttGeometryMap(TClonesArray *tubearray, Int_t geoType) : fGeoType(geoType), fVerbose(0), fTubeArray(tubearray) {
57  if(fGeoType != 1) cout << "ERROR PndSttGeometryMap: fGeoType " << fGeoType << " not supported" << endl;
60 }
61 
63 
64 // ========================================================================
65 // ********************* "INTERFACE" FUNCTIONS ****************************
68 }
69 
71  if(fGeoType == 1) GenerateStrawMapGeoType1(map);
72 }
73 
75  if(fGeoType == 1) return FillGeometryParametersGeoType1();
76  else return kFALSE;
77 }
78 
79 // ************************ GEO TYPE 1 SPECIFIC ***************************
80 // ========================================================================
81 // development PndSttMapCreator
82 void PndSttGeometryMap::SetGeneralParametersGeoType1() { // CHECK whether it depends on geometry or not
83 
84  // fNLayers = 18;
85  // fNSectors = 6;
86  // const int size = 18* 6; // CHECK
87 
88  fNLayers = 26;
89  fNSectors = 6;
90  //const int size = 26* 6; // CHECK //[R.K. 01/2017] unused variable?
91 
92 
96  fNTubes_skewed = 1744;
98 
100  fNLayers_skew = 8;
103 
104 }
105 
107 
108  for (int itube = 1; itube < fTubeArray->GetEntriesFast(); itube++) {
109  PndSttTube* tube = (PndSttTube*) fTubeArray->At(itube);
110  tube->SetLayerLimitFlag(IsEdgeStraw(itube));
112 
113  bool found = true;
114  tube->SetNeighborings(FindNeighborings(tube));
115  if(!found) cout << "ERROR IN FINDIN NEIGHBORING " << endl;
116  }
117  return kTRUE;
118 }
119 
121  double tolerance0 = 1.2; // parallel/parallel && inner parallel/skew
122  double tolerance1 = 1.3; // skew/skew
123  double tolerance2 = 1.5;; // outer parallel/skew
124  double tolerance = 1.5; // CHECK tolerance
125 
126  TArrayI neighboring;
127 
128  int isector = tube->GetSectorID();
129  int ilayer = tube->GetLayerID();
130  // cout << "LAYER/SECTOR " << ilayer << " " << isector << endl;
131 
132  // possible lay/sec to check:
133  // same layer/same sector, before, after
134  // layer up/same sector, before, after
135  // layer down/same sector, before, after
136  int possible_lay_sec[9][2] = { { ilayer, isector }, { ilayer, isector + 1 }, { ilayer, isector - 1 }, { ilayer + 1, isector },
137  { ilayer + 1, isector + 1 }, { ilayer + 1, isector - 1 }, { ilayer - 1, isector },
138  { ilayer - 1, isector + 1 }, { ilayer - 1, isector - 1 } };
139 
140  std::vector<int> neigh_candidates;
141  for (int itest = 0; itest < 9; itest++) {
142 
143  PndSttTube *tube2 = NULL;
144  int tubeid = -1;
145  // cout << "is " << possible_lay_sec[itest][0] << " " << possible_lay_sec[itest][1] << "good?" << endl;
146  // check it is an existing layer/sec
147  if (possible_lay_sec[itest][0] < 0 || possible_lay_sec[itest][0] >= fNLayers)
148  continue;
149  if (possible_lay_sec[itest][1] < 0 || possible_lay_sec[itest][1] >= fNSectors)
150  continue;
151  // skip che pipe
152  if ((isector == 0 && possible_lay_sec[itest][1] == 5)
153  || (isector == 5 && possible_lay_sec[itest][1] == 0)
154  || (isector == 2 && possible_lay_sec[itest][1] == 3)
155  || (isector == 3 && possible_lay_sec[itest][1] == 2))
156  continue;
157  // if not @ limit of the sector
158  // if (tube->IsSectorLimit() == kFALSE && (possible_lay_sec[itest][1] == isector + 1 || possible_lay_sec[itest][1] == isector - 1))
159  // continue;
160 
161  // cout << "CHECKING " << possible_lay_sec[itest][0] << " " << possible_lay_sec[itest][1] << endl;
162  neigh_candidates = GetStrawRow(possible_lay_sec[itest][1], possible_lay_sec[itest][0]);
163 
164  for (size_t itube = 0; itube < neigh_candidates.size(); itube++) {
165  tubeid = neigh_candidates.at(itube);
166  if (tube->GetTubeID() == tubeid)
167  continue;
168  if (tubeid != -1)
169  tube2 = (PndSttTube*) fTubeArray->At(tubeid);
170  double distance = 1000;
171  if (tube2) distance = tube->GetDistance(tube2);
172  // pick the correct tolerance
173  if (tube2->IsSkew() == kTRUE && tube->IsSkew() == kTRUE)
174  tolerance = tolerance1;
175  else if (tube2->IsParallel() == kTRUE && tube->IsParallel() == kTRUE)
176  tolerance = tolerance0;
177  else {
178  if (ilayer < fNLayers_inner_parallel + 3)
179  tolerance = tolerance1;
180  else
181  tolerance = tolerance2;
182  }
183  if (distance < tolerance) {
184  int size = neighboring.GetSize();
185  neighboring.Set(size + 1);
186  neighboring.AddAt(tubeid, size);
187  // cout << "ADD " << tubeid << " " << distance << endl;
188  }
189  }
190  }
191  return neighboring;
192 }
193 
195 
196  PndSttTube* tube = (PndSttTube*) fTubeArray->At(tubeId);
197  return FindNeighborings(tube);
198 }
199 
200 double PndSttGeometryMap::GetAngleBetweenTubes(int tubeID1, int tubeID2) const {
201 
202  PndSttTube *tube1, *tube2;
203  tube1 = (PndSttTube*) fTubeArray->At(tubeID1);
204  tube2 = (PndSttTube*) fTubeArray->At(tubeID2);
205 
206  TVector3 pos1, pos2, direction;
207  pos1 = tube1->GetPosition();
208  pos2 = tube2->GetPosition();
209 
210  direction = pos2 - pos1;
211 
212  double phi = direction.Phi();
213  if (phi < 0)
214  phi = 2 * TMath::Pi() + phi;
215 
216  return phi;
217 }
218 
219 bool PndSttGeometryMap::InStraightLine(int tube1, int tube2, int tube3) const {
220 
221  double diff = abs(
222  GetAngleBetweenTubes(tube1, tube2)
223  - GetAngleBetweenTubes(tube1, tube3));
224 
225  //accept a deviation of 1 percent
226  //if ((TMath::Pi() * 0.99) < diff & diff < (TMath::Pi() * 1.01)) {
227  if (((TMath::Pi() * 0.99) < diff) && (diff < (TMath::Pi() * 1.01))) { //[R.K. 01/2017] more explicit parenthesis logic
228  //tube1 is in the middle
229  return true;
230  } else if (diff < 0.01) {
231  //tube1 is at the edge of the line
232  return true;
233  } else
234  return false;
235 }
236 
238 {
239  for (int i = 1; i < fNTubes+1; i++){
241  }
242 }
243 
245 {
246  if (fStrawNeighbors.size() == 0)
248  return fStrawNeighbors[tubeId];
249 }
250 
251 
253 {
254  TVector3 p1(hit1->GetX(), hit1->GetY(), hit1->GetZ());
255  TVector3 p2(hit2->GetX(), hit2->GetY(), hit2->GetZ());
256 
257 
258  PndSttTube* tube1 = (PndSttTube*)fTubeArray->At(hit1->GetTubeID());
259  PndSttTube* tube2 = (PndSttTube*)fTubeArray->At(hit2->GetTubeID());
260 
261  TVector3 u1(tube1->GetWireDirection());
262  TVector3 u2(tube2->GetWireDirection());
263 
264  if (fVerbose > 1) {
265  std::cout << "PndSttGeometryMap::CalculateStrawPoca Hit1 center: (" << hit1->GetX() << "/" << hit1->GetY() << "/" << hit1->GetZ()
266  << ") Dir: (" << u1.x() << "/" << u1.y() << "/" << u1.z() << ") HL: " << tube1->GetHalfLength() << std::endl;
267 
268  std::cout << "PndSttGeometryMap::CalculateStrawPoca Hit2 center: (" << hit2->GetX() << "/" << hit2->GetY() << "/" << hit2->GetZ()
269  << ") Dir: (" << u2.x() << "/" << u2.y() << "/" << u2.z() << ") HL: " << tube2->GetHalfLength() << std::endl;
270  }
271  TVector3 p21 = p2 - p1;
272  if (p21.Mag() < 0.000001) {
273  poca = p1;
274  if (fVerbose > 1) std::cout << "Poca: " << poca.x() << "/" << poca.y() << "/" << poca.z() << std::endl;
275  return 0;
276  }
277 // p21.Print();
278  TVector3 m = u2.Cross(u1);
279  if (m.Mag() < 0.000001) {
280  poca = p1 + 0.5*p21;
281  if (fVerbose > 1) std::cout << "Poca: " << poca.x() << "/" << poca.y() << "/" << poca.z() << std::endl;
282  return p21.Mag();
283  }
284 // m.Print();
285  TVector3 mnorm = (1.0/m.Mag2())*m;
286  TVector3 r = p21.Cross(mnorm);
287  Double_t t1 = r.Dot(u2);
288  Double_t t2 = r.Dot(u1);
289 
290  if (t1 > tube1->GetHalfLength()){
291  t1 = tube1->GetHalfLength();
292  } else if (t1 < (-1)*tube1->GetHalfLength()) {
293  t1 = (-1)*tube1->GetHalfLength();
294  }
295 
296  if (t2 > tube2->GetHalfLength()){
297  t2 = tube2->GetHalfLength();
298  } else if (t2 < (-1)*tube2->GetHalfLength()) {
299  t2 = (-1)*tube1->GetHalfLength();
300  }
301 
302  TVector3 q1 = p1+t1*u1;
303  TVector3 q2 = p2+t2*u2;
304  TVector3 q21 = q2 - q1;
305  poca = q1 + 0.5*q21;
306 
307  if (fVerbose > 1) std::cout << "q1: " << q1.x() << "/" << q1.y() << "/" << q1.z() << " t1: " << t1 << std::endl;
308  if (fVerbose > 1) std::cout << "q2: " << q2.x() << "/" << q2.y() << "/" << q2.z() << " t2: " << t2 << std::endl;
309 
310  if (fVerbose > 1) std::cout << "Poca: " << poca.x() << "/" << poca.y() << "/" << poca.z() << std::endl;
311 // cout << "Crosspoints: " << endl;
312 // q1.Print();
313 // q2.Print();
314 // cout << "Poca: " << endl;
315 // poca.Print();
316 // return (TMath::Abs(p21.Dot(m))/m.Mag());
317 
318  return (TMath::Abs(p21.Dot(m))/m.Mag());
319 }
320 
321 
322 
323 
324 
326  if(map == 0) GenerateStrawMapTubeIDGeoType1();
327  else if(map == 1) GenerateStrawMapAngleGeoType1();
328 }
329 
330 // ========================================================================
331 // PndSttStrawMap class functions
333 {
334  fSectorStart.push_back(1.57);
335  fSectorEnd.push_back(2.62);
336  fSectorStart.push_back(2.62);
337  fSectorEnd.push_back(-2.62+2*TMath::Pi());
338  fSectorStart.push_back(-2.62+2*TMath::Pi());
339  fSectorEnd.push_back(-1.57+2*TMath::Pi());
340  fSectorStart.push_back(-1.57+2*TMath::Pi());
341  fSectorEnd.push_back(-0.52+2*TMath::Pi());
342  fSectorStart.push_back(-0.52+2*TMath::Pi());
343  fSectorEnd.push_back(0.52);
344  fSectorStart.push_back(0.52);
345  fSectorEnd.push_back(1.57);
346 }
347 
349 {
350  GenerateAngles();
351 
352  vector<int> currentRow;
353  int sector = 0;
354  int lastsector = 0;
355  int row = 0;
356  fSectorOfStraw.push_back(-1);
357  fLayerOfStraw.push_back(-1);
358  fAxialStraw.push_back(false);
359  if(fVerbose > 0) cout << "Generating straw map for " << fTubeArray->GetEntriesFast() << " straws." << endl;
360  for (int i = 1; i < fTubeArray->GetEntriesFast(); i++) {
361  if(fVerbose > 0) cout << "Finding tube." << endl;
362  PndSttTube* tube = (PndSttTube*) fTubeArray->At(i);
363  if(fVerbose > 0) cout << "Tube address: " << tube << endl;
364  bool isaxial = (tube->GetWireDirection().Theta() < 0.001);
365  if(fVerbose > 0) {
366  cout << "Axial Straw: " << isaxial << endl;
367  cout << "Wire Direction: ";
368  tube->GetWireDirection().Print();
369  }
370  double phi = tube->GetPosition().Phi();
371  if(fVerbose > 0) cout << "Phi: " << phi << endl;
372  if (phi < 0) phi += 2*TMath::Pi();
373  if(fVerbose > 0) cout << "Checking sector." << endl;
374  while ( !( (phi > fSectorStart.at(sector)) && (phi < fSectorEnd.at(sector)) )
375  && !( (sector == 4) && ( (phi > fSectorStart.at(4)) || (phi < fSectorEnd.at(4)) ) ) ) {
376  sector++;
377  sector %= 6;
378  }
379  if (sector != lastsector) {
380  fStrawIndex[lastsector].push_back(currentRow);
381  currentRow.clear();
382  if(fVerbose > 0) cout << "SECTOR COMPLETE: Row " << row << " added to sector " << lastsector << endl;
383  }
384  if (sector < lastsector) row++;
385  lastsector = sector;
386  currentRow.push_back(i);
387  fSectorOfStraw.push_back(sector);
388  fLayerOfStraw.push_back(row);
389  fAxialStraw.push_back(isaxial);
390  if(fVerbose > 0) cout << "Straw " << i << " added to " << sector << ", " << row << endl;
391 
392  tube->SetLayerID(row);
393  tube->SetSectorID(sector);
394 
395 
396  }
397  fStrawIndex[lastsector].push_back(currentRow);
398  if(fVerbose > 0) cout << "STT COMPLETE. SECTOR COMPLETE: Row " << row << " added to sector " << lastsector << endl;
399 
400  fStartTube = (int**) malloc(sizeof(int*) * fNSectors);
401  fEndTube = (int**) malloc(sizeof(int*) * fNSectors);
402  fShift = (int**) malloc(sizeof(int*) * fNSectors);
403  fShiftSkew = (int**) malloc(sizeof(int*) * fNSectors);
404  for(int i = 0; i < fNSectors; i++) {
405  fStartTube[i] = (int*) malloc(sizeof(int*) * fNLayers);
406  fEndTube[i] = (int*) malloc(sizeof(int*) * fNLayers);
407  fShift[i] = (int*) malloc(sizeof(int*) * fNLayers);
408  fShiftSkew[i] = (int*) malloc(sizeof(int*) * fNLayers);
409  }
410 
411  const int size = 26* 6; // fNLayers * fNSectors
412  int shift_list[size] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 7, 11, 16,
413  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 5, 7, 10, 14, 19,
414  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 5, 7, 10, 14, 19,
415  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 7, 11, 16,
416  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 5, 7, 10, 14, 19,
417  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 5, 7, 10, 14, 19};
418  const int sizeskew = 8*6; //fNLayers_skew * fNSectors;
419  int shift_list_skew[sizeskew] = {16, 19, 16, 16, 19, 16,
420  17, 20, 17, 17, 20, 17,
421  19, 21, 19, 19, 21, 19,
422  20, 22, 20, 20, 22, 20,
423  21, 24, 21, 21, 24, 21,
424  22, 25, 22, 22, 25, 22,
425  24, 26, 24, 24, 26, 24,
426  25, 27, 25, 25, 27, 25};
427 
428  int counter = 0;
429  for(int i = 0; i < fNSectors; i++) {
430  for(int j = 0; j < fNLayers; j++) {
431  fStartTube[i][j] = GetStrawRow(i,j).front();
432  fEndTube[i][j] = GetStrawRow(i,j).back();
433  fShift[i][j] = shift_list[counter];
434  if (j<8 || j>15)
435  fShiftSkew[i][j] = 0;
436  else
437  fShiftSkew[i][j] = shift_list_skew[(j-8)*6+i];
438  counter++;
439  }
440  }
441 
442  if(fVerbose > 0) {
443  // =============== PRINT
444  for(int irow = 0; irow < fNSectors; irow++) {
445  for(int icol = 0; icol < fNLayers; icol++) {
446  cout << " " << fStartTube[irow][icol];
447  }
448  cout << endl;
449  }
450  cout << endl;
451  for(int irow = 0; irow < fNSectors; irow++) {
452  for(int icol = 0; icol < fNLayers; icol++) {
453  cout << " " << fEndTube[irow][icol];
454  }
455  cout << endl;
456  }
457  cout << endl;
458  for(int irow = 0; irow < fNSectors; irow++) {
459  for(int icol = 0; icol < fNLayers; icol++) {
460  cout << " " << fShift[irow][icol];
461  }
462  cout << endl;
463  }
464  cout << endl;
465  }
466 
467  fStrawMapInitialized = true;
468 }
469 
470 bool PndSttGeometryMap::IsEdgeStraw(int strawindex) const
471 {
472  if (GetRow(strawindex) == 0) return true;
473  int endstraw = 0; //there is no straw index 0
474  switch (GetSector(strawindex)) {
475  case 0: endstraw = GetStrawRow(GetSector(strawindex), GetRow(strawindex)).front();
476  break;
477  case 2: endstraw = GetStrawRow(GetSector(strawindex), GetRow(strawindex)).back();
478  break;
479  case 3: endstraw = GetStrawRow(GetSector(strawindex), GetRow(strawindex)).front();
480  break;
481  case 5: endstraw = GetStrawRow(GetSector(strawindex), GetRow(strawindex)).back();
482  break;
483  default: return false;
484  };
485  return (strawindex == endstraw);
486 }
487 
488 int PndSttGeometryMap::IsSectorBorderStraw(int strawindex) const
489 {
490  PndSttTube* tube = (PndSttTube*) fTubeArray->At(strawindex);
491  if (tube->IsParallel()) {
492  int endstrawcw = GetStrawRow(GetSector(strawindex), GetRow(strawindex)).front();
493  int endstrawccw = GetStrawRow(GetSector(strawindex), GetRow(strawindex)).back();
494  if (strawindex == endstrawcw) return -1;
495  if (strawindex == endstrawccw) return 1;
496  return 0;
497  }
498  else {
499  int endstrawcw = GetStrawRow(GetSector(strawindex), GetRow(strawindex)).front();
500  int endstrawscw = endstrawcw + fShiftSkew[GetSector(strawindex)][GetRow(strawindex)];
501  int endstrawccw = endstrawscw -1;
502  if (tube->GetHalfLength()==75) {
503  if (strawindex == endstrawcw) return -1;
504  if (strawindex == endstrawccw) return 1;
505  return 0;
506  }
507  else {
508  if (strawindex==endstrawccw+1 || strawindex==endstrawccw+3 || strawindex==endstrawccw+5 ||
509  strawindex==endstrawccw+7 || strawindex==endstrawccw+9 || strawindex==endstrawccw+11 ||
510  strawindex==endstrawccw+13 || strawindex==endstrawccw+15)
511  return 1;
512  else if (strawindex==endstrawscw +1 || strawindex==endstrawscw+3 || strawindex==endstrawscw+5 ||
513  strawindex==endstrawscw+7 || strawindex==endstrawscw+9 || strawindex==endstrawscw+11 ||
514  strawindex==endstrawscw+13 || strawindex==endstrawscw+15)
515  return -1;
516  }
517  }
518  return -1000;
519 }
520 
521 bool PndSttGeometryMap::IsAxialRow(int rowindex) const
522 {
523  //only works if all straws in one row are of the same type
524  //which is the case for the current geometry
525  return IsAxialStraw(GetStrawRow(0, rowindex).at(0));
526 }
527 
528 bool PndSttGeometryMap::IsSkewedRow(int rowindex) const
529 {
530  //only works if all straws in one row are of the same type
531  //which is the case for the current geometry
532  return IsSkewedStraw(GetStrawRow(0, rowindex).at(0));
533 }
534 
535 
536 // ========================================================================
537 // Mixed functions
539 {
540  vector<int> currentRow;
541  int isector = 0, ilayer = 0;
542  int lastsector = 0;
543  fSectorOfStraw.push_back(-1);
544  fLayerOfStraw.push_back(-1);
545 
546  if(fVerbose > 0) cout << "Generating straw map for " << fTubeArray->GetEntriesFast() << " straws." << endl;
547  for (int itube = 1; itube < fTubeArray->GetEntriesFast(); itube++) {
548  if(fVerbose > 0) cout << "Finding tube." << endl;
549  PndSttTube* tube = (PndSttTube*) fTubeArray->At(itube);
550  bool isaxial = (tube->GetWireDirection().Theta() < 0.001);
551  if(fVerbose > 0) {
552  cout << "Axial Straw: " << isaxial << endl;
553  cout << "Wire Direction: ";
554  tube->GetWireDirection().Print();
555  }
556 
557  while(!(itube >= fStartTube[0][ilayer] && itube <= fEndTube[5][ilayer])) {
558  ilayer++;
559  isector = 0;
560  }
561 
562  while(!(itube >= fStartTube[isector][ilayer] && itube <= fEndTube[isector][ilayer])) {
563  isector++;
564  isector %= 6;
565  }
566 
567  if (isector != lastsector) {
568  fStrawIndex[lastsector].push_back(currentRow);
569  currentRow.clear();
570  if(fVerbose > 0) cout << "SECTOR COMPLETE: Row " << ilayer << " added to sector " << lastsector << endl;
571  }
572  // if (isector < lastsector) ilayer++;
573  lastsector = isector;
574  currentRow.push_back(itube);
575  fSectorOfStraw.push_back(isector);
576  fLayerOfStraw.push_back(ilayer);
577 
578  tube->SetLayerID(ilayer);
579  tube->SetSectorID(isector);
580 
581  if(fVerbose > 0) cout << "Straw " << itube << " added to " << isector << ", " << ilayer << endl;
582  }
583  fStrawIndex[lastsector].push_back(currentRow);
584  if(fVerbose > 0) cout << "SECTOR COMPLETE: Row " << ilayer << " added to sector " << lastsector << endl;
585 
586 }
587 
int row
Definition: anaLmdDigi.C:67
void SetSectorID(int id)
Definition: PndSttTube.cxx:117
int fVerbose
Definition: poormantracks.C:24
Int_t t1
Definition: hist-t7.C:106
const vector< int > & GetStrawRow(int sector, int row) const
map< int, vector< vector< int > > > fStrawIndex
vector< int > fLayerOfStraw
double r
Definition: RiemannTest.C:14
Int_t i
Definition: run_full.C:25
__m128 m
Definition: P4_F32vec4.h:28
Double_t GetHalfLength()
Definition: PndSttTube.cxx:99
void SetLayerLimitFlag(Bool_t flag=kTRUE)
Definition: PndSttTube.h:62
PndTransMap * map
Definition: sim_emc_apd.C:99
bool IsAxialStraw(int strawindex) const
map< int, TArrayI > fStrawNeighbors
TClonesArray * fTubeArray
bool IsEdgeStraw(int strawindex) const
void SetSectorLimitFlag(Int_t flag)
Definition: PndSttTube.h:61
Double_t GetDistance(PndSttTube *tube)
Definition: PndSttTube.cxx:153
bool InStraightLine(int tube1, int tube2, int tube3) const
void GenerateStrawMap(Int_t map)
void SetNeighborings(TArrayI neighborings)
Definition: PndSttTube.cxx:133
int GetLayerID()
Definition: PndSttTube.cxx:128
static T Abs(const T &x)
Definition: PndCAMath.h:39
vector< int > fSectorOfStraw
int IsSectorBorderStraw(int strawindex) const
Int_t GetTubeID()
Definition: PndSttTube.cxx:103
int counter
Definition: ZeeAnalysis.C:59
Double_t CalculateStrawPoca(PndSttHit *hit1, PndSttHit *hit2, TVector3 &poca)
Double_t
vector< double > fSectorStart
TVector3 GetPosition()
Definition: PndSttTube.cxx:87
bool IsSkewedStraw(int strawindex) const
Int_t GetTubeID() const
Definition: PndSttHit.h:75
bool IsAxialRow(int rowindex) const
TPad * p2
Definition: hist-t7.C:117
int GetRow(int strawindex) const
Int_t t2
Definition: hist-t7.C:106
int GetSector(int strawindex) const
double GetAngleBetweenTubes(int tubeID1, int tubeID2) const
void GenerateStrawMapGeoType1(Int_t map)
ClassImp(PndAnaContFact)
TPad * p1
Definition: hist-t7.C:116
vector< double > fSectorEnd
Bool_t FillGeometryParametersGeoType1()
bool IsParallel()
Definition: PndSttTube.h:66
Double_t Pi
int GetSectorID()
Definition: PndSttTube.cxx:124
TArrayI FindNeighborings(PndSttTube *tube)
TVector3 GetWireDirection()
Definition: PndSttTube.cxx:107
void SetLayerID(int id)
Definition: PndSttTube.cxx:120
bool IsSkewedRow(int rowindex) const
bool IsSkew()
Definition: PndSttTube.h:70
TArrayI GetNeighboringsByMap(int tubeId)
vector< bool > fAxialStraw