/*
$Log$
+Revision 1.23 2001/01/30 09:23:13 hristov
+Streamers removed (R.Brun)
+
+Revision 1.22 2000/10/05 20:49:59 nilsen
+Now using root generated streamers.
+
+Revision 1.14.2.9 2000/10/05 07:49:27 nilsen
+Removed hit generation from step manager.
+
+Revision 1.14.2.8 2000/07/31 13:50:37 barbera
+Updated from the release
+
+Revision 1.19 2000/07/10 16:07:19 fca
+Release version of ITS code
+
Revision 1.14.2.2 2000/05/19 10:09:21 nilsen
fix for bug with HP and Sun unix + fix for event display in ITS-working branch
#include <TFile.h> // only required for Tracking function?
#include <TCanvas.h>
#include <TObjArray.h>
+#include <TObjString.h>
#include <TClonesArray.h>
-#include "AliMC.h"
#include "AliConst.h"
+#include "AliRun.h"
+#include "AliMagF.h"
#include "AliITShit.h"
#include "AliITSv1.h"
-#include "AliRun.h"
ClassImp(AliITSv1)
////////////////////////////////////////////////////////////////////////
// Standard default constructor for the ITS version 1.
////////////////////////////////////////////////////////////////////////
- fId1N = 6;
- fId1Name = new char*[fId1N];
- fId1Name[0] = "ITS1";
- fId1Name[1] = "ITS2";
- fId1Name[2] = "ITS3";
- fId1Name[3] = "ITS4";
- fId1Name[4] = "ITS5";
- fId1Name[5] = "ITS6";
+
+ fIdN = 0;
+ fIdName = 0;
+ fIdSens = 0;
+ fMajorVersion = 1;
+ fMinorVersion = -1;
}
//_____________________________________________________________________________
AliITSv1::AliITSv1(const char *name, const char *title) : AliITS(name, title){
////////////////////////////////////////////////////////////////////////
// Standard constructor for the ITS version 1.
////////////////////////////////////////////////////////////////////////
- fId1N = 6;
- fId1Name = new char*[fId1N];
- fId1Name[0] = "ITS1";
- fId1Name[1] = "ITS2";
- fId1Name[2] = "ITS3";
- fId1Name[3] = "ITS4";
- fId1Name[4] = "ITS5";
- fId1Name[5] = "ITS6";
+
+ 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";
+ fIdName[3] = "ITS4";
+ fIdName[4] = "ITS5";
+ fIdName[5] = "ITS6";
+ fIdSens = new Int_t[fIdN];
+ for (Int_t i=0;i<fIdN;i++) fIdSens[i] = 0;
+ fMajorVersion = 1;
+ fMinorVersion = 1;
+
}
//____________________________________________________________________________
AliITSv1::AliITSv1(const AliITSv1 &source){
// Copy Constructor for ITS version 1.
////////////////////////////////////////////////////////////////////////
if(&source == this) return;
- this->fId1N = source.fId1N;
- this->fId1Name = new char*[fId1N];
- for(Int_t i=0;i<6;i++) strcpy(this->fId1Name[i],source.fId1Name[i]);
- return;
+ printf("Not allowed to copy AliITSv1\n");
+ return;
}
//_____________________________________________________________________________
AliITSv1& AliITSv1::operator=(const AliITSv1 &source){
////////////////////////////////////////////////////////////////////////
// Assignment operator for the ITS version 1.
////////////////////////////////////////////////////////////////////////
- if(&source == this) return *this;
- this->fId1N = source.fId1N;
- this->fId1Name = new char*[fId1N];
- for(Int_t i=0;i<6;i++) strcpy(this->fId1Name[i],source.fId1Name[i]);
- return *this;
+ if(&source == this) return *this;
+ printf("Not allowed to copy AliITSv1\n");
+ return *this;
}
//_____________________________________________________________________________
AliITSv1::~AliITSv1() {
////////////////////////////////////////////////////////////////////////
// Standard destructor for the ITS version 1.
////////////////////////////////////////////////////////////////////////
- delete [] fId1Name;
-}//__________________________________________________________________________
+}
+
+//__________________________________________________________________________
void AliITSv1::BuildGeometry(){
////////////////////////////////////////////////////////////////////////
// Geometry builder for the ITS version 1.
// PARAMETERS FOR SMALL (1/2) ITS
-
+/*
for (i = 0; i < 6; ++i) {
dzl[i] /= 2.;
dzb[i] /= 2.;
dzfc /= 2.;
zmax /= 2.;
xltpc /= 2.;
- acable = 15.;
-
+*/
+ acable = 15.;
// EQUAL DISTRIBUTION INTO THE 6 LAYERS
////////////////////////////////////////////////////////////////////////
// Initialise the ITS after it has been created.
////////////////////////////////////////////////////////////////////////
- Int_t i,j,l;
- fIdN = fId1N;;
- fIdName = new char*[fIdN];
- fIdSens = new Int_t[fIdN];
- for(i=0;i<fId1N;i++) {
- l = strlen(fId1Name[i]);
- fIdName[i] = new char[l+1];
- for(j=0;j<l;j++) fIdName[i][j] = fId1Name[i][j];
- fIdName[i][l] = '\0'; // Null terminate this string.
- } // end for i
//
AliITS::Init();
fMajorVersion = 1;
// Called for every step in the ITS, then calles the AliITShit class
// creator with the information to be recoreded about that hit.
////////////////////////////////////////////////////////////////////////
+/*
Int_t copy, id;
Float_t hits[8];
Int_t vol[4];
hits[6]=gMC->Edep();
hits[7]=gMC->TrackTime();
new(lhits[fNhits++]) AliITShit(fIshunt,gAlice->CurrentTrack(),vol,hits);
-}
-//____________________________________________________________________________
-void AliITSv1::Streamer(TBuffer &R__b){
-////////////////////////////////////////////////////////////////////////
-// A dummy Streamer function for this class AliITSv1. 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.
-////////////////////////////////////////////////////////////////////////
-
- printf("AliITSv1Streamer Starting\n");
- if (R__b.IsReading()) {
- Version_t R__v = R__b.ReadVersion(); if (R__v) { }
- AliITS::Streamer(R__b);
- // This information does not need to be read. It is "hard wired"
- // into this class via its creators.
- //R__b >> fId1N;
- //R__b.ReadArray(fId1Name);
- } else {
- R__b.WriteVersion(AliITSv1::IsA());
- AliITS::Streamer(R__b);
- // This information does not need to be saved. It is "hard wired"
- // into this class via its creators.
- //R__b << fId1N;
- //R__b.WriteArray(fId1Name, __COUNTER__);
- } // end if R__b.IsReading()
- printf("AliITSv1Streamer Finishing\n");
+*/
}