CMS 3D CMS Logo

Functions
PTStatistics.cc File Reference
#include "Validation/MuonRPCGeometry/interface/PTStatistics.h"
#include <sstream>
#include <numeric>
#include <iostream>

Go to the source code of this file.

Functions

static std::vector< long double > initializeRates ()
 

Function Documentation

◆ initializeRates()

static std::vector<long double> initializeRates ( )
static

Definition at line 9 of file PTStatistics.cc.

References LaserClient_cfi::high, mps_fire::i, LaserClient_cfi::low, RPCpg::ptBins_s, RPCpg::pts, RPCpg::rate(), and hcal_runs::rt.

9  {
10  std::vector<long double> rates(RPCpg::ptBins_s, 0);
11  //std::cout << "Initilizing rates" << std::endl;
12 
13  // Note bin=0 is empty during generation
14  // bin=0 is used only when calculating efficiencies (for storing muons,that werent found)
15  for (unsigned int i = 1; i < rates.size(); ++i) {
16  long double low = RPCpg::pts[i];
17  long double high = RPCpg::pts[i + 1];
18  long double rt = RPCpg::rate(low) - RPCpg::rate(high);
19 
20  /* std::cout << "PtCode " << i
21  << " " << low
22  << " " << high
23  << " " << rt
24  << std::endl;*/
25  rates[i] = rt;
26  }
27  return rates;
28 }
static const double pts[33]
Definition: Constants.h:30
const unsigned int ptBins_s
Definition: Constants.h:28
double rate(double x)
Definition: Constants.cc:3