X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=ITS%2FAliITSvtest.cxx;h=cb8ca2940ec2353651a121aa319764e47a5942f0;hb=f9a3ff6aa9d0d19423fe2e3f2f34dd9e7683c8fa;hp=f521af05ddadecbe53773e2b0132204ad9a8255f;hpb=9a4c6ea319cdd76fa403de9ad9605b1f871ebf9d;p=u%2Fmrichter%2FAliRoot.git diff --git a/ITS/AliITSvtest.cxx b/ITS/AliITSvtest.cxx index f521af05dda..cb8ca2940ec 100644 --- a/ITS/AliITSvtest.cxx +++ b/ITS/AliITSvtest.cxx @@ -13,49 +13,7 @@ * provided "as is" without express or implied warranty. * **************************************************************************/ -/* -$Log$ -Revision 1.7 2001/02/09 20:06:26 nilsen -Fixed bug in distructor. Can't distroy fixxed length arrays. Thanks Peter. - -Revision 1.6 2001/02/09 00:05:31 nilsen -Added fMajor/MinorVersion variables and made other changes to better make -use of the new code changes in AliITSgeom related classes. - -Revision 1.5 2001/01/30 09:23:14 hristov -Streamers removed (R.Brun) - -Revision 1.4 2001/01/18 06:25:09 barbera -ITS geometry using test Euclid files - -Revision 1.1.2.8 2000/10/05 20:28:18 nilsen -Now using root generated streamer function. - -Revision 1.1.2.7 2000/07/31 13:51:22 barbera -Updated from the release - -Revision 1.2 2000/07/10 16:07:19 fca -Release version of ITS code - -Revision 1.1.2.2 2000/03/02 21:53:36 nilsen -to make it compatable with the changes in AliRun/AliModule. - -Revision 1.1.2.1 2000/01/12 20:19:03 nilsen - The changes made with this latest inclusion of code is very large. -Many of the new files were added just in December when P. Cerello added his -SDD simulations to the distrobutions. Also added are some file of P. Skowronski -for SSD cluster finding and ghost RecPoints. None of this "new" code has been -proporly tested. Other code new to this cvs repository is explained in the -ITS Off-line web page. In general the changes are too large to give a resonable -discription of them but probably should be taken as the starting point for -the developement branch (ITS-working). - B. S. Nilsen - -Revision 1.13 1999/10/16 19:49:00 BSN -$Name$ -$Author$ -$Id$ -*/ +/* $Id$ */ /////////////////////////////////////////////////////////////////////////////// // // @@ -67,32 +25,25 @@ $Id$ // Created October 16 1999. // // // /////////////////////////////////////////////////////////////////////////////// + +#include #include #include +#include #include -#include -#include -#include -#include // only required for Tracking function? -#include -#include -#include -#include -#include -#include #include +#include -#include "AliMC.h" #include "AliRun.h" -#include "../TGeant3/TGeant3.h" #include "AliITSGeant3Geometry.h" -#include "AliITShit.h" -#include "AliITS.h" -#include "AliITSvtest.h" #include "AliITSgeom.h" -#include "AliITSgeomSPD.h" #include "AliITSgeomSDD.h" +#include "AliITSgeomSPD.h" #include "AliITSgeomSSD.h" +#include "AliITShit.h" +#include "AliITSvtest.h" +#include "AliRun.h" +#include "AliMC.h" ClassImp(AliITSvtest) @@ -104,7 +55,7 @@ AliITSvtest::AliITSvtest() { fIdN = 0; fIdName = 0; fIdSens = 0; - fEuclidOut = kFALSE; // Don't write Euclide file + SetEUCLID(kFALSE); fGeomDetOut = kFALSE; // Don't write .det file fGeomDetIn = kTRUE; // Read .det file fMajorVersion = IsVersion(); @@ -114,7 +65,7 @@ AliITSvtest::AliITSvtest() { for(i=0;i<60;i++) fEuclidGeomDet[i] = '\0'; } //____________________________________________________________________________ -AliITSvtest::AliITSvtest(const AliITSvtest &source){ +AliITSvtest::AliITSvtest(const AliITSvtest &source) : AliITS(source){ //////////////////////////////////////////////////////////////////////// // Copy Constructor for ITS test version. //////////////////////////////////////////////////////////////////////// @@ -154,7 +105,7 @@ AliITSvtest::AliITSvtest(const char *fileeuc,const char *filetme, for (Int_t i=0;i(gMC))) { +// if(gMC->IsA()!=TGeant3::Class()) { + if(strcmp(gMC->GetName(),"TGeant3")) { Error("InitAliITSgeom", "Wrong Monte Carlo. InitAliITSgeom uses TGeant3 calls"); return; } // end if cout << "Reading Geometry transformation directly from Geant 3." << endl; - const Int_t nlayers = 6; - const Int_t ndeep = 9; - Int_t itsGeomTreeNames[nlayers][ndeep],lnam[20],lnum[20]; - Int_t nlad[nlayers],ndet[nlayers]; + const Int_t kNlayers = 6; + const Int_t kndeep = 9; + Int_t itsGeomTreeNames[kNlayers][kndeep],lnam[20],lnum[20]; + Int_t nlad[kNlayers],ndet[kNlayers]; Double_t t[3],r[10]; Float_t par[20],att[20]; Int_t npar,natt,idshape,imat,imed; AliITSGeant3Geometry *ig = new AliITSGeant3Geometry(); Int_t mod,lay,lad,det,i,j,k; - char *names[nlayers][ndeep] = { + const char *names[kNlayers][kndeep] = { {"ALIC","ITSV","ITSD","IT12","I12B","I10B","I107","I101","ITS1"}, // lay=1 {"ALIC","ITSV","ITSD","IT12","I12B","I20B","I1D7","I1D1","ITS2"}, // lay=2 {"ALIC","ITSV","ITSD","IT34","I004","I302","ITS3"," "," "}, // lay=3 {"ALIC","ITSV","ITSD","IT34","I005","I402","ITS4"," "," "}, // lay=4 {"ALIC","ITSV","ITSD","IT56","I565","I562","ITS5"," "," "}, // lay=5 {"ALIC","ITSV","ITSD","IT56","I569","I566","ITS6"," "," "}};// lay=6 - Int_t itsGeomTreeCopys[nlayers][ndeep] = {{1,1,1,1,10, 2, 4, 1, 1},// lay=1 + Int_t itsGeomTreeCopys[kNlayers][kndeep] = {{1,1,1,1,10, 2, 4, 1, 1},// lay=1 {1,1,1,1,10, 4, 4, 1, 1},// lay=2 {1,1,1,1,14, 6, 1, 0, 0},// lay=3 {1,1,1,1,22, 8, 1, 0, 0},// lay=4 @@ -264,24 +216,25 @@ void AliITSvtest::InitAliITSgeom(){ // tree its self. cout << "Reading Geometry informaton from Geant3 common blocks" << endl; for(i=0;i<20;i++) lnam[i] = lnum[i] = 0; - for(i=0;iStringToInt(names[i][j]); + for(i=0;iStringToInt(names[i][j]); mod = 0; - for(i=0;iGetGeometry(ndeep,lnam,lnum,t,r,idshape,npar,natt, + ig->GetGeometry(kndeep,lnam,lnum,t,r,idshape,npar,natt, par,att,imat,imed); - fITSgeom->CreatMatrix(mod,lay,lad,det,kSPD,t,r); - if(!(fITSgeom->IsShapeDefined((Int_t)kSPD))) + GetITSgeom()->CreatMatrix(mod,lay,lad,det,kSPD,t,r); + if(!(GetITSgeom()->IsShapeDefined((Int_t)kSPD))) if(fMinorVersion==1){ - fITSgeom->ReSetShape(kSPD, + GetITSgeom()->ReSetShape(kSPD, new AliITSgeomSPD425Short()); } else if(fMinorVersion==2) - fITSgeom->ReSetShape(kSPD, + GetITSgeom()->ReSetShape(kSPD, new AliITSgeomSPD425Short()); } // end for det } // end for k @@ -318,19 +271,19 @@ void AliITSvtest::InitAliITSgeom(){ par,att,imat,imed); switch (lay){ case 3: case 4: - fITSgeom->CreatMatrix(mod,lay,lad,det,kSDD,t,r); - if(!(fITSgeom->IsShapeDefined(kSDD))) - fITSgeom->ReSetShape(kSDD,new AliITSgeomSDD256()); + GetITSgeom()->CreatMatrix(mod,lay,lad,det,kSDD,t,r); + if(!(GetITSgeom()->IsShapeDefined(kSDD))) + GetITSgeom()->ReSetShape(kSDD,new AliITSgeomSDD256()); break; case 5: - fITSgeom->CreatMatrix(mod,lay,lad,det,kSSD,t,r); - if(!(fITSgeom->IsShapeDefined(kSSD))) - fITSgeom->ReSetShape(kSSD,new AliITSgeomSSD275and75()); + GetITSgeom()->CreatMatrix(mod,lay,lad,det,kSSD,t,r); + if(!(GetITSgeom()->IsShapeDefined(kSSD))) + GetITSgeom()->ReSetShape(kSSD,new AliITSgeomSSD275and75()); break; case 6: - fITSgeom->CreatMatrix(mod,lay,lad,det,kSSDp,t,r); - if(!(fITSgeom->IsShapeDefined(kSSDp))) - fITSgeom->ReSetShape(kSSDp,new AliITSgeomSSD75and275()); + GetITSgeom()->CreatMatrix(mod,lay,lad,det,kSSD,t,r); + if(!(GetITSgeom()->IsShapeDefined(kSSD))) + GetITSgeom()->ReSetShape(kSSD,new AliITSgeomSSD75and275()); break; } // end switch } // end for det @@ -353,11 +306,11 @@ void AliITSvtest::Init(){ // if(fRead[0]=='\0') strncpy(fRead,fEuclidGeomDet,60); if(fWrite[0]=='\0') strncpy(fWrite,fEuclidGeomDet,60); - if(fITSgeom!=0) delete fITSgeom; - fITSgeom = new AliITSgeom(); - if(fGeomDetIn) fITSgeom->ReadNewFile(fRead); + if(GetITSgeom()!=0) SetITSgeom(0x0); + SetITSgeom(new AliITSgeom()); + if(fGeomDetIn) GetITSgeom()->ReadNewFile(fRead); if(!fGeomDetIn) this->InitAliITSgeom(); - if(fGeomDetOut) fITSgeom->WriteNewFile(fWrite); + if(fGeomDetOut) GetITSgeom()->WriteNewFile(fWrite); AliITS::Init(); // for(i=0;i<72;i++) cout << "*"; @@ -456,7 +409,7 @@ void AliITSvtest::StepManager(){ hits[6]=gMC->Edep(); hits[7]=gMC->TrackTime(); // Fill hit structure with this new hit. - new(lhits[fNhits++]) AliITShit(fIshunt,gAlice->CurrentTrack(),vol,hits); + new(lhits[fNhits++]) AliITShit(fIshunt,gAlice->GetMCApp()->GetCurrentTrackNumber(),vol,hits); return; }