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

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

Definition at line 9 of file PTStatistics.cc.

References mps_fire::i, PTStatistics::m_rates, RPCpg::ptBins_s, RPCpg::pts, and RPCpg::rate().

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