1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
#ifndef Alignment_CommonAlignmentAlgorithm_AlignmentMuonSelector_h
#define Alignment_CommonAlignmentAlgorithm_AlignmentMuonSelector_h
/** \class ALignmentMuonSelector
*
* selects a subset of a muon collection and clones
* Track, TrackExtra parts and RecHits collection
* for SA, GB and Tracker Only options
*
* \author Javier Fernandez, IFCA
*
* \version $Revision: 1.4 $
*
* $Id: AlignmentMuonSelector.h,v 1.4 2009/03/08 02:12:37 dlange Exp $
*
*/
#include "DataFormats/MuonReco/interface/Muon.h"
#include "CommonTools/RecoAlgos/interface/MuonSelector.h"
#include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
#include <vector>
namespace edm {
class Event;
}
class AlignmentMuonSelector {
public:
typedef std::vector<const reco::Muon*> Muons;
/// constructor
AlignmentMuonSelector(const edm::ParameterSet& cfg);
/// destructor
~AlignmentMuonSelector();
/// select muons
Muons select(const Muons& muons, const edm::Event& evt) const;
static void fillPSetDescription(edm::ParameterSetDescription& desc);
private:
/// apply basic cuts on pt,eta,phi,nhit
Muons basicCuts(const Muons& muons) const;
/// filter the n highest pt muons
Muons theNHighestPtMuons(const Muons& muons) const;
/// filter only those muons giving best mass pair combination
Muons theBestMassPairCombinationMuons(const Muons& muons) const;
/// compare two muons in pt (used by theNHighestPtMuons)
struct ComparePt {
bool operator()(const reco::Muon* t1, const reco::Muon* t2) const { return t1->pt() > t2->pt(); }
};
ComparePt ptComparator;
/// private data members
bool applyBasicCuts, applyNHighestPt, applyMultiplicityFilter, applyMassPairFilter;
int nHighestPt, minMultiplicity;
double pMin, pMax, ptMin, ptMax, etaMin, etaMax, phiMin, phiMax;
double nHitMinSA, nHitMaxSA, chi2nMaxSA;
double nHitMinGB, nHitMaxGB, chi2nMaxGB;
double nHitMinTO, nHitMaxTO, chi2nMaxTO;
double minMassPair, maxMassPair;
};
#endif
|