CGEM BOSS 6.6.5.g
BESIII Offline Software System
Loading...
Searching...
No Matches
MdcLayer.h
Go to the documentation of this file.
1// $Id: MdcLayer.h,v 1.2 2009/12/17 00:38:40 zhangy Exp $ // -*-c++-*-
2// header file for a class called "MdcLayer"
3#ifndef MDCLAYER_H
4#define MDCLAYER_H
5
6#include <CLHEP/Geometry/Point3D.h>
7#include <iostream>
8#include <vector>
9#include "MdcGeom/MdcSWire.h"
10#include "MdcGeom/Constants.h"
11
12class MdcDetector;
13class Trajectory;
14
15class MdcLayer {
16
17 public:
18 // Constructor.
19 MdcLayer(int lay, int nwir, MdcSWire** wires, const MdcDetector &theDet);
20
21 // Destructor
23
24 void print( std::ostream& o ) const;
25
26 public: // Extractors
27 bool exist(void) const { return _exist; }
28 int view(void) const { return _view; }
29 int layNum(void) const { return _layer; }
30 int nWires(void) const { return _nwires; }
31 int superLayer(void) const { return 1+((layNum()-1)/4);}
32 int subLayer(void) const { return layNum()-4*(superLayer()-1);}
33 double cellHeight(void) const { return _cellHeight; }
34 double stDip(void) const { return _stdip; }
35 double zEnd(void) const { return _zend; }
36 double rMid(void) const { return _rmid; }
37 double rEnd(void) const { return _rend; }
38 double rIn(void) const { return rMid() - 0.5 * cellHeight(); }//yzhang del
39 double rOut(void) const { return rMid() + 0.5 * cellHeight(); }//yzhang del
40// double rIn(void) const { return rMid() - RCSiz1(); }//yzhang change FIXME
41// double rOut(void) const { return rMid() + RCSiz2(); }//yzhang change FIXME
42 double stereo(void) const { return _stereo; }
43 double dPhiz(void) const { return _delphi; }
44 double zLength(void) const { return getWire(0)->zLength(); }
45 double sag(void) const { return getWire(0)->getSag(); }
46 // this function returns the phi offset in the middle of the chamber
47 double phiOffset(void) const { return phiWire(0); }
48 // this function returns the cell offset w.r.t rear end-plate
49 double phiEPOffset(void) const { return _phiOffset; }
50 double dPhizDC(double z) const { return phiWireDC(0, z); }
51 double radiusDC(double z) const { return getWire(0)->radiusDC(z); }
52 MdcSWire *getWire(int wire) const { return _wires[wire]; }
53// int view(void) const { return _view; }
54// TrkEnums::TrkViewInfo whatView() const {
55// return _view==0?TrkEnums::xyView:TrkEnums::bothView;
56// }
57 double phiWireDC(int cell, double z) const;
58 double phiWire(int cell) const;
59 double xWire(int cell) const;
60 double yWire(int cell) const;
61 double dPhi(void) const { return Constants::twoPi/nWires(); }
62 // return the width of the cell at mid chamber corrected by the
63 // stereo angle
64 double cellWidth(void) const { return dPhi()*rMid()*cos(stereo()); }
65 // return the width of the cell at z along the chamber
66 double cellWidth(double z) const { return dPhi()*radiusDC(z)*cos(stereo()); }
67
68// const MdcSuperLayer SLayer(void) const {return *_sLay;}
69
70
71
72 const Trajectory* makeHitTrajInGlobalCoords(int wire, double z=0) const;
73
74 public: // Modifiers
75
76 void View(int v ) { _view = v; }
77 void setCellHeight(double height) { _cellHeight = height; }
78
79 private:
80
81 const MdcDetector& _mdcDet; // Reference to layer's owner (for whichCells)
82
83 bool _exist; // this layer exist ?
84 int _layer; // layer number
85 int _nwires; // number of wires
86 MdcSWire **_wires; // array of pointers to hits on wires
87// const MdcSuperLayer* _sLay; // pointer to SuperLayer
88
89 double _stdip; // change in radius from mid to end - nominal
90 // value
91 double _rend; // radius on rear end-plate
92 double _rmid; // radius in the center of the chamber
93 double _zend; // z position of end-plate (in the local reference system)
94 double _stereo; // stereo angle
95 double _delphi; // twist angle between mid and rear chamber
96 double _phiOffset; // offset of first cell
97 double _cellHeight; // cell height
98 int _view; // +1, 0, -1: U, axial, V
99
100// private:
101// friend class MdcDetector;
102// void updateInfo(std::vector<MdcSWire *>::const_iterator it);
103
104};
105
106#endif /* MdcLayer_CLASS */
107
double cos(const BesAngle a)
Definition: BesAngle.h:213
**********Class see also m_nmax DOUBLE PRECISION m_amel DOUBLE PRECISION m_x2 DOUBLE PRECISION m_alfinv DOUBLE PRECISION m_Xenph INTEGER m_KeyWtm INTEGER m_idyfs DOUBLE PRECISION m_zini DOUBLE PRECISION m_q2 DOUBLE PRECISION m_Wt_KF DOUBLE PRECISION m_WtCut INTEGER m_KFfin *COMMON c_KarLud $ !Input CMS energy[GeV] $ !CMS energy after beam spread beam strahlung[GeV] $ !Beam energy spread[GeV] $ !z boost due to beam spread $ !electron beam mass *ff pair spectrum $ !minimum v
Definition: KarLud.h:35
static const double twoPi
Definition: Constants.h:39
~MdcLayer()
Definition: MdcLayer.h:22
const Trajectory * makeHitTrajInGlobalCoords(int wire, double z=0) const
Definition: MdcLayer.cxx:132
double yWire(int cell) const
Definition: MdcLayer.cxx:115
double zEnd(void) const
Definition: MdcLayer.h:35
double rMid(void) const
Definition: MdcLayer.h:36
double phiWire(int cell) const
Definition: MdcLayer.cxx:87
MdcSWire * getWire(int wire) const
Definition: MdcLayer.h:52
double phiOffset(void) const
Definition: MdcLayer.h:47
double sag(void) const
Definition: MdcLayer.h:45
void View(int v)
Definition: MdcLayer.h:76
double phiWireDC(int cell, double z) const
Definition: MdcLayer.cxx:74
void setCellHeight(double height)
Definition: MdcLayer.h:77
double zLength(void) const
Definition: MdcLayer.h:44
double cellWidth(double z) const
Definition: MdcLayer.h:66
double phiEPOffset(void) const
Definition: MdcLayer.h:49
double radiusDC(double z) const
Definition: MdcLayer.h:51
double stereo(void) const
Definition: MdcLayer.h:42
double cellHeight(void) const
Definition: MdcLayer.h:33
double cellWidth(void) const
Definition: MdcLayer.h:64
double rEnd(void) const
Definition: MdcLayer.h:37
double stDip(void) const
Definition: MdcLayer.h:34
void print(std::ostream &o) const
Definition: MdcLayer.cxx:41
double dPhizDC(double z) const
Definition: MdcLayer.h:50
bool exist(void) const
Definition: MdcLayer.h:27
int superLayer(void) const
Definition: MdcLayer.h:31
double dPhi(void) const
Definition: MdcLayer.h:61
int nWires(void) const
Definition: MdcLayer.h:30
double rOut(void) const
Definition: MdcLayer.h:39
int view(void) const
Definition: MdcLayer.h:28
double dPhiz(void) const
Definition: MdcLayer.h:43
int subLayer(void) const
Definition: MdcLayer.h:32
int layNum(void) const
Definition: MdcLayer.h:29
double xWire(int cell) const
Definition: MdcLayer.cxx:101
double rIn(void) const
Definition: MdcLayer.h:38
double zLength(void) const
Definition: MdcSWire.h:47
double getSag(void) const
Definition: MdcSWire.h:31
double radiusDC(double z) const
Definition: MdcSWire.h:57