Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:27:39

0001 /**********************************************************************
0002  *
0003  * Author: F.Ferro fabrizio.ferro@ge.infn.it - INFN Genova - 2017
0004  *
0005  **********************************************************************/
0006 #ifndef RecoPPS_Local_CTPPSPixelClusterProducer
0007 #define RecoPPS_Local_CTPPSPixelClusterProducer
0008 
0009 #include "FWCore/Framework/interface/MakerMacros.h"
0010 #include "DataFormats/Common/interface/DetSetVector.h"
0011 #include "DataFormats/Common/interface/DetSet.h"
0012 #include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
0013 #include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h"
0014 #include "FWCore/Framework/interface/stream/EDProducer.h"
0015 #include "FWCore/Framework/interface/Event.h"
0016 #include "FWCore/Framework/interface/EventSetup.h"
0017 #include "DataFormats/Common/interface/Handle.h"
0018 #include "FWCore/Framework/interface/ESHandle.h"
0019 
0020 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0021 #include "FWCore/Utilities/interface/InputTag.h"
0022 #include "FWCore/Utilities/interface/ESGetToken.h"
0023 
0024 #include "DataFormats/CTPPSDigi/interface/CTPPSPixelDigi.h"
0025 #include "DataFormats/CTPPSReco/interface/CTPPSPixelCluster.h"
0026 #include "DataFormats/DetId/interface/DetId.h"
0027 
0028 #include "DataFormats/CTPPSDetId/interface/CTPPSPixelDetId.h"
0029 
0030 #include "CondFormats/PPSObjects/interface/CTPPSPixelDAQMapping.h"
0031 #include "CondFormats/DataRecord/interface/CTPPSPixelDAQMappingRcd.h"
0032 #include "CondFormats/PPSObjects/interface/CTPPSPixelAnalysisMask.h"
0033 #include "CondFormats/DataRecord/interface/CTPPSPixelAnalysisMaskRcd.h"
0034 #include "CondFormats/PPSObjects/interface/CTPPSPixelGainCalibrations.h"
0035 #include "CondFormats/DataRecord/interface/CTPPSPixelGainCalibrationsRcd.h"
0036 #include "RecoPPS/Local/interface/RPixDetClusterizer.h"
0037 
0038 #include <vector>
0039 #include <set>
0040 
0041 class CTPPSPixelClusterProducer : public edm::stream::EDProducer<> {
0042 public:
0043   explicit CTPPSPixelClusterProducer(const edm::ParameterSet &param);
0044 
0045   ~CTPPSPixelClusterProducer() override;
0046 
0047   void produce(edm::Event &, const edm::EventSetup &) override;
0048   static void fillDescriptions(edm::ConfigurationDescriptions &descriptions);
0049 
0050 private:
0051   edm::EDGetTokenT<edm::DetSetVector<CTPPSPixelDigi>> tokenCTPPSPixelDigi_;
0052   edm::ESGetToken<CTPPSPixelAnalysisMask, CTPPSPixelAnalysisMaskRcd> tokenCTPPSPixelAnalysisMask_;
0053   edm::ESGetToken<CTPPSPixelGainCalibrations, CTPPSPixelGainCalibrationsRcd> tokenGainCalib_;
0054   int verbosity_;
0055 
0056   RPixDetClusterizer clusterizer_;
0057 
0058   void run(const edm::DetSetVector<CTPPSPixelDigi> &input,
0059            edm::DetSetVector<CTPPSPixelCluster> &output,
0060            const CTPPSPixelAnalysisMask &mask,
0061            const CTPPSPixelGainCalibrations &gainCalibration);
0062 };
0063 
0064 #endif