BOSS 7.0.3
BESIII Offline Software System
Loading...
Searching...
No Matches
InstallArea/include/MdcGeom/MdcGeom/MdcSuperLayer.h
Go to the documentation of this file.
1// $Id: MdcSuperLayer.h,v 1.1.1.1 2005/07/18 05:51:56 codeman Exp $ // -*-c++-*-
2// header file for a class called "MdcSuperLayer"
3#ifndef __MDCSUPERLAYER_H__
4#define __MDCSUPERLAYER_H__
5
6#include <iostream>
7#include "MdcGeom/MdcLayer.h"
8
10
11 public:
12 // Constructor.
13 MdcSuperLayer( int number);
14
15 // Destructor
17
18 public: // Extractors
19
20 int index(void) const {return _slayer; }
21 int whichView(void) const {return _view;}
22 bool exist(void) const {return _exist;}
23 double rEnd(void) const {return _radius;}
24 double rad0(void) const { return 0.5 * (firstLayer()->rMid() +
25 lastLayer()->rMid()); }
26 double zEnd(void) const { return 0.5 * (firstLayer()->zEnd() +
27 lastLayer()->zEnd()); }
28 double stDip(void) const { return 0.5 * (firstLayer()->stDip() +
29 lastLayer()->stDip()); }
30 double delPhi(void) const {return _delphi;}
31 double delPhiinv(void) const {return _delphiinv;}
32 //----------------------------------------------------------
33 // here |index| is the index of array of pointers to layers
34 // belonging to the superlayer, so this ramges from 0 to 3
35 //----------------------------------------------------------
36
37 const MdcLayer* firstLayer(void) const { return layers[0];}
38 const MdcLayer* lastLayer(void) const { return layers[_nLayers - 1];}
39 const MdcSuperLayer* next(void) const { return _next;}
40 const MdcSuperLayer* prev(void) const { return _prev;}
41 const MdcSuperLayer* nextInView(void) const { return _nextInView;}
42 const MdcSuperLayer* prevInView(void) const { return _prevInView;}
43 int slayNum(void) const { return _slayer;}
44 int nLayers(void) const { return _nLayers;}
45 const MdcLayer* layer(int i) const { /*yzhang SKIP assert ( i>=0 && i < nLayer() ) ;*/
46// const MdcLayer* layer(int i) const { assert ( i>=0 && i < _nLayers ) ;
47 return layers[i]; }
48 void setNextInView(MdcSuperLayer* sl) {_nextInView = sl;}
49 void setPrevInView(MdcSuperLayer* sl) {_prevInView = sl;}
50 // One line printout
51 void print(std::ostream& o=std::cout) const ;
52
53
54 private:
55 friend class MdcDetector;
56 void addLayer(int index, const MdcLayer * lay);
57 void updateInfo(const MdcSuperLayer* prev, const MdcSuperLayer* next);
58
59 // Data members
60 bool _exist;
61 double _radius; // mean rad.
62 double _delphi; // diff in phi between z=0 and zend (=0 for axial
63 double _delphiinv;
64 int _view; // +1, 0, -1 = U, axial, V
65 int _slayer; // superlayer number
66
67 const MdcLayer* layers[4];
68 const MdcSuperLayer* _next;
69 const MdcSuperLayer* _prev;
70 const MdcSuperLayer* _nextInView;
71 const MdcSuperLayer* _prevInView;
72 int _nLayers; // number of layers
73
74};
75
76#endif /* MdcSuperLayer_CLASS */
77
const MdcSuperLayer * next(void) const
void print(std::ostream &o=std::cout) const
const MdcSuperLayer * prevInView(void) const
const MdcSuperLayer * prev(void) const
const MdcSuperLayer * nextInView(void) const