EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GFDaf.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file GFDaf.h
1 /* Copyright 2011, Technische Universitaet Muenchen,
2 Authors: Karl Bicker, Christian Hoeppner
3 
4 This file is part of GENFIT.
5 
6 GENFIT is free software: you can redistribute it and/or modify
7 it under the terms of the GNU Lesser General Public License as published
8 by the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10 
11 GENFIT is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU Lesser General Public License for more details.
15 
16 You should have received a copy of the GNU Lesser General Public License
17 along with GENFIT. If not, see <http://www.gnu.org/licenses/>.
18  */
23 #ifndef GFDAF_H
24 #define GFDAF_H
25 
26 #include<assert.h>
27 #include<cmath>
28 #include<GFAbsRecoHit.h>
29 #include<GFDafHit.h>
30 #include<GFKalman.h>
31 #include<GFTrack.h>
32 #include<stdlib.h>
33 #include<vector>
34 
51 class GFDaf: GFKalman {
52  public:
53 
54  GFDaf();
55  ~GFDaf() { };
56 
59  void processTrack(GFTrack* trk);
60 
73  const std::vector<std::vector<std::vector<double> > > getWeights() {
74  std::cout<<"Warning: Using deprecated GFDaf::getWeights()! The weights of the hits are accessible in the bookkeeping of the track which was fitted, the key is \"dafWeight\""<<std::endl;
75  return fWeights;
76  };
77 
86  void setProbCut(double prob_cut);
87 
93  void setBetas(double b1,double b2=-1,double b3=-1.,double b4=-1.,double b5=-1.,double b6=-1.,double b7=-1.,double b8=-1.,double b9=-1.,double b10=-1.);
94 
95  private:
96 
99  std::vector<GFDafHit*> initHitsWeights(GFTrack* trk);
100 
103  std::vector<std::vector<double> > calcWeights(GFTrack* trk, double beta);
104 
107  void copySmoothing(GFTrack* source, GFTrack* target, int target_ire);
108 
109  void saveWeights(GFTrack* trk, const std::vector<std::vector<std::vector<double> > >& weights) const;
110 
111  std::vector<std::vector<std::vector<double> > > fWeights;
112  std::vector<double> fBeta;
113  std::map<int,double> fchi2Cuts;
114 
115 };
116 
117 #endif
118