1 /////////////////////////////////////////////////////////
2 // Manager and hits classes for set:RICH version 0 //
3 /////////////////////////////////////////////////////////
13 #include "AliCallf77.h"
19 //___________________________________________
20 AliRICHv0::AliRICHv0() : AliRICH()
25 //___________________________________________
26 AliRICHv0::AliRICHv0(const char *name, const char *title)
30 fChambers = new TObjArray(7);
31 for (Int_t i=0; i<7; i++) {
33 (*fChambers)[i] = new AliRICHchamber();
39 //___________________________________________
40 void AliRICHv0::CreateGeometry()
43 // Create the geometry for RICH version 1
45 // Modified by: N. Colonna (INFN - BARI, Nicola.Colonna@ba.infn.it)
46 // R.A. Fini (INFN - BARI, Rosanna.Fini@ba.infn.it)
47 // R.A. Loconsole (Bari University, loco@riscom.ba.infn.it)
51 <img src="picts/AliRICHv1.gif">
56 <img src="picts/AliRICHv1Tree.gif">
61 Int_t *idtmed = fIdtmed->GetArray()-999;
68 // --- Define the RICH detector
69 // External aluminium box
73 gMC->Gsvolu("RICH", "BOX ", idtmed[1009], par, 3);
75 // Sensitive part of the whole RICH
79 gMC->Gsvolu("SRIC", "BOX ", idtmed[1000], par, 3);
85 gMC->Gsvolu("HONE", "BOX ", idtmed[1001], par, 3);
91 gMC->Gsvolu("ALUM", "BOX ", idtmed[1009], par, 3);
97 gMC->Gsvolu("QUAR", "BOX ", idtmed[1002], par, 3);
99 // Spacers (cylinders)
103 gMC->Gsvolu("SPAC", "TUBE", idtmed[1002], par, 3);
109 gMC->Gsvolu("OQUA", "BOX ", idtmed[1007], par, 3);
111 // Frame of opaque quartz
115 gMC->Gsvolu("OQUF", "BOX ", idtmed[1007], par, 3);
117 // Little bar of opaque quartz
121 gMC->Gsvolu("BARR", "BOX ", idtmed[1007], par, 3);
127 gMC->Gsvolu("FREO", "BOX ", idtmed[1003], par, 3);
133 gMC->Gsvolu("META", "BOX ", idtmed[1004], par, 3);
139 gMC->Gsvolu("GAP ", "BOX ", idtmed[1008], par, 3);
145 gMC->Gsvolu("CSI ", "BOX ", idtmed[1005], par, 3);
151 gMC->Gsvolu("GRID", "TUBE", idtmed[1006], par, 3);
153 // --- Places the detectors defined with GSVOLU
154 // Place material inside RICH
155 gMC->Gspos("SRIC", 1, "RICH", 0., 0., 0., 0, "ONLY");
157 gMC->Gspos("ALUM", 1, "SRIC", 0., -6.075, 0., 0, "ONLY");
158 gMC->Gspos("HONE", 1, "SRIC", 0., -5.862, 0., 0, "ONLY");
159 gMC->Gspos("ALUM", 2, "SRIC", 0., -5.649, 0., 0, "ONLY");
160 gMC->Gspos("OQUA", 1, "SRIC", 0., -5.424, 0., 0, "ONLY");
162 AliMatrix(idrotm[1019], 0., 0., 90., 0., 90., 90.);
164 for (i = 1; i <= 9; ++i) {
166 gMC->Gspos("SPAC", i, "FREO", 6.7, 0., zs, idrotm[1019], "ONLY");
168 for (i = 10; i <= 18; ++i) {
169 zs = (14 - i) * 14.4;
170 gMC->Gspos("SPAC", i, "FREO", -6.7, 0., zs, idrotm[1019], "ONLY");
173 gMC->Gspos("FREO", 1, "OQUF", 0., 0., 0., 0, "ONLY");
174 gMC->Gspos("OQUF", 1, "SRIC", 41.3, -4.724, 0., 0, "ONLY");
175 gMC->Gspos("OQUF", 2, "SRIC", 0., -4.724, 0., 0, "ONLY");
176 gMC->Gspos("OQUF", 3, "SRIC", -41.3, -4.724, 0., 0, "ONLY");
177 gMC->Gspos("BARR", 1, "QUAR", 0., 0., -21.65, 0, "ONLY");
178 gMC->Gspos("BARR", 2, "QUAR", 0., 0., 21.65, 0, "ONLY");
179 gMC->Gspos("QUAR", 1, "SRIC", 0., -3.974, 0., 0, "ONLY");
180 gMC->Gspos("GAP ", 1, "META", 0., 4.8, 0., 0, "ONLY");
181 gMC->Gspos("META", 1, "SRIC", 0., 1.276, 0., 0, "ONLY");
182 gMC->Gspos("CSI ", 1, "SRIC", 0., 6.526, 0., 0, "ONLY");
184 // Place RICH inside ALICE apparatus
186 AliMatrix(idrotm[1000], 90., 0., 70.69, 90., 19.31, -90.);
187 AliMatrix(idrotm[1001], 90., -20., 90., 70., 0., 0.);
188 AliMatrix(idrotm[1002], 90., 0., 90., 90., 0., 0.);
189 AliMatrix(idrotm[1003], 90., 20., 90., 110., 0., 0.);
190 AliMatrix(idrotm[1004], 90., 340., 108.2, 70., 18.2, 70.);
191 AliMatrix(idrotm[1005], 90., 0., 109.31, 90., 19.31, 90.);
192 AliMatrix(idrotm[1006], 90., 20., 108.2, 110., 18.2, 110.);
194 gMC->Gspos("RICH", 1, "ALIC", 0., 471.9, 165.26, idrotm[1000], "ONLY");
195 gMC->Gspos("RICH", 2, "ALIC", 171., 470., 0., idrotm[1001], "ONLY");
196 gMC->Gspos("RICH", 3, "ALIC", 0., 500., 0., idrotm[1002], "ONLY");
197 gMC->Gspos("RICH", 4, "ALIC", -171., 470., 0., idrotm[1003], "ONLY");
198 gMC->Gspos("RICH", 5, "ALIC", 161.4, 443.4, -165.3, idrotm[1004], "ONLY");
199 gMC->Gspos("RICH", 6, "ALIC", 0., 471.9, -165.3, idrotm[1005], "ONLY");
200 gMC->Gspos("RICH", 7, "ALIC", -161.4, 443.4, -165.3, idrotm[1006], "ONLY");
205 //___________________________________________
206 void AliRICHv0::CreateMaterials()
209 // *** DEFINITION OF AVAILABLE RICH MATERIALS ***
210 // ORIGIN : NICK VAN EIJNDHOVEN
211 // Modified by: N. Colonna (INFN - BARI, Nicola.Colonna@ba.infn.it)
212 // R.A. Fini (INFN - BARI, Rosanna.Fini@ba.infn.it)
213 // R.A. Loconsole (Bari University, loco@riscom.ba.infn.it)
215 Int_t ISXFLD = gAlice->Field()->Integ();
216 Float_t SXMGMX = gAlice->Field()->Max();
218 Float_t ppckov[14] = { 5.63e-9,5.77e-9,5.9e-9,6.05e-9,6.2e-9,6.36e-9,6.52e-9,
219 6.7e-9,6.88e-9,7.08e-9,7.3e-9,7.51e-9,7.74e-9,8e-9 };
220 Float_t rindex_quarz[14] = { 1.528309,1.533333,
221 1.538243,1.544223,1.550568,1.55777,
222 1.565463,1.574765,1.584831,1.597027,
223 1.611858,1.6277,1.6472,1.6724 };
224 Float_t rindex_quarzo[14] = { 1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1. };
225 Float_t rindex_methane[14] = { 1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1. };
226 Float_t rindex_gri[14] = { 1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1. };
227 Float_t absco_freon[14] = { 179.0987,179.0987,
228 179.0987,179.0987,179.0987,35.7,12.54,5.92,4.92,3.86,1.42,.336,.134,0. };
229 Float_t absco_quarz[14] = { 20.126,16.27,13.49,11.728,9.224,8.38,7.44,7.17,
230 6.324,4.483,1.6,.323,.073,0. };
231 Float_t absco_quarzo[14] = { 1e-5,1e-5,1e-5,1e-5,1e-5,1e-5,1e-5,1e-5,1e-5,
232 1e-5,1e-5,1e-5,1e-5,1e-5 };
233 Float_t absco_csi[14] = { 1e-4,1e-4,1e-4,1e-4,1e-4,1e-4,1e-4,1e-4,1e-4,1e-4,
234 1e-4,1e-4,1e-4,1e-4 };
235 Float_t absco_methane[14] = { 1e6,1e6,1e6,1e6,1e6,1e6,1e6,1e6,1e6,1e6,1e6,
237 Float_t absco_gri[14] = { 1e-4,1e-4,1e-4,1e-4,1e-4,1e-4,1e-4,1e-4,1e-4,1e-4,
238 1e-4,1e-4,1e-4,1e-4 };
239 Float_t effic_all[14] = { 1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1. };
240 Float_t effic_csi[14] = { 4.74e-4,.00438,.009,.0182,.0282,.0653,.1141,.163,
241 .2101,.2554,.293,.376,.3861,.418 };
242 Float_t effic_gri[14] = { 1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1. };
244 Float_t afre[2], agri, amet[2], aqua[2], ahon, zfre[2], zgri, zhon,
248 Int_t nlmatmet, nlmatqua;
249 Float_t wmatquao[2], rindex_freon[14];
251 Float_t aquao[2], epsil, stmin, zquao[2];
253 Float_t radlal, densal, tmaxfd, deemax, stemax;
254 Float_t aal, zal, radlgri, densfre, radlhon, densgri, denshon,densqua, densmet, wmatfre[2], wmatmet[2], wmatqua[2];
256 Int_t *idtmed = fIdtmed->GetArray()-999;
258 TGeant3 *geant3 = (TGeant3*) gMC;
260 // --- Photon energy (GeV)
261 // --- Refraction indexes
262 for (i = 0; i < 14; ++i) {
263 rindex_freon[i] = ppckov[i] * .01095 * 1e9 + 1.2177;
265 // need to be changed
267 // --- Absorbtion lenghts (in cm)
268 // DATA ABSCO_QUARZ /
270 // & 29.85, 7.34, 4.134, 1.273, 0.722,
271 // & 0.365, 0.365, 0.365, 0. /
272 // need to be changed
274 // --- Detection efficiencies (quantum efficiency for CsI)
275 // --- Define parameters for honeycomb.
276 // Used carbon of equivalent rad. lenght
283 // --- Parameters to include in GSMIXT, relative to Quarz (SiO2)
294 // --- Parameters to include in GSMIXT, relative to opaque Quarz (SiO2)
305 // --- Parameters to include in GSMIXT, relative to Freon (C6F14)
316 // --- Parameters to include in GSMIXT, relative to methane (CH4)
327 // --- Parameters to include in GSMIXT, relative to anode grid (Cu)
334 // --- Parameters to include in GSMATE related to aluminium sheet
341 AliMaterial(1, "Air $", 14.61, 7.3, .001205, 30420., 67500);
342 AliMaterial(6, "HON", ahon, zhon, denshon, radlhon, 0);
343 AliMaterial(16, "CSI", ahon, zhon, denshon, radlhon, 0);
344 AliMixture(20, "QUA", aqua, zqua, densqua, nlmatqua, wmatqua);
345 AliMixture(21, "QUAO", aquao, zquao, densquao, nlmatquao, wmatquao);
346 AliMixture(30, "FRE", afre, zfre, densfre, nlmatfre, wmatfre);
347 AliMixture(40, "MET", amet, zmet, densmet, nlmatmet, wmatmet);
348 AliMixture(41, "METG", amet, zmet, densmet, nlmatmet, wmatmet);
349 AliMaterial(11, "GRI", agri, zgri, densgri, radlgri, 0);
350 AliMaterial(50, "ALUM", aal, zal, densal, radlal, 0);
358 AliMedium(1, "DEFAULT MEDIUM AIR$", 1, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
359 AliMedium(2, "HONEYCOMB$", 6, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
360 AliMedium(3, "QUARZO$", 20, 1, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
361 AliMedium(4, "FREON$", 30, 1, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
362 AliMedium(5, "METANO$", 40, 1, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
363 AliMedium(6, "CSI$", 16, 1, ISXFLD, SXMGMX,tmaxfd, stemax, deemax, epsil, stmin);
364 AliMedium(7, "GRIGLIA$", 11, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
365 AliMedium(8, "QUARZOO$", 21, 1, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
366 AliMedium(9, "GAP$", 41, 1, ISXFLD, SXMGMX,tmaxfd, .1, -deemax, epsil, -stmin);
367 AliMedium(10, "ALUMINUM$", 50, 1, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
370 // Switch on delta-ray production in the methane and freon gaps
372 gMC->Gstpar(idtmed[1002], "LOSS", 1.);
373 gMC->Gstpar(idtmed[1003], "LOSS", 1.);
374 gMC->Gstpar(idtmed[1004], "LOSS", 1.);
375 gMC->Gstpar(idtmed[1008], "LOSS", 1.);
376 gMC->Gstpar(idtmed[1005], "LOSS", 1.);
377 gMC->Gstpar(idtmed[1002], "HADR", 1.);
378 gMC->Gstpar(idtmed[1003], "HADR", 1.);
379 gMC->Gstpar(idtmed[1004], "HADR", 1.);
380 gMC->Gstpar(idtmed[1008], "HADR", 1.);
381 gMC->Gstpar(idtmed[1005], "HADR", 1.);
382 gMC->Gstpar(idtmed[1002], "DCAY", 1.);
383 gMC->Gstpar(idtmed[1003], "DCAY", 1.);
384 gMC->Gstpar(idtmed[1004], "DCAY", 1.);
385 gMC->Gstpar(idtmed[1008], "DCAY", 1.);
386 gMC->Gstpar(idtmed[1005], "DCAY", 1.);
387 geant3->Gsckov(idtmed[1000], 14, ppckov, absco_methane, effic_all, rindex_methane);
388 geant3->Gsckov(idtmed[1001], 14, ppckov, absco_methane, effic_all, rindex_methane);
389 geant3->Gsckov(idtmed[1002], 14, ppckov, absco_quarz, effic_all,rindex_quarz);
390 geant3->Gsckov(idtmed[1003], 14, ppckov, absco_freon, effic_all,rindex_freon);
391 geant3->Gsckov(idtmed[1004], 14, ppckov, absco_methane, effic_all, rindex_methane);
392 geant3->Gsckov(idtmed[1005], 14, ppckov, absco_csi, effic_csi, rindex_methane);
393 geant3->Gsckov(idtmed[1006], 14, ppckov, absco_gri, effic_gri, rindex_gri);
394 geant3->Gsckov(idtmed[1007], 14, ppckov, absco_quarzo, effic_all, rindex_quarzo);
395 geant3->Gsckov(idtmed[1008], 14, ppckov, absco_methane, effic_all, rindex_methane);
396 geant3->Gsckov(idtmed[1009], 14, ppckov, absco_gri, effic_gri, rindex_gri);
399 //___________________________________________
401 void AliRICHv0::Init()
403 printf("\n\n\n Start Init for version 0 - CPC chamber type \n\n\n");
406 // Initialize Tracking Chambers
408 for (Int_t i=0; i<7; i++) {
409 ( (AliRICHchamber*) (*fChambers)[i])->Init();
413 // Set the chamber (sensitive region) GEANT identifier
415 ((AliRICHchamber*)(*fChambers)[0])->SetGid(1);
416 ((AliRICHchamber*)(*fChambers)[1])->SetGid(2);
417 ((AliRICHchamber*)(*fChambers)[2])->SetGid(3);
418 ((AliRICHchamber*)(*fChambers)[3])->SetGid(4);
419 ((AliRICHchamber*)(*fChambers)[4])->SetGid(5);
420 ((AliRICHchamber*)(*fChambers)[5])->SetGid(6);
421 ((AliRICHchamber*)(*fChambers)[6])->SetGid(7);
423 printf("\n\n\n Finished Init for version 0 - CPC chamber type\n\n\n");
426 //___________________________________________
427 void AliRICHv0::StepManager()
433 static Float_t hits[9];
434 TLorentzVector Position;
435 TLorentzVector Momentum;
440 Float_t Localtheta,Localphi;
442 Float_t destep, step;
443 static Float_t eloss, xhit, yhit, tlength;
444 const Float_t big=1.e10;
446 TClonesArray &lhits = *fHits;
447 TClonesArray &lcerenkovs = *fCerenkovs;
449 // Only gas gap inside chamber
450 // Tag chambers and record hits when track enters
453 id=gMC->CurrentVolID(copy);
454 Float_t cherenkov_loss=0.00001;
456 // Treat photons produced in Freon and Quartz
457 if (gMC->TrackPid() == 50000050 ) {
458 if (gMC->IsTrackEntering()){
459 if (gMC->VolId("FREO")==gMC->CurrentVolID(copy) || gMC->VolId("QUAR")==gMC->CurrentVolID(copy)){
460 //printf("GOT ONE! Type:%d \n",gMC->TrackPid());
466 if (gMC->TrackPid() == 50000050 ) {
467 if (gMC->VolId("CSI ")==gMC->CurrentVolID(copy))
469 if (gMC->Edep() > 0.){
470 gMC->TrackPosition(Position);
471 gMC->TrackMomentum(Momentum);
479 Double_t tc = mom[0]*mom[0]+mom[1]*mom[1];
480 Double_t rt = TMath::Sqrt(tc);
481 theta = Float_t(TMath::ATan2(rt,Double_t(mom[2])))*kRaddeg;
482 phi = Float_t(TMath::ATan2(Double_t(mom[1]),Double_t(mom[0])))*kRaddeg;
483 gMC->Gmtod(pos,Localpos,1);
484 gMC->Gmtod(mom,Localmom,2);
486 gMC->CurrentVolOffID(2,copy);
490 ((AliRICHchamber*) (*fChambers)[idvol])
491 ->SigGenInit(Localpos[0], Localpos[2], Localpos[1]);
493 hits[0] = 50000050; // particle type
494 hits[1] = pos[0]; // X-position for hit
495 hits[2] = pos[1]; // Y-position for hit
496 hits[3] = pos[2]; // Z-position for hit
497 hits[4] = theta; // theta angle of incidence
498 hits[5] = phi; // phi angle of incidence
499 hits[8] = (Float_t) fNclusters; // first padhit
500 hits[9] = -1; // last pad hit
502 MakePadHits(Localpos[0],Localpos[2],cherenkov_loss,idvol,cerenkov);
503 if (fNclusters > (Int_t)hits[8]) {
505 hits[9]= (Float_t) fNclusters;
508 AddHit(gAlice->CurrentTrack(),vol,hits);
509 new(lcerenkovs[fNcerenkovs++]) AliRICHCerenkov(fIshunt,gAlice->CurrentTrack(),vol,hits);
517 // treat charged particles
518 } else if (gMC->TrackCharge())
522 if (gMC->VolId("GAP ")== gMC->CurrentVolID(copy)) {
523 // Get current particle id (ipart), track position (pos) and momentum (mom)
525 gMC->CurrentVolOffID(3,copy);
529 gMC->TrackPosition(Position);
530 gMC->TrackMomentum(Momentum);
538 gMC->Gmtod(pos,Localpos,1);
539 gMC->Gmtod(mom,Localmom,2);
541 ipart = gMC->TrackPid();
543 // momentum loss and steplength in last step
544 destep = gMC->Edep();
545 step = gMC->TrackStep();
548 // record hits when track enters ...
549 if( gMC->IsTrackEntering()) {
550 gMC->SetMaxStep(fMaxStepGas);
551 Double_t tc = mom[0]*mom[0]+mom[1]*mom[1];
552 Double_t rt = TMath::Sqrt(tc);
553 theta = Float_t(TMath::ATan2(rt,Double_t(mom[2])))*kRaddeg;
554 phi = Float_t(TMath::ATan2(Double_t(mom[1]),Double_t(mom[0])))*kRaddeg;
556 Localtheta = Float_t(TMath::ATan2(rt,Double_t(Localmom[2])))*kRaddeg;
557 Localphi = Float_t(TMath::ATan2(Double_t(Localmom[1]),Double_t(Localmom[0])))*kRaddeg;
559 hits[0] = Float_t(ipart); // particle type
560 hits[1] = pos[0]; // X-position for hit
561 hits[2] = pos[1]; // Y-position for hit
562 hits[3] = pos[2]; // Z-position for hit
563 hits[4] = theta; // theta angle of incidence
564 hits[5] = phi; // phi angle of incidence
565 hits[8] = (Float_t) fNclusters; // first padhit
566 hits[9] = -1; // last pad hit
567 // phi angle of incidence
571 Chamber(idvol).LocaltoGlobal(Localpos,hits+1);
573 //To make chamber coordinates x-y had to pass LocalPos[0], LocalPos[2]
576 // Only if not trigger chamber
579 // Initialize hit position (cursor) in the segmentation model
580 ((AliRICHchamber*) (*fChambers)[idvol])
581 ->SigGenInit(Localpos[0], Localpos[2], Localpos[1]);
586 // Calculate the charge induced on a pad (disintegration) in case
588 // Mip left chamber ...
589 if( gMC->IsTrackExiting() || gMC->IsTrackStop() || gMC->IsTrackDisappeared()){
590 gMC->SetMaxStep(big);
596 // Only if not trigger chamber
598 if (eloss > 0) MakePadHits(xhit,yhit,eloss,idvol,mip);
603 if (fNclusters > (Int_t)hits[8]) {
605 hits[9]= (Float_t) fNclusters;
609 AliRICHhit(fIshunt,gAlice->CurrentTrack(),vol,hits);
612 // Check additional signal generation conditions
613 // defined by the segmentation
614 // model (boundary crossing conditions)
616 (((AliRICHchamber*) (*fChambers)[idvol])
617 ->SigGenCond(Localpos[0], Localpos[2], Localpos[1]))
619 ((AliRICHchamber*) (*fChambers)[idvol])
620 ->SigGenInit(Localpos[0], Localpos[2], Localpos[1]);
621 if (eloss > 0) MakePadHits(xhit,yhit,eloss,idvol,mip);
627 // nothing special happened, add up energy loss
637 //___________________________________________
638 void AliRICH::MakePadHits(Float_t xhit,Float_t yhit,Float_t eloss, Int_t idvol, Response_t res)
641 // Calls the charge disintegration method of the current chamber and adds
642 // the simulated cluster to the root treee
645 Float_t newclust[6][500];
649 // Integrated pulse height on chamber
653 ((AliRICHchamber*) (*fChambers)[idvol])->DisIntegration(eloss, xhit, yhit, nnew, newclust, res);
658 for (Int_t i=0; i<nnew; i++) {
659 if (Int_t(newclust[3][i]) > 0) {
662 clhits[1] = Int_t(newclust[5][i]);
664 clhits[2] = Int_t(newclust[0][i]);
666 clhits[3] = Int_t(newclust[1][i]);
668 clhits[4] = Int_t(newclust[2][i]);
670 clhits[5] = Int_t(newclust[3][i]);
671 // Pad: chamber sector
672 clhits[6] = Int_t(newclust[4][i]);
679 ClassImp(AliRICHchamber)
681 AliRICHchamber::AliRICHchamber()
683 fSegmentation = new TObjArray(2);
684 fResponse= new TObjArray(2);
691 // Get reference to response model
692 AliRICHresponse* AliRICHchamber::GetResponseModel(Response_t res)
695 return (AliRICHresponse*) (*fResponse)[0];
696 } else if (res==cerenkov) {
697 return (AliRICHresponse*) (*fResponse)[1];
699 return (AliRICHresponse*) (*fResponse)[0];
702 // Configure response model
703 void AliRICHchamber::ResponseModel(Response_t res, AliRICHresponse* thisResponse)
707 (*fResponse)[0]=thisResponse;
708 } else if (res==cerenkov) {
709 (*fResponse)[1]=thisResponse;
713 void AliRICHchamber::Init()
716 ((AliRICHsegmentation *) (*fSegmentation)[0])->Init(this);
718 ((AliRICHsegmentation *) (*fSegmentation)[1])->Init(this);
722 void AliRICHchamber::LocaltoGlobal(Float_t pos[3],Float_t Localpos[3])
726 fMatrix = fChamberMatrix->GetMatrix();
727 Localpos[0]=pos[0]*fMatrix[0]+pos[1]*fMatrix[3]+pos[2]*fMatrix[6];
728 Localpos[1]=pos[0]*fMatrix[1]+pos[1]*fMatrix[4]+pos[2]*fMatrix[7];
729 Localpos[2]=pos[0]*fMatrix[2]+pos[1]*fMatrix[5]+pos[2]*fMatrix[8];
730 Localpos[0]+=fChamberTrans[0];
731 Localpos[1]+=fChamberTrans[1];
732 Localpos[2]+=fChamberTrans[2];
736 void AliRICHchamber::DisIntegration(Float_t eloss, Float_t xhit, Float_t yhit,
737 Int_t& nnew,Float_t newclust[6][500],Response_t res)
740 // Generates pad hits (simulated cluster)
741 // using the segmentation and the response model
749 // Width of the integration area
751 dx=((AliRICHresponse*) (*fResponse)[0])->Nsigma()*((AliRICHresponse*) (*fResponse)[0])->ChwX();
752 dy=((AliRICHresponse*) (*fResponse)[0])->Nsigma()*((AliRICHresponse*) (*fResponse)[0])->ChwY();
754 // Get pulse height from energy loss
758 qtot = ((AliRICHresponse*) (*fResponse)[0])->IntPH(eloss);
761 //Z position of the wires relative to the RICH mother volume
764 //Generate feedback photons
765 Nfp = ((AliRICHresponse*) (*fResponse)[0])->FeedBackPhotons(source,qtot);
766 } else if (res==cerenkov) {
767 qtot = ((AliRICHresponse*) (*fResponse)[1])->IntPH();
771 Nfp = ((AliRICHresponse*) (*fResponse)[1])->FeedBackPhotons(source,qtot);
777 Float_t qcheck=0, qp;
779 for (Int_t i=1; i<=fnsec; i++) {
781 AliRICHsegmentation * segmentation=(AliRICHsegmentation *) (*fSegmentation)[i-1];
782 for (segmentation->FirstPad(xhit, yhit, dx, dy);
783 segmentation->MorePads();
784 segmentation->NextPad())
787 qp= ((AliRICHresponse*) (*fResponse)[0])->IntXY(segmentation);
790 qp= ((AliRICHresponse*) (*fResponse)[0])->IntXY(segmentation);
798 // --- store signal information
799 newclust[0][nnew]=qtot;
800 newclust[1][nnew]=segmentation->Ix();
801 newclust[2][nnew]=segmentation->Iy();
802 newclust[3][nnew]=qp * qtot;
803 newclust[4][nnew]=segmentation->ISector();
804 newclust[5][nnew]=(Float_t) i;
810 } // Cathode plane loop