ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/HSCPValidation/scripts/genLevelPlots.C
Revision: 1.1
Committed: Wed Apr 7 08:48:54 2010 UTC (15 years ago) by carrillo
Content type: text/plain
Branch: MAIN
Log Message:
first release producing pngs from hadded root file

File Contents

# User Rev Content
1 carrillo 1.1 {
2     gROOT->Reset();
3     #include "Riostream.h"
4    
5     TFile * theFile1 = new TFile("stop130_genLevelPlots.root");
6     std::cout<<"Reading histos"<<std::endl;
7    
8     TH1F * particleEta = (TH1F*) (theFile1->Get("hscpGenPlots/particleEta"));
9     TH1F * particlePhi = (TH1F*) (theFile1->Get("hscpGenPlots/particlePhi"));
10     TH1F * particleP = (TH1F*) (theFile1->Get("hscpGenPlots/particleP"));
11     TH1F * particlePt = (TH1F*) (theFile1->Get("hscpGenPlots/particlePt"));
12     TH1F * particleMass = (TH1F*) (theFile1->Get("hscpGenPlots/particleMass"));
13     TH1F * particleStatus = (TH1F*) (theFile1->Get("hscpGenPlots/particleStatus"));
14     TH1F * particleBeta = (TH1F*) (theFile1->Get("hscpGenPlots/particleBeta"));
15     TH1F * particleBetaInverse = (TH1F*) (theFile1->Get("hscpGenPlots/particleBetaInverse"));
16    
17     std::string command = "mkdir gen";
18     system(command.c_str());
19    
20     TCanvas t;
21     t.cd();
22    
23     particleEta->Draw("E");
24     t.Print("gen/eta.png");
25     particlePhi->ReBin("4");
26     particlePhi->Draw("E");
27     t.Print("gen/phi.png");
28     particlePt->Draw();
29     t.Print("gen/pt.png");
30     particleP->Draw();
31     t.Print("gen/p.png");
32     particleBeta->Draw("E");
33     t.Print("gen/beta.png");
34     particleBetaInverse->Draw();
35     t.Print("gen/1beta.png");
36     }
37    
38    
39    
40    
41    
42    
43    
44    
45