CGEM BOSS 6.6.5.f
BESIII Offline Software System
Loading...
Searching...
No Matches
Cgem/CgemDigitizerSvc/CgemDigitizerSvc-00-00-24/CgemDigitizerSvc/CgemDigitizerSvc.h
Go to the documentation of this file.
1#ifndef CGEMDIGITIZERSVC_H
2#define CGEMDIGITIZERSVC_H
3
4#include <CLHEP/Units/PhysicalConstants.h>
5#include <CLHEP/Geometry/Point3D.h>
6#include <vector>
7#include <map>
8#include <iostream>
9
10#include "GaudiKernel/Algorithm.h"
11#include "GaudiKernel/Property.h"
12#include "GaudiKernel/MsgStream.h"
13
14#include "GaudiKernel/IIncidentListener.h"
15#include "GaudiKernel/Service.h"
16#include "GaudiKernel/IInterface.h"
17#include "CgemDigitizerSvc/ICgemDigitizerSvc.h"
18#include "GaudiKernel/IDataProviderSvc.h"
19#include "GaudiKernel/IIncidentListener.h"
20
21#include "GaudiKernel/NTuple.h"
22#include "GaudiKernel/INTupleSvc.h"
23
24#include "CLHEP/Vector/ThreeVector.h"
25
26#include "CgemDigitizerSvc/Ionization.h"
27#include "CgemDigitizerSvc/IonizationGar.h"
28#include "CgemDigitizerSvc/IonizationGTS.h"
29#include "CgemDigitizerSvc/DriftAndAvalanche.h"
30#include "CgemDigitizerSvc/SamplingGar.h"
31#include "CgemDigitizerSvc/SamplingGTS.h"
32#include "CgemDigitizerSvc/Induction.h"
33#include "CgemDigitizerSvc/InductionGar.h"
34#include "CgemDigitizerSvc/InductionGTS.h"
35
36#include "TH1D.h"
37#include "TRandom.h"
38
39class CgemDigitizerSvc : public Service, virtual public ICgemDigitizerSvc{
40
41public:
42 CgemDigitizerSvc(const std::string& name, ISvcLocator* svcloc);
44
45 virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvUnknown);
46 virtual StatusCode initialize();
47 virtual StatusCode finalize();
48
49 /* particle = 0,1,2,3,4 (e,mu,pi,K,p) */
50 /* p: momentum (GeV/c) */
51 /* trkPosIn & trkPosOut: starting & exit positions (x,y,z) of the track segment in drift area */
52 StatusCode setTrack(int layer, int particle, int charge, double p, double trkPosIn[], double trkPosOut[]);
53
54 /* output info of fired strips */
55 int getNXstrips() const {return m_nXstrips;}
56 int getNVstrips() const {return m_nVstrips;}
57 int getXstripSheet(int n) const {return m_xstripSheet[n];}
58 int getXstripID(int n) const {return m_xstripID[n];}
59 int getVstripSheet(int n) const {return m_vstripSheet[n];}
60 int getVstripID(int n) const {return m_vstripID[n];}
61 double getXstripQ(int n) const {return m_xstripQ[n];}
62 double getVstripQ(int n) const {return m_vstripQ[n];}
63 double getXstripT(int n) const {return m_xstripT[n];}
64 double getVstripT(int n) const {return m_vstripT[n];}
65
66private:
67 void clear();
68 void positionToStrips();
69
70 int m_ionModel;
71 int m_driftAvaModel;
72 int m_inductionModel;
73 bool m_garfDebugging;
74 bool m_debugInduction;
75 int m_magConfig; /* 0 for without mag, 1 for 1 Tesla */
76
77 ICgemGeomSvc* m_geomSvc;
78 CgemGeoLayer* m_cgemLayer;
79 CgemGeoReadoutPlane* m_cgemReadoutPlane;
80 Ionization* m_pIon;
81 DriftAndAvalanche* m_pDriftAndAva;
82 Induction* m_pInduction;
83
84 /* position and time of multiplied electrons */
85 int m_layer;
86 int m_nSheet;
87 int m_nMultiE;
88 std::vector<double> m_multiEx;
89 std::vector<double> m_multiEy;
90 std::vector<double> m_multiEz;
91 std::vector<double> m_multiEt;
92
93 /* fired strips */
94 int m_nXstrips;
95 int m_nVstrips;
96 std::vector<int> m_xstripSheet;
97 std::vector<int> m_xstripID;
98 std::vector<int> m_vstripSheet;
99 std::vector<int> m_vstripID;
100 std::vector<double> m_xstripQ;
101 std::vector<double> m_vstripQ;
102 std::vector<double> m_xstripT;
103 std::vector<double> m_vstripT;
104 std::map<int, int> m_mapQ[2][2];//[nSheet][XV-view]
105 std::map<int, double> m_mapT[2][2];
106 std::map<int, TH1D*> m_mapThis[2][2];
107
108 /* ntuple */
109 NTuple::Tuple* m_tuple;
110 NTuple::Item<int> m_ntNIonE;
111 /* NTuple::Item<int> m_ntNGem1E; */
112 /* NTuple::Item<int> m_ntNGem2E; */
113 /* NTuple::Item<int> m_ntNGem3E; */
114 NTuple::Item<int> m_ntNMultiE;
115 NTuple::Item<int> m_ntNxstrips;
116 NTuple::Item<int> m_ntNvstrips;
117 NTuple::Array<double> m_ntxstripQ;
118 NTuple::Array<double> m_ntxstripT;
119 NTuple::Array<double> m_ntvstripQ;
120 NTuple::Array<double> m_ntvstripT;
121 NTuple::Array<double> m_XstripID;
122 NTuple::Array<double> m_VstripID;
123};
124
125
126#endif /* CGEMDIGITIZERSVC_H */
const Int_t n
virtual StatusCode finalize()
CgemDigitizerSvc(const std::string &name, ISvcLocator *svcloc)
virtual StatusCode initialize()
StatusCode setTrack(int layer, int particle, int charge, double p, double trkPosIn[], double trkPosOut[])
virtual StatusCode queryInterface(const InterfaceID &riid, void **ppvUnknown)