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