MarlinTPC  1.2.0
PhotoelectricClusterTools.h
1 /*
2  * PhotoelectricClusterTools.h
3  *
4  * Created on: Apr 24, 2014
5  * Author: zenker
6  */
7 
8 #ifndef PHOTOELECTRICCLUSTERTOOLS_H_
9 #define PHOTOELECTRICCLUSTERTOOLS_H_
10 
11 #include <set>
12 #include <vector>
13 
14 // CLHEP
15 #include <CLHEP/Vector/TwoVector.h>
16 
17 // LCIO
18 #include <lcio.h>
19 #include <EVENT/TrackerPulse.h>
20 #include <IMPL/TrackerHitImpl.h>
21 
22 // GEAR
23 #include <gear/TPCParameters.h>
24 #include <gearimpl/GlobalPadIndex.h>
25 
26 /* NOTE this uses the C++ version of Minuit - not the Fortran version */
27 #include <Minuit2/FCNBase.h>
28 
29 namespace marlintpc{
30 
39 CLHEP::Hep2Vector calculateSeed(const std::set<lcio::TrackerPulse*> &pulses, const gear::TPCParameters& tpc_parameters, IMPL::TrackerHitImpl *seed_photodot = 0);
40 
57 bool doLikelihoodFit(const lcio::TrackerHit &seed, lcio::TrackerHitImpl* fit_result, double sigma, bool fitSigma = false);
58 
62 class PhotodotLikelihood : public ROOT::Minuit2::FCNBase
63 {
64 
65  public:
66 
67  PhotodotLikelihood(const lcio::TrackerHit &photodot_data);
68 
69  virtual double operator()(const std::vector<double>& x) const;
70 
71  virtual double Up() const;
72 
73  private:
74 
75  const lcio::TrackerHit &_photodot_data;
76 };
77 }
78 #endif /* PHOTOELECTRICCLUSTERTOOLS_H_ */
CLHEP::Hep2Vector calculateSeed(const std::set< lcio::TrackerPulse * > &pulses, const gear::TPCParameters &tpc_parameters, IMPL::TrackerHitImpl *seed_photodot=0)
The given TrackerPulse set is used to sum up all positions with the charge of the pulse as weight...
bool doLikelihoodFit(const lcio::TrackerHit &seed, lcio::TrackerHitImpl *fit_result, double sigma, bool fitSigma=false)
Perform the Likelihood fit using the PhotodotLikelihood class.
This helper class is used to calculate the likelihood function while fitting photodots.
Definition: PhotoelectricClusterTools.h:62