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

Diff of /quicklook/QLflightS4_ND/ND_QL.cpp

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

revision 1.5 by pam-rm2, Mon Sep 25 08:42:56 2006 UTC revision 1.6 by pam-rm2, Mon Mar 12 14:32:46 2007 UTC
# Line 64  void ND_QL(TString base, TString outDir, Line 64  void ND_QL(TString base, TString outDir,
64    ULong_t  lastime=0, firstime=700000000;    ULong_t  lastime=0, firstime=700000000;
65    Double_t scale= 1./DeltaTevtime;    Double_t scale= 1./DeltaTevtime;
66    stringstream title, title1;    stringstream title, title1;
67    double obt;      ULong_t obt;  
68    stringstream oss, noentries;    stringstream oss, noentries;
69    stringstream oss1, oss2, oss3;    stringstream oss1, oss2, oss3;
70    
# Line 138  void ND_QL(TString base, TString outDir, Line 138  void ND_QL(TString base, TString outDir,
138    for (Int_t i = 0; i < nevents; i++){    for (Int_t i = 0; i < nevents; i++){
139      headBr->GetEntry(i);      headBr->GetEntry(i);
140      ph = eh->GetPscuHeader();      ph = eh->GetPscuHeader();
141      if((ph->GetOrbitalTime()) <= firstime) firstime=ph->GetOrbitalTime();      obt=ph->GetOrbitalTime();
142      if((ph->GetOrbitalTime()) >= lastime) lastime=ph->GetOrbitalTime();      if(obt<=firstime) firstime=ph->GetOrbitalTime();
143        if(obt>=lastime) lastime=ph->GetOrbitalTime();
144     }     }
145    
146     const Double_t nint=((lastime-firstime)/(DeltaTevtime*60000));     const ULong_t nint=((lastime-firstime)/(DeltaTevtime*60000));
147     const Double_t nint1=((lastime-firstime)/(DeltaT));//     const ULong_t nint1=((lastime-firstime)/(DeltaT));//
148     const Double_t nint2=lastime-firstime;     const ULong_t nint2=lastime-firstime;
149     int nbin=(int)nint;     int nbin=(int)nint;
150     int nbin1=(int)nint1;     int nbin1=(int)nint1;
151     int nbin2=(int)nint2;     int nbin2=(int)nint2;
152     if(nbin2 >= 37000000) nbin2=37000000;     if(nbin2 >= 37000000) nbin2=37000000;
153     double obmin=firstime;     Double_t obmin=firstime;
154     double obmax=lastime;     Double_t obmax=lastime;
155        
156    //************************** HISTOGRAMS ***************************************************//    //************************** HISTOGRAMS ***************************************************//
157    //---------------------------- First histograms -----------------------------------------//    //---------------------------- First histograms -----------------------------------------//
# Line 196  void ND_QL(TString base, TString outDir, Line 197  void ND_QL(TString base, TString outDir,
197        yUpperBackground  = yUpperBackground  + (int)nr->upperBack;        yUpperBackground  = yUpperBackground  + (int)nr->upperBack;
198        yBottomBackground = yBottomBackground + (int)nr->bottomBack;        yBottomBackground = yBottomBackground + (int)nr->bottomBack;
199      }      }
200      histo1->Fill(ph->GetOrbitalTime(), yUpperBackground);      obt=ph->GetOrbitalTime();
201      histo1bis->Fill(ph->GetOrbitalTime(), yUpperBackground);      histo1->Fill(obt, yUpperBackground);
202      histo2->Fill(ph->GetOrbitalTime(), yBottomBackground);      histo1bis->Fill(obt, yUpperBackground);
203      h1->Fill(ph->GetOrbitalTime(), yBottomBackground);      histo2->Fill(obt, yBottomBackground);
204      h3->Fill(ph->GetOrbitalTime(), yUpperBackground);      h1->Fill(obt, yBottomBackground);
205        h3->Fill(obt, yUpperBackground);
206    
207      Trig->Fill(ph->GetOrbitalTime(), yTrig);      Trig->Fill(obt, yTrig);
208      Trigger->Fill(ph->GetOrbitalTime(), yTrig);      Trigger->Fill(obt, yTrig);
209      if(yTrig >=10)          if(yTrig >=10)    
210        Triggercut->Fill(ph->GetOrbitalTime(), yTrig);        Triggercut->Fill(obt, yTrig);
211      yUpperBackground=0;      yUpperBackground=0;
212      yBottomBackground=0;      yBottomBackground=0;
213      yTrig=0;      yTrig=0;
# Line 476  int main(int argc, char* argv[]){ Line 478  int main(int argc, char* argv[]){
478     ND_QL(argv[1], outDir, format, DeltaT, DeltaTevtime);     ND_QL(argv[1], outDir, format, DeltaT, DeltaTevtime);
479  }  }
480    
   

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

  ViewVC Help
Powered by ViewVC 1.1.23