1 |
grimes |
1.1 |
#ifndef trkupgradeanalysis_IsolationStudyPlotSet_h
|
2 |
|
|
#define trkupgradeanalysis_IsolationStudyPlotSet_h
|
3 |
|
|
|
4 |
|
|
#include <vector>
|
5 |
|
|
#include <utility> // for std::pair
|
6 |
|
|
|
7 |
|
|
// Can't forward declare this because I need VHbbEvent::MuonInfo
|
8 |
|
|
#include "VHbbAnalysis/VHbbDataFormats/interface/VHbbEvent.h"
|
9 |
|
|
|
10 |
|
|
#include "TrkUpgradeAnalysis/VHbb/interface/MuonInfoCollectionPlotSet.h"
|
11 |
|
|
#include "TrkUpgradeAnalysis/VHbb/interface/MuonInfoPlotSet.h"
|
12 |
|
|
|
13 |
|
|
// Forward declarations
|
14 |
|
|
class TH1F;
|
15 |
|
|
class TDirectory;
|
16 |
|
|
class VHbbEventAuxInfo;
|
17 |
|
|
|
18 |
|
|
namespace trkupgradeanalysis
|
19 |
|
|
{
|
20 |
|
|
/** @brief A class to take care of booking and filling histograms that study lepton isolation.
|
21 |
|
|
*
|
22 |
|
|
* @author Mark Grimes (mark.grimes@bristol.ac.uk)
|
23 |
|
|
* @date 11/Apr/2012
|
24 |
|
|
*/
|
25 |
|
|
class IsolationStudyPlotSet
|
26 |
|
|
{
|
27 |
|
|
public:
|
28 |
|
|
IsolationStudyPlotSet();
|
29 |
|
|
void book( TDirectory* pDirectory );
|
30 |
|
|
void fill( const VHbbEvent& event, const VHbbEventAuxInfo* pAuxInfo );
|
31 |
|
|
private:
|
32 |
|
|
bool histogramHaveBeenBooked_;
|
33 |
|
|
|
34 |
|
|
/** @brief Applies the same cleaning as VHbb package, apart from isolation.
|
35 |
|
|
*
|
36 |
|
|
* Code copied almost verbatim from HbbCandidateFinderAlgo::findMuons(...) in
|
37 |
|
|
* VHbbAnalysis/VHbbDataFormats/src/HbbCandidateFinderAlgo.cc, but with the line about isolation
|
38 |
|
|
* dropped. Copied from the VHbb package as it was on 12/Mar/2012.
|
39 |
|
|
*/
|
40 |
|
|
std::vector<VHbbEvent::MuonInfo> cleanMuons( const std::vector<VHbbEvent::MuonInfo>& muons );
|
41 |
|
|
|
42 |
|
|
/** @brief Returns the first muon in the collection and the next one with an opposite charge.
|
43 |
|
|
*
|
44 |
|
|
* The intention is that the collection should be sorted high to low by pT, so that this method
|
45 |
|
|
* gives the highest pT muon and the next highest with opposite charge.
|
46 |
|
|
*
|
47 |
|
|
* @throw std::runtime_error If there are fewer than two entries in the input collection, or if
|
48 |
|
|
* no oppositely charged pairs can be found.
|
49 |
|
|
*/
|
50 |
|
|
std::pair<VHbbEvent::MuonInfo,VHbbEvent::MuonInfo> findOppositelyChargedPair( const std::vector<VHbbEvent::MuonInfo>& muons );
|
51 |
|
|
|
52 |
|
|
/** @brief Returns true if the first muon in the pair is more isolated than the second.
|
53 |
|
|
*
|
54 |
|
|
* Uses normal relative isolation, i.e. the sum of the charged, photonic and neutral energy around
|
55 |
|
|
* the particle divided by the pT. The cone size where the energy is summed will have been set earlier
|
56 |
|
|
* in the configuration sequence.
|
57 |
|
|
*/
|
58 |
|
|
bool firstMuonIsMoreIsolated( std::pair<VHbbEvent::MuonInfo,VHbbEvent::MuonInfo> diMuons );
|
59 |
|
|
|
60 |
|
|
/** @brief Returns true if the first muon in the pair is more isolated than the second.
|
61 |
|
|
*
|
62 |
|
|
* Uses combined relative isolation with the delta beta correction, i.e. the sum of the charged, photonic
|
63 |
|
|
* and corrected neutral energy around the particle divided by the pT. The corrected neutral energy is
|
64 |
|
|
* the neutral energy minus half the charged pile up energy (since apparently the neutral pile up energy
|
65 |
|
|
* is approximately half the charged). If the corrected neutral energy is less than zero, the uncorrected
|
66 |
|
|
* is used (i.e. reverts to normal combined relative isolation). The cone size where the energy is summed
|
67 |
|
|
* will have been set earlier in the configuration sequence.
|
68 |
|
|
*/
|
69 |
|
|
bool firstMuonIsMoreDeltaBetaCorrectedIsolated( std::pair<VHbbEvent::MuonInfo,VHbbEvent::MuonInfo> diMuons );
|
70 |
|
|
|
71 |
|
|
// TTree* pLeastIsolatedDiMuonTree_;
|
72 |
|
|
// int numberOfPrimaryVertices_branch_; // All these are variables to hold the branch data
|
73 |
|
|
// float chargedIsolation_branch_;
|
74 |
|
|
// float photonIsolation_branch_;
|
75 |
|
|
// float neutralIsolation_branch_;
|
76 |
|
|
// float pileupIsolation_branch_;
|
77 |
|
|
// float pT_branch_;
|
78 |
|
|
trkupgradeanalysis::MuonInfoCollectionPlotSet cleanedMuons_; ///< Plots for the muons that have had cleaning applied (except isolation)
|
79 |
|
|
trkupgradeanalysis::MuonInfoPlotSet highestPtDiMuon_; ///< Plots for the muon in the pair with the highest pT
|
80 |
|
|
trkupgradeanalysis::MuonInfoPlotSet lowestPtDiMuon_;
|
81 |
|
|
trkupgradeanalysis::MuonInfoPlotSet mostIsolatedDiMuon_; ///< Plots for the muon in the pair that is most isolated
|
82 |
|
|
trkupgradeanalysis::MuonInfoPlotSet leastIsolatedDiMuon_;
|
83 |
|
|
trkupgradeanalysis::MuonInfoPlotSet leastDeltaBetaCorrectedIsolatedDiMuon_;
|
84 |
|
|
};
|
85 |
|
|
|
86 |
|
|
} // end of namespace trkupgradeanalysis
|
87 |
|
|
|
88 |
|
|
|
89 |
|
|
#endif // end of "#ifndef trkupgradeanalysis_IsolationStudyPlotSet_h"
|