/[PAMELA software]/quicklook/trigger/src/TriggerScanExpert.cpp
ViewVC logotype

Diff of /quicklook/trigger/src/TriggerScanExpert.cpp

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

revision 1.3 by campana, Thu Sep 21 12:41:41 2006 UTC revision 1.6 by mocchiut, Fri Jan 17 15:10:49 2014 UTC
# Line 16  Line 16 
16   *      TString format          - the format which will be used for save the produced images (Default = "ps")   *      TString format          - the format which will be used for save the produced images (Default = "ps")
17   */   */
18    
19    #include <TROOT.h>
20  #include <TFile.h>  #include <TFile.h>
21  #include <TString.h>  #include <TString.h>
22  #include <TObjString.h>  #include <TObjString.h>
# Line 32  Line 33 
33  #include <EventHeader.h>  #include <EventHeader.h>
34  #include <PscuHeader.h>  #include <PscuHeader.h>
35  #include <iostream>  #include <iostream>
36    #include <cstdlib>
37    
38  using namespace std;  using namespace std;
39    
# Line 80  void TriggerScanExpert(TString base, TSt Line 82  void TriggerScanExpert(TString base, TSt
82    //----------    //----------
83    sst.str("");    sst.str("");
84    sst << "Histogram of Calo pattern trigger " << base.Data();    sst << "Histogram of Calo pattern trigger " << base.Data();
85    TH1S *PatternTrig0Histo      = new TH1S("PatternTrig0Histo", sst.str().c_str(), 4, 0, 4);    TH1I *PatternTrig0Histo      = new TH1I("PatternTrig0Histo", sst.str().c_str(), 4, 0, 4);
86        
87    TCanvas *PatternTrig1 = new TCanvas("PatternTrig1","PatternTrig1", 1280, 1024);    TCanvas *PatternTrig1 = new TCanvas("PatternTrig1","PatternTrig1", 1280, 1024);
88    //----------    //----------
89    sst.str("");    sst.str("");
90    sst << "Histogram of S4 pattern trigger " << base.Data();    sst << "Histogram of S4 pattern trigger " << base.Data();
91    TH1S *PatternTrig1Histo      = new TH1S("PatternTrig1Histo", sst.str().c_str(), 3, 0, 3);    TH1I *PatternTrig1Histo      = new TH1I("PatternTrig1Histo", sst.str().c_str(), 3, 0, 3);
92        
93        
94    TCanvas *PatternTrig2 = new TCanvas("PatternTrig2","PatternTrig2", 1280, 1024);    TCanvas *PatternTrig2 = new TCanvas("PatternTrig2","PatternTrig2", 1280, 1024);
95    //----------    //----------
96    sst.str("");    sst.str("");
97    sst << "Histogram of S3 pattern trigger " << base.Data();    sst << "Histogram of S3 pattern trigger " << base.Data();
98    TH1S *PatternTrig2Histo      = new TH1S("PatternTrig2Histo", sst.str().c_str(), 12, 0, 12);    TH1I *PatternTrig2Histo      = new TH1I("PatternTrig2Histo", sst.str().c_str(), 12, 0, 12);
99        
100        
101    TCanvas *PatternTrig3 = new TCanvas("PatternTrig3","PatternTrig3", 1280, 1024);    TCanvas *PatternTrig3 = new TCanvas("PatternTrig3","PatternTrig3", 1280, 1024);
102    //----------    //----------
103    sst.str("");    sst.str("");
104    sst << "Histogram of S2 pattern trigger " << base.Data();    sst << "Histogram of S2 pattern trigger " << base.Data();
105    TH1S *PatternTrig3Histo      = new TH1S("PatternTrig3Histo", sst.str().c_str(), 8, 0, 8);    TH1I *PatternTrig3Histo      = new TH1I("PatternTrig3Histo", sst.str().c_str(), 8, 0, 8);
106        
107        
108    TCanvas *PatternTrig4 = new TCanvas("PatternTrig4","PatternTrig4", 1280, 1024);    TCanvas *PatternTrig4 = new TCanvas("PatternTrig4","PatternTrig4", 1280, 1024);
109    //----------    //----------
110    sst.str("");    sst.str("");
111    sst << "Histogram of S12 pattern trigger " << base.Data();    sst << "Histogram of S12 pattern trigger " << base.Data();
112    TH1S *PatternTrig4Histo      = new TH1S("PatternTrig4Histo", sst.str().c_str(), 12, 0, 12);    TH1I *PatternTrig4Histo      = new TH1I("PatternTrig4Histo", sst.str().c_str(), 12, 0, 12);
113        
114        
115    TCanvas *PatternTrig5 = new TCanvas("PatternTrig5","PatternTrig5", 1280, 1024);    TCanvas *PatternTrig5 = new TCanvas("PatternTrig5","PatternTrig5", 1280, 1024);
116    //----------    //----------
117    sst.str("");    sst.str("");
118    sst << "Histogram of S11 pattern trigger " << base.Data();    sst << "Histogram of S11 pattern trigger " << base.Data();
119    TH1S *PatternTrig5Histo      = new TH1S("PatternTrig5Histo", sst.str().c_str(), 16, 0, 16);    TH1I *PatternTrig5Histo      = new TH1I("PatternTrig5Histo", sst.str().c_str(), 16, 0, 16);
120        
121    int i  = 0;    int i  = 0;
122        
# Line 122  void TriggerScanExpert(TString base, TSt Line 124  void TriggerScanExpert(TString base, TSt
124      HeadBr->GetEntry(i);      HeadBr->GetEntry(i);
125      TrigBr->GetEntry(i);      TrigBr->GetEntry(i);
126    
127      gStyle->SetStatY(0.85);      gStyle->SetOptStat(0000000);
128        //    gStyle->SetStatY(0.85);
129    
130      int trte0=(int)triggerEvent->patterntrig[0];      int trte0=(int)triggerEvent->patterntrig[0];
131            
# Line 149  void TriggerScanExpert(TString base, TSt Line 152  void TriggerScanExpert(TString base, TSt
152      PatternTrig2Histo->AddBinContent(10,bit(trte2,9));      PatternTrig2Histo->AddBinContent(10,bit(trte2,9));
153      PatternTrig2Histo->AddBinContent(11,bit(trte2,10));      PatternTrig2Histo->AddBinContent(11,bit(trte2,10));
154      PatternTrig2Histo->AddBinContent(12,bit(trte2,11));      PatternTrig2Histo->AddBinContent(12,bit(trte2,11));
155      PatternTrig2Histo->AddBinContent(13,bit(trte2,12));  //     PatternTrig2Histo->AddBinContent(13,bit(trte2,12));
156      PatternTrig2Histo->AddBinContent(14,bit(trte2,13));  //     PatternTrig2Histo->AddBinContent(14,bit(trte2,13));
157      PatternTrig2Histo->AddBinContent(15,bit(trte2,14));  //     PatternTrig2Histo->AddBinContent(15,bit(trte2,14));
158      PatternTrig2Histo->AddBinContent(16,bit(trte2,15));  //     PatternTrig2Histo->AddBinContent(16,bit(trte2,15));
159            
160      int trte3=(int)triggerEvent->patterntrig[3];      int trte3=(int)triggerEvent->patterntrig[3];
161            
# Line 165  void TriggerScanExpert(TString base, TSt Line 168  void TriggerScanExpert(TString base, TSt
168      PatternTrig3Histo->AddBinContent(6,bit(trte3,5));      PatternTrig3Histo->AddBinContent(6,bit(trte3,5));
169      PatternTrig3Histo->AddBinContent(7,bit(trte3,6));      PatternTrig3Histo->AddBinContent(7,bit(trte3,6));
170      PatternTrig3Histo->AddBinContent(8,bit(trte3,7));      PatternTrig3Histo->AddBinContent(8,bit(trte3,7));
171      PatternTrig3Histo->AddBinContent(9,bit(trte3,8));  //     PatternTrig3Histo->AddBinContent(9,bit(trte3,8));
172      PatternTrig3Histo->AddBinContent(10,bit(trte3,9));  //     PatternTrig3Histo->AddBinContent(10,bit(trte3,9));
173      PatternTrig3Histo->AddBinContent(11,bit(trte3,10));  //     PatternTrig3Histo->AddBinContent(11,bit(trte3,10));
174      PatternTrig3Histo->AddBinContent(12,bit(trte3,11));  //     PatternTrig3Histo->AddBinContent(12,bit(trte3,11));
175      PatternTrig3Histo->AddBinContent(13,bit(trte3,12));  //     PatternTrig3Histo->AddBinContent(13,bit(trte3,12));
176      PatternTrig3Histo->AddBinContent(14,bit(trte3,13));  //     PatternTrig3Histo->AddBinContent(14,bit(trte3,13));
177      PatternTrig3Histo->AddBinContent(15,bit(trte3,14));  //     PatternTrig3Histo->AddBinContent(15,bit(trte3,14));
178      PatternTrig3Histo->AddBinContent(16,bit(trte3,15));  //     PatternTrig3Histo->AddBinContent(16,bit(trte3,15));
179            
180      int trte4=(int)triggerEvent->patterntrig[4];      int trte4=(int)triggerEvent->patterntrig[4];
181            
# Line 189  void TriggerScanExpert(TString base, TSt Line 192  void TriggerScanExpert(TString base, TSt
192      PatternTrig4Histo->AddBinContent(10,bit(trte4,9));      PatternTrig4Histo->AddBinContent(10,bit(trte4,9));
193      PatternTrig4Histo->AddBinContent(11,bit(trte4,10));      PatternTrig4Histo->AddBinContent(11,bit(trte4,10));
194      PatternTrig4Histo->AddBinContent(12,bit(trte4,11));      PatternTrig4Histo->AddBinContent(12,bit(trte4,11));
195      PatternTrig4Histo->AddBinContent(13,bit(trte4,12));  //     PatternTrig4Histo->AddBinContent(13,bit(trte4,12));
196      PatternTrig4Histo->AddBinContent(14,bit(trte4,13));  //     PatternTrig4Histo->AddBinContent(14,bit(trte4,13));
197      PatternTrig4Histo->AddBinContent(15,bit(trte4,14));  //     PatternTrig4Histo->AddBinContent(15,bit(trte4,14));
198      PatternTrig4Histo->AddBinContent(16,bit(trte4,15));  //     PatternTrig4Histo->AddBinContent(16,bit(trte4,15));
199                        
200      int trte5=(int)triggerEvent->patterntrig[5];      int trte5=(int)triggerEvent->patterntrig[5];
201                        
# Line 218  void TriggerScanExpert(TString base, TSt Line 221  void TriggerScanExpert(TString base, TSt
221    }    }
222                    
223                    
224    gStyle->SetOptStat(111111);    //  gStyle->SetStatH(0.15);
225    gStyle->SetStatH(0.15);    //  gStyle->SetStatW(0.15);
   gStyle->SetStatW(0.15);  
226    
227    /* Pattern Trigger draw*/    /* Pattern Trigger draw*/
228    
   gStyle->SetOptStat("mr");  
   
   
229    PatternTrig5->cd();    PatternTrig5->cd();
230    PatternTrig5Histo->SetMinimum(0.);    PatternTrig5Histo->SetMinimum(0.);
231    PatternTrig5Histo->Draw("");      PatternTrig5Histo->Draw("");  
# Line 252  void TriggerScanExpert(TString base, TSt Line 251  void TriggerScanExpert(TString base, TSt
251    PatternTrig1Histo->Draw("");    PatternTrig1Histo->Draw("");
252                            
253    
254    gStyle->SetOptStat("mr");    //  gStyle->SetStatH(0.3);
255    gStyle->SetStatH(0.3);    //  gStyle->SetStatW(0.3);
   gStyle->SetStatW(0.3);  
256        
257    // print the output    // print the output
258    const char *saveas = format;    const char *saveas = format;
259    if ( !strcmp(saveas,"ps") ) {    if ( !strcmp(saveas,"ps") ) {
260      // ------print the ps      // ------print the ps
261            
     gStyle->SetOptStat(111111);  
   
262      sst.str("");      sst.str("");
263      sst << outDirectory.Data() << filename.Data() << "TriggerScanExpert." << saveas  << "(";      sst << outDirectory.Data() << filename.Data() << "TriggerScanExpert." << saveas  << "(";
     gStyle->SetOptStat("mr");  
264    
265      PatternTrig5->Print(sst.str().c_str());      PatternTrig5->Print(sst.str().c_str());
266      PatternTrig4->Print(sst.str().c_str());      PatternTrig4->Print(sst.str().c_str());
# Line 279  void TriggerScanExpert(TString base, TSt Line 274  void TriggerScanExpert(TString base, TSt
274            
275    } else {    } else {
276    
     gStyle->SetOptStat("mr");  
   
277      sst.str("");      sst.str("");
278      sst << outDirectory.Data() << filename.Data() << "TriggerScanExpert1." << saveas;      sst << outDirectory.Data() << filename.Data() << "TriggerScanExpert1." << saveas;
279      PatternTrig5->SaveAs(sst.str().c_str());      PatternTrig5->SaveAs(sst.str().c_str());

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

  ViewVC Help
Powered by ViewVC 1.1.23