Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef L1T_OmtfP1_OMTFinput_H
0002 #define L1T_OmtfP1_OMTFinput_H
0003 
0004 #include "L1Trigger/L1TMuonOverlapPhase1/interface/MuonStubsInput.h"
0005 #include "L1Trigger/L1TMuonOverlapPhase1/interface/MuonStub.h"
0006 
0007 #include <vector>
0008 #include <ostream>
0009 #include <bitset>
0010 
0011 #include "boost/dynamic_bitset.hpp"
0012 
0013 class XMLConfigReader;
0014 class OMTFConfiguration;
0015 
0016 class OMTFinput : public MuonStubsInput {
0017 public:
0018   OMTFinput(const OMTFConfiguration *);
0019 
0020   ~OMTFinput() override {}
0021 
0022   ///Read data from a XML file
0023   void readData(XMLConfigReader *aReader, unsigned int iEvent = 0, unsigned int iProcessor = 0);
0024 
0025   ///Apply shift to all data
0026   void shiftMyPhi(int phiShift);
0027 
0028   ///Merge data of two input objects.
0029   ///Method used in DiMuon studies.
0030   void mergeData(const OMTFinput *aInput);
0031 
0032   //TODOO make it: if the layer is bending layer, the phiB from the iLayer -1 is returned, change in all places it is used
0033   const MuonStubPtr getMuonStub(unsigned int iLayer, unsigned int iInput) const {
0034     return muonStubsInLayers.at(iLayer).at(iInput);
0035   }
0036 
0037   //if the layer is bending layer, the phiB from the iLayer -1 is returned
0038   int getPhiHw(unsigned int iLayer, unsigned int iInput) const override;
0039 
0040   //if the layer is bending layer, the eta from the iLayer -1 is returned
0041   const int getHitEta(unsigned int iLayer, unsigned int iInput) const;
0042 
0043   //if the layer is bending layer, the eta from the iLayer -1 is returned
0044   const int getHitQual(unsigned int iLayer, unsigned int iInput) const;
0045 
0046   boost::dynamic_bitset<> getRefHits(unsigned int iProcessor) const;
0047 
0048   friend std::ostream &operator<<(std::ostream &out, const OMTFinput &aInput);
0049 
0050 private:
0051   const OMTFConfiguration *myOmtfConfig = nullptr;
0052 };
0053 
0054 #endif