Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:33:36

0001 #include <iostream>
0002 #include "TGraph.h"
0003 #include "TMath.h"
0004 
0005 TGraph* recoVertexModel(const double dz, const double sigma, const int npileup, const double eff) {
0006 
0007   TGraph* nrecograph = new TGraph;
0008 
0009   double frac = TMath::Erf(dz/(sigma*sqrt(2)));
0010 
0011   cout << frac << endl;
0012 
0013   for(unsigned int i=0; i<npileup; ++i) {
0014 
0015     cout << i << endl;
0016 
0017     double vispileup = i*eff;
0018 
0019     cout << vispileup << endl;
0020 
0021     double nreco = 2 +  vispileup - pow((1+frac),vispileup);
0022 
0023     cout << nreco << endl;
0024 
0025 
0026     nrecograph->SetPoint(nrecograph->GetN(),i,nreco);
0027 
0028     cout << "done" << endl;
0029 
0030 
0031   }
0032 
0033   return nrecograph;
0034 
0035 }