AlignmentTwoBodyDecayTrackSelector

Macros

Line Code
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 69 70 71 72 73 74 75 76

#ifndef Alignment_CommonAlignmentAlgorithm_AlignmentTwoBodyDecayTrackSelector_h
#define Alignment_CommonAlignmentAlgorithm_AlignmentTwoBodyDecayTrackSelector_h

//Framework
#include "FWCore/Framework/interface/ConsumesCollector.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
#include "FWCore/Utilities/interface/EDGetToken.h"
//STL
#include <vector>
// forward declaration:
#include <DataFormats/TrackReco/interface/TrackFwd.h>
#include <DataFormats/METReco/interface/CaloMETFwd.h>

namespace edm {
  class Event;
  class EventSetup;
}  // namespace edm

class AlignmentTwoBodyDecayTrackSelector {
public:
  typedef std::vector<const reco::Track*> Tracks;

  /// constructor
  AlignmentTwoBodyDecayTrackSelector(const edm::ParameterSet& cfg, edm::ConsumesCollector& iC);

  /// destructor
  ~AlignmentTwoBodyDecayTrackSelector();

  /// select tracks
  Tracks select(const Tracks& tracks, const edm::Event& iEvent, const edm::EventSetup& iSetup);

  bool useThisFilter();

  static void fillPSetDescription(edm::ParameterSetDescription& desc);

private:
  ///checks if the mass of the mother is in the mass region
  Tracks checkMass(const Tracks& cands) const;
  ///checks if the mass of the mother is in the mass region adding missing E_T
  Tracks checkMETMass(const Tracks& cands, const edm::Event& iEvent) const;
  ///checks if the mother has charge = [theCharge]
  bool checkCharge(const reco::Track* trk1, const reco::Track* trk2 = nullptr) const;
  ///checks if the [cands] are acoplanar (returns empty set if not)
  bool checkAcoplanarity(const reco::Track* trk1, const reco::Track* trk2) const;
  ///checks if [cands] contains a acoplanar track w.r.t missing ET (returns empty set if not)
  bool checkMETAcoplanarity(const reco::Track* trk, const reco::CaloMET* met) const;

  /// private data members

  //settings from conigfile
  bool theMassrangeSwitch;
  bool theChargeSwitch;
  bool theMissingETSwitch;
  bool theAcoplanarityFilterSwitch;
  //inv mass Cut
  double theMinMass;
  double theMaxMass;
  double theDaughterMass;
  unsigned int theCandNumber;
  bool secThrBool;
  double thesecThr;
  //charge filter
  int theCharge;
  bool theUnsignedSwitch;
  //missing ET Filter
  edm::EDGetTokenT<reco::CaloMETCollection> theMissingETToken;
  //acoplanarity Filter
  double theAcoplanarDistance;
  //helpers
  ///print Information on Track-Collection
  void printTracks(const Tracks& col) const;
};

#endif