/[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.4 by campana, Fri Feb 2 17:07:34 2007 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 80  void TriggerScanExpert(TString base, TSt Line 81  void TriggerScanExpert(TString base, TSt
81    //----------    //----------
82    sst.str("");    sst.str("");
83    sst << "Histogram of Calo pattern trigger " << base.Data();    sst << "Histogram of Calo pattern trigger " << base.Data();
84    TH1S *PatternTrig0Histo      = new TH1S("PatternTrig0Histo", sst.str().c_str(), 4, 0, 4);    TH1I *PatternTrig0Histo      = new TH1I("PatternTrig0Histo", sst.str().c_str(), 4, 0, 4);
85        
86    TCanvas *PatternTrig1 = new TCanvas("PatternTrig1","PatternTrig1", 1280, 1024);    TCanvas *PatternTrig1 = new TCanvas("PatternTrig1","PatternTrig1", 1280, 1024);
87    //----------    //----------
88    sst.str("");    sst.str("");
89    sst << "Histogram of S4 pattern trigger " << base.Data();    sst << "Histogram of S4 pattern trigger " << base.Data();
90    TH1S *PatternTrig1Histo      = new TH1S("PatternTrig1Histo", sst.str().c_str(), 3, 0, 3);    TH1I *PatternTrig1Histo      = new TH1I("PatternTrig1Histo", sst.str().c_str(), 3, 0, 3);
91        
92        
93    TCanvas *PatternTrig2 = new TCanvas("PatternTrig2","PatternTrig2", 1280, 1024);    TCanvas *PatternTrig2 = new TCanvas("PatternTrig2","PatternTrig2", 1280, 1024);
94    //----------    //----------
95    sst.str("");    sst.str("");
96    sst << "Histogram of S3 pattern trigger " << base.Data();    sst << "Histogram of S3 pattern trigger " << base.Data();
97    TH1S *PatternTrig2Histo      = new TH1S("PatternTrig2Histo", sst.str().c_str(), 12, 0, 12);    TH1I *PatternTrig2Histo      = new TH1I("PatternTrig2Histo", sst.str().c_str(), 12, 0, 12);
98        
99        
100    TCanvas *PatternTrig3 = new TCanvas("PatternTrig3","PatternTrig3", 1280, 1024);    TCanvas *PatternTrig3 = new TCanvas("PatternTrig3","PatternTrig3", 1280, 1024);
101    //----------    //----------
102    sst.str("");    sst.str("");
103    sst << "Histogram of S2 pattern trigger " << base.Data();    sst << "Histogram of S2 pattern trigger " << base.Data();
104    TH1S *PatternTrig3Histo      = new TH1S("PatternTrig3Histo", sst.str().c_str(), 8, 0, 8);    TH1I *PatternTrig3Histo      = new TH1I("PatternTrig3Histo", sst.str().c_str(), 8, 0, 8);
105        
106        
107    TCanvas *PatternTrig4 = new TCanvas("PatternTrig4","PatternTrig4", 1280, 1024);    TCanvas *PatternTrig4 = new TCanvas("PatternTrig4","PatternTrig4", 1280, 1024);
108    //----------    //----------
109    sst.str("");    sst.str("");
110    sst << "Histogram of S12 pattern trigger " << base.Data();    sst << "Histogram of S12 pattern trigger " << base.Data();
111    TH1S *PatternTrig4Histo      = new TH1S("PatternTrig4Histo", sst.str().c_str(), 12, 0, 12);    TH1I *PatternTrig4Histo      = new TH1I("PatternTrig4Histo", sst.str().c_str(), 12, 0, 12);
112        
113        
114    TCanvas *PatternTrig5 = new TCanvas("PatternTrig5","PatternTrig5", 1280, 1024);    TCanvas *PatternTrig5 = new TCanvas("PatternTrig5","PatternTrig5", 1280, 1024);
115    //----------    //----------
116    sst.str("");    sst.str("");
117    sst << "Histogram of S11 pattern trigger " << base.Data();    sst << "Histogram of S11 pattern trigger " << base.Data();
118    TH1S *PatternTrig5Histo      = new TH1S("PatternTrig5Histo", sst.str().c_str(), 16, 0, 16);    TH1I *PatternTrig5Histo      = new TH1I("PatternTrig5Histo", sst.str().c_str(), 16, 0, 16);
119        
120    int i  = 0;    int i  = 0;
121        
# Line 122  void TriggerScanExpert(TString base, TSt Line 123  void TriggerScanExpert(TString base, TSt
123      HeadBr->GetEntry(i);      HeadBr->GetEntry(i);
124      TrigBr->GetEntry(i);      TrigBr->GetEntry(i);
125    
126      gStyle->SetStatY(0.85);      gStyle->SetOptStat(0000000);
127        //    gStyle->SetStatY(0.85);
128    
129      int trte0=(int)triggerEvent->patterntrig[0];      int trte0=(int)triggerEvent->patterntrig[0];
130            
# Line 149  void TriggerScanExpert(TString base, TSt Line 151  void TriggerScanExpert(TString base, TSt
151      PatternTrig2Histo->AddBinContent(10,bit(trte2,9));      PatternTrig2Histo->AddBinContent(10,bit(trte2,9));
152      PatternTrig2Histo->AddBinContent(11,bit(trte2,10));      PatternTrig2Histo->AddBinContent(11,bit(trte2,10));
153      PatternTrig2Histo->AddBinContent(12,bit(trte2,11));      PatternTrig2Histo->AddBinContent(12,bit(trte2,11));
154      PatternTrig2Histo->AddBinContent(13,bit(trte2,12));  //     PatternTrig2Histo->AddBinContent(13,bit(trte2,12));
155      PatternTrig2Histo->AddBinContent(14,bit(trte2,13));  //     PatternTrig2Histo->AddBinContent(14,bit(trte2,13));
156      PatternTrig2Histo->AddBinContent(15,bit(trte2,14));  //     PatternTrig2Histo->AddBinContent(15,bit(trte2,14));
157      PatternTrig2Histo->AddBinContent(16,bit(trte2,15));  //     PatternTrig2Histo->AddBinContent(16,bit(trte2,15));
158            
159      int trte3=(int)triggerEvent->patterntrig[3];      int trte3=(int)triggerEvent->patterntrig[3];
160            
# Line 165  void TriggerScanExpert(TString base, TSt Line 167  void TriggerScanExpert(TString base, TSt
167      PatternTrig3Histo->AddBinContent(6,bit(trte3,5));      PatternTrig3Histo->AddBinContent(6,bit(trte3,5));
168      PatternTrig3Histo->AddBinContent(7,bit(trte3,6));      PatternTrig3Histo->AddBinContent(7,bit(trte3,6));
169      PatternTrig3Histo->AddBinContent(8,bit(trte3,7));      PatternTrig3Histo->AddBinContent(8,bit(trte3,7));
170      PatternTrig3Histo->AddBinContent(9,bit(trte3,8));  //     PatternTrig3Histo->AddBinContent(9,bit(trte3,8));
171      PatternTrig3Histo->AddBinContent(10,bit(trte3,9));  //     PatternTrig3Histo->AddBinContent(10,bit(trte3,9));
172      PatternTrig3Histo->AddBinContent(11,bit(trte3,10));  //     PatternTrig3Histo->AddBinContent(11,bit(trte3,10));
173      PatternTrig3Histo->AddBinContent(12,bit(trte3,11));  //     PatternTrig3Histo->AddBinContent(12,bit(trte3,11));
174      PatternTrig3Histo->AddBinContent(13,bit(trte3,12));  //     PatternTrig3Histo->AddBinContent(13,bit(trte3,12));
175      PatternTrig3Histo->AddBinContent(14,bit(trte3,13));  //     PatternTrig3Histo->AddBinContent(14,bit(trte3,13));
176      PatternTrig3Histo->AddBinContent(15,bit(trte3,14));  //     PatternTrig3Histo->AddBinContent(15,bit(trte3,14));
177      PatternTrig3Histo->AddBinContent(16,bit(trte3,15));  //     PatternTrig3Histo->AddBinContent(16,bit(trte3,15));
178            
179      int trte4=(int)triggerEvent->patterntrig[4];      int trte4=(int)triggerEvent->patterntrig[4];
180            
# Line 189  void TriggerScanExpert(TString base, TSt Line 191  void TriggerScanExpert(TString base, TSt
191      PatternTrig4Histo->AddBinContent(10,bit(trte4,9));      PatternTrig4Histo->AddBinContent(10,bit(trte4,9));
192      PatternTrig4Histo->AddBinContent(11,bit(trte4,10));      PatternTrig4Histo->AddBinContent(11,bit(trte4,10));
193      PatternTrig4Histo->AddBinContent(12,bit(trte4,11));      PatternTrig4Histo->AddBinContent(12,bit(trte4,11));
194      PatternTrig4Histo->AddBinContent(13,bit(trte4,12));  //     PatternTrig4Histo->AddBinContent(13,bit(trte4,12));
195      PatternTrig4Histo->AddBinContent(14,bit(trte4,13));  //     PatternTrig4Histo->AddBinContent(14,bit(trte4,13));
196      PatternTrig4Histo->AddBinContent(15,bit(trte4,14));  //     PatternTrig4Histo->AddBinContent(15,bit(trte4,14));
197      PatternTrig4Histo->AddBinContent(16,bit(trte4,15));  //     PatternTrig4Histo->AddBinContent(16,bit(trte4,15));
198                        
199      int trte5=(int)triggerEvent->patterntrig[5];      int trte5=(int)triggerEvent->patterntrig[5];
200                        
# Line 218  void TriggerScanExpert(TString base, TSt Line 220  void TriggerScanExpert(TString base, TSt
220    }    }
221                    
222                    
223    gStyle->SetOptStat(111111);    //  gStyle->SetStatH(0.15);
224    gStyle->SetStatH(0.15);    //  gStyle->SetStatW(0.15);
   gStyle->SetStatW(0.15);  
225    
226    /* Pattern Trigger draw*/    /* Pattern Trigger draw*/
227    
   gStyle->SetOptStat("mr");  
   
   
228    PatternTrig5->cd();    PatternTrig5->cd();
229    PatternTrig5Histo->SetMinimum(0.);    PatternTrig5Histo->SetMinimum(0.);
230    PatternTrig5Histo->Draw("");      PatternTrig5Histo->Draw("");  
231    
232    PatternTrig4->cd();    PatternTrig4->cd();
233    PatternTrig4Histo->SetMinimum(0.);    PatternTrig4Histo->SetMinimum(32500.);
234    PatternTrig4Histo->Draw("");    PatternTrig4Histo->Draw("");
235                                            
236    PatternTrig3->cd();    PatternTrig3->cd();
237    PatternTrig3Histo->SetMinimum(0.);    PatternTrig3Histo->SetMinimum(32500.);
238    PatternTrig3Histo->Draw("");    PatternTrig3Histo->Draw("");
239                    
240    PatternTrig2->cd();    PatternTrig2->cd();
241    PatternTrig2Histo->SetMinimum(0.);    PatternTrig2Histo->SetMinimum(32500.);
242    PatternTrig2Histo->Draw("");    PatternTrig2Histo->Draw("");
243                            
244    PatternTrig0->cd();    PatternTrig0->cd();
# Line 252  void TriggerScanExpert(TString base, TSt Line 250  void TriggerScanExpert(TString base, TSt
250    PatternTrig1Histo->Draw("");    PatternTrig1Histo->Draw("");
251                            
252    
253    gStyle->SetOptStat("mr");    //  gStyle->SetStatH(0.3);
254    gStyle->SetStatH(0.3);    //  gStyle->SetStatW(0.3);
   gStyle->SetStatW(0.3);  
255        
256    // print the output    // print the output
257    const char *saveas = format;    const char *saveas = format;
258    if ( !strcmp(saveas,"ps") ) {    if ( !strcmp(saveas,"ps") ) {
259      // ------print the ps      // ------print the ps
260            
     gStyle->SetOptStat(111111);  
   
261      sst.str("");      sst.str("");
262      sst << outDirectory.Data() << filename.Data() << "TriggerScanExpert." << saveas  << "(";      sst << outDirectory.Data() << filename.Data() << "TriggerScanExpert." << saveas  << "(";
     gStyle->SetOptStat("mr");  
263    
264      PatternTrig5->Print(sst.str().c_str());      PatternTrig5->Print(sst.str().c_str());
265      PatternTrig4->Print(sst.str().c_str());      PatternTrig4->Print(sst.str().c_str());
# Line 279  void TriggerScanExpert(TString base, TSt Line 273  void TriggerScanExpert(TString base, TSt
273            
274    } else {    } else {
275    
     gStyle->SetOptStat("mr");  
   
276      sst.str("");      sst.str("");
277      sst << outDirectory.Data() << filename.Data() << "TriggerScanExpert1." << saveas;      sst << outDirectory.Data() << filename.Data() << "TriggerScanExpert1." << saveas;
278      PatternTrig5->SaveAs(sst.str().c_str());      PatternTrig5->SaveAs(sst.str().c_str());

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

  ViewVC Help
Powered by ViewVC 1.1.23