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  bool getValid() const { return valid; }
28 
29  void setValid(bool valid) { this->valid = valid; }
30 
31  int getLayer() const { return layer; }
32 
33  void reset() {
34  pdfVal = 0;
35  valid = false;
36  pdfBin = 0;
37  layer = 0;
38  stub.reset();
39  }
40 
41 private:
42  float pdfVal = 0;
43  bool valid = false;
44 
45  //stub and pdfBin should be needed only for debug, testing, generating patterns, etc, but rather not in the firmware
46  int pdfBin = 0;
47 
48  //n.b, layer might be different then the the stub->layer, because it might be the result of the bending layer (how about eta?)
49  int layer = 0;
50 
52 };
53 
54 typedef std::vector<StubResult> StubResults;
55 
56 #endif /* L1T_OmtfP1_STUBRESULT_H_ */
int pdfBin
Definition: StubResult.h:46
int getPdfBin() const
Definition: StubResult.h:23
float pdfVal
Definition: StubResult.h:42
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:31
MuonStubPtr stub
Definition: StubResult.h:51
bool getValid() const
Definition: StubResult.h:27
std::shared_ptr< MuonStub > MuonStubPtr
Definition: MuonStub.h:67
bool valid
Definition: StubResult.h:43
void reset()
Definition: StubResult.h:33
std::vector< StubResult > StubResults
Definition: StubResult.h:54
void setValid(bool valid)
Definition: StubResult.h:29