173 {
174 std::string paramcode;
177 else {
178 Info("DiTauMassTools", "The specified calibration version does not support root file parametrisations");
179 return;
180 }
181 TIter next(dir->GetListOfKeys());
182 TKey* key;
183 while ((key = (TKey*)next())) {
184 TClass *cl = gROOT->GetClass(key->GetClassName());
185
186 if (cl->InheritsFrom("TDirectory")) {
187 dir->cd(key->GetName());
188 TDirectory *subdir = gDirectory;
189 readInParams(subdir, aset, lep_numass, lep_angle, lep_ratio, had_angle, had_ratio);
190 dir->cd();
191 }
192 else if (
cl->InheritsFrom(
"TF1") ||
cl->InheritsFrom(
"TGraph")) {
193
194 std::string total_path =
dir->GetPath();
195 if (total_path.find(paramcode) == std::string::npos) continue;
196 TF1* func = (TF1*)
dir->Get( (
const char*)
key->GetName() );
197 TF1*
f =
new TF1(*func);
198 if (total_path.find("lep") != std::string::npos)
199 {
200 if (total_path.find("Angle") != std::string::npos){
201 lep_angle.push_back(f);
202 }
203 else if (total_path.find("Ratio") != std::string::npos)
204 {
205 lep_ratio.push_back(f);
206 }
207 else if (total_path.find("Mass") != std::string::npos)
208 {
209 lep_numass.push_back(f);
210 }
211 else
212 {
213 Warning("DiTauMassTools", "Undefined leptonic PDF term in input file.");
214 }
215 }
216 else if (total_path.find("had") != std::string::npos)
217 {
218 if (total_path.find("Angle") != std::string::npos){
219 had_angle.push_back(f);
220 }
221 else if (total_path.find("Ratio") != std::string::npos)
222 {
223 had_ratio.push_back(f);
224 }
225 else
226 {
227 Warning("DiTauMassTools", "Undefined hadronic PDF term in input file.");
228 }
229 }
230 else
231 {
232 Warning("DiTauMassTools", "Undefined decay channel in input file.");
233 }
234 }
235 else {
236 Warning("DiTauMassTools", "Class in input file not recognized.");
237 }
238 }
239}
cl
print [x.__class__ for x in toList(dqregion.getSubRegions()) ]