8         if (fff.IsZombie()) fileok=
false;
 
    9         TTree *
t=(TTree*)fff.Get(
"pndsim");
 
   10         if (t==0
x0) fileok=
false;
 
   12         if (!fileok) cout <<
"Skipping broken file '"<<fn<<
"'"<<endl;
 
   22         for (
int i=min;
i<=
max;++
i) {
 
   23                 TString fname = TString::Format(
"%s_%d_pid.root",pref.Data(),
i);
 
   26                         if (firstfile) fRun->SetInputFile(fname);
 
   27                         else fRun->AddFile(fname);
 
   37         double pbarmom = 9.808065;
 
   39         TLorentzVector ini(0,0,pbarmom, 
sqrt(pbarmom*pbarmom+mp*mp)+mp);
 
   42         FairRunAna *
fRun= 
new FairRunAna();
 
   49                 inParFile = 
"simparams.root";
 
   51                 fRun->SetInputFile(pref);
 
   56                 OutFile   = TString::Format(
"%s_ana_%d_%d.root",pref.Data(), 
min, 
max);
 
   57                 inParFile =     TString::Format(
"%s_%d_par.root",pref.Data(), 
min);
 
   63         TString pidParFile = 
TString(gSystem->Getenv(
"VMCWORKDIR"))+
"/macro/params/all.par";
 
   66         FairLogger::GetLogger()->SetLogToFile(kFALSE);
 
   67         FairRuntimeDb* 
rtdb = fRun->GetRuntimeDb();
 
   70         FairParRootFileIo* parIO = 
new FairParRootFileIo();
 
   71         parIO->open(inParFile);
 
   72         FairParAsciiFileIo* parIOPid = 
new FairParAsciiFileIo();
 
   73         parIOPid->open(pidParFile.Data(),
"in");
 
   75         rtdb->setFirstInput(parIO);
 
   76         rtdb->setSecondInput(parIOPid);
 
   77         rtdb->setOutput(parIO);
 
   79         fRun->SetOutputFile(
"dummyout.root");
 
   83         TFile *
out = TFile::Open(OutFile,
"RECREATE");
 
   87         if (nevts==0) nevts= theAnalysis->
GetEntries();
 
   92         TString pidsel = 
"PidAlgoEmcBayes;PidAlgoDrc;PidAlgoDisc;PidAlgoStt;PidAlgoMdtHardCuts";
 
  103         while (theAnalysis->
GetEvent() && i++<nevts)
 
  105                 if ((i%100)==0) cout<<
"evt " << i << endl;
 
  110                 theAnalysis->
FillList( all, 
"All",          pidsel); 
 
  111                 theAnalysis->
FillList( kp,  
"KaonAllPlus",  pidsel);
 
  112                 theAnalysis->
FillList( km,  
"KaonAllMinus", pidsel);
 
  113                 theAnalysis->
FillList( pip, 
"PionAllPlus",  pidsel);
 
  114                 theAnalysis->
FillList( pim, 
"PionAllMinus", pidsel);
 
  130                         nd0->
Column(
"ev",               (Float_t) i);
 
  131                         nd0->
Column(
"cand",             (Float_t) j);
 
  132                         nd0->
Column(
"d0miss",   (Float_t) (ini-(d0[j]->P4())).M());
 
  134                         qa.
qaComp(
"d0", d0[j], nd0);
 
  136                         qa.
qaP4(
"beam", ini, nd0);
 
void Append(const RhoCandidate *c)
friend F32vec4 sqrt(const F32vec4 &a)
Bool_t FillList(RhoCandList &l, TString listkey="All", TString pidTcaNames="", int trackHypothesis=-1)
friend F32vec4 max(const F32vec4 &a, const F32vec4 &b)
void qaP4(TString pre, TLorentzVector c, RhoTuple *n, bool skip=false)
void attachFiles(FairRunAna *fRun, TString pref, int min, int max)
void Combine(RhoCandList &l1, RhoCandList &l2)
void qaComp(TString pre, RhoCandidate *c, RhoTuple *n, bool covs=false, bool pulls=false)
void Select(RhoParticleSelectorBase *pidmgr)
void Column(const char *label, Bool_t value, Bool_t defval=0, const char *block=0)
friend F32vec4 min(const F32vec4 &a, const F32vec4 &b)
void SetType(const TParticlePDG *pdt, int start=0)
void qaEventShapeShort(TString pre, PndEventShape *evsh, RhoTuple *n)
TTree * GetInternalTree()
Int_t GetEvent(Int_t n=-1)
void tut_ana_d0_qahelper(TString pref="pid_complete.root", int min=-1, int max=1, int nevts=0)
bool checkfile(TString fn)