]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSv3.cxx
The access to several data members was changed from public to protected. The digitisa...
[u/mrichter/AliRoot.git] / ITS / AliITSv3.cxx
index fe39aa8018cfe3b3cce35a36384259a9910dd07c..0900313a5632f2e2abbfe35098ab914442f27058 100644 (file)
 
 /*
 $Log$
+Revision 1.21  2000/11/30 11:13:11  barbera
+ Added changes suggested by Federico Carminati on nov, 30, 2000
+
+Revision 1.20  2000/10/07 17:29:51  nilsen
+Blank Line added at end of file to remove a warning for hp compilers
+(Give me a Break!).
+
+Revision 1.19  2000/10/05 20:49:59  nilsen
+Now using root generated streamers.
+
+Revision 1.11.4.10  2000/07/31 13:50:51  barbera
+Updated from the release
+
 Revision 1.17  2000/07/10 16:07:19  fca
 Release version of ITS code
 
@@ -77,19 +90,20 @@ Introduction of the Copyright and cvs Log
 #include <TFile.h>    // only required for Tracking function?
 #include <TCanvas.h>
 #include <TObjArray.h>
+#include <TObjString.h>
 #include <TClonesArray.h>
+#include <TLorentzVector.h>
+#include <TMath.h>
+
 
 #include "AliMC.h"
-#include "AliMagF.h"
 #include "AliConst.h"
+#include "AliMagF.h"
 
 #include "AliITShit.h"
 #include "AliITSv3.h"
 #include "AliRun.h"
 
-#include "AliMC.h"
-#include "AliConst.h"
-
 ClassImp(AliITSv3)
  
 //_____________________________________________________________________________
@@ -98,17 +112,11 @@ AliITSv3::AliITSv3() {
 //    Standard default constructor for the ITS version 3.
 ////////////////////////////////////////////////////////////////////////
 
-    fIdN = 6;
-    fIdName = new TString[fIdN];
-    fIdName[0] = "ITS1";
-    fIdName[1] = "ITS2";
-    fIdName[2] = "ITS3";
-    fIdName[3] = "ITS4";
-    fIdName[4] = "ITS5";
-    fIdName[5] = "ITS6";
-    fIdSens    = new Int_t[fIdN];
-    for (Int_t i=0;i<fIdN;i++) fIdSens[i]=fIdName[i].Length();
-    fMinorVersionV3=1;
+    fIdN    = 0;
+    fIdName = 0;
+    fIdSens = 0;
+    fMajorVersion = 3;
+    fMinorVersion = -1;
 }
 //____________________________________________________________________________
 AliITSv3::AliITSv3(const AliITSv3 &source){
@@ -139,8 +147,20 @@ AliITSv3::AliITSv3(const char *name, const char *title) : AliITS(name, title){
 ////////////////////////////////////////////////////////////////////////
 //    Standard constructor for the ITS version 3.
 ////////////////////////////////////////////////////////////////////////
-    fIdN = 6;
-    fIdName = new TString[fIdN];
+
+    fIdN    = 6;
+/*
+//  TObjArray of TObjStrings
+    fIdName = new TObjArray(fIdN);
+    fIdName->AddAt(new TObjString("ITS1"),0);
+    fIdName->AddAt(new TObjString("ITS2"),1);
+    fIdName->AddAt(new TObjString("ITS3"),2);
+    fIdName->AddAt(new TObjString("ITS4"),3);
+    fIdName->AddAt(new TObjString("ITS5"),4);
+    fIdName->AddAt(new TObjString("ITS6"),5);
+*/
+//  Array of TStrings.
+    fIdName    = new TString[fIdN];
     fIdName[0] = "ITS1";
     fIdName[1] = "ITS2";
     fIdName[2] = "ITS3";
@@ -148,8 +168,9 @@ AliITSv3::AliITSv3(const char *name, const char *title) : AliITS(name, title){
     fIdName[4] = "ITS5";
     fIdName[5] = "ITS6";
     fIdSens    = new Int_t[fIdN];
-    for (Int_t i=0;i<fIdN;i++) fIdSens[i]=fIdName[i].Length();
-    fMinorVersionV3=1;
+    for (Int_t i=0;i<fIdN;i++) fIdSens[i] = 0;
+    fMajorVersion = 3;
+    fMinorVersion = 1;
 }//__________________________________________________________________________
 void AliITSv3::BuildGeometry(){
 ////////////////////////////////////////////////////////////////////////
@@ -2469,7 +2490,7 @@ void AliITSv3::CreateGeometry(){
   
   // --- Define SSD with the 35+39 lay-out 
   
-  if (fMinorVersionV3 < 3) {
+  if (fMinorVersion < 3) {
     
     //--- Define ghost volume containing the Strip Detectors and fill it with air
     //     or vacuum 
@@ -3019,7 +3040,7 @@ void AliITSv3::CreateGeometry(){
   
   // --- Define SSD with the 32+36 lay-out 
   
-  if (fMinorVersionV3 >2 && fMinorVersionV3 < 6) {
+  if (fMinorVersion >2 && fMinorVersion < 6) {
     
     //--- Define ghost volume containing the Strip Detectors and fill it with air
     //     or vacuum 
@@ -3586,7 +3607,7 @@ void AliITSv3::CreateGeometry(){
   
   //      GOTO 8901                                    ! skip outer wall 
   
-  if (fMinorVersionV3 == 0 || fMinorVersionV3 == 3) {
+  if (fMinorVersion == 0 || fMinorVersion == 3) {
     
     dits[0] = 49.9;
     dits[1] = dits[0] + .06926;
@@ -3602,7 +3623,7 @@ void AliITSv3::CreateGeometry(){
   
   //     GOTO 9012                                    ! skip octagonal frame
   
-  if (fMinorVersionV3 == 1) {
+  if (fMinorVersion == 1) {
     
     rzero    = 34.;
     dtra[0]  = .92;
@@ -3766,7 +3787,7 @@ void AliITSv3::CreateGeometry(){
     gMC->Gspos(knatra1[15], 1, "ITSV", xpos, ypos, zpos, idrotm[5115], "ONLY");
     
     
-  } else if (fMinorVersionV3 == 4) {
+  } else if (fMinorVersion == 4) {
     
     
     rzero    = 34.;
@@ -3938,7 +3959,7 @@ void AliITSv3::CreateGeometry(){
   
   //     GOTO 9123                                    ! skip hexagonal frame
   
-  if (fMinorVersionV3 == 2) {
+  if (fMinorVersion == 2) {
     
     rzero    = 33.5;
     dtra2[0] = .92;
@@ -4170,7 +4191,7 @@ void AliITSv3::CreateGeometry(){
     gMC->Gspos(knatra4[15], 1, "ITSV", xpos, ypos, zpos, idrotm[5225], "ONLY");
     
     
-  } else if (fMinorVersionV3 == 5) {
+  } else if (fMinorVersion == 5) {
     
     
     rzero    = 33.5;
@@ -4482,7 +4503,7 @@ void AliITSv3::CreateGeometry(){
   gMC->Gsvolu("RP04", "PGON", idtmed[274], dpgon, 10);
   gMC->Gspos("RP04", 1, "ITSV", xpos, ypos, zpos, 0, "ONLY");
   
-  if (fMinorVersionV3 < 3 ) {
+  if (fMinorVersion < 3 ) {
     offset2  = 5.2;
     dpgon[0] = offset2 + 360./(2.*35.);
     dpgon[1] = 360.;
@@ -4520,7 +4541,7 @@ void AliITSv3::CreateGeometry(){
     gMC->Gsvolu("RP06", "PGON", idtmed[274], dpgon, 10);
     gMC->Gspos("RP06", 1, "ITSV", xpos, ypos, zpos, 0, "ONLY");
   }
-  if (fMinorVersionV3 > 2 && fMinorVersionV3 < 6) {
+  if (fMinorVersion > 2 && fMinorVersion < 6) {
     offset2  = 5.2;
     dpgon[0] = offset2 + 5.625;
     dpgon[1] = 360.;
@@ -4637,7 +4658,7 @@ void AliITSv3::CreateGeometry(){
   gMC->Gsvolu("LP04", "PGON", idtmed[274], dpgon, 10);
   gMC->Gspos("LP04", 1, "ITSV", xpos, ypos, zpos, 0, "ONLY");
   
-  if (fMinorVersionV3 < 3) {
+  if (fMinorVersion < 3) {
     offset2  = 5.2;
     dpgon[0] = offset2 + 360./(2.*35.);
     dpgon[1] = 360.;
@@ -4675,7 +4696,7 @@ void AliITSv3::CreateGeometry(){
     gMC->Gsvolu("LP06", "PGON", idtmed[274], dpgon, 10);
     gMC->Gspos("LP06", 1, "ITSV", xpos, ypos, zpos, 0, "ONLY");
   }
-  if (fMinorVersionV3 > 2 && fMinorVersionV3 < 6) {
+  if (fMinorVersion > 2 && fMinorVersion < 6) {
     offset2  = 5.2;
     dpgon[0] = offset2 + 5.625;
     dpgon[1] = 360.;
@@ -4721,8 +4742,7 @@ void AliITSv3::CreateGeometry(){
   
   if (fEuclidOut) {
     gMC->WriteEuclid("ITSgeometry", "ITSV", 1, 5);
-  }
-  fMinorVersion = fMinorVersionV3;
+  };
 } 
 //_____________________________________________________________________________
 void AliITSv3::CreateMaterials(){
@@ -4915,7 +4935,6 @@ void AliITSv3::Init(){
 
     AliITS::Init();
     fMajorVersion = 3;
-    fMinorVersion = fMinorVersionV3;
 }
 //_____________________________________________________________________________
 void AliITSv3::StepManager(){
@@ -5055,25 +5074,3 @@ void AliITSv3::StepManager(){
   } // end if printit[layer][ladder][detector]
 #endif
 }
-//____________________________________________________________________________
-void AliITSv3::Streamer(TBuffer &R__b){
-////////////////////////////////////////////////////////////////////////
-//    A dummy Streamer function for this class AliITSv3. By default it
-// only streams the AliITS class as it is required. Since this class
-// dosen't contain any "real" data to be saved, it doesn't.
-////////////////////////////////////////////////////////////////////////
-
-   if (R__b.IsReading()) {
-      Version_t R__v = R__b.ReadVersion();
-      if (R__v==1) {
-         AliITS::Streamer(R__b);
-      }else{
-         AliITS::Streamer(R__b);
-      } // end if
-   } else {
-      R__b.WriteVersion(AliITSv3::IsA());
-      AliITS::Streamer(R__b);
-   } // end if R__b.IsReading()
-}
-
-