Code from MUON-dev joined
[u/mrichter/AliRoot.git] / MUON / AliMUONSegmentation.h
CommitLineData
a9e2aefa 1#ifndef ALIMUONSEGMENTATION_H
2#define ALIMUONSEGMENTATION_H
3da30618 3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id$ */
7
a897a37a 8#include "TObject.h"
a9e2aefa 9
10class TF1;
11class AliMUONChamber;
12class AliMUONRecCluster;
a897a37a 13
14//----------------------------------------------
15//
16// Chamber segmentation virtual base class
17//
a9e2aefa 18class AliMUONSegmentation :
a897a37a 19public TObject {
20 public:
21 // Set Chamber Segmentation Parameters
22 //
23 // Pad size Dx*Dy
a9e2aefa 24 virtual void SetPadSize(Float_t p1, Float_t p2) =0;
a897a37a 25 // Anod Pitch
26 virtual void SetDAnod(Float_t D) =0;
27 // Transform from pad (wire) to real coordinates and vice versa
28 //
29 // Anod wire coordinate closest to xhit
30 virtual Float_t GetAnod(Float_t xhit) =0;
31 // Transform from pad to real coordinates
32 virtual void GetPadIxy(Float_t x ,Float_t y ,Int_t &ix,Int_t &iy)=0;
33 // Transform from real to pad coordinates
34 virtual void GetPadCxy(Int_t ix,Int_t iy,Float_t &x ,Float_t &y )=0;
35 //
36 // Initialisation
a9e2aefa 37 virtual void Init(AliMUONChamber*) =0;
a897a37a 38 //
39 // Get member data
40 //
41 // Pad size in x
42 virtual Float_t Dpx() =0;
43 // Pad size in y
44 virtual Float_t Dpy() =0;
45 // Pad size in x by Sector
46 virtual Float_t Dpx(Int_t) =0;
47 // Pad size in y by Sector
48 virtual Float_t Dpy(Int_t) =0;
a9e2aefa 49 // Maximum number of Pads in x
a897a37a 50 virtual Int_t Npx() =0;
a9e2aefa 51 // Maximum number of Pads in y
a897a37a 52 virtual Int_t Npy() =0;
a9e2aefa 53 // Set pad position
a897a37a 54 virtual void SetPad(Int_t, Int_t) =0;
a9e2aefa 55 // Set hit position
a897a37a 56 virtual void SetHit(Float_t, Float_t) =0;
57
58 //
59 // Iterate over pads
60 // Initialiser
61 virtual void FirstPad(Float_t xhit, Float_t yhit, Float_t dx, Float_t dy) =0;
62 // Stepper
63 virtual void NextPad() =0;
64 // Condition
65 virtual Int_t MorePads() =0;
66 //
67 // Distance between 1 pad and a position
68 virtual Float_t Distance2AndOffset(Int_t iX, Int_t iY, Float_t X, Float_t Y, Int_t *dummy) =0;
69 // Number of pads read in parallel and offset to add to x
70 // (specific to LYON, but mandatory for display)
71 virtual void GetNParallelAndOffset(Int_t iX, Int_t iY,
72 Int_t *Nparallel, Int_t *Offset) =0;
73 // Get next neighbours
74 virtual void Neighbours
75 (Int_t iX, Int_t iY, Int_t* Nlist, Int_t Xlist[10], Int_t Ylist[10]) =0;
a9e2aefa 76 //
a897a37a 77 // Current pad cursor during disintegration
78 // x-coordinate
79 virtual Int_t Ix() =0;
80 // y-coordinate
81 virtual Int_t Iy() =0;
82 // current sector
83 virtual Int_t ISector() =0;
84 // calculate sector from pad coordinates
85 virtual Int_t Sector(Int_t ix, Int_t iy) =0;
86 //
87 // Signal Generation Condition during Stepping
88 virtual Int_t SigGenCond(Float_t x, Float_t y, Float_t z) = 0;
a9e2aefa 89 // Initialise signal generation at coord (x,y,z)
a897a37a 90 virtual void SigGenInit(Float_t x, Float_t y, Float_t z) = 0;
91 // Current integration limits
92 virtual void IntegrationLimits
93 (Float_t& x1, Float_t& x2, Float_t& y1, Float_t& y2) = 0;
94 // Test points for auto calibration
95 virtual void GiveTestPoints(Int_t &n, Float_t *x, Float_t *y) = 0;
a9e2aefa 96 // Draw the segmentation zones
97 virtual void Draw() = 0;
a897a37a 98 // Function for systematic corrections
a9e2aefa 99 // Set the correction function
a897a37a 100 virtual void SetCorrFunc(Int_t, TF1*) = 0;
a9e2aefa 101 // Get the correction Function
a897a37a 102 virtual TF1* CorrFunc(Int_t) = 0;
103
a9e2aefa 104 ClassDef(AliMUONSegmentation,1) //Segmentation virtual base class
a897a37a 105};
106#endif