Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 10:38:58

0001 #ifndef Alignment_CommonAlignmentAlgorithm_AlignmentMuonSelector_h
0002 #define Alignment_CommonAlignmentAlgorithm_AlignmentMuonSelector_h
0003 
0004 /** \class ALignmentMuonSelector
0005  *
0006  * selects a subset of a muon collection and clones
0007  * Track, TrackExtra parts and RecHits collection
0008  * for SA, GB and Tracker Only options
0009  * 
0010  * \author Javier Fernandez, IFCA
0011  *
0012  * \version $Revision: 1.4 $
0013  *
0014  * $Id: AlignmentMuonSelector.h,v 1.4 2009/03/08 02:12:37 dlange Exp $
0015  *
0016  */
0017 
0018 #include "DataFormats/MuonReco/interface/Muon.h"
0019 #include "CommonTools/RecoAlgos/interface/MuonSelector.h"
0020 #include <vector>
0021 
0022 namespace edm {
0023   class Event;
0024 }
0025 
0026 class AlignmentMuonSelector {
0027 public:
0028   typedef std::vector<const reco::Muon*> Muons;
0029 
0030   /// constructor
0031   AlignmentMuonSelector(const edm::ParameterSet& cfg);
0032 
0033   /// destructor
0034   ~AlignmentMuonSelector();
0035 
0036   /// select muons
0037   Muons select(const Muons& muons, const edm::Event& evt) const;
0038 
0039 private:
0040   /// apply basic cuts on pt,eta,phi,nhit
0041   Muons basicCuts(const Muons& muons) const;
0042 
0043   /// filter the n highest pt muons
0044   Muons theNHighestPtMuons(const Muons& muons) const;
0045 
0046   /// filter only those muons giving best mass pair combination
0047   Muons theBestMassPairCombinationMuons(const Muons& muons) const;
0048 
0049   /// compare two muons in pt (used by theNHighestPtMuons)
0050   struct ComparePt {
0051     bool operator()(const reco::Muon* t1, const reco::Muon* t2) const { return t1->pt() > t2->pt(); }
0052   };
0053   ComparePt ptComparator;
0054 
0055   /// private data members
0056   bool applyBasicCuts, applyNHighestPt, applyMultiplicityFilter, applyMassPairFilter;
0057   int nHighestPt, minMultiplicity;
0058   double pMin, pMax, ptMin, ptMax, etaMin, etaMax, phiMin, phiMax;
0059   double nHitMinSA, nHitMaxSA, chi2nMaxSA;
0060   double nHitMinGB, nHitMaxGB, chi2nMaxGB;
0061   double nHitMinTO, nHitMaxTO, chi2nMaxTO;
0062   double minMassPair, maxMassPair;
0063 };
0064 
0065 #endif