CGEM BOSS 6.6.5.h
BESIII Offline Software System
Loading...
Searching...
No Matches
CgemMdcCombAlg Class Reference

#include <CgemMdcCombAlg.h>

+ Inheritance diagram for CgemMdcCombAlg:

Public Member Functions

 CgemMdcCombAlg (const std::string &name, ISvcLocator *pSvcLocator)
 
StatusCode execute ()
 
StatusCode initialize ()
 
StatusCode finalize ()
 

Detailed Description

Definition at line 30 of file CgemMdcCombAlg.h.

Constructor & Destructor Documentation

◆ CgemMdcCombAlg()

CgemMdcCombAlg::CgemMdcCombAlg ( const std::string & name,
ISvcLocator * pSvcLocator )

Definition at line 67 of file CgemMdcCombAlg.cxx.

67 :
68 Algorithm(name, pSvcLocator)
69{
70 declareProperty("debug", m_debug = 0);
71 declareProperty("prodNT", m_prodNT = 0);
72 declareProperty("dropHot", m_dropHot= 1);
73 declareProperty("combineTracking",m_combineTracking=0);
74 declareProperty("keepBadTdc",m_keepBadTdc=0);
75 declareProperty("keepUnmatch",m_keepUnmatch=1);
76 declareProperty("dr_par",m_dr_par);
77 declareProperty("phi0_par",m_phi0_par);
78 declareProperty("kappa_par",m_kappa_par);
79 declareProperty("dz_par",m_dz_par);
80 declareProperty("tanl_par",m_tanl_par);
81 declareProperty("Pt",m_Pt);
82 declareProperty("w_dr",m_w_dr);
83 declareProperty("w_phi0",m_w_phi0);
84 declareProperty("w_kappa",m_w_kappa);
85 declareProperty("w_dz",m_w_dz);
86 declareProperty("w_tanl",m_w_tanl);
87
88 declareProperty("P_T", mv_Pt);
89 declareProperty("mean_dr", mv_mean_dr);
90 declareProperty("mean_phi0", mv_mean_phi0);
91 declareProperty("mean_kappa",mv_mean_kappa);
92 declareProperty("mean_dz", mv_mean_dz);
93 declareProperty("mean_tanL", mv_mean_tanL);
94 declareProperty("sig_dr", mv_sig_dr);
95 declareProperty("sig_phi0", mv_sig_phi0);
96 declareProperty("sig_kappa", mv_sig_kappa);
97 declareProperty("sig_dz", mv_sig_dz);
98 declareProperty("sig_tanL", mv_sig_tanL);
99
100 declareProperty("matchChi2Cut", mv_matchChi2Cut);
101}

Member Function Documentation

◆ execute()

StatusCode CgemMdcCombAlg::execute ( )

Definition at line 223 of file CgemMdcCombAlg.cxx.

224{
225 exe_v2();
226
227 return StatusCode::SUCCESS;
228}

◆ finalize()

StatusCode CgemMdcCombAlg::finalize ( )

Definition at line 820 of file CgemMdcCombAlg.cxx.

820 {
821
822 MsgStream log(msgSvc(), name());
823 log << MSG::INFO << "in finalize()" << endreq;
824
825 /*
826 cout<<"segment leave number = "<<unSegNum<<endl;
827 cout<< "track leave number = "<<unTrkNum<<endl;
828 cout<<"events in window = " <<EvInWindow<<endl;
829 cout<<"events out window = " <<EvOutWindow<<endl;
830 */
831 if(m_nPt) delete mg_mean_dr;
832 if(mg_mean_phi0) delete mg_mean_phi0;
833 delete mg_mean_kappa;
834 delete mg_mean_dz;
835 delete mg_mean_tanL;
836 delete mg_sig_dr;
837 delete mg_sig_phi0;
838 delete mg_sig_kappa;
839 delete mg_sig_dz;
840 delete mg_sig_tanL;
841
842 return StatusCode::SUCCESS;
843}
IMessageSvc * msgSvc()

◆ initialize()

StatusCode CgemMdcCombAlg::initialize ( )

Definition at line 104 of file CgemMdcCombAlg.cxx.

105{
106
107 MsgStream log(msgSvc(), name());
108 log << MSG::INFO << "in initialize()" << endreq;
109 if(m_prodNT)
110 {
111 /////////////////////////////// book ntuple //////////////////////////////////////
112 INTupleSvc* ntupleSvc;
113 StatusCode sc = service("NTupleSvc", ntupleSvc);
114 NTuplePtr mt(ntupleSvc, "FILE199/CgemMdcComb");
115 if ( mt ) match_ntuple = mt;
116 else{
117 match_ntuple = ntupleSvc->book("FILE199/CgemMdcComb", CLID_ColumnWiseTuple, "match");
118 StatusCode status;
119 if(match_ntuple){
120 status = match_ntuple->addItem("run", run);
121 status = match_ntuple->addItem("evt", evt);
122 status = match_ntuple->addItem("costhetaMC", costhetaMC);
123 status = match_ntuple->addItem("phiMC", phiMC);
124 status = match_ntuple->addItem("pdgMC", pdgMC);
125 status = match_ntuple->addItem("truth_dr", truth_dr);
126 status = match_ntuple->addItem("truth_dz", truth_dz);
127 status = match_ntuple->addItem("truth_phi0", truth_phi0);
128 status = match_ntuple->addItem("truth_kappa", truth_kappa);
129 status = match_ntuple->addItem("truth_tanl", truth_tanl);
130 status = match_ntuple->addItem("track_size",track_size,0,1000);
131 status = match_ntuple->addIndexedItem("matched", track_size, CgemSegMatched);
132 status = match_ntuple->addIndexedItem("dr_avg", track_size, dr_avg);
133 status = match_ntuple->addIndexedItem("dz_avg", track_size, dz_avg);
134 status = match_ntuple->addIndexedItem("tanL_avg", track_size, tanL_avg);
135 status = match_ntuple->addItem("segment_size",segment_size,0,1000);
136 status = match_ntuple->addIndexedItem("fit_failed", segment_size , match_failed);
137 status = match_ntuple->addItem("nMatch",match_nsegment,0,1000);
138 status = match_ntuple->addIndexedItem("chisq_dr", match_nsegment , match_dr_chisq);
139 status = match_ntuple->addIndexedItem("chisq_phi0", match_nsegment , match_phi0_chisq);
140 status = match_ntuple->addIndexedItem("chisq_kappa", match_nsegment , match_kappa_chisq);
141 status = match_ntuple->addIndexedItem("chisq_tanl", match_nsegment , match_tanl_chisq);
142 status = match_ntuple->addIndexedItem("chisq_dz", match_nsegment , match_dz_chisq);
143 status = match_ntuple->addIndexedItem("IsTruth", match_nsegment , match_IsTruth);
144 status = match_ntuple->addIndexedItem("track_dr", match_nsegment , track_dr);
145 status = match_ntuple->addIndexedItem("track_phi0", match_nsegment , track_phi0);
146 status = match_ntuple->addIndexedItem("track_kappa", match_nsegment , track_kappa);
147 status = match_ntuple->addIndexedItem("track_tanl", match_nsegment , track_tanl);
148 status = match_ntuple->addIndexedItem("track_dz", match_nsegment , track_dz);
149 status = match_ntuple->addIndexedItem("track_dr_err", match_nsegment , track_dr_err);
150 status = match_ntuple->addIndexedItem("track_phi0_err", match_nsegment , track_phi0_err);
151 status = match_ntuple->addIndexedItem("track_kappa_err", match_nsegment , track_kappa_err);
152 status = match_ntuple->addIndexedItem("track_tanl_err", match_nsegment , track_tanl_err);
153 status = match_ntuple->addIndexedItem("track_dz_err", match_nsegment , track_dz_err);
154 status = match_ntuple->addIndexedItem("seg_dr", match_nsegment , seg_dr);
155 status = match_ntuple->addIndexedItem("seg_phi0", match_nsegment , seg_phi0);
156 status = match_ntuple->addIndexedItem("seg_kappa", match_nsegment , seg_kappa);
157 status = match_ntuple->addIndexedItem("seg_tanl", match_nsegment , seg_tanl);
158 status = match_ntuple->addIndexedItem("seg_dz", match_nsegment , seg_dz);
159 status = match_ntuple->addIndexedItem("seg_dr_err", match_nsegment , seg_dr_err);
160 status = match_ntuple->addIndexedItem("seg_phi0_err", match_nsegment , seg_phi0_err);
161 status = match_ntuple->addIndexedItem("seg_kappa_err", match_nsegment , seg_kappa_err);
162 status = match_ntuple->addIndexedItem("seg_tanl_err", match_nsegment , seg_tanl_err);
163 status = match_ntuple->addIndexedItem("seg_dz_err", match_nsegment , seg_dz_err);
164 }
165 }
166 }
167 unSegNum = 0;
168 unTrkNum = 0;
169 EvInWindow = 0;
170 EvOutWindow = 0;
171
172 mg_mean_dr=0;
173 mg_mean_phi0=0;
174 mg_mean_kappa=0;
175 mg_mean_dz=0;
176 mg_mean_tanL=0;
177 mg_sig_dr=0;
178 mg_sig_phi0=0;
179 mg_sig_kappa=0;
180 mg_sig_dz=0;
181 mg_sig_tanL=0;
182
183 m_nPt=0;
184 if(mv_Pt.size()>0) {
185 cout<<"mv_Pt.size="<<mv_Pt.size()<<endl;
186 m_nPt = mv_Pt.size();
187 cout<<"pt[0]="<<mv_Pt[0]<<", pt[npt-1]="<<mv_Pt[m_nPt-1]<<endl;
188 if(mv_mean_dr.size()==m_nPt) mg_mean_dr = new TGraph(m_nPt, &mv_Pt[0], &mv_mean_dr[0]);
189 else cout<<"size of mean_dr != size of PT !"<<endl;
190
191 if(mv_mean_phi0.size()==m_nPt) mg_mean_phi0 = new TGraph(m_nPt, &mv_Pt[0], &mv_mean_phi0[0]);
192 else cout<<"size of mean_phi0 != size of PT !"<<endl;
193
194 if(mv_mean_kappa.size()==m_nPt)mg_mean_kappa= new TGraph(m_nPt, &mv_Pt[0], &mv_mean_kappa[0]);
195 else cout<<"size of mean_kappa != size of PT !"<<endl;
196
197 if(mv_mean_dz.size()==m_nPt) mg_mean_dz = new TGraph(m_nPt, &mv_Pt[0], &mv_mean_dz[0]);
198 else cout<<"size of mean_dz != size of PT !"<<endl;
199
200 if(mv_mean_tanL.size()==m_nPt) mg_mean_tanL = new TGraph(m_nPt, &mv_Pt[0], &mv_mean_tanL[0]);
201 else cout<<"size of mean_tanL != size of PT !"<<endl;
202
203 if(mv_sig_dr.size()==m_nPt) mg_sig_dr = new TGraph(m_nPt, &mv_Pt[0], &mv_sig_dr[0]);
204 else cout<<"size of sig_dr != size of PT !"<<endl;
205
206 if(mv_sig_phi0.size()==m_nPt) mg_sig_phi0 = new TGraph(m_nPt, &mv_Pt[0], &mv_sig_phi0[0]);
207 else cout<<"size of sig_phi0 != size of PT !"<<endl;
208
209 if(mv_sig_kappa.size()==m_nPt) mg_sig_kappa = new TGraph(m_nPt, &mv_Pt[0], &mv_sig_kappa[0]);
210 else cout<<"size of sig_kappa != size of PT !"<<endl;
211
212 if(mv_sig_dz.size()==m_nPt) mg_sig_dz = new TGraph(m_nPt, &mv_Pt[0], &mv_sig_dz[0]);
213 else cout<<"size of sig_dz != size of PT !"<<endl;
214
215 if(mv_sig_tanL.size()==m_nPt) mg_sig_tanL = new TGraph(m_nPt, &mv_Pt[0], &mv_sig_tanL[0]);
216 else cout<<"size of sig_tanL != size of PT !"<<endl;
217 }
218
219 return StatusCode::SUCCESS;
220
221}
INTupleSvc * ntupleSvc()

The documentation for this class was generated from the following files: