CGEM BOSS 6.6.5.g
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"
8#include "McTruth/CgemMcHit.h"
14//#include "MdcUtilitySvc/IMdcUtilitySvc.h"
16
17//using namespace KalmanFit;
18
19class DotsConnection:public Algorithm {
20 public:
21 DotsConnection (const std::string& name, ISvcLocator* pSvcLocator);
22 StatusCode initialize();
23 StatusCode execute();
24 StatusCode finalize();
25
26 private:
27
28 // --- properties ----------
29 int myDebug; // flag for debug output
30 int myNtProd; // if produce Ntuple
31 double myDriftTimeUpLimit;
32 double myMdcHitChi2Cut;
33
34 // --- event T0
35 double getEventStartTime();// in ns
36
37 // --- get MC truth
38 //bool getMCTruth();
39 KalmanFit::Helix getMCHelix();
40 int myMCparID;
41
42 // --- get MC charged final states (e, mu, pi, K, p)
43 void getMcFinalChargedStates();
44 vector<int> myVecMCTrkId;
45 vector<int> myVecPDG;
46 vector<double> myVecTrkLenFirstHalf;
47 vector< vector<double> > myVecHelix;
48 vector<Event::CgemMcHit*> myVecCgemMcHit;
49 vector<const RecCgemCluster*> myVecCgemXcluster;
50 vector<const RecCgemCluster*> myVecCgemVcluster;
51 vector<const RecCgemCluster*> myVecCgem1DCluster;
52 vector<int> myVecCgemXCluIdx[3][2];
53 vector<int> myVecCgemVCluIdx[3][2];
54 vector<const MdcDigi*> myVecMdcDigi;
55 void resetFCSVec();
56 void associateDigisToMcParticles();
57
58 // --- get digi
59 RawDataProviderSvc* myRawDataProviderSvc;
60 const MdcDigi* myMdcDigiPointer[43][288];
61 void clearMdcDigiPointer();
62 vector<const MdcDigi*> getMdcDigiVec();
63 vector<const RecCgemCluster*> getCgemClusterVec(int view=0);// view = 0(X-view), 1(V-view), 2(X or V-view)
64
65 // --- calibration svc
66 MdcCalibFunSvc* myMdcCalibFunSvc;
67 //ICgemCalibFunSvc* myCgemCalibSvc;
68
69 // --- geometry of MDC
70 MdcGeomSvc* myMdcGeomSvc;
71 int myNWire[43];
72 int myWireFlag[43];
73 int myOuterWire[43][288][2];
74 int myInnerWire[43][288][2];
75 double myWirePhi[43][288];
76 double myRLayer[43];
77
78 // --- useful functions
79 //IMdcUtilitySvc* myMdcUtilitySvc;
80 double dPhi(double phi1, double phi2);// --- delta phi (-pi, pi)
81
82 // --- for CGEM clusters
83 //bool sortCluster(const RecCgemCluster* clusterA , const RecCgemCluster* clusterB);
84
85 // --- global circle/Helix fitter
86 DotsHelixFitter myDotsHelixFitter;
87 double myChi2CutDiverge;
88 void testDotsHelixFitterAllHits();
89 void testDotsHelixFitterPartHits();
90 double myChiCut_circle;
91 int myNmaxDeact_circle;
92 double myChiCut_helix;
93 int myNmaxDeact_helix;
94
95 // --- RecMdcTrackCol
96 RecMdcTrackCol* myRecMdcTrackCol;
97 RecMdcHitCol* myRecMdcHitCol;
98 bool registerRecMdcTrack();
99
100 // --- store RecMdcTrack from myDotsHelixFitter
101 bool saveARecMdcTrack(int iTrk);
102
103 // --- event information
104 int myRun;
105 int myEvt;
106
107 // --- root items for myDotsHelixFitter
108 NTuple::Tuple* myNtHelixFitter;
109 NTuple::Item<int> myRUN;
110 NTuple::Item<int> myEVT;
111 NTuple::Item<int> myPID;
112 NTuple::Item<int> myNPar;
113 NTuple::Item<int> myNXHits;
114 NTuple::Item<int> myNVHits;
115 NTuple::Item<int> myNXCluster;
116 NTuple::Item<int> myNVCluster;
117 //NTuple::Item<int> myInnerVHits;
118 NTuple::Array<double> myArrayHelixMC;
119 NTuple::Array<double> myArrayHelixFitted;
120 NTuple::Item<int> myNHitsCircle;
121 NTuple::Array<double> myLayerHitsCircle;
122 NTuple::Array<double> myChiHitsCircle;
123 NTuple::Item<int> myNHits;
124 NTuple::Array<double> myLayerHits;
125 NTuple::Array<double> myChiHits;
126 NTuple::Item<int> myTrkIdBest;
127 NTuple::Item<int> myNHitsBestTrk;
128 NTuple::Item<int> myNSameHitsBestTrk;
129
130
131};
132
133#endif
Double_t phi2
Double_t phi1
ObjectVector< RecMdcHit > RecMdcHitCol
Definition: RecMdcHit.h:99
ObjectVector< RecMdcTrack > RecMdcTrackCol
Definition: RecMdcTrack.h:102
StatusCode execute()
StatusCode finalize()
StatusCode initialize()