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.)
72{
73 TCanvas *c = new TCanvas("check_a","check area",600,800);
74 c->Divide(1,2);
75
76 cr_tree->SetAlias("nclm","Sum$(eNcl)/Length$(eNcl)");
77
78 cr_tree->Draw("eYview:eXview>>h(200,0,1000,200,0,1000)",cut,"goff");
79
80 c->cd(1);
81 cr_tree->SetMarkerStyle(1);
82 cr_tree->Draw("eYview:eXview","nclm*(eNframesTop>0)");
83 int nraws = cr_tree->GetSelectedRows();
84 Double_t *x = cr_tree->GetV1();
85 Double_t *y = cr_tree->GetV2();
86 Double_t *w = cr_tree->GetW();
87 printf("%d raws: %d\n", nraws);
88 TMarker *m;
89 for(int i=0; i<nraws; i++) {
90 m= new TMarker( y[i],x[i], 24);
91 m->SetMarkerSize( w[i]/meanw );
92 m->SetMarkerColor(kRed);
93 m->Draw();
94 }
95 cr_tree->SetMarkerColor(kBlue);
96 cr_tree->SetMarkerStyle(6);
97 cr_tree->Draw("eYview:eXview",cut && "eNframesBot>0","same");
98
99 c->cd(2);
100 cr_tree->SetMarkerStyle(1);
101 cr_tree->Draw("eYview:eXview","nclm*(eNframesBot>0)");
102 nraws = cr_tree->GetSelectedRows();
103 x = cr_tree->GetV1();
104 y = cr_tree->GetV2();
105 w = cr_tree->GetW();
106 printf("%d raws: %d\n", nraws);
107 for(int i=0; i<nraws; i++) {
108 m= new TMarker( y[i],x[i], 24);
109 m->SetMarkerSize( w[i]/meanw );
110 m->SetMarkerColor(kBlue);
111 m->Draw();
112 }
113 cr_tree->SetMarkerColor(kRed);
114 cr_tree->SetMarkerStyle(6);
115 cr_tree->Draw("eYview:eXview",cut && "eNframesTop>0","same");
116}
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 ( )
167{
168 TCanvas *c = new TCanvas("check_e","check entry",600,800);
169 c->Divide(1,3);
170
171 c->cd(1);
172 cr_tree->SetMarkerColor(1);
173 cr_tree->SetMarkerStyle(1);
174 cr_tree->Draw("eNclusters:Entry$+0.5");
175 cr_tree->SetMarkerStyle(6);
176 cr_tree->SetMarkerColor(kBlue);
177 cr_tree->Draw("eNclusters:Entry$+0.5",cut && "eNframesBot>0","same");
178 cr_tree->SetMarkerColor(kRed);
179 cr_tree->Draw("eNclusters:Entry$+0.5",cut && "eNframesTop>0","same");
180
181 c->cd(2);
182 cr_tree->SetMarkerStyle(1);
183 cr_tree->SetMarkerColor(1);
184 cr_tree->Draw("eNcl:eFrameID+100*Entry$+0.5>>hee(10000)", cut );
185 cr_tree->SetMarkerStyle(6);
186 cr_tree->SetMarkerColor(kBlue);
187 cr_tree->Draw("eNcl:eFrameID+100*Entry$+0.5",cut && "eNframesBot>0","same");
188 cr_tree->SetMarkerColor(kRed);
189 cr_tree->Draw("eNcl:eFrameID+100*Entry$+0.5",cut && "eNframesTop>0","same");
190
191 c->cd(3);
192 cr_tree->SetMarkerStyle(1);
193 cr_tree->SetMarkerColor(1);
194 cr_tree->Draw("eZframe:eFrameID+100*Entry$+0.5>>hzf(10000)", cut );
195 cr_tree->SetMarkerStyle(6);
196 cr_tree->SetMarkerColor(kBlue);
197 cr_tree->Draw("eZframe:eFrameID+100*Entry$+0.5",cut && "eNframesBot>0","same");
198 cr_tree->SetMarkerColor(kRed);
199 cr_tree->Draw("eZframe:eFrameID+100*Entry$+0.5",cut && "eNframesTop>0","same");
200}

◆ check_ss()

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

◆ check_view()

void check_view ( )
59{
60 TCanvas *c = new TCanvas("cview","check view");
61 c->Divide(2,2);
62 c->cd(3); cr_tree->Draw("eY:eX>>hvb(42,-210,210,36,-180,180)",cut && "eNframesBot>0","colZ",300);
63 c->cd(1); cr_tree->Draw("eY:eX>>hvt(42,-210,210,36,-180,180)",cut && "eNframesTop>0","colZ",300);
64 c->cd(4); cr_tree->Draw("eY:eX>>hvb1(42,-210,210,36,-180,180)",cut && "eNframesBot>0","lego2",300);
65 c->cd(2); cr_tree->Draw("eY:eX>>hvt1(42,-210,210,36,-180,180)",cut && "eNframesTop>0","lego2",300);
66
67 //c->SaveAs("raw_view.gif");
68}

◆ check_z()

void check_z ( )
44{
45 TCanvas *c = new TCanvas("cz","check Z");
46 c->Clear();
47 c->Divide(2,2);
48
49 c->cd(1); cr_tree->Draw("eZ1:eXview:eYview",cut);
50 c->cd(2); cr_tree->Draw("eZ1:eAreaID*121+eViewID",cut);
51 c->cd(3); cr_tree->Draw("eNcl:eZframe-eZ2",cut);
52 c->cd(4); cr_tree->Draw("eZ2-eZ3",cut);
53
54 //c->SaveAs("raw_z.gif");
55}

◆ craw()

void craw ( const char *  inputcut = "1")
28{
29 cut=inputcut;
30 printf("Check of the very raw (clusters only) data\n\n");
31 cut.Print();
32 printf("Red line: Top side\n");
33 printf("Blue line: Bottom side\n");
34 init();
35 check_z();
36 check_a();
37 check_ss();
38 check_e();
39 //check_view();
40}
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 ( )
21{
22 cr_tree = (TTree*)gDirectory->Get("Views");
23 gStyle->SetPalette(1);
24}

Variable Documentation

◆ cr_tree

TTree* cr_tree =0