New code from Piergiorgio added
[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 //
aee8290b 21 virtual ~AliSegmentation() {}
6133b573 22 // Pad size Dx*Dy
23 virtual void SetPadSize(Float_t p1, Float_t p2) = 0;
24 // Anod Pitch
25 virtual void SetDAnod(Float_t D) = 0;
26 // Transform from pad (wire) to real coordinates and vice versa
27 //
28 // Anod wire coordinate closest to xhit
29 virtual Float_t GetAnod(Float_t xhit) = 0;
30 // Transform from pad to real coordinates
31 virtual void GetPadI(Float_t x, Float_t y, Float_t z, Int_t &ix, Int_t &iy) = 0;
32 // Transform from real to pad coordinates
33 virtual void GetPadC(Int_t ix, Int_t iy, Float_t &x, Float_t &y, Float_t &z) = 0;
34 //
35 // Initialisation
36 virtual void Init(Int_t chamber) = 0;
37 //
38 // Get member data
39 //
40 // Pad size in x
41 virtual Float_t Dpx() = 0;
42 // Pad size in y
43 virtual Float_t Dpy() = 0;
44 // Pad size in x by Sector
45 virtual Float_t Dpx(Int_t) = 0;
46 // Pad size in y by Sector
47 virtual Float_t Dpy(Int_t) = 0;
48 // Maximum number of Pads in x
49 virtual Int_t Npx() = 0;
50 // Maximum number of Pads in y
51 virtual Int_t Npy() = 0;
52 // Set pad position
53 virtual void SetPad(Int_t, Int_t) = 0;
54 // Set hit position
55 virtual void SetHit(Float_t, Float_t, Float_t ) = 0;
56
57 //
58 // Iterate over pads
59 // Initialiser
60 virtual void FirstPad(Float_t xhit, Float_t yhit, Float_t zhit, Float_t dx, Float_t dy) = 0;
61 // Stepper
62 virtual void NextPad() = 0;
63 // Condition
64 virtual Int_t MorePads() = 0;
65 //
66 // Distance between 1 pad and a position
67 virtual Float_t Distance2AndOffset(Int_t iX, Int_t iY, Float_t X, Float_t Y, Int_t *dummy) = 0;
68 // Number of pads read in parallel and offset to add to x
69 // (specific to LYON, but mandatory for display)
70 virtual void GetNParallelAndOffset(Int_t iX, Int_t iY,
71 Int_t *Nparallel, Int_t *Offset) = 0;
72 // Get next neighbours
73 virtual void Neighbours
74 (Int_t iX, Int_t iY, Int_t* Nlist, Int_t Xlist[10], Int_t Ylist[10]) = 0;
75 //
76 // Current pad cursor during disintegration
77 // x-coordinate
78 virtual Int_t Ix() = 0;
79 // y-coordinate
80 virtual Int_t Iy() = 0;
81 // current sector
82 virtual Int_t ISector() = 0;
83 // calculate sector from pad coordinates
84 virtual Int_t Sector(Int_t ix, Int_t iy) = 0;
85 //
86 // Signal Generation Condition during Stepping
87 virtual Int_t SigGenCond(Float_t x, Float_t y, Float_t z) = 0;
88 // Initialise signal generation at coord (x,y,z)
89 virtual void SigGenInit(Float_t x, Float_t y, Float_t z) = 0;
90 // Current integration limits
91 virtual void IntegrationLimits
92 (Float_t& x1, Float_t& x2, Float_t& y1, Float_t& y2) = 0;
93 // Test points for auto calibration
94 virtual void GiveTestPoints(Int_t &n, Float_t *x, Float_t *y) = 0;
95 // Draw the segmentation zones
ef42d733 96 virtual void Draw(const char *opt = "") = 0;
6133b573 97 // Function for systematic corrections
98 // Set the correction function
99 virtual void SetCorrFunc(Int_t, TF1*) = 0;
100 // Get the correction Function
101 virtual TF1* CorrFunc(Int_t) = 0;
102
103 ClassDef(AliSegmentation,1) //Segmentation virtual base class
104};
105#endif