]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
new class to take into account ITS material distribution in tracking v1
authorbarbera <barbera@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 2 Mar 2001 19:36:40 +0000 (19:36 +0000)
committerbarbera <barbera@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 2 Mar 2001 19:36:40 +0000 (19:36 +0000)
ITS/AliITSRad.cxx [new file with mode: 0644]
ITS/AliITSRad.h [new file with mode: 0644]

diff --git a/ITS/AliITSRad.cxx b/ITS/AliITSRad.cxx
new file mode 100644 (file)
index 0000000..54b0d4c
--- /dev/null
@@ -0,0 +1,127 @@
+#include <TMatrix.h>
+#include <TObjArray.h>
+#include <iostream.h>
+#include <fstream.h>
+
+
+#include "AliITSRad.h"
+
+
+ClassImp(AliITSRad)
+
+AliITSRad::AliITSRad(Int_t iimax, Int_t jjmax) {
+
+  imax=iimax;
+  jmax=jjmax;
+  
+  fmrad1 = new TMatrix(imax,jmax);
+  fmrad2 = new TMatrix(imax,jmax);
+  fmrad3 = new TMatrix(imax,jmax);
+  fmrad4 = new TMatrix(imax,jmax);
+  fmrad5 = new TMatrix(imax,jmax);
+  fmrad6 = new TMatrix(imax,jmax);
+
+  ifstream in("ITSlegov5.map");
+  Int_t i,j;
+  
+  for(i=0; i<imax; i++) {
+    for(j=0; j<jmax; j++) {
+          in>>(*fmrad1)(i,j);
+        }
+  }
+        
+  for(i=0; i<imax; i++) {
+    for(j=0; j<jmax; j++) {
+          in>>(*fmrad2)(i,j);
+        }
+  } 
+        
+  for(i=0; i<imax; i++) {
+    for(j=0; j<jmax; j++) {
+          in>>(*fmrad3)(i,j);
+        }
+  } 
+        
+  for(i=0; i<imax; i++) {
+    for(j=0; j<jmax; j++) {
+          in>>(*fmrad4)(i,j);
+        }
+  } 
+        
+  for(i=0; i<imax; i++) {
+    for(j=0; j<jmax; j++) {
+          in>>(*fmrad5)(i,j);
+        }
+  }
+  
+  for(i=0; i<imax; i++) {
+    for(j=0; j<jmax; j++) {
+          in>>(*fmrad6)(i,j);
+        }
+  }
+                
+  in.close();
+
+/*
+/////////////////////////////////////////////////////////////////////////////////////////////////////////// 
+//                       Stampe provvisorie delle matrici su rad.out         
+//      
+  ofstream out("rad.out");
+        
+  for(i=0; i<imax; i++) {
+    for(j=0; j<jmax; j++) {
+          out<<(*fmrad1)(i,j)<<" ";
+        }
+        out<<"\n";
+  }
+  out<<"\n";
+  for(i=0; i<imax; i++) {
+    for(j=0; j<jmax; j++) {
+          out<<(*fmrad2)(i,j)<<" ";
+        }
+        out<<"\n";
+  }
+  out<<"\n";
+  for(i=0; i<imax; i++) {
+    for(j=0; j<jmax; j++) {
+          out<<(*fmrad3)(i,j)<<" ";
+        }
+        out<<"\n";
+  }
+  out<<"\n";
+  for(i=0; i<imax; i++) {
+    for(j=0; j<jmax; j++) {
+          out<<(*fmrad4)(i,j)<<" ";
+        }
+        out<<"\n";
+  }
+  out<<"\n"; 
+  for(i=0; i<imax; i++) {
+    for(j=0; j<jmax; j++) {
+          out<<(*fmrad5)(i,j)<<" ";
+        }
+        out<<"\n";
+  }
+  out<<"\n";
+  for(i=0; i<imax; i++) {
+    for(j=0; j<jmax; j++) {
+          out<<(*fmrad6)(i,j)<<" ";
+        }
+        out<<"\n";
+  }
+  
+  out.close(); 
+///////////////////////////////////////////////////////////////////////////////////////////////////////////     
+*/
+}
+
+AliITSRad::~AliITSRad() {
+
+  delete fmrad1;
+  delete fmrad2;
+  delete fmrad3;
+  delete fmrad4;
+  delete fmrad5;
+  delete fmrad6;
+  
+}
diff --git a/ITS/AliITSRad.h b/ITS/AliITSRad.h
new file mode 100644 (file)
index 0000000..0bdeb1e
--- /dev/null
@@ -0,0 +1,50 @@
+#ifndef ALIITSRAD_H
+#define ALIITSRAD_H
+
+#include <TObject.h>
+#include <TMatrix.h>
+
+
+class TObjArray;
+class TMatrix;
+
+
+//                  ITS Class to calculate the radiation lenght matrix
+//Origin  A. Badala' and G.S. Pappalardo:  e-mail Angela.Badala@ct.infn.it, Giuseppe.S.Pappalardo@ct.infn.it
+//
+
+
+class AliITSRad : public TObject { 
+
+public:
+
+  AliITSRad(Int_t iimax, Int_t jjmax);         // class constructor
+  ~AliITSRad();                                // class destructor
+  
+  Int_t Getimax() {return imax;}               // return the first dimension of the matrices
+  Int_t Getjmax() {return jmax;}               // return the second dimension of the matrices
+  
+  TMatrix &GetRadMatrix1() {return *fmrad1;}   // return the radiation lengh matrix for layer 1
+  TMatrix &GetRadMatrix2() {return *fmrad2;}   // return the radiation lengh matrix for layer 2
+  TMatrix &GetRadMatrix3() {return *fmrad3;}   // return the radiation lengh matrix for layer 3
+  TMatrix &GetRadMatrix4() {return *fmrad4;}   // return the radiation lengh matrix for layer 4
+  TMatrix &GetRadMatrix5() {return *fmrad5;}   // return the radiation lengh matrix for layer 5
+  TMatrix &GetRadMatrix6() {return *fmrad6;}   // return the radiation lengh matrix for layer 6
+  
+private:
+
+  Int_t           imax;        // first dimension of the matrices
+  Int_t           jmax;        // second dimension of the matrices
+  
+  TMatrix         *fmrad1;     // matrix of the radiation lenghts for layer 1
+  TMatrix         *fmrad2;     // matrix of the radiation lenghts for layer 2
+  TMatrix         *fmrad3;     // matrix of the radiation lenghts for layer 3
+  TMatrix         *fmrad4;     // matrix of the radiation lenghts for layer 4
+  TMatrix         *fmrad5;     // matrix of the radiation lenghts for layer 5
+  TMatrix         *fmrad6;     // matrix of the radiation lenghts for layer 6
+
+  ClassDef(AliITSRad, 1)
+};
+
+#endif
+