const Float_t AliTOFGeometry::fgkTdcBin = 24.4; // time-of-flight bin width [ps]
const Float_t AliTOFGeometry::fgkToTBin = 48.8; // time-over-threshold bin width [ps]
+const Float_t AliTOFGeometry::fgkBunchCrossingBin = fgkTdcBin * 1024; // bunch-crossing bin width [ps]
+
+const Float_t AliTOFGeometry::fgkSlewTOTMin = 10.; // min TOT for slewing correction [ns]
+const Float_t AliTOFGeometry::fgkSlewTOTMax = 16.; // max TOT for slewing correction [ns]
const Float_t AliTOFGeometry::fgkDeadTime = 25E+03; // Single channel dead time (ps)
const Float_t AliTOFGeometry::fgkMatchingWindow = fgkTdcBin*TMath::Power(2,13); // Matching window (ps)
}
//_____________________________________________________________________________
-Float_t AliTOFGeometry::DistanceToPadPar(Int_t *det, Float_t *pos, Float_t *dist3d) const
+Float_t AliTOFGeometry::DistanceToPadPar(Int_t *det, const Float_t * const pos, Float_t *dist3d) const
{
//
// Returns distance of space point with coor pos (x,y,z) (cm) wrt
}
//_____________________________________________________________________________
-Bool_t AliTOFGeometry::IsInsideThePadPar(Int_t *det, Float_t *pos) const
+Bool_t AliTOFGeometry::IsInsideThePadPar(Int_t *det, const Float_t * const pos) const
{
//
// Returns true if space point with coor pos (x,y,z) (cm) falls
}
//_____________________________________________________________________________
-Bool_t AliTOFGeometry::IsInsideThePad(TGeoHMatrix mat, Float_t *pos, Float_t *dist3d) const
+Bool_t AliTOFGeometry::IsInsideThePad(TGeoHMatrix mat, const Float_t * const pos, Float_t *dist3d) const
{
//
// Returns true if space point with coor pos (x,y,z) [cm] falls inside
}
//_____________________________________________________________________________
-void AliTOFGeometry::GetVolumePath(Int_t *ind, Char_t *path ) {
+void AliTOFGeometry::GetVolumePath(const Int_t * const ind, Char_t *path ) {
//--------------------------------------------------------------------
// This function returns the colume path of a given pad
//--------------------------------------------------------------------
pos[2]=tr[2];
}
//_____________________________________________________________________________
-Int_t AliTOFGeometry::GetPlate(Float_t *pos) const
+Int_t AliTOFGeometry::GetPlate(const Float_t * const pos) const
{
//
// Returns the Plate index
}
//_____________________________________________________________________________
-Int_t AliTOFGeometry::GetSector(Float_t *pos) const
+Int_t AliTOFGeometry::GetSector(const Float_t * const pos) const
{
//
// Returns the Sector index
}
//_____________________________________________________________________________
-Int_t AliTOFGeometry::GetStrip(Float_t *pos) const
+Int_t AliTOFGeometry::GetStrip(const Float_t * const pos) const
{
//
// Returns the Strip index
}
//_____________________________________________________________________________
-Int_t AliTOFGeometry::GetPadZ(Float_t *pos) const
+Int_t AliTOFGeometry::GetPadZ(const Float_t * const pos) const
{
//
// Returns the Pad index along Z
}
//_____________________________________________________________________________
-Int_t AliTOFGeometry::GetPadX(Float_t *pos) const
+Int_t AliTOFGeometry::GetPadX(const Float_t * const pos) const
{
//
// Returns the Pad index along X
}
//_____________________________________________________________________________
-Float_t AliTOFGeometry::GetX(Int_t *det) const
+Float_t AliTOFGeometry::GetX(const Int_t * const det) const
{
//
// Returns X coordinate (cm)
}
//_____________________________________________________________________________
-Float_t AliTOFGeometry::GetY(Int_t *det) const
+Float_t AliTOFGeometry::GetY(const Int_t * const det) const
{
//
// Returns Y coordinate (cm)
}
//_____________________________________________________________________________
-Float_t AliTOFGeometry::GetZ(Int_t *det) const
+Float_t AliTOFGeometry::GetZ(const Int_t * const det) const
{
//
// Returns Z coordinate (cm)
for (Int_t jj=0; jj<4; jj++) padToSector.MasterToLocal(&cornerPad[jj][0], &coord[jj][0]);
- delete cornerPad;
+ delete [] cornerPad;
//sectorToPad.LocalToMaster(cornerPad, coord);
}
//_____________________________________________________________________________
-Float_t AliTOFGeometry::GetPadDx(Float_t *pos)
+Float_t AliTOFGeometry::GetPadDx(const Float_t * const pos)
{
//
// Returns the x coordinate in the Pad reference frame
}
//_____________________________________________________________________________
-Float_t AliTOFGeometry::GetPadDy(Float_t *pos)
+Float_t AliTOFGeometry::GetPadDy(const Float_t * const pos)
{
//
// Returns the y coordinate in the Pad reference frame
}
//_____________________________________________________________________________
-Float_t AliTOFGeometry::GetPadDz(Float_t *pos)
+Float_t AliTOFGeometry::GetPadDz(const Float_t * const pos)
{
//
// Returns the z coordinate in the Pad reference frame
void AliTOFGeometry::InverseRotation(Float_t *xyz, Double_t rotationAngles[6]) const
{
//
- //
+ // Rotates the vector xyz acordint to the rotationAngles
//
Int_t ii=0;
}
//_____________________________________________________________________________
-Int_t AliTOFGeometry::GetIndex(Int_t *detId)
+Int_t AliTOFGeometry::GetIndex(const Int_t * const detId)
{
//Retrieve calibration channel index
Int_t isector = detId[0];
}
//-------------------------------------------------------------------------
+void AliTOFGeometry::GetStripAndModule(Int_t iStripPerSM, Int_t &iplate, Int_t &istrip)
+{
+ //
+ // Convert the serial number of the TOF strip number iStripPerSM [0,90]
+ // in module number iplate [0,4] and strip number istrip [0,14/18].
+ //
+
+ if (iStripPerSM<0 || iStripPerSM>=kNStripC+kNStripB+kNStripA+kNStripB+kNStripC) {
+ iplate = -1;
+ istrip = -1;
+ }
+ else if (iStripPerSM<kNStripC) {
+ iplate = 0;
+ istrip = iStripPerSM;
+ }
+ else if (iStripPerSM>=kNStripC && iStripPerSM<kNStripC+kNStripB) {
+ iplate = 1;
+ istrip = iStripPerSM-kNStripC;
+ }
+ else if (iStripPerSM>=kNStripC+kNStripB && iStripPerSM<kNStripC+kNStripB+kNStripA) {
+ iplate = 2;
+ istrip = iStripPerSM-kNStripC-kNStripB;
+ }
+ else if (iStripPerSM>=kNStripC+kNStripB+kNStripA && iStripPerSM<kNStripC+kNStripB+kNStripA+kNStripB) {
+ iplate = 3;
+ istrip = iStripPerSM-kNStripC-kNStripB-kNStripA;
+ }
+ else if (iStripPerSM>=kNStripC+kNStripB+kNStripA+kNStripB && iStripPerSM<kNStripC+kNStripB+kNStripA+kNStripB+kNStripC) {
+ iplate = 4;
+ istrip = iStripPerSM-kNStripC-kNStripB-kNStripA-kNStripB;
+ }
+
+
+}
+//-------------------------------------------------------------------------
+
Int_t AliTOFGeometry::GetStripNumberPerSM(Int_t iplate, Int_t istrip)
{
//
for (Int_t ii=0; ii<3; ii++) differenceT[ii] = (Float_t)(posT[ii]-padCentreT[ii]);
}
+//-------------------------------------------------------------------------
+
+Int_t AliTOFGeometry::GetTOFsupermodule(const Int_t index)
+{
+ // Return the TOF supermodule where TOF channel index is located
+
+ if (index<0 || index>=NPadXSector()*NSectors()) return -1;
+ else return index/NpadXStrip()/NStripXSector();
+
+}