Back to home page

Project CMSSW displayed by LXR

 
 

    


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

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