test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 i, 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 }
int i
Definition: DBlmapReader.cc:9
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