]>
Commit | Line | Data |
---|---|---|
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" |
853634d3 | 17 | #include "AliRICHParam.h" |
53fd478b | 18 | #include <TRotMatrix.h> |
2e5f0f7b | 19 | |
20 | ClassImp(AliRICHChamber) | |
853634d3 | 21 | //______________________________________________________________________________ |
2e5f0f7b | 22 | AliRICHChamber::AliRICHChamber() |
53fd478b | 23 | { |
24 | //default ctor | |
853634d3 | 25 | fpParam=0; |
26 | fpRotMatrix=0; | |
2e5f0f7b | 27 | } |
853634d3 | 28 | //______________________________________________________________________________ |
29 | AliRICHChamber::AliRICHChamber(Int_t iModuleN,AliRICHParam *pParam) | |
53fd478b | 30 | { |
31 | //main ctor. Defines all geometry parameters for the given module. | |
c64f7552 | 32 | SetToZenith();//put to up position |
853634d3 | 33 | switch(iModuleN){ |
853634d3 | 34 | case 1: |
0ffe413c | 35 | RotateX(-pParam->AngleYZ()); |
3ea9cb08 | 36 | RotateZ(-pParam->AngleXY()); |
853634d3 | 37 | fName="RICHc1";fTitle="RICH chamber 1"; |
38 | break; | |
39 | case 2: | |
3ea9cb08 | 40 | RotateZ(-pParam->AngleXY()); |
853634d3 | 41 | fName="RICHc2";fTitle="RICH chamber 2"; |
42 | break; | |
43 | case 3: | |
3ea9cb08 | 44 | RotateX(-pParam->AngleYZ()); |
853634d3 | 45 | fName="RICHc3";fTitle="RICH chamber 3"; |
46 | break; | |
3ea9cb08 | 47 | case 4: |
48 | fName="RICHc4";fTitle="RICH chamber 4"; //no turns | |
853634d3 | 49 | break; |
50 | case 5: | |
3ea9cb08 | 51 | RotateX(pParam->AngleYZ()); |
853634d3 | 52 | fName="RICHc5";fTitle="RICH chamber 5"; |
53 | break; | |
54 | case 6: | |
3ea9cb08 | 55 | RotateZ(pParam->AngleXY()); |
853634d3 | 56 | fName="RICHc6";fTitle="RICH chamber 6"; |
57 | break; | |
3ea9cb08 | 58 | case 7: |
59 | RotateX(pParam->AngleYZ()); | |
60 | RotateZ(pParam->AngleXY()); | |
61 | fName="RICHc7";fTitle="RICH chamber 7"; | |
62 | break; | |
853634d3 | 63 | default: |
c64f7552 | 64 | Fatal("named ctor","Wrong chamber number %i, check CreateChamber ctor",iModuleN); |
853634d3 | 65 | }//switch(iModuleN) |
66 | RotateZ(pParam->AngleRot());//apply common rotation | |
53fd478b | 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()); | |
853634d3 | 70 | fpParam=pParam; |
84365c70 | 71 | }//main ctor |
0ffe413c | 72 | //__________________________________________________________________________________________________ |
cc23c5c6 | 73 | void AliRICHChamber::Print(Option_t *) const |
853634d3 | 74 | { |
53fd478b | 75 | //debug printout method |
0ffe413c | 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(), | |
3ea9cb08 | 78 | ThetaXd(),PhiXd(),ThetaYd(),PhiYd(),ThetaZd(),PhiZd()); |
53fd478b | 79 | }//Print() |
0ffe413c | 80 | //__________________________________________________________________________________________________ |