]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONSt345SlatSegmentation.h
track matching macros from Alberto
[u/mrichter/AliRoot.git] / MUON / AliMUONSt345SlatSegmentation.h
CommitLineData
cc4dcfb0 1#ifndef ALIMUONST345SLATSEGMENTATION_H
2#define ALIMUONST345SLATSEGMENTATION_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
f64ec237 6/* $Id$ */
cc4dcfb0 7
692de412 8/// \ingroup base
9/// \class AliMUONSt345SlatSegmentation
10/// \brief Segmentation for slat modules
cc4dcfb0 11
e0a49962 12#include "AliMUONVGeometryDESegmentation.h"
cc4dcfb0 13
14class TArrayF;
15class TArrayI;
9db6c8d7 16
cc4dcfb0 17
e0a49962 18class AliMUONSt345SlatSegmentation : public AliMUONVGeometryDESegmentation
cc4dcfb0 19{
20 public:
a713db22 21 AliMUONSt345SlatSegmentation();
f48459ab 22 AliMUONSt345SlatSegmentation(Bool_t bending);
cc4dcfb0 23 virtual ~AliMUONSt345SlatSegmentation();
24
25 virtual Float_t Distance2AndOffset(Int_t iX, Int_t iY, Float_t X, Float_t Y, Int_t * dummy); // Distance between 1 pad and a position
5398f946 26 virtual Float_t Dpx() const {return fDpx;} ///< Pad size in x
27 virtual Float_t Dpy() const {return fDpy;} ///< Pad size in y
cc4dcfb0 28 virtual Float_t Dpx(Int_t isec) const; // Pad size in x by Sector
29 virtual Float_t Dpy(Int_t isec) const; // Pad size in y by Sector
5398f946 30 virtual void Draw(const char */*opt*/ = "") {} ///< Not implemented
cc4dcfb0 31 virtual void FirstPad(Float_t xhit, Float_t yhit, Float_t dx, Float_t dy); // Initialisation for pad iteration
32 virtual void FirstPad(Float_t xhit, Float_t yhit, Float_t zhit, Float_t dx, Float_t dy);
33
5398f946 34 virtual Bool_t HasPad(Float_t /*x*/, Float_t /*y*/, Float_t /*z*/) { return true; } ///< Not implemented
f64ec237 35 virtual Bool_t HasPad(Int_t ix, Int_t iy);
5398f946 36 virtual AliMUONGeometryDirection GetDirection() { return kDirUndefined; } ///< Not implemented
37 virtual const AliMpVSegmentation* GetMpSegmentation() const { return 0; } ///< Not implemented
e0a49962 38
cc4dcfb0 39 virtual Float_t GetAnod(Float_t xhit) const; // Anod wire coordinate closest to xhit
40 virtual void GetPadI(Float_t x ,Float_t y ,Int_t &ix,Int_t &iy); // Transform from pad to real coordinates
41 virtual void GetPadI(Float_t x, Float_t y , Float_t z, Int_t &ix, Int_t &iy);
f48459ab 42 virtual void GetPadC(Int_t ix, Int_t iy, Float_t &x, Float_t &y);
5398f946 43 /// Returns real coordinates (x,y,z) for given pad coordinates (ix,iy)
cc4dcfb0 44 virtual void GetPadC(Int_t ix, Int_t iy, Float_t &x, Float_t &y, Float_t &z) {z=0; GetPadC(ix, iy, x , y);}
f1501d74 45
cc4dcfb0 46 virtual void IntegrationLimits(Float_t& x1, Float_t& x2, Float_t& y1, Float_t& y2); //Current integration limits
5398f946 47 virtual Int_t ISector() {return fSector;} ///< Current Pad during Integration (current sector)
48 virtual Int_t Ix() {return fIx;} ///< x-coordinate
49 virtual Int_t Iy() {return fIy;} ///< y-coordinate
cc4dcfb0 50
51 virtual Int_t MorePads(); // Condition
52
53 virtual void Neighbours(Int_t iX, Int_t iY, Int_t* Nlist, Int_t Xlist[10], Int_t Ylist[10]); // Get next neighbours
54 virtual void NextPad(); // Stepper
5398f946 55 virtual Int_t Npx() const {return fNpx;} ///< Maximum number of Pads in x
56 virtual Int_t Npy() const {return fNpy;} ///< Maximum number of Pads in y
cc4dcfb0 57
5398f946 58 virtual void SetDAnod(Float_t D) {fWireD = D;}; ///< Anod pitch
59 virtual Int_t Sector(Int_t ix, Int_t iy); // Calculate sector from pad coordinates
60 virtual void SetHit(Float_t xhit, Float_t yhit); // Set hit position
cc4dcfb0 61 virtual void SetHit(Float_t xhit, Float_t yhit, Float_t zhit);
5398f946 62 virtual void SetId(Int_t id) {fId=id;} ///< Setting detection element
cc4dcfb0 63 virtual void SetPad(Int_t ix, Int_t iy); // Set pad position
64 virtual void SetPadDivision(Int_t ndiv[4]); // Set Slat Segmentation Parameters
65 virtual void SetPadSize(Float_t p1, Float_t p2); // Pad size Dx*Dy
66 virtual void SetPcbBoards(Int_t n[4]); // Set Segmentation Zones (PCB Boards)
67
68 // The following function could be obsolet for this class, but they are pure virtual in AliSegmentation
5398f946 69 virtual void GetNParallelAndOffset(Int_t /*iX*/, Int_t /*iY*/, Int_t */*Nparallel*/, Int_t */*Offset*/) {}; ///< Not implemented
70 virtual Int_t SigGenCond(Float_t /*x*/, Float_t /*y*/, Float_t /*z*/){return 0;} ; ///< Signal Generation Condition during Stepping
71 virtual void SigGenInit(Float_t /*x*/, Float_t /*y*/, Float_t /*z*/){}; ///< Initialise signal gneration at coord (x,y,z)
72 virtual void GiveTestPoints(Int_t &/*n*/, Float_t * /*x*/, Float_t */*y*/) const{}; ///< Test points for auto calibration
73 virtual void SetCorrFunc(Int_t /*dum*/, TF1* /*func*/){}; ///< Function for systematic corrections, Set the correction function
74 virtual TF1* CorrFunc(Int_t) const {return 0x0;} ///< Get the correction Function
75 virtual Int_t Sector(Float_t /*x*/, Float_t /*y*/) {return 1;} ///< Current sector
cc4dcfb0 76
f48459ab 77 virtual void Init(Int_t detectionElementId); // Initialisation
cc4dcfb0 78 // Current integration limits
79
80 protected:
81
82 AliMUONSt345SlatSegmentation(const AliMUONSt345SlatSegmentation& rhs);
83 AliMUONSt345SlatSegmentation& operator=(const AliMUONSt345SlatSegmentation& rhs);
f1501d74 84
fed772f3 85 private:
cc4dcfb0 86 // Internal geometry of the slat
18b6b8c7 87 Bool_t fBending; ///< 0: Bending or 1:Non Bending segmentation
88 Int_t fId; ///< Identifier of detection element
89 Int_t fNsec; ///< Number of density sectors (should be 4, if not not warranty about the output
90 TArrayI* fNDiv; ///< Densities (d1, d2, d3, d4). It should be (4, 4, 2, 1) which goes from beam to out-beam
91 TArrayF* fDpxD; ///< x pad width per density sector
92 TArrayF* fDpyD; ///< x pad width per density sector
93 Float_t fDpx; ///< x pad base width
94 Float_t fDpy; ///< y pad base width
95 Int_t fNpx; ///< Number of pads in x
96 Int_t fNpy; ///< Number of pads in y
97 Float_t fWireD; ///< Wire pitch
98 Int_t fRtype; ///< Type of the slat: rounded R=1,2,3, rounded short R=-1,-2,-3, short R=4, normal R=0
cc4dcfb0 99 //
18b6b8c7 100 Int_t fSector; ///< Current density sector
101 Float_t fDxPCB; ///< x-size of PCB board
102 Float_t fDyPCB; ///< y-size of PCB board
103 Int_t fPcbBoards[4]; ///< Number of PCB boards per density sector n1,n2,n3,n4
cc4dcfb0 104 // n1 PcbBoard with density d1, n2 PcbBoards with density d2, etc ....
105
106 // Segmentation map
18b6b8c7 107 Int_t fNpxS[10]; ///< Number of pads per sector in x
108 Int_t fNpyS[10]; ///< Number of pads per sector in y
109 Float_t fCx[10]; ///< Pad-sector contour x vs y
110 Float_t fCy; ///< y offset
cc4dcfb0 111
112 // Current pad and wire during tracking (cursor at hit centre)
18b6b8c7 113 Float_t fXhit; //!< x-position of hit
114 Float_t fYhit; //!< y-position of hit
cc4dcfb0 115
116 // Current pad and wire during tracking (cursor at hit centre)
18b6b8c7 117 Int_t fIx; //!< Pad coord. x
118 Int_t fIy; //!< Pad coord. y
119 Float_t fX; //!< Real coord. x
120 Float_t fY; //!< Real ccord. y
cc4dcfb0 121
122 // Chamber region consideres during disintegration
18b6b8c7 123 Int_t fIxmin; //!< Lower left x
124 Int_t fIxmax; //!< Lower left y
125 Int_t fIymin; //!< Upper right x
126 Int_t fIymax; //!< Upper right y
cc4dcfb0 127
128 // Chamber region consideres during disintegration (lower left and upper right corner)
18b6b8c7 129 Float_t fXmin; ///< Lower left x
130 Float_t fXmax; ///< Lower left y
131 Float_t fYmin; ///< Upper right x
132 Float_t fYmax; ///< Upper right y
cc4dcfb0 133
18b6b8c7 134 Bool_t fInitDone; ///< Flag for initialization
f1501d74 135
18b6b8c7 136 ClassDef(AliMUONSt345SlatSegmentation,3) // St345 segmentation
cc4dcfb0 137};
138#endif
139
140
141
142
143
144