Revision: | 1.1 |
Committed: | Tue Jun 8 20:17:28 2010 UTC (14 years, 10 months ago) by bendavid |
Content type: | text/plain |
Branch: | MAIN |
CVS Tags: | Mit_032, Mit_031, Mit_025c_branch2, Mit_025c_branch1, Mit_030, Mit_029c, Mit_029b, Mit_030_pre1, Mit_029a, Mit_029, Mit_029_pre1, Mit_028a, Mit_025c_branch0, Mit_028, Mit_027a, Mit_027, Mit_026, Mit_025e, Mit_025d, Mit_025c, Mit_025b, Mit_025a, Mit_025, Mit_025pre2, Mit_024b, Mit_025pre1, Mit_024a, Mit_024, Mit_023, Mit_022a, Mit_022, Mit_020d, TMit_020d, Mit_020c, Mit_021, Mit_021pre2, Mit_021pre1, Mit_020b, Mit_020a, Mit_020, Mit_020pre1, Mit_018, Mit_017, Mit_017pre3, Mit_017pre2, Mit_017pre1, V07-05-00, Mit_016, Mit_015b, Mit_015a, Mit_015, Mit_014e, Mit_014d, Mit_014c, Mit_014b, ConvRejection-10-06-09, HEAD |
Branch point for: | Mit_025c_branch |
Log Message: | Add simple tool to do conversion selection and matching |
# | Content |
---|---|
1 | //-------------------------------------------------------------------------------------------------- |
2 | // $Id: HitDropper.h,v 1.9 2009/12/15 23:27:34 bendavid Exp $ |
3 | // |
4 | // ConversionMatcher |
5 | // |
6 | // Utility to match electrons to conversions and perform the final conversion selection for |
7 | // electron rejection. |
8 | // |
9 | // Authors: J.Bendavid |
10 | //-------------------------------------------------------------------------------------------------- |
11 | |
12 | #ifndef MITEDM_CONVERSIONREJECTION_CONVERSIONMATCHER_H |
13 | #define MITEDM_CONVERSIONREJECTION_CONVERSIONMATCHER_H |
14 | |
15 | #include "DataFormats/TrackReco/interface/Track.h" |
16 | #include "MitEdm/DataFormats/interface/DecayPart.h" |
17 | #include "MitEdm/DataFormats/interface/StablePart.h" |
18 | #include "DataFormats/EgammaCandidates/interface/GsfElectron.h" |
19 | #include "MitEdm/DataFormats/interface/Types.h" |
20 | |
21 | namespace mitedm |
22 | { |
23 | class ConversionMatcher |
24 | { |
25 | public: |
26 | ConversionMatcher() : |
27 | radiusMin_(2.0), |
28 | lxyMin_(0.0), |
29 | lzMin_(0.0), |
30 | probMin_(1e-6), |
31 | trackProbMin_(1e-6), |
32 | wrongHitsMax_(0) |
33 | {} |
34 | |
35 | ConversionMatcher(double radiusMin, double lxyMin, double lzMin, |
36 | double probMin, double trackProbMin, uint wrongHitsMax) : |
37 | radiusMin_(radiusMin), |
38 | lxyMin_(lxyMin), |
39 | lzMin_(lzMin), |
40 | probMin_(probMin), |
41 | trackProbMin_(trackProbMin), |
42 | wrongHitsMax_(wrongHitsMax) |
43 | {} |
44 | |
45 | |
46 | std::vector<edm::Ptr<DecayPart> > allMatchedConversions(const reco::GsfElectron &ele, |
47 | const edm::Handle<std::vector<DecayPart> > &convCol) const; |
48 | |
49 | std::vector<edm::Ptr<DecayPart> > goodMatchedConversions(const reco::GsfElectron &ele, |
50 | const edm::Handle<std::vector<DecayPart> > &convCol) const; |
51 | |
52 | bool matchesAnyConversion(const reco::GsfElectron &ele, |
53 | const edm::Handle<std::vector<DecayPart> > &convCol) const; |
54 | |
55 | bool matchesGoodConversion(const reco::GsfElectron &ele, |
56 | const edm::Handle<std::vector<DecayPart> > &convCol) const; |
57 | |
58 | bool isGoodConversion(const DecayPart &conv) const; |
59 | |
60 | bool matchesConversion(const reco::GsfElectron &ele, |
61 | const DecayPart &conv) const; |
62 | |
63 | private: |
64 | double radiusMin_; //minimum conversion radius |
65 | double lxyMin_; //minimum transverse decay length (wrt PV) |
66 | double lzMin_; //minimum z decay length (wrt PV) |
67 | double probMin_; //minimum conversion fit probability |
68 | double trackProbMin_; //minimum track fit probability |
69 | uint wrongHitsMax_; //maximum number of hits before the vertex for each track |
70 | |
71 | |
72 | }; |
73 | } |
74 | #endif |