warning fixed
[u/mrichter/AliRoot.git] / PMD / AliPMDQualitycheck.C
CommitLineData
92534737 1//********************************************************************
2// Macro that checks PMD data Quality
3// using the ESD classes
4// Modified by P.V.K.S.BABA (J.U.)/Ajay(IOP) for doing Quality check.
5//********************************************************************
6
7#if !defined( __CINT__) || defined(__MAKECINT__)
8#include <Riostream.h>
9#include "TTree.h"
10#include "TFile.h"
11#include "TH1F.h"
12#include "TCanvas.h"
13#include "TStyle.h"
14#include "TStopwatch.h"
15
16#include "AliESD.h"
17#endif
18double Xcon[96] =
19 { 75.133, 54.204, 53.254, 32.326, 31.376,10.447,
20 75.133, 54.204, 53.254, 32.326, 31.376,10.447,
21 75.133, 54.204, 53.254, 32.326, 31.376,10.447,
22 75.133, 54.204, 53.254, 32.326, 31.376,10.447,
23 -75.133, -54.204, -53.254, -32.326, -31.376,-10.447,
24 -75.133, -54.204, -53.254, -32.326, -31.376,-10.447,
25 -75.133, -54.204, -53.254, -32.326, -31.376,-10.447,
26 -75.133, -54.204, -53.254, -32.326, -31.376,-10.447,
27 9.167, -32.543, -33.493, -75.133,
28 9.167, -32.543, -33.493, -75.133,
29 9.167, -32.543, -33.493, -75.133,
30 9.167, -32.543, -33.493, -75.133,
31 9.167, -32.543, -33.493, -75.133,
32 9.167, -32.543, -33.493, -75.133,
33 -9.167, 32.543, 33.493, 75.133,
34 -9.167, 32.543, 33.493, 75.133,
35 -9.167, 32.543, 33.493, 75.133,
36 -9.167, 32.543, 33.493, 75.133,
37 -9.167, 32.543, 33.493, 75.133,
38 -9.167, 32.543, 33.493, 75.133,};
39
40double Ycon[96] =
41 {86.475, 86.475, 86.475, 86.475, 86.475, 86.475,
42 38.225, 38.225, 38.225, 38.225, 38.225, 38.225,
43 37.325, 37.325, 37.325, 37.325, 37.325, 37.325,
44 -10.925, -10.925, -10.925, -10.925, -10.925, -10.925,
45 -86.475, -86.475, -86.475, -86.475, -86.475, -86.475,
46 -38.225, -38.225, -38.225, -38.225, -38.225, -38.225,
47 -37.325, -37.325, -37.325, -37.325, -37.325, -37.325
48 10.925, 10.925, 10.925, 10.925, 10.925, 10.925,
49
50 86.475, 86.475, 86.475, 86.475,
51 62.225, 62.225, 62.225, 62.225,
52 61.325, 61.325, 61.325, 61.325,
53 37.075, 37.075, 37.075, 37.075
54 36.175, 36.175, 36.175, 36.175,
55 11.925, 11.925, 11.925 , 11.925,
56 -86.475, -86.475, -86.475, -86.475,
57 -62.225, -62.225, -62.225, -62.225,
58 -61.325, -61.325, -61.325, -61.325,
59 -37.075, -37.075, -37.075, -37.075
60 -36.175, -36.175, -36.175, -36.175,
61 -11.925, -11.925, -11.925 , -11.925 };
62
63
64extern TStyle *gStyle;
65
66// Default is that it will take 1000 Events sample. Want to process less give (Number) .
67Int_t AliPMDQualitycheck(Int_t nevt=1000) {
68AliCDBManager::Instance()->SetRun(0);
69 TStopwatch timer;
70 char PRINTSMN ;
71
72// printf("Whether You want plotof All SMN , Give y or n ? \n " ) ;
73// scanf("%1s" , &PRINTSMN );
74
75 TH2F *hP1 = new TH2F("hP1","XY of Clusters",100,-100.,100.,100,-100.,100.);
76 TH1F *hC2 = new TH1F("hC2","CPV PHI",200,-1,9);
77 TH1F *hP2 = new TH1F("hP2","PRE PHI",200,-1,9);
78 TH1F *hC3 = new TH1F("hC3","CPV Clus",30,0.,500.);
79 TH1F *hP3 = new TH1F("hP3","PRE N-gammalike",20,0.,500.);
80 TH1F *hP4 = new TH1F("hP4","PRE EDEP",30,0.,1000.);
81 TH1F *hC5 = new TH1F("hC5","CPV n-cell",20,0.,100.);
82 TH1F *hP5 = new TH1F("hP5","PMD n-cell",20,0.,100.);
83 TH2F *hCP0 = new TH2F("hCP0","PRE CLUS Quad.1 vs 2",150,0.,300.,150,0.,300.);
84 TH2F *hCP1 = new TH2F("hCP1","PRE CLUS Quad.3 vs 4",150,0.,300.,150,0.,300.);
85 TH2F *hCP2 = new TH2F("hCP2","PRE EDEP Quad.3 vs 4",50,0.,300.,50,0.,300.);
86 TH2F *hCP3 = new TH2F("hCP3","PRE EDEP vs Tot Clus ",10,0.,1000.,10,0.,300.);
87 TH2F *hCP4 = new TH2F("hCP4","PRE Clus vs CPV Clus ",150,0.,200.,150,0.,200.);
88
89 TH2F *hSM1 = new TH2F("hSM1","PRE Cluster XY",200,-100,100,200,-100,100);
90 TH2F *hSM2 = new TH2F("hSM2","",999,-100.0,100.0,999,-100.0,100.0);
91 TH2F *hSM3 = new TH2F("hSM3","",999,-100.0,100.0,999,-100.0,100.0);
92 TH2F *hSM4 = new TH2F("hSM4","",999,-100.0,100.0,999,-100.0,100.0);
93 TH2F *hSM5 = new TH2F("hSM5","",999,-100.0,100.0,999,-100.0,100.0);
94 TH2F *hSM6 = new TH2F("hSM6","",999,-100.0,100.0,999,-100.0,100.0);
95 TH2F *hSM7 = new TH2F("hSM7","",999,-100.0,100.0,999,-100.0,100.0);
96 TH2F *hSM8 = new TH2F("hSM8","",999,-100.0,100.0,999,-100.0,100.0);
97 TH2F *hSM9 = new TH2F("hSM9","",999,-100.0,100.0,999,-100.0,100.0);
98 TH2F *hSM10 = new TH2F("hSM10","",999,-100.0,100.0,999,-100.0,100.0);
99 TH2F *hSM11 = new TH2F("hSM11","",999,-100.0,100.0,999,-100.0,100.0);
100 TH2F *hSM12 = new TH2F("hSM12","",999,-100.0,100.0,999,-100.0,100.0);
101 TH2F *hSM13 = new TH2F("hSM13","",999,-100.0,100.0,999,-100.0,100.0);
102 TH2F *hSM14 = new TH2F("hSM14","",999,-100.0,100.0,999,-100.0,100.0);
103 TH2F *hSM15 = new TH2F("hSM15","",999,-100.0,100.0,999,-100.0,100.0);
104 TH2F *hSM16 = new TH2F("hSM16","",999,-100.0,100.0,999,-100.0,100.0);
105 TH2F *hSM17 = new TH2F("hSM17","",999,-100.0,100.0,999,-100.0,100.0);
106 TH2F *hSM18 = new TH2F("hSM18","",999,-100.0,100.0,999,-100.0,100.0);
107 TH2F *hSM19 = new TH2F("hSM19","",999,-100.0,100.0,999,-100.0,100.0);
108 TH2F *hSM20 = new TH2F("hSM20","",999,-100.0,100.0,999,-100.0,100.0);
109 TH2F *hSM21 = new TH2F("hSM21","",999,-100.0,100.0,999,-100.0,100.0);
110 TH2F *hSM22 = new TH2F("hSM22","",999,-100.0,100.0,999,-100.0,100.0);
111 TH2F *hSM23 = new TH2F("hSM23","",999,-100.0,100.0,999,-100.0,100.0);
112 TH2F *hSM24 = new TH2F("hSM24","",999,-100.0,100.0,999,-100.0,100.0);
113 TH1F *hSM = new TH1F("hSM","Plot of all 24 Super Modules",24,0,24);
114
115// Star processing.
116
117 AliPMDUtility *cc = new AliPMDUtility();
118
119 TFile *ef=TFile::Open("AliESDtree.root");
120 if (!ef || !ef->IsOpen()) {cerr<<"Cant open AliESDtree.root !\n"; return 1;}
121 AliESD* event = new AliESD;
122 TTree* tree = (TTree*) ef->Get("esdTree");
123 if (!tree) {cerr<<"no ESD tree found\n"; return 1;};
124 tree->SetBranchAddress("ESD", &event);
125 Int_t SMN;
126 Int_t n=0;
127 Float_t TotCPVClus ;
128 Float_t TotPREClus ;
129 Float_t TotPREEdep ;
130 Float_t TotCPVCell ;
131 Float_t TotPRECell ;
132 Float_t PREcluQUAD[4] ;
133 Float_t CPVcluQUAD[4] ;
134 Float_t PREadcQUAD[4] ;
135 Float_t CPVADCQUAD[4] ;
136 Float_t PREcelQUAD[4] ;
137 Float_t CPVcelQUAD[4] ;
138
139
140 //******* The loop over events
141 while (tree->GetEvent(n)) {
142 cout<<endl<<"Processing event number : "<<n++<<endl;
143
144
145 Int_t CPVhits = 0 ;
146 Int_t PMDclus = 0 ;
147 Int_t npmdcl=event->GetNumberOfPmdTracks();
148 //cout<<"Number of PMD tracks : "<<npmdcl<<endl;
149
150 //****** The loop over PMD clusters
151
152 for (Int_t kk=0; kk<4;kk++) {
153 CPVcluQUAD[kk] = 0.0 ;
154 PREcluQUAD[kk] = 0.0 ;
155 CPVcelQUAD[kk] = 0.0 ;
156 PREcelQUAD[kk] = 0.0 ;
157 PREadcQUAD[kk] = 0.0 ;
158 }
159 while (npmdcl--) {
160 AliESDPmdTrack *pmdtr = event->GetPmdTrack(npmdcl);
161
162 Int_t det = pmdtr->GetDetector();
163 Float_t clsX = pmdtr->GetClusterX();
164 Float_t clsY = pmdtr->GetClusterY();
165 Float_t clsZ = pmdtr->GetClusterZ();
166 Float_t ncell = pmdtr->GetClusterCells();
167 Float_t adc = pmdtr->GetClusterADC();
168 Float_t pid = pmdtr->GetClusterPID();
169
170// cout << " " << det << " " << ncell << " " << adc << " " << pid << endl ;
171 cc->SetXYZ(clsX,clsY,clsZ);
172 //cc->SetPxPyPz(clsX,clsY,clsZ);
173 cc->CalculateEta();
174 cc->CalculatePhi();
175 Float_t eta = cc->GetEta();
176 Float_t phi = cc->GetPhi();
177
178// Calculating S.Module Number from Cluster .
179 CalculateSMN(clsX, clsY,SMN);
180 if( det == 1)
181 {
182 if(SMN >= 0 && SMN <= 5) {
183 ++CPVcluQUAD[0] ;
184 CPVADCQUAD[0] =+ adc ;
185 CPVcelQUAD[0] =+ ncell ;
186 }
187 if(SMN >= 6 && SMN <=11) {
188 ++CPVcluQUAD[1] ;
189 CPVADCQUAD[1] =+ adc ;
190 CPVcelQUAD[1] =+ ncell ;
191 }
192 if(SMN >=12 && SMN <=17) {
193 ++CPVcluQUAD[2] ;
194 CPVADCQUAD[2] =+ adc ;
195 CPVcelQUAD[2] =+ ncell ;
196 }
197 if(SMN >=18 && SMN <=23) {
198 ++CPVcluQUAD[3] ;
199 CPVADCQUAD[3] =+ adc ;
200 CPVcelQUAD[3] =+ ncell ;
201 }
202
203 if(eta >= 2.3 && eta <= 3.5)
204 {
205 hC2->Fill(phi);
206 }
207 }
208 if( det == 0)
209 {
210 if(SMN >= 0 && SMN <= 5) {
211 ++PREcluQUAD[0] ;
212 PREadcQUAD[0] =+ adc ;
213 PREcelQUAD[0] =+ ncell ;
214 }
215 if(SMN >= 6 && SMN <=11) {
216 ++PREcluQUAD[1] ;
217 PREadcQUAD[1] =+ adc ;
218 PREcelQUAD[1] =+ ncell ;
219 }
220 if(SMN >=12 && SMN <=17) {
221 ++PREcluQUAD[2] ;
222 PREadcQUAD[2] =+ adc ;
223 PREcelQUAD[2] =+ ncell ;
224 }
225 if(SMN >=18 && SMN <=23) {
226 ++PREcluQUAD[3] ;
227 PREadcQUAD[3] =+ adc ;
228 PREcelQUAD[3] =+ ncell ;
229 }
230 if ( n <= 100 ) {
231 hSM->Fill(SMN);
232 if(SMN == 0)hSM1->Fill(-clsX,clsY);
233 if(SMN == 0)hSM1->Fill(-clsX,clsY);
234 if(SMN == 1)hSM2->Fill(-clsX,clsY);
235 if(SMN == 2)hSM3->Fill(-clsX,clsY);
236 if(SMN == 3)hSM4->Fill(-clsX,clsY);
237 if(SMN == 4)hSM5->Fill(-clsX,clsY);
238 if(SMN == 5)hSM6->Fill(-clsX,clsY);
239 if(SMN == 6)hSM7->Fill(-clsX,clsY);
240 if(SMN == 7)hSM8->Fill(-clsX,clsY);
241 if(SMN == 8)hSM9->Fill(-clsX,clsY);
242 if(SMN == 9)hSM10->Fill(-clsX,clsY);
243 if(SMN ==10)hSM11->Fill(-clsX,clsY);
244 if(SMN ==11)hSM12->Fill(-clsX,clsY);
245 if(SMN ==12)hSM13->Fill(-clsX,clsY);
246 if(SMN ==13)hSM14->Fill(-clsX,clsY);
247 if(SMN ==14)hSM15->Fill(-clsX,clsY);
248 if(SMN ==15)hSM16->Fill(-clsX,clsY);
249 if(SMN ==16)hSM17->Fill(-clsX,clsY);
250 if(SMN ==17)hSM18->Fill(-clsX,clsY);
251 if(SMN ==18)hSM19->Fill(-clsX,clsY);
252 if(SMN ==19)hSM20->Fill(-clsX,clsY);
253 if(SMN ==20)hSM21->Fill(-clsX,clsY);
254 if(SMN ==21)hSM22->Fill(-clsX,clsY);
255 if(SMN ==22)hSM23->Fill(-clsX,clsY);
256 if(SMN ==23)hSM24->Fill(-clsX,clsY);
257 }
258 if(eta >= 2.3 && eta <= 3.5)
259 {
260 hP2->Fill(phi);
261 }
262 hP1->Fill(clsX,clsY);
263 }
264 }
265 for (Int_t k=0; k<4;k++) {
266 TotCPVClus =+ CPVcluQUAD [k] ;
267 TotPREClus =+ PREcluQUAD [k] ;
268 TotCPVCell =+ CPVcelQUAD [k] ;
269 TotPRECell =+ PREcelQUAD [k] ;
270 TotPREEdep =+ PREadcQUAD [k] ;
271 }
272 Float_t TotCPVPREClus = TotPREClus + TotCPVClus ;
273 Float_t TotCPVPRECell = TotPRECell + TotCPVCell ;
274 if(eta >= 2.3 && eta <= 3.5)
275 {
276 hC3->Fill(TotCPVClus);
277 hP3->Fill(TotPREClus);
278 hP4->Fill(TotPREEdep);
279 hP5->Fill(TotPRECell);
280 hCP0->Fill(PREcluQUAD[0],PREcluQUAD[1]);
281 hCP1->Fill(PREcluQUAD[2],PREcluQUAD[3]);
282 hCP2->Fill(PREadcQUAD[2],PREadcQUAD[3]);
283 hCP3->Fill(TotPREEdep,TotCPVPREClus);
284 hCP4->Fill(TotPREClus,TotCPVClus);
285 }
286 TotCPVClus == 0.0;
287 TotPREClus == 0.0;
288 TotCPVCell == 0.0;
289 TotPRECell == 0.0;
290 TotPREEdep == 0.0;
291 if(n >= nevt)break;
292 }
293
294 gStyle->SetOptStat(110000);
295 gStyle->SetOptFit(1);
296
297// if ( PRINTSMN == 'y' ) {
298 TCanvas *cP1 = new TCanvas("cP1","Cluster XY", 10,10, 600, 600);
299 cP1->Range(-100, -100,100 ,100 );
300 hSM1->SetMarkerColor(2);
301 hSM1->Draw();
302 hSM1->GetXaxis()->SetTitle("Cluster X");
303 hSM1->GetYaxis()->SetTitle("Cluster Y");
304 hSM2->SetMarkerColor(2);
305 hSM2->Draw("same");
306 hSM3->SetMarkerColor(2);
307 hSM3->Draw("same");
308 hSM4->SetMarkerColor(2);
309 hSM4->Draw("same");
310 hSM5->SetMarkerColor(2);
311 hSM5->Draw("same");
312 hSM6->SetMarkerColor(2);
313 hSM6->Draw("same");
314 hSM7->SetMarkerColor(4);
315 hSM7->Draw("same");
316 hSM8->SetMarkerColor(4);
317 hSM8->Draw("same");
318 hSM9->SetMarkerColor(4);
319 hSM9->Draw("same");
320 hSM10->SetMarkerColor(4);
321 hSM10->Draw("same");
322 hSM11->SetMarkerColor(4);
323 hSM11->Draw("same");
324 hSM12->SetMarkerColor(4);
325 hSM12->Draw("same");
326 hSM13->SetMarkerColor(6);
327 hSM13->Draw("same");
328 hSM14->SetMarkerColor(6);
329 hSM14->Draw("same");
330 hSM15->SetMarkerColor(6);
331 hSM15->Draw("same");
332 hSM16->SetMarkerColor(6);
333 hSM16->Draw("same");
334 hSM17->SetMarkerColor(6);
335 hSM17->Draw("same");
336 hSM18->SetMarkerColor(6);
337 hSM18->Draw("same");
338 hSM19->SetMarkerColor(8);
339 hSM19->Draw("same");
340 hSM20->SetMarkerColor(8);
341 hSM20->Draw("same");
342 hSM21->SetMarkerColor(8);
343 hSM21->Draw("same");
344 hSM22->SetMarkerColor(8);
345 hSM22->Draw("same");
346 hSM23->SetMarkerColor(8);
347 hSM23->Draw("same");
348 hSM24->SetMarkerColor(8);
349 hSM24->Draw("same");
350
351 Int_t linsav = gStyle->GetLineWidth();
352 DrawPMDBoundary();
353 DrawPMDBoundarySM1();
354 DrawPMDBoundarySM2();
355 DrawPMDBoundarySM3();
356 DrawPMDBoundarySM4();
357 cP1->Print("ClusterXY.gif");
358
359
360 TCanvas *cP2 = new TCanvas("PHI CPV / PMD","",10,10, 600,600);
361 cP2->Divide(1,2);
362 cP2->cd(1);
363 cP2->SetFillColor(0);
364 hC2->SetLineColor(4);
365 hC2->Draw();
366 cP2->cd(2);
367 hP2->SetLineColor(2);
368 hP2->Draw();
369 cP2->Print("CPVPREphi.gif");
370
371// }
372
373 TCanvas *cP2 = new TCanvas("cP2","",10,10,600,600);
374 cP2->cd();
375 hSM->SetFillColor(2);
376 hSM->Draw();
377 cP2->Print("AllSMN.gif");
378
379
380
381 TCanvas *cP3 = new TCanvas("CPV Clus PRE Clus Correlations", " ",10,10, 600,600);
382 cP3->Divide(2,2);
383 cP3->cd(1);
384 hCP0->SetMarkerColor(9);
385 hCP0->Draw();
386 cP3->cd(2);
387 hCP1->SetMarkerColor(6);
388 hCP1->Draw();
389 cP3->cd(3);
390 hP3->SetLineColor(2);
391 hP3->Draw();
392 cP3->cd(4);
393 hCP4->SetMarkerColor(3);
394 hCP4->Draw();
395 cP3->Print("CPVPREClus.gif");
396
397 TCanvas *cP6 = new TCanvas("CPV Clus PRE Adc"," ",10,10, 600,600);
398 cP6->Divide(1,2);
399 cP6->cd(1);
400 hC3->SetLineColor(4);
401 hC3->Draw();
402 cP6->cd(2);
403 hP4->SetLineColor(2);
404 hP4->Draw();
405 cP6->Print("CPVPREAdc.gif");
406
407 timer.Stop();
408 timer.Print();
409 return 0;
410 }
411
412void CalculateSMN( Float_t clsX, Float_t clsY, Int_t & smn)
413{
414 //smn = 0;
415
416 //---------------------------------------------------------------------
417 if((clsX <= Xcon[0]) && (clsX >= Xcon[1]) &&
418 (clsY <= Ycon[0]) && (clsY >= Ycon[6])) smn = 0 ;
419
420 else if((clsX <=Xcon[2]) && (clsX >= Xcon[3]) &&
421 (clsY <= Ycon[1]) && (clsY >= Ycon[7]))smn = 1 ;
422
423 else if((clsX <=Xcon[4]) && (clsX >= Xcon[5]) &&
424 (clsY <= Ycon[3]) && (clsY >= Ycon[8]))smn = 2 ;
425
426 else if((clsX <= Xcon[0]) && (clsX >= Xcon[1]) &&
427 (clsY <= Ycon[12]) && (clsY >= Ycon[18])) smn = 3 ;
428
429 else if((clsX <=Xcon[2]) && (clsX >= Xcon[3]) &&
430 (clsY <= Ycon[12]) && (clsY >= Ycon[18]))smn = 4 ;
431
432 else if((clsX <=Xcon[4]) && (clsX >= Xcon[5]) &&
433 (clsY <= Ycon[12]) && (clsY >= Ycon[18]))smn = 5 ;
434 //------------------------------------------------------------------
435 else if((clsX >= Xcon[24]) && (clsX <= Xcon[25]) &&
436 (clsY >= Ycon[24]) && (clsY <= Ycon[30])) smn = 6 ;
437
438 else if((clsX >=Xcon[26]) && (clsX <= Xcon[27]) &&
439 (clsY >= Ycon[25]) && (clsY <= Ycon[31]))smn = 7 ;
440
441 else if((clsX >=Xcon[28]) && (clsX <= Xcon[29]) &&
442 (clsY >= Ycon[26]) && (clsY <= Ycon[32]))smn = 8 ;
443
444 else if((clsX >= Xcon[24]) && (clsX <= Xcon[25]) &&
445 (clsY >= Ycon[36]) && (clsY <= Ycon[42])) smn = 9 ;
446
447 else if((clsX >=Xcon[26]) && (clsX <= Xcon[27]) &&
448 (clsY >= Ycon[36]) && (clsY <= Ycon[42]))smn = 10;
449
450 else if((clsX >=Xcon[28]) && (clsX <= Xcon[29]) &&
451 (clsY >= Ycon[36]) && (clsY <= Ycon[42]))smn = 11;
452 //------------------------------------------------------------------
453 else if((clsX <= Xcon[48]) && (clsX >= Xcon[49]) &&
454 (clsY <= Ycon[48]) && (clsY >= Ycon[52])) smn = 12 ;
455
456 else if((clsX <=Xcon[50]) && (clsX >= Xcon[51]) &&
457 (clsY <= Ycon[48]) && (clsY >= Ycon[52]))smn = 13 ;
458
459 else if((clsX <=Xcon[48]) && (clsX >= Xcon[49]) &&
460 (clsY <= Ycon[56]) && (clsY >= Ycon[60]))smn = 14 ;
461
462 else if((clsX <=Xcon[50]) && (clsX >= Xcon[51]) &&
463 (clsY <= Ycon[56]) && (clsY >= Ycon[60]))smn = 15 ;
464
465 else if((clsX <=Xcon[48]) && (clsX >= Xcon[49]) &&
466 (clsY <= Ycon[64]) && (clsY >= Ycon[68]))smn = 16 ;
467
468 else if((clsX <=Xcon[50]) && (clsX >= Xcon[51]) &&
469 (clsY <= Ycon[64]) && (clsY >= Ycon[68]))smn = 17 ;
470 //--------------------------------------------------------------
471 else if((clsX >= Xcon[72]) && (clsX <= Xcon[73]) &&
472 (clsY >= Ycon[72]) && (clsY <= Ycon[76])) smn = 18 ;
473
474 else if((clsX >=Xcon[74]) && (clsX <= Xcon[75]) &&
475 (clsY >= Ycon[72]) && (clsY <= Ycon[76]))smn = 19 ;
476
477 else if((clsX >=Xcon[72]) && (clsX <= Xcon[73]) &&
478 (clsY >= Ycon[80]) && (clsY <= Ycon[84]))smn = 20 ;
479
480 else if((clsX >=Xcon[74]) && (clsX <= Xcon[75]) &&
481 (clsY >= Ycon[80]) && (clsY <= Ycon[84]))smn = 21;
482
483 else if((clsX >= Xcon[72]) && (clsX <= Xcon[73]) &&
484 (clsY >= Ycon[88]) && (clsY <= Ycon[92])) smn = 22 ;
485
486 else if((clsX >=Xcon[74]) && (clsX <= Xcon[75]) &&
487 (clsY >= Ycon[88]) && (clsY <= Ycon[92]))smn = 23 ;
488 else smn = 111;
489
490 }
491
492void DrawPMDBoundary()
493{
494 TH2F *h = new TH2F("h","",200,-100,100,200,-100,100);
495 gStyle->SetLineWidth(2);
496 gStyle->SetLineColor(2);
497 TLine * l;
498 l = new TLine(75.1333, 86.475, -75.1333, 86.475); l->Draw("same");
499 l = new TLine(-75.1333, 86.470,-75.1333, -86.475); l->Draw("same");
500 l = new TLine(-75.1333, -86.475,75.1333, -86.475); l->Draw("same");
501 l = new TLine(75.1333, -86.475,75.1333, 86.475); l->Draw("same");
502}
503void DrawPMDBoundarySM1()
504{
505 TH2F *hsm1 = new TH2F("hsm1","",200,-100,100,200,-100,100);
506 gStyle->SetLineWidth(1);
507 gStyle->SetLineColor(4);
508 TLine * l;
509 l = new TLine(-75.1333, 86.475, -10.447, 86.475); l->Draw("same");
510 l = new TLine(-10.447, 86.475, -10.446, -10.925); l->Draw("same");
511 l = new TLine(-10.446, -10.925, -75.1333,-10.925); l->Draw("same");
512 l = new TLine(-75.1333,-10.925, -75.1333, 86.475); l->Draw("same");
513}
514void DrawPMDBoundarySM2()
515{
516 TH2F *hsm2 = new TH2F("hsm2","",200,-100,100,200,-100,100);
517 gStyle->SetLineWidth(1);
518 gStyle->SetLineColor(4);
519 TLine * l;
520 l = new TLine(75.1333, -86.475, 10.446, -86.475); l->Draw("same");
521 l = new TLine(10.446, -86.475, 10.446, 10.925); l->Draw("same");
522 l = new TLine(10.446, 10.925, 75.1333, 10.925); l->Draw("same");
523 l = new TLine(75.1333, 10.925, 75.1333, -86.475); l->Draw("same");
524}
525
526void DrawPMDBoundarySM3()
527{
528 TH2F *hsm3 = new TH2F("hsm3","",200,-100,100,200,-100,100);
529 gStyle->SetLineWidth(1);
530 gStyle->SetLineColor(1);
531 TLine * l;
532 l = new TLine( -9.167, 86.475, 75.1333, 86.475); l->Draw("same");
533 l = new TLine(75.1333,86.475, 75.1333, 11.925); l->Draw("same");
534 l = new TLine(75.1333,11.925, -9.167, 11.925); l->Draw("same");
535 l = new TLine( -9.167, 11.925, -9.167, 86.475); l->Draw("same");
536}
537void DrawPMDBoundarySM4()
538{
539 TH2F *hsm4 = new TH2F("hsm4","",200,-100,100,200,-100,100);
540 gStyle->SetLineWidth(1);
541 gStyle->SetLineColor(1);
542 TLine * l;
543 l = new TLine(9.167, -86.475, -75.1333,-86.475); l->Draw("same");
544 l = new TLine(-75.1333,-86.475, -75.1333,-11.925); l->Draw("same");
545 l = new TLine(-75.1333,-11.925, 9.167, -11.925); l->Draw("same");
546 l = new TLine(9.167, -11.925, 9.167, -86.475); l->Draw("same");
547}
548