Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-06-21 23:58:59

0001 #ifndef L1Trigger_DTTriggerPhase2_CandidateGroup_h
0002 #define L1Trigger_DTTriggerPhase2_CandidateGroup_h
0003 
0004 #include <tuple>
0005 #include <vector>
0006 #include <bitset>
0007 #include <iostream>
0008 #include <complex>
0009 
0010 #include "L1Trigger/DTTriggerPhase2/interface/DTprimitive.h"
0011 #include "L1Trigger/DTTriggerPhase2/interface/DTPattern.h"
0012 
0013 namespace dtbayesam {
0014 
0015   typedef std::bitset<8> qualitybits;
0016 
0017   typedef std::shared_ptr<DTPattern> DTPatternPtr;
0018   typedef std::vector<DTPatternPtr> DTPatternPtrs;
0019 
0020   class CandidateGroup {
0021   public:
0022     //Constructors and destructors
0023     CandidateGroup();
0024     CandidateGroup(DTPatternPtr p);
0025     ~CandidateGroup();
0026 
0027     //Hit operation procedures
0028     void addHit(DTPrimitive dthit, int lay, bool isGood);
0029     void removeHit(DTPrimitive dthit);
0030 
0031     //Get Methods
0032     int candId() const { return candId_; };
0033     int nhits() const { return nhits_; };
0034     int nisGood() const { return nisGood_; };
0035     int nLayerhits() const { return nLayerhits_; };
0036     int nLayerUp() const { return nLayerUp_; };
0037     int nLayerDown() const { return nLayerDown_; };
0038     DTPrimitivePtrs candHits() const { return candHits_; };
0039     qualitybits quality() const { return quality_; };
0040     const DTPatternPtr pattern() const { return pattern_; };
0041 
0042     //Set Methods
0043     void setCandId(int cId) { candId_ = cId; };
0044 
0045     //Pattern rankers
0046     bool operator>(const CandidateGroup& cOther) const;
0047     bool operator==(const CandidateGroup& cOther) const;
0048 
0049   private:
0050     DTPrimitivePtrs candHits_;
0051     qualitybits quality_;
0052     int nhits_;
0053     int nLayerhits_;
0054     int nLayerUp_;
0055     int nLayerDown_;
0056     int nisGood_;
0057     DTPatternPtr pattern_;
0058     int candId_;
0059   };
0060 
0061   typedef std::shared_ptr<CandidateGroup> CandidateGroupPtr;
0062   typedef std::vector<CandidateGroupPtr> CandidateGroupPtrs;
0063 };  // namespace dtbayesam
0064 
0065 #endif