Skip to content

Commit

Permalink
Backport of 11_3_X changes without new gains
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyler-Lam committed Mar 31, 2021
1 parent 20a37ed commit d2df0ae
Show file tree
Hide file tree
Showing 12 changed files with 547 additions and 249 deletions.
1 change: 1 addition & 0 deletions L1Trigger/L1TMuonBarrel/BuildFile.xml
Expand Up @@ -4,6 +4,7 @@
<use name="CondFormats/L1TObjects"/>
<use name="CondFormats/DataRecord"/>
<use name="L1Trigger/L1TCommon"/>
<use name="hls"/>
<export>
<lib name="1"/>
</export>
27 changes: 25 additions & 2 deletions L1Trigger/L1TMuonBarrel/interface/L1TMuonBarrelKalmanAlgo.h
Expand Up @@ -38,10 +38,10 @@ class L1TMuonBarrelKalmanAlgo {
int correctedPhiB(const L1MuKBMTCombinedStubRef&);
void propagate(L1MuKBMTrack&);
void updateEta(L1MuKBMTrack&, const L1MuKBMTCombinedStubRef&);
bool update(L1MuKBMTrack&, const L1MuKBMTCombinedStubRef&, int);
bool update(L1MuKBMTrack&, const L1MuKBMTCombinedStubRef&, int, int);
bool updateOffline(L1MuKBMTrack&, const L1MuKBMTCombinedStubRef&);
bool updateOffline1D(L1MuKBMTrack&, const L1MuKBMTCombinedStubRef&);
bool updateLUT(L1MuKBMTrack&, const L1MuKBMTCombinedStubRef&, int);
bool updateLUT(L1MuKBMTrack&, const L1MuKBMTCombinedStubRef&, int, int);
void vertexConstraint(L1MuKBMTrack&);
void vertexConstraintOffline(L1MuKBMTrack&);
void vertexConstraintLUT(L1MuKBMTrack&);
Expand Down Expand Up @@ -106,6 +106,26 @@ class L1TMuonBarrelKalmanAlgo {
std::vector<int> combos2_;
std::vector<int> combos1_;

//bits for fixed point precision
static const int BITSCURV = 14;
static const int BITSPHI = 12;
static const int BITSPHIB = 13;
static const int BITSPARAM = 14;
static const int GAIN_0 = 9;
static const int GAIN_0INT = 6;
static const int GAIN_4 = 9;
static const int GAIN_4INT = 4;
static const int GAIN_V0 = 9;
static const int GAIN_V0INT = 3;

static const int GAIN2_0 = 12;
static const int GAIN2_0INT = 8;
static const int GAIN2_1 = 12;
static const int GAIN2_1INT = 4;
static const int GAIN2_4 = 12;
static const int GAIN2_4INT = 4;
static const int GAIN2_5 = 12;
static const int GAIN2_5INT = 0;
//STUFF NOT USED IN THE FIRMWARE BUT ONLY FOR DEBUGGING
///////////////////////////////////////////////////////

Expand All @@ -116,6 +136,9 @@ class L1TMuonBarrelKalmanAlgo {
double pointResolutionPhi_;
//point resolution for phiB
double pointResolutionPhiB_;
std::vector<double> pointResolutionPhiBH_;
std::vector<double> pointResolutionPhiBL_;
//double pointResolutionPhiB_;
//point resolution for vertex
double pointResolutionVertex_;

Expand Down
7 changes: 5 additions & 2 deletions L1Trigger/L1TMuonBarrel/interface/L1TMuonBarrelKalmanLUTs.h
Expand Up @@ -12,14 +12,17 @@ class L1TMuonBarrelKalmanLUTs {
~L1TMuonBarrelKalmanLUTs();

std::vector<float> trackGain(uint, uint, uint);
std::vector<float> trackGain2(uint, uint, uint);
std::vector<float> trackGain2(uint, uint, uint, uint, uint);
std::pair<float, float> vertexGain(uint, uint);
uint coarseEta(uint, uint);

private:
TFile *lutFile_;
std::map<uint, const TH1 *> lut_;
std::map<uint, const TH1 *> lut2_;
std::map<uint, const TH1 *> lut2HH_;
std::map<uint, const TH1 *> lut2LH_;
std::map<uint, const TH1 *> lut2HL_;
std::map<uint, const TH1 *> lut2LL_;
std::map<uint, const TH1 *> coarseEta_;
};

Expand Down
11 changes: 7 additions & 4 deletions L1Trigger/L1TMuonBarrel/python/simKBmtfDigis_cfi.py
Expand Up @@ -8,12 +8,12 @@
# eLoss = cms.vdouble(-2.85e-4,-6.21e-5,-1.26e-4,-1.23e-4),
eLoss = cms.vdouble(+0.000765,0,0,0),

aPhi = cms.vdouble(1.942,0.03125,0.0273438,0.015625),
aPhiB = cms.vdouble(-1.508,-0.123047,-0.174805,-0.144531),
aPhi = cms.vdouble(1.942, .01511, .01476, .009799),
aPhiB = cms.vdouble(-1.508,-0.1237,-0.1496,-0.1333),
aPhiBNLO = cms.vdouble(0.000331,0,0,0),

bPhi = cms.vdouble(-1,0.154297,0.173828,0.147461),
bPhiB = cms.vdouble(-1,1.15332,1.17285,1.14648),
bPhi = cms.vdouble(-1,.18245,.20898,.17286),
bPhiB = cms.vdouble(-1,1.18245,1.20898,1.17286),
phiAt2 = cms.double(0.15918),
etaLUT0 = cms.vdouble(8.946,7.508,6.279,6.399),
etaLUT1 = cms.vdouble(0.159,0.116,0.088,0.128),
Expand All @@ -23,6 +23,7 @@
chiSquareCutCurvMax = cms.vint32(2500,2500,2500,2500,2500),
chiSquareCut = cms.vint32(126,126,126,126,126),


#vertex cuts
trackComp = cms.vdouble(1.75,1.25,0.625,0.250),
trackCompErr1 = cms.vdouble(2.0,2.0,2.0,2.0),
Expand All @@ -43,6 +44,8 @@
mScatteringPhiB = cms.vdouble(7.22e-3,3.461e-3,4.447e-3,4.12e-3),
pointResolutionPhi = cms.double(1.),
pointResolutionPhiB = cms.double(500.),
pointResolutionPhiBH = cms.vdouble(151., 173., 155., 153.),
pointResolutionPhiBL = cms.vdouble(17866., 19306., 23984., 23746.),
pointResolutionVertex = cms.double(1.)
)

Expand Down

0 comments on commit d2df0ae

Please sign in to comment.