StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
sector.C
1 void sector()
2 {
3  TVolume *hall = (TVolume *)chain->DataSet("HALL");
4  TVolume *sector = (TVolume *)hall->FindByName("TPSS");
5  TList *pos = sector->GetListOfPositions();
6  TVolumePosition *padPos = 0;
7  Int_t i = 0;
8  TIter next(pos);
9  Bool_t outter = kFALSE;
10  while (padPos = (TVolumePosition *)next() ) {
11  Int_t padRowNumber = padPos->GetId();
12  if (padRowNumber <= 39 && ((padRowNumber %3)-2) ) continue;
13  if (padRowNumber <= 39) {
14  padRowNumber /= 3;
15  padRowNumber++;
16  }
17  else {
18  if (!outter) {cout << "outter sectors:" << endl; outter = kTRUE;}
19  padRowNumber -= 39-13;
20  }
21  cout << padRowNumber << ". x = " << padPos->GetX()<< endl;
22  }
23 }
virtual TDataSet * FindByName(const char *name, const char *path="", Option_t *opt="") const
Definition: TDataSet.cxx:378