1 | #ifndef VertexFinderDA4D_h
|
---|
2 | #define VertexFinderDA4D_h
|
---|
3 |
|
---|
4 | /** \class VertexFinderDA4D
|
---|
5 | *
|
---|
6 | * Cluster vertices from tracks using deterministic annealing and timing information
|
---|
7 | *
|
---|
8 | * \authors M. Selvaggi, L. Gray
|
---|
9 | *
|
---|
10 | */
|
---|
11 |
|
---|
12 |
|
---|
13 | #include "classes/DelphesModule.h"
|
---|
14 |
|
---|
15 | #include <vector>
|
---|
16 |
|
---|
17 | class TObjArray;
|
---|
18 | class TIterator;
|
---|
19 | class Candidate;
|
---|
20 |
|
---|
21 | class VertexFinderDA4D: public DelphesModule
|
---|
22 | {
|
---|
23 | public:
|
---|
24 |
|
---|
25 | VertexFinderDA4D();
|
---|
26 | ~VertexFinderDA4D();
|
---|
27 |
|
---|
28 | void Init();
|
---|
29 | void Process();
|
---|
30 | void Finish();
|
---|
31 |
|
---|
32 | struct track_t
|
---|
33 | {
|
---|
34 | double z; // z-coordinate at point of closest approach to the beamline
|
---|
35 | double t; // t-coordinate at point of closest approach to the beamline
|
---|
36 | double dz2; // square of the error of z(pca)
|
---|
37 | double dtz; // covariance of z-t
|
---|
38 | double dt2; // square of the error of t(pca)
|
---|
39 | Candidate* tt; // a pointer to the Candidate Track
|
---|
40 | double Z; // Z[i] for DA clustering
|
---|
41 | double pi; // track weight
|
---|
42 | double pt;
|
---|
43 | double eta;
|
---|
44 | double phi;
|
---|
45 | };
|
---|
46 |
|
---|
47 |
|
---|
48 | struct vertex_t
|
---|
49 | {
|
---|
50 | double z;
|
---|
51 | double t;
|
---|
52 | double pk; // vertex weight for "constrained" clustering
|
---|
53 | // --- temporary numbers, used during update
|
---|
54 | double ei;
|
---|
55 | double sw;
|
---|
56 | double swz;
|
---|
57 | double swt;
|
---|
58 | double se;
|
---|
59 | // ---for Tc
|
---|
60 | double swE;
|
---|
61 | double Tc;
|
---|
62 | };
|
---|
63 |
|
---|
64 | void clusterize(const TObjArray & tracks, TObjArray & clusters);
|
---|
65 |
|
---|
66 | std::vector< Candidate* > vertices();
|
---|
67 |
|
---|
68 | std::vector<track_t> fill() const;
|
---|
69 |
|
---|
70 | bool split(double beta,
|
---|
71 | std::vector<track_t> & tks,
|
---|
72 | std::vector<vertex_t> & y) const;
|
---|
73 |
|
---|
74 | double update(double beta,
|
---|
75 | std::vector<track_t> & tks,
|
---|
76 | std::vector<vertex_t> & y) const;
|
---|
77 |
|
---|
78 | double update(double beta,
|
---|
79 | std::vector<track_t> & tks,
|
---|
80 | std::vector<vertex_t> & y,
|
---|
81 | double &)const;
|
---|
82 |
|
---|
83 | void dump(const double beta, const std::vector<vertex_t> & y, const std::vector<track_t> & tks) const;
|
---|
84 | bool merge(std::vector<vertex_t> &) const;
|
---|
85 | bool merge(std::vector<vertex_t> &, double &) const;
|
---|
86 | bool purge(std::vector<vertex_t> &, std::vector<track_t> & , double &, const double) const;
|
---|
87 |
|
---|
88 | void splitAll(std::vector<vertex_t> &y) const;
|
---|
89 |
|
---|
90 | double beta0(const double betamax,
|
---|
91 | std::vector<track_t> &tks,
|
---|
92 | std::vector<vertex_t> &y)const;
|
---|
93 |
|
---|
94 | double Eik(const track_t &t, const vertex_t &k)const;
|
---|
95 |
|
---|
96 | private:
|
---|
97 |
|
---|
98 | Bool_t fVerbose;
|
---|
99 | Double_t fMinPT;
|
---|
100 |
|
---|
101 | Float_t fVertexSpaceSize;
|
---|
102 | Float_t fVertexTimeSize;
|
---|
103 | Bool_t fUseTc;
|
---|
104 | Float_t fBetaMax;
|
---|
105 | Float_t fBetaStop;
|
---|
106 | Double_t fCoolingFactor;
|
---|
107 | Int_t fMaxIterations;
|
---|
108 | Double_t fDzCutOff;
|
---|
109 | Double_t fD0CutOff;
|
---|
110 | Double_t fDtCutOff; // for when the beamspot has time
|
---|
111 |
|
---|
112 | TObjArray *fInputArray;
|
---|
113 | TIterator *fItInputArray;
|
---|
114 |
|
---|
115 | TObjArray *fOutputArray;
|
---|
116 | TObjArray *fVertexOutputArray;
|
---|
117 |
|
---|
118 | ClassDef(VertexFinderDA4D, 1)
|
---|
119 | };
|
---|
120 |
|
---|
121 | #endif
|
---|