ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/grimes/VHbbAnalysisCode/interface/IsolationStudyPlotSet.h
Revision: 1.2
Committed: Wed Aug 15 22:37:47 2012 UTC (12 years, 8 months ago) by grimes
Content type: text/plain
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +13 -7 lines
Log Message:
Long overdue commit with several new files

File Contents

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