1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
17 #include <Riostream.h>
20 #include <TGeometry.h>
21 #include <TLorentzVector.h>
23 #include <TParticle.h>
25 #include <TVirtualMC.h>
26 #include <TPDGCode.h> //for kNuetron
36 #include "AliRICHGeometry.h"
37 #include "AliRICHResponseV0.h"
38 #include "AliRICHSegmentationV1.h"
39 #include "AliRICHv3.h"
41 #include "AliRICHRawCluster.h"
42 #include "AliRICHDigit.h"
43 #include "AliRICHRecHit1D.h"
48 //______________________________________________________________
49 // Implementation of the RICH version 3 with azimuthal rotation
52 AliRICHv3::AliRICHv3(const char *sName, const char *sTitle)
53 :AliRICH(sName,sTitle)
55 // The named ctor currently creates a single copy of
56 // AliRICHGeometry AliRICHSegmentationV1 AliRICHResponseV0
57 // and initialises the corresponding models of all 7 chambers with these stuctures.
58 // Note: all chambers share the single copy of models. MUST be changed later (???).
59 if(GetDebug())Info("named ctor","Start.");
61 fCkovNumber=fFreonProd=0;
63 AliRICHGeometry *pRICHGeometry =new AliRICHGeometry; // ??? to be moved to AlRICHChamber::named ctor
64 AliRICHSegmentationV1 *pRICHSegmentation=new AliRICHSegmentationV1; // ??? to be moved to AlRICHChamber::named ctor
65 AliRICHResponseV0 *pRICHResponse =new AliRICHResponseV0; // ??? to be moved to AlRICHChamber::named ctor
67 for (Int_t i=1; i<=kNCH; i++){
68 SetGeometryModel(i,pRICHGeometry);
69 SetSegmentationModel(i,pRICHSegmentation);
70 SetResponseModel(i,pRICHResponse);
71 C(i)->Init(i); // ??? to be removed
73 if(GetDebug())Info("named ctor","Stop.");
74 }//AliRICHv3::ctor(const char *pcName, const char *pcTitle)
76 AliRICHv3::~AliRICHv3()
78 // Dtor deletes RICH models. In future (???) AliRICHChamber will be responsible for that.
79 if(GetDebug()) cout<<ClassName()<<"::dtor()>\n";
82 AliRICHChamber *ch =C(1);
84 delete ch->GetGeometryModel();
85 delete ch->GetResponseModel();
86 delete ch->GetSegmentationModel();
92 void AliRICHv3::CreateGeometry()
94 // Provides geometry structure for simulation (currently GEANT volumes tree)
95 if(GetDebug()) cout<<ClassName()<<"::CreateGeometry()>\n";
97 AliRICH *pRICH = (AliRICH *) gAlice->GetDetector("RICH");
98 AliRICHSegmentationV0* segmentation;
99 AliRICHGeometry* geometry;
100 AliRICHChamber* iChamber;
102 iChamber = &(pRICH->Chamber(0));
103 segmentation=(AliRICHSegmentationV0*) iChamber->GetSegmentationModel();
104 geometry=iChamber->GetGeometryModel();
107 distance = geometry->GetFreonThickness()/2 + geometry->GetQuartzThickness() + geometry->GetGapThickness();
108 geometry->SetRadiatorToPads(distance);
110 //Opaque quartz thickness
111 Float_t oqua_thickness = .5;
115 Float_t csi_width = segmentation->Npx()*segmentation->Dpx() + segmentation->DeadZone();
116 Float_t csi_length = segmentation->Npy()*segmentation->Dpy() + 2*segmentation->DeadZone();
119 Int_t *idtmed = fIdtmed->GetArray()-999;
126 // --- Define the RICH detector
127 // External aluminium box
129 par[1] = 13; //Original Settings
131 gMC->Gsvolu("RICH", "BOX ", idtmed[1009], par, 3);
135 par[1] = 13; //Original Settings
137 gMC->Gsvolu("SRIC", "BOX ", idtmed[1000], par, 3);
139 // Air 2 (cutting the lower part of the box)
142 par[1] = 3; //Original Settings
144 gMC->Gsvolu("AIR2", "BOX ", idtmed[1000], par, 3);
146 // Air 3 (cutting the lower part of the box)
149 par[1] = 3; //Original Settings
151 gMC->Gsvolu("AIR3", "BOX ", idtmed[1000], par, 3);
155 par[1] = .188; //Original Settings
157 gMC->Gsvolu("HONE", "BOX ", idtmed[1001], par, 3);
161 par[1] = .025; //Original Settings
166 gMC->Gsvolu("ALUM", "BOX ", idtmed[1009], par, 3);
169 par[0] = geometry->GetQuartzWidth()/2;
170 par[1] = geometry->GetQuartzThickness()/2;
171 par[2] = geometry->GetQuartzLength()/2;
172 gMC->Gsvolu("QUAR", "BOX ", idtmed[1002], par, 3);
174 // Spacers (cylinders)
177 par[2] = geometry->GetFreonThickness()/2;
178 gMC->Gsvolu("SPAC", "TUBE", idtmed[1002], par, 3);
180 // Feet (freon slabs supports)
185 gMC->Gsvolu("FOOT", "BOX", idtmed[1009], par, 3);
188 par[0] = geometry->GetQuartzWidth()/2;
190 par[2] = geometry->GetQuartzLength()/2;
191 gMC->Gsvolu("OQUA", "BOX ", idtmed[1007], par, 3);
193 // Frame of opaque quartz
194 par[0] = geometry->GetOuterFreonWidth()/2;
195 par[1] = geometry->GetFreonThickness()/2;
196 par[2] = geometry->GetOuterFreonLength()/2;
197 gMC->Gsvolu("OQF1", "BOX ", idtmed[1007], par, 3);
199 par[0] = geometry->GetInnerFreonWidth()/2;
200 par[1] = geometry->GetFreonThickness()/2;
201 par[2] = geometry->GetInnerFreonLength()/2;
202 gMC->Gsvolu("OQF2", "BOX ", idtmed[1007], par, 3);
206 par[0] = geometry->GetOuterFreonWidth()/2 - oqua_thickness;
207 par[1] = geometry->GetFreonThickness()/2;
208 par[2] = geometry->GetOuterFreonLength()/2 - 2*oqua_thickness;
209 gMC->Gsvolu("FRE1", "BOX ", idtmed[1003], par, 3);
211 par[0] = geometry->GetInnerFreonWidth()/2 - oqua_thickness;
212 par[1] = geometry->GetFreonThickness()/2;
213 par[2] = geometry->GetInnerFreonLength()/2 - 2*oqua_thickness;
214 gMC->Gsvolu("FRE2", "BOX ", idtmed[1003], par, 3);
217 par[0] = csi_width/2;
218 par[1] = geometry->GetGapThickness()/2;
219 par[2] = csi_length/2;
220 gMC->Gsvolu("META", "BOX ", idtmed[1004], par, 3);
223 par[0] = csi_width/2;
224 par[1] = geometry->GetProximityGapThickness()/2;
225 par[2] = csi_length/2;
226 gMC->Gsvolu("GAP ", "BOX ", idtmed[1008], par, 3);
229 par[0] = csi_width/2;
231 par[2] = csi_length/2;
232 gMC->Gsvolu("CSI ", "BOX ", idtmed[1005], par, 3);
238 gMC->Gsvolu("GRID", "TUBE", idtmed[1006], par, 3);
243 par[0] = csi_width/2;
246 gMC->Gsvolu("WSMe", "BOX ", idtmed[1009], par, 3);
248 // Ceramic pick up (base)
250 par[0] = csi_width/2;
253 gMC->Gsvolu("WSG1", "BOX ", idtmed[1010], par, 3);
255 // Ceramic pick up (head)
257 par[0] = csi_width/2;
260 gMC->Gsvolu("WSG2", "BOX ", idtmed[1010], par, 3);
262 // Aluminium supports for methane and CsI
265 par[0] = csi_width/2;
266 par[1] = geometry->GetGapThickness()/2 + .25;
267 par[2] = (68.35 - csi_length/2)/2;
268 gMC->Gsvolu("SMSH", "BOX", idtmed[1009], par, 3);
272 par[0] = (66.3 - csi_width/2)/2;
273 par[1] = geometry->GetGapThickness()/2 + .25;
274 par[2] = csi_length/2 + 68.35 - csi_length/2;
275 gMC->Gsvolu("SMLG", "BOX", idtmed[1009], par, 3);
277 // Aluminium supports for freon
280 par[0] = geometry->GetQuartzWidth()/2;
282 par[2] = (68.35 - geometry->GetQuartzLength()/2)/2;
283 gMC->Gsvolu("SFSH", "BOX", idtmed[1009], par, 3);
287 par[0] = (66.3 - geometry->GetQuartzWidth()/2)/2;
289 par[2] = geometry->GetQuartzLength()/2 + 68.35 - geometry->GetQuartzLength()/2;
290 gMC->Gsvolu("SFLG", "BOX", idtmed[1009], par, 3);
294 par[0] = csi_width/2;
296 par[2] = csi_length/4 -.5025;
297 gMC->Gsvolu("PCB ", "BOX", idtmed[1011], par, 3);
300 // Backplane supports
307 gMC->Gsvolu("BACK", "BOX", idtmed[1009], par, 3);
314 gMC->Gsvolu("BKHL", "BOX", idtmed[1000], par, 3);
321 gMC->Gsvolu("BKHS", "BOX", idtmed[1000], par, 3);
323 // Place holes inside backplane support
325 gMC->Gspos("BKHS", 1, "BACK", .8 + 5.7,0., .6 + 4.4625, 0, "ONLY");
326 gMC->Gspos("BKHS", 2, "BACK", -.8 - 5.7,0., .6 + 4.4625, 0, "ONLY");
327 gMC->Gspos("BKHS", 3, "BACK", .8 + 5.7,0., -.6 - 4.4625, 0, "ONLY");
328 gMC->Gspos("BKHS", 4, "BACK", -.8 - 5.7,0., -.6 - 4.4625, 0, "ONLY");
329 gMC->Gspos("BKHS", 5, "BACK", .8 + 5.7,0., .6 + 8.925 + 1.2 + 4.4625, 0, "ONLY");
330 gMC->Gspos("BKHS", 6, "BACK", -.8 - 5.7,0., .6 + 8.925 + 1.2 + 4.4625, 0, "ONLY");
331 gMC->Gspos("BKHS", 7, "BACK", .8 + 5.7,0., -.6 - 8.925 - 1.2 - 4.4625, 0, "ONLY");
332 gMC->Gspos("BKHS", 8, "BACK", -.8 - 5.7,0., -.6 - 8.925 - 1.2 - 4.4625, 0, "ONLY");
333 gMC->Gspos("BKHL", 1, "BACK", .8 + 11.4 + 1.6 + 9.05, 0., .6 + 4.4625, 0, "ONLY");
334 gMC->Gspos("BKHL", 2, "BACK", -.8 - 11.4 - 1.6 - 9.05, 0., .6 + 4.4625, 0, "ONLY");
335 gMC->Gspos("BKHL", 3, "BACK", .8 + 11.4 + 1.6 + 9.05, 0., -.6 - 4.4625, 0, "ONLY");
336 gMC->Gspos("BKHL", 4, "BACK", -.8 - 11.4 - 1.6 - 9.05, 0., -.6 - 4.4625, 0, "ONLY");
337 gMC->Gspos("BKHL", 5, "BACK", .8 + 11.4+ 1.6 + 9.05, 0., .6 + 8.925 + 1.2 + 4.4625, 0, "ONLY");
338 gMC->Gspos("BKHL", 6, "BACK", -.8 - 11.4 - 1.6 - 9.05, 0., .6 + 8.925 + 1.2 + 4.4625, 0, "ONLY");
339 gMC->Gspos("BKHL", 7, "BACK", .8 + 11.4 + 1.6 + 9.05, 0., -.6 - 8.925 - 1.2 - 4.4625, 0, "ONLY");
340 gMC->Gspos("BKHL", 8, "BACK", -.8 - 11.4 - 1.6 - 9.05, 0., -.6 - 8.925 - 1.2 - 4.4625, 0, "ONLY");
344 // --- Places the detectors defined with GSVOLU
345 // Place material inside RICH
346 gMC->Gspos("SRIC", 1, "RICH", 0.,0., 0., 0, "ONLY");
347 gMC->Gspos("AIR2", 1, "RICH", 66.3 + 1.2505, 1.276 - geometry->GetGapThickness()/2 - geometry->GetQuartzThickness() - geometry->GetFreonThickness()- .4 - .6 - .05 - .376 -.5 - 3.35, 0., 0, "ONLY");
348 gMC->Gspos("AIR2", 2, "RICH", -66.3 - 1.2505, 1.276 - geometry->GetGapThickness()/2 - geometry->GetQuartzThickness() - geometry->GetFreonThickness()- .4 - .6 - .05 - .376 -.5 - 3.35, 0., 0, "ONLY");
349 gMC->Gspos("AIR3", 1, "RICH", 0., 1.276 - geometry->GetGapThickness()/2 - geometry->GetQuartzThickness() - geometry->GetFreonThickness()- .4 - .6 - .05 - .376 -.5 - 3.35, -68.35 - 1.25, 0, "ONLY");
350 gMC->Gspos("AIR3", 2, "RICH", 0., 1.276 - geometry->GetGapThickness()/2 - geometry->GetQuartzThickness() - geometry->GetFreonThickness()- .4 - .6 - .05 - .376 -.5 - 3.35, 68.35 + 1.25, 0, "ONLY");
353 gMC->Gspos("ALUM", 1, "SRIC", 0., 1.276 - geometry->GetGapThickness()/2 - geometry->GetQuartzThickness() - geometry->GetFreonThickness()- .4 - .6 - .05 - .376 -.025, 0., 0, "ONLY");
354 gMC->Gspos("HONE", 1, "SRIC", 0., 1.276- geometry->GetGapThickness()/2 - geometry->GetQuartzThickness() - geometry->GetFreonThickness()- .4 - .6 - .05 - .188, 0., 0, "ONLY");
355 gMC->Gspos("ALUM", 2, "SRIC", 0., 1.276 - geometry->GetGapThickness()/2 - geometry->GetQuartzThickness() - geometry->GetFreonThickness()- .4 - .6 - .025, 0., 0, "ONLY");
356 gMC->Gspos("FOOT", 1, "SRIC", 64.95, 1.276 - geometry->GetGapThickness()/2 - geometry->GetQuartzThickness() - geometry->GetFreonThickness()- .4 - .3, 36.9, 0, "ONLY");
357 gMC->Gspos("FOOT", 2, "SRIC", 21.65, 1.276 - geometry->GetGapThickness()/2 - geometry->GetQuartzThickness() - geometry->GetFreonThickness()- .4 - .3 , 36.9, 0, "ONLY");
358 gMC->Gspos("FOOT", 3, "SRIC", -21.65, 1.276 - geometry->GetGapThickness()/2 - geometry->GetQuartzThickness() - geometry->GetFreonThickness()- .4 - .3, 36.9, 0, "ONLY");
359 gMC->Gspos("FOOT", 4, "SRIC", -64.95, 1.276 - geometry->GetGapThickness()/2 - geometry->GetQuartzThickness() - geometry->GetFreonThickness()- .4 - .3, 36.9, 0, "ONLY");
360 gMC->Gspos("FOOT", 5, "SRIC", 64.95, 1.276 - geometry->GetGapThickness()/2 - geometry->GetQuartzThickness() - geometry->GetFreonThickness()- .4 - .3, -36.9, 0, "ONLY");
361 gMC->Gspos("FOOT", 6, "SRIC", 21.65, 1.276 - geometry->GetGapThickness()/2 - geometry->GetQuartzThickness() - geometry->GetFreonThickness()- .4 - .3, -36.9, 0, "ONLY");
362 gMC->Gspos("FOOT", 7, "SRIC", -21.65, 1.276 - geometry->GetGapThickness()/2 - geometry->GetQuartzThickness() - geometry->GetFreonThickness()- .4 - .3, -36.9, 0, "ONLY");
363 gMC->Gspos("FOOT", 8, "SRIC", -64.95, 1.276 - geometry->GetGapThickness()/2 - geometry->GetQuartzThickness() - geometry->GetFreonThickness()- .4 - .3, -36.9, 0, "ONLY");
364 gMC->Gspos("OQUA", 1, "SRIC", 0., 1.276 - geometry->GetGapThickness()/2 - geometry->GetQuartzThickness() - geometry->GetFreonThickness()- .2, 0., 0, "ONLY");
369 gMC->Gspos("SMLG", 1, "SRIC", csi_width/2 + (66.3 - csi_width/2)/2, 1.276 + .25, 0., 0, "ONLY");
370 gMC->Gspos("SMLG", 2, "SRIC", - csi_width/2 - (66.3 - csi_width/2)/2, 1.276 + .25, 0., 0, "ONLY");
371 gMC->Gspos("SMSH", 1, "SRIC", 0., 1.276 + .25, csi_length/2 + (68.35 - csi_length/2)/2, 0, "ONLY");
372 gMC->Gspos("SMSH", 2, "SRIC", 0., 1.276 + .25, - csi_length/2 - (68.35 - csi_length/2)/2, 0, "ONLY");
376 Float_t supp_y = 1.276 - geometry->GetGapThickness()/2- geometry->GetQuartzThickness() -geometry->GetFreonThickness() - .2 + .3; //y position of freon supports
378 gMC->Gspos("SFLG", 1, "SRIC", geometry->GetQuartzWidth()/2 + (66.3 - geometry->GetQuartzWidth()/2)/2, supp_y, 0., 0, "ONLY");
379 gMC->Gspos("SFLG", 2, "SRIC", - geometry->GetQuartzWidth()/2 - (66.3 - geometry->GetQuartzWidth()/2)/2, supp_y, 0., 0, "ONLY");
380 gMC->Gspos("SFSH", 1, "SRIC", 0., supp_y, geometry->GetQuartzLength()/2 + (68.35 - geometry->GetQuartzLength()/2)/2, 0, "ONLY");
381 gMC->Gspos("SFSH", 2, "SRIC", 0., supp_y, - geometry->GetQuartzLength()/2 - (68.35 - geometry->GetQuartzLength()/2)/2, 0, "ONLY");
383 AliMatrix(idrotm[1019], 0., 0., 90., 0., 90., 90.);
388 for (i = 0; i < nspacers/3; i++) {
389 zs = -11.6/2 + (TMath::Abs(nspacers/6) - i) * 12.2;
390 gMC->Gspos("SPAC", i, "FRE1", 10.5, 0., zs, idrotm[1019], "ONLY"); //Original settings
393 for (i = nspacers/3; i < (nspacers*2)/3; i++) {
394 zs = -11.6/2 + (nspacers/3 + TMath::Abs(nspacers/6) - i) * 12.2;
395 gMC->Gspos("SPAC", i, "FRE1", 0, 0., zs, idrotm[1019], "ONLY"); //Original settings
398 for (i = (nspacers*2)/3; i < nspacers; ++i) {
399 zs = -11.6/2 + ((nspacers*2)/3 + TMath::Abs(nspacers/6) - i) * 12.2;
400 gMC->Gspos("SPAC", i, "FRE1", -10.5, 0., zs, idrotm[1019], "ONLY"); //Original settings
403 for (i = 0; i < nspacers/3; i++) {
404 zs = -11.6/2 + (TMath::Abs(nspacers/6) - i) * 12.2;
405 gMC->Gspos("SPAC", i, "FRE2", 10.5, 0., zs, idrotm[1019], "ONLY"); //Original settings
408 for (i = nspacers/3; i < (nspacers*2)/3; i++) {
409 zs = -11.6/2 + (nspacers/3 + TMath::Abs(nspacers/6) - i) * 12.2;
410 gMC->Gspos("SPAC", i, "FRE2", 0, 0., zs, idrotm[1019], "ONLY"); //Original settings
413 for (i = (nspacers*2)/3; i < nspacers; ++i) {
414 zs = -11.6/2 + ((nspacers*2)/3 + TMath::Abs(nspacers/6) - i) * 12.2;
415 gMC->Gspos("SPAC", i, "FRE2", -10.5, 0., zs, idrotm[1019], "ONLY"); //Original settings
419 gMC->Gspos("FRE1", 1, "OQF1", 0., 0., 0., 0, "ONLY");
420 gMC->Gspos("FRE2", 1, "OQF2", 0., 0., 0., 0, "ONLY");
421 gMC->Gspos("OQF1", 1, "SRIC", geometry->GetOuterFreonWidth()/2 + geometry->GetInnerFreonWidth()/2 + 2, 1.276 - geometry->GetGapThickness()/2- geometry->GetQuartzThickness() -geometry->GetFreonThickness()/2, 0., 0, "ONLY"); //Original settings (31.3)
422 gMC->Gspos("OQF2", 2, "SRIC", 0., 1.276 - geometry->GetGapThickness()/2 - geometry->GetQuartzThickness() - geometry->GetFreonThickness()/2, 0., 0, "ONLY"); //Original settings
423 gMC->Gspos("OQF1", 3, "SRIC", - (geometry->GetOuterFreonWidth()/2 + geometry->GetInnerFreonWidth()/2) - 2, 1.276 - geometry->GetGapThickness()/2 - geometry->GetQuartzThickness() - geometry->GetFreonThickness()/2, 0., 0, "ONLY"); //Original settings (-31.3)
424 gMC->Gspos("QUAR", 1, "SRIC", 0., 1.276 - geometry->GetGapThickness()/2 - geometry->GetQuartzThickness()/2, 0., 0, "ONLY");
425 gMC->Gspos("GAP ", 1, "META", 0., geometry->GetGapThickness()/2 - geometry->GetProximityGapThickness()/2 - 0.0001, 0., 0, "ONLY");
426 gMC->Gspos("META", 1, "SRIC", 0., 1.276, 0., 0, "ONLY");
427 gMC->Gspos("CSI ", 1, "SRIC", 0., 1.276 + geometry->GetGapThickness()/2 + .25, 0., 0, "ONLY");
428 printf("CSI pos: %f\n",1.276 + geometry->GetGapThickness()/2 + .25);
430 // Wire support placing
432 gMC->Gspos("WSG2", 1, "GAP ", 0., geometry->GetProximityGapThickness()/2 - .1, 0., 0, "ONLY");
433 gMC->Gspos("WSG1", 1, "CSI ", 0., 0., 0., 0, "ONLY");
434 gMC->Gspos("WSMe", 1, "SRIC ", 0., 1.276 + geometry->GetGapThickness()/2 + .5 + 1.05, 0., 0, "ONLY");
438 gMC->Gspos("BACK", 1, "SRIC ", -33.15, 1.276 + geometry->GetGapThickness()/2 + .5 + 2.1 + 2, 43.3, 0, "ONLY");
439 gMC->Gspos("BACK", 2, "SRIC ", 33.15, 1.276 + geometry->GetGapThickness()/2 + .5 + 2.1 + 2 , 43.3, 0, "ONLY");
440 gMC->Gspos("BACK", 3, "SRIC ", -33.15, 1.276 + geometry->GetGapThickness()/2 + .5 + 2.1 + 2, 0., 0, "ONLY");
441 gMC->Gspos("BACK", 4, "SRIC ", 33.15, 1.276 + geometry->GetGapThickness()/2 + .5 + 2.1 + 2, 0., 0, "ONLY");
442 gMC->Gspos("BACK", 5, "SRIC ", 33.15, 1.276 + geometry->GetGapThickness()/2 + .5 + 2.1 + 2, -43.3, 0, "ONLY");
443 gMC->Gspos("BACK", 6, "SRIC ", -33.15, 1.276 + geometry->GetGapThickness()/2 + .5 + 2.1 + 2, -43.3, 0, "ONLY");
447 gMC->Gspos("PCB ", 1, "SRIC ", 0., 1.276 + geometry->GetGapThickness()/2 + .5 + 1.05, csi_width/4 + .5025 + 2.5, 0, "ONLY");
448 gMC->Gspos("PCB ", 2, "SRIC ", 0., 1.276 + geometry->GetGapThickness()/2 + .5 + 1.05, -csi_width/4 - .5025 - 2.5, 0, "ONLY");
450 // Place chambers into mother volume ALIC
452 Double_t dOffset = geometry->GetOffset() - geometry->GetGapThickness()/2; // distance from center of mother volume ALIC to methane
454 Double_t dAlpha = geometry->GetAlphaAngle(); // angle between centers of chambers - y-z plane
455 Double_t dAlphaRad = dAlpha*kDegrad;
457 Double_t dBeta = geometry->GetBetaAngle(); // angle between center of chambers - y-x plane
458 Double_t dBetaRad = dBeta*kDegrad;
460 Double_t dRotAngle = geometry->GetRotationAngle(); // the whole RICH is to be rotated in x-y plane + means clockwise rotation
461 Double_t dRotAngleRad = dRotAngle*kDegrad;
464 TRotMatrix *pRotMatrix; // tmp pointer
466 TVector3 vector(0,dOffset,0); // Position of chamber 2 without rotation
468 // Chamber 0 standalone (no other chambers in this row)
469 pRotMatrix = new TRotMatrix("rot993","rot993", 0., 0., 0.,0.,0.,0.);
470 const Double_t* r = pRotMatrix->SetAngles(90., 0., 90.-dAlpha , 90., dAlpha, -90.);
471 Double_t* rr = RotateXY(r, -dRotAngleRad);
472 AliMatrix(idrotm[1000], rr[0], rr[1], rr[2], rr[3], rr[4], rr[5]);
473 pRotMatrix->SetAngles(rr[0], rr[1], rr[2], rr[3], rr[4], rr[5]);
475 vector.SetXYZ(0,dOffset,0); vector.RotateX(dAlphaRad);
476 vector.RotateZ(-dRotAngleRad);
478 gMC->Gspos("RICH",1,"ALIC",vector.X(),vector.Y(),vector.Z(),idrotm[1000], "ONLY");
479 Chamber(0).SetChamberTransform(vector.X(),vector.Y(),vector.Z(),pRotMatrix);
480 if(GetDebug()) Info("CreateGeometry 0","%8.3f %8.3f %8.3f %8.3f %8.3f %8.3f",rr[0],rr[1],rr[2],rr[3],rr[4],rr[5]);
481 if(GetDebug()) Info("CreateGeometry 0","x=%8.3f y=%8.3f z=%8.3f",vector.X(),vector.Y(),vector.Z());
483 pRotMatrix = new TRotMatrix("rot994","rot994", 0., 0., 0.,0.,0.,0.);
484 r = pRotMatrix->SetAngles(90., -dBeta, 90., 90.-dBeta, 0., 0.);
485 rr = RotateXY(r, -dRotAngleRad);
486 AliMatrix(idrotm[1001], rr[0], rr[1], rr[2], rr[3], rr[4], rr[5]);
487 pRotMatrix->SetAngles(rr[0], rr[1], rr[2], rr[3], rr[4], rr[5]);
488 vector.SetXYZ(0,dOffset,0); vector.RotateZ(-dBetaRad);
489 vector.RotateZ(-dRotAngleRad);
491 gMC->Gspos("RICH",2,"ALIC",vector.X(),vector.Y(),vector.Z(),idrotm[1001], "ONLY");
492 Chamber(1).SetChamberTransform(vector.X(),vector.Y(),vector.Z(),pRotMatrix);
493 if(GetDebug()) Info("CreateGeometry 1","%8.3f %8.3f %8.3f %8.3f %8.3f %8.3f",rr[0],rr[1],rr[2],rr[3],rr[4],rr[5]);
494 if(GetDebug()) Info("CreateGeometry 1","x=%8.3f y=%8.3f z=%8.3f",vector.X(),vector.Y(),vector.Z());
495 // Chamber 2 the top one with no Alpha-Beta rotation
496 pRotMatrix = new TRotMatrix("rot995","rot995", 0., 0., 0.,0.,0.,0.);
497 r = pRotMatrix->SetAngles(90., 0., 90., 90., 0., 0.);
498 rr = RotateXY(r, -dRotAngleRad);
499 AliMatrix(idrotm[1002], rr[0], rr[1], rr[2], rr[3], rr[4], rr[5]);
500 pRotMatrix->SetAngles(rr[0], rr[1], rr[2], rr[3], rr[4], rr[5]);
501 vector.SetXYZ(0,dOffset,0);
502 vector.RotateZ(-dRotAngleRad);
503 gMC->Gspos("RICH",3,"ALIC",vector.X(),vector.Y(),vector.Z(),idrotm[1002], "ONLY");
504 Chamber(2).SetChamberTransform(vector.X(),vector.Y(),vector.Z(),pRotMatrix);
505 if(GetDebug()) Info("CreateGeometry 2","%8.3f %8.3f %8.3f %8.3f %8.3f %8.3f",rr[0],rr[1],rr[2],rr[3],rr[4],rr[5]);
506 if(GetDebug()) Info("CreateGeometry 2","x=%8.3f y=%8.3f z=%8.3f",vector.X(),vector.Y(),vector.Z());
508 pRotMatrix = new TRotMatrix("rot996","rot996", 0., 0., 0.,0.,0.,0.);
509 r = pRotMatrix->SetAngles(90., dBeta, 90., 90.+dBeta, 0., 0.);
510 rr = RotateXY(r, -dRotAngleRad);
511 AliMatrix(idrotm[1003], rr[0], rr[1], rr[2], rr[3], rr[4], rr[5]);
512 pRotMatrix->SetAngles(rr[0], rr[1], rr[2], rr[3], rr[4], rr[5]);
513 vector.SetXYZ(0,dOffset,0); vector.RotateZ(dBetaRad);
514 vector.RotateZ(-dRotAngleRad);
516 gMC->Gspos("RICH",4,"ALIC",vector.X(),vector.Y(),vector.Z(),idrotm[1003], "ONLY");
517 Chamber(3).SetChamberTransform(vector.X(),vector.Y(),vector.Z(),pRotMatrix);
518 if(GetDebug()) Info("CreateGeometry 3","%8.3f %8.3f %8.3f %8.3f %8.3f %8.3f",rr[0],rr[1],rr[2],rr[3],rr[4],rr[5]);
519 if(GetDebug()) Info("CreateGeometry 3","x=%8.3f y=%8.3f z=%8.3f",vector.X(),vector.Y(),vector.Z());
521 pRotMatrix = new TRotMatrix("rot997","rot997", 0., 0., 0.,0.,0.,0.);
522 r = pRotMatrix->SetAngles(90., 360.-dBeta, 108.2, 90.-dBeta, 18.2, 90.-dBeta);
523 rr = RotateXY(r, -dRotAngleRad);
524 AliMatrix(idrotm[1004], rr[0], rr[1], rr[2], rr[3], rr[4], rr[5]);
525 pRotMatrix->SetAngles(rr[0], rr[1], rr[2], rr[3], rr[4], rr[5]);
526 vector.SetXYZ(0,dOffset,0); vector.RotateZ(-dBetaRad); vector.RotateX(-dAlphaRad);
527 vector.RotateZ(-dRotAngleRad);
529 gMC->Gspos("RICH",5,"ALIC",vector.X(),vector.Y(),vector.Z(),idrotm[1004], "ONLY");
530 Chamber(4).SetChamberTransform(vector.X(),vector.Y(),vector.Z(),pRotMatrix);
531 if(GetDebug()) Info("CreateGeometry 4","%8.3f %8.3f %8.3f %8.3f %8.3f %8.3f",rr[0],rr[1],rr[2],rr[3],rr[4],rr[5]);
532 if(GetDebug()) Info("CreateGeometry 4","x=%8.3f y=%8.3f z=%8.3f",vector.X(),vector.Y(),vector.Z());
534 pRotMatrix = new TRotMatrix("rot998","rot998", 0., 0., 0.,0.,0.,0.);
535 r = pRotMatrix->SetAngles(90., 0., 90.+dAlpha, 90., dAlpha, 90.);
536 rr = RotateXY(r, -dRotAngleRad);
537 AliMatrix(idrotm[1005], rr[0], rr[1], rr[2], rr[3], rr[4], rr[5]);
538 pRotMatrix->SetAngles(rr[0], rr[1], rr[2], rr[3], rr[4], rr[5]);
539 vector.SetXYZ(0,dOffset,0); vector.RotateX(-dAlphaRad);
540 vector.RotateZ(-dRotAngleRad);
542 gMC->Gspos("RICH",6,"ALIC",vector.X(),vector.Y(),vector.Z(),idrotm[1005], "ONLY");
543 Chamber(5).SetChamberTransform(vector.X(),vector.Y(),vector.Z(),pRotMatrix);
544 if(GetDebug()) Info("CreateGeometry 5","%8.3f %8.3f %8.3f %8.3f %8.3f %8.3f",rr[0],rr[1],rr[2],rr[3],rr[4],rr[5]);
545 if(GetDebug()) Info("CreateGeometry 5","x=%8.3f y=%8.3f z=%8.3f",vector.X(),vector.Y(),vector.Z());
547 pRotMatrix = new TRotMatrix("rot999","rot999", 0., 0., 0.,0.,0.,0.);
548 r = pRotMatrix->SetAngles(90., dBeta, 108.2, 90.+dBeta, 18.2, 90.+dBeta);
549 rr = RotateXY(r, -dRotAngleRad);
550 AliMatrix(idrotm[1006], rr[0], rr[1], rr[2], rr[3], rr[4], rr[5]);
551 pRotMatrix->SetAngles(rr[0], rr[1], rr[2], rr[3], rr[4], rr[5]);
552 vector.SetXYZ(0,dOffset,0); vector.RotateZ(dBetaRad); vector.RotateX(-dAlphaRad);
553 vector.RotateZ(-dRotAngleRad);
555 gMC->Gspos("RICH",7,"ALIC",vector.X(),vector.Y(),vector.Z(),idrotm[1006], "ONLY");
556 Chamber(6).SetChamberTransform(vector.X(),vector.Y(),vector.Z(),pRotMatrix);
557 if(GetDebug()) Info("CreateGeometry 6","%8.3f %8.3f %8.3f %8.3f %8.3f %8.3f",rr[0],rr[1],rr[2],rr[3],rr[4],rr[5]);
558 if(GetDebug()) Info("CreateGeometry 6","x=%8.3f y=%8.3f z=%8.3f",vector.X(),vector.Y(),vector.Z());
560 }//void AliRICHv3::CreateGeometry()
561 //______________________________________________________________________________
562 void AliRICHv3::Init()
563 {//Makes nothing for a while
564 if(GetDebug())Info("Init","Start.");
565 if(GetDebug())Info("Init","Stop.");
567 //______________________________________________________________________________
568 Double_t* AliRICHv3::RotateXY(const Double_t* r, Double_t a)
570 // Rotatation in xy-plane
572 // The resulting rotation matrix is given back in the G3 notation.
573 Double_t* rr = new Double_t[6];
577 for (i = 0; i < 3; i++) {
579 m[j] = r[j] * TMath::Cos(a) - r[j+1] * TMath::Sin(a);
580 m[j+1] = r[j] * TMath::Sin(a) + r[j+1] * TMath::Cos(a);
584 for (i = 0; i < 3; i++) {
587 rr[k] = TMath::ACos(m[j+2]) * kRaddeg;
588 rr[k+1] = TMath::ATan2(m[j+1], m[j]) * kRaddeg;
591 }//Double_t* AliRICHv3::RotateXY(const Double_t* r, Double_t a)
592 //______________________________________________________________________________
593 void AliRICHv3::StepManager()
600 static Float_t hits[22];
601 static Float_t ckovData[19];
602 TLorentzVector position;
603 TLorentzVector momentum;
608 Float_t localTheta,localPhi;
610 Float_t destep, step;
613 static Float_t eloss, xhit, yhit, tlength;
614 const Float_t kBig=1.e10;
616 TClonesArray &lhits = *fHits;
617 TParticle *current = (TParticle*)(*gAlice->Particles())[gAlice->GetCurrentTrackNumber()];
619 //if (current->Energy()>1)
622 // Only gas gap inside chamber
623 // Tag chambers and record hits when track enters
626 id=gMC->CurrentVolID(copy);
628 Float_t cherenkovLoss=0;
629 //gAlice->KeepTrack(gAlice->GetCurrentTrackNumber());
631 gMC->TrackPosition(position);
635 //bzero((char *)ckovData,sizeof(ckovData)*19);
636 ckovData[1] = pos[0]; // X-position for hit
637 ckovData[2] = pos[1]; // Y-position for hit
638 ckovData[3] = pos[2]; // Z-position for hit
639 ckovData[6] = 0; // dummy track length
640 //ckovData[11] = gAlice->GetCurrentTrackNumber();
642 //printf("\n+++++++++++\nTrack: %d\n++++++++++++\n",gAlice->GetCurrentTrackNumber());
644 //AliRICH *RICH = (AliRICH *) gAlice->GetDetector("RICH");
646 /********************Store production parameters for Cerenkov photons************************/
647 //is it a Cerenkov photon?
648 if (gMC->TrackPid() == 50000050) {
650 //if (gMC->VolId("GAP ")==gMC->CurrentVolID(copy))
652 Float_t ckovEnergy = current->Energy();
653 //energy interval for tracking
654 if (ckovEnergy > 5.6e-09 && ckovEnergy < 7.8e-09 )
655 //if (ckovEnergy > 0)
657 if (gMC->IsTrackEntering()){ //is track entering?
658 //printf("Track entered (1)\n");
659 if (gMC->VolId("FRE1")==gMC->CurrentVolID(copy) || gMC->VolId("FRE2")==gMC->CurrentVolID(copy))
661 if (gMC->IsNewTrack()){ //is it the first step?
662 //printf("I'm in!\n");
663 Int_t mother = current->GetFirstMother();
665 //printf("Second Mother:%d\n",current->GetSecondMother());
667 ckovData[10] = mother;
668 ckovData[11] = gAlice->GetCurrentTrackNumber();
669 ckovData[12] = 1; //Media where photon was produced 1->Freon, 2->Quarz
670 //printf("Produced in FREO\n");
673 //printf("Index: %d\n",fCkovNumber);
674 } //first step question
677 if (gMC->IsNewTrack()){ //is it first step?
678 if (gMC->VolId("QUAR")==gMC->CurrentVolID(copy)) //is it in quarz?
681 //printf("Produced in QUAR\n");
683 } //first step question
685 //printf("Before %d\n",fFreonProd);
686 } //track entering question
688 if (ckovData[12] == 1) //was it produced in Freon?
689 //if (fFreonProd == 1)
691 if (gMC->IsTrackEntering()){ //is track entering?
692 //printf("Track entered (2)\n");
693 //printf("Current volume (should be META): %s\n",gMC->CurrentVolName());
694 //printf("VolId: %d, CurrentVolID: %d\n",gMC->VolId("META"),gMC->CurrentVolID(copy));
695 if (gMC->VolId("META")==gMC->CurrentVolID(copy)) //is it in gap?
697 //printf("Got in META\n");
698 gMC->TrackMomentum(momentum);
704 gMC->Gmtod(mom,localMom,2);
705 Float_t cophi = TMath::Cos(TMath::ATan2(localMom[0], localMom[1]));
706 Float_t t = (1. - .025 / cophi) * (1. - .05 / cophi);
707 /**************** Photons lost in second grid have to be calculated by hand************/
708 gMC->GetRandom()->RndmArray(1,ranf);
712 AddCerenkov(gAlice->GetCurrentTrackNumber(),vol,ckovData);
713 //printf("Added One (1)!\n");
714 //printf("Lost one in grid\n");
716 /**********************************************************************************/
719 //printf("Current volume (should be CSI) (1): %s\n",gMC->CurrentVolName());
720 //printf("VolId: %d, CurrentVolID: %d\n",gMC->VolId("CSI "),gMC->CurrentVolID(copy));
721 if (gMC->VolId("CSI ")==gMC->CurrentVolID(copy)) //is it in csi?
723 //printf("Got in CSI\n");
724 gMC->TrackMomentum(momentum);
730 gMC->Gmtod(mom,localMom,2);
731 /********* Photons lost by Fresnel reflection have to be calculated by hand********/
732 /***********************Cerenkov phtons (always polarised)*************************/
733 Double_t localTc = localMom[0]*localMom[0]+localMom[2]*localMom[2];
734 Double_t localRt = TMath::Sqrt(localTc);
735 localTheta = Float_t(TMath::ATan2(localRt,Double_t(localMom[1])));
736 Double_t cotheta = TMath::Abs(cos(localTheta));
737 Float_t t = Fresnel(ckovEnergy*1e9,cotheta,1);
738 gMC->GetRandom()->RndmArray(1,ranf);
742 AddCerenkov(gAlice->GetCurrentTrackNumber(),vol,ckovData);
744 //printf("Added One (2)!\n");
745 //printf("Lost by Fresnel\n");
747 /**********************************************************************************/
752 /********************Evaluation of losses************************/
753 /******************still in the old fashion**********************/
756 Int_t i1 = gMC->StepProcesses(procs); //number of physics mechanisms acting on the particle
757 for (Int_t i = 0; i < i1; ++i) {
759 if (procs[i] == kPLightReflection) { //was it reflected
761 if (gMC->VolId("FRE1")==gMC->CurrentVolID(copy) || gMC->VolId("FRE2")==gMC->CurrentVolID(copy))
763 if (gMC->CurrentVolID(copy) == gMC->VolId("QUAR"))
766 //AddCerenkov(gAlice->GetCurrentTrackNumber(),vol,ckovData);
767 } //reflection question
770 else if (procs[i] == kPLightAbsorption) { //was it absorbed?
771 //printf("Got in absorption\n");
773 if (gMC->VolId("FRE1")==gMC->CurrentVolID(copy) || gMC->VolId("FRE2")==gMC->CurrentVolID(copy))
775 if (gMC->CurrentVolID(copy) == gMC->VolId("QUAR"))
777 if (gMC->CurrentVolID(copy) == gMC->VolId("META"))
779 if (gMC->CurrentVolID(copy) == gMC->VolId("GAP "))
782 if (gMC->CurrentVolID(copy) == gMC->VolId("SRIC"))
786 if (gMC->CurrentVolID(copy) == gMC->VolId("CSI ")) {
790 AddCerenkov(gAlice->GetCurrentTrackNumber(),vol,ckovData);
791 //printf("Added One (3)!\n");
792 //printf("Added cerenkov %d\n",fCkovNumber);
793 } //absorption question
796 // Photon goes out of tracking scope
797 else if (procs[i] == kPStop) { //is it below energy treshold?
800 AddCerenkov(gAlice->GetCurrentTrackNumber(),vol,ckovData);
801 //printf("Added One (4)!\n");
802 } // energy treshold question
803 } //number of mechanisms cycle
804 /**********************End of evaluation************************/
805 } //freon production question
806 } //energy interval question
807 //}//inside the proximity gap question
808 } //cerenkov photon question
810 /**************************************End of Production Parameters Storing*********************/
813 /*******************************Treat photons that hit the CsI (Ckovs and Feedbacks)************/
815 if (gMC->TrackPid() == 50000050 || gMC->TrackPid() == 50000051) {
816 //printf("Cerenkov\n");
818 //if (gMC->TrackPid() == 50000051)
819 //printf("Tracking a feedback\n");
821 if (gMC->VolId("CSI ")==gMC->CurrentVolID(copy))
823 //printf("Current volume (should be CSI) (2): %s\n",gMC->CurrentVolName());
824 //printf("VolId: %d, CurrentVolID: %d\n",gMC->VolId("CSI "),gMC->CurrentVolID(copy));
825 //printf("Got in CSI\n");
826 //printf("Tracking a %d\n",gMC->TrackPid());
827 if (gMC->Edep() > 0.){
828 gMC->TrackPosition(position);
829 gMC->TrackMomentum(momentum);
837 Double_t tc = mom[0]*mom[0]+mom[1]*mom[1];
838 Double_t rt = TMath::Sqrt(tc);
839 theta = Float_t(TMath::ATan2(rt,Double_t(mom[2])))*kRaddeg;
840 phi = Float_t(TMath::ATan2(Double_t(mom[1]),Double_t(mom[0])))*kRaddeg;
842 gMC->CurrentVolOffID(2,copy);
847 gMC->Gmtod(pos,localPos,1);
849 //Chamber(idvol).GlobaltoLocal(pos,localPos);
851 gMC->Gmtod(mom,localMom,2);
853 //Chamber(idvol).GlobaltoLocal(mom,localMom);
855 gMC->CurrentVolOffID(2,copy);
859 //Int_t sector=((AliRICHChamber*) (*fChambers)[idvol])
860 //->Sector(localPos[0], localPos[2]);
861 //printf("Sector:%d\n",sector);
863 /*if (gMC->TrackPid() == 50000051){
865 printf("Feedbacks:%d\n",fFeedbacks);
868 //PH ((AliRICHChamber*) (*fChambers)[idvol])
869 ((AliRICHChamber*)fChambers->At(idvol))
870 ->SigGenInit(localPos[0], localPos[2], localPos[1]);
872 ckovData[0] = gMC->TrackPid(); // particle type
873 ckovData[1] = pos[0]; // X-position for hit
874 ckovData[2] = pos[1]; // Y-position for hit
875 ckovData[3] = pos[2]; // Z-position for hit
876 ckovData[4] = theta; // theta angle of incidence
877 ckovData[5] = phi; // phi angle of incidence
878 ckovData[8] = (Float_t) fNsdigits; // first sdigit
879 ckovData[9] = -1; // last pad hit
880 ckovData[13] = 4; // photon was detected
881 ckovData[14] = mom[0];
882 ckovData[15] = mom[1];
883 ckovData[16] = mom[2];
885 destep = gMC->Edep();
886 gMC->SetMaxStep(kBig);
887 cherenkovLoss += destep;
888 ckovData[7]=cherenkovLoss;
890 ckovData[17] = Hits2SDigits(localPos[0],localPos[2],cherenkovLoss,idvol,kPhoton);//for photons in CsI
892 if (fNsdigits > (Int_t)ckovData[8]) {
893 ckovData[8]= ckovData[8]+1;
894 ckovData[9]= (Float_t) fNsdigits;
898 //TClonesArray *Hits = RICH->Hits();
899 AliRICHhit *mipHit = (AliRICHhit*) (fHits->UncheckedAt(0));
902 mom[0] = current->Px();
903 mom[1] = current->Py();
904 mom[2] = current->Pz();
905 Float_t mipPx = mipHit->MomX();
906 Float_t mipPy = mipHit->MomY();
907 Float_t mipPz = mipHit->MomZ();
909 Float_t r = mom[0]*mom[0] + mom[1]*mom[1] + mom[2]*mom[2];
910 Float_t rt = TMath::Sqrt(r);
911 Float_t mipR = mipPx*mipPx + mipPy*mipPy + mipPz*mipPz;
912 Float_t mipRt = TMath::Sqrt(mipR);
915 coscerenkov = (mom[0]*mipPx + mom[1]*mipPy + mom[2]*mipPz)/(rt*mipRt);
921 Float_t cherenkov = TMath::ACos(coscerenkov);
922 ckovData[18]=cherenkov;
926 AddHit(gAlice->GetCurrentTrackNumber(),vol,ckovData);
927 AddCerenkov(gAlice->GetCurrentTrackNumber(),vol,ckovData);
928 //printf("Added One (5)!\n");
935 /***********************************************End of photon hits*********************************************/
938 /**********************************************Charged particles treatment*************************************/
940 else if (gMC->TrackCharge()){
942 /*if (gMC->IsTrackEntering())
944 hits[13]=20;//is track entering?
946 if (gMC->VolId("FRE1")==gMC->CurrentVolID(copy) || gMC->VolId("FRE2")==gMC->CurrentVolID(copy))
948 gMC->TrackMomentum(momentum);
959 if (gMC->VolId("GAP ")== gMC->CurrentVolID(copy)) {//is in GAP?
960 // Get current particle id (ipart), track position (pos) and momentum (mom)
962 gMC->CurrentVolOffID(3,copy);
966 //Int_t sector=((AliRICHChamber*) (*fChambers)[idvol])
967 //->Sector(localPos[0], localPos[2]);
968 //printf("Sector:%d\n",sector);
970 gMC->TrackPosition(position);
971 gMC->TrackMomentum(momentum);
980 gMC->Gmtod(pos,localPos,1);
982 //Chamber(idvol).GlobaltoLocal(pos,localPos);
984 gMC->Gmtod(mom,localMom,2);
986 //Chamber(idvol).GlobaltoLocal(mom,localMom);
988 ipart = gMC->TrackPid();
990 // momentum loss and steplength in last step
991 destep = gMC->Edep();
992 step = gMC->TrackStep();
995 // record hits when track enters ...
996 if( gMC->IsTrackEntering()) {
997 // gMC->SetMaxStep(fMaxStepGas);
998 Double_t tc = mom[0]*mom[0]+mom[1]*mom[1];
999 Double_t rt = TMath::Sqrt(tc);
1000 theta = Float_t(TMath::ATan2(rt,Double_t(mom[2])))*kRaddeg;
1001 phi = Float_t(TMath::ATan2(Double_t(mom[1]),Double_t(mom[0])))*kRaddeg;
1004 Double_t localTc = localMom[0]*localMom[0]+localMom[2]*localMom[2];
1005 Double_t localRt = TMath::Sqrt(localTc);
1006 localTheta = Float_t(TMath::ATan2(localRt,Double_t(localMom[1])))*kRaddeg;
1007 localPhi = Float_t(TMath::ATan2(Double_t(localMom[2]),Double_t(localMom[0])))*kRaddeg;
1009 hits[0] = Float_t(ipart); // particle type
1010 hits[1] = localPos[0]; // X-position for hit
1011 hits[2] = localPos[1]; // Y-position for hit
1012 hits[3] = localPos[2]; // Z-position for hit
1013 hits[4] = localTheta; // theta angle of incidence
1014 hits[5] = localPhi; // phi angle of incidence
1015 hits[8] = (Float_t) fNsdigits; // first sdigit
1016 hits[9] = -1; // last pad hit
1017 hits[13] = fFreonProd; // did id hit the freon?
1021 hits[18] = 0; // dummy cerenkov angle
1027 Chamber(idvol).LocaltoGlobal(localPos,hits+1);
1030 //To make chamber coordinates x-y had to pass localPos[0], localPos[2]
1033 // Only if not trigger chamber
1036 // Initialize hit position (cursor) in the segmentation model
1037 //PH ((AliRICHChamber*) (*fChambers)[idvol])
1038 ((AliRICHChamber*)fChambers->At(idvol))
1039 ->SigGenInit(localPos[0], localPos[2], localPos[1]);
1044 // Calculate the charge induced on a pad (disintegration) in case
1046 // Mip left chamber ...
1047 if( gMC->IsTrackExiting() || gMC->IsTrackStop() || gMC->IsTrackDisappeared()){
1048 gMC->SetMaxStep(kBig);
1053 // Only if not trigger chamber
1057 if(gMC->TrackPid() == kNeutron)
1058 printf("\n\n\n\n\n Neutron Making Pad Hit!!! \n\n\n\n");
1059 hits[17] = Hits2SDigits(xhit,yhit,eloss,idvol,kMip); //for MIP
1065 if (fNsdigits > (Int_t)hits[8]) {
1067 hits[9]= (Float_t) fNsdigits;
1071 new(lhits[fNhits++]) AliRICHhit(fIshunt,gAlice->GetCurrentTrackNumber(),vol,hits);
1074 // Check additional signal generation conditions
1075 // defined by the segmentation
1076 // model (boundary crossing conditions)
1077 }else if(((AliRICHChamber*)fChambers->At(idvol))->SigGenCond(localPos[0], localPos[2], localPos[1])){
1078 ((AliRICHChamber*)fChambers->At(idvol))->SigGenInit(localPos[0], localPos[2], localPos[1]);
1081 if(gMC->TrackPid() == kNeutron)
1082 printf("\n\n\n\n\n Neutron Making Pad Hit!!! \n\n\n\n");
1083 hits[17] = Hits2SDigits(xhit,yhit,eloss,idvol,kMip);//for n
1090 // nothing special happened, add up energy loss
1097 /*************************************************End of MIP treatment**************************************/
1098 }//void AliRICHv3::StepManager()
1099 //__________________________________________________________________________________________________
1100 Int_t AliRICHv3::Hits2SDigits(Float_t xhit,Float_t yhit,Float_t eloss, Int_t idvol, ResponseType res)
1101 {//calls the charge disintegration method of the current chamber and adds all generated sdigits to the list of digits
1103 Float_t newclust[4][500];
1108 ((AliRICHChamber*)fChambers->At(idvol))->DisIntegration(eloss, xhit, yhit, iNdigits,newclust, res);
1110 for (Int_t i=0; i<iNdigits; i++) {
1111 if (Int_t(newclust[0][i]) > 0) {
1112 clhits[1] = Int_t(newclust[0][i]);// Cluster Charge
1113 clhits[2] = Int_t(newclust[1][i]);// Pad: ix
1114 clhits[3] = Int_t(newclust[2][i]);// Pad: iy
1115 clhits[4] = Int_t(newclust[3][i]);// Pad: chamber sector
1116 AddSpecialOld(clhits);
1120 }//Int_t AliRICHv3::Hits2SDigits(Float_t xhit,Float_t yhit,Float_t eloss, Int_t idvol, ResponseType res)
1121 //__________________________________________________________________________________________________
1122 void AliRICHv3::DiagnosticsFE(Int_t evNumber1,Int_t evNumber2)
1125 Int_t NpadX = 162; // number of pads on X
1126 Int_t NpadY = 162; // number of pads on Y
1128 Int_t Pad[162][162];
1129 for (Int_t i=0;i<NpadX;i++) {
1130 for (Int_t j=0;j<NpadY;j++) {
1135 // Create some histograms
1137 TH1F *pionspectra1 = new TH1F("pionspectra1","Pion Spectra",200,-4,2);
1138 TH1F *pionspectra2 = new TH1F("pionspectra2","Pion Spectra",200,-4,2);
1139 TH1F *pionspectra3 = new TH1F("pionspectra3","Pion Spectra",200,-4,2);
1140 TH1F *protonspectra1 = new TH1F("protonspectra1","Proton Spectra",200,-4,2);
1141 TH1F *protonspectra2 = new TH1F("protonspectra2","Proton Spectra",200,-4,2);
1142 TH1F *protonspectra3 = new TH1F("protonspectra3","Proton Spectra",200,-4,2);
1143 TH1F *kaonspectra1 = new TH1F("kaonspectra1","Kaon Spectra",100,-4,2);
1144 TH1F *kaonspectra2 = new TH1F("kaonspectra2","Kaon Spectra",100,-4,2);
1145 TH1F *kaonspectra3 = new TH1F("kaonspectra3","Kaon Spectra",100,-4,2);
1146 TH1F *electronspectra1 = new TH1F("electronspectra1","Electron Spectra",100,-4,2);
1147 TH1F *electronspectra2 = new TH1F("electronspectra2","Electron Spectra",100,-4,2);
1148 TH1F *electronspectra3 = new TH1F("electronspectra3","Electron Spectra",100,-4,2);
1149 TH1F *muonspectra1 = new TH1F("muonspectra1","Muon Spectra",100,-4,2);
1150 TH1F *muonspectra2 = new TH1F("muonspectra2","Muon Spectra",100,-4,2);
1151 TH1F *muonspectra3 = new TH1F("muonspectra3","Muon Spectra",100,-4,2);
1152 TH1F *neutronspectra1 = new TH1F("neutronspectra1","Neutron Spectra",100,-4,2);
1153 TH1F *neutronspectra2 = new TH1F("neutronspectra2","Neutron Spectra",100,-4,2);
1154 TH1F *neutronspectra3 = new TH1F("neutronspectra2","Neutron Spectra",100,-4,2);
1155 TH1F *chargedspectra1 = new TH1F("chargedspectra1","Charged particles above 1 GeV Spectra",100,-1,3);
1156 TH1F *chargedspectra2 = new TH1F("chargedspectra2","Charged particles above 1 GeV Spectra",100,-1,3);
1157 TH1F *chargedspectra3 = new TH1F("chargedspectra2","Charged particles above 1 GeV Spectra",100,-1,3);
1158 TH1F *pionptspectrafinal = new TH1F("pionptspectrafinal","Primary Pions Transverse Momenta at HMPID",20,0,5);
1159 TH1F *pionptspectravertex = new TH1F("pionptspectravertex","Primary Pions Transverse Momenta at vertex",20,0,5);
1160 TH1F *kaonptspectrafinal = new TH1F("kaonptspectrafinal","Primary Kaons Transverse Momenta at HMPID",20,0,5);
1161 TH1F *kaonptspectravertex = new TH1F("kaonptspectravertex","Primary Kaons Transverse Momenta at vertex",20,0,5);
1162 //TH1F *hitsPhi = new TH1F("hitsPhi","Distribution of phi angle of incidence",100,-180,180);
1163 TH1F *hitsTheta = new TH1F("hitsTheta","Distribution of Theta angle of incidence, all tracks",100,0,50);
1164 TH1F *hitsTheta500MeV = new TH1F("hitsTheta500MeV","Distribution of Theta angle of incidence, 0.5-1 GeV primary tracks",100,0,50);
1165 TH1F *hitsTheta1GeV = new TH1F("hitsTheta1GeV","Distribution of Theta angle of incidence, 1-2 GeV primary tracks",100,0,50);
1166 TH1F *hitsTheta2GeV = new TH1F("hitsTheta2GeV","Distribution of Theta angle of incidence, 2-3 GeV primary tracks",100,0,50);
1167 TH1F *hitsTheta3GeV = new TH1F("hitsTheta3GeV","Distribution of Theta angle of incidence, >3 GeV primary tracks",100,0,50);
1168 TH2F *production = new TH2F("production","Mother production vertices",100,-300,300,100,0,600);
1173 // Start loop over events
1175 Int_t pion=0, kaon=0, proton=0, electron=0, positron=0, neutron=0, highneutrons=0, muon=0;
1176 Int_t chargedpions=0,primarypions=0,highprimarypions=0,chargedkaons=0,primarykaons=0,highprimarykaons=0;
1177 Int_t photons=0, primaryphotons=0, highprimaryphotons=0;
1180 for (int nev=0; nev<= evNumber2; nev++) {
1181 Int_t nparticles = gAlice->GetEvent(nev);
1184 if (nev < evNumber1) continue;
1185 if (nparticles <= 0) return;
1187 // Get pointers to RICH detector and Hits containers
1189 AliRICH *pRICH = (AliRICH *) gAlice->GetDetector("RICH");
1191 TTree *treeH = TreeH();
1192 Int_t ntracks =(Int_t) treeH->GetEntries();
1194 // Start loop on tracks in the hits containers
1196 for (Int_t track=0; track<ntracks;track++) {
1197 printf ("Processing Track: %d\n",track);
1198 gAlice->ResetHits();
1199 treeH->GetEvent(track);
1201 for(AliRICHhit* mHit=(AliRICHhit*)pRICH->FirstHit(-1);
1203 mHit=(AliRICHhit*)pRICH->NextHit())
1205 //Int_t nch = mHit->fChamber; // chamber number
1206 //Float_t x = mHit->X(); // x-pos of hit
1207 //Float_t y = mHit->Z(); // y-pos
1208 //Float_t z = mHit->Y();
1209 //Float_t phi = mHit->Phi(); //Phi angle of incidence
1210 Float_t theta = mHit->Theta(); //Theta angle of incidence
1211 Float_t px = mHit->MomX();
1212 Float_t py = mHit->MomY();
1213 Int_t index = mHit->Track();
1214 Int_t particle = (Int_t)(mHit->Particle());
1219 TParticle *current = gAlice->Particle(index);
1221 //Float_t energy=current->Energy();
1223 R=TMath::Sqrt(current->Vx()*current->Vx() + current->Vy()*current->Vy());
1224 PTfinal=TMath::Sqrt(px*px + py*py);
1225 PTvertex=TMath::Sqrt(current->Px()*current->Px() + current->Py()*current->Py());
1229 if (TMath::Abs(particle) < 10000000)
1231 hitsTheta->Fill(theta,(float) 1);
1234 if (PTvertex>.5 && PTvertex<=1)
1236 hitsTheta500MeV->Fill(theta,(float) 1);
1238 if (PTvertex>1 && PTvertex<=2)
1240 hitsTheta1GeV->Fill(theta,(float) 1);
1242 if (PTvertex>2 && PTvertex<=3)
1244 hitsTheta2GeV->Fill(theta,(float) 1);
1248 hitsTheta3GeV->Fill(theta,(float) 1);
1257 if (TMath::Abs(particle) < 50000051)
1259 //if (TMath::Abs(particle) == 50000050 || TMath::Abs(particle) == 2112)
1260 if (TMath::Abs(particle) == 2112 || TMath::Abs(particle) == 50000050)
1262 //gMC->Rndm(&random, 1);
1263 if (random->Rndm() < .1)
1264 production->Fill(current->Vz(),R,(float) 1);
1265 if (TMath::Abs(particle) == 50000050)
1266 //if (TMath::Abs(particle) > 50000000)
1272 if (current->Energy()>0.001)
1273 highprimaryphotons +=1;
1276 if (TMath::Abs(particle) == 2112)
1279 if (current->Energy()>0.0001)
1283 if (TMath::Abs(particle) < 50000000)
1285 production->Fill(current->Vz(),R,(float) 1);
1287 //mip->Fill(x,y,(float) 1);
1290 if (TMath::Abs(particle)==211 || TMath::Abs(particle)==111)
1294 pionptspectravertex->Fill(PTvertex,(float) 1);
1295 pionptspectrafinal->Fill(PTfinal,(float) 1);
1299 if (TMath::Abs(particle)==321 || TMath::Abs(particle)==130 || TMath::Abs(particle)==310
1300 || TMath::Abs(particle)==311)
1304 kaonptspectravertex->Fill(PTvertex,(float) 1);
1305 kaonptspectrafinal->Fill(PTfinal,(float) 1);
1310 if (TMath::Abs(particle)==211 || TMath::Abs(particle)==111)
1312 pionspectra1->Fill(TMath::Log10(current->Energy() - current->GetCalcMass()),(float) 1);
1313 if (current->Vx()>5 && current->Vy()>5 && current->Vz()>5)
1314 pionspectra2->Fill(TMath::Log10(current->Energy() - current->GetCalcMass()),(float) 1);
1317 pionspectra3->Fill(TMath::Log10(current->Energy() - current->GetCalcMass()),(float) 1);
1320 if (TMath::Abs(particle)==211)
1326 if (current->Energy()>1)
1327 highprimarypions +=1;
1331 if (TMath::Abs(particle)==2212)
1333 protonspectra1->Fill(TMath::Log10(current->Energy() - current->GetCalcMass()),(float) 1);
1334 //ptspectra->Fill(Pt,(float) 1);
1335 if (current->Vx()>5 && current->Vy()>5 && current->Vz()>5)
1336 protonspectra2->Fill(TMath::Log10(current->Energy() - current->GetCalcMass()),(float) 1);
1338 protonspectra3->Fill(TMath::Log10(current->Energy() - current->GetCalcMass()),(float) 1);
1341 if (TMath::Abs(particle)==321 || TMath::Abs(particle)==130 || TMath::Abs(particle)==310
1342 || TMath::Abs(particle)==311)
1344 kaonspectra1->Fill(TMath::Log10(current->Energy() - current->GetCalcMass()),(float) 1);
1345 //ptspectra->Fill(Pt,(float) 1);
1346 if (current->Vx()>5 && current->Vy()>5 && current->Vz()>5)
1347 kaonspectra2->Fill(TMath::Log10(current->Energy() - current->GetCalcMass()),(float) 1);
1349 kaonspectra3->Fill(TMath::Log10(current->Energy() - current->GetCalcMass()),(float) 1);
1351 if (TMath::Abs(particle)==321)
1357 if (current->Energy()>1)
1358 highprimarykaons +=1;
1362 if (TMath::Abs(particle)==11)
1364 electronspectra1->Fill(TMath::Log10(current->Energy() - current->GetCalcMass()),(float) 1);
1365 //ptspectra->Fill(Pt,(float) 1);
1366 if (current->Vx()>5 && current->Vy()>5 && current->Vz()>5)
1367 electronspectra2->Fill(TMath::Log10(current->Energy() - current->GetCalcMass()),(float) 1);
1369 electronspectra3->Fill(TMath::Log10(current->Energy() - current->GetCalcMass()),(float) 1);
1372 if (particle == -11)
1375 if (TMath::Abs(particle)==13)
1377 muonspectra1->Fill(TMath::Log10(current->Energy() - current->GetCalcMass()),(float) 1);
1378 //ptspectra->Fill(Pt,(float) 1);
1379 if (current->Vx()>5 && current->Vy()>5 && current->Vz()>5)
1380 muonspectra2->Fill(TMath::Log10(current->Energy() - current->GetCalcMass()),(float) 1);
1382 muonspectra3->Fill(TMath::Log10(current->Energy() - current->GetCalcMass()),(float) 1);
1385 if (TMath::Abs(particle)==2112)
1387 neutronspectra1->Fill(TMath::Log10(current->Energy() - current->GetCalcMass()),(float) 1);
1388 //ptspectra->Fill(Pt,(float) 1);
1389 if (current->Vx()>5 && current->Vy()>5 && current->Vz()>5)
1390 neutronspectra2->Fill(TMath::Log10(current->Energy() - current->GetCalcMass()),(float) 1);
1393 neutronspectra3->Fill(TMath::Log10(current->Energy() - current->GetCalcMass()),(float) 1);
1397 if(TMath::Abs(particle)==211 || TMath::Abs(particle)==2212 || TMath::Abs(particle)==321)
1399 if (current->Energy()-current->GetCalcMass()>1)
1401 chargedspectra1->Fill(TMath::Log10(current->Energy() - current->GetCalcMass()),(float) 1);
1402 if (current->Vx()>5 && current->Vy()>5 && current->Vz()>5)
1403 chargedspectra2->Fill(TMath::Log10(current->Energy() - current->GetCalcMass()),(float) 1);
1405 chargedspectra3->Fill(TMath::Log10(current->Energy() - current->GetCalcMass()),(float) 1);
1408 // Fill the histograms
1410 //h->Fill(x,y,(float) 1);
1420 TStyle *mystyle=new TStyle("Plain","mystyle");
1421 mystyle->SetPalette(1,0);
1424 //Create canvases, set the view range, show histograms
1426 TCanvas *c2 = new TCanvas("c2","Angles of incidence",150,150,100,150);
1428 //c2->SetFillColor(42);
1431 hitsTheta500MeV->SetFillColor(5);
1432 hitsTheta500MeV->Draw();
1434 hitsTheta1GeV->SetFillColor(5);
1435 hitsTheta1GeV->Draw();
1437 hitsTheta2GeV->SetFillColor(5);
1438 hitsTheta2GeV->Draw();
1440 hitsTheta3GeV->SetFillColor(5);
1441 hitsTheta3GeV->Draw();
1445 TCanvas *c15 = new TCanvas("c15","Mothers Production Vertices",50,50,600,600);
1447 production->SetFillColor(42);
1448 production->SetXTitle("z (m)");
1449 production->SetYTitle("R (m)");
1452 TCanvas *c10 = new TCanvas("c10","Pt Spectra",50,50,600,700);
1455 pionptspectravertex->SetFillColor(5);
1456 pionptspectravertex->SetXTitle("Pt (GeV)");
1457 pionptspectravertex->Draw();
1459 pionptspectrafinal->SetFillColor(5);
1460 pionptspectrafinal->SetXTitle("Pt (GeV)");
1461 pionptspectrafinal->Draw();
1463 kaonptspectravertex->SetFillColor(5);
1464 kaonptspectravertex->SetXTitle("Pt (GeV)");
1465 kaonptspectravertex->Draw();
1467 kaonptspectrafinal->SetFillColor(5);
1468 kaonptspectrafinal->SetXTitle("Pt (GeV)");
1469 kaonptspectrafinal->Draw();
1472 TCanvas *c16 = new TCanvas("c16","Particles Spectra II",150,150,600,350);
1476 //TCanvas *c13 = new TCanvas("c13","Electron Spectra",400,10,600,700);
1477 electronspectra1->SetFillColor(5);
1478 electronspectra1->SetXTitle("log(GeV)");
1479 electronspectra2->SetFillColor(46);
1480 electronspectra2->SetXTitle("log(GeV)");
1481 electronspectra3->SetFillColor(10);
1482 electronspectra3->SetXTitle("log(GeV)");
1484 electronspectra1->Draw();
1485 electronspectra2->Draw("same");
1486 electronspectra3->Draw("same");
1489 //TCanvas *c14 = new TCanvas("c14","Muon Spectra",400,10,600,700);
1490 muonspectra1->SetFillColor(5);
1491 muonspectra1->SetXTitle("log(GeV)");
1492 muonspectra2->SetFillColor(46);
1493 muonspectra2->SetXTitle("log(GeV)");
1494 muonspectra3->SetFillColor(10);
1495 muonspectra3->SetXTitle("log(GeV)");
1497 muonspectra1->Draw();
1498 muonspectra2->Draw("same");
1499 muonspectra3->Draw("same");
1502 //TCanvas *c16 = new TCanvas("c16","Neutron Spectra",400,10,600,700);
1503 //neutronspectra1->SetFillColor(42);
1504 //neutronspectra1->SetXTitle("log(GeV)");
1505 //neutronspectra2->SetFillColor(46);
1506 //neutronspectra2->SetXTitle("log(GeV)");
1507 //neutronspectra3->SetFillColor(10);
1508 //neutronspectra3->SetXTitle("log(GeV)");
1510 //neutronspectra1->Draw();
1511 //neutronspectra2->Draw("same");
1512 //neutronspectra3->Draw("same");
1514 TCanvas *c9 = new TCanvas("c9","Particles Spectra",150,150,600,700);
1515 //TCanvas *c9 = new TCanvas("c9","Pion Spectra",400,10,600,700);
1519 pionspectra1->SetFillColor(5);
1520 pionspectra1->SetXTitle("log(GeV)");
1521 pionspectra2->SetFillColor(46);
1522 pionspectra2->SetXTitle("log(GeV)");
1523 pionspectra3->SetFillColor(10);
1524 pionspectra3->SetXTitle("log(GeV)");
1526 pionspectra1->Draw();
1527 pionspectra2->Draw("same");
1528 pionspectra3->Draw("same");
1531 //TCanvas *c10 = new TCanvas("c10","Proton Spectra",400,10,600,700);
1532 protonspectra1->SetFillColor(5);
1533 protonspectra1->SetXTitle("log(GeV)");
1534 protonspectra2->SetFillColor(46);
1535 protonspectra2->SetXTitle("log(GeV)");
1536 protonspectra3->SetFillColor(10);
1537 protonspectra3->SetXTitle("log(GeV)");
1539 protonspectra1->Draw();
1540 protonspectra2->Draw("same");
1541 protonspectra3->Draw("same");
1544 //TCanvas *c11 = new TCanvas("c11","Kaon Spectra",400,10,600,700);
1545 kaonspectra1->SetFillColor(5);
1546 kaonspectra1->SetXTitle("log(GeV)");
1547 kaonspectra2->SetFillColor(46);
1548 kaonspectra2->SetXTitle("log(GeV)");
1549 kaonspectra3->SetFillColor(10);
1550 kaonspectra3->SetXTitle("log(GeV)");
1552 kaonspectra1->Draw();
1553 kaonspectra2->Draw("same");
1554 kaonspectra3->Draw("same");
1557 //TCanvas *c12 = new TCanvas("c12","Charged Particles Spectra",400,10,600,700);
1558 chargedspectra1->SetFillColor(5);
1559 chargedspectra1->SetXTitle("log(GeV)");
1560 chargedspectra2->SetFillColor(46);
1561 chargedspectra2->SetXTitle("log(GeV)");
1562 chargedspectra3->SetFillColor(10);
1563 chargedspectra3->SetXTitle("log(GeV)");
1565 chargedspectra1->Draw();
1566 chargedspectra2->Draw("same");
1567 chargedspectra3->Draw("same");
1571 printf("*****************************************\n");
1572 printf("* Particle * Counts *\n");
1573 printf("*****************************************\n");
1575 printf("* Pions: * %4d *\n",pion);
1576 printf("* Charged Pions: * %4d *\n",chargedpions);
1577 printf("* Primary Pions: * %4d *\n",primarypions);
1578 printf("* Primary Pions (p>1GeV/c): * %4d *\n",highprimarypions);
1579 printf("* Kaons: * %4d *\n",kaon);
1580 printf("* Charged Kaons: * %4d *\n",chargedkaons);
1581 printf("* Primary Kaons: * %4d *\n",primarykaons);
1582 printf("* Primary Kaons (p>1GeV/c): * %4d *\n",highprimarykaons);
1583 printf("* Muons: * %4d *\n",muon);
1584 printf("* Electrons: * %4d *\n",electron);
1585 printf("* Positrons: * %4d *\n",positron);
1586 printf("* Protons: * %4d *\n",proton);
1587 printf("* All Charged: * %4d *\n",(chargedpions+chargedkaons+muon+electron+positron+proton));
1588 printf("*****************************************\n");
1589 //printf("* Photons: * %3.1f *\n",photons);
1590 //printf("* Primary Photons: * %3.1f *\n",primaryphotons);
1591 //printf("* Primary Photons (p>1MeV/c):* %3.1f *\n",highprimaryphotons);
1592 //printf("*****************************************\n");
1593 //printf("* Neutrons: * %3.1f *\n",neutron);
1594 //printf("* Neutrons (p>100keV/c): * %3.1f *\n",highneutrons);
1595 //printf("*****************************************\n");
1597 if (gAlice->TreeD())
1599 gAlice->TreeD()->GetEvent(0);
1604 printf("\n*****************************************\n");
1605 printf("* Chamber * Digits * Occupancy *\n");
1606 printf("*****************************************\n");
1608 for (Int_t ich=0;ich<7;ich++)
1610 TClonesArray *Digits = DigitsAddress(ich); // Raw clusters branch
1611 Int_t ndigits = Digits->GetEntriesFast();
1612 occ[ich] = Float_t(ndigits)/(160*144);
1613 sum += Float_t(ndigits)/(160*144);
1614 printf("* %d * %d * %3.1f%% *\n",ich,ndigits,occ[ich]*100);
1617 printf("*****************************************\n");
1618 printf("* Mean occupancy * %3.1f%% *\n",mean*100);
1619 printf("*****************************************\n");
1622 printf("\nEnd of analysis\n");
1624 }//void AliRICHv3::DiagnosticsFE(Int_t evNumber1,Int_t evNumber2)
1625 //__________________________________________________________________________________________________