/[PAMELA software]/quicklook/QLflightS4_ND/S4_Calibration_QL.cpp
ViewVC logotype

Diff of /quicklook/QLflightS4_ND/S4_Calibration_QL.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by pam-rm2, Fri Jul 7 09:19:22 2006 UTC revision 1.3 by pam-rm2, Tue Aug 22 09:06:35 2006 UTC
# Line 18  Line 18 
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>
# Line 180  void S4_Calibration_QL(TString base, TSt Line 183  void S4_Calibration_QL(TString base, TSt
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();
# Line 190  void S4_Calibration_QL(TString base, TSt Line 194  void S4_Calibration_QL(TString base, TSt
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);
# Line 238  void S4_Calibration_QL(TString base, TSt Line 255  void S4_Calibration_QL(TString base, TSt
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";

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.23