CGEM BOSS 6.6.5.i
BESIII Offline Software System
Loading...
Searching...
No Matches
MdcDedxRecon.h
Go to the documentation of this file.
1// BesIII MDC dE/dx Reconstruction Module
2// Class: MdcDedxRecon
3// Created by Dayong WANG 2003/11
4
5#include <vector>
6#include <iostream>
7#include <fstream>
8#include <string>
9#include "GaudiKernel/Algorithm.h"
10#include "GaudiKernel/ISvcLocator.h"
11#include "AIDA/IHistogram1D.h"
12#include "AIDA/IHistogram2D.h"
13#include "GaudiKernel/NTuple.h"
16#include "MdcGeomSvc/MdcGeomSvc.h"
17
20
21#include "TFile.h"
22#include "TObjArray.h"
23#include "TFolder.h"
24#include "TH1F.h"
25
26class DedxCorrection;
27class MdcDedxTrk;
28
29class MdcDedxRecon:public Algorithm {
30
31 public:
32 MdcDedxRecon (const std::string& name, ISvcLocator* pSvcLocator );
34
35 StatusCode initialize();
36 StatusCode execute();
37 StatusCode finalize();
38 StatusCode beginRun();
39
40 const std::vector<MdcDedxTrk>& tracks(void) const;
41 void clearTables();
42
43 void mdctrackrec(RecMdcTrackCol::iterator trk, Identifier mdcid, double tes, int RunNO,int runFlag, MsgStream log);
44 void kaltrackrec(RecMdcKalTrackCol::iterator trk, Identifier mdcid, double tes, int RunNO,int runFlag, MsgStream log);
45 void switchtomdctrack(int trkid, Identifier mdcid, double tes, int RunNO,int runFlag, MsgStream log);
46
47
48 private:
49 int calib_flag;
50 int landau;
51 int ntpFlag;
52 int doNewGlobal;
53 int recalg; //reconstruction method:
54 //0:RecMdcTrack; 1:RecMdcKalTrack; 2:RecMdcTrack when no RecMdcKalTrack
55 int ParticleFlag;//particle type flag: 0: electron, 1:muon, 2: pion, 3:kaon, 4:proton
56 int m_alg; // algorithm 1: bi-truncation; 2: transformation; 3: logorithm mean;
57 float truncate; // truncation rate
58 std::string m_rootfile;
59
60 IDedxCurSvc* dedxcursvc;
61 IMdcGeomSvc* geosvc;
62 IDedxCorrecSvc* exsvc;
63 MdcDedxCorrection * ex_calib;
64 std::vector<MdcDedxTrk> ex_trks;
65 std::vector<int> m_trkalgs;
66 int m_trkalg;
67
68 RecMdcDedxCol* dedxList;
69 RecMdcDedx* resdedx;
70 RecMdcDedxHitCol* dedxhitList;
71 RecMdcDedxHit* dedxhit;
72 DedxHitRefVec* dedxhitrefvec;
73
74 //root file
75 TObjArray* m_hlist;
76 TFolder* m_hitlevel;
77 TH1F* m_hitNo_wire;
78
79 //Ntuple file
80 NTuple::Tuple* m_nt1;
81 NTuple::Item<float> m_phtm;
82 //NTuple::Item<float> m_median;
83 //NTuple::Item<float> m_geometric;
84 //NTuple::Item<float> m_geometric_trunc;
85 //NTuple::Item<float> m_harmonic;
86 //NTuple::Item<float> m_harmonic_trunc;
87 //NTuple::Item<float> m_transform;
88 //NTuple::Item<float> m_logtrunc;
89 NTuple::Item<float> m_dEdx_meas;
90
91 NTuple::Item<float> m_ptrk;
92 NTuple::Item<float> m_costheta;
93 NTuple::Item<float> m_sintheta;
94 NTuple::Item<float> m_charge;
95 NTuple::Item<float> m_runNO;
96 NTuple::Item<float> m_evtNO;
97 NTuple::Item<float> m_t0;
98 NTuple::Item<float> m_trackId;
99 NTuple::Item<float> m_poca_x;
100 NTuple::Item<float> m_poca_y;
101 NTuple::Item<float> m_poca_z;
102 NTuple::Item<float> m_recalg;
103
104 NTuple::Item<float> m_nhit;
105 NTuple::Item<float> m_usedhit;
106 NTuple::Item<long> m_nphlisthit;
107 NTuple::Array<double> m_dEdx_hit;
108
109 NTuple::Array<float> m_probpid;
110 NTuple::Array<float> m_expectid;
111 NTuple::Array<float> m_sigmaid;
112 NTuple::Item<float> m_parttype;
113 NTuple::Item<float> m_prob;
114 NTuple::Item<float> m_expect;
115 NTuple::Item<float> m_sigma;
116 NTuple::Item<float> m_chidedx;
117 NTuple::Item<float> m_chidedxe;
118 NTuple::Item<float> m_chidedxmu;
119 NTuple::Item<float> m_chidedxpi;
120 NTuple::Item<float> m_chidedxk;
121 NTuple::Item<float> m_chidedxp;
122
123
124 NTuple::Tuple* m_nt2;
125 NTuple::Item<double> m_charge1;
126 NTuple::Item<double> m_phraw;
127 NTuple::Item<double> m_exraw;
128 NTuple::Item<float> m_wire;
129 NTuple::Item<float> m_localwid;
130 NTuple::Item<double> m_runNO1;
131 NTuple::Item<float> m_nhit_hit;
132 NTuple::Item<float> m_doca_in;
133 NTuple::Item<float> m_doca_ex;
134 NTuple::Item<float> m_driftdist;
135 NTuple::Item<float> m_eangle;
136 NTuple::Item<float> m_costheta1;
137 NTuple::Item<float> m_pathL;
138 NTuple::Item<float> m_layer;
139 NTuple::Item<float> m_ptrk1;
140 NTuple::Item<float> m_ptrk_hit;
141 NTuple::Item<float> m_t01;
142 NTuple::Item<float> m_tdc_raw;
143 NTuple::Item<float> m_driftT;
144 NTuple::Item<float> m_trackId1;
145};
ObjectVector< RecMdcDedxHit > RecMdcDedxHitCol
SmartRefVector< RecMdcDedxHit > DedxHitRefVec
Definition RecMdcDedx.h:27
ObjectVector< RecMdcDedx > RecMdcDedxCol
Definition RecMdcDedx.h:132
void switchtomdctrack(int trkid, Identifier mdcid, double tes, int RunNO, int runFlag, MsgStream log)
void kaltrackrec(RecMdcKalTrackCol::iterator trk, Identifier mdcid, double tes, int RunNO, int runFlag, MsgStream log)
StatusCode initialize()
StatusCode execute()
const std::vector< MdcDedxTrk > & tracks(void) const
void mdctrackrec(RecMdcTrackCol::iterator trk, Identifier mdcid, double tes, int RunNO, int runFlag, MsgStream log)
MdcDedxRecon(const std::string &name, ISvcLocator *pSvcLocator)
StatusCode finalize()
StatusCode beginRun()