Changeset 341014c in git for classes/DelphesLongFormula.cc
- Timestamp:
- Feb 12, 2019, 9:29:17 PM (6 years ago)
- Branches:
- ImprovedOutputFile, Timing, llp, master
- Children:
- 6455202
- Parents:
- 45e58be
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
classes/DelphesLongFormula.cc
r45e58be r341014c 16 16 * along with this program. If not, see <http://www.gnu.org/licenses/>. 17 17 */ 18 19 18 20 19 #include "classes/DelphesLongFormula.h" … … 54 53 for(it = expression; *it; ++it) 55 54 { 56 if(*it == ' ' || *it == '\t' || *it == '\r' || *it == '\n' || *it == '\\' 55 if(*it == ' ' || *it == '\t' || *it == '\r' || *it == '\n' || *it == '\\') continue; 57 56 buffer.Append(*it); 58 57 } … … 66 65 buffer.ReplaceAll("ctgTheta", "[ctgTheta]"); 67 66 68 #if ROOT_VERSION_CODE < ROOT_VERSION(6,0,0)69 TFormula::SetMaxima(100000,1000,1000000);70 71 67 #if ROOT_VERSION_CODE < ROOT_VERSION(6, 0, 0) 68 TFormula::SetMaxima(100000, 1000, 1000000); 69 #endif 70 72 71 if(TFormula::Compile(buffer) != 0) 73 72 { … … 80 79 //------------------------------------------------------------------------------ 81 80 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 ) 81 Double_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) 90 83 { 91 84 … … 93 86 TVarValMap fVarValMap; 94 87 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"; 102 95 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; 110 103 111 104 Double_t vals[7]; 112 105 113 106 Int_t j = 0; 114 for (Int_t i=0; i != 7; i++)107 for(Int_t i = 0; i != 7; i++) 115 108 { 116 if ( fVarNameMap.find(i) != fVarNameMap.end() )117 118 119 120 121 122 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 } 124 117 return EvalPar(nullptr, vals); 125 118 }
Note:
See TracChangeset
for help on using the changeset viewer.