New convention on numbering and LRS
[u/mrichter/AliRoot.git] / RICH / AliRICHChamber.cxx
CommitLineData
53fd478b 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// **************************************************************************
2e5f0f7b 15
2e5f0f7b 16#include "AliRICHChamber.h"
53fd478b 17#include <TRotMatrix.h>
2e5f0f7b 18
19ClassImp(AliRICHChamber)
853634d3 20//______________________________________________________________________________
e42a7b46 21AliRICHChamber::AliRICHChamber(Int_t iChamber):TNamed()
53fd478b 22{
23//main ctor. Defines all geometry parameters for the given module.
c64f7552 24 SetToZenith();//put to up position
e42a7b46 25 switch(iChamber){
853634d3 26 case 1:
e42a7b46 27 RotateX(-AliRICHParam::AngleYZ());
28 RotateZ(-AliRICHParam::AngleXY());
853634d3 29 fName="RICHc1";fTitle="RICH chamber 1";
30 break;
31 case 2:
e42a7b46 32 RotateZ(-AliRICHParam::AngleXY());
853634d3 33 fName="RICHc2";fTitle="RICH chamber 2";
34 break;
35 case 3:
e42a7b46 36 RotateX(-AliRICHParam::AngleYZ());
853634d3 37 fName="RICHc3";fTitle="RICH chamber 3";
38 break;
3ea9cb08 39 case 4:
40 fName="RICHc4";fTitle="RICH chamber 4"; //no turns
853634d3 41 break;
42 case 5:
e42a7b46 43 RotateX(AliRICHParam::AngleYZ());
853634d3 44 fName="RICHc5";fTitle="RICH chamber 5";
45 break;
46 case 6:
e42a7b46 47 RotateZ(AliRICHParam::AngleXY());
853634d3 48 fName="RICHc6";fTitle="RICH chamber 6";
49 break;
3ea9cb08 50 case 7:
e42a7b46 51 RotateX(AliRICHParam::AngleYZ());
52 RotateZ(AliRICHParam::AngleXY());
3ea9cb08 53 fName="RICHc7";fTitle="RICH chamber 7";
54 break;
853634d3 55 default:
e42a7b46 56 Fatal("named ctor","Wrong chamber number %i, check CreateChamber ctor",iChamber);
853634d3 57 }//switch(iModuleN)
e42a7b46 58 RotateZ(AliRICHParam::AngleRot());//apply common rotation
53fd478b 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());
84365c70 62}//main ctor
0ffe413c 63//__________________________________________________________________________________________________
e42a7b46 64void AliRICHChamber::Print(Option_t *opt) const
853634d3 65{
e42a7b46 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);
53fd478b 71}//Print()
0ffe413c 72//__________________________________________________________________________________________________