]> git.uio.no Git - u/mrichter/AliRoot.git/blob - RICH/AliRICHChamber.cxx
Added functionalities in display the RICH event and pattern recognition. Minor bugs...
[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
20 ClassImp(AliRICHChamber)        
21 //______________________________________________________________________________
22 AliRICHChamber::AliRICHChamber(Int_t iChamber):TNamed()
23 {
24 //main ctor. Defines all geometry parameters for the given module.
25 // 7 6     ^      
26 // 5 4 3   |      
27 //   2 1   |
28 // <-----z y   . x     
29 //  horizontal angle between chambers  19.5 grad
30 //  vertical angle between chambers    20   grad     
31   RotY(90);//rotate around y
32   fCenterX3.SetXYZ(490,0,0);fPcX3.SetXYZ(490+8-0.4,0,0);fRadX3.SetXYZ(490-2,0,0); //shift center along x by 490 cm
33   
34   switch(iChamber){
35     case 0:                    //special test beam configuration without rotation.
36       break;
37     case 1:        
38       RotY(19.5); RotZ(-20);   //right and down 
39       break;      
40     case 2:
41       RotZ(-20);              //down
42       break;      
43     case 3:
44       RotY(19.5);             //right 
45       break;      
46     case 4:          
47       break;                  //no rotation
48     case 5:
49       RotY(-19.5);            //left   
50       break;      
51     case 6:
52       RotZ(20);               //up
53       break;      
54     case 7:
55       RotY(-19.5); RotZ(20);  //left and up 
56       break;      
57     default:
58       Fatal("named ctor","Wrong chamber number %i, check CreateChamber ctor",iChamber);
59   }//switch(iModuleN)
60   fName=Form("RICHc%i",iChamber);fTitle=Form("RICH chamber %i",iChamber);
61   RotZ(30);     //apply common rotation  
62   fpRotMatrix=new TRotMatrix("rot"+fName,"rot"+fName, Rot().ThetaX()*TMath::RadToDeg(), Rot().PhiX()*TMath::RadToDeg(),
63                                                       Rot().ThetaY()*TMath::RadToDeg(), Rot().PhiY()*TMath::RadToDeg(),
64                                                       Rot().ThetaZ()*TMath::RadToDeg(), Rot().PhiZ()*TMath::RadToDeg());
65 }//main ctor
66 //__________________________________________________________________________________________________
67 void AliRICHChamber::Print(Option_t *opt) const
68 {
69 // Debug printout
70   ToAliInfo(fCenterX3.Print(opt));
71 }//Print()
72 //__________________________________________________________________________________________________