18 |
* Fixed bugs: for a large namber of events is not possible to initialize vectors, so all graphs have been converted in histograms |
* Fixed bugs: for a large namber of events is not possible to initialize vectors, so all graphs have been converted in histograms |
19 |
* |
* |
20 |
* Known bugs: it is no possible to choise the figure format |
* Known bugs: it is no possible to choise the figure format |
21 |
|
* |
22 |
|
* Version 1.2 - August 2006 |
23 |
|
* Fixed bugs: is possible to choise figure format; all calibration are drown |
24 |
**************/ |
**************/ |
25 |
|
|
26 |
#include <fstream> |
#include <fstream> |
183 |
double limitdown=0; |
double limitdown=0; |
184 |
double limitup=0; |
double limitup=0; |
185 |
const Int_t size = nevents; |
const Int_t size = nevents; |
186 |
|
cout<<"size "<<size <<"\n"; |
187 |
|
|
188 |
headBr->GetEntry(0); |
headBr->GetEntry(0); |
189 |
ph = eh->GetPscuHeader(); |
ph = eh->GetPscuHeader(); |
194 |
obmin=firstime; |
obmin=firstime; |
195 |
obmax=lastime; |
obmax=lastime; |
196 |
if(nevents < 2){ |
if(nevents < 2){ |
197 |
|
for(Int_t kk = 0; kk<nevents; kk++){ |
198 |
|
headBr->GetEntry(kk); |
199 |
|
ph = eh->GetPscuHeader(); |
200 |
|
if(obmin >= ph->GetOrbitalTime())obmin=ph->GetOrbitalTime(); |
201 |
|
if(obmax <= ph->GetOrbitalTime())obmax=ph->GetOrbitalTime(); |
202 |
|
} |
203 |
limitdown= obmin - 1000000; |
limitdown= obmin - 1000000; |
204 |
limitup= obmax + 1000000; |
limitup= obmax + 1000000; |
205 |
}else{ |
}else{ |
206 |
|
for(Int_t kk = 0; kk<nevents; kk++){ |
207 |
|
headBr->GetEntry(kk); |
208 |
|
ph = eh->GetPscuHeader(); |
209 |
|
cout<<"OrbitalTime()"<<ph->GetOrbitalTime()<<"\n"; |
210 |
|
if(obmin >= ph->GetOrbitalTime())obmin=ph->GetOrbitalTime(); |
211 |
|
if(obmax <= ph->GetOrbitalTime())obmax=ph->GetOrbitalTime(); |
212 |
|
} |
213 |
limitdown=obmin; |
limitdown=obmin; |
214 |
limitup=obmax; |
limitup=obmax; |
215 |
} |
} |
216 |
stringstream oss; |
stringstream oss; |
217 |
oss.str(""); |
oss.str(""); |
218 |
oss << "S4_Calibration_QL: "<< filename.Data(); |
oss << "S4_Calibration_QL: "<< filename.Data(); |
219 |
TH1F *cal1 =new TH1F("calibS4_1", oss.str().c_str(), size, obmin, obmax); |
TH1F *cal1 =new TH1F("calibS4_1", oss.str().c_str(), size, obmin-1000000, obmax+ 1000000); |
220 |
TH1F *cal2 =new TH1F("calibS4_2", oss.str().c_str(), size, obmin, obmax); |
TH1F *cal2 =new TH1F("calibS4_2", oss.str().c_str(), size, obmin-1000000, obmax+ 1000000); |
221 |
TH1F *cal4 =new TH1F("calibS4_4", oss.str().c_str(), size, obmin, obmax); |
TH1F *cal4 =new TH1F("calibS4_4", oss.str().c_str(), size, obmin-1000000, obmax+ 1000000); |
222 |
|
|
223 |
for(Int_t k = 0; k<nevents; k++){ |
for(Int_t k = 0; k<nevents; k++){ |
224 |
headBr->GetEntry(k); |
headBr->GetEntry(k); |
255 |
cal1->Fill(ph->GetOrbitalTime(),calib_1); |
cal1->Fill(ph->GetOrbitalTime(),calib_1); |
256 |
cal2->Fill(ph->GetOrbitalTime(),calib_2); |
cal2->Fill(ph->GetOrbitalTime(),calib_2); |
257 |
cal4->Fill(ph->GetOrbitalTime(),calib_4); |
cal4->Fill(ph->GetOrbitalTime(),calib_4); |
258 |
|
cout<<"k"<<k<<"\n"; |
259 |
//cout<<calib_1_RMS<<"\n"; |
//cout<<calib_1_RMS<<"\n"; |
260 |
//cout<<calib_2_RMS<<"\n"; |
//cout<<calib_2_RMS<<"\n"; |
261 |
//cout<<calib_4_RMS<<"\n"; |
//cout<<calib_4_RMS<<"\n"; |