CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
L1TMuonBarrelKalmanLUTs Class Reference

#include <L1TMuonBarrelKalmanLUTs.h>

Public Member Functions

uint coarseEta (uint, uint)
 
 L1TMuonBarrelKalmanLUTs (const std::string &)
 
std::vector< float > trackGain (uint, uint, uint)
 
std::vector< float > trackGain2 (uint, uint, uint)
 
std::pair< float, float > vertexGain (uint, uint)
 
 ~L1TMuonBarrelKalmanLUTs ()
 

Private Attributes

std::map< uint, const TH1 * > coarseEta_
 
std::map< uint, const TH1 * > lut2_
 
std::map< uint, const TH1 * > lut_
 
TFile * lutFile_
 

Detailed Description

Definition at line 9 of file L1TMuonBarrelKalmanLUTs.h.

Constructor & Destructor Documentation

◆ L1TMuonBarrelKalmanLUTs()

L1TMuonBarrelKalmanLUTs::L1TMuonBarrelKalmanLUTs ( const std::string &  filename)

Definition at line 4 of file L1TMuonBarrelKalmanLUTs.cc.

4  {
6  lutFile_ = new TFile(path.fullPath().c_str());
7 
8  lut_[3 * 64 + 8] = (TH1*)lutFile_->Get("gain_8_3");
9  lut_[2 * 64 + 8] = (TH1*)lutFile_->Get("gain_8_2");
10  lut_[2 * 64 + 12] = (TH1*)lutFile_->Get("gain_12_2");
11  lut_[2 * 64 + 4] = (TH1*)lutFile_->Get("gain_4_2");
12  lut_[1 * 64 + 12] = (TH1*)lutFile_->Get("gain_12_1");
13  lut_[1 * 64 + 10] = (TH1*)lutFile_->Get("gain_10_1");
14  lut_[1 * 64 + 6] = (TH1*)lutFile_->Get("gain_6_1");
15  lut_[1 * 64 + 14] = (TH1*)lutFile_->Get("gain_14_1");
16  lut_[3] = (TH1*)lutFile_->Get("gain_3_0");
17  lut_[5] = (TH1*)lutFile_->Get("gain_5_0");
18  lut_[6] = (TH1*)lutFile_->Get("gain_6_0");
19  lut_[7] = (TH1*)lutFile_->Get("gain_7_0");
20  lut_[9] = (TH1*)lutFile_->Get("gain_9_0");
21  lut_[10] = (TH1*)lutFile_->Get("gain_10_0");
22  lut_[11] = (TH1*)lutFile_->Get("gain_11_0");
23  lut_[12] = (TH1*)lutFile_->Get("gain_12_0");
24  lut_[13] = (TH1*)lutFile_->Get("gain_13_0");
25  lut_[14] = (TH1*)lutFile_->Get("gain_14_0");
26  lut_[15] = (TH1*)lutFile_->Get("gain_15_0");
27 
28  lut2_[3 * 64 + 8] = (TH1*)lutFile_->Get("gain2_8_3");
29  lut2_[2 * 64 + 8] = (TH1*)lutFile_->Get("gain2_8_2");
30  lut2_[2 * 64 + 4] = (TH1*)lutFile_->Get("gain2_4_2");
31  lut2_[1 * 64 + 8] = (TH1*)lutFile_->Get("gain2_8_1");
32  lut2_[1 * 64 + 4] = (TH1*)lutFile_->Get("gain2_4_1");
33  lut2_[1 * 64 + 2] = (TH1*)lutFile_->Get("gain2_2_1");
34 
35  coarseEta_[3] = (TH1*)lutFile_->Get("coarseEta_3");
36  coarseEta_[5] = (TH1*)lutFile_->Get("coarseEta_5");
37  coarseEta_[6] = (TH1*)lutFile_->Get("coarseEta_6");
38  coarseEta_[7] = (TH1*)lutFile_->Get("coarseEta_7");
39  coarseEta_[9] = (TH1*)lutFile_->Get("coarseEta_9");
40 
41  coarseEta_[10] = (TH1*)lutFile_->Get("coarseEta_10");
42  coarseEta_[11] = (TH1*)lutFile_->Get("coarseEta_11");
43  coarseEta_[12] = (TH1*)lutFile_->Get("coarseEta_12");
44  coarseEta_[13] = (TH1*)lutFile_->Get("coarseEta_13");
45  coarseEta_[14] = (TH1*)lutFile_->Get("coarseEta_14");
46  coarseEta_[15] = (TH1*)lutFile_->Get("coarseEta_15");
47 }

References coarseEta_, corrVsCorr::filename, lut2_, lut_, lutFile_, and castor_dqm_sourceclient_file_cfg::path.

◆ ~L1TMuonBarrelKalmanLUTs()

L1TMuonBarrelKalmanLUTs::~L1TMuonBarrelKalmanLUTs ( )

Definition at line 49 of file L1TMuonBarrelKalmanLUTs.cc.

49  {
50  lutFile_->Close();
51  if (lutFile_ != nullptr)
52  delete lutFile_;
53 }

References lutFile_.

Member Function Documentation

◆ coarseEta()

uint L1TMuonBarrelKalmanLUTs::coarseEta ( uint  pattern,
uint  mask 
)

Definition at line 81 of file L1TMuonBarrelKalmanLUTs.cc.

81  {
82  const TH1* h = coarseEta_[pattern];
83  return uint(h->GetBinContent(h->GetXaxis()->FindBin(mask)));
84 }

References coarseEta_, topSingleLeptonDQM_PU_cfi::pattern, and parallelization::uint.

Referenced by L1TMuonBarrelKalmanAlgo::calculateEta().

◆ trackGain()

std::vector< float > L1TMuonBarrelKalmanLUTs::trackGain ( uint  step,
uint  bitmask,
uint  K 
)

Definition at line 55 of file L1TMuonBarrelKalmanLUTs.cc.

55  {
56  std::vector<float> gain(4, 0.0);
57  const TH1* h = lut_[64 * step + bitmask];
58  gain[0] = h->GetBinContent(K + 1);
59  gain[2] = -h->GetBinContent(1024 + K + 1);
60  return gain;
61 }

References PedestalClient_cfi::gain, and lut_.

Referenced by L1TMuonBarrelKalmanAlgo::updateLUT().

◆ trackGain2()

std::vector< float > L1TMuonBarrelKalmanLUTs::trackGain2 ( uint  step,
uint  bitmask,
uint  K 
)

Definition at line 63 of file L1TMuonBarrelKalmanLUTs.cc.

63  {
64  std::vector<float> gain(4, 0.0);
65 
66  // printf("Track gain %d %d %d\n",step,bitmask,K);
67  const TH1* h = lut2_[64 * step + bitmask];
68  gain[0] = h->GetBinContent(K + 1);
69  gain[1] = h->GetBinContent(512 + K + 1);
70  gain[2] = -h->GetBinContent(2 * 512 + K + 1);
71  gain[3] = h->GetBinContent(3 * 512 + K + 1);
72  return gain;
73 }

References PedestalClient_cfi::gain, and lut2_.

Referenced by L1TMuonBarrelKalmanAlgo::updateLUT().

◆ vertexGain()

std::pair< float, float > L1TMuonBarrelKalmanLUTs::vertexGain ( uint  bitmask,
uint  K 
)

Definition at line 75 of file L1TMuonBarrelKalmanLUTs.cc.

75  {
76  const TH1* h = lut_[bitmask];
77  std::pair<float, float> gain(-h->GetBinContent(K + 1), -h->GetBinContent(1024 + K + 1));
78  return gain;
79 }

References PedestalClient_cfi::gain, and lut_.

Referenced by L1TMuonBarrelKalmanAlgo::vertexConstraintLUT().

Member Data Documentation

◆ coarseEta_

std::map<uint, const TH1 *> L1TMuonBarrelKalmanLUTs::coarseEta_
private

Definition at line 23 of file L1TMuonBarrelKalmanLUTs.h.

Referenced by coarseEta(), and L1TMuonBarrelKalmanLUTs().

◆ lut2_

std::map<uint, const TH1 *> L1TMuonBarrelKalmanLUTs::lut2_
private

Definition at line 22 of file L1TMuonBarrelKalmanLUTs.h.

Referenced by L1TMuonBarrelKalmanLUTs(), and trackGain2().

◆ lut_

std::map<uint, const TH1 *> L1TMuonBarrelKalmanLUTs::lut_
private

Definition at line 21 of file L1TMuonBarrelKalmanLUTs.h.

Referenced by L1TMuonBarrelKalmanLUTs(), trackGain(), and vertexGain().

◆ lutFile_

TFile* L1TMuonBarrelKalmanLUTs::lutFile_
private

Definition at line 20 of file L1TMuonBarrelKalmanLUTs.h.

Referenced by L1TMuonBarrelKalmanLUTs(), and ~L1TMuonBarrelKalmanLUTs().

step
step
Definition: StallMonitor.cc:94
L1TMuonBarrelKalmanLUTs::lut2_
std::map< uint, const TH1 * > lut2_
Definition: L1TMuonBarrelKalmanLUTs.h:22
parallelization.uint
uint
Definition: parallelization.py:124
edm::FileInPath
Definition: FileInPath.h:64
corrVsCorr.filename
filename
Definition: corrVsCorr.py:123
h
L1TMuonBarrelKalmanLUTs::coarseEta_
std::map< uint, const TH1 * > coarseEta_
Definition: L1TMuonBarrelKalmanLUTs.h:23
topSingleLeptonDQM_PU_cfi.pattern
pattern
Definition: topSingleLeptonDQM_PU_cfi.py:39
L1TMuonBarrelKalmanLUTs::lutFile_
TFile * lutFile_
Definition: L1TMuonBarrelKalmanLUTs.h:20
PedestalClient_cfi.gain
gain
Definition: PedestalClient_cfi.py:37
L1TMuonBarrelKalmanLUTs::lut_
std::map< uint, const TH1 * > lut_
Definition: L1TMuonBarrelKalmanLUTs.h:21
castor_dqm_sourceclient_file_cfg.path
path
Definition: castor_dqm_sourceclient_file_cfg.py:37