CGEM BOSS 6.6.5.f
BESIII Offline Software System
Loading...
Searching...
No Matches
Reconstruction/CgemSegmentFitAlg/CgemSegmentFitAlg-00-00-04/CgemSegmentFitAlg/CgemSegmentFitAlg.h
Go to the documentation of this file.
1#ifndef CGEMSEGMENTFITALG_H
2#define CGEMSEGMENTFITALG_H
3#include "GaudiKernel/Algorithm.h"
4#include "CgemRecEvent/RecCgemCluster.h"
5#include "CgemRecEvent/RecCgemSegment.h"
6#include "McTruth/McParticle.h"
7#include "CgemCalibFunSvc/CgemCalibFunSvc.h"
8
9#include "VertexFit/IVertexDbSvc.h"
10#include "GaudiKernel/NTuple.h"
11#include "GaudiKernel/INTupleSvc.h"
12//#include "TrackUtil/Helix.h"
13#include "KalFitAlg/helix/Helix.h"
14#include "CLHEP/Geometry/Point3D.h"
15#include "CLHEP/Matrix/Vector.h"
16
17#include "TROOT.h"
18#include "TObjArray.h"
19#include "TH1F.h"
20#include "TProfile.h"
21#include "TFile.h"
22#include "TFolder.h"
23#include "TMinuit.h"
24
25#include <vector>
26
27#include <string>
28
29using namespace std;
30
31class CgemSegmentFitAlg:public Algorithm {
32public:
33 CgemSegmentFitAlg(const std::string& name, ISvcLocator* pSvcLocator);
34 StatusCode execute();
35 StatusCode initialize();
36 StatusCode finalize();
37
38 StatusCode exe_v1();
39 StatusCode exe_v2();
40
41
42private:
43
44
45 bool CheckClusterID(int layerID, int clusterID, int vec_clusterID[3]);
46 int GetChargeOfTrack();
47 int GetChargeOfTrack(double *vec_phi);
48 int estiChargeOfSeg();
49 double IntersectCylinder(double r, KalmanFit::Helix helix);
50 double GetMin(double *a);
51 double GetMax(double *a);
52 int mnTrkFit(Double_t trkpar[], Double_t trkparErr[], Double_t* emat, double& chisq);
53
54 int m_debug;
55 int m_checkIdx;
56 int m_ver;
57
58 int m_run;
59 int m_evt;
60
61 double wide_delta;
62 double pitch;
63 int m_failed;
64 int check_segNum;
65 int check_segOver;
66 TMinuit* m_pMnTrk;
67
68 map<int , RecCgemSegment*> m_seg_map;
69 map<int , RecCgemSegment*>::iterator m_seg_map_it;
70
71 double m_helix_mc[5];
72 void getMcPar();
73
74 ICgemCalibFunSvc* myCgemCalibSvc;
75
76 NTuple::Tuple* helix_ntuple;
77 NTuple::Item<long> cgem_run;
78 NTuple::Item<long> cgem_evt;
79 NTuple::Item<long> cgem_nsegment;
80 NTuple::Item<long> truth_ntrack;
81
82 NTuple::Array<double> truth_dr;
83 NTuple::Array<double> truth_dz;
84 NTuple::Array<double> truth_phi0;
85 NTuple::Array<double> truth_kappa;
86 NTuple::Array<double> truth_tanl;
87 NTuple::Array<double> truth_CosTheta;
88 NTuple::Array<int> truth_charge;
89
90 NTuple::Array<int> cgem_segmentid;
91 NTuple::Array<double> cgem_dr_ini;
92 NTuple::Array<double> cgem_dz_ini;
93 NTuple::Array<double> cgem_phi0_ini;
94 NTuple::Array<double> cgem_kappa_ini;
95 NTuple::Array<double> cgem_tanl_ini;
96 NTuple::Array<double> cgem_dr;
97 NTuple::Array<double> cgem_dz;
98 NTuple::Array<double> cgem_phi0;
99 NTuple::Array<double> cgem_kappa;
100 NTuple::Array<double> cgem_tanl;
101 NTuple::Array<double> cgem_chisq;
102 NTuple::Array<int> cgem_charge;
103 NTuple::Array<int> cgem_fitFlag;
104
105 NTuple::Item<int> n_layer;
106 NTuple::Array<int> n_stripX;
107 NTuple::Array<int> n_stripV;
108 NTuple::Array<double> mc_phi;
109 NTuple::Array<double> mc_v;
110 NTuple::Array<double> rec_phi;
111 NTuple::Array<double> rec_v;
112
113
114};
115
116
117#endif /* CGEMSEGMENTFITALG_H */
118
StatusCode exe_v1()
StatusCode finalize()
StatusCode initialize()
CgemSegmentFitAlg(const std::string &name, ISvcLocator *pSvcLocator)
StatusCode exe_v2()
StatusCode execute()