Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-07-28 22:45:49

0001 #ifndef L1Trigger_L1TMuonCPPF_RecHitProcessor_h
0002 #define L1Trigger_L1TMuonCPPF_RecHitProcessor_h
0003 
0004 #include "FWCore/Framework/interface/ESHandle.h"
0005 #include "FWCore/Framework/interface/Event.h"
0006 #include "FWCore/Framework/interface/EventSetup.h"
0007 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0008 
0009 #include "Geometry/RPCGeometry/interface/RPCGeometry.h"
0010 #include "Geometry/RPCGeometry/interface/RPCRoll.h"
0011 #include "Geometry/Records/interface/MuonGeometryRecord.h"
0012 
0013 #include "DataFormats/L1TMuon/interface/CPPFDigi.h"
0014 #include "DataFormats/MuonDetId/interface/RPCDetId.h"
0015 #include "DataFormats/RPCRecHit/interface/RPCRecHitCollection.h"
0016 #include "DataFormats/RPCDigi/interface/RPCDigiCollection.h"
0017 #include "SimDataFormats/RPCDigiSimLink/interface/RPCDigiSimLink.h"
0018 
0019 #include "CondFormats/RPCObjects/interface/RPCDeadStrips.h"
0020 #include "CondFormats/RPCObjects/interface/RPCMaskedStrips.h"
0021 
0022 #include "CondFormats/Serialization/interface/Serializable.h"
0023 #include "L1Trigger/L1TMuonEndCap/interface/TrackTools.h"
0024 
0025 #include <boost/cstdint.hpp>
0026 #include <iostream>
0027 #include <memory>
0028 #include <sstream>
0029 #include <string>
0030 #include <vector>
0031 
0032 class RecHitProcessor {
0033 public:
0034   explicit RecHitProcessor();
0035   ~RecHitProcessor();
0036 
0037   struct CppfItem {
0038     int lb;
0039     int rawId;
0040     int strip;
0041     int lbchannel;
0042     int halfchannel;
0043     int int_phi;
0044     int int_theta;
0045     COND_SERIALIZABLE;
0046   };
0047 
0048   std::vector<CppfItem> const &getCppfVec() const { return CppfVec; }
0049   std::vector<CppfItem> CppfVec;
0050 
0051   void processLook(
0052       // Input
0053       const edm::Event &iEvent,
0054       const edm::EventSetup &iSetup,
0055       const edm::EDGetToken &recHitToken,
0056       const edm::EDGetToken &rpcDigiToken,
0057       const edm::EDGetToken &rpcDigiSimLinkToken,
0058       const edm::ESGetToken<RPCGeometry, MuonGeometryRecord> &rpcGeomToken,
0059       std::vector<RecHitProcessor::CppfItem> &CppfVec1,
0060       // Output
0061       l1t::CPPFDigiCollection &cppfDigis,
0062       const int MaxClusterSize) const;
0063 
0064   void process(
0065       // Input
0066       const edm::Event &iEvent,
0067       const edm::EventSetup &iSetup,
0068       const edm::EDGetToken &recHitToken,
0069       const edm::EDGetToken &rpcDigiToken,
0070       const edm::EDGetToken &rpcDigiSimLinkToken,
0071       const edm::ESGetToken<RPCGeometry, MuonGeometryRecord> &rpcGeomToken,
0072       // Output
0073       l1t::CPPFDigiCollection &cppfDigis) const;
0074 
0075   void print(int a, int b, float c, float d) const { std::cout << a << " " << b << " " << c << " " << d << std::endl; };
0076 
0077   COND_SERIALIZABLE;
0078 
0079 private:
0080 };
0081 
0082 #endif /* #define L1Trigger_L1TMuonCPPF_RecHitProcessor_h */