]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Removed all geometry & segmentation info:
authorivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 22 Nov 2005 14:01:05 +0000 (14:01 +0000)
committerivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 22 Nov 2005 14:01:05 +0000 (14:01 +0000)
 - Rmin, Rmax, Z have to be taken from AliMUONConstants
 - AliMUONGeometryModules - from AliMUONGeometry
 - AliMUONGeometrySegmentations - from AliMUONSegmentation

MUON/AliMUONChamber.cxx
MUON/AliMUONChamber.h

index 6b298994e3c46b2ceb6ca3a8d1330d86e7f50cda..03a0e844f214bba518e8e8389604bb51489fc442 100644 (file)
@@ -24,7 +24,7 @@
 // --- MUON includes ---
 #include "AliMUON.h"
 #include "AliMUONChamber.h"
-#include "AliMUONGeometryModule.h"
+#include "AliMUONSegmentation.h"
 #include "AliMUONHit.h"
 #include "AliLog.h"
 
@@ -33,33 +33,21 @@ ClassImp(AliMUONChamber)
 AliMUONChamber::AliMUONChamber()
   : TObject(), 
     fId(0),
-    fdGas(0.),
-    fdAlu(0.),
-    fZ(0.),
-    frMin(0.),
-    frMax(0.),
     fCurrentCorrel(1), // to avoid mistakes if ChargeCorrelInit is not called
-    fSegmentation2(0),
     fResponse(0),
-    fGeometry(0),
     fMUON(0)
 {
 // Default constructor
+
+  AliDebug(1, Form("default (empty) ctor this = %p", this));
 }
 
 //_______________________________________________________
 AliMUONChamber::AliMUONChamber(Int_t id) 
   : TObject(), 
     fId(id),
-    fdGas(0.),
-    fdAlu(0.),
-    fZ(0.),
-    frMin(0.),
-    frMax(0.),
     fCurrentCorrel(1), // to avoid mistakes if ChargeCorrelInit is not called
-    fSegmentation2(0),
     fResponse(0),
-    fGeometry(0),
     fMUON(0)
 {
 
@@ -70,13 +58,7 @@ AliMUONChamber::AliMUONChamber(Int_t id)
       return;
     }  
 
-    // new segmentation
-    fSegmentation2 = new TObjArray(2);
-    fSegmentation2->AddAt(0,0);
-    fSegmentation2->AddAt(0,1);
-    fGeometry = new AliMUONGeometryModule(fId);
-
+  AliDebug(1, Form("ctor this = %p", this) ); 
 }
 
 //_______________________________________________________
@@ -94,12 +76,7 @@ AliMUONChamber::~AliMUONChamber()
 {
   // Destructor
 
-  if (fSegmentation2) {
-    fSegmentation2->Delete();
-    delete fSegmentation2;
-  }
-  
-  delete fGeometry;
+  AliDebug(1, Form("dtor this = %p", this));
 }
 
 //_______________________________________________________
@@ -114,16 +91,6 @@ AliMUONChamber & AliMUONChamber::operator =(const AliMUONChamber& rhs)
   return *this;  
 }
 
-//_______________________________________________________
-Bool_t  AliMUONChamber::IsSensId(Int_t volId) const 
-{
-  // Returns true if the volume specified by volId is in the list
-  // of sesitive volumes for this chamber
-
-  return fGeometry->IsSensitiveVolume(volId);
-}  
-
-
 //_____________________________________________________
 void AliMUONChamber::ChargeCorrelationInit() {
   // Initialisation of charge correlation for current hit
@@ -134,48 +101,6 @@ void AliMUONChamber::ChargeCorrelationInit() {
     fCurrentCorrel = TMath::Exp(gRandom->Gaus(0,fResponse->ChargeCorrel()/2));
 }
 
-//_______________________________________________________
-void AliMUONChamber::InitGeo(Float_t /*zpos*/)
-{
-  //    sensitive gas gap
-  fdGas= 0.5;
-  //    3% radiation length of aluminum (X0=8.9 cm)      
-  fdAlu= 3.0/100*8.9;
-}
-//_______________________________________________________
-//
-//                  NEW SEGMENTATION
-//_______________________________________________________
-void AliMUONChamber::Init(Int_t flag)
-{
-  // Initalisation ..
-  //
-  // ... for chamber segmentation
-
-  if (!flag)    AliFatal("wrong segmentation type.");
-
-  if (fSegmentation2->At(0)) 
-    ((AliMUONGeometrySegmentation*) fSegmentation2->At(0))->Init(fId);
-  if (fSegmentation2->At(1))
-    ((AliMUONGeometrySegmentation*) fSegmentation2->At(1))->Init(fId);
-}
-// //_________________________________________________________________
-// void    AliMUONChamber::SigGenInit(AliMUONHit *hit)
-// {
-//   //
-//   // Initialisation of segmentation for hit
-//   //  
-//   Float_t x = hit->X();
-//   Float_t y = hit->Y();
-//   Float_t z = hit->Z();
-//   Int_t  id = hit->DetElemId();
-
-//   ((AliMUONGeometrySegmentation*) fSegmentation2->At(0))->SigGenInit(id, x, y, z) ;
-//   ((AliMUONGeometrySegmentation*) fSegmentation2->At(1))->SigGenInit(id, x, y, z) ;
-
-// }
-
 //_______________________________________________________
 void AliMUONChamber::DisIntegration(AliMUONHit *hit, 
                                    Int_t& nnew,Float_t newclust[6][500]) 
@@ -208,9 +133,9 @@ void AliMUONChamber::DisIntegration(AliMUONHit *hit,
   // Cathode plane loop
   for (Int_t i = 1; i <= 2; i++) {
     Float_t qcath = qtot * (i==1? fCurrentCorrel : 1/fCurrentCorrel);
-
+    
     AliMUONGeometrySegmentation* segmentation=
-      (AliMUONGeometrySegmentation*) fSegmentation2->At(i-1);
+      fMUON->GetSegmentation()->GetModuleSegmentation(fId, i-1); 
 
     for (segmentation->FirstPad(id, xhit, yhit, zhit, dx, dy); 
         segmentation->MorePads(id); 
index f8a013fe1d9a1311422acd9be60fbf5b19ef49b2..68be8d6e76b8492dc430e53b4f1577c8fd39702d 100644 (file)
@@ -17,7 +17,6 @@
 #include "AliMUONGeometrySegmentation.h"
 
 class AliMUONClusterFinderVS;
-class AliMUONGeometryModule;
 class AliMUON;
 class AliMUONHit;
 
@@ -34,52 +33,19 @@ class AliMUONChamber : public TObject
   virtual Int_t   GetId() const {return fId;}
 //
 
-// Get chamber Id
-  virtual Bool_t  IsSensId(Int_t volId) const;
-  
-// Initialisation
-  virtual void    Init(Int_t flag);
-// Set z-position of chamber  
-  virtual void    SetZ(Float_t Z) {fZ = Z;}
-// Get z-position of chamber  
-  virtual Float_t Z() const {return fZ;}
-// Set inner radius of sensitive volume 
-  virtual void SetRInner(Float_t rmin) {frMin=rmin;}
-// Set outer radius of sensitive volum  
-  virtual void SetROuter(Float_t rmax) {frMax=rmax;}  
-
-// Return inner radius of sensitive volume 
-  virtual  Float_t RInner() const      {return frMin;}
-// Return outer radius of sensitive volum  
-  virtual Float_t ROuter() const       {return frMax;}  
 //  
 // Set response model
   virtual void    SetResponseModel(AliMUONResponse* thisResponse) {fResponse=thisResponse;}
 //  
-// Set segmentation model
-  virtual void    SetSegmentationModel(Int_t isec, AliMUONGeometrySegmentation* thissegmentation) {
-      fSegmentation2->AddAt(thissegmentation,isec-1);
-  }
-//  
 //  Get pointer to response model
   virtual AliMUONResponse* &ResponseModel(){return fResponse;}
-//  
-//  Get reference to segmentation model
-  virtual AliMUONGeometrySegmentation*  SegmentationModel2(Int_t isec) {
-      return (AliMUONGeometrySegmentation*) (*fSegmentation2)[isec-1];
-  }
 
 //
 // Member function forwarding to the segmentation and response models
 //
 // Calculate pulse height from energy loss  
   virtual Float_t IntPH(Float_t eloss) {return fResponse->IntPH(eloss);}
-//  
-// Ask segmentation if signal should be generated  
-//  virtual Int_t   SigGenCond(AliMUONHit* hit);
-//
-// Initialisation of segmentation for hit  
-//  virtual void    SigGenInit(AliMUONHit* hit);
+
 // Initialisation of charge fluctuation for given hit
   virtual void    ChargeCorrelationInit();
 
@@ -99,37 +65,18 @@ class AliMUONChamber : public TObject
 // Cluster formation method (charge disintegration)
   virtual void   DisIntegration(AliMUONHit* hit,
                                Int_t& x, Float_t newclust[6][500]);
-// Initialize geometry related parameters  
-  virtual void    InitGeo(Float_t z);
 //
-  virtual Float_t DGas() const {return fdGas;}
-  virtual Float_t DAlu() const {return fdAlu;}  
-  virtual void SetDGas(Float_t DGas) {fdGas = DGas;}
-  virtual void SetDAlu(Float_t DAlu) {fdAlu = DAlu;}  
   virtual void SetChargeCorrel(Float_t correl) {fResponse->SetChargeCorrel(correl);}
 
-// geometry  
-  void SetGeometry(AliMUONGeometryModule* geometry) {fGeometry = geometry;}
-  AliMUONGeometryModule* GetGeometry() const {return fGeometry; }
-
-  
  protected:
   AliMUONChamber(const AliMUONChamber & rChamber);
   // assignment operator  
   AliMUONChamber& operator =(const AliMUONChamber& rhs);
 
   Int_t   fId;   // chamber number
-  Float_t fdGas; // half gaz gap
-  Float_t fdAlu; // half Alu width  
-  Float_t fZ;    // Z position (cm)
-  Float_t frMin; // innermost sensitive radius
-  Float_t frMax; // outermost sensitive radius
   Float_t fCurrentCorrel; //! charge correlation for current hit.
 
-  TObjArray              *fSegmentation2;   // pointer to geometry segmentation bending & NBending
-
   AliMUONResponse        *fResponse;        // pointer to response
-  AliMUONGeometryModule  *fGeometry;        // pointer to geometry
   AliMUON                *fMUON;            // pointer to MUON
   ClassDef(AliMUONChamber,3) // Muon tracking chamber class
 };