laura is hosted by Hepforge, IPPP Durham
Laura++  v3r5
A maximum likelihood fitting package for performing Dalitz-plot analysis.
LauScfMap.hh
Go to the documentation of this file.
1 
2 /*
3 Copyright 2006 University of Warwick
4 
5 Licensed under the Apache License, Version 2.0 (the "License");
6 you may not use this file except in compliance with the License.
7 You may obtain a copy of the License at
8 
9  http://www.apache.org/licenses/LICENSE-2.0
10 
11 Unless required by applicable law or agreed to in writing, software
12 distributed under the License is distributed on an "AS IS" BASIS,
13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 See the License for the specific language governing permissions and
15 limitations under the License.
16 */
17 
18 /*
19 Laura++ package authors:
20 John Back
21 Paul Harrison
22 Thomas Latham
23 */
24 
35 #ifndef LAU_SCF_MAP
36 #define LAU_SCF_MAP
37 
38 #include <vector>
39 #include <map>
40 
41 class TH2;
42 
43 class LauScfMap {
44 
45  public:
47  LauScfMap();
48 
50  virtual ~LauScfMap();
51 
53 
67  void setHistos(const std::vector<const TH2*>& histos);
68 
70 
73  Int_t getNumberOfBins() const { return numberOfBins_; };
74 
76 
80  void listBinCentres( std::vector<Double_t>& xCoords, std::vector<Double_t>& yCoords) const;
81 
83 
88  Int_t binNumber(Double_t xCoord, Double_t yCoord) const;
89 
91 
95  const std::vector<Int_t>* trueBins(Int_t recoBin) const;
96 
98 
103  Double_t prob(Int_t recoBin, Int_t trueBin) const;
104 
106 
110  TH2* trueHist(Int_t trueBin);
111 
112  private:
114  LauScfMap( const LauScfMap& rhs );
115 
117  LauScfMap& operator=( const LauScfMap& rhs );
118 
120  std::vector<TH2*> histos_;
121 
123  std::map< Int_t, std::vector<Int_t> > contribs_;
124 
126  Int_t nBinsX_;
128  Int_t nBinsY_;
131 
132  ClassDef(LauScfMap, 0)
133 };
134 
135 #endif
Int_t numberOfBins_
Number of bins in a 2D histogram (nBinsX_*nBinsY_)
Definition: LauScfMap.hh:130
TH2 * trueHist(Int_t trueBin)
Retrieve the migration histogram for trueBin.
Definition: LauScfMap.cc:190
LauScfMap()
Constructor.
Definition: LauScfMap.cc:47
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:128
const std::vector< Int_t > * trueBins(Int_t recoBin) const
Find which true bins contribute to the given reco bin.
Definition: LauScfMap.cc:169
void setHistos(const std::vector< const TH2 * > &histos)
Construct the smearing matrix from the supplied histograms.
Definition: LauScfMap.cc:61
Int_t binNumber(Double_t xCoord, Double_t yCoord) const
Find the global bin number for the given co-ordinates.
Definition: LauScfMap.cc:158
std::vector< TH2 * > histos_
The vector of two-dimensional histograms.
Definition: LauScfMap.hh:120
Int_t nBinsY_
Number of bins in the y-axis.
Definition: LauScfMap.hh:128
Int_t nBinsX_
Number of bins in the x-axis.
Definition: LauScfMap.hh:126
virtual ~LauScfMap()
Destructor.
Definition: LauScfMap.cc:54
Class for representing the 4D smearing matrix for mis-reconstructed signal (self cross feed) ...
Definition: LauScfMap.hh:43
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:123
Int_t getNumberOfBins() const
Get the number of bins.
Definition: LauScfMap.hh:73
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:179