X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=RICH%2FAliRICHChamber.h;h=2f9979cd2c936ed28d229c3229db7239ea204965;hb=b7943f003a6b4cab77186d1c1cd6d552b9a2b7a6;hp=876a94f3596ce7e301d3ef55c33cb1215662c81b;hpb=c60862bf5dd7402eb9e152b91e0e3d9172bcf333;p=u%2Fmrichter%2FAliRoot.git diff --git a/RICH/AliRICHChamber.h b/RICH/AliRICHChamber.h index 876a94f3596..2f9979cd2c9 100644 --- a/RICH/AliRICHChamber.h +++ b/RICH/AliRICHChamber.h @@ -4,109 +4,59 @@ /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * See cxx source for full Copyright notice */ -#include #include #include #include #include -#include "AliRICHConst.h" +#include "AliRICHParam.h" +class TRotMatrix; -#include "AliRICHTresholdMap.h" -#include "AliSegmentation.h" -#include "AliRICHGeometry.h" -#include "AliRICHResponse.h" - -class AliRICHClusterFinder; - -typedef enum {kMip, kPhoton} ResponseType; -class AliRICHParam; class AliRICHChamber : public TNamed { public: - - Int_t fIndexMap[50]; //indeces of tresholds - AliRICHTresholdMap* fTresh; //map of tresholds - -public: - AliRICHChamber(); - AliRICHChamber(Int_t iModuleN,AliRICHParam *pParam); + AliRICHChamber():TNamed(),fpRotMatrix(0) {;} + AliRICHChamber(Int_t iChamberN); AliRICHChamber(const AliRICHChamber &chamber):TNamed(chamber) {;} virtual ~AliRICHChamber() {;} AliRICHChamber& operator=(const AliRICHChamber&) {return *this;} - + + static Double_t AlphaFeedback(Int_t ) {return 0.020;} //determines number of feedback photons updated to 9/11/04 by Di Mauro + TRotMatrix* RotMatrix() const{return fpRotMatrix;} - const char* RotMatrixName() const{return "rot"+fName;} - TRotation Rot() {return fRot;} - Double_t Rho() const{return fCenterV3.Mag();} - Double_t ThetaD() const{return fCenterV3.Theta()*TMath::RadToDeg();} - Double_t PhiD() const{return fCenterV3.Phi()*TMath::RadToDeg();} - Double_t ThetaXd() const{return fRot.ThetaX()*TMath::RadToDeg();} - Double_t PhiXd() const{return fRot.PhiX()*TMath::RadToDeg();} - Double_t ThetaYd() const{return fRot.ThetaY()*TMath::RadToDeg();} - Double_t PhiYd() const{return fRot.PhiY()*TMath::RadToDeg();} - Double_t ThetaZd() const{return fRot.ThetaZ()*TMath::RadToDeg();} - Double_t PhiZd() const{return fRot.PhiZ()*kR2d;} - void RotateX(Double_t a) {fRot.RotateX(a);fCenterV3.RotateX(a);} - void RotateY(Double_t a) {fRot.RotateY(a);fCenterV3.RotateY(a);} - void RotateZ(Double_t a) {fRot.RotateZ(a);fCenterV3.RotateZ(a);} - Double_t X() const{return fCenterV3.X();} - Double_t Y() const{return fCenterV3.Y();} - Double_t Z() const{return fCenterV3.Z();} - TVector3 L2G(TVector3 x3) const{x3.Transform(fRot);x3+=fCenterV3;return x3;} - TVector3 G2L(TVector3 x3) const{x3-=fCenterV3;x3.Transform(fRot.Inverse()); return x3;} - TVector3 L2G(Double_t x,Double_t y,Double_t z) const{return L2G(TVector3(x,y,z));} - TVector3 G2L(TLorentzVector x4) const{return G2L(x4.Vect());} - Float_t G2Ly(TLorentzVector x4) const{TVector3 x3=G2L(x4.Vect()); return x3.Z();} - TVector3 G2L(Double_t x,Double_t y,Double_t z) const{return G2L(TVector3(x,y,z));} - Float_t G2Lx(Double_t x,Double_t y,Double_t z) const{TVector3 x3=G2L(x,y,z); return x3.X();} - Float_t G2Ly(Double_t x,Double_t y,Double_t z) const{TVector3 x3=G2L(x,y,z); return x3.Z();} -// TLorentzVector L2G(TLorentzVector v4) const{v4.Transform(fRot.Inverse());v4+=fCenterV3;return v4;}??? - void Print(Option_t *sOption)const;//virtual - - void LocaltoGlobal(Float_t pos[3],Float_t Localpos[3]);//Transformation from local to global coordinates, chamber-dependant - void GlobaltoLocal(Float_t pos[3],Float_t localpos[3]);//Transformation from Global to local coordinates, chamber-dependant - void GenerateTresholds(); //Generate pad dependent tresholds - void DisIntegration(Float_t eloss, Float_t xhit, Float_t yhit, Int_t&x, Float_t newclust[6][500], ResponseType res);// Cluster formation method - void Init(Int_t id) {fSegmentation->Init(id);} // Recalculates all the values after some of them have been changed - void SetGeometryModel(AliRICHGeometry* pRICHGeometry) {fGeometry=pRICHGeometry;} - AliRICHGeometry* GetGeometryModel() const{return fGeometry;} - void SetResponseModel(AliRICHResponse* pRICHResponse) {fResponse=pRICHResponse;} - AliRICHResponse* GetResponseModel() const{return fResponse;} - void SetSegmentationModel(AliSegmentation* pRICHSegmentation) {fSegmentation=pRICHSegmentation;} - AliSegmentation* GetSegmentationModel() const{return fSegmentation;} - void SetReconstructionModel(AliRICHClusterFinder *pRICHReconstruction) {fReconstruction=pRICHReconstruction;} - AliRICHClusterFinder* &GetReconstructionModel() {return fReconstruction;} - void SigGenInit(Float_t x, Float_t y, Float_t z) {fSegmentation->SigGenInit(x, y, z) ;} - Int_t SigGenCond(Float_t x, Float_t y, Float_t z) {return fSegmentation->SigGenCond(x, y, z);} - Int_t Sector(Float_t x, Float_t y) {return fSegmentation->Sector((Int_t)x, (Int_t)y);} // Returns number of sector containing (x,y) position - void SetPadSize(Float_t p1, Float_t p2) {fSegmentation->SetPadSize(p1,p2);} - Double_t GetX() const{return fX;} - Double_t GetY() const{return fY;} - Double_t GetZ() const{return fZ;} - inline void SetCenter(Double_t x,Double_t y,Double_t z); - TRotMatrix *GetRotMatrix() const{return fpRotMatrix;} - void SetChamberTransform(Float_t x,Float_t y,Float_t z,TRotMatrix *pRotMatrix); - + TString RotMatrixName() const{return "rot"+fName;} + TRotation Rot() const{return fRot;} + Double_t Rho() const{return fCenterX3.Mag();} //gives distance to chamber center in MRS + Double_t ThetaD() const{return fCenterX3.Theta()*TMath::RadToDeg();} //gives polar angle of chamber center in MRS + Double_t PhiD() const{return fCenterX3.Phi() *TMath::RadToDeg();} //gives azimuthal angle of chamber center in MRS + Double_t ThetaXd() const{return fRot.ThetaX() *TMath::RadToDeg();} + Double_t PhiXd() const{return fRot.PhiX() *TMath::RadToDeg();} + Double_t ThetaYd() const{return fRot.ThetaY() *TMath::RadToDeg();} + Double_t PhiYd() const{return fRot.PhiY() *TMath::RadToDeg();} + Double_t ThetaZd() const{return fRot.ThetaZ() *TMath::RadToDeg();} + Double_t PhiZd() const{return fRot.PhiZ() *TMath::RadToDeg();} + void RotX(Double_t a) {a*=TMath::DegToRad();fRot.RotateX(a);fCenterX3.RotateX(a);fRadX3.RotateX(a);fPcX3.RotateX(a);}//degrees around X + void RotY(Double_t a) {a*=TMath::DegToRad();fRot.RotateY(a);fCenterX3.RotateY(a);fRadX3.RotateY(a);fPcX3.RotateY(a);}//degrees around Y + void RotZ(Double_t a) {a*=TMath::DegToRad();fRot.RotateZ(a);fCenterX3.RotateZ(a);fRadX3.RotateZ(a);fPcX3.RotateZ(a);}//degrees around Z + TVector3 Rad() const{return fRadX3;} //provides center of radiator position in MRS, cm + TVector3 Pc() const{return fPcX3;} //provides center of photocathond position in MRS, cm + TVector3 Center() const{return fCenterX3;} //provides center of chamber position in MRS, cm + void Print(Option_t *sOption)const; //virtual interface from TObject +//Transformations for photcathode plane + TVector2 Mrs2Pc(TVector3 x3)const{x3-=fPcX3;x3.Transform(fRot.Inverse());return TVector2(-x3.X()+0.5*AliRICHParam::PcSizeX(),x3.Y()+0.5*AliRICHParam::PcSizeY());} + TVector3 Pc2Mrs(TVector2 x2)const{TVector3 x3(-x2.X()+0.5*AliRICHParam::PcSizeX(),x2.Y()-0.5*AliRICHParam::PcSizeY(),0);x3.Transform(fRot); x3+=fPcX3;return x3;} + TVector2 Mrs2Pc(TLorentzVector x4) const{return Mrs2Pc(x4.Vect());} +//Transformations for radiator plane + TVector2 Mrs2Rad(TVector3 x3)const{x3-=fRadX3;x3.Transform(fRot.Inverse());return TVector2(-x3.X()+0.5*AliRICHParam::PcSizeX(),x3.Y()+0.5*AliRICHParam::PcSizeY());} + TVector3 Rad2Mrs(TVector2 x2)const{TVector3 x3(-x2.X()+0.5*AliRICHParam::PcSizeX(),x2.Y()-0.5*AliRICHParam::PcSizeY(),0);x3.Transform(fRot); x3+=fRadX3;return x3;} + TVector3 PMrs2Loc(TVector3 p3)const{TVector3 ploc=Rot().Invert()*p3;ploc.SetXYZ(-ploc.Px(),ploc.Py(),ploc.Pz()); return ploc;} protected: - Float_t fX,fY,fZ; // Position of the center of the chamber in MRS (cm) - - AliSegmentation *fSegmentation; //???Segmentation model for each chamber - AliRICHResponse *fResponse; //???Response model for each chamber - AliRICHGeometry *fGeometry; //???Geometry model for each chamber - AliRICHClusterFinder *fReconstruction; //???Reconstruction model for each chamber - - TVector3 fCenterV3; //chamber center position in MRS (cm) + TVector3 fCenterX3; //chamber center position in MRS (cm) + TVector3 fRadX3; //radiator entrance center position in MRS (cm) + TVector3 fPcX3; //PC center position in MRS (cm) TRotation fRot; //chamber rotation in MRS TRotMatrix *fpRotMatrix; //rotation matrix of the chamber with respect to MRS - AliRICHParam *fpParam; //main RICH parameters description - ClassDef(AliRICHChamber,2) //single RICH chamber description + ClassDef(AliRICHChamber,7) //single RICH chamber description };//class AliRICHChamber -void AliRICHChamber::SetCenter(Double_t x,Double_t y,Double_t z) -{ - fCenterV3.SetXYZ(x,y,z); - fX=x;fY=y;fZ=z; -} - #endif //AliRICHChamber_h