CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes | Private Attributes | Friends
GoldenPatternResult Class Reference

#include <GoldenPatternResult.h>

Public Member Functions

void finalise0 ()
 
void finalise1 ()
 
void finalise2 ()
 
void finalise3 ()
 
void finalise5 ()
 
void finalise6 ()
 
void finalise7 ()
 
void finalise8 ()
 
void finalise9 ()
 
int getEta () const
 
unsigned int getFiredLayerBits () const
 
unsigned int getFiredLayerCnt () const
 
double getGpProbability1 () const
 
double getGpProbability2 () const
 
PdfValueType getPdfSum () const
 
int getPhi () const
 
int getRefHitPhi () const
 
int getRefLayer () const
 
const StubResultsgetStubResults () const
 
 GoldenPatternResult ()
 
 GoldenPatternResult (const OMTFConfiguration *omtfConfig)
 
void init (const OMTFConfiguration *omtfConfig)
 
bool isLayerFired (unsigned int iLayer) const
 
bool isValid () const
 
void reset ()
 
void set (int refLayer, int phi, int eta, int refHitPhi)
 
void setEta (int eta)
 
void setFiredLayerBits (unsigned int firedLayerBits)
 
void setFiredLayerCnt (unsigned int firedLayerCnt)
 
void setGpProbability1 (double probability1=0)
 
void setGpProbability2 (double probability2=0)
 
void setPhi (int phi)
 
void setRefHitPhi (int refHitPhi)
 
void setRefLayer (int refLayer)
 
void setStubResult (float pdfVal, bool valid, int pdfBin, int layer, MuonStubPtr stub)
 
void setStubResult (int layer, StubResult &stubResult)
 
void setValid (bool valid)
 

Public Attributes

std::function< void()> finalise
 

Private Attributes

int eta = 0
 eta at the 2nd muon station More...
 
int finalizeFunction = 0
 
unsigned int firedLayerBits = 0
 bits representing fired logicLayers (including bending layers), More...
 
unsigned int firedLayerCnt = 0
 Number of fired layers - excluding bending layers. More...
 
double gpProbability1 = 0
 
double gpProbability2 = 0
 
const OMTFConfigurationomtfConfig = nullptr
 
double pdfSum = 0
 Sum of pdfValues. More...
 
int phi = 0
 phi at the 2nd muon station (propagated refHitPhi) More...
 
int refHitPhi = 0
 phi of the reference hits More...
 
int refLayer = 0
 
StubResults stubResults
 
bool valid = false
 

Friends

std::ostream & operator<< (std::ostream &out, const GoldenPatternResult &aResult)
 

Detailed Description

Definition at line 11 of file GoldenPatternResult.h.

Constructor & Destructor Documentation

◆ GoldenPatternResult() [1/2]

GoldenPatternResult::GoldenPatternResult ( )
inline

Definition at line 95 of file GoldenPatternResult.h.

95 {};

◆ GoldenPatternResult() [2/2]

GoldenPatternResult::GoldenPatternResult ( const OMTFConfiguration omtfConfig)

Definition at line 16 of file GoldenPatternResult.cc.

References finalise0().

17  : finalise([this]() { finalise0(); }), omtfConfig(omtfConfig) {
18  if (omtfConfig)
20 }
const OMTFConfiguration * omtfConfig
std::function< void()> finalise
void init(const OMTFConfiguration *omtfConfig)

Member Function Documentation

◆ finalise0()

void GoldenPatternResult::finalise0 ( )

Definition at line 107 of file GoldenPatternResult.cc.

References firedLayerBits, firedLayerCnt, OMTFConfiguration::fwVersion(), OMTFConfiguration::getBendingLayers(), OMTFConfiguration::getLogicToLogic(), omtfConfig, pdfSum, stubResults, and valid.

Referenced by GoldenPatternResult(), and init().

107  {
108  for (unsigned int iLogicLayer = 0; iLogicLayer < stubResults.size(); ++iLogicLayer) {
109  unsigned int connectedLayer = omtfConfig->getLogicToLogic().at(iLogicLayer);
110  //here we require that in case of the DT layers, both phi and phiB is fired
111  if (firedLayerBits & (1 << connectedLayer)) {
112  if (firedLayerBits & (1 << iLogicLayer)) {
113  //now in the GoldenPattern::process1Layer1RefLayer the pdf bin 0 is returned when the layer is not fired, so this is 'if' is to assured that this pdf val is not added here
114  pdfSum += stubResults[iLogicLayer].getPdfVal();
115 
116  if (omtfConfig->fwVersion() <= 4) {
117  if (!omtfConfig->getBendingLayers().count(iLogicLayer))
118  //in DT case, the phi and phiB layers are threaded as one, so the firedLayerCnt is increased only for the phi layer
119  firedLayerCnt++;
120  } else
121  firedLayerCnt++;
122  }
123  } else {
124  firedLayerBits &= ~(1 << iLogicLayer);
125  }
126  }
127 
128  valid = true;
129  //by default result becomes valid here, but can be overwritten later
130 }
unsigned int firedLayerBits
bits representing fired logicLayers (including bending layers),
const OMTFConfiguration * omtfConfig
unsigned int fwVersion() const
const std::map< int, int > & getLogicToLogic() const
const std::set< int > & getBendingLayers() const
double pdfSum
Sum of pdfValues.
unsigned int firedLayerCnt
Number of fired layers - excluding bending layers.

◆ finalise1()

void GoldenPatternResult::finalise1 ( )

Definition at line 135 of file GoldenPatternResult.cc.

References firedLayerBits, firedLayerCnt, pdfSum, stubResults, and valid.

Referenced by init().

135  {
136  //cout<<__FUNCTION__<<":"<<__LINE__<<endl;
137  for (unsigned int iLogicLayer = 0; iLogicLayer < stubResults.size(); ++iLogicLayer) {
138  //in this version we do not require that both phi and phiB is fired (non-zero), we thread them just independent
139  //watch out that then the number of fired layers is bigger, and the cut on the minimal number of fired layers does not work in the same way as when the dt chamber is counted as one layer
140  //TODO check if it affects performance
141  pdfSum += stubResults[iLogicLayer].getPdfVal();
142  firedLayerCnt += ((firedLayerBits & (1 << iLogicLayer)) != 0);
143  }
144 
145  valid = true;
146  //by default result becomes valid here, but can be overwritten later
147 }
unsigned int firedLayerBits
bits representing fired logicLayers (including bending layers),
double pdfSum
Sum of pdfValues.
unsigned int firedLayerCnt
Number of fired layers - excluding bending layers.

◆ finalise2()

void GoldenPatternResult::finalise2 ( )

Definition at line 152 of file GoldenPatternResult.cc.

References firedLayerBits, firedLayerCnt, OMTFConfiguration::getBendingLayers(), OMTFConfiguration::getLogicToLogic(), omtfConfig, pdfSum, stubResults, and valid.

Referenced by init().

152  {
153  pdfSum = 1.;
154  firedLayerCnt = 0;
155  for (unsigned int iLogicLayer = 0; iLogicLayer < stubResults.size(); ++iLogicLayer) {
156  unsigned int connectedLayer = omtfConfig->getLogicToLogic().at(iLogicLayer);
157  //here we require that in case of the DT layers, both phi and phiB is fired
158  if (firedLayerBits & (1 << connectedLayer)) {
159  //now in the GoldenPattern::process1Layer1RefLayer the pdf bin 0 is returned when the layer is not fired, so this is 'if' is to assured that this pdf val is not added here
160  if (firedLayerBits & (1 << iLogicLayer)) {
161  pdfSum *= stubResults[iLogicLayer].getPdfVal();
162  //in DT case, the phi and phiB layers are threaded as one, so the firedLayerCnt is increased only for the phi layer
163  if (!omtfConfig->getBendingLayers().count(iLogicLayer))
164  firedLayerCnt++;
165  }
166  } else {
167  firedLayerBits &= ~(1 << iLogicLayer);
168  }
169  }
170 
171  if (firedLayerCnt < 3)
172  pdfSum = 0;
173 
174  valid = true;
175  //by default result becomes valid here, but can be overwritten later
176 }
unsigned int firedLayerBits
bits representing fired logicLayers (including bending layers),
const OMTFConfiguration * omtfConfig
const std::map< int, int > & getLogicToLogic() const
const std::set< int > & getBendingLayers() const
double pdfSum
Sum of pdfValues.
unsigned int firedLayerCnt
Number of fired layers - excluding bending layers.

◆ finalise3()

void GoldenPatternResult::finalise3 ( )

Definition at line 181 of file GoldenPatternResult.cc.

References firedLayerCnt, pdfSum, stubResults, and valid.

Referenced by init().

181  {
182  firedLayerCnt = 0;
183  for (unsigned int iLogicLayer = 0; iLogicLayer < stubResults.size(); ++iLogicLayer) {
184  //in this version we do not require that both phi and phiB is fired (non-zero), we thread them just independent
185  //watch out that then the number of fired layers is bigger, and the cut on the minimal number of fired layers dies not work in the same way as when the dt chamber is counted as one layer
186  //TODO check if it affects performance
187  pdfSum += stubResults[iLogicLayer].getPdfVal();
188 
189  if (stubResults[iLogicLayer].getMuonStub())
190  firedLayerCnt++;
191  }
192 
193  valid = true;
194  //by default result becomes valid here, but can be overwritten later
195 }
double pdfSum
Sum of pdfValues.
unsigned int firedLayerCnt
Number of fired layers - excluding bending layers.

◆ finalise5()

void GoldenPatternResult::finalise5 ( )

Definition at line 197 of file GoldenPatternResult.cc.

References firedLayerBits, firedLayerCnt, OMTFConfiguration::getLogicToLogic(), OMTFConfiguration::isBendingLayer(), omtfConfig, pdfSum, stubResults, and valid.

Referenced by init().

197  {
198  for (unsigned int iLogicLayer = 0; iLogicLayer < stubResults.size(); ++iLogicLayer) {
199  unsigned int connectedLayer = omtfConfig->getLogicToLogic().at(iLogicLayer);
200 
201  if (omtfConfig->isBendingLayer(iLogicLayer)) { //the DT phiB layer is counted only when the phi layer is fired
202  if ((firedLayerBits & (1 << iLogicLayer)) && (firedLayerBits & (1 << connectedLayer))) {
203  pdfSum += stubResults[iLogicLayer].getPdfVal();
204  firedLayerCnt++;
205  } else {
206  firedLayerBits &= ~(1 << iLogicLayer);
207  stubResults[iLogicLayer].setValid(false);
208  //in principle the stun should be also removed from the stubResults[iLogicLayer], on the other hand ini this way can be used e.g. for debug
209  }
210  } else if (firedLayerBits & (1 << iLogicLayer)) {
211  pdfSum += stubResults[iLogicLayer].getPdfVal();
212  firedLayerCnt++;
213  }
214  }
215 
216  valid = true;
217  //by default result becomes valid here, but can be overwritten later
218 }
unsigned int firedLayerBits
bits representing fired logicLayers (including bending layers),
const OMTFConfiguration * omtfConfig
const std::map< int, int > & getLogicToLogic() const
double pdfSum
Sum of pdfValues.
unsigned int firedLayerCnt
Number of fired layers - excluding bending layers.
bool isBendingLayer(unsigned int iLayer) const override

◆ finalise6()

void GoldenPatternResult::finalise6 ( )

Definition at line 220 of file GoldenPatternResult.cc.

References firedLayerBits, firedLayerCnt, OMTFConfiguration::getLogicToLogic(), OMTFConfiguration::isBendingLayer(), omtfConfig, pdfSum, stubResults, and valid.

Referenced by init().

220  {
221  for (unsigned int iLogicLayer = 0; iLogicLayer < stubResults.size(); ++iLogicLayer) {
222  unsigned int connectedLayer = omtfConfig->getLogicToLogic().at(iLogicLayer);
223 
224  if (omtfConfig->isBendingLayer(iLogicLayer)) { //the DT phiB layer is counted only when the phi layer is fired
225  if ((firedLayerBits & (1 << iLogicLayer)) && (firedLayerBits & (1 << connectedLayer)) &&
226  (stubResults[iLogicLayer].getMuonStub()->qualityHw >= 4)) {
227  pdfSum += stubResults[iLogicLayer].getPdfVal();
228  firedLayerCnt++;
229  } else {
230  firedLayerBits &= ~(1 << iLogicLayer);
231  stubResults[iLogicLayer].setValid(false);
232  //in principle the stun should be also removed from the stubResults[iLogicLayer], on the other hand ini this way can be used e.g. for debug
233  }
234  } else if (firedLayerBits & (1 << iLogicLayer)) {
235  pdfSum += stubResults[iLogicLayer].getPdfVal();
236  firedLayerCnt++;
237  }
238  }
239 
240  valid = true;
241  //by default result becomes valid here, but can be overwritten later
242 }
unsigned int firedLayerBits
bits representing fired logicLayers (including bending layers),
const OMTFConfiguration * omtfConfig
const std::map< int, int > & getLogicToLogic() const
double pdfSum
Sum of pdfValues.
unsigned int firedLayerCnt
Number of fired layers - excluding bending layers.
bool isBendingLayer(unsigned int iLayer) const override

◆ finalise7()

void GoldenPatternResult::finalise7 ( )

Definition at line 244 of file GoldenPatternResult.cc.

References firedLayerBits, firedLayerCnt, pdfSum, stubResults, and valid.

Referenced by init().

244  {
245  for (unsigned int iLogicLayer = 0; iLogicLayer < stubResults.size(); ++iLogicLayer) {
246  pdfSum += stubResults[iLogicLayer].getPdfVal();
247  if (firedLayerBits & (1 << iLogicLayer)) {
248  firedLayerCnt++;
249  }
250  }
251 
252  valid = true;
253  //by default result becomes valid here, but can be overwritten later
254 }
unsigned int firedLayerBits
bits representing fired logicLayers (including bending layers),
double pdfSum
Sum of pdfValues.
unsigned int firedLayerCnt
Number of fired layers - excluding bending layers.

◆ finalise8()

void GoldenPatternResult::finalise8 ( )

Definition at line 256 of file GoldenPatternResult.cc.

References firedLayerBits, firedLayerCnt, OMTFConfiguration::getLogicToLogic(), OMTFConfiguration::isBendingLayer(), omtfConfig, pdfSum, stubResults, and valid.

Referenced by init().

256  {
257  for (unsigned int iLogicLayer = 0; iLogicLayer < stubResults.size(); ++iLogicLayer) {
258  pdfSum += stubResults[iLogicLayer].getPdfVal(); //pdfSum is counted always
259 
260  unsigned int connectedLayer = omtfConfig->getLogicToLogic().at(iLogicLayer);
261  if (omtfConfig->isBendingLayer(iLogicLayer)) { //the DT phiB layer is counted only when the phi layer is fired
262  if ((firedLayerBits & (1 << iLogicLayer)) && (firedLayerBits & (1 << connectedLayer))) {
263  // && (stubResults[iLogicLayer].getMuonStub()->qualityHw >= 4) this is not needed, as the rejecting the low quality phiB hits is on the input of the algorithm
264  firedLayerCnt++;
265  } else {
266  firedLayerBits &= ~(1 << iLogicLayer);
267  stubResults[iLogicLayer].setValid(false);
268  //in principle the stub should be also removed from the stubResults[iLogicLayer], on the other hand in this way can be used e.g. for debug
269  }
270  } else if (firedLayerBits & (1 << iLogicLayer)) {
271  firedLayerCnt++;
272  }
273  }
274 
275  valid = true;
276  //by default result becomes valid here, but can be overwritten later
277 }
unsigned int firedLayerBits
bits representing fired logicLayers (including bending layers),
const OMTFConfiguration * omtfConfig
const std::map< int, int > & getLogicToLogic() const
double pdfSum
Sum of pdfValues.
unsigned int firedLayerCnt
Number of fired layers - excluding bending layers.
bool isBendingLayer(unsigned int iLayer) const override

◆ finalise9()

void GoldenPatternResult::finalise9 ( )

Definition at line 279 of file GoldenPatternResult.cc.

References firedLayerBits, firedLayerCnt, OMTFConfiguration::getLogicToLogic(), OMTFConfiguration::isBendingLayer(), omtfConfig, pdfSum, stubResults, and valid.

Referenced by init().

279  {
280  for (unsigned int iLogicLayer = 0; iLogicLayer < stubResults.size(); ++iLogicLayer) {
281  unsigned int connectedLayer = omtfConfig->getLogicToLogic().at(iLogicLayer);
282 
283  if (omtfConfig->isBendingLayer(iLogicLayer)) { //the DT phiB layer is counted only when the phi layer is fired
284  if (firedLayerBits & (1 << iLogicLayer)) {
285  if (firedLayerBits & (1 << connectedLayer)) {
286  firedLayerCnt++;
287  pdfSum += stubResults[iLogicLayer].getPdfVal();
288  } else {
289  firedLayerBits &= ~(1 << iLogicLayer);
290  stubResults[iLogicLayer].setValid(false);
291  //there was hit, but it did not fit to the pdf - this is not possible here, since the bending layer is fired here
292  //therefore the below line is has no sense
293  //if(stubResults[iLogicLayer].getPdfVal() == 0) pdfSum -= 64;;
294  //so in this case simply:
295  //pdfSum += 0;
296  }
297  } else {
298  //bending layer fired, but not fits to the pdf, N.B works only with the patterns having "no hit value" and with noHitValueInPdf = True
299  if (stubResults[iLogicLayer].getPdfVal() == 0)
300  pdfSum -= 32;
301  else
302  pdfSum += stubResults[iLogicLayer].getPdfVal(); //bending layer not fired at all
303  }
304  } else {
305  if (iLogicLayer < 10 && stubResults[iLogicLayer].getPdfVal() == 0)
306  pdfSum -= 32;
307  else
308  pdfSum += stubResults[iLogicLayer].getPdfVal();
309  if (firedLayerBits & (1 << iLogicLayer)) { //pdfSum is counted always
310  firedLayerCnt++;
311  }
312  }
313  }
314 
315  valid = true;
316  //by default result becomes valid here, but can be overwritten later
317 }
unsigned int firedLayerBits
bits representing fired logicLayers (including bending layers),
const OMTFConfiguration * omtfConfig
const std::map< int, int > & getLogicToLogic() const
double pdfSum
Sum of pdfValues.
unsigned int firedLayerCnt
Number of fired layers - excluding bending layers.
bool isBendingLayer(unsigned int iLayer) const override

◆ getEta()

int GoldenPatternResult::getEta ( ) const
inline

Definition at line 65 of file GoldenPatternResult.h.

References eta.

Referenced by AlgoMuon::getEtaHw().

65 { return eta; }
int eta
eta at the 2nd muon station

◆ getFiredLayerBits()

unsigned int GoldenPatternResult::getFiredLayerBits ( ) const
inline

Definition at line 69 of file GoldenPatternResult.h.

References firedLayerBits.

Referenced by AlgoMuon::getFiredLayerBits().

69 { return firedLayerBits; }
unsigned int firedLayerBits
bits representing fired logicLayers (including bending layers),

◆ getFiredLayerCnt()

unsigned int GoldenPatternResult::getFiredLayerCnt ( ) const
inline

Definition at line 73 of file GoldenPatternResult.h.

References firedLayerCnt.

Referenced by AlgoMuon::getFiredLayerCnt(), and operator<<().

73 { return firedLayerCnt; }
unsigned int firedLayerCnt
Number of fired layers - excluding bending layers.

◆ getGpProbability1()

double GoldenPatternResult::getGpProbability1 ( ) const
inline

Definition at line 127 of file GoldenPatternResult.h.

References gpProbability1.

Referenced by operator<<().

127 { return gpProbability1; }

◆ getGpProbability2()

double GoldenPatternResult::getGpProbability2 ( ) const
inline

Definition at line 131 of file GoldenPatternResult.h.

References gpProbability2.

Referenced by operator<<().

131 { return gpProbability2; }

◆ getPdfSum()

PdfValueType GoldenPatternResult::getPdfSum ( ) const
inline

Definition at line 81 of file GoldenPatternResult.h.

References pdfSum.

Referenced by AlgoMuon::getDisc(), AlgoMuon::getPdfSum(), and operator<<().

81 { return pdfSum; }
double pdfSum
Sum of pdfValues.

◆ getPhi()

int GoldenPatternResult::getPhi ( ) const
inline

Definition at line 85 of file GoldenPatternResult.h.

References phi.

Referenced by AlgoMuon::getPhi().

85 { return phi; }
int phi
phi at the 2nd muon station (propagated refHitPhi)

◆ getRefHitPhi()

int GoldenPatternResult::getRefHitPhi ( ) const
inline

Definition at line 89 of file GoldenPatternResult.h.

References refHitPhi.

Referenced by AlgoMuon::getPhiRHit().

89 { return refHitPhi; }
int refHitPhi
phi of the reference hits

◆ getRefLayer()

int GoldenPatternResult::getRefLayer ( ) const
inline

Definition at line 61 of file GoldenPatternResult.h.

References refLayer.

Referenced by AlgoMuon::getRefLayer(), operator<<(), and XMLConfigWriter::writeResultsData().

61 { return this->refLayer; }

◆ getStubResults()

const StubResults& GoldenPatternResult::getStubResults ( ) const
inline

◆ init()

void GoldenPatternResult::init ( const OMTFConfiguration omtfConfig)

Definition at line 60 of file GoldenPatternResult.cc.

References finalise, finalise0(), finalise1(), finalise2(), finalise3(), finalise5(), finalise6(), finalise7(), finalise8(), finalise9(), finalizeFunction, OMTFConfiguration::getGoldenPatternResultFinalizeFunction(), OMTFConfiguration::nLayers(), omtfConfig, reset(), and stubResults.

60  {
61  this->omtfConfig = omtfConfig;
62 
64 
65  if (finalizeFunction == 1)
66  finalise = [this]() { finalise1(); };
67  else if (finalizeFunction == 2)
68  finalise = [this]() { finalise2(); };
69  else if (finalizeFunction == 3)
70  finalise = [this]() { finalise3(); };
71  else if (finalizeFunction == 5)
72  finalise = [this]() { finalise5(); };
73  else if (finalizeFunction == 6)
74  finalise = [this]() { finalise6(); };
75  else if (finalizeFunction == 7)
76  finalise = [this]() { finalise7(); };
77  else if (finalizeFunction == 8)
78  finalise = [this]() { finalise8(); };
79  else if (finalizeFunction == 9)
80  finalise = [this]() { finalise9(); };
81  else
82  finalise = [this]() { finalise0(); };
83 
85  reset();
86 }
const OMTFConfiguration * omtfConfig
std::function< void()> finalise
int getGoldenPatternResultFinalizeFunction() const
unsigned int nLayers() const

◆ isLayerFired()

bool GoldenPatternResult::isLayerFired ( unsigned int  iLayer) const
inline

Definition at line 93 of file GoldenPatternResult.h.

References firedLayerBits.

Referenced by operator<<().

93 { return firedLayerBits & (1 << iLayer); }
unsigned int firedLayerBits
bits representing fired logicLayers (including bending layers),

◆ isValid()

bool GoldenPatternResult::isValid ( void  ) const
inline

◆ reset()

void GoldenPatternResult::reset ( void  )

Definition at line 88 of file GoldenPatternResult.cc.

References eta, firedLayerBits, firedLayerCnt, gpProbability1, gpProbability2, pdfSum, phi, refHitPhi, refLayer, stubResults, and valid.

Referenced by init().

88  {
89  for (auto& stubResult : stubResults) {
90  stubResult.reset();
91  }
92  valid = false;
93  refLayer = -1;
94  phi = 0;
95  eta = 0;
96  pdfSum = 0;
97  firedLayerCnt = 0;
98  firedLayerBits = 0;
99  refHitPhi = 0;
100  gpProbability1 = 0;
101  gpProbability2 = 0;
102 }
unsigned int firedLayerBits
bits representing fired logicLayers (including bending layers),
int eta
eta at the 2nd muon station
double pdfSum
Sum of pdfValues.
unsigned int firedLayerCnt
Number of fired layers - excluding bending layers.
int phi
phi at the 2nd muon station (propagated refHitPhi)
int refHitPhi
phi of the reference hits

◆ set()

void GoldenPatternResult::set ( int  refLayer,
int  phi,
int  eta,
int  refHitPhi 
)

Definition at line 25 of file GoldenPatternResult.cc.

References cms::cuda::assert(), gather_cfg::cout, eta, isValid(), phi, refHitPhi, and refLayer.

25  {
26  if (isValid() && this->refLayer != refLayer_) {
27  std::cout << __FUNCTION__ << " " << __LINE__ << " this->refLayer " << this->refLayer << " refLayer_ " << refLayer_
28  << std::endl;
29  }
30  assert(!isValid() || this->refLayer == refLayer_);
31 
32  this->refLayer = refLayer_;
33  this->phi = phi;
34  this->eta = eta;
35  this->refHitPhi = refHitPhi;
36 }
assert(be >=bs)
int eta
eta at the 2nd muon station
int phi
phi at the 2nd muon station (propagated refHitPhi)
int refHitPhi
phi of the reference hits

◆ setEta()

void GoldenPatternResult::setEta ( int  eta)
inline

Definition at line 67 of file GoldenPatternResult.h.

References eta.

Referenced by AlgoMuon::setEta().

67 { this->eta = eta; }
int eta
eta at the 2nd muon station

◆ setFiredLayerBits()

void GoldenPatternResult::setFiredLayerBits ( unsigned int  firedLayerBits)
inline

Definition at line 71 of file GoldenPatternResult.h.

References firedLayerBits.

71 { this->firedLayerBits = firedLayerBits; }
unsigned int firedLayerBits
bits representing fired logicLayers (including bending layers),

◆ setFiredLayerCnt()

void GoldenPatternResult::setFiredLayerCnt ( unsigned int  firedLayerCnt)
inline

Definition at line 75 of file GoldenPatternResult.h.

References firedLayerCnt.

75 { this->firedLayerCnt = firedLayerCnt; }
unsigned int firedLayerCnt
Number of fired layers - excluding bending layers.

◆ setGpProbability1()

void GoldenPatternResult::setGpProbability1 ( double  probability1 = 0)
inline

Definition at line 129 of file GoldenPatternResult.h.

129 { this->gpProbability1 = probability1; }

◆ setGpProbability2()

void GoldenPatternResult::setGpProbability2 ( double  probability2 = 0)
inline

Definition at line 133 of file GoldenPatternResult.h.

133 { this->gpProbability2 = probability2; }

◆ setPhi()

void GoldenPatternResult::setPhi ( int  phi)
inline

Definition at line 87 of file GoldenPatternResult.h.

References phi.

87 { this->phi = phi; }
int phi
phi at the 2nd muon station (propagated refHitPhi)

◆ setRefHitPhi()

void GoldenPatternResult::setRefHitPhi ( int  refHitPhi)
inline

Definition at line 91 of file GoldenPatternResult.h.

References refHitPhi.

91 { this->refHitPhi = refHitPhi; }
int refHitPhi
phi of the reference hits

◆ setRefLayer()

void GoldenPatternResult::setRefLayer ( int  refLayer)
inline

Definition at line 63 of file GoldenPatternResult.h.

References refLayer.

◆ setStubResult() [1/2]

void GoldenPatternResult::setStubResult ( float  pdfVal,
bool  valid,
int  pdfBin,
int  layer,
MuonStubPtr  stub 
)

Definition at line 38 of file GoldenPatternResult.cc.

References firedLayerBits, nano_mu_digi_cff::layer, stubResults, and valid.

38  {
39  if (valid) {
40  //pdfSum and firedLayerBits is calculated in finaliseX()
41  firedLayerBits |= (1 << layer);
42  }
43  stubResults[layer] = StubResult(pdfVal, valid, pdfBin, layer, stub);
44 
45  //stub result is added even thought it is not valid since this might be needed for debugging or optimization
46 }
unsigned int firedLayerBits
bits representing fired logicLayers (including bending layers),

◆ setStubResult() [2/2]

void GoldenPatternResult::setStubResult ( int  layer,
StubResult stubResult 
)

Definition at line 48 of file GoldenPatternResult.cc.

References firedLayerBits, StubResult::getValid(), nano_mu_digi_cff::layer, and stubResults.

48  {
49  if (stubResult.getValid()) {
50  //pdfSum and firedLayerBits is calculated in finaliseX()
51  firedLayerBits |= (1 << layer);
52  }
53  stubResults[layer] = stubResult;
54 
55  //stub result is added even thought it is not valid since this might be needed for debugging or optimization
56 }
unsigned int firedLayerBits
bits representing fired logicLayers (including bending layers),
bool getValid() const
Definition: StubResult.h:27

◆ setValid()

void GoldenPatternResult::setValid ( bool  valid)
inline

Definition at line 53 of file GoldenPatternResult.h.

References valid.

53 { this->valid = valid; }

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  out,
const GoldenPatternResult aResult 
)
friend

Definition at line 321 of file GoldenPatternResult.cc.

321  {
322  unsigned int refLayerLogicNum = gpResult.omtfConfig->getRefToLogicNumber()[gpResult.getRefLayer()];
323 
324  unsigned int sumOverFiredLayers = 0;
325  for (unsigned int iLogicLayer = 0; iLogicLayer < gpResult.stubResults.size(); ++iLogicLayer) {
326  out << " layer: " << std::setw(2) << iLogicLayer << " hit: ";
327  if (gpResult.stubResults[iLogicLayer].getMuonStub()) {
328  out << std::setw(4)
329  << (gpResult.omtfConfig->isBendingLayer(iLogicLayer)
330  ? gpResult.stubResults[iLogicLayer].getMuonStub()->phiBHw
331  : gpResult.stubResults[iLogicLayer].getMuonStub()->phiHw);
332 
333  out << " pdfBin: " << std::setw(4) << gpResult.stubResults[iLogicLayer].getPdfBin() << " pdfVal: " << std::setw(3)
334  << gpResult.stubResults[iLogicLayer].getPdfVal() << " fired " << gpResult.isLayerFired(iLogicLayer)
335  << (iLogicLayer == refLayerLogicNum ? " <<< refLayer" : "");
336 
337  if (gpResult.isLayerFired(iLogicLayer))
338  sumOverFiredLayers += gpResult.stubResults[iLogicLayer].getPdfVal();
339  } else if (gpResult.stubResults[iLogicLayer].getPdfVal()) {
340  out << " pdfVal: " << std::setw(3) << gpResult.stubResults[iLogicLayer].getPdfVal();
341  }
342  out << std::endl;
343  }
344 
345  out << " refLayer: ";
346  out << gpResult.getRefLayer() << "\t";
347 
348  out << " Sum over layers: ";
349  out << gpResult.getPdfSum() << "\t";
350 
351  out << " sumOverFiredLayers: ";
352  out << sumOverFiredLayers << "\t";
353 
354  out << " Number of hits: ";
355  out << gpResult.getFiredLayerCnt() << "\t";
356 
357  out << " GpProbability1: ";
358  out << gpResult.getGpProbability1() << "\t";
359 
360  out << " GpProbability2: ";
361  out << gpResult.getGpProbability2() << "\t";
362 
363  out << std::endl;
364 
365  return out;
366 }

Member Data Documentation

◆ eta

int GoldenPatternResult::eta = 0
private

eta at the 2nd muon station

Definition at line 23 of file GoldenPatternResult.h.

Referenced by Particle.Particle::__str__(), getEta(), Jet.Jet::jetID(), Jet.Jet::puJetId(), reset(), set(), and setEta().

◆ finalise

std::function<void()> GoldenPatternResult::finalise

Definition at line 100 of file GoldenPatternResult.h.

Referenced by init().

◆ finalizeFunction

int GoldenPatternResult::finalizeFunction = 0
private

Definition at line 38 of file GoldenPatternResult.h.

Referenced by init().

◆ firedLayerBits

unsigned int GoldenPatternResult::firedLayerBits = 0
private

bits representing fired logicLayers (including bending layers),

Definition at line 33 of file GoldenPatternResult.h.

Referenced by finalise0(), finalise1(), finalise2(), finalise5(), finalise6(), finalise7(), finalise8(), finalise9(), getFiredLayerBits(), isLayerFired(), reset(), setFiredLayerBits(), and setStubResult().

◆ firedLayerCnt

unsigned int GoldenPatternResult::firedLayerCnt = 0
private

Number of fired layers - excluding bending layers.

Definition at line 30 of file GoldenPatternResult.h.

Referenced by finalise0(), finalise1(), finalise2(), finalise3(), finalise5(), finalise6(), finalise7(), finalise8(), finalise9(), getFiredLayerCnt(), reset(), and setFiredLayerCnt().

◆ gpProbability1

double GoldenPatternResult::gpProbability1 = 0
private

Definition at line 40 of file GoldenPatternResult.h.

Referenced by getGpProbability1(), and reset().

◆ gpProbability2

double GoldenPatternResult::gpProbability2 = 0
private

Definition at line 42 of file GoldenPatternResult.h.

Referenced by getGpProbability2(), and reset().

◆ omtfConfig

const OMTFConfiguration* GoldenPatternResult::omtfConfig = nullptr
private

◆ pdfSum

double GoldenPatternResult::pdfSum = 0
private

◆ phi

int GoldenPatternResult::phi = 0
private

phi at the 2nd muon station (propagated refHitPhi)

Definition at line 20 of file GoldenPatternResult.h.

Referenced by Particle.Particle::__str__(), getPhi(), ntupleDataFormat.Track::phiPull(), reset(), set(), and setPhi().

◆ refHitPhi

int GoldenPatternResult::refHitPhi = 0
private

phi of the reference hits

Definition at line 36 of file GoldenPatternResult.h.

Referenced by getRefHitPhi(), reset(), set(), and setRefHitPhi().

◆ refLayer

int GoldenPatternResult::refLayer = 0
private

Definition at line 17 of file GoldenPatternResult.h.

Referenced by getRefLayer(), reset(), set(), and setRefLayer().

◆ stubResults

StubResults GoldenPatternResult::stubResults
private

◆ valid

bool GoldenPatternResult::valid = false
private