File indexing completed on 2024-09-07 04:37:00
0001 #ifndef L1T_OmtfP1_GOLDENPATTERNRESULTS_H
0002 #define L1T_OmtfP1_GOLDENPATTERNRESULTS_H
0003
0004 #include "L1Trigger/L1TMuonOverlapPhase1/interface/MuonStub.h"
0005 #include "L1Trigger/L1TMuonOverlapPhase1/interface/Omtf/OMTFConfiguration.h"
0006 #include "L1Trigger/L1TMuonOverlapPhase1/interface/StubResult.h"
0007
0008 #include <ostream>
0009
0010
0011 class GoldenPatternResult {
0012 public:
0013 private:
0014 bool valid = false;
0015
0016
0017 int refLayer = 0;
0018
0019
0020 int phi = 0;
0021
0022
0023 int eta = 0;
0024
0025
0026 double pdfSum = 0;
0027
0028
0029
0030
0031 double pdfSumUnconstr = 0;
0032
0033
0034 unsigned int firedLayerCnt = 0;
0035
0036
0037 unsigned int firedLayerBits = 0;
0038
0039
0040 int refHitPhi = 0;
0041
0042 int finalizeFunction = 0;
0043
0044 double gpProbability1 = 0;
0045
0046 double gpProbability2 = 0;
0047
0048 StubResults stubResults;
0049
0050 public:
0051 void init(const OMTFConfiguration* omtfConfig);
0052
0053 void reset();
0054
0055 bool isValid() const { return valid; }
0056
0057 void setValid(bool valid) { this->valid = valid; }
0058
0059 void set(int refLayer, int phi, int eta, int refHitPhi);
0060
0061 void setStubResult(float pdfVal, bool valid, int pdfBin, int layer, MuonStubPtr stub);
0062
0063 void setStubResult(int layer, StubResult& stubResult);
0064
0065 int getRefLayer() const { return this->refLayer; }
0066
0067 void setRefLayer(int refLayer) { this->refLayer = refLayer; }
0068
0069 int getEta() const { return eta; }
0070
0071 void setEta(int eta) { this->eta = eta; }
0072
0073 unsigned int getFiredLayerBits() const { return firedLayerBits; }
0074
0075 void setFiredLayerBits(unsigned int firedLayerBits) { this->firedLayerBits = firedLayerBits; }
0076
0077 unsigned int getFiredLayerCnt() const { return firedLayerCnt; }
0078
0079 void setFiredLayerCnt(unsigned int firedLayerCnt) { this->firedLayerCnt = firedLayerCnt; }
0080
0081
0082
0083
0084
0085 PdfValueType getPdfSum() const { return pdfSum; }
0086
0087 PdfValueType getPdfSumUnconstr() const { return pdfSumUnconstr; }
0088
0089 const StubResults& getStubResults() const { return stubResults; }
0090
0091 int getPhi() const { return phi; }
0092
0093 void setPhi(int phi) { this->phi = phi; }
0094
0095 int getRefHitPhi() const { return refHitPhi; }
0096
0097 void setRefHitPhi(int refHitPhi) { this->refHitPhi = refHitPhi; }
0098
0099 bool isLayerFired(unsigned int iLayer) const { return firedLayerBits & (1 << iLayer); }
0100
0101 GoldenPatternResult() {}
0102
0103
0104 GoldenPatternResult(const OMTFConfiguration* omtfConfig);
0105
0106 std::function<void()> finalise;
0107
0108
0109 void finalise0();
0110
0111
0112 void finalise1();
0113
0114
0115 void finalise2();
0116
0117
0118 void finalise3();
0119
0120 void finalise5();
0121
0122 void finalise6();
0123
0124 void finalise7();
0125
0126 void finalise8();
0127
0128 void finalise9();
0129
0130 void finalise10();
0131
0132 void finalise11();
0133
0134
0135 friend std::ostream& operator<<(std::ostream& out, const GoldenPatternResult& aResult);
0136
0137 double getGpProbability1() const { return gpProbability1; }
0138
0139 void setGpProbability1(double probability1 = 0) { this->gpProbability1 = probability1; }
0140
0141 double getGpProbability2() const { return gpProbability2; }
0142
0143 void setGpProbability2(double probability2 = 0) { this->gpProbability2 = probability2; }
0144
0145 private:
0146 const OMTFConfiguration* omtfConfig = nullptr;
0147 };
0148
0149 #endif