//
////////////////////////////////////////////////////////////////////////
-#include <Riostream.h>
-#include <TMath.h>
-
+#include "AliLog.h"
#include "AliTOFHitMap.h"
-#include "AliTOFSDigit.h"
#include "AliTOFGeometry.h"
}
////////////////////////////////////////////////////////////////////////
-AliTOFHitMap::AliTOFHitMap(TClonesArray *dig)
+AliTOFHitMap::AliTOFHitMap(TClonesArray *dig, AliTOFGeometry *tofGeom)
{
//
// ctor
// of course, these constants must not be hardwired
// change later
+ fTOFGeometry = tofGeom;
+
fNSector = AliTOFGeometry::NSectors();
fNplate = AliTOFGeometry::NPlates();
- fNstrip = AliTOFGeometry::NStripC();
+ fNstrip = fTOFGeometry->NMaxNstrip();
fNpx = AliTOFGeometry::NpadX();
fNpz = AliTOFGeometry::NpadZ();
fMaxIndex=fNSector*fNplate*fNstrip*fNpx*fNpz;
//
// Dummy copy constructor
//
- ;
+ ;
}
//
// Destructor
//
- if (fHitMap) delete[] fHitMap;
+ delete[] fHitMap;
+
+ fTOFGeometry = 0x0;
+
}
////////////////////////////////////////////////////////////////////////
// Return checked indices for vol
//
Int_t index=
- (vol[0]/*-1*/)*fNplate*fNstrip*fNpx*fNpz+ // sector
- (vol[1]/*-1*/)*fNstrip*fNpx*fNpz+ // plate
- (vol[2]/*-1*/)*fNpx*fNpz+ // strip
- (vol[3]/*-1*/)*fNpz+ // padx
- (vol[4]/*-1*/); // padz
+ vol[0]*fNplate*fNstrip*fNpx*fNpz+ // sector
+ vol[1]*fNstrip*fNpx*fNpz+ // plate
+ vol[2]*fNpx*fNpz+ // strip
+ vol[3]*fNpz+ // padx
+ vol[4]; // padz
if (index >= fMaxIndex) {
- Error("AliTOFHitMap","CheckedIndex - input outside bounds");
+ AliError("CheckedIndex - input outside bounds");
return -1;
} else {
return index;
// Dummy assignment operator
return *this;
}
-
-
-
-
-