Fork me on GitHub

Changes in / [e024347:4f34105] in git


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • display/Delphes3DGeometry.cc

    re024347 r4f34105  
    2020#include <set>
    2121#include <map>
    22 #include <string>
    2322#include <utility>
    2423#include <vector>
     
    3837#include "classes/DelphesClasses.h"
    3938#include "TF2.h"
    40 #include "TFormula.h"
    4139#include "TH1F.h"
    4240#include "TMath.h"
     
    9290   tk_length_ = confReader->GetDouble(Form("%s::HalfLength",ParticlePropagator), 3.0)*100.;     // tk_length
    9391   tk_Bz_     = confReader->GetDouble("ParticlePropagator::Bz", 0.0);                           // tk_Bz
    94    
    95    string buffer;
    96    const char *it;
    97  
    98    
     92
    9993   {
    10094   TString tkEffFormula = confReader->GetString(Form("%s::EfficiencyFormula",TrackingEfficiency),"abs(eta)<3.0");
     
    10296   tkEffFormula.ReplaceAll("eta","y");
    10397   tkEffFormula.ReplaceAll("phi","0.");
    104  
    105    for(it = tkEffFormula.Data(); *it; ++it)
    106    {
    107      if(*it == ' ' || *it == '\t' || *it == '\r' || *it == '\n' || *it == '\\' ) continue;
    108      buffer.push_back(*it);
    109    }
    110 
    111    TF2* tkEffFunction = new TF2("tkEff",buffer.c_str(),0,1000,-10,10);
     98   TF2* tkEffFunction = new TF2("tkEff",tkEffFormula,0,1000,-10,10);
    11299   TH1F etaHisto("eta","eta",100,5.,-5.);
    113100   Double_t pt,eta;
     
    131118   muonEffFormula.ReplaceAll("eta","y");
    132119   muonEffFormula.ReplaceAll("phi","0.");
    133    
    134    buffer.clear();
    135    for(it = muonEffFormula.Data(); *it; ++it)
    136    {
    137      if(*it == ' ' || *it == '\t' || *it == '\r' || *it == '\n' || *it == '\\' ) continue;
    138      buffer.push_back(*it);
    139    }
    140 
    141    TF2* muEffFunction = new TF2("muEff",buffer.c_str(),0,1000,-10,10);
     120   TF2* muEffFunction = new TF2("muEff",muonEffFormula,0,1000,-10,10);
    142121   TH1F etaHisto("eta2","eta2",100,5.,-5.);
    143122   Double_t pt,eta;
Note: See TracChangeset for help on using the changeset viewer.