CMS 3D CMS Logo

StubResult.h
Go to the documentation of this file.
1 /*
2  * StubResult.h
3  *
4  * Created on: Feb 6, 2019
5  * Author: Karol Bunkowski kbunkow@cern.ch
6  */
7 
8 #ifndef L1T_OmtfP1_STUBRESULT_H_
9 #define L1T_OmtfP1_STUBRESULT_H_
10 
12 #include <vector>
13 
14 class StubResult {
15 public:
16  StubResult() {} //empty result
17 
20 
21  const MuonStubPtr& getMuonStub() const { return stub; }
22 
23  int getPdfBin() const { return pdfBin; }
24 
25  float getPdfVal() const { return pdfVal; }
26 
27  void setPdfVal(float pdfVal) { this->pdfVal = pdfVal; }
28 
29  bool getValid() const { return valid; }
30 
31  void setValid(bool valid) { this->valid = valid; }
32 
33  int getLayer() const { return layer; }
34 
35  void reset() {
36  pdfVal = 0;
37  valid = false;
38  pdfBin = 0;
39  layer = 0;
40  stub.reset();
41  }
42 
43 private:
44  float pdfVal = 0;
45  bool valid = false;
46 
47  //stub and pdfBin should be needed only for debug, testing, generating patterns, etc, but rather not in the firmware
48  int pdfBin = 0;
49 
50  //n.b, layer might be different then the the stub->layer, because it might be the result of the bending layer (how about eta?)
51  int layer = 0;
52 
54 };
55 
56 typedef std::vector<StubResult> StubResults;
57 
58 #endif /* L1T_OmtfP1_STUBRESULT_H_ */
int pdfBin
Definition: StubResult.h:48
int getPdfBin() const
Definition: StubResult.h:23
float pdfVal
Definition: StubResult.h:44
float getPdfVal() const
Definition: StubResult.h:25
StubResult(float pdfVal, bool valid, int pdfBin, int layer, MuonStubPtr stub)
Definition: StubResult.h:18
const MuonStubPtr & getMuonStub() const
Definition: StubResult.h:21
int getLayer() const
Definition: StubResult.h:33
MuonStubPtr stub
Definition: StubResult.h:53
void setPdfVal(float pdfVal)
Definition: StubResult.h:27
bool getValid() const
Definition: StubResult.h:29
std::shared_ptr< MuonStub > MuonStubPtr
Definition: MuonStub.h:67
bool valid
Definition: StubResult.h:45
void reset()
Definition: StubResult.h:35
std::vector< StubResult > StubResults
Definition: StubResult.h:56
void setValid(bool valid)
Definition: StubResult.h:31