CMS 3D CMS Logo

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

#include <L1TMuonBarrelKalmanLUTs.h>

Public Member Functions

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

Private Attributes

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 edm::FileInPath::fullPath(), lut_, lutFile_, and callgraph::path.

4  {
6  lutFile_ = new TFile(path.fullPath().c_str());
7 
8 
9  lut_[15*100+3] = (TH1*)lutFile_->Get("gain_15_3");
10  lut_[15*100+2] = (TH1*)lutFile_->Get("gain_15_2");
11  lut_[15*100+1] = (TH1*)lutFile_->Get("gain_15_1");
12  lut_[15*100] = (TH1*)lutFile_->Get("gain_15_0");
13  lut_[14*100+3] = (TH1*)lutFile_->Get("gain_14_3");
14  lut_[14*100+2] = (TH1*)lutFile_->Get("gain_14_2");
15  lut_[14*100] = (TH1*)lutFile_->Get("gain_14_0");
16 
17  lut_[13*100+3] = (TH1*)lutFile_->Get("gain_13_3");
18  lut_[13*100+1] = (TH1*)lutFile_->Get("gain_13_1");
19  lut_[13*100] = (TH1*)lutFile_->Get("gain_13_0");
20 
21  lut_[12*100+3] = (TH1*)lutFile_->Get("gain_12_3");
22  lut_[12*100] = (TH1*)lutFile_->Get("gain_12_0");
23 
24  lut_[11*100+2] = (TH1*)lutFile_->Get("gain_11_2");
25  lut_[11*100+1] = (TH1*)lutFile_->Get("gain_11_1");
26  lut_[11*100] = (TH1*)lutFile_->Get("gain_11_0");
27 
28  lut_[10*100+2] = (TH1*)lutFile_->Get("gain_10_2");
29  lut_[10*100] = (TH1*)lutFile_->Get("gain_10_0");
30 
31  lut_[9*100+1] = (TH1*)lutFile_->Get("gain_9_1");
32  lut_[9*100] = (TH1*)lutFile_->Get("gain_9_0");
33 
34  lut_[7*100+2] = (TH1*)lutFile_->Get("gain_7_2");
35  lut_[7*100+1] = (TH1*)lutFile_->Get("gain_7_1");
36  lut_[7*100] = (TH1*)lutFile_->Get("gain_7_0");
37 
38  lut_[6*100+2] = (TH1*)lutFile_->Get("gain_6_2");
39  lut_[6*100] = (TH1*)lutFile_->Get("gain_6_0");
40 
41  lut_[5*100+1] = (TH1*)lutFile_->Get("gain_5_1");
42  lut_[5*100] = (TH1*)lutFile_->Get("gain_5_0");
43  lut_[3*100+1] = (TH1*)lutFile_->Get("gain_3_1");
44  lut_[3*100] = (TH1*)lutFile_->Get("gain_3_0");
45 
46 }
std::map< uint, const TH1 * > lut_
L1TMuonBarrelKalmanLUTs::~L1TMuonBarrelKalmanLUTs ( )

Definition at line 48 of file L1TMuonBarrelKalmanLUTs.cc.

References lutFile_.

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

Member Function Documentation

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

Definition at line 55 of file L1TMuonBarrelKalmanLUTs.cc.

References muonCSCDigis_cfi::gain, h, and lut_.

55  {
56  std::vector<float> gain(4,0.0);
57  // printf("Track gain %d %d %d\n",step,bitmask,K);
58  const TH1* h = lut_[100*bitmask+step];
59  gain[0] = h->GetBinContent(K+1);
60  gain[1] = h->GetBinContent(1024+K+1);
61  gain[2] = -h->GetBinContent(2*1024+K+1);
62  gain[3] = h->GetBinContent(3*1024+K+1);
63  return gain;
64 }
std::map< uint, const TH1 * > lut_
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
step
std::pair< float, float > L1TMuonBarrelKalmanLUTs::vertexGain ( uint  bitmask,
uint  K 
)

Definition at line 67 of file L1TMuonBarrelKalmanLUTs.cc.

References muonCSCDigis_cfi::gain, h, and lut_.

67  {
68  const TH1* h = lut_[100*bitmask];
69  std::pair<float,float> gain(-h->GetBinContent(K+1),-h->GetBinContent(1024+K+1) );
70  return gain;
71 }
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::lut_
private

Definition at line 19 of file L1TMuonBarrelKalmanLUTs.h.

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

TFile* L1TMuonBarrelKalmanLUTs::lutFile_
private

Definition at line 18 of file L1TMuonBarrelKalmanLUTs.h.

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