BOSS 7.1.2
BESIII Offline Software System
Loading...
Searching...
No Matches
MdcNavigation.h
Go to the documentation of this file.
1#include "GaudiKernel/Algorithm.h"
2#include <string>
3#include <vector>
4#include "CLHEP/Vector/ThreeVector.h"
5#include "HepPDT/ParticleDataTable.hh"
6#include "GaudiKernel/NTuple.h"
8#include "McTruth/MdcMcHit.h"
10#include "AIDA/IHistogram1D.h"
17#include <math.h>
18
19class MdcDetector;
20class TH1F;
21class TH2F;
22
23class MdcNavigation:public Algorithm {
24public:
25 MdcNavigation (const std::string& name, ISvcLocator* pSvcLocator);
26 StatusCode initialize();
27 StatusCode execute();
28 StatusCode finalize();
29 StatusCode beginRun();
30
31private:
32 //calculate momentum using helix parameters of fitted track
33 Hep3Vector momentum(const RecMdcTrack* trk);
34 StatusCode bookNTuple();
35 StatusCode fillInit();
36 StatusCode fillRecTrack(const RecMdcTrack* it, int mcTkNum, int recTkNum);
37 StatusCode fillRecHits(RecMdcHitCol& hitCol);
38 StatusCode fillEvent();
39 StatusCode skipMcParticle(const Event::McParticle* it, int nKindSkiped, int* keepedPart);
40 double poca(const MdcDigi* aDigi,const HepVector helixPar,const HepSymMatrix errMat);
41 double probab(const int& ndof, const double& chisq);
42
43 HepPDT::ParticleDataTable* m_particleTable;
44 RawDataProviderSvc* m_rawDataProviderSvc;
45 IMagneticFieldSvc* m_pIMF;
46
47 bool m_poca;
48 bool m_debug;
49 const MdcDetector * m_gm;
50 int havedigi[43][288];
51 short multiTdcCount[43][288];
52 bool m_hist;
53 int m_mc;
54 bool m_doSag;
55 bool m_rawData;
56 int m_maxMdcDigi;
57 bool m_keepBadTdc;
58 bool m_dropHot;
59 bool m_keepUnmatch;
60 long t_eventNo;
61 long t_runNo;
62 double t_t0;
63 double t_t0Stat;
64 double t_t0Truth;
65 int t_nTk;
66 int t_recTkNum;
67 int t_mcTkNum;
68 int t_trkRecoTk;
69 int t_curlTk;
70 int t_patRecTk ;
71 int t_xRecTk;
72 int m_nMcHit;
73 int* keepedParticles;
74 double m_d0Cut;
75 double m_z0Cut;
76 double nNoise;
77 long nDigiTk[100];
78 long digiLayer[100];//mc digi per track; 50 track/event most
79
80 NTuple::Tuple* g_tupleMc;
81 NTuple::Tuple* g_tupleRec;
82 NTuple::Tuple* g_tupleEvt;
83
84 AIDA::IHistogram1D* g_layerEff;
85 NTuple::Item<double> m_na_p;
86 NTuple::Item<double> m_na_pt;
87 NTuple::Item<double> m_na_pz;
88 NTuple::Item<double> m_na_d0;
89 NTuple::Item<double> m_na_phi0;
90 NTuple::Item<double> m_na_cpa;
91 NTuple::Item<double> m_na_z0;
92 NTuple::Item<double> m_na_tanl;
93 NTuple::Item<double> m_na_q;
94 NTuple::Item<double> m_na_d0E;
95 NTuple::Item<double> m_na_phi0E;
96 NTuple::Item<double> m_na_cpaE;
97 NTuple::Item<double> m_na_z0E;
98 NTuple::Item<double> m_na_tanlE;
99
100 NTuple::Item<double> m_na_dP;
101 NTuple::Item<double> m_na_dPt;
102 NTuple::Item<double> m_na_dPz;
103 NTuple::Item<double> m_na_dD0;
104 NTuple::Item<double> m_na_dPhi0;
105 NTuple::Item<double> m_na_dCpa;
106 NTuple::Item<double> m_na_dZ0;
107 NTuple::Item<double> m_na_dTanl;
108
109 NTuple::Item<double> m_na_d0Res;
110 NTuple::Item<double> m_na_phi0Res;
111 NTuple::Item<double> m_na_cpaRes;
112 NTuple::Item<double> m_na_z0Res;
113 NTuple::Item<double> m_na_tanlRes;
114
115 NTuple::Item<long> m_na_nHit;
116 NTuple::Item<long> m_na_nDigi;
117 NTuple::Item<double> m_na_nEvtNoise;
118 NTuple::Item<double> m_na_nAct;
119 NTuple::Item<double> m_na_nNoise;
120 NTuple::Item<double> m_na_nMatch;
121 NTuple::Item<double> m_na_nSt;
122 NTuple::Item<double> m_na_nDof;
123 NTuple::Item<double> m_na_fiTerm;
124 NTuple::Item<double> m_na_chi2;
125 NTuple::Item<double> m_na_chi2Dof;
126 NTuple::Item<double> m_na_chi2Prob;
127 NTuple::Item<double> m_na_mcTkNum;
128 NTuple::Item<double> m_na_mcTkId;
129 NTuple::Item<double> m_na_recTkNum;
130
131 NTuple::Item<double> m_na_mcpid;
132 NTuple::Item<double> m_na_mcp;
133 NTuple::Item<double> m_na_mcpt;
134 NTuple::Item<double> m_na_mcpx;
135 NTuple::Item<double> m_na_mcpy;
136 NTuple::Item<double> m_na_mcpz;
137 NTuple::Item<double> m_na_mcd0;
138 NTuple::Item<double> m_na_mcphi0;
139 NTuple::Item<double> m_na_mcz0;
140 NTuple::Item<double> m_na_mctheta;
141 NTuple::Item<double> m_na_mccpa;
142 NTuple::Item<double> m_na_mcq;
143 NTuple::Item<double> m_na_mcfifin;
144 NTuple::Item<double> m_na_mcflag;
145 NTuple::Item<long> m_na_tkStat;
146
147
148 NTuple::Item<long> m_na_tkId;
149 NTuple::Item<double> m_na_evtNo;
150 NTuple::Array<double> m_na_resid;
151 NTuple::Array<double> m_na_driftD;
152 NTuple::Array<long> m_na_act;
153 NTuple::Array<double> m_na_driftT;
154 NTuple::Array<double> m_na_doca;
155 NTuple::Array<double> m_na_entra;
156 NTuple::Array<double> m_na_zhit;
157 NTuple::Array<double> m_na_chi2add;
158 NTuple::Array<double> m_na_flaglr;
159 NTuple::Array<double> m_na_hitStat;
160 NTuple::Array<double> m_na_Tdc;
161 NTuple::Array<double> m_na_Adc;
162 NTuple::Array<double> m_na_layer;
163 NTuple::Array<double> m_na_wire;
164 NTuple::Array<double> m_na_gwire;
165 NTuple::Array<double> m_na_hitTkId;
166 NTuple::Array<double> m_na_digiTkId;
167 NTuple::Array<double> m_na_digiLayer;
168
169 NTuple::Item<double> m_na_t2mcp;
170 NTuple::Item<double> m_na_t2mcpt;
171 NTuple::Item<double> m_na_t2mcphi;
172 NTuple::Item<double> m_na_t2mctheta;
173 NTuple::Item<double> m_na_t2tanl;
174 NTuple::Item<double> m_na_t2recTkNum;
175 NTuple::Item<double> m_na_t2mcTkNum;
176 NTuple::Item<double> m_na_t2p;
177 NTuple::Item<double> m_na_t2pt;
178
179 NTuple::Item<double> m_na_t3recTk;
180 NTuple::Item<double> m_na_t3mcTk;
181 NTuple::Item<long> m_na_t3TrkReco;
182 NTuple::Item<long> m_na_t3Curl;
183 NTuple::Item<long> m_na_t3PatRec;
184 NTuple::Item<long> m_na_t3XRec;
185 NTuple::Item<double> m_na_t3evtNo;
186 NTuple::Item<double> m_na_t3t0;
187 NTuple::Item<double> m_na_t3t0Truth;
188 NTuple::Item<double> m_na_t3t0Stat;
189 NTuple::Item<double> m_na_t3timing;
190
191 NTuple::Item<long> m_na_t3runNo;
192 NTuple::Item<long> m_na_t3nDigi;
193 NTuple::Array<long> m_na_t3layer;
194 NTuple::Array<long> m_na_t3wire;
195 NTuple::Array<long> m_na_t3gwire;
196 NTuple::Array<double> m_na_t3rt;
197 NTuple::Array<double> m_na_t3rtNot0;
198 NTuple::Array<double> m_na_t3rc;
199 NTuple::Array<double> m_na_t3phi;
200 NTuple::Array<double> m_na_t3xMid;
201 NTuple::Array<double> m_na_t3yMid;
202 NTuple::Array<long> m_na_t3ovfl;
203 NTuple::Array<long> m_na_t3tNum;
204};
205
**********INTEGER nmxhep !maximum number of particles DOUBLE PRECISION vhep INTEGER jdahep COMMON hepevt $ !serial number $ !number of particles $ !status code $ !particle ident KF $ !parent particles $ !childreen particles $ !four momentum
ObjectVector< RecMdcHit > RecMdcHitCol
Definition RecMdcHit.h:99
StatusCode initialize()
StatusCode execute()
StatusCode finalize()
StatusCode beginRun()
MdcNavigation(const std::string &name, ISvcLocator *pSvcLocator)