168{
170 corrmap->SetRightMargin(0.14);
171 corrmap->SetLeftMargin(0.08);
172 corrmap->SetFillColor(3);
173 TH2F *h2f = map.
DrawH2( Form(
"mapDZ_%s" ,suffix), corrmap->GetTitle() );
174 h2f->GetXaxis()->SetLabelSize(0.025);
175 h2f->GetYaxis()->SetLabelSize(0.025);
176 h2f->GetZaxis()->SetLabelSize(0.025);
177
179 for( int i=0; i<n; i++ ) {
181 h2f->Fill(map.
Xj(i), map.
Yj(i), scorr.
V(2)-1);
182 }
183 h2f->Draw("colz");
184
185 float xbin = map.
Xbin();
186 float ybin = map.
Ybin();
187 float scalexy = 300.;
188 float scaletxty = 100000.;
189 for( int i=0; i<n; i++ ) {
192 float dx = scorr.
V(0);
193 float dy = scorr.
V(1);
194 float dtx = scorr.
V(3);
195 float dty = scorr.
V(4);
196
199
200 TArrow *arrowxy = new TArrow(x,y,x+scalexy*dx,y+scalexy*dy,0.005);
201 arrowxy->SetLineWidth(2);
202 arrowxy->SetLineColor(1);
203 arrowxy->Draw();
204
205 TArrow *arrowtxty = new TArrow(x,y,x+scaletxty*dtx,y+scaletxty*dty,0.005);
206 arrowtxty->SetLineWidth(2);
207 arrowtxty->SetLineColor(0);
208 arrowtxty->Draw();
209
210 TText *
t =
new TText(x-xbin/3,y-ybin/2.5,Form(
"%d",map.
GetLayer(i)->
Ncp()));
211 t->SetTextSize(0.02);
213 }
214 }
215
216
217 float x= map.
Xj(0)+xbin/6;
218 float y= map.
Yj(0)+ybin/6;
219 TArrow *arrowxy = new TArrow(x,y,x+scalexy*10,y,0.005);
220 arrowxy->SetLineWidth(3);
221 arrowxy->SetLineColor(1);
222 arrowxy->Draw();
223 TText *
text =
new TText(x,y+ybin/10,
"10 microns");
224 text->SetTextSize(0.02);
226
227
229 y= map.
Yj(0)+ybin/6 + ybin;
230 TArrow *arrowtxty = new TArrow(x,y,x+scaletxty*0.01,y,0.005);
231 arrowtxty->SetLineWidth(3);
232 arrowtxty->SetLineColor(0);
233 arrowtxty->Draw();
234 TText *textt = new TText(x,y+ybin/10,"10 mrad");
235 textt->SetTextSize(0.02);
236 textt->Draw();
237
238 return corrmap;
239}
TText * text
Definition: Canv_SYSTEMATICS_ALLCOMBINED__RMSEnergy__vs__Energy__ELECTRON.C:164
EdbSegCorr CorrLoc(int j)
Definition: EdbLayer.cxx:235
int Ncp()
Definition: EdbLayer.cxx:210
EdbLayer * GetLayer(float x, float y)
Definition: EdbLayer.h:24
EdbID eID1
Definition: EdbCorrectionMapper.h:47
EdbID eID2
Definition: EdbCorrectionMapper.h:47
float Xj(int j) const
Definition: EdbCell2.h:62
float Ybin() const
Definition: EdbCell2.h:78
float Yj(int j) const
Definition: EdbCell2.h:63
float Xbin() const
Definition: EdbCell2.h:77
TH2F * DrawH2(const char *name="plot2d", const char *title="EdbH2plot2D")
Definition: EdbCell2.cpp:187
char * AsString() const
Definition: EdbID.cxx:26
int Ncp() const
Definition: EdbLayer.h:74
Definition: EdbSegCorr.h:8
float V(int i)
Definition: EdbSegCorr.h:23
TTree * t
Definition: check_shower.C:4