Run_H 1Analysis


Macro driving the analysis can specify file name and type

.- type == 0 : normal

  • type = 1 : use AClic to compile selector
  • type = 2 : use a fill list and then process the fill list///

Author:
This notebook tutorial was automatically generated with ROOTBOOK-izer (Beta) from the macro found in the ROOT repository on Tuesday, January 17, 2017 at 02:43 PM.


Arguments are defined.


In [1]:
int type = 0;
const char * h1dir = 0;




In [2]:
std::cout << "Run h1 analysis " << std::endl;


Run h1 analysis 

Create first the chain with all the files


In [3]:
TChain chain("h42");

if (h1dir) {
   gSystem->Setenv("H1",h1dir);
}
else
   gSystem->Setenv("H1","http://root.cern.ch/files/h1/");


std::cout << "Creating the chain" << std::endl;

chain.SetCacheSize(20*1024*1024);
chain.Add("$H1/dstarmb.root");
chain.Add("$H1/dstarp1a.root");
chain.Add("$H1/dstarp1b.root");
chain.Add("$H1/dstarp2.root");

TString selectionMacro = TString(gSystem->DirName(__FILE__) ) + "/h1analysis.C";

if (type == 0)
   chain.Process(selectionMacro);
else if (type == 1)   {
   // use AClic ( add a + at the end
   selectionMacro += "+";
   chain.Process(selectionMacro);
}
else if (type == 2) {
   chain.Process(selectionMacro,"fillList");
   chain.Process(selectionMacro,"useList");
}


Creating the chain
Info in <h1analysis::Begin>: starting h1analysis with process option: 
Info in <h1analysis::Init>: tree: 0x7f367a9b6030
Info in <h1analysis::SlaveBegin>: starting h1analysis with process option:  (tree: 0x7f367a9b6030)
Info in <h1analysis::Notify>: processing file: http://root.cern.ch/files/h1/dstarmb.root
Info in <h1analysis::Notify>: processing file: http://root.cern.ch/files/h1/dstarp1a.root
Info in <h1analysis::Notify>: processing file: http://root.cern.ch/files/h1/dstarp1b.root
Info in <h1analysis::Notify>: processing file: http://root.cern.ch/files/h1/dstarp2.root
 FCN=10684 FROM MIGRAD    STATUS=CONVERGED     209 CALLS         210 TOTAL
                     EDM=1.2814e-06    STRATEGY= 1      ERROR MATRIX ACCURATE 
  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME      VALUE            ERROR          SIZE      DERIVATIVE 
   1  p0           9.59915e+05   8.87690e+04   2.77938e+02  -4.39940e-08
   2  p1           3.51114e-01   2.27896e-02   2.22437e-04   1.27888e-01
   3  p2           1.18503e+03   5.92240e+01   3.18237e+00   1.06503e-05
   4  p3           1.45569e-01   5.93973e-05   4.11621e-06   1.60533e+00
   5  p4           1.24388e-03   6.60206e-05   3.72402e-06  -3.36599e+00
                               ERR DEF= 0.5
 FCN=3579.31 FROM MIGRAD    STATUS=CONVERGED      82 CALLS          83 TOTAL
                     EDM=1.14921e-08    STRATEGY= 1      ERROR MATRIX ACCURATE 
  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME      VALUE            ERROR          SIZE      DERIVATIVE 
   1  p0           3.32643e+05   7.03466e+03   1.44861e+02   1.13453e-08
   2  p1           7.51086e+02   3.59621e+01   1.43273e+00  -1.48704e-06
                               ERR DEF= 0.5
 FCN=717.592 FROM MIGRAD    STATUS=CONVERGED      63 CALLS          64 TOTAL
                     EDM=1.07894e-09    STRATEGY= 1      ERROR MATRIX ACCURATE 
  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME      VALUE            ERROR          SIZE      DERIVATIVE 
   1  p0           5.24322e+04   2.79115e+03   4.15601e+01   2.03253e-09
   2  p1           1.05481e+02   1.37963e+01   2.45652e-01   2.45980e-06
                               ERR DEF= 0.5
Info in <h1analysis::Fit Slices>: Restricting fit to two bins only in this example...
Info in <h1analysis::Terminate>: processed 283813 events