/*
$Log$
+Revision 1.8 2001/01/17 20:53:40 hristov
+Destructors corrected to avoid memory leaks
+
+Revision 1.7 2000/12/21 22:12:41 morsch
+Clean-up of coding rule violations,
+
+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/26 19:32:04 morsch
+Problem with iteration over y-pads for 2nd cathode corrected.
+
Revision 1.4 2000/10/25 19:56:55 morsch
Handle correctly slats with less than 3 segmentation zones.
#include "AliMUONSegmentationSlatModule.h"
+#include "AliRun.h"
+#include "AliMUON.h"
#include <TMath.h>
#include <iostream.h>
AliMUONSegmentationSlatModule::AliMUONSegmentationSlatModule()
{
// Default constructor
- fNsec=4;
+}
+
+AliMUONSegmentationSlatModule::AliMUONSegmentationSlatModule(Int_t nsec)
+{
+// Non default constructor
+ fNsec = nsec;
fNDiv = new TArrayI(fNsec);
fDpxD = new TArrayF(fNsec);
(*fNDiv)[0]=(*fNDiv)[1]=(*fNDiv)[2]=(*fNDiv)[3]=0;
(*fDpxD)[0]=(*fDpxD)[1]=(*fDpxD)[2]=(*fDpxD)[3]=0;
}
+AliMUONSegmentationSlatModule::~AliMUONSegmentationSlatModule()
+{
+// Destructor
+ if (fNDiv) delete fNDiv;
+ if (fDpxD) delete fDpxD;
+}
+
void AliMUONSegmentationSlatModule::SetPcbBoards(Int_t n[4])
{
//
void AliMUONSegmentationSlatModule::
SetHit(Float_t x, Float_t y)
{
+// Set current hit
+//
fXhit = x;
fYhit = y;
Int_t AliMUONSegmentationSlatModule::MorePads()
+{
// Stopping condition for the iterator over pads
//
// Are there more pads in the integration region
-{
return (fIx != -1 || fIy != -1);
}
void AliMUONSegmentationSlatModule::Init(Int_t chamber)
{
- printf("\n Initialise Segmentation SlatModule \n");
//
// Fill the arrays fCx (x-contour) and fNpxS (ix-contour) for each sector
// These arrays help in converting from real to pad co-ordinates and
// concentric circles as shown below
//
// PCB module size in cm
+ printf("\n Initialise Segmentation SlatModule \n");
+
fDxPCB=40;
fDyPCB=40;
//
fNpx=fNpxS[3];
//
fId = chamber;
-
}