/*
$Log$
+Revision 1.10 2001/01/23 18:58:19 hristov
+Initialisation of some pointers
+
+Revision 1.9 2001/01/17 20:53:40 hristov
+Destructors corrected to avoid memory leaks
+
+Revision 1.8 2000/12/21 22:12:41 morsch
+Clean-up of coding rule violations,
+
+Revision 1.7 2000/11/08 13:01:40 morsch
+Chamber half-planes of stations 3-5 at different z-positions.
+
+Revision 1.6 2000/11/06 09:20:43 morsch
+AliMUON delegates part of BuildGeometry() to AliMUONSegmentation using the
+Draw() method. This avoids code and parameter replication.
+
Revision 1.5 2000/10/23 13:37:40 morsch
Correct z-position of slat planes.
AliMUONSegmentationSlat::AliMUONSegmentationSlat()
{
// Default constructor
+}
+
+AliMUONSegmentationSlat::AliMUONSegmentationSlat(Int_t nsec)
+{
+// Non default constructor
fSlats=0;
- fNDiv = new TArrayI(4);
+ fNDiv = new TArrayI(4);
+ fChamber = 0;
+ fCurrentSlat = 0;
+}
+
+AliMUONSegmentationSlat::~AliMUONSegmentationSlat(){
+ //PH Delete TObjArrays
+ if (fSlats) {
+ fSlats->Delete();
+ delete fSlats;
+ }
+
+ if (fNDiv) {
+ delete fNDiv;
+ }
+
}
void AliMUONSegmentationSlat::SetPadSize(Float_t p1, Float_t p2)
// positive side is shifted up
// by half the overlap
zlocal = z-fChamber->Z();
+ zlocal = (x>0) ? zlocal-2.*fDz : zlocal+2.*fDz;
// Set the signs for the symmetry transformation and transform to first quadrant
SetSymmetry(x);
Float_t xabs=TMath::Abs(x);
x = (xlocal+fXPosition[islat])*fSym;
y=(ylocal+fYPosition[islat]);
- z = (TMath::Even(islat)) ? -fDz : fDz ;
+ z = (TMath::Even(islat)) ? -fDz : fDz ;
+ z = (x>0) ? z+2.*fDz : z-2.*fDz ;
+
z+=fChamber->Z();
}
x=x*TMath::Sign(1,ix);
// z-position
- z = (TMath::Even(islat)) ? -fDz : fDz ;
+ z = (TMath::Even(islat)) ? -fDz : fDz ;
+ z = (x>0) ? z+2.*fDz : z-2.*fDz ;
z += fChamber->Z();
}
Int_t AliMUONSegmentationSlat::Sector(Int_t ix, Int_t iy)
{
+// Returns sector for pad coordiantes (ix,iy)
Int_t ixlocal, iylocal, iregion, islat;
GlobalToLocal(ix,iy,islat,ixlocal,iylocal);
CreateSlatModule()
{
// Factory method for slat module
- return new AliMUONSegmentationSlatModule();
+ return new AliMUONSegmentationSlatModule(4);
}
void AliMUONSegmentationSlat::Draw(const char* opt) const
{
+// Draw method for event display
+//
if (!strcmp(opt,"eventdisplay")) {
const int kColorMUON1 = kYellow;
const int kColorMUON2 = kBlue;