]> git.uio.no Git - u/mrichter/AliRoot.git/blob - RICH/AliRICHChamber.cxx
Using AliLog (F.Carminati)
[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 initial position is in XY plane
36     fRad   .SetXYZ(490-2    ,0,0);       //position of the entrance to freon 1.5 cm of freon+0.5 cm of quartz window
37     fCenter.SetXYZ(490      ,0,0);      //shift center along x by 490 cm
38     fAnod  .SetXYZ(490+8-0.2,0,0);  //position of the center of apmlification gap (anod wires plane)
39     fPc    .SetXYZ(490+8    ,0,0);        //position of the center of PC 
40     switch(iChamber){
41       case 1:        
42         RotY(kAngHor);  RotZ(-kAngVer);   //right and down 
43         break;      
44       case 2:
45                         RotZ(-kAngVer);   //down
46         break;      
47       case 3:
48         RotY(kAngHor);                   //right 
49         break;      
50       case 4:          
51         break;                           //no rotation
52       case 5:
53         RotY(-kAngHor);                  //left   
54         break;      
55       case 6:
56                         RotZ(kAngVer);     //up
57         break;      
58       case 7:
59         RotY(-kAngHor); RotZ(kAngVer);  //left and up 
60         break;      
61       default:
62         Fatal("named ctor","Wrong chamber number %i, check CreateChamber ctor",iChamber);
63     }//switch(iChamber)
64     RotZ(kAngCom);     //apply common rotation  
65   }//if(iChamber
66   fName=Form("RICHc%i",iChamber);fTitle=Form("RICH chamber %i",iChamber);
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 }//main ctor
71 //__________________________________________________________________________________________________
72 void AliRICHChamber::Print(Option_t *opt) const
73 {
74 // Debug printout
75   TNamed::Print(opt);
76   fRad.Print(opt);
77   fCenter.Print(opt);
78   fAnod.Print(opt);
79   fPc.Print(opt);
80 }//Print()
81 //__________________________________________________________________________________________________