ChannelMapStandardAlg.cxx
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 /// \file ChannelMapStandardAlg.cxx
3 /// \brief Interface to algorithm class for the standard, simplest detector channel mapping
4 ///
5 /// \version $Id: $
6 /// \author brebel@fnal.gov, trj@fnal.gov
7 ////////////////////////////////////////////////////////////////////////
8 
10 #include "TMath.h"
12 
13 namespace gar {
14  namespace geo{
15  namespace seg {
16 
17  //----------------------------------------------------------------------------
19  {
20  }
21 
22  //----------------------------------------------------------------------------
23 
25  {
26  // start over:
27  Uninitialize();
28 
29  fGeo = &geo;
30 
32 
33  //std::string driftvolname = geo.GetGArTPCVolumeName();
34 
35  fTPCCenter.x = geo.TPCXCent();
36  fTPCCenter.y = geo.TPCYCent();
37  fTPCCenter.z = geo.TPCZCent();
38 
39  std::cout << "Initializing TPC channel standard map alg with TPC Center: " << fTPCCenter.x << " " << fTPCCenter.y << " " << fTPCCenter.z << std::endl;
40 
41  // get these from the geometry?
42  // all dimensions are in cm
43 
44  fNumSectors = 18;
45  fSectorOffsetAngleDeg = 10.0;
46  fPhiSectorWidth = 2.0*TMath::Pi()/fNumSectors;
55 
61 
62  // old hardcoded numbers
63  //fOROCOuterRadius = 246.6;
64  //fOROCInnerRadius = 134.6;
65  //fIROCOuterRadius = 132.1;
66 
67  fGapChannelNumber = 10000000;
68 
69  fCenterPadWidth = 0.6;
70  fXPlaneLoc = geo.TPCLength()/2.0;
71  //std::cout << "Plane loc from geometry service " << fXPlaneLoc << std::endl;
72  //float TsectorH = TMath::Tan(TMath::DegToRad()*(360/(fNumSectors*2)));
73 
74  // count up channels
75  // get the xyz center for each pixel and fill pad row information -- nominal geometry, negative x side
76 
77 
78  for (UInt_t isector = 0; isector < fNumSectors; ++isector)
79  {
80  UInt_t ipadacc=0;
81 
82  // Inner Readout Chamber
83 
84  for (UInt_t irow = 0; irow < fNumPadRowsIROC; ++irow)
85  {
86  UInt_t numpads = fROC->GetNPads(isector,irow);
87  if (isector == 0)
88  {
89  fNumPadsPerRow.push_back(numpads);
90  fFirstPadInRow.push_back(ipadacc);
91  }
92  for (UInt_t ipad = 0; ipad < numpads; ++ipad)
93  {
94  Float_t pos[3];
95  fROC->GetPositionGlobal(isector,irow,ipad,pos);
96  pos[2] = pos[0];
97  pos[0] = -fXPlaneLoc;
98  fPixelCenters.emplace_back(pos[0]+fTPCCenter.x,pos[1]+fTPCCenter.y,pos[2]+fTPCCenter.z);
99  ipadacc++;
100  }
101  }
102 
103  // Outer readout chamber
104 
105  for (UInt_t irow = 0; irow < fNumPadRowsOROCI + fNumPadRowsOROCO; ++irow)
106  {
107 
108  UInt_t numpads = fROC->GetNPads(isector + 36,irow);
109  if (isector == 0)
110  {
111  fNumPadsPerRow.push_back(numpads);
112  fFirstPadInRow.push_back(ipadacc);
113  }
114  for (UInt_t ipad = 0; ipad < numpads; ++ipad)
115  {
116  Float_t pos[3];
117  fROC->GetPositionGlobal(isector + 36,irow,ipad,pos);
118  pos[2] = pos[0];
119  pos[0] = -fXPlaneLoc;
120  fPixelCenters.emplace_back(pos[0]+fTPCCenter.x,pos[1]+fTPCCenter.y,pos[2]+fTPCCenter.z);
121  ipadacc++;
122  }
123  if (isector == 0) fNumChansPerSector = ipadacc;
124  }
125  } // end of loop over sectors
126 
127  // fill in the hole with a rectangular grid of pixels. Make x,y,z=0 a pad corner. Put pads under the cover electrode for now
128 
129  fNumChansCenter = 0;
130  float rcenter = fIROCInnerRadius - 2.0;
131  UInt_t nrowscenter = 2*TMath::Floor(rcenter/fCenterPadWidth);
132  for (UInt_t irow = 0; irow < nrowscenter; ++irow)
133  {
134  float yloc = ( (float) irow - (float) nrowscenter/2 + 0.5 )*fCenterPadWidth;
135  UInt_t numpads = 2*TMath::Floor( TMath::Sqrt(rcenter*rcenter - yloc*yloc)/fCenterPadWidth );
136  fCenterNumPadsPerRow.push_back(numpads);
138  float zloc = 0;
139  for (UInt_t ipad = 0; ipad < numpads; ++ipad)
140  {
141  zloc = ( (float) ipad - (float) numpads/2 + 0.5 )*fCenterPadWidth;
142  XYZPos pixpos(-fXPlaneLoc+fTPCCenter.x,yloc+fTPCCenter.y,zloc+fTPCCenter.z);
143  fPixelCenters.push_back(pixpos);
144  fNumChansCenter++;
145  }
146  }
147 
148  //done with all channels on one side
149 
150  UInt_t numpixside = fPixelCenters.size();
151 
152  // duplicate the yz geometry for the opposite side -- positive x
153 
154  for (UInt_t ipix = 0; ipix < numpixside; ++ipix)
155  {
156  XYZPos pixpos(fXPlaneLoc+fTPCCenter.x,fPixelCenters[ipix].y,fPixelCenters[ipix].z);
157  fPixelCenters.push_back(pixpos);
158  //std::cout << "trjpix " << fPixelCenters[ipix].z << " " << fPixelCenters[ipix].y << std::endl;
159  }
160 
161 
162  MF_LOG_DEBUG("ChannelMapStandardAlg")
163  << "There are "
164  << fPixelCenters.size()
165  << " pixels and each sector has "
166  << fNumPadsPerRow.size()
167  << " pad rows";
168 
169  CheckPositions();
170 
171  return;
172  }
173 
174  //----------------------------------------------------------------------------
176  {
177  fROC = 0;
178  }
179 
181  {
182  std::cout << "gar::ChannelMapStandardAlg::CheckPositions -- checking positions" << std::endl;
183 
184  UInt_t numchans = Nchannels();
185  float xyz[3] = {0, 0, 0};
186 
187  for (UInt_t ichan = 0; ichan < numchans; ++ichan)
188  {
189 
190  ChannelToPosition(ichan, xyz);
191  // if we are in just one drift volume, check only the postiive X channels
192  if (xyz[0] < fGeo->TPCXCent() && fGeo->TPCNumDriftVols() == 1) continue;
193 
194  UInt_t chancheck = NearestChannel(xyz);
195  if (chancheck != ichan)
196  {
197  std::cout << "gar::ChannelMapStandardAlg::CheckPositions mismatch, input chan, xyz, output chan " << ichan << " "
198  << xyz[0] << " " << xyz[1] << " " << xyz[2] << " " << chancheck << std::endl;
199  }
200 
201  //if (ichan == 30000 || ichan == 100000 || ichan == 230000 || ichan == 13 || ichan == 3001 || ichan == 6001 || ichan == 309000)
202  //{
203  //std::cout << "trjc " << ichan << " " << xyz[1] << " " << xyz[2] << std::endl;
204  //float varxyz[3] = {0,0,0};
205  //for (float dy=-2.0; dy<2.0; dy += 0.01)
206  // {
207  // varxyz[1] = xyz[1] + dy;
208  // for (float dz=-2.0; dz<2.0; dz += 0.01)
209  // {
210  // varxyz[2] = xyz[2] + dz;
211  // UInt_t chancheck2 = NearestChannel(varxyz);
212  // if (chancheck2 == ichan)
213  // {
214  // std::cout << "trjc " << ichan << " " << varxyz[1] << " " << varxyz[2] << std::endl;
215  // }
216  // }
217  // }
218  //}
219 
220  }
221 
222  std::cout << "gar::ChannelMapStandardAlg::CheckPositions -- done checking positions" << std::endl;
223  }
224 
225  //----------------------------------------------------------------------------
226  unsigned int ChannelMapStandardAlg::Nchannels() const
227  {
228  return (fPixelCenters.size());
229  }
230 
231  //----------------------------------------------------------------------------
232  // wrapper for backward compatibility -- versiont that does not return the roctype.
233 
234  unsigned int ChannelMapStandardAlg::NearestChannel(float const* xyz) const
235  {
236  gar::geo::ROCType roctype = HFILLER;
237  unsigned int nearestchannel;
238  NearestChannelWithROCType(xyz, roctype, nearestchannel);
239  return nearestchannel;
240  }
241 
242  //----------------------------------------------------------------------------
243  void ChannelMapStandardAlg::NearestChannelWithROCType(float const *xyz_input, gar::geo::ROCType &roctype, unsigned int &nearestchannel) const
244  {
245  roctype = HFILLER;
246 
247  float xyz[3] = {xyz_input[0] - fTPCCenter.x, xyz_input[1] - fTPCCenter.y, xyz_input[2] - fTPCCenter.z};
248 
249  // so far the calculations are formulaic lookups not relying on fPixelCenters. So
250  UInt_t ichan=fGapChannelNumber; // 10 million is the flag channel for no channel at this point
251 
252  float phi = TMath::ATan2(xyz[1],xyz[2]);
253  if (phi<0) phi += 2.0*TMath::Pi();
254  float phisc = phi/( fPhiSectorWidth );
255  UInt_t isector = TMath::Floor(phisc); // assumes the sector boundary is at phi=0 // goes from 0 to 17
256 
257  // rotate this back down to a single sector
258 
259  float rotang = TMath::DegToRad()*( isector*360/fNumSectors + fSectorOffsetAngleDeg );
260  float crot = TMath::Cos(rotang);
261  float srot = TMath::Sin(rotang);
262  float zrot = xyz[2]*crot + xyz[1]*srot;
263  float yrot = - xyz[2]*srot + xyz[1]*crot;
264 
265 
266  //std::cout << "zrot, yrot, isector: " << zrot << " " << yrot << " " << isector << std::endl;
267  if (zrot>fIROCInnerRadius-0.4)
268  {
269 
270  roctype = IROC;
271 
272  //std::cout << "Rotation: " << rotang << " " << xyz[1] << " " << xyz[2] << " " << zrot << " " << yrot << std::endl;
273  // zrot is r, and yrot=0 is centered on the midplane
274 
275  float rtmp=zrot;
276  if (zrot > fOROCOuterRadius)
277  {
278  nearestchannel = fGapChannelNumber;
279  return;
280  }
281 
282  //std::cout << "in iroc rtmp: " << rtmp << std::endl;
283 
284  float padwidthloc = fPadWidthOROC;
285  UInt_t irow = 0;
286  if (rtmp <= fIROCOuterRadius)
287  {
288  irow = TMath::Floor( (rtmp-(fIROCInnerRadius-0.4))/fPadHeightIROC );
289  if (irow >= fNumPadRowsIROC)
290  {
291  nearestchannel = fGapChannelNumber;
292  return;
293  }
294  // don't be this forgiving irow = TMath::Min(fNumPadRowsIROC-1,irow);
295  padwidthloc = fPadWidthIROC;
296  }
297  else if (rtmp < fOROCPadHeightChangeRadius)
298  {
299  //std::cout << "in IOROC rtmp: " << rtmp << std::endl;
300 
301  roctype = IOROC;
302 
303  irow = TMath::Floor( (rtmp-(fOROCInnerRadius-0.5))/fPadHeightOROCI ) + fNumPadRowsIROC;
304  if (irow < fNumPadRowsIROC)
305  {
306  nearestchannel = fGapChannelNumber;
307  return;
308  }
309  //std::cout << "Inner OROC row calc: " << irow << " " << fNumPadRowsIROC << std::endl;
310  padwidthloc = fPadWidthOROC;
311  }
312  else
313  {
314  //std::cout << "in OOROC rtmp: " << rtmp << std::endl;
315 
316  roctype = OOROC;
317 
319  padwidthloc = fPadWidthOROC;
320  }
321 
322  //std::cout << "irow: " << irow << std::endl;
323 
324  UInt_t totpadrows = fNumPadRowsIROC + fNumPadRowsOROCI + fNumPadRowsOROCO;
325  if (irow >= totpadrows)
326  {
327  nearestchannel = fGapChannelNumber;
328  return;
329  }
330 
331  // to do -- put in small corrections to make the pads projective
332 
333  int ichanrowoff = TMath::Floor(yrot/padwidthloc) + fNumPadsPerRow.at(irow)/2;
334  if (ichanrowoff < 0 || (UInt_t) ichanrowoff >= fNumPadsPerRow.at(irow))
335  {
336  nearestchannel = fGapChannelNumber;
337  return;
338  }
339  UInt_t ichansector = fFirstPadInRow.at(irow) + ichanrowoff;
340  //std::cout << "ichansector calc: " << yrot/padwidthloc << " " << fNumPadsPerRow.at(irow) << " " << fFirstPadInRow.at(irow) << " " << ichansector << std::endl;
341 
342  ichan = ichansector + fNumChansPerSector * isector;
343 
344  //if (ichan>1000000)
345  //{
346  // std::cout << "Channel ID. in gaps " << xyz[0] << " " << xyz[1] << " " << xyz[2] << " " << ichan << std::endl;
347  // std::cout << irow << " " << rtmp << " " << r << " " << ichansector << " " << isector << " " << fNumChansPerSector << std::endl;
348  // std::cout << yrot << " " << zrot << " " << crot << " " << srot << std::endl;
349  //}
350 
351  } // end test if we are outside the inner radius of the ALICE chambers
352  else // must be in the hole filler
353  {
354  roctype = HFILLER;
355 
356  float tvar = xyz[1]/fCenterPadWidth + fCenterNumPadsPerRow.size()/2;
357  if (tvar<0)
358  {
359  nearestchannel = fGapChannelNumber;
360  return;
361  }
362  UInt_t irow = TMath::Floor(tvar);
363  if (irow > fCenterFirstPadInRow.size()-1)
364  {
365  nearestchannel = fGapChannelNumber;
366  return;
367  }
368  tvar = xyz[2]/fCenterPadWidth + fCenterNumPadsPerRow.at(irow)/2.0;
369  if (tvar<0)
370  {
371  nearestchannel = fGapChannelNumber;
372  return;
373  }
374  UInt_t ivar = TMath::Floor(tvar);
375  if (ivar >= fCenterNumPadsPerRow.at(irow))
376  {
377  nearestchannel = fGapChannelNumber;
378  return;
379  }
380  ichan = ivar + fCenterFirstPadInRow.at(irow) + fNumSectors*fNumChansPerSector;
381  // ichan = fCenterFirstPadInRow.at(irow) + TMath::Min((UInt_t) fCenterNumPadsPerRow.at(irow)-1,
382  // (UInt_t) TMath::Floor(TMath::Max((float)0.0,(float) (xyz[2]/fCenterPadWidth + fCenterNumPadsPerRow.at(irow)/2))))
383  // + fNumSectors*fNumChansPerSector;
384 
385  //if (ichan>1000000)
386  //{
387  // std::cout << "Problem Channel ID, inner filler " << xyz[0] << " " << xyz[1] << " " << xyz[2] << " " << ichan << std::endl;
388  // std::cout << irow << std::endl;
389  //}
390 
391  }
392 
393  // assume positive side X for the lone readout plane if we are using just one
394 
395  if (xyz[0] > fGeo->TPCXCent() || fGeo->TPCNumDriftVols() == 1)
396  {
397  ichan += fNumSectors*fNumChansPerSector + fNumChansCenter; // the opposite side of the TPC.
398  }
399 
400  nearestchannel = TMath::Max(TMath::Min(ichan, (UInt_t) fPixelCenters.size() - 1), (UInt_t) 0);
401  return;
402  }
403 
404  //----------------------------------------------------------------------------
405  // for a particular point xyz, find the nearest channel but also make a list of neighboring channels in the pad rows and in the previous and next pad
406  // rows, if they don't go out of the ROC.
407 
409  {
410 
411  // make a list of nearby pads we want to distribute charge using the pad response function
412  TVector3 xvec(xyz[0],xyz[1],xyz[2]);
413  float xyztest[3] = {0,0,0};
414  TVector3 xvectestm(0,0,0);
415  bool havem = false;
416  TVector3 xvectestp(0,0,0);
417  bool havep = false;
418 
419  TVector3 zerovec(0,0,0); // dummy vector to put in until we have directions worked out
420 
421  cwn.clear();
422  unsigned int chan;
423  gar::geo::ROCType roctype;
424  NearestChannelWithROCType(xyz,roctype,chan); // get the nearest channel ID and add it to the list
425  ChannelToPosition(chan,xyztest);
426  TVector3 xvecchan(xyztest[0],xyztest[1],xyztest[2]);
427  gar::geo::ChanWithPos centerchanwithpos = {chan, xvecchan, zerovec, roctype}; // put the direction vector in later
428  cwn.push_back(centerchanwithpos);
429  if (chan == fGapChannelNumber) return; // we're in a gap so don't look for neighbors
430 
431  if (chan>0) // look on one side in this pad row -- assume channels are numbered along pad rows
432  {
433  ChannelToPosition(chan-1,xyztest); // if we're in a gap, we get -999's here.
434  xvectestm.SetXYZ(xyztest[0],xyztest[1],xyztest[2]);
435  if ( (xvecchan-xvectestm).Mag() < 5.0 ) // if we run off the end of the row (start another), skip this side.
436  {
437  gar::geo::ChanWithPos cwp = {chan-1, xvectestm, zerovec, roctype}; // put the direction vector in later
438  cwn.push_back(cwp);
439  havem = true;
440  }
441  }
442  ChannelToPosition(chan+1,xyztest); // now look on the other side, same pad row.
443  xvectestp.SetXYZ(xyztest[0],xyztest[1],xyztest[2]);
444  if ( (xvecchan-xvectestp).Mag() < 5.0 ) // if we run off the end of the row (start another), skip this side.
445  {
446  gar::geo::ChanWithPos cwp = {chan+1, xvectestp, zerovec, roctype}; // put the direction vector in later
447  cwn.push_back(cwp);
448  havep = true;
449  }
450 
451  TVector3 dvec(0,0,0);
452  if (havem)
453  {
454  dvec = xvectestm - xvecchan;
455  }
456  else if (havep)
457  {
458  dvec = xvectestp - xvecchan;
459  }
460  else
461  {
462  return;
463  // we have a lone pad in this row. No geometrical info to go to another row, so skip.
464  // shouldn't happen, unless a simulated hole-filler pad row has just one pad in it.
465  // throw cet::exception("ChannelMapStandardAlg")
466  // << "Pad has no neighboring pads in its row, geometry problem " << chan;
467  }
468  float dvm = dvec.Mag();
469  if (dvm == 0)
470  {
471  throw cet::exception("ChannelMapStandardAlg")
472  << "Pad neighbor has same coordinates as pad, geometry problem " << chan;
473  }
474  dvec *= 1.0/dvm;
475  // fill in the pad row direction vectors now that we know them.
476  cwn.at(0).padrowdir = dvec;
477  if (havem || havep)
478  {
479  cwn.at(1).padrowdir = dvec;
480  }
481  if (havem && havep)
482  {
483  cwn.at(2).padrowdir = dvec;
484  }
485 
486 
487  TVector3 ndp(0,-dvec.Z(),dvec.Y());
488  float mag = ndp.Mag();
489  ndp *= (0.8/mag); // go out 8 mm -- guarantee to get to the next pad row.
490 
491  TVector3 nextrowhyp = xvecchan + ndp;
493  unsigned int nextrowchan;
494  float nextrowhyparray[3] = {0,0,0};
495  nextrowhyp.GetXYZ(nextrowhyparray);
496  NearestChannelWithROCType(nextrowhyparray,rtp,nextrowchan);
497  if (nextrowchan != fGapChannelNumber)
498  {
499  ChannelToPosition(nextrowchan,nextrowhyparray);
500  TVector3 nrv(nextrowhyparray[0],nextrowhyparray[1],nextrowhyparray[2]);
501  gar::geo::ChanWithPos cwp = {nextrowchan, nrv, dvec, rtp};
502  cwn.push_back(cwp);
503  if (nextrowchan>0)
504  {
505  ChannelToPosition(nextrowchan-1,xyztest);
506  TVector3 xvt(xyztest[0],xyztest[1],xyztest[2]);
507  if ( (xvecchan-xvt).Mag() < 5.0 ) // if we run off the end of the row (start another), skip this side.
508  {
509  gar::geo::ChanWithPos cwp2 = {nextrowchan-1, xvt, dvec, rtp};
510  cwn.push_back(cwp2);
511  }
512  }
513  ChannelToPosition(nextrowchan+1,xyztest);
514  TVector3 xvtp(xyztest[0],xyztest[1],xyztest[2]);
515  if ( (xvecchan-xvtp).Mag() < 5.0 ) // if we run off the end of the row (start another), skip this side.
516  {
517  gar::geo::ChanWithPos cwp2 = {nextrowchan+1, xvtp, dvec, rtp};
518  cwn.push_back(cwp2);
519  }
520  }
521 
522  // look for another row going the other way.
523  nextrowhyp = xvecchan - ndp;
524  nextrowhyp.GetXYZ(nextrowhyparray);
525  NearestChannelWithROCType(nextrowhyparray,rtp,nextrowchan);
526  if (nextrowchan != fGapChannelNumber)
527  {
528  ChannelToPosition(nextrowchan,nextrowhyparray);
529  TVector3 nrv(nextrowhyparray[0],nextrowhyparray[1],nextrowhyparray[2]);
530  gar::geo::ChanWithPos cwp = {nextrowchan, nrv, dvec, rtp};
531  cwn.push_back(cwp);
532 
533  if (nextrowchan>0)
534  {
535  ChannelToPosition(nextrowchan-1,xyztest);
536  TVector3 xvt(xyztest[0],xyztest[1],xyztest[2]);
537  if ( (xvecchan-xvt).Mag() < 5.0 ) // if we run off the end of the row (start another), skip this side.
538  {
539  gar::geo::ChanWithPos cwp2 = {nextrowchan-1, xvt, dvec, rtp};
540  cwn.push_back(cwp2);
541  }
542  }
543  ChannelToPosition(nextrowchan+1,xyztest);
544  TVector3 xvtp(xyztest[0],xyztest[1],xyztest[2]);
545  if ( (xvecchan-xvtp).Mag() < 5.0 ) // if we run off the end of the row (start another), skip this side.
546  {
547  gar::geo::ChanWithPos cwp2 = {nextrowchan+1, xvtp, dvec, rtp};
548  cwn.push_back(cwp2);
549  }
550  }
551  }
552 
553 
554  //----------------------------------------------------------------------------
556  float* xyz) const
557  {
558  if (chan < fPixelCenters.size())
559  {
560  xyz[0] = fPixelCenters[chan].x;
561  xyz[1] = fPixelCenters[chan].y;
562  xyz[2] = fPixelCenters[chan].z;
563  }
564  else // gap channel
565  {
566  xyz[0] = -999;
567  xyz[1] = -999;
568  xyz[2] = -999;
569  }
570  return;
571  }
572 
573  }
574  } // namespace
575 } // namespace gar
std::vector< gar::geo::ChanWithPos > ChanWithNeighbors
Definition: GeometryCore.h:91
float fPadWidthOROC
Pad width in the OROC (assumed same for both sections)
void Initialize(GeometryCore &geo) override
UInt_t fNumChansPerSector
Number of TPC pad channels per sector.
UInt_t fNumPadRowsOROCO
Number of large-pitch pad rows in the outer ROC.
std::vector< UInt_t > fCenterNumPadsPerRow
pads per row for the center hole filler
unsigned int NearestChannel(float const *xyz) const override
float fPhiSectorWidth
width of a sector in phi (in radians)
void ChannelToPosition(unsigned int chan, float *xyz) const override
int TPCNumDriftVols() const
Returns number of TPC drift volumes.
Definition: GeometryCore.h:771
Float_t GetOuterPadWidth() const
Definition: AliTPCROC.h:56
Float_t GetInnerPadLength() const
Definition: AliTPCROC.h:54
float fPadHeightOROCI
Pad height in the outer ROC inner part (cm)
float fPadHeightOROCO
Pad height in the outer ROC outer part (cm)
Float_t GetOuter1PadLength() const
Definition: AliTPCROC.h:57
float TPCXCent() const
Returns the X location of the center of the TPC in cm.
Definition: GeometryCore.h:778
float fIROCOuterRadius
Radius from the beam in cm along the midline of the sector to the outer IROC row outer edge...
Description of geometry of one entire detector.
Definition: GeometryCore.h:436
static AliTPCROC * Instance()
Definition: AliTPCROC.cxx:34
UInt_t GetNRowLow() const
Definition: AliTPCROC.h:51
AliTPCROC * fROC
TPC Readout geometry from ALICE software stack.
std::vector< UInt_t > fFirstPadInRow
indexed by "global" pad row number for a single sector
std::vector< UInt_t > fCenterFirstPadInRow
first pad in row for center hole filler
Float_t GetOuterRadiusUp() const
Definition: AliTPCROC.h:40
float fXPlaneLoc
Location of pixel plane in X (only positive. Assume other one is at -X)
float fOROCInnerRadius
Radius from the beam in cm along the midline of the sector to the inner OROC row inner edge...
float fPadWidthIROC
Pad width in the inner ROC (cm)
float fOROCPadHeightChangeRadius
Radius from the beam in cm along the midline of the sector to the OROC pad height change...
XYZPos fTPCCenter
Location of the center of the TPC.
float fIROCInnerRadius
Radius from the beam in cm along the midline of the sector to the inner IROC row inner edge...
enum gar::geo::ROCType_ ROCType
float TPCZCent() const
Returns the Z location of the center of the TPC in cm.
Definition: GeometryCore.h:792
float fCenterPadWidth
Width of square pads in center hole filler.
UInt_t fNumPadRowsIROC
Number of pad rows in the inner ROC – 64 (TDR) or 63 (ALICE code)
float fOROCOuterRadius
Radius from the beam in cm along the midline of the sector to the outer OROC row outer edge...
UInt_t fNumSectors
Number of sectors – should be 18.
void CheckPositions()
Method to check consistency of NearestChannel and ChannelToPosition.
float fPadHeightIROC
Pad height in the inner ROC (cm)
std::vector< UInt_t > fNumPadsPerRow
indexed by "global" pad row number for a single sector
Float_t GetOuterRadiusLow() const
Definition: AliTPCROC.h:39
General GArSoft Utilities.
std::vector< XYZPos > fPixelCenters
pixel centers (in cm) – for the entire detector
UInt_t fNumChansCenter
Number of channels in center hole filler.
UInt_t GetNRowUp2() const
Definition: AliTPCROC.h:53
UInt_t GetNPads(UInt_t sector, UInt_t row) const
Definition: AliTPCROC.h:30
float TPCYCent() const
Returns the Y location of the center of the TPC in cm.
Definition: GeometryCore.h:785
float fSectorOffsetAngleDeg
Angle to rotate to the middle of the first sector – should be 10 degrees.
#define MF_LOG_DEBUG(id)
ChannelMapStandardAlg(fhicl::ParameterSet const &p)
void NearestChannelInfo(float const *xyz, gar::geo::ChanWithNeighbors &cwn) const override
Float_t GetInnerPadWidth() const
Definition: AliTPCROC.h:55
Float_t GetOuter2PadLength() const
Definition: AliTPCROC.h:58
float TPCLength() const
Returns the length of the TPC (x direction)
Definition: GeometryCore.h:763
const gar::geo::GeometryCore * fGeo
UInt_t GetNRowUp1() const
Definition: AliTPCROC.h:52
UInt_t fGapChannelNumber
channel number GetNearestChannel returns when xyz is in a gap
Float_t GetInnerRadiusUp() const
Definition: AliTPCROC.h:38
LArSoft geometry interface.
Definition: ChannelGeo.h:16
unsigned int Nchannels() const override
Float_t GetInnerRadiusLow() const
Definition: AliTPCROC.h:37
void NearestChannelWithROCType(float const *xyz, gar::geo::ROCType &roctype, unsigned int &nearestchannel) const
UInt_t fNumPadRowsOROCI
Number of small-pitch pad rows in the outer ROC.
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
QTextStream & endl(QTextStream &s)
void GetPositionGlobal(UInt_t sector, UInt_t row, UInt_t pad, Float_t *pos)
Definition: AliTPCROC.cxx:432