]> git.uio.no Git - u/mrichter/AliRoot.git/blob - RICH/AliRICHChamber.cxx
RICH lib splitted
[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 #include <AliLog.h>
19 #include "AliRICHParam.h"
20
21 ClassImp(AliRICHChamber)        
22 //______________________________________________________________________________
23 AliRICHChamber::AliRICHChamber(Int_t iChamber):TNamed()
24 {
25 //main ctor. Defines all geometry parameters for the given module.
26 // 7 6     ^      
27 // 5 4 3   |      
28 //   2 1   |
29 // <-----z y   . x     
30   if(iChamber!=0){ //if iChamber=0 then special test config: chamber without any shift and rotation
31     const Double_t kAngHor=19.5; //  horizontal angle between chambers  19.5 grad
32     const Double_t kAngVer=20;   //  vertical angle between chambers    20   grad     
33     const Double_t kAngCom=30;   //  common RICH rotation with respect to x axis  20   grad     
34   
35     RotY(90);//rotate around y since initila position is in XY plane
36     fCenterX3.SetXYZ(490,0,0);  //shift center along x by 490 cm
37     fPcX3.SetXYZ(490+8-0.2,0,0);//position of the center of apmlification gap (anod wires plane)
38     fRadX3.SetXYZ(490-2,0,0);   //position of the entrance to freon
39     switch(iChamber){
40       case 1:        
41         RotY(kAngHor);  RotZ(-kAngVer);   //right and down 
42         break;      
43       case 2:
44                         RotZ(-kAngVer);   //down
45         break;      
46       case 3:
47         RotY(kAngHor);                   //right 
48         break;      
49       case 4:          
50         break;                           //no rotation
51       case 5:
52         RotY(-kAngHor);                  //left   
53         break;      
54       case 6:
55                         RotZ(kAngVer);     //up
56         break;      
57       case 7:
58         RotY(-kAngHor); RotZ(kAngVer);  //left and up 
59         break;      
60       default:
61         Fatal("named ctor","Wrong chamber number %i, check CreateChamber ctor",iChamber);
62     }//switch(iChamber)
63     RotZ(kAngCom);     //apply common rotation  
64   }//if(iChamber
65   fName=Form("RICHc%i",iChamber);fTitle=Form("RICH chamber %i",iChamber);
66   fpRotMatrix=new TRotMatrix("rot"+fName,"rot"+fName, Rot().ThetaX()*TMath::RadToDeg(), Rot().PhiX()*TMath::RadToDeg(),
67                                                       Rot().ThetaY()*TMath::RadToDeg(), Rot().PhiY()*TMath::RadToDeg(),
68                                                       Rot().ThetaZ()*TMath::RadToDeg(), Rot().PhiZ()*TMath::RadToDeg());
69 }//main ctor
70 //__________________________________________________________________________________________________
71 void AliRICHChamber::Print(Option_t *opt) const
72 {
73 // Debug printout
74   TNamed::Print(opt);
75   fCenterX3.Print(opt);
76 }//Print()
77 //__________________________________________________________________________________________________