/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Simulation/BOOST/MdcTunningSvc/MdcTunningSvc-00-00-27/src/BesMdcRes.cc

Go to the documentation of this file.
00001 #include "BesMdcRes.hh"
00002 #include <iostream> 
00003 #include <fstream> 
00004 #include <string> 
00005 #include <cstdlib>
00006 using namespace std;
00007 
00008 BesMdcRes::BesMdcRes(string& path){
00009         int layerId, bin,layId ;
00010         double sigma;
00011         double cons1,sigma1,cons2,sigma2,Sig,sigmaE;
00012         double effi,m_nhit_Raw,m_nhit_Exp;
00013 
00014 
00015         /*
00016         //read lay efficiency parameter
00017         ifstream  infpar5;
00018         string logeff_raw= path+"/data/logeffi_0_42.dat";
00019         infpar5.open(logeff_raw.c_str());
00020         if( !infpar5.good()){
00021         std::cout<<"Error,mdc parameter file4 Data-effi-lay not exist "<<std::endl;
00022         exit (0);
00023         }else{
00024         std::cout<<" open mdc parameter file4 Data-effi-lay "<<std::endl;
00025         for(int lay =0; lay<43;lay++){
00026         infpar5 >> lay;
00027         for(int dD = 0; dD<91;dD++ ){
00028         infpar5 >> dD >> effi >> m_nhit_Raw >> m_nhit_Exp ;
00029         par_lay5[lay][dD] = effi;
00030         //cout<<"lay : "<<lay<<" dD  "<<dD <<" =" <<effi<<endl;
00031         }
00032         }// end of lay loop
00033         }
00034 
00035 */
00036         //read resolution Vs enter angle and doca 
00037         ifstream infpar6;
00038         string logres_iEntr = path+"/data/logrVetr.dat";
00039         infpar6.open(logres_iEntr.c_str());
00040         if(!infpar6.good()){
00041                 std::cout<<" Error , mdc parameters file6 Data_res_iEnter not exist "<<std::endl;
00042                 exit (0);
00043         }else{
00044                 std::cout<<" open mdc parameter file6 Data_res_iEnter  "<<std::endl;
00045                 for(int lay =0;lay<43;lay++){
00046                         infpar6 >> lay;
00047                         for(int iEntr =0;iEntr<2;iEntr++){
00048                                 infpar6 >> iEntr;
00049                                 for(int dD =0;dD<18;dD++){
00050                                         infpar6 >> dD >> sigmaE;
00051                                         par_lay6[lay][iEntr][dD] = sigmaE;
00052                                         // cout<<" lay : "<<lay<<" iEntr : "<<iEntr<<" dD : "<<dD<<" = "<<sigmaE<<endl;
00053                                 }
00054                         }
00055                 }// end of lay loop
00056         }
00057 
00058         //read resolution Vs enter angle and doca
00059         ifstream infpar7;
00060         string logres_M_iEntr = path + "/mc/logrVetr.dat";
00061         infpar7.open(logres_M_iEntr.c_str());
00062         if(!infpar7.good()){
00063                 std::cout<<"Error,mdc parameters file7 Mc_res_iEntr not exist"<<std::endl;
00064                 exit (0);
00065         }else{
00066                 std::cout<<"open mdc parameters file7 Mc_res_iEntr "<<std::endl;
00067                 for(int lay =0;lay<43;lay++){
00068                         infpar7 >> lay;
00069                         for(int iEntr =0;iEntr<2;iEntr++){
00070                                 infpar7 >> iEntr;
00071                                 for(int dD =0;dD<18;dD++){
00072                                         infpar7 >> dD >> sigmaE;
00073                                         par_lay7[lay][iEntr][dD] = sigmaE;
00074                                         // std::cout<<"par_lay7["<<lay<<"]["<<iEntr<<"]["<<dD<<"] : "<<sigmaE<<std::endl;
00075                                 }
00076                         }
00077                 }//end of lay loop
00078         } 
00079 
00080 } 

Generated on Tue Nov 29 23:14:28 2016 for BOSS_7.0.2 by  doxygen 1.4.7