Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:04:47

0001 #ifndef MuonReco_DYTInfo_h
0002 #define MuonReco_DYTInfo_h
0003 
0004 #include <vector>
0005 #include <map>
0006 #include <iostream>
0007 #include "DataFormats/DetId/interface/DetId.h"
0008 
0009 namespace reco {
0010 
0011   class DYTInfo {
0012   public:
0013     /// Constructor - Destructor
0014     DYTInfo();
0015     ~DYTInfo();
0016 
0017     /// copy from another DYTInfo
0018     void CopyFrom(const DYTInfo &);
0019 
0020     /// number of stations used by DYT
0021     const int NStUsed() const { return NStUsed_; };
0022     void setNStUsed(int NStUsed) { NStUsed_ = NStUsed; };
0023 
0024     /// estimator values for all station
0025     const std::vector<double> &DYTEstimators() const { return DYTEstimators_; };
0026     void setDYTEstimators(const std::map<int, double> &dytEstMap) {
0027       DYTEstimators_.clear();
0028       for (int st = 1; st <= 4; st++) {
0029         if (dytEstMap.count(st) > 0)
0030           DYTEstimators_.push_back(dytEstMap.find(st)->second);
0031         else
0032           DYTEstimators_.push_back(-1);
0033       }
0034     };
0035     void setDYTEstimators(const std::vector<double> &EstValues) { DYTEstimators_ = EstValues; }
0036 
0037     /// number of segments tested per muon station
0038     const std::vector<bool> &UsedStations() const { return UsedStations_; };
0039     void setUsedStations(const std::map<int, bool> &ustMap) {
0040       UsedStations_.clear();
0041       for (int st = 1; st <= 4; st++)
0042         UsedStations_.push_back(ustMap.find(st)->second);
0043     };
0044     void setUsedStations(const std::vector<bool> ustVal) { UsedStations_ = ustVal; };
0045 
0046     /// DetId vector of chamber with valid estimator
0047     const std::vector<DetId> &IdChambers() const { return IdChambers_; };
0048     void setIdChambers(const std::map<int, DetId> &IdChambersMap) {
0049       IdChambers_.clear();
0050       for (int st = 1; st <= 4; st++)
0051         IdChambers_.push_back(IdChambersMap.find(st)->second);
0052     };
0053     void setIdChambers(const std::vector<DetId> &IdChambersVal) { IdChambers_ = IdChambersVal; };
0054 
0055     /// vector of thresholds
0056     const std::vector<double> &Thresholds() const { return Thresholds_; };
0057     void setThresholds(const std::map<int, double> &ThresholdsMap) {
0058       Thresholds_.clear();
0059       for (int st = 1; st <= 4; st++)
0060         Thresholds_.push_back(ThresholdsMap.find(st)->second);
0061     };
0062     void setThresholds(const std::vector<double> &ThresholdsVal) { Thresholds_ = ThresholdsVal; };
0063 
0064   private:
0065     int NStUsed_;
0066     std::vector<bool> UsedStations_;
0067     std::vector<double> DYTEstimators_;
0068     std::vector<DetId> IdChambers_;
0069     std::vector<double> Thresholds_;
0070   };
0071 }  // namespace reco
0072 #endif