DYTInfo

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
#ifndef MuonReco_DYTInfo_h
#define MuonReco_DYTInfo_h

#include <vector>
#include <map>
#include <iostream>
#include "DataFormats/DetId/interface/DetId.h"

namespace reco {

  class DYTInfo {
  public:
    /// Constructor - Destructor
    DYTInfo();
    ~DYTInfo();

    /// copy from another DYTInfo
    void CopyFrom(const DYTInfo &);

    /// number of stations used by DYT
    const int NStUsed() const { return NStUsed_; };
    void setNStUsed(int NStUsed) { NStUsed_ = NStUsed; };

    /// estimator values for all station
    const std::vector<double> &DYTEstimators() const { return DYTEstimators_; };
    void setDYTEstimators(const std::map<int, double> &dytEstMap) {
      DYTEstimators_.clear();
      for (int st = 1; st <= 4; st++) {
        if (dytEstMap.count(st) > 0)
          DYTEstimators_.push_back(dytEstMap.find(st)->second);
        else
          DYTEstimators_.push_back(-1);
      }
    };
    void setDYTEstimators(const std::vector<double> &EstValues) { DYTEstimators_ = EstValues; }

    /// number of segments tested per muon station
    const std::vector<bool> &UsedStations() const { return UsedStations_; };
    void setUsedStations(const std::map<int, bool> &ustMap) {
      UsedStations_.clear();
      for (int st = 1; st <= 4; st++)
        UsedStations_.push_back(ustMap.find(st)->second);
    };
    void setUsedStations(const std::vector<bool> ustVal) { UsedStations_ = ustVal; };

    /// DetId vector of chamber with valid estimator
    const std::vector<DetId> &IdChambers() const { return IdChambers_; };
    void setIdChambers(const std::map<int, DetId> &IdChambersMap) {
      IdChambers_.clear();
      for (int st = 1; st <= 4; st++)
        IdChambers_.push_back(IdChambersMap.find(st)->second);
    };
    void setIdChambers(const std::vector<DetId> &IdChambersVal) { IdChambers_ = IdChambersVal; };

    /// vector of thresholds
    const std::vector<double> &Thresholds() const { return Thresholds_; };
    void setThresholds(const std::map<int, double> &ThresholdsMap) {
      Thresholds_.clear();
      for (int st = 1; st <= 4; st++)
        Thresholds_.push_back(ThresholdsMap.find(st)->second);
    };
    void setThresholds(const std::vector<double> &ThresholdsVal) { Thresholds_ = ThresholdsVal; };

  private:
    int NStUsed_;
    std::vector<bool> UsedStations_;
    std::vector<double> DYTEstimators_;
    std::vector<DetId> IdChambers_;
    std::vector<double> Thresholds_;
  };
}  // namespace reco
#endif