CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 
19  : pdfVal(pdfVal), valid(valid), pdfBin(pdfBin), layer(layer), stub(stub) {}
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 getLayer() const
Definition: StubResult.h:31
int pdfBin
Definition: StubResult.h:46
float pdfVal
Definition: StubResult.h:42
StubResult(float pdfVal, bool valid, int pdfBin, int layer, MuonStubPtr stub)
Definition: StubResult.h:18
bool getValid() const
Definition: StubResult.h:27
float getPdfVal() const
Definition: StubResult.h:25
MuonStubPtr stub
Definition: StubResult.h:51
int getPdfBin() const
Definition: StubResult.h:23
bool valid
Definition: StubResult.h:43
const MuonStubPtr & getMuonStub() const
Definition: StubResult.h:21
std::shared_ptr< const MuonStub > MuonStubPtr
Definition: MuonStub.h:64
void reset()
Definition: StubResult.h:33
std::vector< StubResult > StubResults
Definition: StubResult.h:54
void setValid(bool valid)
Definition: StubResult.h:29