Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2025-02-05 23:50:57

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 "FWCore/ParameterSet/interface/ParameterSetDescription.h"
0021 #include <vector>
0022 
0023 namespace edm {
0024   class Event;
0025 }
0026 
0027 class AlignmentMuonSelector {
0028 public:
0029   typedef std::vector<const reco::Muon*> Muons;
0030 
0031   /// constructor
0032   AlignmentMuonSelector(const edm::ParameterSet& cfg);
0033 
0034   /// destructor
0035   ~AlignmentMuonSelector();
0036 
0037   /// select muons
0038   Muons select(const Muons& muons, const edm::Event& evt) const;
0039 
0040   static void fillPSetDescription(edm::ParameterSetDescription& desc);
0041 
0042 private:
0043   /// apply basic cuts on pt,eta,phi,nhit
0044   Muons basicCuts(const Muons& muons) const;
0045 
0046   /// filter the n highest pt muons
0047   Muons theNHighestPtMuons(const Muons& muons) const;
0048 
0049   /// filter only those muons giving best mass pair combination
0050   Muons theBestMassPairCombinationMuons(const Muons& muons) const;
0051 
0052   /// compare two muons in pt (used by theNHighestPtMuons)
0053   struct ComparePt {
0054     bool operator()(const reco::Muon* t1, const reco::Muon* t2) const { return t1->pt() > t2->pt(); }
0055   };
0056   ComparePt ptComparator;
0057 
0058   /// private data members
0059   bool applyBasicCuts, applyNHighestPt, applyMultiplicityFilter, applyMassPairFilter;
0060   int nHighestPt, minMultiplicity;
0061   double pMin, pMax, ptMin, ptMax, etaMin, etaMax, phiMin, phiMax;
0062   double nHitMinSA, nHitMaxSA, chi2nMaxSA;
0063   double nHitMinGB, nHitMaxGB, chi2nMaxGB;
0064   double nHitMinTO, nHitMaxTO, chi2nMaxTO;
0065   double minMassPair, maxMassPair;
0066 };
0067 
0068 #endif