Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-05-02 05:10:03

0001 /** \class CaloCleaner
0002  *
0003  * Clean collections of calorimeter recHits
0004  * (detectors supported: EB/EE, HB/HE and HO)
0005  *
0006  * \author Tomasz Maciej Frueboes;
0007  *         Christian Veelken, LLR
0008  *  Clean Up from STefan Wayand, KIT
0009  *  Clean Up from Christian Winter & Sebastian Brommer, KIT
0010  */
0011 #ifndef TauAnalysis_MCEmbeddingTools_CaloCleaner_H
0012 #define TauAnalysis_MCEmbeddingTools_CaloCleaner_H
0013 
0014 #include "DataFormats/Common/interface/Handle.h"
0015 #include "DataFormats/MuonReco/interface/MuonEnergy.h"
0016 #include "DataFormats/PatCandidates/interface/Muon.h"
0017 #include "FWCore/Framework/interface/Event.h"
0018 #include "FWCore/Framework/interface/MakerMacros.h"
0019 #include "FWCore/Framework/interface/stream/EDProducer.h"
0020 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0021 
0022 #include "TrackingTools/Records/interface/TrackingComponentsRecord.h"
0023 #include "TrackingTools/TrackAssociator/interface/TrackAssociatorParameters.h"
0024 #include "TrackingTools/TrackAssociator/interface/TrackDetectorAssociator.h"
0025 
0026 #include "DataFormats/Common/interface/SortedCollection.h"
0027 #include "DataFormats/EcalRecHit/interface/EcalRecHit.h"
0028 
0029 #include <iostream>
0030 #include <map>
0031 #include <string>
0032 
0033 template <typename T>
0034 class CaloCleaner : public edm::stream::EDProducer<> {
0035 public:
0036   explicit CaloCleaner(const edm::ParameterSet &);
0037   ~CaloCleaner() override;
0038 
0039 private:
0040   void produce(edm::Event &, const edm::EventSetup &) override;
0041 
0042   typedef edm::SortedCollection<T> RecHitCollection;
0043 
0044   const edm::EDGetTokenT<edm::View<pat::Muon>> mu_input_;
0045 
0046   std::map<std::string, edm::EDGetTokenT<RecHitCollection>> inputs_;
0047   edm::ESGetToken<Propagator, TrackingComponentsRecord> propagatorToken_;
0048 
0049   TrackDetectorAssociator trackAssociator_;
0050   TrackAssociatorParameters parameters_;
0051 
0052   bool is_preshower_;
0053   void fill_correction_map(TrackDetMatchInfo *, std::map<uint32_t, float> *);
0054 };
0055 #endif