From 5a2e1d36d22e3424805fbb5c42d86adece1f78f1 Mon Sep 17 00:00:00 2001 From: Jonas Rembser Date: Wed, 10 Jun 2020 23:50:13 +0200 Subject: [PATCH] some buildfile related fixups --- CondCore/ESSources/bin/BuildFile.xml | 1 - .../CTPPSFastTrackingProducer/BuildFile.xml | 13 -- .../interface/CTPPSFastTrackingProducer.h | 143 ------------------ .../plugins/CTPPSFastTrackingProducer.cc | 116 +++++++++++++- .../L1CaloTriggerProducer/BuildFile.xml | 20 --- Utilities/ReleaseScripts/scripts/git-publish | 2 +- 6 files changed, 112 insertions(+), 183 deletions(-) delete mode 100644 CondCore/ESSources/bin/BuildFile.xml delete mode 100644 FastSimulation/CTPPSFastTrackingProducer/BuildFile.xml delete mode 100644 FastSimulation/CTPPSFastTrackingProducer/interface/CTPPSFastTrackingProducer.h delete mode 100644 FastSimulation/L1CaloTriggerProducer/BuildFile.xml diff --git a/CondCore/ESSources/bin/BuildFile.xml b/CondCore/ESSources/bin/BuildFile.xml deleted file mode 100644 index eb1f2027eea38..0000000000000 --- a/CondCore/ESSources/bin/BuildFile.xml +++ /dev/null @@ -1 +0,0 @@ - diff --git a/FastSimulation/CTPPSFastTrackingProducer/BuildFile.xml b/FastSimulation/CTPPSFastTrackingProducer/BuildFile.xml deleted file mode 100644 index c40f3f3f82514..0000000000000 --- a/FastSimulation/CTPPSFastTrackingProducer/BuildFile.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/FastSimulation/CTPPSFastTrackingProducer/interface/CTPPSFastTrackingProducer.h b/FastSimulation/CTPPSFastTrackingProducer/interface/CTPPSFastTrackingProducer.h deleted file mode 100644 index 2b319ee00ba30..0000000000000 --- a/FastSimulation/CTPPSFastTrackingProducer/interface/CTPPSFastTrackingProducer.h +++ /dev/null @@ -1,143 +0,0 @@ -#ifndef FastSimulation_CTPPSFastTrackingProducer_h -#define FastSimulation_CTPPSFastTrackingProducer_h - -// user include files -#include "FWCore/Framework/interface/Frameworkfwd.h" -#include "FWCore/Framework/interface/stream/EDProducer.h" - -#include "FWCore/Framework/interface/Event.h" -#include "FWCore/Framework/interface/MakerMacros.h" - -#include "FWCore/ParameterSet/interface/ParameterSet.h" -#include "FWCore/Utilities/interface/StreamID.h" - -#include "FWCore/Framework/interface/ConsumesCollector.h" - -#include "FastSimDataFormats/CTPPSFastSim/interface/CTPPSFastRecHit.h" -#include "FastSimDataFormats/CTPPSFastSim/interface/CTPPSFastRecHitContainer.h" -#include "DataFormats/Common/interface/Handle.h" - -#include "FastSimDataFormats/CTPPSFastSim/interface/CTPPSFastTrack.h" -#include "FastSimDataFormats/CTPPSFastSim/interface/CTPPSFastTrackContainer.h" - -#include "FastSimulation/CTPPSFastGeometry/interface/CTPPSTrkDetector.h" -#include "FastSimulation/CTPPSFastGeometry/interface/CTPPSToFDetector.h" - -#include "FWCore/ParameterSet/interface/FileInPath.h" -#include "Utilities/PPS/interface/PPSUnitConversion.h" - -#include "Utilities/PPS/interface/PPSUtilities.h" - -//C++ library -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "DataFormats/Math/interface/Vector.h" -#include "DataFormats/Math/interface/Vector3D.h" -#include "DataFormats/Math/interface/Point3D.h" - -// -// class declaration -// -class H_BeamParticle; -class H_RecRPObject; -class H_BeamLine; - -class CTPPSFastTrackingProducer : public edm::stream::EDProducer<> { -public: - explicit CTPPSFastTrackingProducer(const edm::ParameterSet&); - ~CTPPSFastTrackingProducer() override; - -private: - void beginStream(edm::StreamID) override; - void produce(edm::Event&, const edm::EventSetup&) override; - void endStream() override; - //this function will only be called once per event - virtual void beginEvent(edm::Event& event, const edm::EventSetup& eventSetup); - virtual void endEvent(edm::Event& event, const edm::EventSetup& eventSetup); - - // ----------member data --------------------------- - - typedef std::vector CTPPSFastRecHitContainer; - edm::EDGetTokenT _recHitToken; - void ReadRecHits(edm::Handle&); - void FastReco(int Direction, H_RecRPObject* station); - void Reconstruction(); - void ReconstructArm( - H_RecRPObject* pps_station, double x1, double y1, double x2, double y2, double& tx, double& ty, double& eloss); - void MatchCellId(int cellId, std::vector vrecCellId, std::vector vrecTof, bool& match, double& recTof); - bool SearchTrack(int, - int, - int Direction, - double& xi, - double& t, - double& partP, - double& pt, - double& thx, - double& thy, - double& x0, - double& y0, - double& xt, - double& yt, - double& X1d, - double& Y1d, - double& X2d, - double& Y2d); - void TrackerStationClear(); - void TrackerStationStarting(); - void ProjectToToF(const double x1, const double y1, const double x2, const double y2, double& xt, double& yt) { - xt = ((fz_timing - fz_tracker2) * (x2 - x1) / (fz_tracker2 - fz_tracker1)) + x2; - yt = ((fz_timing - fz_tracker2) * (y2 - y1) / (fz_tracker2 - fz_tracker1)) + y2; - }; - // Hector objects - bool SetBeamLine(); - - std::map m_beamPart; - std::unique_ptr m_beamlineCTPPS1; - std::unique_ptr m_beamlineCTPPS2; - std::unique_ptr pps_stationF; - std::unique_ptr pps_stationB; - - std::string beam1filename; - std::string beam2filename; - - // Defaults - double lengthctpps; - bool m_verbosity; - double fBeamEnergy; - double fBeamMomentum; - bool fCrossAngleCorr; - double fCrossingAngleBeam1; - double fCrossingAngleBeam2; - //////////////////////////////////////////////// - std::unique_ptr TrkStation_F; // auxiliary object with the tracker geometry - std::unique_ptr TrkStation_B; - std::unique_ptr det1F; - std::unique_ptr det1B; - std::unique_ptr det2F; - std::unique_ptr det2B; - std::unique_ptr detToF_F; - std::unique_ptr detToF_B; - - std::vector theCTPPSFastTrack; - - CTPPSFastTrack track; - - std::vector recCellId_F, recCellId_B; - std::vector recTof_F, recTof_B; - - double fz_tracker1, fz_tracker2, fz_timing; - double fTrackerWidth, fTrackerHeight, fTrackerInsertion, fBeamXRMS_Trk1, fBeamXRMS_Trk2, fTrk1XOffset, fTrk2XOffset; - std::vector fToFCellWidth; - double fToFCellHeight, fToFPitchX, fToFPitchY; - int fToFNCellX, fToFNCellY; - double fToFInsertion, fBeamXRMS_ToF, fToFXOffset, fTimeSigma, fImpParcut; -}; -#endif diff --git a/FastSimulation/CTPPSFastTrackingProducer/plugins/CTPPSFastTrackingProducer.cc b/FastSimulation/CTPPSFastTrackingProducer/plugins/CTPPSFastTrackingProducer.cc index c7db749ad318e..9984f2b3f430f 100644 --- a/FastSimulation/CTPPSFastTrackingProducer/plugins/CTPPSFastTrackingProducer.cc +++ b/FastSimulation/CTPPSFastTrackingProducer/plugins/CTPPSFastTrackingProducer.cc @@ -16,18 +16,124 @@ Description: [one line class summary] // // -// system include files -#include - -// user include files -#include "FastSimulation/CTPPSFastTrackingProducer/interface/CTPPSFastTrackingProducer.h" +#include "DataFormats/Common/interface/Handle.h" +#include "DataFormats/Math/interface/Vector.h" +#include "DataFormats/Math/interface/Vector3D.h" +#include "DataFormats/Math/interface/Point3D.h" +#include "FastSimDataFormats/CTPPSFastSim/interface/CTPPSFastRecHit.h" +#include "FastSimDataFormats/CTPPSFastSim/interface/CTPPSFastRecHitContainer.h" +#include "FastSimDataFormats/CTPPSFastSim/interface/CTPPSFastTrack.h" +#include "FastSimDataFormats/CTPPSFastSim/interface/CTPPSFastTrackContainer.h" +#include "FastSimulation/CTPPSFastGeometry/interface/CTPPSToFDetector.h" +#include "FastSimulation/CTPPSFastGeometry/interface/CTPPSTrkDetector.h" +#include "FWCore/Framework/interface/ConsumesCollector.h" +#include "FWCore/Framework/interface/Event.h" +#include "FWCore/Framework/interface/MakerMacros.h" +#include "FWCore/Framework/interface/stream/EDProducer.h" +#include "FWCore/ParameterSet/interface/FileInPath.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/Utilities/interface/StreamID.h" +#include "Utilities/PPS/interface/PPSUnitConversion.h" #include "Utilities/PPS/interface/PPSUtilities.h" + #include "TLorentzVector.h" + // hector includes #include "H_Parameters.h" #include "H_BeamLine.h" #include "H_RecRPObject.h" #include "H_BeamParticle.h" + +class CTPPSFastTrackingProducer : public edm::stream::EDProducer<> { +public: + explicit CTPPSFastTrackingProducer(const edm::ParameterSet&); + ~CTPPSFastTrackingProducer() override; + +private: + void beginStream(edm::StreamID) override; + void produce(edm::Event&, const edm::EventSetup&) override; + void endStream() override; + //this function will only be called once per event + virtual void beginEvent(edm::Event& event, const edm::EventSetup& eventSetup); + virtual void endEvent(edm::Event& event, const edm::EventSetup& eventSetup); + + // ----------member data --------------------------- + + typedef std::vector CTPPSFastRecHitContainer; + edm::EDGetTokenT _recHitToken; + void ReadRecHits(edm::Handle&); + void FastReco(int Direction, H_RecRPObject* station); + void Reconstruction(); + void ReconstructArm( + H_RecRPObject* pps_station, double x1, double y1, double x2, double y2, double& tx, double& ty, double& eloss); + void MatchCellId(int cellId, std::vector vrecCellId, std::vector vrecTof, bool& match, double& recTof); + bool SearchTrack(int, + int, + int Direction, + double& xi, + double& t, + double& partP, + double& pt, + double& thx, + double& thy, + double& x0, + double& y0, + double& xt, + double& yt, + double& X1d, + double& Y1d, + double& X2d, + double& Y2d); + void TrackerStationClear(); + void TrackerStationStarting(); + void ProjectToToF(const double x1, const double y1, const double x2, const double y2, double& xt, double& yt) { + xt = ((fz_timing - fz_tracker2) * (x2 - x1) / (fz_tracker2 - fz_tracker1)) + x2; + yt = ((fz_timing - fz_tracker2) * (y2 - y1) / (fz_tracker2 - fz_tracker1)) + y2; + }; + // Hector objects + bool SetBeamLine(); + + std::map m_beamPart; + std::unique_ptr m_beamlineCTPPS1; + std::unique_ptr m_beamlineCTPPS2; + std::unique_ptr pps_stationF; + std::unique_ptr pps_stationB; + + std::string beam1filename; + std::string beam2filename; + + // Defaults + double lengthctpps; + bool m_verbosity; + double fBeamEnergy; + double fBeamMomentum; + bool fCrossAngleCorr; + double fCrossingAngleBeam1; + double fCrossingAngleBeam2; + //////////////////////////////////////////////// + std::unique_ptr TrkStation_F; // auxiliary object with the tracker geometry + std::unique_ptr TrkStation_B; + std::unique_ptr det1F; + std::unique_ptr det1B; + std::unique_ptr det2F; + std::unique_ptr det2B; + std::unique_ptr detToF_F; + std::unique_ptr detToF_B; + + std::vector theCTPPSFastTrack; + + CTPPSFastTrack track; + + std::vector recCellId_F, recCellId_B; + std::vector recTof_F, recTof_B; + + double fz_tracker1, fz_tracker2, fz_timing; + double fTrackerWidth, fTrackerHeight, fTrackerInsertion, fBeamXRMS_Trk1, fBeamXRMS_Trk2, fTrk1XOffset, fTrk2XOffset; + std::vector fToFCellWidth; + double fToFCellHeight, fToFPitchX, fToFPitchY; + int fToFNCellX, fToFNCellY; + double fToFInsertion, fBeamXRMS_ToF, fToFXOffset, fTimeSigma, fImpParcut; +}; ////////////////////// // constructors and destructor // diff --git a/FastSimulation/L1CaloTriggerProducer/BuildFile.xml b/FastSimulation/L1CaloTriggerProducer/BuildFile.xml deleted file mode 100644 index c0b11f4c7a801..0000000000000 --- a/FastSimulation/L1CaloTriggerProducer/BuildFile.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/Utilities/ReleaseScripts/scripts/git-publish b/Utilities/ReleaseScripts/scripts/git-publish index e8f5dd658ba14..1aded34ab031e 100755 --- a/Utilities/ReleaseScripts/scripts/git-publish +++ b/Utilities/ReleaseScripts/scripts/git-publish @@ -455,7 +455,7 @@ CMSSW_CATEGORIES={"Operations": ["Configuration/Applications", "FastSimulation/Configuration", "FastSimulation/EgammaElectronAlgos", "FastSimulation/Event", "FastSimulation/EventProducer", "FastSimulation/ForwardDetectors", "FastSimulation/HighLevelTrigger", - "FastSimulation/L1CaloTriggerProducer", "FastSimulation/MaterialEffects", + "FastSimulation/MaterialEffects", "FastSimulation/MuonSimHitProducer", "FastSimulation/Muons", "FastSimulation/Particle", "FastSimulation/ParticleDecay", "FastSimulation/ParticleFlow", "FastSimulation/ParticlePropagator",