FEDRA emulsion software from the OPERA Collaboration
craw.C File Reference
#include "TROOT.h"
#include "TStyle.h"
#include "TCanvas.h"
#include "TTree.h"
Include dependency graph for craw.C:

Functions

void check_a (float meanw=2200.)
 
void check_e ()
 
void check_ss ()
 
void check_view ()
 
void check_z ()
 
void craw (const char *inputcut="1")
 
TCut cut ("1")
 
void init ()
 

Variables

TTree * cr_tree =0
 

Function Documentation

◆ check_a()

void check_a ( float  meanw = 2200.)
62{
63 TCanvas *c = new TCanvas("check_a","check area",600,800);
64 c->Divide(1,2);
65
66 cr_tree->SetAlias("nclm","Sum$(eNcl)/Length$(eNcl)");
67
68 cr_tree->Draw("eYview:eXview>>h(200,0,1000,200,0,1000)",cut,"goff");
69
70 c->cd(1);
71 cr_tree->SetMarkerStyle(1);
72 cr_tree->Draw("eYview:eXview","nclm*(eNframesTop>0)");
73 int nraws = cr_tree->GetSelectedRows();
74 Double_t *x = cr_tree->GetV1();
75 Double_t *y = cr_tree->GetV2();
76 Double_t *w = cr_tree->GetW();
77 printf("%d raws: %d\n", nraws);
78 TMarker *m;
79 for(int i=0; i<nraws; i++) {
80 m= new TMarker( y[i],x[i], 24);
81 m->SetMarkerSize( w[i]/meanw );
82 m->SetMarkerColor(kRed);
83 m->Draw();
84 }
85 cr_tree->SetMarkerColor(kBlue);
86 cr_tree->SetMarkerStyle(6);
87 cr_tree->Draw("eYview:eXview",cut && "eNframesBot>0","same");
88
89 c->cd(2);
90 cr_tree->SetMarkerStyle(1);
91 cr_tree->Draw("eYview:eXview","nclm*(eNframesBot>0)");
92 int nraws = cr_tree->GetSelectedRows();
93 Double_t *x = cr_tree->GetV1();
94 Double_t *y = cr_tree->GetV2();
95 Double_t *w = cr_tree->GetW();
96 printf("%d raws: %d\n", nraws);
97 TMarker *m;
98 for(int i=0; i<nraws; i++) {
99 m= new TMarker( y[i],x[i], 24);
100 m->SetMarkerSize( w[i]/meanw );
101 m->SetMarkerColor(kBlue);
102 m->Draw();
103 }
104 cr_tree->SetMarkerColor(kRed);
105 cr_tree->SetMarkerStyle(6);
106 cr_tree->Draw("eYview:eXview",cut && "eNframesTop>0","same");
107}
TTree * cr_tree
Definition: craw.C:8
TCut cut("1")
new TCanvas()
void w(int rid=2, int nviews=2)
Definition: test.C:27

◆ check_e()

void check_e ( )
158{
159 TCanvas *c = new TCanvas("check_e","check entry",600,800);
160 c->Divide(1,3);
161
162 c->cd(1);
163 cr_tree->SetMarkerColor(1);
164 cr_tree->SetMarkerStyle(1);
165 cr_tree->Draw("eNclusters:Entry$+0.5");
166 cr_tree->SetMarkerStyle(6);
167 cr_tree->SetMarkerColor(kBlue);
168 cr_tree->Draw("eNclusters:Entry$+0.5",cut && "eNframesBot>0","same");
169 cr_tree->SetMarkerColor(kRed);
170 cr_tree->Draw("eNclusters:Entry$+0.5",cut && "eNframesTop>0","same");
171
172 c->cd(2);
173 cr_tree->SetMarkerStyle(1);
174 cr_tree->SetMarkerColor(1);
175 cr_tree->Draw("eNcl:eFrameID+100*Entry$+0.5>>hee(10000)", cut );
176 cr_tree->SetMarkerStyle(6);
177 cr_tree->SetMarkerColor(kBlue);
178 cr_tree->Draw("eNcl:eFrameID+100*Entry$+0.5",cut && "eNframesBot>0","same");
179 cr_tree->SetMarkerColor(kRed);
180 cr_tree->Draw("eNcl:eFrameID+100*Entry$+0.5",cut && "eNframesTop>0","same");
181
182 c->cd(3);
183 cr_tree->SetMarkerStyle(1);
184 cr_tree->SetMarkerColor(1);
185 cr_tree->Draw("eZframe:eFrameID+100*Entry$+0.5>>hzf(10000)", cut );
186 cr_tree->SetMarkerStyle(6);
187 cr_tree->SetMarkerColor(kBlue);
188 cr_tree->Draw("eZframe:eFrameID+100*Entry$+0.5",cut && "eNframesBot>0","same");
189 cr_tree->SetMarkerColor(kRed);
190 cr_tree->Draw("eZframe:eFrameID+100*Entry$+0.5",cut && "eNframesTop>0","same");
191}

◆ check_ss()

void check_ss ( )
111{
112 TCanvas *c = new TCanvas("check_s","check view",600,800);
113 c->Divide(2,3);
114
115 c->cd(1);
116 cr_tree->SetLineColor(1);
117 cr_tree->Draw("nclm");
118 cr_tree->SetLineColor(kRed);
119 cr_tree->Draw("nclm",cut && "eNframesTop>0","same");
120 cr_tree->SetLineColor(kBlue);
121 cr_tree->Draw("nclm",cut && "eNframesBot>0","same");
122
123 c->cd(2);
124 cr_tree->SetMarkerStyle(6);
125 cr_tree->Draw("eZframe:eYview:eXview:eNcl", cut);
126
127 c->cd(3);
128 cr_tree->SetLineColor(1);
129 cr_tree->Draw("eNcl",cut);
130 cr_tree->SetLineColor(kRed);
131 cr_tree->Draw("eNcl",cut && "eNframesTop>0","same");
132 cr_tree->SetLineColor(kBlue);
133 cr_tree->Draw("eNcl",cut && "eNframesBot>0","same");
134
135 c->cd(4);
136 cr_tree->SetMarkerStyle(1);
137 cr_tree->SetMarkerColor(1);
138 cr_tree->Draw("eNcl:eZframe", cut );
139 cr_tree->SetMarkerStyle(6);
140 cr_tree->SetMarkerColor(kBlue);
141 cr_tree->Draw("eNcl:eZframe",cut && "eNframesBot>0","same");
142 cr_tree->SetMarkerColor(kRed);
143 cr_tree->Draw("eNcl:eZframe",cut && "eNframesTop>0","same");
144
145 c->cd(5);
146 cr_tree->SetMarkerStyle(6);
147 cr_tree->SetMarkerColor(kBlue);
148 cr_tree->Draw("eNcl:eZframe-eZ2",cut && "eNframesBot>0");
149 c->cd(6);
150 cr_tree->SetMarkerColor(kRed);
151 cr_tree->Draw("eNcl:eZframe-eZ3",cut && "eNframesTop>0");
152
153
154}

◆ check_view()

void check_view ( )
49{
50 TCanvas *c = new TCanvas("cview","check view");
51 c->Divide(2,2);
52 c->cd(3); cr_tree->Draw("eY:eX>>hvb(42,-210,210,36,-180,180)",cut && "eNframesBot>0","colZ",300);
53 c->cd(1); cr_tree->Draw("eY:eX>>hvt(42,-210,210,36,-180,180)",cut && "eNframesTop>0","colZ",300);
54 c->cd(4); cr_tree->Draw("eY:eX>>hvb1(42,-210,210,36,-180,180)",cut && "eNframesBot>0","lego2",300);
55 c->cd(2); cr_tree->Draw("eY:eX>>hvt1(42,-210,210,36,-180,180)",cut && "eNframesTop>0","lego2",300);
56
57 //c->SaveAs("raw_view.gif");
58}

◆ check_z()

void check_z ( )
34{
35 TCanvas *c = new TCanvas("cz","check Z");
36 c->Clear();
37 c->Divide(2,2);
38
39 c->cd(1); cr_tree->Draw("eZ1:eXview:eYview",cut);
40 c->cd(2); cr_tree->Draw("eZ1:eAreaID*121+eViewID",cut);
41 c->cd(3); cr_tree->Draw("eNcl:eZframe-eZ2",cut);
42 c->cd(4); cr_tree->Draw("eZ2-eZ3",cut);
43
44 //c->SaveAs("raw_z.gif");
45}

◆ craw()

void craw ( const char *  inputcut = "1")
18{
19 cut=inputcut;
20 printf("Check of the very raw (clusters only) data\n\n");
21 cut.Print();
22 printf("Red line: Top side\n");
23 printf("Blue line: Bottom side\n");
24 init();
25 check_z();
26 check_a();
27 check_ss();
28 check_e();
29 //check_view();
30}
void init()
Definition: craw.C:20
void check_e()
Definition: craw.C:166
void check_ss()
Definition: craw.C:119
void check_a(float meanw=2200.)
Definition: craw.C:71
void check_z()
Definition: craw.C:43

◆ cut()

TCut cut ( "1"  )

◆ init()

void init ( )
11{
12 cr_tree = (TTree*)gDirectory->Get("Views");
13 gStyle->SetPalette(1);
14}

Variable Documentation

◆ cr_tree

TTree* cr_tree =0