ATLAS Offline Software
Public Member Functions | Private Member Functions | Private Attributes | List of all members
PhiSlice Class Reference

#include <PhiSlice.h>

Collaboration diagram for PhiSlice:

Public Member Functions

 PhiSlice ()=delete
 
 PhiSlice (int SliceIndex, double ZBinWidth, double InversePhiBinWidth, double ZTolerance, double KTolerance, double PTolerance, double ZMinimum, double ZMaximum, int LayerMaximum, int BarrelMaximum)
 
 ~PhiSlice ()
 
void AddPoint (double RhoValue, double ZValue, double PhiValue, long LayerIndex)
 
void MakeWideLayers (std::vector< std::vector< double > > *AllLayerRhos, std::vector< std::vector< double > > *AllLayerZs, std::vector< std::vector< double > > *AllLayerPhis, std::vector< std::vector< int > > *AllSliceWidths, int FilledLayerTotal, std::vector< long > *FilledLayerIndices)
 
void GetHistogram (std::vector< long > *HitHistogram, std::vector< double > *WeightHistogram, std::vector< long > *OtherChargeHitHistogram, std::vector< double > *OtherChargeWeightHistogram, const std::vector< std::vector< long > > &ExtraSlices, const long PhiToSubtract, int InnerLayerLimit, const int TripletMode, const bool ChargeAware, std::vector< std::vector< long > > *AllHits=0, std::vector< std::vector< double > > *AllWeights=0)
 
void MakeHistogram (std::vector< std::vector< long > > &ExtraSlices, long PhiToSubtract, int InnerLayerLimit, int TripletMode, bool ChargeAware)
 
void AddHistogram (std::vector< long > *HitHistogram, std::vector< double > *WeightHistogram, std::vector< long > *OtherChargeHitHistogram, std::vector< double > *OtherChargeWeightHistogram)
 

Private Member Functions

int FindTriplet (int OuterFilledLayer, int OuterPointIndex, double CurrentZValue, double CurrentKValue, double CurrentPValue, const std::vector< std::vector< long > > &ExtraSlices, const long PhiToSubtract, bool FastTriplet, int OuterSliceIndex)
 
void FillNeighbours (int InnerLayerIndex, int OuterSliceIndex, int TripletsFound, int AxisZIndex, double AxisZ, const std::vector< std::vector< long > > &ExtraSlices, const long PhiToSubtract, const bool ChargeAware, std::vector< std::vector< long > > *AllHits, std::vector< std::vector< double > > *AllWeights)
 

Private Attributes

std::vector< std::vector< double > > m_layerRhos
 
std::vector< std::vector< double > > m_layerZs
 
std::vector< std::vector< double > > m_layerPhis
 
std::vector< std::vector< double > > * m_allLayerRhos = nullptr
 
std::vector< std::vector< double > > * m_allLayerZs = nullptr
 
std::vector< std::vector< double > > * m_allLayerPhis = nullptr
 
std::vector< std::vector< int > > * m_allSliceWidths = nullptr
 
std::vector< long > * m_filledLayerIndices = nullptr
 
std::vector< long > m_hitHistogram
 
std::vector< long > m_otherChargeHitHistogram
 
std::vector< long > m_sliceStart
 
std::vector< long > m_sliceEnd
 
std::vector< double > m_weightHistogram
 
std::vector< double > m_otherChargeWeightHistogram
 
double m_invZBinWidth
 
double m_invPhiBinWidth
 
double m_zTolerance
 
double m_kTolerance
 
double m_pTolerance
 
double m_zMinimum
 
double m_zMaximum
 
int m_zBins
 
int m_halfZBins
 
int m_zeroOffset
 
int m_sliceIndex
 
int m_filledLayerTotal = 0
 
int m_barrelMaximum
 
bool m_internalHistogramsAreValid
 

Detailed Description

Definition at line 12 of file PhiSlice.h.

Constructor & Destructor Documentation

◆ PhiSlice() [1/2]

PhiSlice::PhiSlice ( )
delete

◆ PhiSlice() [2/2]

PhiSlice::PhiSlice ( int  SliceIndex,
double  ZBinWidth,
double  InversePhiBinWidth,
double  ZTolerance,
double  KTolerance,
double  PTolerance,
double  ZMinimum,
double  ZMaximum,
int  LayerMaximum,
int  BarrelMaximum 
)

Definition at line 11 of file PhiSlice.cxx.

21 {
23  m_pTolerance = PTolerance;
24  m_kTolerance = KTolerance;
25  m_zTolerance = ZTolerance;
26  m_sliceIndex = SliceIndex;
27 
28  m_invZBinWidth = 1.0 / ZBinWidth;
29  m_invPhiBinWidth = InversePhiBinWidth;
30  m_halfZBins = ceil( 0.5*(ZMaximum-ZMinimum) * m_invZBinWidth );
31  m_zBins = 2*m_halfZBins;
32  m_zeroOffset = floor(ZMinimum * m_invZBinWidth );
33 
34  m_layerRhos.resize( LayerMaximum );
35  m_layerZs.resize( LayerMaximum );
36  m_layerPhis.resize( LayerMaximum );
37  m_zMinimum = ZMinimum;
38  m_zMaximum = ZMaximum;
39  m_barrelMaximum = BarrelMaximum;
40  m_sliceStart.resize( LayerMaximum );
41  m_sliceEnd.resize( LayerMaximum );
42 
43  // std::cout << "PhiSlice::\tzBins " << m_zBins << "\t halfBins " << m_halfZBins
44  // << "\twidth " << ZBinWidth << "\tiwidth " << m_invZBinWidth << std::endl;
45 }

◆ ~PhiSlice()

PhiSlice::~PhiSlice ( )

Definition at line 48 of file PhiSlice.cxx.

49 {
50 }

Member Function Documentation

◆ AddHistogram()

void PhiSlice::AddHistogram ( std::vector< long > *  HitHistogram,
std::vector< double > *  WeightHistogram,
std::vector< long > *  OtherChargeHitHistogram,
std::vector< double > *  OtherChargeWeightHistogram 
)

Definition at line 154 of file PhiSlice.cxx.

158 {
160  {
161  //Add the internal histogram bin values to the global histograms
162  for ( unsigned int binIndex = 0; binIndex < m_hitHistogram.size(); binIndex++ )
163  {
164  ( *HitHistogram )[ binIndex ] += m_hitHistogram[ binIndex ];
165  ( *WeightHistogram )[ binIndex ] += m_weightHistogram[ binIndex ];
166  }
167  for ( unsigned int binIndex = 0; binIndex < m_otherChargeHitHistogram.size(); binIndex++ )
168  {
169  ( *OtherChargeHitHistogram )[ binIndex ] += m_otherChargeHitHistogram[ binIndex ];
170  ( *OtherChargeWeightHistogram )[ binIndex ] += m_otherChargeWeightHistogram[ binIndex ];
171  }
172  }
173  // else
174  // {
175  // //cerr << "Internal phi-slice histograms have not been made - run MakeHistograms" << endl;
176  // //exit(1);
177  // }
178 }

◆ AddPoint()

void PhiSlice::AddPoint ( double  RhoValue,
double  ZValue,
double  PhiValue,
long  LayerIndex 
)

Definition at line 53 of file PhiSlice.cxx.

55 {
56  //std::cout << "PhiValue: " << PhiValue << std::endl;
57  //std::cout << "RhoValue: " << RhoValue << std::endl;
58  //std::cout << "ZValue: " << ZValue << std::endl;
59  //std::cout << "LayerIndex: " << LayerIndex << std::endl;
60  //std::cout << "m_layerRhos.size(): " << m_layerRhos.size() << std::endl;
61  //std::cout << "m_layerZs.size(): " << m_layerZs.size()<< std::endl;
62  //std::cout << "m_layerPhis.size(): " << m_layerPhis.size()<< std::endl;
63  //std::cout << "m_layerRhos[ LayerIndex ].size(): " << m_layerRhos[ LayerIndex ].size()<< std::endl;
64  //std::cout << "m_layerZs[ LayerIndex ].size(): " << m_layerZs[ LayerIndex ].size()<< std::endl;
65  //std::cout << "m_layerPhis[ LayerIndex ].size(): " << m_layerPhis[ LayerIndex ].size()<< std::endl;
66  m_layerRhos[ LayerIndex ].push_back( RhoValue );
67  m_layerZs[ LayerIndex ].push_back( ZValue );
68  m_layerPhis[ LayerIndex ].push_back( PhiValue );
69 }

◆ FillNeighbours()

void PhiSlice::FillNeighbours ( int  InnerLayerIndex,
int  OuterSliceIndex,
int  TripletsFound,
int  AxisZIndex,
double  AxisZ,
const std::vector< std::vector< long > > &  ExtraSlices,
const long  PhiToSubtract,
const bool  ChargeAware,
std::vector< std::vector< long > > *  AllHits,
std::vector< std::vector< double > > *  AllWeights 
)
private

Definition at line 458 of file PhiSlice.cxx.

468 {
469  //Determine which neighbouring slices are affected
470  int neighbourMaximum = 0;
471  if ( InnerLayerIndex > 0 )
472  {
473  neighbourMaximum = ExtraSlices[0][ InnerLayerIndex ];
474 
475  if ( InnerLayerIndex > m_barrelMaximum )
476  {
477  neighbourMaximum -= PhiToSubtract;
478  }
479  if ( neighbourMaximum < 1 )
480  {
481  neighbourMaximum = 1;
482  }
483  }
484  int neighbourMinimum = neighbourMaximum;
485  if ( ChargeAware && InnerLayerIndex > 0 )
486  {
487  neighbourMinimum = 1;
488  }
489 
490  //Restrict loop ranges to slices that exist
491  int startNeighbour1 = m_sliceIndex - neighbourMinimum;
492  if ( startNeighbour1 < 0 )
493  {
494  startNeighbour1 = 0;
495  }
496  int endNeighbour1 = m_sliceIndex + neighbourMaximum;
497  if ( endNeighbour1 > (int)( AllHits[0].size() - 1 ) )
498  {
499  endNeighbour1 = AllHits[0].size() - 1;
500  }
501  int startNeighbour2 = m_sliceIndex - neighbourMaximum;
502  if ( startNeighbour2 < 0 )
503  {
504  startNeighbour2 = 0;
505  }
506  int endNeighbour2 = m_sliceIndex + neighbourMinimum;
507  if ( endNeighbour2 > (int)( AllHits[0].size() - 1 ) )
508  {
509  endNeighbour2 = AllHits[0].size() - 1;
510  }
511 
512  //Increment the appropriate histograms
513  if ( !ChargeAware || OuterSliceIndex <= m_sliceIndex + 1 )
514  {
515  for ( int neighbourIndex = startNeighbour1; neighbourIndex <= endNeighbour1; neighbourIndex++ )
516  {
517  AllHits[0][ neighbourIndex ][ AxisZIndex ] += TripletsFound;
518  AllWeights[0][ neighbourIndex ][ AxisZIndex ] += AxisZ * ( double )TripletsFound;
519  }
520  }
521  if ( ChargeAware && OuterSliceIndex >= m_sliceIndex - 1 )
522  {
523  for ( int neighbourIndex = startNeighbour2; neighbourIndex <= endNeighbour2; neighbourIndex++ )
524  {
525  AllHits[1][ neighbourIndex ][ AxisZIndex ] += TripletsFound;
526  AllWeights[1][ neighbourIndex ][ AxisZIndex ] += AxisZ * ( double )TripletsFound;
527  }
528  }
529 }

◆ FindTriplet()

int PhiSlice::FindTriplet ( int  OuterFilledLayer,
int  OuterPointIndex,
double  CurrentZValue,
double  CurrentKValue,
double  CurrentPValue,
const std::vector< std::vector< long > > &  ExtraSlices,
const long  PhiToSubtract,
bool  FastTriplet,
int  OuterSliceIndex 
)
private

Definition at line 353 of file PhiSlice.cxx.

359 {
360  int tripletHits = 0;
361 
362  //Find out the real index of the outer filled layer
363  int outerLayerIndex = ( *m_filledLayerIndices )[ OuterFilledLayer ];
364 
365  //Get the coordinates of the outer point
366  double outerPointZ = ( *m_allLayerZs )[ outerLayerIndex ][ OuterPointIndex ];
367  double outerPointRho = ( *m_allLayerRhos )[ outerLayerIndex ][ OuterPointIndex ];
368  double outerPointPhi = ( *m_allLayerPhis )[ outerLayerIndex ][ OuterPointIndex ];
369 
370  //Loop over layers further out to find triplets
371  for ( int tripletFilledLayer = OuterFilledLayer + 1; tripletFilledLayer < m_filledLayerTotal; tripletFilledLayer++ )
372  {
373  //Get the actual index of the triplet filled layer
374  int tripletLayerIndex = ( *m_filledLayerIndices )[ tripletFilledLayer ];
375 
376  //Work out how many neighbouring slices to examine
377  int neighbourNumber = ExtraSlices[ outerLayerIndex ][ tripletLayerIndex ];
378  if ( outerLayerIndex > m_barrelMaximum || tripletLayerIndex > m_barrelMaximum )
379  {
380  neighbourNumber -= PhiToSubtract;
381  }
382  if ( neighbourNumber < 1 )
383  {
384  neighbourNumber = 1;
385  }
386 
387  //Work out the lowest-index slice to examine
388  int minimumSlice = OuterSliceIndex - neighbourNumber;
389  if ( OuterSliceIndex >= m_sliceIndex )
390  {
391  //Keep the phi bending consistent
392  minimumSlice = OuterSliceIndex - 1;
393  }
394  if ( minimumSlice < 0 )
395  {
396  minimumSlice = 0;
397  }
398 
399  //Work out the highest-index slice to examine
400  unsigned int maximumSlice = OuterSliceIndex + neighbourNumber + 1;
401  if ( OuterSliceIndex <= m_sliceIndex )
402  {
403  //Keep the phi bending consistent
404  maximumSlice = OuterSliceIndex + 2;
405  }
406  if ( maximumSlice >= ( *m_allSliceWidths )[ tripletLayerIndex ].size() )
407  {
408  maximumSlice = ( *m_allSliceWidths )[ tripletLayerIndex ].size() - 1;
409  }
410 
411  //Work out the space point indices corresponding to those slices
412  int minimumPointIndex = ( *m_allSliceWidths )[ tripletLayerIndex ][ minimumSlice ];
413  int maximumPointIndex = ( *m_allSliceWidths )[ tripletLayerIndex ][ maximumSlice ];
414 
415  //Loop over the points in the triplet layer
416  for ( int tripletPointIndex = minimumPointIndex; tripletPointIndex < maximumPointIndex; tripletPointIndex++ )
417  {
418  //Get the triplet point
419  double tripletPointZ = ( *m_allLayerZs )[ tripletLayerIndex ][ tripletPointIndex ];
420  double tripletPointRho = ( *m_allLayerRhos )[ tripletLayerIndex ][ tripletPointIndex ];
421  double tripletPointPhi = ( *m_allLayerPhis )[ tripletLayerIndex ][ tripletPointIndex ];
422 
423  //Calculate the z value using the outer and triplet points
424  double invDeltaRho = 1.0 / ( outerPointRho - tripletPointRho );
425  double tripletZValue = ( tripletPointZ * outerPointRho - outerPointZ * tripletPointRho ) * invDeltaRho;
426  if ( fabs( tripletZValue - CurrentZValue ) > m_zTolerance )
427  {
428  continue;
429  }
430 
431  //Calculate the k value using the outer and triplet points
432  double tripletKValue = ( tripletPointPhi - outerPointPhi ) * invDeltaRho;
433  if ( fabs( tripletKValue - CurrentKValue ) > m_kTolerance )
434  {
435  continue;
436  }
437 
438  //Calculate the p value using the outer and triplet points
439  double tripletPValue = ( tripletPointPhi * outerPointRho - outerPointPhi * tripletPointRho ) * invDeltaRho;
440  if ( fabs( tripletPValue - CurrentPValue ) < m_pTolerance )
441  {
442  if ( FastTriplet )
443  {
444  return 1;
445  }
446  else
447  {
448  tripletHits++;
449  }
450  }
451  }
452  }
453 
454  return tripletHits;
455 }

◆ GetHistogram()

void PhiSlice::GetHistogram ( std::vector< long > *  HitHistogram,
std::vector< double > *  WeightHistogram,
std::vector< long > *  OtherChargeHitHistogram,
std::vector< double > *  OtherChargeWeightHistogram,
const std::vector< std::vector< long > > &  ExtraSlices,
const long  PhiToSubtract,
int  InnerLayerLimit,
const int  TripletMode,
const bool  ChargeAware,
std::vector< std::vector< long > > *  AllHits = 0,
std::vector< std::vector< double > > *  AllWeights = 0 
)

Calculate the corresponding histogram bin

NB: quicker to simply subtract m_zMinimum from each spacepoint at the start and simply add m_zMinimum to the final vertices after calculation.

Or better still, subtract m_zMinimum from each spacepoint, then scale

the coordinates by m_invZBinWidth, then you have "vertex Z positions" already in the "binning" space and you need only take the int(..)

This would avoids calculating the subtraction, and the multiplication for every double/triplet etc - something to bare in mind for the future I think

int axisZIndex = rint( (axisZ-m_zMinimum) * m_invZBinWidth);

Definition at line 181 of file PhiSlice.cxx.

192 {
193  //Keep the inner loop maximum sensible
194  if ( InnerLayerLimit >= m_filledLayerTotal )
195  {
196  InnerLayerLimit = m_filledLayerTotal - 1;
197  }
198 
199  //Make the pairs of spacepoints, from the inside layer out
200  for ( int innerFilledLayer = 0; innerFilledLayer < InnerLayerLimit; innerFilledLayer++ )
201  {
202  //Get the actual index of the inner filled layer
203  int innerLayerIndex = ( *m_filledLayerIndices )[ innerFilledLayer ];
204 
205  //Loop over all the points in the inner layer
206  for ( unsigned int innerPointIndex = m_sliceStart[ innerLayerIndex ]; innerPointIndex < m_sliceEnd[ innerLayerIndex ]; innerPointIndex++ )
207  {
208  //Get the inner point
209  double innerPointZ = ( *m_allLayerZs )[ innerLayerIndex ][ innerPointIndex ];
210  double innerPointRho = ( *m_allLayerRhos )[ innerLayerIndex ][ innerPointIndex ];
211  double innerPointPhi = ( *m_allLayerPhis )[ innerLayerIndex ][ innerPointIndex ];
212 
213  //Loop over all layers further out
214  for ( int outerFilledLayer = innerFilledLayer + 1; outerFilledLayer < m_filledLayerTotal; outerFilledLayer++ )
215  {
216  //Get the actual index of the outer filled layer
217  int outerLayerIndex = ( *m_filledLayerIndices )[ outerFilledLayer ];
218 
219  //Work out how many neighbouring slices to examine
220  int neighbourNumber = ExtraSlices[ innerLayerIndex ][ outerLayerIndex ];
221  if ( innerLayerIndex > m_barrelMaximum || outerLayerIndex > m_barrelMaximum )
222  {
223  neighbourNumber -= PhiToSubtract;
224  }
225  if ( neighbourNumber < 1 )
226  {
227  neighbourNumber = 1;
228  }
229 
230  //Work out which slices that corresponds to
231  int minimumSlice = m_sliceIndex - neighbourNumber;
232  if ( minimumSlice < 0 )
233  {
234  minimumSlice = 0;
235  }
236  unsigned int maximumSlice = m_sliceIndex + neighbourNumber + 1;
237  if ( maximumSlice >= ( *m_allSliceWidths )[ outerLayerIndex ].size() )
238  {
239  maximumSlice = ( *m_allSliceWidths )[ outerLayerIndex ].size() - 1;
240  }
241 
242  //Work out the space point indices corresponding to those slices
243  int minimumPointIndex = ( *m_allSliceWidths )[ outerLayerIndex ][ minimumSlice ];
244  int maximumPointIndex = ( *m_allSliceWidths )[ outerLayerIndex ][ maximumSlice ];
245 
246  //Loop over the points in the outer layer
247  for ( int outerPointIndex = minimumPointIndex; outerPointIndex < maximumPointIndex; outerPointIndex++ )
248  {
249  //Get the outer point
250  double outerPointZ = ( *m_allLayerZs )[ outerLayerIndex ][ outerPointIndex ];
251  double outerPointRho = ( *m_allLayerRhos )[ outerLayerIndex ][ outerPointIndex ];
252  double outerPointPhi = ( *m_allLayerPhis )[ outerLayerIndex ][ outerPointIndex ];
253 
254  //Calculate the z axis position
255  double invDeltaRho = 1.0 / ( innerPointRho - outerPointRho );
256  double axisZ = ( outerPointZ * innerPointRho - innerPointZ * outerPointRho ) * invDeltaRho;
257 
258  //Cut on the maximum z value
259  if ( axisZ>m_zMinimum && axisZ<m_zMaximum )
260  {
261  //Get the index of the outer slice for charge-awareness
262  int outerSliceIndex = floor( outerPointPhi * m_invPhiBinWidth );
263 
264  //Look for triplet
265  if ( TripletMode )
266  {
267  //Calculate some extra values
268  double kValue = ( outerPointPhi - innerPointPhi ) * invDeltaRho;
269  double pValue = ( outerPointPhi * innerPointRho - innerPointPhi * outerPointRho ) * invDeltaRho;
270 
271 
272  //Try and identify a triplet
273  int tripletsFound = FindTriplet( outerFilledLayer, outerPointIndex,
274  axisZ, kValue, pValue,
275  ExtraSlices, PhiToSubtract, ( TripletMode == 1 ), outerSliceIndex );
276 
277  //Store if at least one triplet found
278  if ( tripletsFound )
279  {
291  int axisZIndex = rint( axisZ * m_invZBinWidth - m_zeroOffset );
293 
294  //If separate slice histograms, fill neighbouring slices
295  if ( AllHits && AllWeights )
296  {
297  FillNeighbours( innerLayerIndex, outerSliceIndex, tripletsFound, axisZIndex, axisZ,
298  ExtraSlices, PhiToSubtract, ChargeAware,
299  AllHits, AllWeights );
300  }
301  else
302  {
303  //Increment the main histograms
304  if ( !ChargeAware || outerSliceIndex <= m_sliceIndex + 1 )
305  {
306  ( *HitHistogram )[ axisZIndex ] += tripletsFound;
307  ( *WeightHistogram )[ axisZIndex ] += axisZ * ( double )tripletsFound;
308  }
309  if ( ChargeAware && outerSliceIndex >= m_sliceIndex - 1 )
310  {
311  ( *OtherChargeHitHistogram )[ axisZIndex ] += tripletsFound;
312  ( *OtherChargeWeightHistogram )[ axisZIndex ] += axisZ * ( double )tripletsFound;
313  }
314  }
315  }
316  }
317  else
318  {
319  //Calculate the corresponding histogram bin
320  int axisZIndex = rint( axisZ * m_invZBinWidth - m_zeroOffset );
321  // int axisZIndex = rint( (axisZ-m_zMinimum) * m_invZBinWidth);
322 
323  //If separate slice histograms, fill neighbouring slices
324  if ( AllHits && AllWeights )
325  {
326  FillNeighbours( innerLayerIndex, outerSliceIndex, 1, axisZIndex, axisZ,
327  ExtraSlices, PhiToSubtract, ChargeAware,
328  AllHits, AllWeights );
329  }
330  else
331  {
332  //Increment the histograms
333  if ( !ChargeAware || outerSliceIndex <= m_sliceIndex + 1 )
334  {
335  ( *HitHistogram )[ axisZIndex ]++;
336  ( *WeightHistogram )[ axisZIndex ] += axisZ;
337  }
338  if ( ChargeAware && outerSliceIndex >= m_sliceIndex - 1 )
339  {
340  ( *OtherChargeHitHistogram )[ axisZIndex ]++;
341  ( *OtherChargeWeightHistogram )[ axisZIndex ] += axisZ;
342  }
343  }
344  }
345  }
346  }
347  }
348  }
349  }
350 }

◆ MakeHistogram()

void PhiSlice::MakeHistogram ( std::vector< std::vector< long > > &  ExtraSlices,
long  PhiToSubtract,
int  InnerLayerLimit,
int  TripletMode,
bool  ChargeAware 
)

Definition at line 127 of file PhiSlice.cxx.

130 {
131  //Ininitalise internal histograms
133  m_hitHistogram = std::vector<long>( m_zBins + 1, 0 );
134  m_weightHistogram = std::vector<double>( m_zBins + 1, 0.0 );
135  if ( ChargeAware )
136  {
137  m_otherChargeHitHistogram = std::vector<long>( m_zBins + 1, 0 );
138  m_otherChargeWeightHistogram = std::vector<double>( m_zBins + 1, 0.0 );
139  }
140 
141  //Add hits to these internal hsitograms
146  ExtraSlices,
147  PhiToSubtract, InnerLayerLimit, TripletMode, ChargeAware );
148 
149  //Mark internal flag done
151 }

◆ MakeWideLayers()

void PhiSlice::MakeWideLayers ( std::vector< std::vector< double > > *  AllLayerRhos,
std::vector< std::vector< double > > *  AllLayerZs,
std::vector< std::vector< double > > *  AllLayerPhis,
std::vector< std::vector< int > > *  AllSliceWidths,
int  FilledLayerTotal,
std::vector< long > *  FilledLayerIndices 
)

Definition at line 72 of file PhiSlice.cxx.

78 {
79  //Append the hits in this slice to the overall structure (ignore the inner layer, we don't use that for the second point)
80  for ( int filledLayer = 0; filledLayer < FilledLayerTotal; filledLayer++ )
81  {
82  //Get the actual index of the next filled layer
83  int layerIndex = ( *FilledLayerIndices )[ filledLayer ];
84 
85  //Add to the overall rho vector...
86  ( *AllLayerRhos )[ layerIndex ].insert(
87  ( *AllLayerRhos )[ layerIndex ].end(), // ...at the end...
88  m_layerRhos[ layerIndex ].begin(),
89  m_layerRhos[ layerIndex ].end() ); // ...the whole of our rho vector
90 
91  //Likewise for z
92  ( *AllLayerZs )[ layerIndex ].insert(
93  ( *AllLayerZs )[ layerIndex ].end(),
94  m_layerZs[ layerIndex ].begin(),
95  m_layerZs[ layerIndex ].end() );
96 
97  //Likewise for phi
98  ( *AllLayerPhis )[ layerIndex ].insert(
99  ( *AllLayerPhis )[ layerIndex ].end(),
100  m_layerPhis[ layerIndex ].begin(),
101  m_layerPhis[ layerIndex ].end() );
102 
103  //Store the cumulative number of spacepoints per slice
104  int previousTotal = ( *AllSliceWidths )[ layerIndex ][ m_sliceIndex ];
105  ( *AllSliceWidths )[ layerIndex ][ m_sliceIndex + 1 ] = m_layerRhos[ layerIndex ].size() + previousTotal;
106 
107  //Store the start and end of this slice
108  m_sliceStart[ layerIndex ] = ( *AllSliceWidths )[ layerIndex ][ m_sliceIndex ];
109  m_sliceEnd[ layerIndex ] = ( *AllSliceWidths )[ layerIndex ][ m_sliceIndex + 1 ];
110  }
111 
112  //Store pointers for later
113  m_allLayerRhos = AllLayerRhos;
114  m_allLayerZs = AllLayerZs;
115  m_allLayerPhis = AllLayerPhis;
116  m_allSliceWidths = AllSliceWidths;
117  m_filledLayerTotal = FilledLayerTotal;
118  m_filledLayerIndices = FilledLayerIndices;
119 
120  //Clean up
121  m_layerRhos.clear();
122  m_layerZs.clear();
123  m_layerPhis.clear();
124 }

Member Data Documentation

◆ m_allLayerPhis

std::vector< std::vector<double> >* PhiSlice::m_allLayerPhis = nullptr
private

Definition at line 78 of file PhiSlice.h.

◆ m_allLayerRhos

std::vector< std::vector<double> >* PhiSlice::m_allLayerRhos = nullptr
private

Definition at line 76 of file PhiSlice.h.

◆ m_allLayerZs

std::vector< std::vector<double> >* PhiSlice::m_allLayerZs = nullptr
private

Definition at line 77 of file PhiSlice.h.

◆ m_allSliceWidths

std::vector< std::vector<int> >* PhiSlice::m_allSliceWidths = nullptr
private

Definition at line 79 of file PhiSlice.h.

◆ m_barrelMaximum

int PhiSlice::m_barrelMaximum
private

Definition at line 96 of file PhiSlice.h.

◆ m_filledLayerIndices

std::vector<long>* PhiSlice::m_filledLayerIndices = nullptr
private

Definition at line 80 of file PhiSlice.h.

◆ m_filledLayerTotal

int PhiSlice::m_filledLayerTotal = 0
private

Definition at line 94 of file PhiSlice.h.

◆ m_halfZBins

int PhiSlice::m_halfZBins
private

Definition at line 91 of file PhiSlice.h.

◆ m_hitHistogram

std::vector<long> PhiSlice::m_hitHistogram
private

Definition at line 81 of file PhiSlice.h.

◆ m_internalHistogramsAreValid

bool PhiSlice::m_internalHistogramsAreValid
private

Definition at line 97 of file PhiSlice.h.

◆ m_invPhiBinWidth

double PhiSlice::m_invPhiBinWidth
private

Definition at line 84 of file PhiSlice.h.

◆ m_invZBinWidth

double PhiSlice::m_invZBinWidth
private

Definition at line 83 of file PhiSlice.h.

◆ m_kTolerance

double PhiSlice::m_kTolerance
private

Definition at line 86 of file PhiSlice.h.

◆ m_layerPhis

std::vector< std::vector<double> > PhiSlice::m_layerPhis
private

Definition at line 75 of file PhiSlice.h.

◆ m_layerRhos

std::vector< std::vector<double> > PhiSlice::m_layerRhos
private

Definition at line 75 of file PhiSlice.h.

◆ m_layerZs

std::vector< std::vector<double> > PhiSlice::m_layerZs
private

Definition at line 75 of file PhiSlice.h.

◆ m_otherChargeHitHistogram

std::vector<long> PhiSlice::m_otherChargeHitHistogram
private

Definition at line 81 of file PhiSlice.h.

◆ m_otherChargeWeightHistogram

std::vector<double> PhiSlice::m_otherChargeWeightHistogram
private

Definition at line 82 of file PhiSlice.h.

◆ m_pTolerance

double PhiSlice::m_pTolerance
private

Definition at line 87 of file PhiSlice.h.

◆ m_sliceEnd

std::vector<long> PhiSlice::m_sliceEnd
private

Definition at line 81 of file PhiSlice.h.

◆ m_sliceIndex

int PhiSlice::m_sliceIndex
private

Definition at line 93 of file PhiSlice.h.

◆ m_sliceStart

std::vector<long> PhiSlice::m_sliceStart
private

Definition at line 81 of file PhiSlice.h.

◆ m_weightHistogram

std::vector<double> PhiSlice::m_weightHistogram
private

Definition at line 82 of file PhiSlice.h.

◆ m_zBins

int PhiSlice::m_zBins
private

Definition at line 90 of file PhiSlice.h.

◆ m_zeroOffset

int PhiSlice::m_zeroOffset
private

Definition at line 92 of file PhiSlice.h.

◆ m_zMaximum

double PhiSlice::m_zMaximum
private

Definition at line 89 of file PhiSlice.h.

◆ m_zMinimum

double PhiSlice::m_zMinimum
private

Definition at line 88 of file PhiSlice.h.

◆ m_zTolerance

double PhiSlice::m_zTolerance
private

Definition at line 85 of file PhiSlice.h.


The documentation for this class was generated from the following files:
PhiSlice::m_layerZs
std::vector< std::vector< double > > m_layerZs
Definition: PhiSlice.h:75
PhiSlice::m_allLayerPhis
std::vector< std::vector< double > > * m_allLayerPhis
Definition: PhiSlice.h:78
PhiSlice::FillNeighbours
void FillNeighbours(int InnerLayerIndex, int OuterSliceIndex, int TripletsFound, int AxisZIndex, double AxisZ, const std::vector< std::vector< long > > &ExtraSlices, const long PhiToSubtract, const bool ChargeAware, std::vector< std::vector< long > > *AllHits, std::vector< std::vector< double > > *AllWeights)
Definition: PhiSlice.cxx:458
PhiSlice::m_sliceEnd
std::vector< long > m_sliceEnd
Definition: PhiSlice.h:81
PhiSlice::m_internalHistogramsAreValid
bool m_internalHistogramsAreValid
Definition: PhiSlice.h:97
PhiSlice::m_zeroOffset
int m_zeroOffset
Definition: PhiSlice.h:92
PhiSlice::FindTriplet
int FindTriplet(int OuterFilledLayer, int OuterPointIndex, double CurrentZValue, double CurrentKValue, double CurrentPValue, const std::vector< std::vector< long > > &ExtraSlices, const long PhiToSubtract, bool FastTriplet, int OuterSliceIndex)
Definition: PhiSlice.cxx:353
PhiSlice::m_filledLayerIndices
std::vector< long > * m_filledLayerIndices
Definition: PhiSlice.h:80
PhiSlice::m_allLayerZs
std::vector< std::vector< double > > * m_allLayerZs
Definition: PhiSlice.h:77
PhiSlice::GetHistogram
void GetHistogram(std::vector< long > *HitHistogram, std::vector< double > *WeightHistogram, std::vector< long > *OtherChargeHitHistogram, std::vector< double > *OtherChargeWeightHistogram, const std::vector< std::vector< long > > &ExtraSlices, const long PhiToSubtract, int InnerLayerLimit, const int TripletMode, const bool ChargeAware, std::vector< std::vector< long > > *AllHits=0, std::vector< std::vector< double > > *AllWeights=0)
Definition: PhiSlice.cxx:181
PlotCalibFromCool.begin
begin
Definition: PlotCalibFromCool.py:94
PhiSlice::m_pTolerance
double m_pTolerance
Definition: PhiSlice.h:87
PhiSlice::m_hitHistogram
std::vector< long > m_hitHistogram
Definition: PhiSlice.h:81
PhiSlice::m_otherChargeHitHistogram
std::vector< long > m_otherChargeHitHistogram
Definition: PhiSlice.h:81
PhiSlice::m_invZBinWidth
double m_invZBinWidth
Definition: PhiSlice.h:83
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
PhiSlice::m_allLayerRhos
std::vector< std::vector< double > > * m_allLayerRhos
Definition: PhiSlice.h:76
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
PhiSlice::m_layerPhis
std::vector< std::vector< double > > m_layerPhis
Definition: PhiSlice.h:75
PhiSlice::m_weightHistogram
std::vector< double > m_weightHistogram
Definition: PhiSlice.h:82
PhiSlice::m_allSliceWidths
std::vector< std::vector< int > > * m_allSliceWidths
Definition: PhiSlice.h:79
PhiSlice::m_sliceStart
std::vector< long > m_sliceStart
Definition: PhiSlice.h:81
IDPVM::binIndex
unsigned int binIndex(const T &val, const std::vector< T > &partitions)
general utility function to return bin index given a value and the upper endpoints of each bin
Definition: InDetPhysValMonitoringUtilities.h:43
PhiSlice::m_halfZBins
int m_halfZBins
Definition: PhiSlice.h:91
xAOD::double
double
Definition: CompositeParticle_v1.cxx:159
PhiSlice::m_layerRhos
std::vector< std::vector< double > > m_layerRhos
Definition: PhiSlice.h:75
PhiSlice::m_zMinimum
double m_zMinimum
Definition: PhiSlice.h:88
PhiSlice::m_zMaximum
double m_zMaximum
Definition: PhiSlice.h:89
PhiSlice::m_zTolerance
double m_zTolerance
Definition: PhiSlice.h:85
PhiSlice::m_invPhiBinWidth
double m_invPhiBinWidth
Definition: PhiSlice.h:84
PhiSlice::m_sliceIndex
int m_sliceIndex
Definition: PhiSlice.h:93
PhiSlice::m_barrelMaximum
int m_barrelMaximum
Definition: PhiSlice.h:96
PhiSlice::m_otherChargeWeightHistogram
std::vector< double > m_otherChargeWeightHistogram
Definition: PhiSlice.h:82
PhiSlice::m_zBins
int m_zBins
Definition: PhiSlice.h:90
PhiSlice::m_kTolerance
double m_kTolerance
Definition: PhiSlice.h:86
PhiSlice::m_filledLayerTotal
int m_filledLayerTotal
Definition: PhiSlice.h:94