Fork me on GitHub

Changeset 341014c in git for classes/DelphesLongFormula.cc


Ignore:
Timestamp:
Feb 12, 2019, 9:29:17 PM (6 years ago)
Author:
Pavel Demin <pavel-demin@…>
Branches:
ImprovedOutputFile, Timing, llp, master
Children:
6455202
Parents:
45e58be
Message:

apply .clang-format to all .h, .cc and .cpp files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • classes/DelphesLongFormula.cc

    r45e58be r341014c  
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    1717 */
    18 
    1918
    2019#include "classes/DelphesLongFormula.h"
     
    5453  for(it = expression; *it; ++it)
    5554  {
    56     if(*it == ' ' || *it == '\t' || *it == '\r' || *it == '\n' || *it == '\\' ) continue;
     55    if(*it == ' ' || *it == '\t' || *it == '\r' || *it == '\n' || *it == '\\') continue;
    5756    buffer.Append(*it);
    5857  }
     
    6665  buffer.ReplaceAll("ctgTheta", "[ctgTheta]");
    6766
    68   #if ROOT_VERSION_CODE < ROOT_VERSION(6,0,0)
    69     TFormula::SetMaxima(100000,1000,1000000);
    70   #endif
    71  
     67#if ROOT_VERSION_CODE < ROOT_VERSION(6, 0, 0)
     68  TFormula::SetMaxima(100000, 1000, 1000000);
     69#endif
     70
    7271  if(TFormula::Compile(buffer) != 0)
    7372  {
     
    8079//------------------------------------------------------------------------------
    8180
    82 Double_t DelphesLongFormula::Eval(Double_t pt,
    83                                   Double_t eta,
    84                                   Double_t phi,
    85                                   Double_t energy,
    86                                   Double_t d0,
    87                                   Double_t dz,
    88                                   Double_t ctgTheta
    89                                  )
     81Double_t DelphesLongFormula::Eval(Double_t pt, Double_t eta, Double_t phi,
     82  Double_t energy, Double_t d0, Double_t dz, Double_t ctgTheta)
    9083{
    9184
     
    9386  TVarValMap fVarValMap;
    9487
    95   fVarNameMap[this->GetParNumber("pt")]= "pt";
    96   fVarNameMap[this->GetParNumber("eta")]= "eta";
    97   fVarNameMap[this->GetParNumber("phi")]= "phi";
    98   fVarNameMap[this->GetParNumber("energy")]= "energy";
    99   fVarNameMap[this->GetParNumber("d0")]= "d0";
    100   fVarNameMap[this->GetParNumber("dz")]= "dz";
    101   fVarNameMap[this->GetParNumber("ctgTheta")]= "ctgTheta";
     88  fVarNameMap[this->GetParNumber("pt")] = "pt";
     89  fVarNameMap[this->GetParNumber("eta")] = "eta";
     90  fVarNameMap[this->GetParNumber("phi")] = "phi";
     91  fVarNameMap[this->GetParNumber("energy")] = "energy";
     92  fVarNameMap[this->GetParNumber("d0")] = "d0";
     93  fVarNameMap[this->GetParNumber("dz")] = "dz";
     94  fVarNameMap[this->GetParNumber("ctgTheta")] = "ctgTheta";
    10295
    103   fVarValMap["pt"]= pt;     
    104   fVarValMap["eta"]= eta;
    105   fVarValMap["phi"]= phi;
    106   fVarValMap["energy"]= energy;
    107   fVarValMap["d0"]= d0;
    108   fVarValMap["dz"]= dz;
    109   fVarValMap["ctgTheta"]= ctgTheta;
     96  fVarValMap["pt"] = pt;
     97  fVarValMap["eta"] = eta;
     98  fVarValMap["phi"] = phi;
     99  fVarValMap["energy"] = energy;
     100  fVarValMap["d0"] = d0;
     101  fVarValMap["dz"] = dz;
     102  fVarValMap["ctgTheta"] = ctgTheta;
    110103
    111104  Double_t vals[7];
    112105
    113106  Int_t j = 0;
    114   for (Int_t i=0; i != 7; i++)
     107  for(Int_t i = 0; i != 7; i++)
    115108  {
    116      if ( fVarNameMap.find(i) != fVarNameMap.end() )
    117      {
    118         TString var_name = fVarNameMap[i];
    119         vals[i] = fVarValMap[var_name];
    120      }
    121      else
    122         vals[i] = 0.;
    123   }   
     109    if(fVarNameMap.find(i) != fVarNameMap.end())
     110    {
     111      TString var_name = fVarNameMap[i];
     112      vals[i] = fVarValMap[var_name];
     113    }
     114    else
     115      vals[i] = 0.;
     116  }
    124117  return EvalPar(nullptr, vals);
    125118}
Note: See TracChangeset for help on using the changeset viewer.