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 **************************************************************************/
19 //////////////////////////////////////////////////////////
20 // Manager and hits classes for set: RICH full version //
21 //////////////////////////////////////////////////////////
23 #include "Riostream.h"
26 #include <TParticle.h>
29 #include <TVirtualMC.h>
33 #include "AliRICHHit.h"
34 #include "AliRICHv2.h"
39 //___________________________________________
40 AliRICHv2::AliRICHv2()
43 // Default constructor fo AliRICHvv2 (full version)
48 //___________________________________________
49 AliRICHv2::AliRICHv2(const char *name, const char *title)
53 // Full version of RICH with hits and diagnostics, CONFIURABLE
58 fChambers = new TObjArray(kNCH);
59 for (Int_t i=0; i<kNCH; i++) {
61 (*fChambers)[i] = new AliRICHChamber();
66 void AliRICHv2::Init()
70 printf("%s: *********************************** RICH_INIT ***********************************\n",ClassName());
71 printf("%s: * *\n",ClassName());
72 printf("%s: * AliRICHv2 Configurable version started *\n",ClassName());
73 printf("%s: * *\n",ClassName());
77 AliSegmentation* segmentation;
78 AliRICHGeometry* geometry;
79 AliRICHResponse* response;
83 // Initialize Tracking Chambers
85 for (Int_t i=0; i<kNCH; i++) {
87 ( (AliRICHChamber*) (*fChambers)[i])->Init(i);
91 // Set the chamber (sensitive region) GEANT identifier
93 ((AliRICHChamber*)(*fChambers)[0])->SetGid(1);
94 ((AliRICHChamber*)(*fChambers)[1])->SetGid(2);
95 ((AliRICHChamber*)(*fChambers)[2])->SetGid(3);
96 ((AliRICHChamber*)(*fChambers)[3])->SetGid(4);
97 ((AliRICHChamber*)(*fChambers)[4])->SetGid(5);
98 ((AliRICHChamber*)(*fChambers)[5])->SetGid(6);
99 ((AliRICHChamber*)(*fChambers)[6])->SetGid(7);
101 segmentation=Chamber(0).GetSegmentationModel(0);
102 geometry=Chamber(0).GetGeometryModel();
103 response=Chamber(0).GetResponseModel();
105 Float_t offset = 490 + 1.276 - geometry->GetGapThickness()/2; //distance from center of mother volume to methane
106 Float_t deltaphi = 19.5; //phi angle between center of chambers - z direction
107 Float_t deltatheta = 20; //theta angle between center of chambers - x direction
108 Float_t cosphi = TMath::Cos(deltaphi*TMath::Pi()/180);
109 Float_t sinphi = TMath::Sin(deltaphi*TMath::Pi()/180);
110 Float_t costheta = TMath::Cos(deltatheta*TMath::Pi()/180);
111 Float_t sintheta = TMath::Sin(deltatheta*TMath::Pi()/180);
113 Float_t pos1[3]={0. , offset*cosphi , offset*sinphi};
114 Float_t pos2[3]={offset*sintheta , offset*costheta , 0. };
115 Float_t pos3[3]={0. , offset , 0.};
116 Float_t pos4[3]={-offset*sintheta , offset*costheta , 0.};
117 Float_t pos5[3]={offset*sinphi , offset*costheta*cosphi, -offset*sinphi};
118 Float_t pos6[3]={0. , offset*cosphi , -offset*sinphi};
119 Float_t pos7[3]={ -offset*sinphi , offset*costheta*cosphi, -offset*sinphi};
121 Chamber(0).SetChamberTransform(pos1[0],pos1[1],pos1[2],new TRotMatrix("rot993","rot993",90., 0. , 90. - deltaphi, 90. , deltaphi, -90. ));
122 Chamber(1).SetChamberTransform(pos2[0],pos2[1],pos2[2],new TRotMatrix("rot994","rot994",90., -deltatheta , 90. , 90.- deltatheta , 0. , 0. ));
123 Chamber(2).SetChamberTransform(pos3[0],pos3[1],pos3[2],new TRotMatrix("rot995","rot995",90., 0. , 90. , 90. , 0. , 0. ));
124 Chamber(3).SetChamberTransform(pos4[0],pos4[1],pos4[2],new TRotMatrix("rot996","rot996",90., deltatheta , 90. , 90 + deltatheta , 0. , 0. ));
125 Chamber(4).SetChamberTransform(pos5[0],pos5[1],pos5[2],new TRotMatrix("rot997","rot997",90., 360. - deltatheta, 108.2 , 90.- deltatheta ,18.2 , 90 - deltatheta));
126 Chamber(5).SetChamberTransform(pos6[0],pos6[1],pos6[2],new TRotMatrix("rot998","rot998",90., 0. , 90 + deltaphi , 90. , deltaphi, 90. ));
127 Chamber(6).SetChamberTransform(pos7[0],pos7[1],pos7[2],new TRotMatrix("rot999","rot999",90., deltatheta , 108.2 , 90.+ deltatheta ,18.2 , 90 + deltatheta));
130 printf("%s: * Pads : %3dx%3d *\n",
131 ClassName(),segmentation->Npx(),segmentation->Npy());
132 printf("%s: * Pad size : %5.2f x%5.2f mm2 *\n",
133 ClassName(),segmentation->Dpx(),segmentation->Dpy());
134 printf("%s: * Gap Thickness : %5.1f cm *\n",
135 ClassName(),geometry->GetGapThickness());
136 printf("%s: * Radiator Width : %5.1f cm *\n",
137 ClassName(),geometry->GetQuartzWidth());
138 printf("%s: * Radiator Length : %5.1f cm *\n",
139 ClassName(),geometry->GetQuartzLength());
140 printf("%s: * Freon Thickness : %5.1f cm *\n",
141 ClassName(),geometry->GetFreonThickness());
142 printf("%s: * Charge Slope : %5.1f ADC *\n",
143 ClassName(),response->ChargeSlope());
144 printf("%s: * Feedback Prob. : %5.2f %% *\n",
145 ClassName(),response->AlphaFeedback()*100);
146 printf("%s: * Debug Level : %3d *\n",
147 ClassName(),GetDebugLevel());
150 printf("%s: *********************************************************************************\n",