Skip to content

Commit

Permalink
Merge branch 'l1t-muon-pass2-CMSSW_8_0_0_pre5' of github.com:cms-l1t-…
Browse files Browse the repository at this point in the history
…offline/cmssw into EMTF_Unpacker_dev_800pre5
  • Loading branch information
abrinke1 committed Feb 1, 2016
2 parents 1148b3a + 931ec99 commit 9ec8653
Show file tree
Hide file tree
Showing 16 changed files with 646 additions and 626 deletions.
36 changes: 33 additions & 3 deletions CondFormats/L1TObjects/interface/L1TMuonBarrelParams.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@

#include "CondFormats/Serialization/interface/Serializable.h"
#include "CondFormats/L1TObjects/interface/LUT.h"
//#include "L1Trigger/L1TMuonBarrel/interface/L1MuBMTrack.h"
#include "CondFormats/L1TObjects/interface/L1MuDTTFParameters.h"
#include "CondFormats/L1TObjects/interface/L1MuDTTFMasks.h"
#include "CondFormats/L1TObjects/interface/L1MuDTEtaPattern.h"

class L1TMuonBarrelParams {

Expand All @@ -41,20 +43,39 @@ class L1TMuonBarrelParams {
NUM_BMTFPARAMNODES=1
};

L1MuDTTFParameters l1mudttfparams;
L1MuDTTFMasks l1mudttfmasks;

/// L1MuBMPtaLut
typedef std::map<short, short, std::less<short> > LUT;
///Qual Pattern LUT
typedef std::pair< short, short > LUTID;
typedef std::pair< short, std::vector<short> > LUTCONT;
typedef std::map< LUTID, LUTCONT > qpLUT;
///Eta Pattern LUT
typedef std::map<short, L1MuDTEtaPattern, std::less<short> > etaLUT;

class LUTParams{
public:
std::vector<LUT> pta_lut_;
std::vector<LUT> phi_lut_;
std::vector<int> pta_threshold_;
qpLUT qp_lut_;
etaLUT eta_lut_;

/// helper class for extrapolation look-up tables
class extLUT {
public:
LUT low;
LUT high;
COND_SERIALIZABLE;
};
std::vector<extLUT> ext_lut_;

LUTParams() : pta_lut_(0), phi_lut_(0), pta_threshold_(6)
{ pta_lut_.reserve(12); pta_threshold_.reserve(6); phi_lut_.reserve(2); }



LUTParams() : pta_lut_(0), phi_lut_(0), pta_threshold_(6), ext_lut_(0){ }
COND_SERIALIZABLE;
};
std::string AssLUTPath() const { return pnodes_[pta].sparams_.size() > 0 ? pnodes_[pta].sparams_[0] : ""; }
Expand All @@ -68,6 +89,14 @@ class L1TMuonBarrelParams {
void setphi_lut(std::vector<LUT> philut) { lutparams_.phi_lut_ = philut; };
std::vector<LUT> phi_lut() const {return lutparams_.phi_lut_; };

void setext_lut(std::vector<LUTParams::extLUT> extlut) { lutparams_.ext_lut_ = extlut; };
std::vector<LUTParams::extLUT> ext_lut() const {return lutparams_.ext_lut_; };

void setqp_lut(qpLUT qplut) { lutparams_.qp_lut_ = qplut; };
qpLUT qp_lut() const {return lutparams_.qp_lut_; };

void seteta_lut(etaLUT eta_lut) { lutparams_.eta_lut_ = eta_lut; };
etaLUT eta_lut() const {return lutparams_.eta_lut_; };

class ConfigParams{
public:
Expand Down Expand Up @@ -125,6 +154,7 @@ class L1TMuonBarrelParams {
bool get_Extrapolation_21() const {return conparams_.Extrapolation_21 ;}



L1TMuonBarrelParams() { version_=Version; pnodes_.resize(NUM_BMTFPARAMNODES); }
~L1TMuonBarrelParams() {}

Expand Down
23 changes: 0 additions & 23 deletions CondFormats/L1TObjects/src/L1TMuonBarrelParams.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,4 @@ void L1TMuonBarrelParams::print(std::ostream& out) const {
out << "L1 BMTF Parameters" << std::endl;

out << "Firmware version: " << fwVersion_ << std::endl;
/*
out << "LUT paths (LUTs are generated analytically if path is empty)" << std::endl;
out << " Abs isolation checkMem LUT path: " << this->absIsoCheckMemLUTPath() << std::endl;
out << " Rel isolation checkMem LUT path: " << this->relIsoCheckMemLUTPath() << std::endl;
out << " Index selMem phi LUT path: " << this->idxSelMemPhiLUTPath() << std::endl;
out << " Index selMem eta LUT path: " << this->idxSelMemEtaLUTPath() << std::endl;
out << " Barrel Single MatchQual LUT path: " << this->brlSingleMatchQualLUTPath() << std::endl;
out << " Forward pos MatchQual LUT path: " << this->fwdPosSingleMatchQualLUTPath() << std::endl;
out << " Forward neg MatchQual LUT path: " << this->fwdNegSingleMatchQualLUTPath() << std::endl;
out << " Overlap pos MatchQual LUT path: " << this->ovlPosSingleMatchQualLUTPath() << std::endl;
out << " Overlap neg MatchQual LUT path: " << this->ovlNegSingleMatchQualLUTPath() << std::endl;
out << " Barrel-Overlap pos MatchQual LUT path: " << this->bOPosMatchQualLUTPath() << std::endl;
out << " Barrel-Overlap neg MatchQual LUT path: " << this->bONegMatchQualLUTPath() << std::endl;
out << " Forward-Overlap pos MatchQual LUT path: " << this->fOPosMatchQualLUTPath() << std::endl;
out << " Forward-Overlap neg MatchQual LUT path: " << this->fONegMatchQualLUTPath() << std::endl;
out << " Barrel phi extrapolation LUT path: " << this->bPhiExtrapolationLUTPath() << std::endl;
out << " Overlap phi extrapolation LUT path: " << this->oPhiExtrapolationLUTPath() << std::endl;
out << " Forward phi extrapolation LUT path: " << this->fPhiExtrapolationLUTPath() << std::endl;
out << " Barrel eta extrapolation LUT path: " << this->bEtaExtrapolationLUTPath() << std::endl;
out << " Overlap eta extrapolation LUT path: " << this->oEtaExtrapolationLUTPath() << std::endl;
out << " Forward eta extrapolation LUT path: " << this->fEtaExtrapolationLUTPath() << std::endl;
out << " Sort rank LUT path: " << this->sortRankLUTPath() << std::endl;
*/
}
31 changes: 0 additions & 31 deletions L1Trigger/L1TMuonBarrel/interface/L1MuBMAssParam.h

This file was deleted.

89 changes: 89 additions & 0 deletions L1Trigger/L1TMuonBarrel/interface/L1MuBMLUTHandler.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
#ifndef L1MUBM_LUT_H
#define L1MUBM_LUT_H

//---------------
// C++ Headers --
//---------------

#include "CondFormats/L1TObjects/interface/L1TMuonBarrelParams.h"

#include <vector>
#include <map>

//----------------------
// Base Class Headers --
//----------------------


//------------------------------------
// Collaborating Class Declarations --
//------------------------------------


// ---------------------
// -- Class Interface --
// ---------------------


class L1MuBMLUTHandler {

public:
/// constructor
L1MuBMLUTHandler(const L1TMuonBarrelParams &l1params);

/// destructor
virtual ~L1MuBMLUTHandler();

/// print pt-assignment look-up tables
void print_pta_lut() const;

/// get pt-value for a given address
int getPt(int pta_ind, int address) const;

/// get pt-assignment LUT threshold
int getPtLutThreshold(int pta_ind) const;

/// print phi-assignment look-up tables
void print_phi_lut() const;

/// get delta-phi for a given address (bend-angle)
int getDeltaPhi(int idx, int address) const;

/// get precision for look-up tables
std::pair<unsigned short, unsigned short> getPrecision() const;

/// print extrapolation look-up tables
void print_ext_lut() const;

/// get low_value for a given address
int getLow(int ext_ind, int address) const;

/// get high_value for a given address
int getHigh(int ext_ind, int address) const;


private:
const L1TMuonBarrelParams* l1tbmparams;

public:



//max. number of Extrapolations
const int MAX_EXT = 12;

// extrapolation types
enum Extrapolation { EX12, EX13, EX14, EX21, EX23, EX24, EX34,
EX15, EX16, EX25, EX26, EX56 };

// maximal number of pt assignment methods
const int MAX_PTASSMETH = 13;

// pt assignment methods
enum PtAssMethod { PT12L, PT12H, PT13L, PT13H, PT14L, PT14H,
PT23L, PT23H, PT24L, PT24H, PT34L, PT34H,
NODEF };

};

#endif
69 changes: 0 additions & 69 deletions L1Trigger/L1TMuonBarrel/interface/L1MuBMPhiLut.h

This file was deleted.

70 changes: 0 additions & 70 deletions L1Trigger/L1TMuonBarrel/interface/L1MuBMPtaLut.h

This file was deleted.

Loading

0 comments on commit 9ec8653

Please sign in to comment.