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