#include "AliITS.h"
#include "AliITShit.h"
#include "AliITSmodule.h"
-#include "AliITSgeom.h"
+#include "AliITSgeomTGeo.h"
ClassImp(AliITSmodule)
// Constructors and deconstructor
//________________________________________________________________________
//
-AliITSmodule::AliITSmodule() {
+AliITSmodule::AliITSmodule():
+fITS(0),
+fIndex(0),
+fHitsM(0),
+fTrackIndex(0),
+fHitIndex(0) {
// constructor
- fHitsM = 0;
- fTrackIndex = 0;
- fHitIndex = 0;
- fITS = 0;
-
}
//_________________________________________________________________________
-AliITSmodule::AliITSmodule(Int_t index) {
+AliITSmodule::AliITSmodule(Int_t index):
+fITS(0),
+fIndex(index),
+fHitsM(0),
+fTrackIndex(0),
+fHitIndex(0) {
// constructor
- fIndex = index;
fHitsM = new TObjArray();
fTrackIndex = new TArrayI(16);
fHitIndex = new TArrayI(16);
fITS = 0; // We don't delete this pointer since it is just a copy.
}
//____________________________________________________________________________
-AliITSmodule::AliITSmodule(const AliITSmodule &source):TObject(source){
+AliITSmodule::AliITSmodule(const AliITSmodule &source):TObject(source),
+fITS(source.fITS),
+fIndex(source.fIndex),
+fHitsM(source.fHitsM),
+fTrackIndex(source.fTrackIndex),
+fHitIndex(source.fHitIndex){
////////////////////////////////////////////////////////////////////////
// Copy Constructor
////////////////////////////////////////////////////////////////////////
- Error("AliITSmodule","AliITSmodule class has not to be copied! Exit.");
- exit(1);
+
}
//_____________________________________________________________________________
AliITSmodule& AliITSmodule::operator=(const AliITSmodule &source){
////////////////////////////////////////////////////////////////////////
// Assignment operator
////////////////////////////////////////////////////////////////////////
- if(&source == this) return *this;
- Error("AliITSmodule","AliITSmodule class has not to be copied! Exit.");
- exit(1);
- return *this; // fake return neded on Sun
+ this->~AliITSmodule();
+ new(this) AliITSmodule(source);
+ return *this;
}
//_________________________________________________________________________
//
return fNhitsM;
}
//___________________________________________________________________________
-Double_t AliITSmodule::PathLength(Int_t index,AliITShit *itsHit1,
- AliITShit *itsHit2) {
+Double_t AliITSmodule::PathLength(const AliITShit *itsHit1,
+ const AliITShit *itsHit2) {
// path lenght
Float_t x1g,y1g,z1g;
Float_t x2g,y2g,z2g;
Double_t s;
- index = 0;
itsHit1->GetPositionG(x1g,y1g,z1g);
itsHit2->GetPositionG(x2g,y2g,z2g);
return s;
}
//___________________________________________________________________________
-void AliITSmodule::PathLength(Int_t index,
- Float_t x,Float_t y,Float_t z,
+void AliITSmodule::PathLength(Float_t x,Float_t y,Float_t z,
Int_t status,Int_t &nseg,
Float_t &x1,Float_t &y1,Float_t &z1,
Float_t &dx1,Float_t &dy1,Float_t &dz1,
// path length
static Float_t x0,y0,z0;
- index = 0;
if ((status&0x0002)!=0){ // entering
x0 = x;
y0 = y;
// passing through a volume. Returns kFALSE untill the the track leaves
// the volume.
// median hit
- AliITSgeom *gm = fITS->GetITSgeom();
Float_t x1l=0.,y1l=0.,z1l=0.;
Float_t x2l=0.,y2l=0.,z2l=0.;
Float_t xMl,yMl=0,zMl;
- Float_t l[3], g[3];
+ Double_t l[3], g[3];
h1->GetPositionG(x1l,y1l,z1l);
h2->GetPositionG(x2l,y2l,z2l);
l[0] = xMl;
l[1] = yMl;
l[2] = zMl;
- gm->LtoG(h1->GetModule(),l,g);
+ AliITSgeomTGeo::LocalToGlobal(h1->GetModule(),l,g);
x = g[0];
y = g[1];
z = g[2];
Float_t hitx2,Float_t hity2,Float_t hitz2,
Float_t &xMg, Float_t &yMg, Float_t &zMg){
// median hit
- AliITSgeom *gm = fITS->GetITSgeom();
Float_t x1l,y1l,z1l;
Float_t x2l,y2l,z2l;
Float_t xMl,yMl=0,zMl;
- Float_t l[3], g[3];
+ Double_t l[3], g[3];
g[0] = hitx1;
g[1] = hity1;
g[2] = hitz1;
- gm->GtoL(index,g,l);
+ AliITSgeomTGeo::GlobalToLocal(index,g,l);
x1l = l[0];
y1l = l[1];
z1l = l[2];
g[0] = hitx2;
g[1] = hity2;
g[2] = hitz2;
- gm->GtoL(index,g,l);
+ AliITSgeomTGeo::GlobalToLocal(index,g,l);
x2l = l[0];
y2l = l[1];
z2l = l[2];
l[0] = xMl;
l[1] = yMl;
l[2] = zMl;
- gm->LtoG(index,l,g);
+ AliITSgeomTGeo::LocalToGlobal(index,l,g);
xMg = g[0];
yMg = g[1];
zMg = g[2];
//___________________________________________________________________________
void AliITSmodule::GetID(Int_t &lay,Int_t &lad,Int_t &det){
// get ID
- fITS->GetITSgeom()->GetModuleId(fIndex,lay,lad,det);
- return ;
+ AliITSgeomTGeo::GetModuleId(fIndex,lay,lad,det);
+ return ;
}