Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 11:12:51

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   bool getValid() const { return valid; }
0028 
0029   void setValid(bool valid) { this->valid = valid; }
0030 
0031   int getLayer() const { return layer; }
0032 
0033   void reset() {
0034     pdfVal = 0;
0035     valid = false;
0036     pdfBin = 0;
0037     layer = 0;
0038     stub.reset();
0039   }
0040 
0041 private:
0042   float pdfVal = 0;
0043   bool valid = false;
0044 
0045   //stub and pdfBin should be needed only for debug, testing, generating patterns, etc, but rather not in the firmware
0046   int pdfBin = 0;
0047 
0048   //n.b, layer might be different then the the stub->layer, because it might be the result of the bending layer (how about eta?)
0049   int layer = 0;
0050 
0051   MuonStubPtr stub;
0052 };
0053 
0054 typedef std::vector<StubResult> StubResults;
0055 
0056 #endif /* L1T_OmtfP1_STUBRESULT_H_ */