ATLAS Offline Software
Loading...
Searching...
No Matches
PhiSlice.h
Go to the documentation of this file.
1// emacs: this is -*- c++ -*-
2
3/*
4 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
5*/
6
7#ifndef PHI_SLICE_H
8#define PHI_SLICE_H
9
10#include <vector>
11
13{
14public:
15 //Default constructor
16 PhiSlice() = delete;
17
18 //Constructor with input parameters
19 PhiSlice( int SliceIndex,
20 double ZBinWidth, double InversePhiBinWidth,
21 double ZTolerance, double KTolerance, double PTolerance,
22 double ZMinimum, double ZMaximum,
23 int LayerMaximum, int BarrelMaximum );
24
25 //Destructor
26 ~PhiSlice();
27
28 //Store a space point
29 void AddPoint( double RhoValue, double ZValue, double PhiValue, long LayerIndex );
30
31 //Make the wide layer structure
32 void MakeWideLayers( std::vector< std::vector<double> >* AllLayerRhos, std::vector< std::vector<double> >* AllLayerZs,
33 std::vector< std::vector<double> >* AllLayerPhis, std::vector< std::vector<int> >* AllSliceWidths,
34 int FilledLayerTotal, std::vector<long> * FilledLayerIndices );
35
36 //Add points to the z-axis histograms (not thread safe if acting on global histograms)
37 void GetHistogram( std::vector<long>* HitHistogram, std::vector<double>* WeightHistogram,
38 std::vector<long>* OtherChargeHitHistogram, std::vector<double>* OtherChargeWeightHistogram,
39 const std::vector< std::vector<long> > & ExtraSlices,
40 const long PhiToSubtract,
41 int InnerLayerLimit,
42 const int TripletMode,
43 const bool ChargeAware,
44 std::vector< std::vector<long> >* AllHits = 0,
45 std::vector< std::vector<double> >* AllWeights = 0 );
46
47 //Add points to internal z-axis histogram (thread safe, incompatible with histogram-per-slice mode)
48 void MakeHistogram( std::vector< std::vector<long> >& ExtraSlices,
49 long PhiToSubtract,
50 int InnerLayerLimit,
51 int TripletMode,
52 bool ChargeAware );
53
54 //Merge internal and global z-axis histogram (not thread safe)
55 void AddHistogram( std::vector<long>* HitHistogram, std::vector<double>* WeightHistogram,
56 std::vector<long>* OtherChargeHitHistogram, std::vector<double>* OtherChargeWeightHistogram );
57
58private:
59 //Look for a third spacepoint
60 int FindTriplet( int OuterFilledLayer, int OuterPointIndex,
61 double CurrentZValue, double CurrentKValue, double CurrentPValue,
62 const std::vector< std::vector<long> >& ExtraSlices,
63 const long PhiToSubtract,
64 bool FastTriplet,
65 int OuterSliceIndex );
66
67 //Fill neighbouring slices for histogram-per-slice mode
68 void FillNeighbours( int InnerLayerIndex, int OuterSliceIndex, int TripletsFound, int AxisZIndex, double AxisZ,
69 const std::vector< std::vector<long> >& ExtraSlices,
70 const long PhiToSubtract,
71 const bool ChargeAware,
72 std::vector< std::vector<long> >* AllHits,
73 std::vector< std::vector<double> >* AllWeights );
74
75 std::vector< std::vector<double> > m_layerRhos, m_layerZs, m_layerPhis;
76 std::vector< std::vector<double> >* m_allLayerRhos = nullptr;
77 std::vector< std::vector<double> >* m_allLayerZs = nullptr;
78 std::vector< std::vector<double> >* m_allLayerPhis = nullptr;
79 std::vector< std::vector<int> >* m_allSliceWidths = nullptr;
80 std::vector<long>* m_filledLayerIndices = nullptr;
88 double m_zMinimum;
89 double m_zMaximum;
90 int m_zBins;
95 //int m_layerMaximum;
98};
99
100#endif
std::vector< long > m_sliceStart
Definition PhiSlice.h:81
double m_zTolerance
Definition PhiSlice.h:85
std::vector< long > m_sliceEnd
Definition PhiSlice.h:81
std::vector< std::vector< double > > m_layerPhis
Definition PhiSlice.h:75
std::vector< std::vector< int > > * m_allSliceWidths
Definition PhiSlice.h:79
void MakeHistogram(std::vector< std::vector< long > > &ExtraSlices, long PhiToSubtract, int InnerLayerLimit, int TripletMode, bool ChargeAware)
Definition PhiSlice.cxx:127
std::vector< std::vector< double > > * m_allLayerRhos
Definition PhiSlice.h:76
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)
Definition PhiSlice.cxx:72
double m_kTolerance
Definition PhiSlice.h:86
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
std::vector< long > m_otherChargeHitHistogram
Definition PhiSlice.h:81
int m_barrelMaximum
Definition PhiSlice.h:96
double m_invZBinWidth
Definition PhiSlice.h:83
void AddPoint(double RhoValue, double ZValue, double PhiValue, long LayerIndex)
Definition PhiSlice.cxx:53
std::vector< std::vector< double > > m_layerZs
Definition PhiSlice.h:75
double m_pTolerance
Definition PhiSlice.h:87
int m_filledLayerTotal
Definition PhiSlice.h:94
double m_zMinimum
Definition PhiSlice.h:88
std::vector< long > m_hitHistogram
Definition PhiSlice.h:81
std::vector< double > m_weightHistogram
Definition PhiSlice.h:82
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
std::vector< long > * m_filledLayerIndices
Definition PhiSlice.h:80
PhiSlice()=delete
bool m_internalHistogramsAreValid
Definition PhiSlice.h:97
int m_zBins
Definition PhiSlice.h:90
int m_halfZBins
Definition PhiSlice.h:91
int m_sliceIndex
Definition PhiSlice.h:93
void AddHistogram(std::vector< long > *HitHistogram, std::vector< double > *WeightHistogram, std::vector< long > *OtherChargeHitHistogram, std::vector< double > *OtherChargeWeightHistogram)
Definition PhiSlice.cxx:154
double m_invPhiBinWidth
Definition PhiSlice.h:84
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
std::vector< std::vector< double > > * m_allLayerPhis
Definition PhiSlice.h:78
double m_zMaximum
Definition PhiSlice.h:89
std::vector< std::vector< double > > m_layerRhos
Definition PhiSlice.h:75
std::vector< double > m_otherChargeWeightHistogram
Definition PhiSlice.h:82
int m_zeroOffset
Definition PhiSlice.h:92
std::vector< std::vector< double > > * m_allLayerZs
Definition PhiSlice.h:77