BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
BesMdcRes.cc
Go to the documentation of this file.
1#include "MdcTunningSvc/BesMdcRes.hh"
2#include <cstdlib>
3#include <fstream>
4#include <iostream>
5#include <string>
6using namespace std;
7
8BesMdcRes::BesMdcRes( string& path ) {
9 int layerId, bin, layId;
10 double sigma;
11 double cons1, sigma1, cons2, sigma2, Sig, sigmaE;
12 double effi, m_nhit_Raw, m_nhit_Exp;
13
14 /*
15 //read lay efficiency parameter
16 ifstream infpar5;
17 string logeff_raw= path+"/data/logeffi_0_42.dat";
18 infpar5.open(logeff_raw.c_str());
19 if( !infpar5.good()){
20 std::cout<<"Error,mdc parameter file4 Data-effi-lay not exist "<<std::endl;
21 exit (0);
22 }else{
23 std::cout<<" open mdc parameter file4 Data-effi-lay "<<std::endl;
24 for(int lay =0; lay<43;lay++){
25 infpar5 >> lay;
26 for(int dD = 0; dD<91;dD++ ){
27 infpar5 >> dD >> effi >> m_nhit_Raw >> m_nhit_Exp ;
28 par_lay5[lay][dD] = effi;
29 //cout<<"lay : "<<lay<<" dD "<<dD <<" =" <<effi<<endl;
30 }
31 }// end of lay loop
32 }
33
34*/
35 // read resolution Vs enter angle and doca
36 ifstream infpar6;
37 string logres_iEntr = path + "/data/logrVetr.dat";
38 infpar6.open( logres_iEntr.c_str() );
39 if ( !infpar6.good() )
40 {
41 std::cout << " Error , mdc parameters file6 Data_res_iEnter not exist " << std::endl;
42 exit( 0 );
43 }
44 else
45 {
46 std::cout << " open mdc parameter file6 Data_res_iEnter " << std::endl;
47 for ( int lay = 0; lay < 43; lay++ )
48 {
49 infpar6 >> lay;
50 for ( int iEntr = 0; iEntr < 2; iEntr++ )
51 {
52 infpar6 >> iEntr;
53 for ( int dD = 0; dD < 18; dD++ )
54 {
55 infpar6 >> dD >> sigmaE;
56 par_lay6[lay][iEntr][dD] = sigmaE;
57 // cout<<" lay : "<<lay<<" iEntr : "<<iEntr<<" dD : "<<dD<<" = "<<sigmaE<<endl;
58 }
59 }
60 } // end of lay loop
61 }
62
63 // read resolution Vs enter angle and doca
64 ifstream infpar7;
65 string logres_M_iEntr = path + "/mc/logrVetr.dat";
66 infpar7.open( logres_M_iEntr.c_str() );
67 if ( !infpar7.good() )
68 {
69 std::cout << "Error,mdc parameters file7 Mc_res_iEntr not exist" << std::endl;
70 exit( 0 );
71 }
72 else
73 {
74 std::cout << "open mdc parameters file7 Mc_res_iEntr " << std::endl;
75 for ( int lay = 0; lay < 43; lay++ )
76 {
77 infpar7 >> lay;
78 for ( int iEntr = 0; iEntr < 2; iEntr++ )
79 {
80 infpar7 >> iEntr;
81 for ( int dD = 0; dD < 18; dD++ )
82 {
83 infpar7 >> dD >> sigmaE;
84 par_lay7[lay][iEntr][dD] = sigmaE;
85 // std::cout<<"par_lay7["<<lay<<"]["<<iEntr<<"]["<<dD<<"] : "<<sigmaE<<std::endl;
86 }
87 }
88 } // end of lay loop
89 }
90}
*******INTEGER m_nBinMax INTEGER m_NdiMax !No of bins in histogram for cell exploration division $ !Last vertex $ !Last active cell $ !Last cell in buffer $ !No of sampling when dividing cell $ !No of function total $ !Flag for random ceel for $ !Flag for type of for WtMax $ !Flag which decides whether vertices are included in the sampling $ entire domain is hyp !Maximum effective eevents per bin
Definition FoamA.h:85
BesMdcRes(std::string &path)