CGEM BOSS 6.6.5.h
BESIII Offline Software System
Loading...
Searching...
No Matches
DotsConnection.h
Go to the documentation of this file.
1#ifndef DotsConnection_H
2#define DotsConnection_H
3
4#include "GaudiKernel/Algorithm.h"
5#include "GaudiKernel/NTuple.h"
6#include "MdcGeomSvc/MdcGeomSvc.h"
9#include "McTruth/CgemMcHit.h"
10#include "MdcRawEvent/MdcDigi.h"
16//#include "MdcUtilitySvc/IMdcUtilitySvc.h"
18#include "TStopwatch.h"
19#include "TH2D.h"
20
21//using namespace KalmanFit;
22
23// track candidate
24// wire index (idx) >0 used in fit, <0 not used in fit, as in CGEM+ODC case, default idx >0
26{
27 int trkIdx;
28 int isGood;// 1: good candidates, 0: not good, -1: combined to other candidate
29
30 vector<int> mdcHitIdx[43];
31 //vector<vector<int> > mdcHitIdx(43);
32
33 vector<int> mdcXDigiWireIdx;// axial wires, negative if not associated
34 vector<double> mdcXDigiChi;// fitted chi for axial wires
35 vector<int> mdcXDigiFitted;//0: not sure, 1: used in fit, -1: not used in fit
38
39 vector<int> mdcV1DigiWireIdx;// stereo 1 wires
40 vector<int> mdcV2DigiWireIdx;// stereo 2 wires
41 vector<int> mdcVDigiWireIdx; // stereo wires
42 vector<double> mdcVDigiChi; // fitted chi for stereo wires
43 vector<int> mdcVDigiFitted; // if used in fit for stereo wires
44
45 vector<RecMdcHit> RecMdcHitVec; // for RecMdcHit storage
46
49
50 vector<int> CgemXClusterID;// <0: inactive in fit
51 vector<int> CgemVClusterID;// <0: inactive in fit
52 vector<double> CgemXClusterChi; // fitted chi
53 vector<double> CgemVClusterChi; // fitted chi
54
55 double Smax;// max arc length (up to broken point)
56 double chi2;
57 double a_helix[5];
58 //vector<double> a_helix(5);
59 double phi_inner;
60 double phi_outer;
61
62 // --- for (fat) path finding
63
64
65 bool operator==(const trkCandi& rhs) const{
66
67
68 const trkCandi& lfs = *this;
69 bool eq = true;
70 bool eq_thisline ;
71 #define COMPARE_A_ITEM__(NAME) \
72 { \
73 eq_thisline= (lfs.NAME == rhs.NAME); \
74 cout<<"compare ."<<#NAME<< " status:" <<(eq_thisline?"true":"false"); \
75 cout << "\n" ; \
76 eq = eq && eq_thisline; \
77 }
78 #define PRINT_IF_FAIL(NAME)\
79 if (!eq_thisline) cout<<" because {lfs." #NAME ":rhs."#NAME "}: {"<<lfs.NAME<<":"<<rhs.NAME<<"}"<<endl;
80
93 //COMPARE_A_ITEM__(RecMdcHitVec); //because RecMdcHitVec cannot be easily compared
102
103 for (int i = 0; i < 5; i++){
106
107 }
108 for (int i = 0; i < 43; i++){
110
111 }
112 return eq;
113
114 #undef COMPARE_A_ITEM__
115
116 }
117
118 const trkCandi& operator=(const trkCandi& rhs){
119 trkCandi& lfs = *this;
120 #define COPY_A_ITEM__(NAME) \
121 { \
122 lfs.NAME = rhs.NAME; \
123 }
124
148
149 for (int i = 0; i < 5; i++){
151
152 }
153 for (int i = 0; i < 43; i++){
155
156 }
157 return lfs;
158 #undef COPY_A_ITEM__
159 }
160
161};
162
163struct dot{
170 {
173 };
174
175 DetectorEnum detector;// 0: MDC, 1: CGEM
177 int stereo;// 0: axial, 1: stereo 1, -1: stereo 2
178 int layer; // layer.
179 int id ;// wire idx for MDC, cluster id for CGEM
180 // double dd;// rough drift distance
181 // std::vector<dot*> neighbors; // id+ or layer+
182 // std::vector<dot*> backward_neighbors; // id- or layer -
183 // double phiLR;//left-right ambiguity for MDC, default 99
184
185 vector<int> vecCellIdx;
186 //vector<int> vecCellIdx_2ndDot;
187 vector<int> vecGoodCellIdx[2];
188
189 vector<int> trkId;
190
191 int cluId;// hit-cluster index in an area
192};// dot
193
194static const int NUMBER_OF_DOTS_PER_CELL=3;
195
196struct Line{
197 double a, b; // ax + by + c =0
198 double rho, theta; // rho=x*cos(theta)+y*sin(theta)
199 //bool LR[NUMBER_OF_DOTS_PER_CELL];
200 vector<int> LR;
201 vector<double> S;
202 vector<int> order;
203 double chi2_hit[NUMBER_OF_DOTS_PER_CELL];
204 double chi2;
205};
206
207
208class DotsConnection:public Algorithm {
209 public:
210 DotsConnection (const std::string& name, ISvcLocator* pSvcLocator);
211 StatusCode initialize();
212 StatusCode execute();
213 StatusCode finalize();
214
215 bool dotComp(dot* dot1, dot* dot2) {
216 bool less=false;
217 int layer1=myMdcGeomSvc->Wire(dot1->id)->Layer();
218 int layer2=myMdcGeomSvc->Wire(dot2->id)->Layer();
219 if(layer1<layer2) less=true;
220 else if(layer1==layer2) {
221 int wCell1=myMdcGeomSvc->Wire(dot1->id)->Cell();
222 int wCell2=myMdcGeomSvc->Wire(dot2->id)->Cell();
223 if(wCell1<wCell2) {
224 if(fabs(wCell1-wCell2)<0.5*myNWire[layer1]) less=true;
225 }
226 else if(fabs(wCell1-wCell2)>0.5*myNWire[layer1]) less=true;
227 }
228 return less;
229 };
230
231 struct cell{
232 unsigned int id;
233 unsigned int idInGood;
234
235 dot* dots[NUMBER_OF_DOTS_PER_CELL];
236 //double chi2;
237
238 //Line fit_line[];
239 vector<Line> vecFittedLine;
241
242 //double fitLine();
243
244 set<int> set_dotIdx;// for dot-triplet
245
246 set<int> set_inEdge; // for the index of in-edges (good/valid edges)
247 set<int> set_outEdge;// for the index of out-edges (good/valid edges)
248 set<int> set_fwdCell;// for the index of forward-cells (possible edges tried)
249
250 double state;
251 int color;// 0: undiscovered, 1: discovered but under processing, 2: finished
252
253 // --- get i-th dot idx
254 int dotIdx(int i) {
255 if(i>=0&&i<set_dotIdx.size()) {
256 set<int>::iterator it=set_dotIdx.begin();
257 while(i>0) { it++; i--; }
258 return *it;
259 }
260 return -9999;
261 };
262 };// cell
263 vector<const MdcDigi*> getMdcDigiVec(cell& aCell);
264 int numSharedDots(cell& a, cell& b);
265 bool sameCell(cell& a, cell& b);
266 bool forward(cell& a, cell& b);
267 bool isNeighbour(cell& a, cell& b);
268 void print(cell& aCell);
269
271 {
272 if(l.S.size()==0) return false;
273 map<double, int> map_S_i;
274 int n_minus(0), n_plus(0);
275 vector<double>::iterator it_S=l.S.begin();
276 //cout<<" S= ";
277 for(int i=0; it_S!=l.S.end(); it_S++,i++)
278 {
279 //cout<<setw(5)<<*it_S<<" ";
280 if((*it_S)<0) n_minus++;
281 else n_plus++;
282 map_S_i[fabs(*it_S)]=i;
283 }
284 //cout<<endl;
285 if(n_minus==l.S.size()||n_plus==l.S.size())
286 {
287 map<double, int>::iterator it=map_S_i.begin();
288 for(; it!=map_S_i.end(); it++) l.order.push_back((*it).second);
289 return true;
290 }
291 else return false;
292 };
293
294 struct edge{
295 unsigned id;
296 pair<int,int> twoCells;// directed edge, with two cell indices in the good-cell-vector
297 pair<int,int> twoLines;// index of the fitted lines
298 set<int> set_dotIdx;// for dot-quadruplet
302 Common=2
303 };
304 vector<dot*> dots;
305 vector<dotStatus> vDotStatus;
306
307 vector<Line> vecFittedLine;
309 };
310 bool makeEdge(cell& a, cell& b, edge& e);
311 vector<const MdcDigi*> getMdcDigiVec(edge& aEdge);
312
314 vector<int> myCellMaxState;// cell index with the maximum state
315 vector<vector<int> > CellAutomaton(vector<int>& v_cellIdx, vector<cell>& v_cell, vector<edge>& v_edge);// calculate states, find the (longest) path(s)
316 void stateAutomaton(cell& aCell, vector<cell>& v_cell, vector<edge>& v_edge);
317 void nextCellFinding(cell& aCell, vector<cell>& v_cell, vector<edge>& v_edge, map<int, pair<double,double> >& setWireHitPos, map<int, int>& setWireEntry);
318 map<int, dot> myMapDots;
319 vector<cell> myVecCells;
320 vector<int> myVecGoodCellIdx;
321 vector<edge> myVecEdges;
322 void makeDotCellEdge(vector<int>& vecWireIdx);
323 void longestPathFromCA(vector<int>& vecWireIdx, vector<vector<int> >& v_path);
324 void longestPathFromCA(set<int>& setWireIdx, vector<vector<int> >& v_path);
325
326
327 private:
328
329 // --- properties ----------
330 int myDebug; // flag for debug output
331 int myDebugNb;
332 int myNtProd; // if produce Ntuple
333 int myIniHelix; // initial helix in ideal track fitting, 1: from MC particle at IP, 2: from MC hit innermost
334 double myDriftTimeUpLimit;
335 double myMdcHitChi2Cut;
336 bool myUseWireCrossPoint;
337 //bool myUseIdealTracking;
338 bool myWireCrossPointAvgMode;
339 bool myWireCrossPointPersistent;
340
341 bool myRunIdealTracking;
342 bool myUseInTrkerHits;
343 bool myRunTrkFollow;
344
345 // --- event T0
346 double getEventStartTime();// in ns
347 double myEvtT0;
348
349 // --- get MC truth
350 //bool getMCTruth();
351 KalmanFit::Helix getMCHelix();
352 int myMCparID;
353
354 // --- get MC charged final states (e, mu, pi, K, p)
355 void getMcFinalChargedStates();
356 vector<int> myVecMCTrkId;
357 vector<int> myVecPDG;
358 vector<double> myVecTrkLenFirstHalf;
359 vector< vector<double> > myVecHelix;
360 vector<Event::CgemMcHit*> myVecCgemMcHit;
361 vector<const RecCgemCluster*> myVecCgemXcluster;
362 vector<const RecCgemCluster*> myVecCgemVcluster;
363 vector<const RecCgemCluster*> myVecCgem1DCluster;
364 vector<int> myVecCgemXCluIdx[3][2];
365 vector<int> myVecCgemVCluIdx[3][2];
366 vector<double> myVecCgemXCluChi[3][2];
367 vector<double> myVecCgemVCluChi[3][2];
368 void clearVecCgemClu() {
369 for(int l=0; l<3; l++) {
370 for(int m=0; m<2; m++) {
371 myVecCgemXCluIdx[l][m].clear();
372 myVecCgemVCluIdx[l][m].clear();
373 myVecCgemXCluChi[l][m].clear();
374 myVecCgemVCluChi[l][m].clear();
375 }
376 }
377 };
378 vector<const MdcDigi*> myVecMdcDigi;
379 void resetFCSVec();
380 void associateDigisToMcParticles();
381
382 // --- get digi
383 RawDataProviderSvc* myRawDataProviderSvc;
384 const MdcDigi* myMdcDigiPointer[43][288];// for ideal tracking
385 void clearMdcDigiPointer();
386 vector<const MdcDigi*> getMdcDigiVec();
387 vector<const RecCgemCluster*> getCgemClusterVec(int view=0);// view = 0(X-view), 1(V-view), 2(X or V-view)
388 double getRoughDD(const MdcDigi* aMdcDigi);
389
390 // --- fill neighbours
391 map<int, const MdcDigi*> myMapMdcDigi;// MDC digi map <index, digi> (all MDC digis)
392 map<int, double> myMapMdcDigiDd;// MDC digi map <index, dd> (all MDC digis)
393 MdcDigiGroup myMdcDigiGroup[6796];// for neighbours
394 //MdcDigiGroup* myMdcDigiGroupPnt[43][288];
395 vector<int> myOuterEnds;
396 vector<int> myNeighbourSeeds;
397 void clearMdcNeighbours();
398 void fillMdcDigiBuildNeighbors(vector<const MdcDigi*> vecMdcDigiPnt, int SameLRange=1,int DiffLRange=1);
399 void fillMdcDigiMap(vector<const MdcDigi*>& vecMdcDigiPnt);
400 void buildMdcDigiNeighbors(map<int, const MdcDigi*>& aMapMdcDigi, int SameLRange=1,int DiffLRange=1);
401 void findOuterEnds();
402 //vector<vector<const MdcDigi*> > getMdcHitCluster();
403 void getMdcHitCluster();
404 //void buildMdcNeighbors();
405 //myMdcDigiNeighbours;
406 void mdcHitClustering(const vector<int>& vecWireIdx, vector<vector<int> >& vecHitClu);
407
408 // --- calibration svc
409 MdcCalibFunSvc* myMdcCalibFunSvc;
410 //ICgemCalibFunSvc* myCgemCalibSvc;
411
412 // --- geometry of MDC
413 MdcGeomSvc* myMdcGeomSvc;
414 int myNWire[43];
415 int myWireFlag[43];
416 int myOuterWire[43][288][2];
417 int myInnerWire[43][288][2];
418 double myWirePhi[43][288];
419 double myRLayer[43];
420
421 // --- useful functions
422 //IMdcUtilitySvc* myMdcUtilitySvc;
423 double dPhi(double phi1, double phi2);// --- delta phi (-pi, pi)
424
425 // --- for CGEM
426 CgemGeomSvc* myCgemGeomSvc;
427 // --- for CGEM clusters
428 //bool sortCluster(const RecCgemCluster* clusterA , const RecCgemCluster* clusterB);
429 //SmartDataPtr<RecCgemClusterCol> myPntRecCgemClusterCol;
430 RecCgemClusterCol::iterator myIterCgemClusterBegin;
431 RecCgemClusterCol::iterator myIterCgemClusterEnd;
432 RecCgemClusterCol::iterator myIterClu;
433 vector<int> myVecCgemXClusterIdx[3];// cluster index in RecCgemClusterCol [3 layers]
434 vector<int> myVecCgemVClusterIdx[3];// [3 layers]
435 vector<int> myVecCgemXClusterTrkIdx[3];// trk index in myVecTrkCandidates [3 layers]
436 vector<int> myVecCgemVClusterTrkIdx[3];// [3 layers]
437 bool getCgemClusters();// fill the above data
438 bool getCgemClusterIntersection(int idx_Xclu, int idx_Vclu, double& z);
439 void findCgemTrkSeg();
440
441 // --- area index
442 int myAreaLayer[43];// total 8 (7) areas: 4, 4, 12, 4, 4, 4, 4, 7 (3, 12, 4, 4, 4, 4, 7) for MDC (MDC+CGEM)
443
444 // --- global circle/Helix fitter
445 DotsHelixFitter myDotsHelixFitter;
446 double myChi2CutDiverge;
447 void testDotsHelixFitterAllHits();
448 void testDotsHelixFitterPartHits();
449 double myChiCut_circle;
450 int myNmaxDeact_circle;
451 double myChiCut_helix;
452 int myNmaxDeact_helix;
453 int myNOuterXHits;
454
455 // --- vector for track candidates
456 vector<struct trkCandi> myVecTrkCandidates;// for a event
457 vector<struct trkCandi> myVecTrkPaths;// for a track candiates with multi-paths
458 vector<pair<int, int> > myVecNhitPathId;// for a track candiates with multi-paths [number-of-act-hit, tracknum]
459 // --- tmp vector for track candidates fitting
460 vector<int> myVecDigiIdx;
461 vector<int> myVecCluIdx;
462 // --- functions for track candidates
463 void printTrkCandi(struct trkCandi& aTrkCandi);
464 int nXHitsActive(struct trkCandi& aTrkCandi);
465 int setFitFlagUncertain(struct trkCandi& aTrkCandi, int layerMin=-1, int layerMax=50);
466 int setXHitsInBigSetFitFlagUncertain(struct trkCandi& aTrkCandi, bool set=true);
467 vector<const MdcDigi*> getXDigiVec(struct trkCandi& aTrkCandi, int sel=0, vector<int>* vecFitFlag=NULL);// sel=0: all, sel=1: only associated hits, sel=2: only fitted hits & uncertain hits
468 //vector<const MdcDigi*> getXDigiVec(struct trkCandi& aTrkCandi, int sel, vector<int>& vecFitFlag);// sel=0: all, sel=1: only associated hits, sel=2: only fitted hits & uncertain hits
469 vector<const MdcDigi*> getVDigiVec(struct trkCandi& aTrkCandi, int sel=0);// sel=0: all, sel=1: only associated hits, sel=2: only fitted hits
470 vector<const MdcDigi*> getDigiVec(struct trkCandi& aTrkCandi, int sel=0);// sel=0: all, sel=1: only associated hits, sel=2: only fitted hits
471 vector<const RecCgemCluster*> getXCluVec(struct trkCandi& aTrkCandi, int sel=0);// sel=0: all, sel=1: only associated hits, sel=2: only fitted hits
472 vector<const RecCgemCluster*> getVCluVec(struct trkCandi& aTrkCandi, int sel=0);// sel=0: all, sel=1: only associated hits, sel=2: only fitted hits
473 vector<const RecCgemCluster*> getCluVec(struct trkCandi& aTrkCandi, int sel=0);// sel=0: all, sel=1: only associated hits, sel=2: only fitted hits
474 void tagRedudantHits(struct trkCandi& aTrkCandi);
475 bool split(struct trkCandi& aTrkCandi, int idxCandi);
476 void tagClusterHits(struct trkCandi& aTrkCandi);// set fit flag = 0 for hits in cluster (> 3*3 hits)
477 bool isInOutNeighbours(struct trkCandi& innerTrkCandi, struct trkCandi& outerTrkCandi, int gap=1);
478 bool isInOutNeighbours(const vector<int>& innerSet, const vector<int>& outerSet);
479 void combineTrkCandi(struct trkCandi& trkCandi_1, struct trkCandi& trkCandi_2);
480 void rmPathInTrkCandi(struct trkCandi& aTrkCandi, struct trkCandi& path);
481 void resetXDigiFitItem(struct trkCandi& aTrkCandi);
482 void resetVDigiFitItem(struct trkCandi& aTrkCandi);
483 void updateDigiFitItem(struct trkCandi& aTrkCandi);
484 void updateCgemFitItem(struct trkCandi& aTrkCandi, int assignCgemClu=0);
485 void dropRedundantMdcXDigi(struct trkCandi& aTrkCandi);
486 void calcuCiclePar3CgemClu(struct trkCandi& aTrkCandi);
487 std::vector<std::pair<double, double> > findWireCrossPoint(struct trkCandi& aTrkCandi, vector<double>* ref_track_param=nullptr);
488 int circleFitTaubin(struct trkCandi& aTrkCandi, double chiCut=9999.0, bool useIniHelx=false, int hitSel=1, bool setHitFitFlag=false, int layerMin=-1, int layerMax=50, bool use_additional_points=false, bool usePhiAmbi=false, const vector<double>& vPhiAmb=vector<double>() );
489 void circleFit(struct trkCandi& aTrkCandi);
490 void matchCgemClusterMdcDigi();
491 void processTrkCandi();
492 void processMdcHitCluter();
493 bool completeTrkCandi(struct trkCandi& aTrkCandi, int idxCandi);
494 bool matchMdcDigi(struct trkCandi& aTrkCandi, int idx);
495 bool matchCgemXCluster(struct trkCandi& aTrkCandi);
496 bool selectVHits(struct trkCandi& aTrkCandi);
497 int helixFit(struct trkCandi& aTrkCandi, double chiCut=9999.0, int layerMin=-1, int layerMax=50);
498 int saveGoodTrkCandi();
499 void fillVecCgemClu(struct trkCandi& aTrkCandi);
500 int NXcluToDrop(struct trkCandi& aTrkCandi);
501 bool isGoodCgemCircleCandi(struct trkCandi& aTrkCandi);
502 struct trkCandi getTrkCandi(const vector<int>& vecWireIdx);
503
504 vector<int> getUncommonVec(vector<int> v1, vector<int>& v2);
505 void setMinusVec(set<int>& s, vector<int>& v);
506
507 // --- Hough maps for sz vs tanL
508 int myNBinTanl;
509 int myNBinDz;
510 double myTanlRange;
511 double myDzRange;
512 TH2D myRoughTanlDzMap;
513 int fillTanlDzMap(double s, double z, int vote=3);
514 void getWeightedPeak(TH2D& h, double& x_peak, double& y_peak, double& x_weight, double&y_weight, int x_ext=2, int y_ext=1);
515
516 // --- hough for line rho vs theta
517 double myRhoRange;
518 double myThetaRange;
519 void getRhoTheta_bisection(vector<const MdcDigi*>& aVecMdcDigi);// bisection method
520 TH2D myRoughRhoThetaMap;
521
522 // --- total least line fit for MDC hits
523 bool LineFit_TLS(vector<const MdcDigi*>& aVecMdcDigi, vector<double>& vRho, vector<double>& vTheta, vector<vector<int> >& vvLR, vector<vector<double> >& vvS, bool ini=false, double rho_ini=0, double theta_ini=0, const vector<int>& LR_ini=vector<int>() );
524 bool isGood_Drho2_line(double drho2_tls, int layer=40) {
525 if(drho2_tls<0.025) return true;
526 else return false;
527 }
528 double getS(double rho, double theta, double x, double y) {
529 if(rho<0) {
530 rho*=-1.0;
531 theta+=acos(-1.);
532 }
533 double r=sqrt(x*x+y*y);
534 double phi=atan2(y,x);
535 double s=r*sin(theta-phi);
536 return s;
537 }
538 void getXY(double rho, double theta, double s, double& x, double& y) {
539 if(rho<0) {
540 rho*=-1.0;
541 theta+=acos(-1.);
542 }
543 x=rho*cos(theta)+s*sin(theta);
544 y=rho*sin(theta)-s*cos(theta);
545 }
546
547 // --- caculation of the 8 circles tangent to three given drift circles
548 vector<vector<double> > getTangentCircles(vector<const MdcDigi*>& aVecMdcDigi);
549
550 // --- the tangent circle with the maximum probability
551 vector<double> getBestTangentCircle(vector<const MdcDigi*>& aVecMdcDigi);
552
553 // --- RecMdcTrackCol
554 RecMdcTrackCol* myRecMdcTrackCol;
555 RecMdcHitCol* myRecMdcHitCol;
556 bool registerRecMdcTrack();
557
558 // --- store RecMdcTrack from myDotsHelixFitter
559 bool saveARecMdcTrack(int iTrk);
560 bool saveARecMdcTrack(struct trkCandi& aTrkCandi);
561
562 // --- event information
563 int myRun;
564 int myEvt;
565
566 // --- timing tools
567 Bool_t myWatch_reset;
568 TStopwatch myWatch_tot;
569 TStopwatch myWatch_finding;
570 TStopwatch myWatch_fitting;
571
572 // --- root items for myDotsHelixFitter
573 NTuple::Tuple* myNtHelixFitter;
574 NTuple::Item<int> myRUN;
575 NTuple::Item<int> myEVT;
576 NTuple::Item<int> myPID;
577 NTuple::Item<int> myNPar;
578 NTuple::Item<int> myNXHits;
579 NTuple::Item<int> myNVHits;
580 NTuple::Item<int> myNXCluster;
581 NTuple::Item<int> myNVCluster;
582 //NTuple::Item<int> myInnerVHits;
583 NTuple::Array<double> myArrayHelixMC;
584 NTuple::Array<double> myArrayHelixMCInDec;
585 NTuple::Array<double> myArrayHelixFitted;
586 NTuple::Item<int> myNHitsCircle;
587 NTuple::Array<double> myLayerHitsCircle;
588 NTuple::Array<double> myChiHitsCircle;
589 NTuple::Item<int> myNHits;
590 NTuple::Array<double> myLayerHits;
591 NTuple::Array<double> myChiHits;
592 NTuple::Item<int> myTrkIdBest;
593 NTuple::Item<int> myNHitsBestTrk;
594 NTuple::Item<int> myNSameHitsBestTrk;
595
596 // --- root items for myNtTrkSeg
597 NTuple::Tuple* myNtTrkSeg;
598 NTuple::Item<int> myNt_nhits;
599 NTuple::Array<int> myNt_layer;
600 NTuple::Array<int> myNt_wire;
601 NTuple::Array<double> myNt_Xhit;
602 NTuple::Array<double> myNt_Yhit;
603 NTuple::Array<double> myNt_DDhit;
604 NTuple::Item<double> myNt_rho;
605 NTuple::Item<double> myNt_theta;
606};
607
608#endif
double sin(const BesAngle a)
Definition BesAngle.h:210
double cos(const BesAngle a)
Definition BesAngle.h:213
Double_t phi2
Double_t x[10]
Double_t phi1
#define COPY_A_ITEM__(NAME)
#define COMPARE_A_ITEM__(NAME)
#define PRINT_IF_FAIL(NAME)
XmlRpcServer s
**********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
ObjectVector< RecMdcHit > RecMdcHitCol
Definition RecMdcHit.h:99
ObjectVector< RecMdcTrack > RecMdcTrackCol
void print(cell &aCell)
void stateAutomaton(cell &aCell, vector< cell > &v_cell, vector< edge > &v_edge)
void longestPathFromCA(vector< int > &vecWireIdx, vector< vector< int > > &v_path)
DotsConnection(const std::string &name, ISvcLocator *pSvcLocator)
bool forward(cell &a, cell &b)
bool dotComp(dot *dot1, dot *dot2)
int numSharedDots(cell &a, cell &b)
StatusCode execute()
void nextCellFinding(cell &aCell, vector< cell > &v_cell, vector< edge > &v_edge, map< int, pair< double, double > > &setWireHitPos, map< int, int > &setWireEntry)
bool makeEdge(cell &a, cell &b, edge &e)
bool sameCell(cell &a, cell &b)
StatusCode finalize()
vector< int > myVecGoodCellIdx
StatusCode initialize()
vector< cell > myVecCells
vector< int > myCellMaxState
bool makeOrder(Line &l)
vector< edge > myVecEdges
map< int, dot > myMapDots
void makeDotCellEdge(vector< int > &vecWireIdx)
vector< const MdcDigi * > getMdcDigiVec(cell &aCell)
bool isNeighbour(cell &a, cell &b)
vector< vector< int > > CellAutomaton(vector< int > &v_cellIdx, vector< cell > &v_cell, vector< edge > &v_edge)
const MdcGeoWire *const Wire(unsigned id)
vector< Line > vecFittedLine
dot * dots[NUMBER_OF_DOTS_PER_CELL]
vector< Line > vecFittedLine
pair< int, int > twoCells
pair< int, int > twoLines
vector< dot * > dots
vector< dotStatus > vDotStatus
vector< double > S
vector< int > LR
double rho
vector< int > order
double chi2
double a
double b
double theta
double chi2_hit[NUMBER_OF_DOTS_PER_CELL]
DigiPtr digi
vector< int > vecGoodCellIdx[2]
int layer
vector< int > trkId
int stereo
DetectorEnum detector
@ NUL_DETECTOR
vector< int > vecCellIdx
int cluId
double phi_outer
vector< RecMdcHit > RecMdcHitVec
vector< int > mdcV2DigiWireIdx
bool operator==(const trkCandi &rhs) const
const trkCandi & operator=(const trkCandi &rhs)
double chi2
vector< int > mdcXDigiFitted
vector< double > CgemVClusterChi
vector< double > CgemXClusterChi
vector< double > mdcVDigiChi
vector< int > mdcXDigiWireIdx
double Smax
vector< int > CgemXClusterID
vector< double > mdcXDigiChi
vector< int > mdcVDigiWireIdx
vector< int > mdcVDigiFitted
double phi_inner
vector< int > mdcHitIdx[43]
double a_helix[5]
vector< int > mdcV1DigiWireIdx
vector< int > CgemVClusterID
const RecCgemCluster * cgemDigi
const MdcDigi * mdcDigi