* provided "as is" without express or implied warranty. *
**************************************************************************/
-/*
-$Log$
-Revision 1.16 2002/10/22 14:45:40 alibrary
-Introducing Riostream.h
-
-Revision 1.15 2002/10/14 14:57:00 hristov
-Merging the VirtualMC branch to the main development branch (HEAD)
-
-Revision 1.13.6.1 2002/06/10 17:51:15 hristov
-Merged with v3-08-02
-
-Revision 1.14 2002/05/19 18:17:03 hristov
-Changes needed by ICC/IFC compiler (Intel)
-
-Revision 1.13 2002/01/28 21:49:19 nilsen
-Fixed a logical bug in functions GtoLPositionError, LtoGPositionError,
-GtoLPositionErrorTracking, and LtoGPositionErrorTracking.
-
-Revision 1.12 2001/10/12 22:07:20 nilsen
-A patch for C++ io manipulation functions so that they will work both
-with GNU gcc 2.96 and GNU gcc 3.01 compilers. Needs to be tested with
-other platforms.
-
-Revision 1.11 2001/09/04 14:54:31 hristov
-Const multidimentional arrays cause problems in the CINT dictionary on HP, const removed
-
-Revision 1.10 2001/08/24 21:06:37 nilsen
-Added more documentation, fixed up some coding violations, and some
-forward declorations.
-
-Revision 1.9 2001/03/23 15:21:56 nilsen
-Added Cylinderical Coordinates for use with Tracking. Fixed a but in the
-Streamer, It was not setting a value for frot[3] as it should when reading.
-
-Revision 1.8 2001/02/09 00:00:57 nilsen
-Fixed compatibility problem with HP unix {ios::fmtflags -> Int_t}. Fixed
-bugs in iostream based streamers used to read and write .det files. Fixed
-some detector sizes. Fixed bugs in some default-special constructors.
-
-Revision 1.7 2001/02/03 00:00:30 nilsen
-New version of AliITSgeom and related files. Now uses automatic streamers,
-set up for new formatted .det file which includes detector information.
-Additional smaller modifications are still to come.
-
-Revision 1.5 2000/10/02 16:32:35 barbera
-Forward declaration added
-
-Revision 1.1.2.6 2000/10/02 15:52:05 barbera
-Forward declaration added
-
-Revision 1.4 2000/09/07 17:30:45 nilsen
-fixed a bug in SixAnglesFromMatrix.
-
-Revision 1.3 2000/09/05 14:25:50 nilsen
-Made fixes for HP compiler. All function parameter default values placed
-in .h file. Fixed the usual problem with HP comilers and the "for(Int_t i..."
-business. Replaced casting (Double_t [3][3]) to (Double_t (*)[3]) for HP.
-Lastly removed all "const" before function parameters which were 2 dim. arrays,
-because on HP root generates some strange code (?). Thanks Peter for the
-changes.
-
-Revision 1.2 2000/08/29 20:16:50 nilsen
-New class for ITS coordiante transformations used by AliITSgeom nearly
-exclusively.
-
-Revision 1.1.2.1 2000/06/04 16:32:31 Nilsen
-A new class to hold the matrix information needed by AliITSgeom.
-
-*/
+/* $Id$ */
////////////////////////////////////////////////////////////////////////
// This is the implementation file for AliITSgeomMatrix class. It
fm[0][0] = fm[1][1] = fm[2][2] = 1.0;
}
//----------------------------------------------------------------------
-AliITSgeomMatrix::AliITSgeomMatrix(const AliITSgeomMatrix &sourse){
+AliITSgeomMatrix::AliITSgeomMatrix(const AliITSgeomMatrix &sourse) :
+ TObject(sourse){
////////////////////////////////////////////////////////////////////////
-// The standard copy constructor. This make a full / proper copy of
+// The standard Copy constructor. This make a full / proper copy of
// this class.
////////////////////////////////////////////////////////////////////////
Int_t i,j;
}// end for i
}
//----------------------------------------------------------------------
-AliITSgeomMatrix::AliITSgeomMatrix(const Int_t idt,const Int_t id[3],
+AliITSgeomMatrix::AliITSgeomMatrix(Int_t idt,const Int_t id[3],
const Double_t rot[3],const Double_t tran[3]){
////////////////////////////////////////////////////////////////////////
// This is a constructor for the AliITSgeomMatrix class. The matrix is
this->MatrixFromAngle();
}
//----------------------------------------------------------------------
-AliITSgeomMatrix::AliITSgeomMatrix(const Int_t idt, const Int_t id[3],
+AliITSgeomMatrix::AliITSgeomMatrix(Int_t idt, const Int_t id[3],
Double_t matrix[3][3],
const Double_t tran[3]){
////////////////////////////////////////////////////////////////////////
}
//----------------------------------------------------------------------
AliITSgeomMatrix::AliITSgeomMatrix(const Double_t rotd[6]/*degrees*/,
- const Int_t idt,const Int_t id[3],
+ Int_t idt,const Int_t id[3],
const Double_t tran[3]){
////////////////////////////////////////////////////////////////////////
// This is a constructor for the AliITSgeomMatrix class. The matrix is
}
//----------------------------------------------------------------------
-void AliITSgeomMatrix::GtoLPosition(const Double_t g0[3],Double_t l[3]){
+void AliITSgeomMatrix::GtoLPosition(const Double_t g0[3],Double_t l[3]) const {
////////////////////////////////////////////////////////////////////////
// Returns the local coordinates given the global coordinates [cm].
////////////////////////////////////////////////////////////////////////
return;
}
//----------------------------------------------------------------------
-void AliITSgeomMatrix::LtoGPosition(const Double_t l[3],Double_t g[3]){
+void AliITSgeomMatrix::LtoGPosition(const Double_t l[3],Double_t g[3]) const {
////////////////////////////////////////////////////////////////////////
// Returns the global coordinates given the local coordinates [cm].
////////////////////////////////////////////////////////////////////////
return;
}
//----------------------------------------------------------------------
-void AliITSgeomMatrix::GtoLMomentum(const Double_t g[3],Double_t l[3]){
+void AliITSgeomMatrix::GtoLMomentum(const Double_t g[3],Double_t l[3]) const{
////////////////////////////////////////////////////////////////////////
// Returns the local coordinates of the momentum given the global
// coordinates of the momentum. It transforms just like GtoLPosition
return;
}
//----------------------------------------------------------------------
-void AliITSgeomMatrix::LtoGMomentum(const Double_t l[3],Double_t g[3]){
+void AliITSgeomMatrix::LtoGMomentum(const Double_t l[3],Double_t g[3]) const {
////////////////////////////////////////////////////////////////////////
// Returns the Global coordinates of the momentum given the local
// coordinates of the momentum. It transforms just like LtoGPosition
}
//----------------------------------------------------------------------
void AliITSgeomMatrix::GtoLPositionError( Double_t g[3][3],
- Double_t l[3][3]){
+ Double_t l[3][3]) const {
////////////////////////////////////////////////////////////////////////
// Given an Uncertainty matrix in Global coordinates it is rotated so that
// its representation in local coordinates can be returned. There is no
}
//----------------------------------------------------------------------
void AliITSgeomMatrix::LtoGPositionError( Double_t l[3][3],
- Double_t g[3][3]){
+ Double_t g[3][3]) const {
////////////////////////////////////////////////////////////////////////
// Given an Uncertainty matrix in Local coordinates it is rotated so that
// its representation in global coordinates can be returned. There is no
}
//----------------------------------------------------------------------
void AliITSgeomMatrix::GtoLPositionTracking(const Double_t g0[3],
- Double_t l[3]){
+ Double_t l[3]) const {
////////////////////////////////////////////////////////////////////////
// A slightly different coordinate system is used when tracking.
// This coordinate system is only relevant when the geometry represents
}
//----------------------------------------------------------------------
void AliITSgeomMatrix::LtoGPositionTracking(const Double_t l[3],
- Double_t g[3]){
+ Double_t g[3]) const {
////////////////////////////////////////////////////////////////////////
// A slightly different coordinate system is used when tracking.
// This coordinate system is only relevant when the geometry represents
}
//----------------------------------------------------------------------
void AliITSgeomMatrix::GtoLMomentumTracking(const Double_t g[3],
- Double_t l[3]){
+ Double_t l[3]) const {
////////////////////////////////////////////////////////////////////////
// A slightly different coordinate system is used when tracking.
// This coordinate system is only relevant when the geometry represents
}
//----------------------------------------------------------------------
void AliITSgeomMatrix::LtoGMomentumTracking(const Double_t l[3],
- Double_t g[3]){
+ Double_t g[3]) const {
////////////////////////////////////////////////////////////////////////
// A slightly different coordinate system is used when tracking.
// This coordinate system is only relevant when the geometry represents
}
//----------------------------------------------------------------------
void AliITSgeomMatrix::GtoLPositionErrorTracking( Double_t g[3][3],
- Double_t l[3][3]){
+ Double_t l[3][3]) const {
////////////////////////////////////////////////////////////////////////
// A slightly different coordinate system is used when tracking.
// This coordinate system is only relevant when the geometry represents
}
//----------------------------------------------------------------------
void AliITSgeomMatrix::LtoGPositionErrorTracking( Double_t l[3][3],
- Double_t g[3][3]){
+ Double_t g[3][3]) const {
////////////////////////////////////////////////////////////////////////
// A slightly different coordinate system is used when tracking.
// This coordinate system is only relevant when the geometry represents
return;
}
//----------------------------------------------------------------------
-void AliITSgeomMatrix::PrintTitles(ostream *os){
+void AliITSgeomMatrix::PrintTitles(ostream *os) const {
////////////////////////////////////////////////////////////////////////
// Standard output format for this class but it includes variable
// names and formatting that makes it easer to read.
return;
}
//----------------------------------------------------------------------
-void AliITSgeomMatrix::PrintComment(ostream *os){
+void AliITSgeomMatrix::PrintComment(ostream *os) const {
////////////////////////////////////////////////////////////////////////
// output format used by Print..
////////////////////////////////////////////////////////////////////////
Int_t fmt;
#endif
#else
-#if defined __ICC
+#if defined __ICC || defined __ECC || defined __xlC__
ios::fmtflags fmt;
#else
Int_t fmt;
AliITSgeomMatrix::Class()->WriteBuffer(R__b, this);
}
}
+//______________________________________________________________________
+void AliITSgeomMatrix::SetTranslation(const Double_t tran[3]){
+ // Sets the translation vector and computes fCylR and fCylPhi.
+ for(Int_t i=0;i<3;i++) ftran[i] = tran[i];
+ fCylR = TMath::Sqrt(ftran[0]*ftran[0]+ftran[1]*ftran[1]);
+ fCylPhi = TMath::ATan2(ftran[1],ftran[0]);
+ if(fCylPhi<0.0) fCylPhi += TMath::Pi();
+}
+
//----------------------------------------------------------------------
ostream &operator<<(ostream &os,AliITSgeomMatrix &p){
////////////////////////////////////////////////////////////////////////