Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-05-15 04:21:50

0001 /*
0002  * StubResult.h
0003  *
0004  *  Created on: Feb 6, 2019
0005  *      Author: Karol Bunkowski kbunkow@cern.ch
0006  */
0007 
0008 #ifndef L1T_OmtfP1_STUBRESULT_H_
0009 #define L1T_OmtfP1_STUBRESULT_H_
0010 
0011 #include "L1Trigger/L1TMuonOverlapPhase1/interface/MuonStub.h"
0012 #include <vector>
0013 
0014 class StubResult {
0015 public:
0016   StubResult() {}  //empty result
0017 
0018   StubResult(float pdfVal, bool valid, int pdfBin, int layer, MuonStubPtr stub)
0019       : pdfVal(pdfVal), valid(valid), pdfBin(pdfBin), layer(layer), stub(stub) {}
0020 
0021   const MuonStubPtr& getMuonStub() const { return stub; }
0022 
0023   int getPdfBin() const { return pdfBin; }
0024 
0025   float getPdfVal() const { return pdfVal; }
0026 
0027   void setPdfVal(float pdfVal) { this->pdfVal = pdfVal; }
0028 
0029   bool getValid() const { return valid; }
0030 
0031   void setValid(bool valid) { this->valid = valid; }
0032 
0033   int getLayer() const { return layer; }
0034 
0035   void reset() {
0036     pdfVal = 0;
0037     valid = false;
0038     pdfBin = 0;
0039     layer = 0;
0040     stub.reset();
0041   }
0042 
0043 private:
0044   float pdfVal = 0;
0045   bool valid = false;
0046 
0047   //stub and pdfBin should be needed only for debug, testing, generating patterns, etc, but rather not in the firmware
0048   int pdfBin = 0;
0049 
0050   //n.b, layer might be different then the the stub->layer, because it might be the result of the bending layer (how about eta?)
0051   int layer = 0;
0052 
0053   MuonStubPtr stub;
0054 };
0055 
0056 typedef std::vector<StubResult> StubResults;
0057 
0058 #endif /* L1T_OmtfP1_STUBRESULT_H_ */