Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 
0002 #ifndef Alignment_CommonAlignmentAlgorithm_AlignmentTwoBodyDecayTrackSelector_h
0003 #define Alignment_CommonAlignmentAlgorithm_AlignmentTwoBodyDecayTrackSelector_h
0004 
0005 //Framework
0006 #include "FWCore/Framework/interface/ConsumesCollector.h"
0007 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0008 #include "FWCore/Utilities/interface/EDGetToken.h"
0009 //STL
0010 #include <vector>
0011 // forward declaration:
0012 #include <DataFormats/TrackReco/interface/TrackFwd.h>
0013 #include <DataFormats/METReco/interface/CaloMETFwd.h>
0014 
0015 namespace edm {
0016   class Event;
0017   class EventSetup;
0018 }  // namespace edm
0019 
0020 class AlignmentTwoBodyDecayTrackSelector {
0021 public:
0022   typedef std::vector<const reco::Track*> Tracks;
0023 
0024   /// constructor
0025   AlignmentTwoBodyDecayTrackSelector(const edm::ParameterSet& cfg, edm::ConsumesCollector& iC);
0026 
0027   /// destructor
0028   ~AlignmentTwoBodyDecayTrackSelector();
0029 
0030   /// select tracks
0031   Tracks select(const Tracks& tracks, const edm::Event& iEvent, const edm::EventSetup& iSetup);
0032 
0033   bool useThisFilter();
0034 
0035 private:
0036   ///checks if the mass of the mother is in the mass region
0037   Tracks checkMass(const Tracks& cands) const;
0038   ///checks if the mass of the mother is in the mass region adding missing E_T
0039   Tracks checkMETMass(const Tracks& cands, const edm::Event& iEvent) const;
0040   ///checks if the mother has charge = [theCharge]
0041   bool checkCharge(const reco::Track* trk1, const reco::Track* trk2 = nullptr) const;
0042   ///checks if the [cands] are acoplanar (returns empty set if not)
0043   bool checkAcoplanarity(const reco::Track* trk1, const reco::Track* trk2) const;
0044   ///checks if [cands] contains a acoplanar track w.r.t missing ET (returns empty set if not)
0045   bool checkMETAcoplanarity(const reco::Track* trk, const reco::CaloMET* met) const;
0046 
0047   /// private data members
0048 
0049   //settings from conigfile
0050   bool theMassrangeSwitch;
0051   bool theChargeSwitch;
0052   bool theMissingETSwitch;
0053   bool theAcoplanarityFilterSwitch;
0054   //inv mass Cut
0055   double theMinMass;
0056   double theMaxMass;
0057   double theDaughterMass;
0058   unsigned int theCandNumber;
0059   bool secThrBool;
0060   double thesecThr;
0061   //charge filter
0062   int theCharge;
0063   bool theUnsignedSwitch;
0064   //missing ET Filter
0065   edm::EDGetTokenT<reco::CaloMETCollection> theMissingETToken;
0066   //acoplanarity Filter
0067   double theAcoplanarDistance;
0068   //helpers
0069   ///print Information on Track-Collection
0070   void printTracks(const Tracks& col) const;
0071 };
0072 
0073 #endif