Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-09-27 07:03:45

0001 
0002 // 
0003 // ! Make sure libDELPHES.so is in LD_LIBRARY_PATH
0004 //
0005 // root -l reader.C
0006 //
0007 
0008 void reader( void )
0009 {
0010   auto ff = new TFile("pfRICH.root");
0011   auto dconfig = dynamic_cast<DelphesConfig*>(ff->Get("DelphesConfigRICH"));
0012   ff->Close();
0013 
0014   auto hypo = dconfig->GetMassHypothesis(211);
0015   printf("%d %f\n", hypo->PdgCode(), hypo->Mass()); 
0016 
0017   unsigned hdim = dconfig->GetMassHypothesisCount();
0018 
0019   printf("%u; eta range %7.2f .. %7.2f\n", hdim, dconfig->GetEtaMin(), dconfig->GetEtaMax());
0020   
0021   {
0022     int harr[hdim];
0023 
0024     dconfig->GetMassHypotheses(harr);
0025     for(unsigned ih=0; ih<hdim; ih++)
0026       printf("%4d\n", harr[ih]);
0027   }
0028 
0029   {
0030     double hmtx[hdim*hdim];
0031 
0032     // This should also work;
0033     //TVector3 p(0.0, 1.0, -10.); 
0034     //int ret = dconfig->GetSmearingMatrix(p, hmtx);
0035     int ret = dconfig->GetSmearingMatrix(-2.0, 13.0, hmtx);
0036     for(unsigned i0=0; i0<hdim; i0++) {
0037       for(unsigned i1=0; i1<hdim; i1++) 
0038     printf("%8.4f ", hmtx[i0*hdim + i1]);
0039       
0040       printf("\n");
0041     } //for i0
0042   }
0043 } // reader()