Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:25:13

0001 // Author: Felice Pantaleo,Marco Rovere - felice.pantaleo@cern.ch, marco.rovere@cern.ch
0002 // Date: 09/2018
0003 
0004 #ifndef RecoHGCal_TICL_SeedingRegionByTracks_h
0005 #define RecoHGCal_TICL_SeedingRegionByTracks_h
0006 #include <memory>  // unique_ptr
0007 #include <string>
0008 #include "RecoHGCal/TICL/plugins/SeedingRegionAlgoBase.h"
0009 
0010 #include "FWCore/Framework/interface/ESHandle.h"
0011 #include "FWCore/Framework/interface/Event.h"
0012 #include "FWCore/Framework/interface/Frameworkfwd.h"
0013 #include "FWCore/Framework/interface/MakerMacros.h"
0014 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0015 #include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h"
0016 #include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
0017 #include "DataFormats/TrackReco/interface/TrackFwd.h"
0018 #include "FWCore/Framework/interface/ConsumesCollector.h"
0019 #include "TrackingTools/GeomPropagators/interface/Propagator.h"
0020 #include "MagneticField/Engine/interface/MagneticField.h"
0021 #include "Geometry/HGCalCommonData/interface/HGCalDDDConstants.h"
0022 #include "TrackingTools/Records/interface/TrackingComponentsRecord.h"
0023 #include "Geometry/CommonDetUnit/interface/GeomDet.h"
0024 #include "CommonTools/Utils/interface/StringCutObjectSelector.h"
0025 #include "FWCore/Utilities/interface/ESGetToken.h"
0026 #include "Geometry/Records/interface/IdealGeometryRecord.h"
0027 #include "MagneticField/Records/interface/IdealMagneticFieldRecord.h"
0028 #include "TrackingTools/Records/interface/TrackingComponentsRecord.h"
0029 
0030 namespace ticl {
0031   class SeedingRegionByTracks final : public SeedingRegionAlgoBase {
0032   public:
0033     SeedingRegionByTracks(const edm::ParameterSet& conf, edm::ConsumesCollector& sumes);
0034     ~SeedingRegionByTracks() override;
0035 
0036     void initialize(const edm::EventSetup& es) override;
0037 
0038     void makeRegions(const edm::Event& ev, const edm::EventSetup& es, std::vector<TICLSeedingRegion>& result) override;
0039 
0040     static void fillPSetDescription(edm::ParameterSetDescription& desc);
0041 
0042   private:
0043     void buildFirstLayers();
0044 
0045     edm::EDGetTokenT<reco::TrackCollection> tracks_token_;
0046     std::once_flag initializeGeometry_;
0047     const HGCalDDDConstants* hgcons_;
0048     const StringCutObjectSelector<reco::Track> cutTk_;
0049     const std::string detector_;
0050     edm::ESHandle<Propagator> propagator_;
0051     const std::string propName_;
0052     edm::ESHandle<MagneticField> bfield_;
0053     std::unique_ptr<GeomDet> firstDisk_[2];
0054     edm::ESGetToken<HGCalDDDConstants, IdealGeometryRecord> hdc_token_;
0055     edm::ESGetToken<MagneticField, IdealMagneticFieldRecord> bfield_token_;
0056     edm::ESGetToken<Propagator, TrackingComponentsRecord> propagator_token_;
0057   };
0058 }  // namespace ticl
0059 #endif