43{
44 MsgStream log(
msgSvc(), name());
45 log<<MSG::INFO<<"DedxCalibRunByRun::FillHists()"<<endreq;
46
48 TTree* n103;
49 string runlist;
50
51 int ndedxhit=0;
52 double dEdx[100]={0},pathlength[100]={0},wid[100]={0},layid[100]={0},dd_in[100]={0},eangle[100]={0},zhit[100]={0};
53 double dedx=0;
54 float runNO=0, evtNO=0, runFlag=0,
costheta=0,tes=0;
55 vector<double> phlist;
56 for(
int i=0; i<
runNo; i++)
57 {
59 f =
new TFile(runlist.c_str());
60 n103 = (TTree*)
f->Get(
"n103");
74 int m(0);
75 int index(0);
76 float evtfrom(0);
77 struct runevt m_runevt;
78 for(int j=0;j<n103->GetEntries();j++)
79 {
80 phlist.clear();
81 n103->GetEntry(j);
82 for(int k=0;k<ndedxhit;k++)
83 {
84 dEdx[k] =
exsvc->
StandardHitCorrec(0,runFlag,2,runNO, evtNO, pathlength[k],wid[k],layid[k],dEdx[k],dd_in[k],eangle[k],
costheta);
85 phlist.push_back(dEdx[k]);
86 }
90 m_hist->Fill(dedx);
91 m++;
93 {
94 m_runevt.runno = runNO;
95 m_runevt.evtfrom = evtfrom;
96 m_runevt.evtto = evtNO;
98 m_runevt.local_index = index;
99 m_evtNOVector.push_back(m_runevt);
100 evtfrom = evtNO +1;
101 index ++;
102 m = 0;
103 }
105 log<<MSG::FATAL<<"DedxCalibRunByRun: Too many events in a run!!!"<<endreq;
106 break;
107 }
108 }
109 if(index) m_evtNOVector.pop_back();
110 else{
111 m_runevt.runno = runNO;
112 m_runevt.evtfrom = 0;
114 m_runevt.local_index = 0;
115 }
117 m_evtNOVector.push_back(m_runevt);
118 cout<<"runNO = "<< m_runevt.runno << endl;
119 }
120}
double cal_dedx_bitrunc(float truncate, std::vector< double > phlist)
virtual double StandardHitCorrec(int calib_rec_Flag, int runFlag, int ntpFlag, int runNO, int evtNO, double pathl, int wid, int layid, double adc, double dd, double eangle, double costheta) const =0
virtual double StandardTrackCorrec(int calib_rec_Flag, int typFlag, int ntpFlag, int runNO, int evtNO, double ex, double costheta, double t0) const =0
TFile f("ana_bhabha660a_dqa_mcPat_zy_old.root")
curve SetBranchAddress("CurveSize",&CurveSize)