laura is hosted by Hepforge, IPPP Durham
Laura++  v2r1
A maximum likelihood fitting package for performing Dalitz-plot analysis.
LauScfMap.hh
Go to the documentation of this file.
1 
2 // Copyright University of Warwick 2006 - 2013.
3 // Distributed under the Boost Software License, Version 1.0.
4 // (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5 
6 // Authors:
7 // Thomas Latham
8 // John Back
9 // Paul Harrison
10 
21 #ifndef LAU_SCF_MAP
22 #define LAU_SCF_MAP
23 
24 #include <vector>
25 #include <map>
26 
27 class TH2;
28 
29 class LauScfMap {
30 
31  public:
33  LauScfMap();
34 
36  virtual ~LauScfMap();
37 
39 
53  void setHistos(const std::vector<const TH2*>& histos);
54 
56 
59  Int_t getNumberOfBins() const { return numberOfBins_; };
60 
62 
66  void listBinCentres( std::vector<Double_t>& xCoords, std::vector<Double_t>& yCoords) const;
67 
69 
74  Int_t binNumber(Double_t xCoord, Double_t yCoord) const;
75 
77 
81  const std::vector<Int_t>* trueBins(Int_t recoBin) const;
82 
84 
89  Double_t prob(Int_t recoBin, Int_t trueBin) const;
90 
92 
96  TH2* trueHist(Int_t trueBin);
97 
98  private:
99  // Making these two methods private and not implementing them prevents objects of this class from being copied
101  LauScfMap( const LauScfMap& rhs );
103  LauScfMap& operator=( const LauScfMap& rhs );
104 
106  std::vector<TH2*> histos_;
107 
109  std::map< Int_t, std::vector<Int_t> > contribs_;
110 
112  Int_t nBinsX_;
114  Int_t nBinsY_;
117 
118  ClassDef(LauScfMap, 0)
119 };
120 
121 #endif
Int_t numberOfBins_
Number of bins in a 2D histogram (nBinsX_*nBinsY_)
Definition: LauScfMap.hh:116
TH2 * trueHist(Int_t trueBin)
Retrieve the migration histogram for trueBin.
Definition: LauScfMap.cc:176
LauScfMap()
Constructor.
Definition: LauScfMap.cc:33
LauScfMap & operator=(const LauScfMap &rhs)
Copy assignment operator (not implemented)
void listBinCentres(std::vector< Double_t > &xCoords, std::vector< Double_t > &yCoords) const
Create lists of the co-ordinates of the centres of true bins.
Definition: LauScfMap.cc:114
const std::vector< Int_t > * trueBins(Int_t recoBin) const
Find which true bins contribute to the given reco bin.
Definition: LauScfMap.cc:155
void setHistos(const std::vector< const TH2 * > &histos)
Construct the smearing matrix from the supplied histograms.
Definition: LauScfMap.cc:47
Int_t binNumber(Double_t xCoord, Double_t yCoord) const
Find the global bin number for the given co-ordinates.
Definition: LauScfMap.cc:144
std::vector< TH2 * > histos_
The vector of two-dimensional histograms.
Definition: LauScfMap.hh:106
Int_t nBinsY_
Number of bins in the y-axis.
Definition: LauScfMap.hh:114
Int_t nBinsX_
Number of bins in the x-axis.
Definition: LauScfMap.hh:112
virtual ~LauScfMap()
Destructor.
Definition: LauScfMap.cc:40
Class for representing the 4D smearing matrix for mis-reconstructed signal (self cross feed) ...
Definition: LauScfMap.hh:29
std::map< Int_t, std::vector< Int_t > > contribs_
Map that links each reco global bin number and the vector of true bin indices into LauScfMap::histos_...
Definition: LauScfMap.hh:109
Int_t getNumberOfBins() const
Get the number of bins.
Definition: LauScfMap.hh:59
Double_t prob(Int_t recoBin, Int_t trueBin) const
Probability of a true event in the given true bin migrating to the reco bin.
Definition: LauScfMap.cc:165