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 ( const std::string &  filename)

Definition at line 4 of file L1TMuonBarrelKalmanLUTs.cc.

References coarseEta_, edm::FileInPath::fullPath(), lut2_, lut_, lutFile_, and callgraph::path.

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

Definition at line 57 of file L1TMuonBarrelKalmanLUTs.cc.

References lutFile_.

57  {
58  lutFile_->Close();
59  if (lutFile_ !=nullptr)
60  delete lutFile_;
61 }

Member Function Documentation

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

Definition at line 96 of file L1TMuonBarrelKalmanLUTs.cc.

References coarseEta_, h, listBenchmarks::pattern, and parallelization::uint().

Referenced by L1TMuonBarrelKalmanAlgo::calculateEta().

96  {
97  const TH1* h = coarseEta_[pattern];
98  return uint(h->GetBinContent(h->GetXaxis()->FindBin(mask)));
99 }
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
def uint(string)
std::map< uint, const TH1 * > coarseEta_
std::vector< float > L1TMuonBarrelKalmanLUTs::trackGain ( uint  step,
uint  bitmask,
uint  K 
)

Definition at line 64 of file L1TMuonBarrelKalmanLUTs.cc.

References muonCSCDigis_cfi::gain, h, and lut_.

Referenced by L1TMuonBarrelKalmanAlgo::updateLUT().

64  {
65  std::vector<float> gain(4,0.0);
66  const TH1* h = lut_[64*step+bitmask];
67  gain[0] = h->GetBinContent(K+1);
68  gain[2] = -h->GetBinContent(1024+K+1);
69  return gain;
70 }
std::map< uint, const TH1 * > lut_
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
step
Definition: StallMonitor.cc:94
std::vector< float > L1TMuonBarrelKalmanLUTs::trackGain2 ( uint  step,
uint  bitmask,
uint  K 
)

Definition at line 73 of file L1TMuonBarrelKalmanLUTs.cc.

References muonCSCDigis_cfi::gain, h, and lut2_.

Referenced by L1TMuonBarrelKalmanAlgo::updateLUT().

73  {
74  std::vector<float> gain(4,0.0);
75 
76  // printf("Track gain %d %d %d\n",step,bitmask,K);
77  const TH1* h = lut2_[64*step+bitmask];
78  gain[0] = h->GetBinContent(K+1);
79  gain[1] = h->GetBinContent(512+K+1);
80  gain[2] = -h->GetBinContent(2*512+K+1);
81  gain[3] = h->GetBinContent(3*512+K+1);
82  return gain;
83 
84 
85 }
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
std::map< uint, const TH1 * > lut2_
step
Definition: StallMonitor.cc:94
std::pair< float, float > L1TMuonBarrelKalmanLUTs::vertexGain ( uint  bitmask,
uint  K 
)

Definition at line 88 of file L1TMuonBarrelKalmanLUTs.cc.

References muonCSCDigis_cfi::gain, h, and lut_.

Referenced by L1TMuonBarrelKalmanAlgo::vertexConstraintLUT().

88  {
89  const TH1* h = lut_[bitmask];
90  std::pair<float,float> gain(-h->GetBinContent(K+1),-h->GetBinContent(1024+K+1) );
91  return gain;
92 }
std::map< uint, const TH1 * > lut_
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.

Member Data Documentation

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

Definition at line 23 of file L1TMuonBarrelKalmanLUTs.h.

Referenced by coarseEta(), and L1TMuonBarrelKalmanLUTs().

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

Definition at line 22 of file L1TMuonBarrelKalmanLUTs.h.

Referenced by L1TMuonBarrelKalmanLUTs(), and trackGain2().

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

Definition at line 21 of file L1TMuonBarrelKalmanLUTs.h.

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

TFile* L1TMuonBarrelKalmanLUTs::lutFile_
private

Definition at line 20 of file L1TMuonBarrelKalmanLUTs.h.

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