X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=blobdiff_plain;f=MUON%2FAliMUONChamber.cxx;h=805c2b4d801ae5c44f3d3197523d7ca706c821ba;hp=29b3a4734f8ff45927a017a15300970499faa355;hb=a30a000fda6ccf10620ecf96d42273b8ab83723b;hpb=a9e2aefa97f1153d6f61e580a32d396156706b7b;ds=inline diff --git a/MUON/AliMUONChamber.cxx b/MUON/AliMUONChamber.cxx index 29b3a4734f8..805c2b4d801 100644 --- a/MUON/AliMUONChamber.cxx +++ b/MUON/AliMUONChamber.cxx @@ -14,6 +14,22 @@ **************************************************************************/ /* $Log$ +Revision 1.4 2000/06/29 12:34:09 morsch +AliMUONSegmentation class has been made independent of AliMUONChamber. This makes +it usable with any other geometry class. The link to the object to which it belongs is +established via an index. This assumes that there exists a global geometry manager +from which the pointer to the parent object can be obtained (in our case gAlice). + +Revision 1.3 2000/06/28 15:16:35 morsch +(1) Client code adapted to new method signatures in AliMUONSegmentation (see comments there) +to allow development of slat-muon chamber simulation and reconstruction code in the MUON +framework. The changes should have no side effects (mostly dummy arguments). +(2) Hit disintegration uses 3-dim hit coordinates to allow simulation +of chambers with overlapping modules (MakePadHits, Disintegration). + +Revision 1.2 2000/06/15 07:58:48 morsch +Code from MUON-dev joined + Revision 1.1.2.5 2000/06/09 21:27:01 morsch Most coding rule violations corrected. @@ -25,24 +41,38 @@ Log messages included */ #include "AliMUONChamber.h" -#include "AliMUONSegmentation.h" #include "AliMUONResponse.h" #include "TMath.h" ClassImp(AliMUONChamber) - AliMUONChamber::AliMUONChamber() + AliMUONChamber::AliMUONChamber() +{ +// Default constructor + fSegmentation = new TObjArray(2); + (*fSegmentation)[0] = 0; + (*fSegmentation)[1] = 0; + fResponse=0; + fnsec=1; + fReconstruction=0; + fId=0; +} + + AliMUONChamber::AliMUONChamber(Int_t id) { +// Construtor with chamber id fSegmentation = new TObjArray(2); (*fSegmentation)[0] = 0; (*fSegmentation)[1] = 0; fResponse=0; fnsec=1; fReconstruction=0; + fId=id; } AliMUONChamber::~AliMUONChamber() { +// Destructor if (fSegmentation) delete fSegmentation; } @@ -59,11 +89,11 @@ void AliMUONChamber::Init() // // ... for chamber segmentation if ((*fSegmentation)[0]) - ((AliMUONSegmentation *) (*fSegmentation)[0])->Init(this); + ((AliSegmentation *) (*fSegmentation)[0])->Init(fId); if (fnsec==2) { if ((*fSegmentation)[1]) - ((AliMUONSegmentation *) (*fSegmentation)[1])->Init(this); + ((AliSegmentation *) (*fSegmentation)[1])->Init(fId); } } @@ -71,12 +101,12 @@ Int_t AliMUONChamber::SigGenCond(Float_t x, Float_t y, Float_t z) { // Ask segmentation if signal should be generated if (fnsec==1) { - return ((AliMUONSegmentation*) (*fSegmentation)[0]) + return ((AliSegmentation*) (*fSegmentation)[0]) ->SigGenCond(x, y, z) ; } else { - return (((AliMUONSegmentation*) (*fSegmentation)[0]) + return (((AliSegmentation*) (*fSegmentation)[0]) ->SigGenCond(x, y, z)) || - (((AliMUONSegmentation*) (*fSegmentation)[1]) + (((AliSegmentation*) (*fSegmentation)[1]) ->SigGenCond(x, y, z)) ; } } @@ -88,15 +118,15 @@ void AliMUONChamber::SigGenInit(Float_t x, Float_t y, Float_t z) // Initialisation of segmentation for hit // if (fnsec==1) { - ((AliMUONSegmentation*) (*fSegmentation)[0])->SigGenInit(x, y, z) ; + ((AliSegmentation*) (*fSegmentation)[0])->SigGenInit(x, y, z) ; } else { - ((AliMUONSegmentation*) (*fSegmentation)[0])->SigGenInit(x, y, z) ; - ((AliMUONSegmentation*) (*fSegmentation)[1])->SigGenInit(x, y, z) ; + ((AliSegmentation*) (*fSegmentation)[0])->SigGenInit(x, y, z) ; + ((AliSegmentation*) (*fSegmentation)[1])->SigGenInit(x, y, z) ; } } void AliMUONChamber::DisIntegration(Float_t eloss, Float_t tof, - Float_t xhit, Float_t yhit, + Float_t xhit, Float_t yhit, Float_t zhit, Int_t& nnew,Float_t newclust[6][500]) { // @@ -118,9 +148,9 @@ void AliMUONChamber::DisIntegration(Float_t eloss, Float_t tof, nnew=0; for (Int_t i=1; i<=fnsec; i++) { qcheck=0; - AliMUONSegmentation * segmentation= - (AliMUONSegmentation *) (*fSegmentation)[i-1]; - for (segmentation->FirstPad(xhit, yhit, dx, dy); + AliSegmentation * segmentation= + (AliSegmentation *) (*fSegmentation)[i-1]; + for (segmentation->FirstPad(xhit, yhit, zhit, dx, dy); segmentation->MorePads(); segmentation->NextPad()) {