GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » Analysis » analysis of multiple files
analysis of multiple files [message #13578] Wed, 06 June 2012 16:02 Go to previous message
Dmitry Khaneft is currently offline  Dmitry Khaneft
Messages: 75
Registered: January 2009
continuous participant
From: *kph.uni-mainz.de
Dear all,

I want to perform mixed analysis of my signal and background files. I have 2 sets of sim/digi/reco/pid/par files. I looked into the FairRunAna code and as I understood I should use following functions

  // *** the files coming from the simulation
  TString inSimFile  = "./data/epem_mom3.3_gegm0.0_seed1001sim.root"; // this file contains the MC truth
  TString inRecoFile = "./data/epem_mom3.3_gegm0.0_seed1001reco.root";
  TString inPidFile  = "./data/epem_mom3.3_gegm0.0_seed1001pid.root"; // this file contains the PndPidCandidates
  //TString inParFile  = "./data/epem_mom3.3_gegm0.0_seed1001params.root";

  TString inSimFile_bg  = "./data/pipi_mom3.3_costheta0.9_seed10000sim.root"; // this file contains the MC truth
  TString inRecoFile_bg = "./data/pipi_mom3.3_costheta0.9_seed10000reco.root";
  TString inPidFile_bg  = "./data/pipi_mom3.3_costheta0.9_seed10000pid.root"; // this file contains the PndPidCandidates
  //TString inParFile_bg  = "./data/pipi_mom3.3_costheta0.9_seed10000params.root";

  // *** initialization
  FairRunAna* fRun = new FairRunAna();
  FairRuntimeDb* rtdb = fRun->GetRuntimeDb();
  // *** add signal files
  fRun->SetInputFile(inSimFile);
  fRun->AddFriend(inPidFile);
  fRun->AddFriend(inRecoFile);
  // *** add background files
  fRun->SetBackgroundFile(inSimFile_bg);
  fRun->AddBackgroundFile(inPidFile_bg);
  fRun->AddBackgroundFile(inRecoFile_bg);


and for parameter files I did following

  TFile *file_sig = new TFile("./data/epem_mom3.3_gegm0.0_seed1001params.root","READ");
  TFile *file_bg = new TFile("./data/pipi_mom3.3_costheta0.9_seed10000params.root","READ");

  TList *list = new TList();
  list->Add(file_sig);
  list->Add(file_bg);

  FairParRootFileIo* parIO = new FairParRootFileIo();
  parIO->open(list);
  rtdb->setFirstInput(parIO);


the problem is that I have no entries in the analysis loop after this.

What is wrong in my code?

Also, what should I do if I have multiple signal and background events?

Thanks in advance,
Dmitry
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Problem with 4C-fit
Next Topic: Small positive chi2 values in PndKinFitter
Goto Forum:
  


Current Time: Fri Oct 04 13:46:37 CEST 2024

Total time taken to generate the page: 0.00777 seconds