]> git.uio.no Git - u/mrichter/AliRoot.git/blob - RICH/AliRICHChamber.cxx
7f7f86f3205876ae17a7f0a3651d02205ee180c4
[u/mrichter/AliRoot.git] / RICH / AliRICHChamber.cxx
1 //  **************************************************************************
2 //  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 //  *                                                                        *
4 //  * Author: The ALICE Off-line Project.                                    *
5 //  * Contributors are mentioned in the code where appropriate.              *
6 //  *                                                                        *
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 //  **************************************************************************
15
16 #include "AliRICHChamber.h"
17 #include <TRotMatrix.h>
18
19 ClassImp(AliRICHChamber)        
20 //______________________________________________________________________________
21 AliRICHChamber::AliRICHChamber(Int_t iChamber):TNamed()
22 {
23 //main ctor. Defines all geometry parameters for the given module.
24   SetToZenith();//put to up position   
25   switch(iChamber){
26     case 1:
27       RotateX(-AliRICHParam::AngleYZ());   
28       RotateZ(-AliRICHParam::AngleXY());      
29       fName="RICHc1";fTitle="RICH chamber 1";
30       break;      
31     case 2:
32       RotateZ(-AliRICHParam::AngleXY());      
33       fName="RICHc2";fTitle="RICH chamber 2";
34       break;      
35     case 3:
36       RotateX(-AliRICHParam::AngleYZ());
37       fName="RICHc3";fTitle="RICH chamber 3";
38       break;      
39     case 4:          
40       fName="RICHc4";fTitle="RICH chamber 4";  //no turns
41       break;      
42     case 5:
43       RotateX(AliRICHParam::AngleYZ());
44       fName="RICHc5";fTitle="RICH chamber 5";
45       break;      
46     case 6:
47       RotateZ(AliRICHParam::AngleXY());      
48       fName="RICHc6";fTitle="RICH chamber 6";
49       break;      
50     case 7:
51       RotateX(AliRICHParam::AngleYZ());            
52       RotateZ(AliRICHParam::AngleXY());      
53       fName="RICHc7";fTitle="RICH chamber 7";
54       break;      
55     default:
56       Fatal("named ctor","Wrong chamber number %i, check CreateChamber ctor",iChamber);
57   }//switch(iModuleN)
58   RotateZ(AliRICHParam::AngleRot());//apply common rotation  
59   fpRotMatrix=new TRotMatrix("rot"+fName,"rot"+fName, Rot().ThetaX()*TMath::RadToDeg(), Rot().PhiX()*TMath::RadToDeg(),
60                                                       Rot().ThetaY()*TMath::RadToDeg(), Rot().PhiY()*TMath::RadToDeg(),
61                                                       Rot().ThetaZ()*TMath::RadToDeg(), Rot().PhiZ()*TMath::RadToDeg());
62 }//main ctor
63 //__________________________________________________________________________________________________
64 void AliRICHChamber::Print(Option_t *opt) const
65 {
66 // Debug printout
67 //  printf("%s r=%8.3f theta=%5.1f phi=%5.1f x=%8.3f y=%8.3f z=%8.3f  %6.2f,%6.2f %6.2f,%6.2f %6.2f,%6.2f\n",fName.Data(),
68 //                     Rho(), ThetaD(),PhiD(),   X(),    Y(),    Z(),
69 //                     ThetaXd(),PhiXd(),ThetaYd(),PhiYd(),ThetaZd(),PhiZd());
70   fCenterV3.Print(opt);fPcX3.Print(opt);
71 }//Print()
72 //__________________________________________________________________________________________________