Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#ifndef SectorSystemFTD_h
#define SectorSystemFTD_h
#include "KiTrack/ISectorSystem.h"
using namespace KiTrack;
namespace KiTrackMarlin{
/** A Sector System class for the Forward Tracking Disks FTD in the ILD.
*
* It calculates sectors from the side, layer, sensor and module and vice versa.
*
* @param side: +1 for forward, -1 for backward
*
* @param layer: layer of FTD: 0 is the layer of the IP, 1 is the first FTD disk and so on.
*
* @param module: module
*
* @param sensor: the sensor on the module
*
*
*/
class SectorSystemFTD : public ISectorSystem{
public:
/**Constructor
*
* @param nLayers the number of possible layers. The layers from 0 to n-1 will be available. Keep in mind,
* that layer 0 is used for the IP.
*
* @param nModules the number of modules per disk.
*
* @param nSensors the number of sensors on one module.
*/
SectorSystemFTD( unsigned nLayers , unsigned nModules , unsigned nSensors );
/** Calculates the sector number corresponding to the passed parameters
*/
int getSector( int side, unsigned layer , unsigned module , unsigned sensor ) const ;
/** Virtual, because this method is demanded by the Interface ISectorSystem
*
* @return the layer corresponding to the passed sector number
*/
virtual unsigned getLayer( int sector ) const ;
/** @return some information on the sector as string */
virtual std::string getInfoOnSector( int sector ) const;
/** @return the side the sector is on (+1 = forward, -1 = backward)
*/
int getSide( int sector ) const ;
/** @return the module of the sector
*/
unsigned getModule( int sector ) const ;
/** @return the sensor of the sector
*/
unsigned getSensor( int sector ) const ;
unsigned getNumberOfModules() const { return _nModules; }
unsigned getNumberOfSensors() const { return _nSensors; }
virtual ~SectorSystemFTD(){}
private:
unsigned _nModules;
unsigned _nSensors;
int _sectorMax;
void checkSectorIsInRange( int sector ) const ;
};
}
#endif