-#include "AliHit.h"
-#include "AliMUONConst.h"
-#include "AliDigit.h"
-#include <TVector.h>
-#include <TObjArray.h>
-
-
-static const int NCH=14;
-
-class AliMUONcluster;
-class AliMUONchamber;
-class AliMUONRecCluster;
-//----------------------------------------------
-class AliMUONgeometry
-{
- public:
- AliMUONgeometry(){}
- virtual ~AliMUONgeometry(){}
- void InitGeo(Float_t z);
- Float_t fdGas; // half gaz gap
- Float_t fdAlu; // half Alu width
- Float_t frMin; // innermost sensitive radius
- Float_t frMax; // outermost sensitive radius
- ClassDef(AliMUONgeometry,1)
-};
-//----------------------------------------------
-//
-// Chamber segmentation virtual base class
-//
-class AliMUONsegmentation :
-public TObject {
-
- public:
-
- // Set Chamber Segmentation Parameters
- virtual void SetPADSIZ(Float_t p1, Float_t p2) =0;
- virtual void SetDAnod(Float_t D) =0;
- // Transform from pad (wire) to real coordinates and vice versa
- virtual Float_t GetAnod(Float_t xhit) =0;
- virtual void GetPadIxy(Float_t x ,Float_t y ,Int_t &ix,Int_t &iy)=0;
- virtual void GetPadCxy(Int_t ix,Int_t iy,Float_t &x ,Float_t &y )=0;
- //
- // Initialisation
- virtual void Init(AliMUONchamber*) =0;
- //
- // Get member data
- virtual Float_t Dpx() =0;
- virtual Float_t Dpy() =0;
- virtual Int_t Npx() =0;
- virtual Int_t Npy() =0;
- //
- // Iterate over pads
- virtual void FirstPad(Float_t xhit, Float_t yhit, Float_t dx, Float_t dy) =0;
- virtual void NextPad()=0;
- virtual Int_t MorePads() =0;
- // Get next neighbours
- virtual void Neighbours
- (Int_t iX, Int_t iY, Int_t* Nlist, Int_t Xlist[10], Int_t Ylist[10]) =0;
- // Provisory RecCluster coordinates reconstructor
- virtual void FitXY(AliMUONRecCluster* Cluster,TClonesArray* MUONdigits) =0;
- //
- // Current pad cursor during disintegration
- virtual Int_t Ix() =0;
- virtual Int_t Iy() =0;
- virtual Int_t ISector() =0;
- //
- // Signal Generation Condition during Stepping
- virtual Int_t SigGenCond(Float_t x, Float_t y, Float_t z) = 0;
- virtual void SigGenInit(Float_t x, Float_t y, Float_t z) = 0;
- virtual void IntegrationLimits
- (Float_t& x1, Float_t& x2, Float_t& y1, Float_t& y2) = 0;
- //
- // Identification
- ClassDef(AliMUONsegmentation,1)
-};
-//----------------------------------------------
-//
-// Chamber response virtual base class
-//
-class AliMUONresponse :
-public TObject {
- public:
- //
- // Configuration methods
- virtual void SetRSIGM(Float_t p1) =0;
- virtual void SetMUCHSP(Float_t p1) =0;
- virtual void SetMUSIGM(Float_t p1, Float_t p2) =0;
- virtual void SetMAXADC(Float_t p1) =0;
- //
- // Get member data
- virtual Float_t Chslope() =0;
- virtual Float_t ChwX() =0;
- virtual Float_t ChwY() =0;
- virtual Float_t Nsigma() =0;
- virtual Float_t adc_satm() =0;
- //
- // Chamber response methods
- // Pulse height from scored quantity (eloss)
- virtual Float_t IntPH(Float_t eloss) =0;
- // Charge disintegration
- virtual Float_t IntXY(AliMUONsegmentation *) =0;
- //
- // Identification
- ClassDef(AliMUONresponse,1)
-};
-
-//----------------------------------------------
-class AliMUONchamber :
-public TObject,
-public AliMUONgeometry{
- public:
- AliMUONchamber();
- ~AliMUONchamber(){}
-//
-// Set and get GEANT id
- Int_t GetGid() {return fGid;}
- void SetGid(Int_t id) {fGid=id;}
-//
-// Initialisation and z-Position
- void Init();
- void SetZPOS(Float_t p1) {fzPos=p1;}
- Float_t ZPosition() {return fzPos;}
-//
-// Configure response model
- void ResponseModel(AliMUONresponse* thisResponse) {fResponse=thisResponse;}
-//
-// Configure segmentation model
- void SegmentationModel(Int_t i, AliMUONsegmentation* thisSegmentation) {
- (*fSegmentation)[i-1] = thisSegmentation;
- }
-//
-// Get reference to response model
- AliMUONresponse* &GetResponseModel(){return fResponse;}
-//
-// Get reference to segmentation model
- AliMUONsegmentation* GetSegmentationModel(Int_t isec) {
- return (AliMUONsegmentation *) (*fSegmentation)[isec-1];
- }
- Int_t Nsec() {return fnsec;}
- void SetNsec(Int_t nsec) {fnsec=nsec;}
-//
-// Member function forwarding to the segmentation and response models
-//
-// Calculate pulse height from energy loss
- Float_t IntPH(Float_t eloss) {return fResponse->IntPH(eloss);}
-//
-// Ask segmentation if signal should be generated
- Int_t SigGenCond(Float_t x, Float_t y, Float_t z)
- {
- if (fnsec==1) {
- return ((AliMUONsegmentation*) (*fSegmentation)[0])
- ->SigGenCond(x, y, z) ;
- } else {
- return (((AliMUONsegmentation*) (*fSegmentation)[0])
- ->SigGenCond(x, y, z)) ||
- (((AliMUONsegmentation*) (*fSegmentation)[1])
- ->SigGenCond(x, y, z)) ;
- }
- }
-//
-// Initialisation of segmentation for hit
- void SigGenInit(Float_t x, Float_t y, Float_t z)
- {
-
- if (fnsec==1) {
- ((AliMUONsegmentation*) (*fSegmentation)[0])->SigGenInit(x, y, z) ;
- } else {
- ((AliMUONsegmentation*) (*fSegmentation)[0])->SigGenInit(x, y, z) ;
- ((AliMUONsegmentation*) (*fSegmentation)[1])->SigGenInit(x, y, z) ;
- }
- }
-
-// Configuration forwarding
-//
- void SetRSIGM(Float_t p1) {fResponse->SetRSIGM(p1);}
- void SetMUCHSP(Float_t p1) {fResponse->SetMUCHSP(p1);}
- void SetMUSIGM(Float_t p1, Float_t p2) {fResponse->SetMUSIGM(p1,p2);}
- void SetMAXADC(Float_t p1) {fResponse->SetMAXADC(p1);}
-
- void SetPADSIZ(Int_t isec, Float_t p1, Float_t p2) {
- ((AliMUONsegmentation*) (*fSegmentation)[isec-1])->SetPADSIZ(p1,p2);
- }
-//
-// Cluster formation method
- void DisIntegration(Float_t, Float_t, Float_t, Int_t&x, Float_t newclust[6][500]);
- ClassDef(AliMUONchamber,1)