laura is hosted by Hepforge, IPPP Durham
Laura++  3.6.0
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 "Rtypes.h"
39 
40 #include <map>
41 #include <vector>
42 
43 class TH2;
44 
45 class LauScfMap {
46 
47  public:
49  LauScfMap();
50 
52  virtual ~LauScfMap();
53 
55 
69  void setHistos( const std::vector<const TH2*>& histos );
70 
72 
75  Int_t getNumberOfBins() const { return numberOfBins_; };
76 
78 
82  void listBinCentres( std::vector<Double_t>& xCoords, std::vector<Double_t>& yCoords ) const;
83 
85 
90  Int_t binNumber( Double_t xCoord, Double_t yCoord ) const;
91 
93 
97  const std::vector<Int_t>* trueBins( Int_t recoBin ) const;
98 
100 
105  Double_t prob( Int_t recoBin, Int_t trueBin ) const;
106 
108 
112  TH2* trueHist( Int_t trueBin );
113 
114  private:
116  LauScfMap( const LauScfMap& rhs );
117 
119  LauScfMap& operator=( const LauScfMap& rhs );
120 
122  std::vector<TH2*> histos_;
123 
125  std::map<Int_t, std::vector<Int_t>> contribs_;
126 
128  Int_t nBinsX_;
130  Int_t nBinsY_;
133 
134  ClassDef( LauScfMap, 0 )
135 };
136 
137 #endif
Int_t nBinsX_
Number of bins in the x-axis.
Definition: LauScfMap.hh:128
TH2 * trueHist(Int_t trueBin)
Retrieve the migration histogram for trueBin.
Definition: LauScfMap.cc:190
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
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:125
virtual ~LauScfMap()
Destructor.
Definition: LauScfMap.cc:51
Int_t numberOfBins_
Number of bins in a 2D histogram (nBinsX_*nBinsY_)
Definition: LauScfMap.hh:132
std::vector< TH2 * > histos_
The vector of two-dimensional histograms.
Definition: LauScfMap.hh:122
Int_t nBinsY_
Number of bins in the y-axis.
Definition: LauScfMap.hh:130
void setHistos(const std::vector< const TH2 * > &histos)
Construct the smearing matrix from the supplied histograms.
Definition: LauScfMap.cc:58
Int_t binNumber(Double_t xCoord, Double_t yCoord) const
Find the global bin number for the given co-ordinates.
Definition: LauScfMap.cc:158
Class for representing the 4D smearing matrix for mis-reconstructed signal (self cross feed)
Definition: LauScfMap.hh:45
const std::vector< Int_t > * trueBins(Int_t recoBin) const
Find which true bins contribute to the given reco bin.
Definition: LauScfMap.cc:169
LauScfMap()
Constructor.
Definition: LauScfMap.cc:44
LauScfMap & operator=(const LauScfMap &rhs)
Copy assignment operator (not implemented)
LauScfMap(const LauScfMap &rhs)
Copy constructor (not implemented)
Int_t getNumberOfBins() const
Get the number of bins.
Definition: LauScfMap.hh:75
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