]> git.uio.no Git - u/mrichter/AliRoot.git/blob - RICH/AliRICHChamber.cxx
Display and points are removed, DispFast is to be used
[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 "AliRICHParam.h"
18 #include <TRotMatrix.h>
19
20 ClassImp(AliRICHChamber)        
21 //______________________________________________________________________________    
22 AliRICHChamber::AliRICHChamber() 
23 {
24 //default ctor
25   fpParam=0;    
26   fpRotMatrix=0;
27 }
28 //______________________________________________________________________________
29 AliRICHChamber::AliRICHChamber(Int_t iModuleN,AliRICHParam *pParam)
30 {
31 //main ctor. Defines all geometry parameters for the given module.
32   SetToZenith();//put to up position   
33   switch(iModuleN){
34     case 1:
35       RotateX(-pParam->AngleYZ());   
36       RotateZ(-pParam->AngleXY());      
37       fName="RICHc1";fTitle="RICH chamber 1";
38       break;      
39     case 2:
40       RotateZ(-pParam->AngleXY());      
41       fName="RICHc2";fTitle="RICH chamber 2";
42       break;      
43     case 3:
44       RotateX(-pParam->AngleYZ());
45       fName="RICHc3";fTitle="RICH chamber 3";
46       break;      
47     case 4:          
48       fName="RICHc4";fTitle="RICH chamber 4";  //no turns
49       break;      
50     case 5:
51       RotateX(pParam->AngleYZ());
52       fName="RICHc5";fTitle="RICH chamber 5";
53       break;      
54     case 6:
55       RotateZ(pParam->AngleXY());      
56       fName="RICHc6";fTitle="RICH chamber 6";
57       break;      
58     case 7:
59       RotateX(pParam->AngleYZ());            
60       RotateZ(pParam->AngleXY());      
61       fName="RICHc7";fTitle="RICH chamber 7";
62       break;      
63     default:
64       Fatal("named ctor","Wrong chamber number %i, check CreateChamber ctor",iModuleN);
65   }//switch(iModuleN)
66   RotateZ(pParam->AngleRot());//apply common rotation  
67   fpRotMatrix=new TRotMatrix("rot"+fName,"rot"+fName, Rot().ThetaX()*TMath::RadToDeg(), Rot().PhiX()*TMath::RadToDeg(),
68                                                       Rot().ThetaY()*TMath::RadToDeg(), Rot().PhiY()*TMath::RadToDeg(),
69                                                       Rot().ThetaZ()*TMath::RadToDeg(), Rot().PhiZ()*TMath::RadToDeg());
70   fpParam=pParam;
71 }//main ctor
72 //__________________________________________________________________________________________________
73 void AliRICHChamber::Print(Option_t *) const
74 {
75 //debug printout method 
76   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(),
77                      Rho(), ThetaD(),PhiD(),   X(),    Y(),    Z(),
78                      ThetaXd(),PhiXd(),ThetaYd(),PhiYd(),ThetaZd(),PhiZd());
79 }//Print()
80 //__________________________________________________________________________________________________