DTChamberEfficiency

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 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104
#ifndef DTCHAMBEREFFICIENCY_H
#define DTCHAMBEREFFICIENCY_H

/** \class DTChamberEfficiency
 *
 * Description:
 *
 * This class provides the histograms for the calculation of the
 * efficiency of muons reconstruction in the DTs. It is applicable
 * both in presence or absence of a magnetic field.
 * Histos are 2D Sector vs Chamber plots for each wheel
 *
 * \author : Mario Pelliccioni - INFN Torino <pellicci@cern.ch>
 * $date   : 05/12/2008 16:51:04 CET $
 *
 * Modification:
 *
 */

#include "DataFormats/TrackReco/interface/TrackFwd.h"
#include "DataFormats/TrackReco/interface/Track.h"

#include "FWCore/Framework/interface/ESHandle.h"
#include "FWCore/Utilities/interface/InputTag.h"

#include "FWCore/Framework/interface/FrameworkfwdMostUsed.h"

#include "DQMServices/Core/interface/DQMStore.h"

#include "DQMServices/Core/interface/DQMEDAnalyzer.h"

#include "RecoMuon/MeasurementDet/interface/MuonDetLayerMeasurements.h"

#include <string>
#include <vector>

namespace reco {
  class TransientTrack;
}

class Chi2MeasurementEstimator;
class MuonServiceProxy;

class FreeTrajectoryState;
class DetLayer;
class DetId;
class NavigationSchool;

class DTChamberEfficiency : public DQMEDAnalyzer {
public:
  //Constructor
  DTChamberEfficiency(const edm::ParameterSet& pset);

  //Destructor
  ~DTChamberEfficiency() override;

  //Operations
  void analyze(const edm::Event& event, const edm::EventSetup& eventSetup) override;
  void dqmBeginRun(const edm::Run&, const edm::EventSetup&) override;

protected:
  // Book the histograms
  void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;

private:
  //functions
  std::vector<const DetLayer*> compatibleLayers(const NavigationSchool& navigationSchool,
                                                const DetLayer* initialLayer,
                                                const FreeTrajectoryState& fts,
                                                PropagationDirection propDir);

  MeasurementContainer segQualityCut(const MeasurementContainer& seg_list) const;
  bool chamberSelection(const DetId& idDetLay, reco::TransientTrack& trans_track) const;
  inline edm::ESHandle<Propagator> propagator() const;

  //data members
  bool debug;

  edm::InputTag theTracksLabel_;
  edm::EDGetTokenT<reco::TrackCollection> theTracksToken_;

  edm::InputTag labelRPCRecHits;
  edm::InputTag thedt4DSegments;
  edm::InputTag thecscSegments;

  double theMaxChi2;
  double theNSigma;
  int theMinNrec;

  std::string theNavigationType;

  MuonServiceProxy* theService;
  MuonDetLayerMeasurements* theMeasurementExtractor;
  Chi2MeasurementEstimator* theEstimator;

  std::vector<std::vector<MonitorElement*> > histosPerW;
};

#endif  // DTANALYZER_H

/* Local Variables: */
/* show-trailing-whitespace: t */
/* truncate-lines: t */
/* End: */