diff --git a/CalibPPS/ESProducers/plugins/PPSPixelTopologyESSource.cc b/CalibPPS/ESProducers/plugins/PPSPixelTopologyESSource.cc new file mode 100644 index 0000000000000..fea4b5836b4e2 --- /dev/null +++ b/CalibPPS/ESProducers/plugins/PPSPixelTopologyESSource.cc @@ -0,0 +1,173 @@ +/**************************************************************************** + * + * CondFormats/PPSObjects/plugins/PPSPixelTopologyESSource.cc + * + * Description : - Loads PPSPixelTopology from the PPSPixelTopologyESSource_cfi.py + * config file. + * + * + * Author: F.Ferro ferro@ge.infn.it + * + * + ****************************************************************************/ + +#include "FWCore/Framework/interface/MakerMacros.h" +#include "FWCore/Framework/interface/SourceFactory.h" +#include "FWCore/Framework/interface/ModuleFactory.h" + +#include "FWCore/Framework/interface/ESHandle.h" +#include "FWCore/Framework/interface/ESProducer.h" +#include "FWCore/Framework/interface/EventSetupRecordIntervalFinder.h" +#include "FWCore/Framework/interface/ESProducts.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/MessageLogger/interface/MessageLogger.h" + +#include "CondFormats/PPSObjects/interface/PPSPixelTopology.h" +#include "CondFormats/DataRecord/interface/PPSPixelTopologyRcd.h" + +#include + +/** + * \brief Loads PPSPixelTopology from a config file. + **/ + +class PPSPixelTopologyESSource : public edm::ESProducer, public edm::EventSetupRecordIntervalFinder { +public: + PPSPixelTopologyESSource(const edm::ParameterSet&); + ~PPSPixelTopologyESSource() override = default; + + std::unique_ptr produce(const PPSPixelTopologyRcd&); + static void fillDescriptions(edm::ConfigurationDescriptions&); + +private: + /// Set PPS Topology parameters to their values from config + void setPPSPixelTopology(const edm::ParameterSet&); + /// Fill PPSPixelTopology object + std::unique_ptr fillPPSPixelTopology(); + + // Topology parameters + std::string runType_; + double pitch_simY_; + double pitch_simX_; + double thickness_; + unsigned short no_of_pixels_simX_; + unsigned short no_of_pixels_simY_; + unsigned short no_of_pixels_; + double simX_width_; + double simY_width_; + double dead_edge_width_; + double active_edge_sigma_; + double phys_active_edge_dist_; + +protected: + /// sets infinite validity of this data + void setIntervalFor(const edm::eventsetup::EventSetupRecordKey&, + const edm::IOVSyncValue&, + edm::ValidityInterval&) override; +}; + +//---------------------------------------------------------------------------------------------------- + +PPSPixelTopologyESSource::PPSPixelTopologyESSource(const edm::ParameterSet& iConfig) + : runType_(""), + pitch_simY_(0.), + pitch_simX_(0.), + thickness_(0.), + no_of_pixels_simX_(0.), + no_of_pixels_simY_(0.), + no_of_pixels_(0.), + simX_width_(0.), + simY_width_(0.), + dead_edge_width_(0.), + active_edge_sigma_(0.), + phys_active_edge_dist_(0.) { + setPPSPixelTopology(iConfig); + setWhatProduced(this); + findingRecord(); +} + +//---------------------------------------------------------------------------------------------------- + +std::unique_ptr PPSPixelTopologyESSource::produce(const PPSPixelTopologyRcd&) { + auto topo = fillPPSPixelTopology(); + + edm::LogInfo("PPS") << "PixelTopologyESSource::produce \n" << *topo; + + return topo; +} + +//---------------------------------------------------------------------------------------------------- + +void PPSPixelTopologyESSource::setPPSPixelTopology(const edm::ParameterSet& iConfig) { + runType_ = iConfig.getParameter("RunType"); + pitch_simY_ = iConfig.getParameter("PitchSimY"); + pitch_simX_ = iConfig.getParameter("PitchSimX"); + thickness_ = iConfig.getParameter("thickness"); + no_of_pixels_simX_ = iConfig.getParameter("noOfPixelSimX"); + no_of_pixels_simY_ = iConfig.getParameter("noOfPixelSimY"); + no_of_pixels_ = iConfig.getParameter("noOfPixels"); + simX_width_ = iConfig.getParameter("simXWidth"); + simY_width_ = iConfig.getParameter("simYWidth"); + dead_edge_width_ = iConfig.getParameter("deadEdgeWidth"); + active_edge_sigma_ = iConfig.getParameter("activeEdgeSigma"); + phys_active_edge_dist_ = iConfig.getParameter("physActiveEdgeDist"); +} + +//---------------------------------------------------------------------------------------------------- + +std::unique_ptr PPSPixelTopologyESSource::fillPPSPixelTopology() { + auto p = std::make_unique(); + + p->setRunType(runType_); + p->setPitchSimY(pitch_simY_); + p->setPitchSimX(pitch_simX_); + p->setThickness(thickness_); + p->setNoPixelsSimX(no_of_pixels_simX_); + p->setNoPixelsSimY(no_of_pixels_simY_); + p->setNoPixels(no_of_pixels_); + p->setSimXWidth(simX_width_); + p->setSimYWidth(simY_width_); + p->setDeadEdgeWidth(dead_edge_width_); + p->setActiveEdgeSigma(active_edge_sigma_); + p->setPhysActiveEdgeDist(phys_active_edge_dist_); + p->setActiveEdgeX(simX_width_ / 2. - phys_active_edge_dist_); + p->setActiveEdgeY(simY_width_ / 2. - phys_active_edge_dist_); + + return p; +} + +//---------------------------------------------------------------------------------------------------- + +void PPSPixelTopologyESSource::setIntervalFor(const edm::eventsetup::EventSetupRecordKey& key, + const edm::IOVSyncValue& iosv, + edm::ValidityInterval& oValidity) { + edm::LogInfo("PPS") << ">> PPSPixelTopologyESSource::setIntervalFor(" << key.name() << ")\n" + << " run=" << iosv.eventID().run() << ", event=" << iosv.eventID().event(); + + edm::ValidityInterval infinity(iosv.beginOfTime(), iosv.endOfTime()); + oValidity = infinity; +} + +//---------------------------------------------------------------------------------------------------- + +void PPSPixelTopologyESSource::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { + edm::ParameterSetDescription desc; + desc.add("RunType", "Run3"); + desc.add("PitchSimY", 150e-3); + desc.add("PitchSimX", 100e-3); + desc.add("thickness", 0.23); + desc.add("noOfPixelSimX", 160); + desc.add("noOfPixelSimY", 156); + desc.add("noOfPixels", 160 * 156); + desc.add("simXWidth", 16.6); + desc.add("simYWidth", 16.2); + desc.add("deadEdgeWidth", 200e-3); + desc.add("activeEdgeSigma", 0.02); + desc.add("physActiveEdgeDist", 0.150); + + descriptions.add("ppsPixelTopologyESSource", desc); +} + +//---------------------------------------------------------------------------------------------------- + +DEFINE_FWK_EVENTSETUP_SOURCE(PPSPixelTopologyESSource); diff --git a/CalibPPS/ESProducers/python/ppsPixelTopologyESSourceRun2_cfi.py b/CalibPPS/ESProducers/python/ppsPixelTopologyESSourceRun2_cfi.py new file mode 100644 index 0000000000000..bf536433c2961 --- /dev/null +++ b/CalibPPS/ESProducers/python/ppsPixelTopologyESSourceRun2_cfi.py @@ -0,0 +1,17 @@ +import FWCore.ParameterSet.Config as cms + +ppsPixelTopologyESSource = cms.ESSource('PPSPixelTopologyESSource', + RunType = cms.string('Run2'), + PitchSimY = cms.double(0.15), + PitchSimX = cms.double(0.1), + thickness = cms.double(0.23), + noOfPixelSimX = cms.int32(160), + noOfPixelSimY = cms.int32(156), + noOfPixels = cms.int32(24960), + simXWidth = cms.double(16.6), + simYWidth = cms.double(24.4), + deadEdgeWidth = cms.double(0.2), + activeEdgeSigma = cms.double(0.02), + physActiveEdgeDist = cms.double(0.15), + appendToDataLabel = cms.string('') +) diff --git a/CalibPPS/ESProducers/python/ppsTopology_cff.py b/CalibPPS/ESProducers/python/ppsTopology_cff.py new file mode 100644 index 0000000000000..6e63e2b4a7a5d --- /dev/null +++ b/CalibPPS/ESProducers/python/ppsTopology_cff.py @@ -0,0 +1,9 @@ +import FWCore.ParameterSet.Config as cms + +from CalibPPS.ESProducers.ppsPixelTopologyESSource_cfi import ppsPixelTopologyESSource + +from Configuration.Eras.Modifier_ctpps_2016_cff import ctpps_2016 +from Configuration.Eras.Modifier_ctpps_2017_cff import ctpps_2017 +from Configuration.Eras.Modifier_ctpps_2018_cff import ctpps_2018 + +(ctpps_2016 | ctpps_2017 | ctpps_2018).toModify(ppsPixelTopologyESSource, RunType = cms.string('Run2'), simYWidth = cms.double(24.4) ) diff --git a/CondCore/CTPPSPlugins/src/plugin.cc b/CondCore/CTPPSPlugins/src/plugin.cc index 0ee0e498777a9..28eab28ee1ade 100644 --- a/CondCore/CTPPSPlugins/src/plugin.cc +++ b/CondCore/CTPPSPlugins/src/plugin.cc @@ -17,6 +17,8 @@ #include "CondFormats/DataRecord/interface/CTPPSOpticsRcd.h" #include "CondFormats/PPSObjects/interface/PPSDirectSimulationData.h" #include "CondFormats/DataRecord/interface/PPSDirectSimulationDataRcd.h" +#include "CondFormats/PPSObjects/interface/PPSPixelTopology.h" +#include "CondFormats/DataRecord/interface/PPSPixelTopologyRcd.h" REGISTER_PLUGIN(CTPPSBeamParametersRcd, CTPPSBeamParameters); REGISTER_PLUGIN(CTPPSPixelDAQMappingRcd, CTPPSPixelDAQMapping); @@ -28,3 +30,4 @@ REGISTER_PLUGIN(RPMisalignedAlignmentRecord, CTPPSRPAlignmentCorrectionsData); REGISTER_PLUGIN(PPSTimingCalibrationRcd, PPSTimingCalibration); REGISTER_PLUGIN(CTPPSOpticsRcd, LHCOpticalFunctionsSetCollection); REGISTER_PLUGIN(PPSDirectSimulationDataRcd, PPSDirectSimulationData); +REGISTER_PLUGIN(PPSPixelTopologyRcd, PPSPixelTopology); diff --git a/CondFormats/DataRecord/interface/PPSPixelTopologyRcd.h b/CondFormats/DataRecord/interface/PPSPixelTopologyRcd.h new file mode 100644 index 0000000000000..8ffdc20ba11a4 --- /dev/null +++ b/CondFormats/DataRecord/interface/PPSPixelTopologyRcd.h @@ -0,0 +1,10 @@ +// Author: F.Ferro + +#ifndef CondFormats_DataRecord_PPSPixelTopologyRcd_h +#define CondFormats_DataRecord_PPSPixelTopologyRcd_h + +#include "FWCore/Framework/interface/EventSetupRecordImplementation.h" + +class PPSPixelTopologyRcd : public edm::eventsetup::EventSetupRecordImplementation {}; + +#endif diff --git a/CondFormats/DataRecord/src/PPSPixelTopologyRcd.cc b/CondFormats/DataRecord/src/PPSPixelTopologyRcd.cc new file mode 100644 index 0000000000000..cc6aca4ce1055 --- /dev/null +++ b/CondFormats/DataRecord/src/PPSPixelTopologyRcd.cc @@ -0,0 +1,14 @@ +// -*- C++ -*- +// +// Package: CondFormats/DataRecord +// Class : PPSPixelTopologyRcd +// +// Implementation: +// [Notes on implementation] +// +// Author: F.Ferro + +#include "CondFormats/DataRecord/interface/PPSPixelTopologyRcd.h" +#include "FWCore/Framework/interface/eventsetuprecord_registration_macro.h" + +EVENTSETUP_RECORD_REG(PPSPixelTopologyRcd); diff --git a/CondFormats/PPSObjects/interface/PPSPixelTopology.h b/CondFormats/PPSObjects/interface/PPSPixelTopology.h new file mode 100644 index 0000000000000..a1968d17ca0ac --- /dev/null +++ b/CondFormats/PPSObjects/interface/PPSPixelTopology.h @@ -0,0 +1,150 @@ +#ifndef CondFormats_PPSObjects_PPSPixelTopology_h +#define CondFormats_PPSObjects_PPSPixelTopology_h +// -*- C++ -*- +// +// Package: PPSObjects +// Class: PPSPixelTopology +// +/**\class PPSPixelTopology PPSPixelTopology.h CondFormats/PPSObjects/src/PPSPixelTopology.cc + + Description: Internal topology of PPS detectors + + Implementation: + +*/ +// + +#include "CondFormats/Serialization/interface/Serializable.h" +#include "FWCore/MessageLogger/interface/MessageLogger.h" +#include "CondFormats/PPSObjects/interface/CTPPSPixelIndices.h" +#include + +class PPSPixelTopology { +public: + // Constructor + PPSPixelTopology(); + // Destructor + ~PPSPixelTopology(); + + class PixelInfo { + public: + PixelInfo(double lower_simX_border, + double higher_simX_border, + double lower_simY_border, + double higher_simY_border, + double eff_factor, + unsigned short pixel_row_no, + unsigned short pixel_col_no) + : lower_simX_border_(lower_simX_border), + higher_simX_border_(higher_simX_border), + lower_simY_border_(lower_simY_border), + higher_simY_border_(higher_simY_border), + eff_factor_(eff_factor), + pixel_row_no_(pixel_row_no), + pixel_col_no_(pixel_col_no) + //, + // pixel_index_(pixel_col_no * PPSPixelTopology::no_of_pixels_simX_ + pixel_row_no) + {} + + inline double higherSimXBorder() const { return higher_simX_border_; } + inline double lowerSimXBorder() const { return lower_simX_border_; } + inline double higherSimYBorder() const { return higher_simY_border_; } + inline double lowerSimYBorder() const { return lower_simY_border_; } + inline double effFactor() const { return eff_factor_; } + inline unsigned short pixelRowNo() const { return pixel_row_no_; } + inline unsigned short pixelColNo() const { return pixel_col_no_; } + // inline unsigned short pixelIndex() const { return pixel_index_; } + + private: + double lower_simX_border_; + double higher_simX_border_; + double lower_simY_border_; + double higher_simY_border_; + double eff_factor_; + unsigned short pixel_row_no_; + unsigned short pixel_col_no_; + // unsigned short pixel_index_; + COND_SERIALIZABLE; + }; + + unsigned short pixelIndex(PixelInfo pI) const; + bool isPixelHit(float xLocalCoordinate, float yLocalCoordinate, bool is3x2) const; + PixelInfo getPixelsInvolved(double x, double y, double sigma, double& hit_pos_x, double& hit_pos_y) const; + + void pixelRange( + unsigned int arow, unsigned int acol, double& lower_x, double& higher_x, double& lower_y, double& higher_y) const; + + // Getters + + std::string getRunType() const; + double getPitchSimY() const; + double getPitchSimX() const; + double getThickness() const; + unsigned short getNoPixelsSimX() const; + unsigned short getNoPixelsSimY() const; + unsigned short getNoPixels() const; + double getSimXWidth() const; + double getSimYWidth() const; + double getDeadEdgeWidth() const; + double getActiveEdgeSigma() const; + double getPhysActiveEdgeDist() const; + double getActiveEdgeX() const; + double getActiveEdgeY() const; + + // Setters + + void setRunType(std::string rt); + void setPitchSimY(double psy); + void setPitchSimX(double psx); + void setThickness(double tss); + void setNoPixelsSimX(unsigned short npx); + void setNoPixelsSimY(unsigned short npy); + void setNoPixels(unsigned short np); + void setSimXWidth(double sxw); + void setSimYWidth(double syw); + void setDeadEdgeWidth(double dew); + void setActiveEdgeSigma(double aes); + void setPhysActiveEdgeDist(double pae); + void setActiveEdgeX(double aex); + void setActiveEdgeY(double aey); + + void printInfo(std::stringstream& s); + +private: + /* +Geometrical and topological information on RPix silicon detector. +Uses coordinate a frame with origin in the center of the wafer. +*/ + + double activeEdgeFactor(double x, double y) const; + double distanceFromTopActiveEdge(double x, double y) const; + double distanceFromBottomActiveEdge(double x, double y) const; + double distanceFromRightActiveEdge(double x, double y) const; + double distanceFromLeftActiveEdge(double x, double y) const; + unsigned int row(double x) const; + unsigned int col(double y) const; + void rowCol2Index(unsigned int arow, unsigned int acol, unsigned int& index) const; + void index2RowCol(unsigned int& arow, unsigned int& acol, unsigned int index) const; + + std::string runType_; + double pitch_simY_; + double pitch_simX_; + double thickness_; + unsigned short no_of_pixels_simX_; + unsigned short no_of_pixels_simY_; + unsigned short no_of_pixels_; + double simX_width_; + double simY_width_; + double dead_edge_width_; + double active_edge_sigma_; + double phys_active_edge_dist_; + + double active_edge_x_; + double active_edge_y_; + + COND_SERIALIZABLE; +}; + +std::ostream& operator<<(std::ostream&, PPSPixelTopology); + +#endif diff --git a/CondFormats/PPSObjects/src/PPSPixelTopology.cc b/CondFormats/PPSObjects/src/PPSPixelTopology.cc new file mode 100644 index 0000000000000..13d20b8a0547c --- /dev/null +++ b/CondFormats/PPSObjects/src/PPSPixelTopology.cc @@ -0,0 +1,277 @@ +#include "CondFormats/PPSObjects/interface/PPSPixelTopology.h" +//#include + +// Constructors + +PPSPixelTopology::PPSPixelTopology() + : runType_(""), + pitch_simY_(0.), + pitch_simX_(0.), + thickness_(0.), + no_of_pixels_simX_(0.), + no_of_pixels_simY_(0.), + no_of_pixels_(0.), + simX_width_(0.), + simY_width_(0.), + dead_edge_width_(0.), + active_edge_sigma_(0.), + phys_active_edge_dist_(0.), + active_edge_x_(0.), + active_edge_y_(0.) {} + +// Destructor +PPSPixelTopology::~PPSPixelTopology() {} + +unsigned short PPSPixelTopology::pixelIndex(PixelInfo pI) const { + return no_of_pixels_simX_ * pI.pixelColNo() + pI.pixelRowNo(); +} + +bool PPSPixelTopology::isPixelHit(float xLocalCoordinate, float yLocalCoordinate, bool is3x2 = true) const { + // check hit fiducial boundaries + double xModuleSize = 2 * ((no_of_pixels_simX_ / 2. + 1) * pitch_simX_ + dead_edge_width_); + if (xLocalCoordinate < -xModuleSize / 2. || xLocalCoordinate > xModuleSize / 2.) + return false; + + double yModuleSize = (no_of_pixels_simY_ + 4.) * pitch_simY_ + 2. * dead_edge_width_; + double y2x2top = no_of_pixels_simY_ / 6. * pitch_simY_ + dead_edge_width_; + if (is3x2 && (yLocalCoordinate < -yModuleSize / 2. || yLocalCoordinate > yModuleSize / 2.)) + return false; + + if (!is3x2 && (yLocalCoordinate < -yModuleSize / 2. || yLocalCoordinate > y2x2top)) + return false; + + return true; +} + +PPSPixelTopology::PixelInfo PPSPixelTopology::getPixelsInvolved( + double x, double y, double sigma, double& hit_pos_x, double& hit_pos_y) const { + //hit position wrt the bottom left corner of the sensor (-8.3, -12.2) in sensor view, rocs behind + hit_pos_x = x + simX_width_ / 2.; + hit_pos_y = y + simY_width_ / 2.; + if (!(hit_pos_x * hit_pos_y > 0)) + throw cms::Exception("PPSPixelTopology") << "pixel out of reference frame"; + + double hit_factor = activeEdgeFactor(x, y); + + unsigned int interested_row = row(x); + unsigned int interested_col = col(y); + double low_pixel_range_x, high_pixel_range_x, low_pixel_range_y, high_pixel_range_y; + pixelRange( + interested_row, interested_col, low_pixel_range_x, high_pixel_range_x, low_pixel_range_y, high_pixel_range_y); + + return PPSPixelTopology::PixelInfo(low_pixel_range_x, + high_pixel_range_x, + low_pixel_range_y, + high_pixel_range_y, + hit_factor, + interested_row, + interested_col); +} + +void PPSPixelTopology::pixelRange( + unsigned int arow, unsigned int acol, double& lower_x, double& higher_x, double& lower_y, double& higher_y) const { + // x and y in the system of Geant4 SIMULATION + arow = (2 * ROCSizeInX - 1) - arow; + if (arow > (2 * ROCSizeInX - 1) || acol > (3 * ROCSizeInY - 1)) + throw cms::Exception("PPSPixelTopology") << "pixel rows or columns exceeding limits"; + + // rows (x segmentation) + if (arow == 0) { + lower_x = dead_edge_width_ - phys_active_edge_dist_; // 50 um + higher_x = dead_edge_width_ + pitch_simX_; // 300 um + } else if (arow <= (ROCSizeInX - 2)) { + lower_x = dead_edge_width_ + arow * pitch_simX_; + higher_x = dead_edge_width_ + (arow + 1) * pitch_simX_; + } else if (arow == (ROCSizeInX - 1)) { + lower_x = dead_edge_width_ + arow * pitch_simX_; + higher_x = dead_edge_width_ + (arow + 2) * pitch_simX_; + } else if (arow == ROCSizeInX) { + lower_x = dead_edge_width_ + (arow + 1) * pitch_simX_; + higher_x = dead_edge_width_ + (arow + 3) * pitch_simX_; + } else if (arow <= (2 * ROCSizeInX - 2)) { + lower_x = dead_edge_width_ + (arow + 2) * pitch_simX_; + higher_x = dead_edge_width_ + (arow + 3) * pitch_simX_; + } else if (arow == (2 * ROCSizeInX - 1)) { + lower_x = dead_edge_width_ + (arow + 2) * pitch_simX_; + higher_x = dead_edge_width_ + (arow + 3) * pitch_simX_ + phys_active_edge_dist_; + } + // columns (y segmentation) + if (acol == 0) { + lower_y = dead_edge_width_ - phys_active_edge_dist_; // 50 um + higher_y = dead_edge_width_ + pitch_simY_; // 350 um + } else if (acol <= (ROCSizeInY - 2)) { + lower_y = dead_edge_width_ + acol * pitch_simY_; + higher_y = dead_edge_width_ + (acol + 1) * pitch_simY_; + } else if (acol == (ROCSizeInY - 1)) { + lower_y = dead_edge_width_ + acol * pitch_simY_; + higher_y = dead_edge_width_ + (acol + 2) * pitch_simY_; + } else if (acol == ROCSizeInY) { + lower_y = dead_edge_width_ + (acol + 1) * pitch_simY_; + higher_y = dead_edge_width_ + (acol + 3) * pitch_simY_; + } else if (acol <= (2 * ROCSizeInY - 2)) { + lower_y = dead_edge_width_ + (acol + 2) * pitch_simY_; + higher_y = dead_edge_width_ + (acol + 3) * pitch_simY_; + } else if (acol == (2 * ROCSizeInY - 1)) { + lower_y = dead_edge_width_ + (acol + 2) * pitch_simY_; + higher_y = dead_edge_width_ + (acol + 4) * pitch_simY_; + } else if (acol == (2 * ROCSizeInY)) { + lower_y = dead_edge_width_ + (acol + 3) * pitch_simY_; + higher_y = dead_edge_width_ + (acol + 5) * pitch_simY_; + } else if (acol <= (3 * ROCSizeInY - 2)) { + lower_y = dead_edge_width_ + (acol + 4) * pitch_simY_; + higher_y = dead_edge_width_ + (acol + 5) * pitch_simY_; + } else if (acol == (3 * ROCSizeInY - 1)) { + lower_y = dead_edge_width_ + (acol + 4) * pitch_simY_; + higher_y = dead_edge_width_ + (acol + 5) * pitch_simY_ + phys_active_edge_dist_; + } + + lower_x = lower_x - simX_width_ / 2.; + lower_y = lower_y - simY_width_ / 2.; + higher_x = higher_x - simX_width_ / 2.; + higher_y = higher_y - simY_width_ / 2.; +} + +double PPSPixelTopology::activeEdgeFactor(double x, double y) const { + const double inv_sigma = 1. / active_edge_sigma_; // precaching + const double topEdgeFactor = std::erf(-distanceFromTopActiveEdge(x, y) * inv_sigma) * 0.5 + 0.5; + const double bottomEdgeFactor = std::erf(-distanceFromBottomActiveEdge(x, y) * inv_sigma) * 0.5 + 0.5; + const double rightEdgeFactor = std::erf(-distanceFromRightActiveEdge(x, y) * inv_sigma) * 0.5 + 0.5; + const double leftEdgeFactor = std::erf(-distanceFromLeftActiveEdge(x, y) * inv_sigma) * 0.5 + 0.5; + + const double aEF = topEdgeFactor * bottomEdgeFactor * rightEdgeFactor * leftEdgeFactor; + + if (aEF > 1.) + throw cms::Exception("PPSPixelTopology") << " pixel active edge factor > 1"; + + return aEF; +} + +double PPSPixelTopology::distanceFromTopActiveEdge(double x, double y) const { return (y - active_edge_y_); } +double PPSPixelTopology::distanceFromBottomActiveEdge(double x, double y) const { return (-y - active_edge_y_); } +double PPSPixelTopology::distanceFromRightActiveEdge(double x, double y) const { return (x - active_edge_x_); } +double PPSPixelTopology::distanceFromLeftActiveEdge(double x, double y) const { return (-x - active_edge_x_); } + +unsigned int PPSPixelTopology::row(double x) const { + // x in the G4 simulation system + x = x + simX_width_ / 2.; + + // now x in the system centered in the bottom left corner of the sensor (sensor view, rocs behind) + if (x < 0. || x > simX_width_) + throw cms::Exception("PPSPixelTopology") << " pixel out of reference frame"; + + // rows (x segmentation) + unsigned int arow; + if (x <= (dead_edge_width_ + pitch_simX_)) + arow = 0; + else if (x <= (dead_edge_width_ + (ROCSizeInX - 1) * pitch_simX_)) + arow = int((x - dead_edge_width_ - pitch_simX_) / pitch_simX_) + 1; + else if (x <= (dead_edge_width_ + (ROCSizeInX + 1) * pitch_simX_)) + arow = (ROCSizeInX - 1); + else if (x <= (dead_edge_width_ + (ROCSizeInX + 3) * pitch_simX_)) + arow = ROCSizeInX; + else if (x <= (dead_edge_width_ + (2 * ROCSizeInX + 2) * pitch_simX_)) + arow = int((x - dead_edge_width_ - pitch_simX_) / pitch_simX_) - 1; + else + arow = (2 * ROCSizeInX - 1); + + arow = (2 * ROCSizeInX - 1) - arow; + if (arow > (2 * ROCSizeInX - 1)) + throw cms::Exception("PPSPixelTopology") << " pixel row number exceeding limit"; + + return arow; +} + +unsigned int PPSPixelTopology::col(double y) const { + // y in the G4 simulation system + unsigned int column; + + // columns (y segmentation) + // now y in the system centered in the bottom left corner of the sensor (sensor view, rocs behind) + y = y + simY_width_ / 2.; + if (y < 0. || y > simY_width_) + throw cms::Exception("PPSPixelTopology") << "pixel out of reference frame"; + + if (y <= (dead_edge_width_ + pitch_simY_)) + column = 0; + else if (y <= (dead_edge_width_ + (ROCSizeInY - 1) * pitch_simY_)) + column = int((y - dead_edge_width_ - pitch_simY_) / pitch_simY_) + 1; + else if (y <= (dead_edge_width_ + (ROCSizeInY + 1) * pitch_simY_)) + column = ROCSizeInY - 1; + else if (y <= (dead_edge_width_ + (ROCSizeInY + 3) * pitch_simY_)) + column = ROCSizeInY; + else if (y <= (dead_edge_width_ + (2 * ROCSizeInY + 1) * pitch_simY_)) + column = int((y - dead_edge_width_ - pitch_simY_) / pitch_simY_) - 1; + else if (y <= (dead_edge_width_ + (2 * ROCSizeInY + 3) * pitch_simY_)) + column = 2 * ROCSizeInY - 1; + else if (y <= (dead_edge_width_ + (2 * ROCSizeInY + 5) * pitch_simY_)) + column = 2 * ROCSizeInY; + else if (y <= (dead_edge_width_ + (3 * ROCSizeInY + 3) * pitch_simY_)) + column = int((y - dead_edge_width_ - pitch_simY_) / pitch_simY_) - 3; + else + column = (3 * ROCSizeInY - 1); + + return column; +} + +void PPSPixelTopology::rowCol2Index(unsigned int arow, unsigned int acol, unsigned int& index) const { + index = acol * no_of_pixels_simX_ + arow; +} + +void PPSPixelTopology::index2RowCol(unsigned int& arow, unsigned int& acol, unsigned int index) const { + acol = index / no_of_pixels_simX_; + arow = index % no_of_pixels_simX_; +} + +// Getters + +std::string PPSPixelTopology::getRunType() const { return runType_; } +double PPSPixelTopology::getPitchSimY() const { return pitch_simY_; } +double PPSPixelTopology::getPitchSimX() const { return pitch_simX_; } +double PPSPixelTopology::getThickness() const { return thickness_; } +unsigned short PPSPixelTopology::getNoPixelsSimX() const { return no_of_pixels_simX_; } +unsigned short PPSPixelTopology::getNoPixelsSimY() const { return no_of_pixels_simY_; } +unsigned short PPSPixelTopology::getNoPixels() const { return no_of_pixels_; } +double PPSPixelTopology::getSimXWidth() const { return simX_width_; } +double PPSPixelTopology::getSimYWidth() const { return simY_width_; } +double PPSPixelTopology::getDeadEdgeWidth() const { return dead_edge_width_; } +double PPSPixelTopology::getActiveEdgeSigma() const { return active_edge_sigma_; } +double PPSPixelTopology::getPhysActiveEdgeDist() const { return phys_active_edge_dist_; } +double PPSPixelTopology::getActiveEdgeX() const { return active_edge_x_; } +double PPSPixelTopology::getActiveEdgeY() const { return active_edge_y_; } + +// Setters + +void PPSPixelTopology::setRunType(std::string rt) { runType_ = rt; } +void PPSPixelTopology::setPitchSimY(double psy) { pitch_simY_ = psy; } +void PPSPixelTopology::setPitchSimX(double psx) { pitch_simX_ = psx; } +void PPSPixelTopology::setThickness(double tss) { thickness_ = tss; } +void PPSPixelTopology::setNoPixelsSimX(unsigned short npx) { no_of_pixels_simX_ = npx; } +void PPSPixelTopology::setNoPixelsSimY(unsigned short npy) { no_of_pixels_simY_ = npy; } +void PPSPixelTopology::setNoPixels(unsigned short np) { no_of_pixels_ = np; } +void PPSPixelTopology::setSimXWidth(double sxw) { simX_width_ = sxw; } +void PPSPixelTopology::setSimYWidth(double syw) { simY_width_ = syw; } +void PPSPixelTopology::setDeadEdgeWidth(double dew) { dead_edge_width_ = dew; } +void PPSPixelTopology::setActiveEdgeSigma(double aes) { active_edge_sigma_ = aes; } +void PPSPixelTopology::setPhysActiveEdgeDist(double pae) { phys_active_edge_dist_ = pae; } +void PPSPixelTopology::setActiveEdgeX(double aex) { active_edge_x_ = aex; } +void PPSPixelTopology::setActiveEdgeY(double aey) { active_edge_y_ = aey; } + +void PPSPixelTopology::printInfo(std::stringstream& s) { + s << "\n PPS Topology parameters : \n" + << "\n runType_ = " << runType_ << "\n pitch_simY_ = " << pitch_simY_ << "\n pitch_simX_ = " << pitch_simX_ + << "\n thickness_ = " << thickness_ << "\n no_of_pixels_simX_ " << no_of_pixels_simX_ + << "\n no_of_pixels_simY_ " << no_of_pixels_simY_ << "\n no_of_pixels_ " << no_of_pixels_ << "\n simX_width_ " + << simX_width_ << "\n simY_width_ " << simY_width_ << "\n dead_edge_width_ " << dead_edge_width_ + << "\n active_edge_sigma_ " << active_edge_sigma_ << "\n phys_active_edge_dist_ " << phys_active_edge_dist_ + + << "\n active_edge_x_ " << active_edge_x_ << "\n active_edge_y_ " << active_edge_y_ + + << std::endl; +} + +std::ostream& operator<<(std::ostream& os, PPSPixelTopology info) { + std::stringstream ss; + info.printInfo(ss); + os << ss.str(); + return os; +} diff --git a/CondFormats/PPSObjects/src/T_EventSetup_PPSPixelTopology.cc b/CondFormats/PPSObjects/src/T_EventSetup_PPSPixelTopology.cc new file mode 100644 index 0000000000000..2e31820bb054b --- /dev/null +++ b/CondFormats/PPSObjects/src/T_EventSetup_PPSPixelTopology.cc @@ -0,0 +1,4 @@ +#include "CondFormats/PPSObjects/interface/PPSPixelTopology.h" +#include "FWCore/Utilities/interface/typelookup.h" + +TYPELOOKUP_DATA_REG(PPSPixelTopology); diff --git a/CondFormats/PPSObjects/src/classes.h b/CondFormats/PPSObjects/src/classes.h index a807863549254..148f38e44e475 100644 --- a/CondFormats/PPSObjects/src/classes.h +++ b/CondFormats/PPSObjects/src/classes.h @@ -19,5 +19,6 @@ namespace CondFormats_CTPPSPixelObjects { LHCOpticalFunctionsSetCollection lhc_ofsc; LHCInterpolatedOpticalFunctionsSet lhc_iofs; LHCInterpolatedOpticalFunctionsSetCollection lhc_iofsc; + PPSPixelTopology pps_pt; }; } // namespace CondFormats_CTPPSPixelObjects diff --git a/CondFormats/PPSObjects/src/headers.h b/CondFormats/PPSObjects/src/headers.h index b21adc5f7c18d..bb179fd8df892 100644 --- a/CondFormats/PPSObjects/src/headers.h +++ b/CondFormats/PPSObjects/src/headers.h @@ -12,3 +12,4 @@ #include "CondFormats/PPSObjects/interface/LHCInterpolatedOpticalFunctionsSetCollection.h" #include "CondFormats/PPSObjects/interface/PPSDirectSimulationData.h" +#include "CondFormats/PPSObjects/interface/PPSPixelTopology.h" diff --git a/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py b/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py index 9f6f8309b9b23..672f4f2b08417 100644 --- a/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py +++ b/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py @@ -1287,5 +1287,6 @@ def __init__(self, howMuch, dataset): ('Upsilon1SToMuMu_forSTEAM_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(9,50),'Upsilon1SToMuMu_14')), ('TenTau_E_15_500_Eta3p1_pythia8_cfi', UpgradeFragment(Kby(9,100),'TenTau_15_500_Eta3p1')), ('QCD_Pt_1800_2400_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(9,50), 'QCD_Pt_1800_2400_14')), - ('DisplacedSUSY_stopToBottom_M_800_500mm_TuneCP5_14TeV_pythia8_cff', UpgradeFragment(Kby(9,50),'DisplacedSUSY_stopToB_M_800_500mm_14')), + ('DisplacedSUSY_stopToBottom_M_800_500mm_TuneCP5_14TeV_pythia8_cff', UpgradeFragment(Kby(9,50),'DisplacedSUSY_14TeV')), + ('GluGluTo2Jets_M_300_2000_14TeV_Exhume_cff',UpgradeFragment(Kby(9,100),'GluGluTo2Jets_14TeV')), ]) diff --git a/Geometry/VeryForwardGeometry/interface/CTPPSPixelSimTopology.h b/Geometry/VeryForwardGeometry/interface/CTPPSPixelSimTopology.h deleted file mode 100644 index 9ff807847b232..0000000000000 --- a/Geometry/VeryForwardGeometry/interface/CTPPSPixelSimTopology.h +++ /dev/null @@ -1,225 +0,0 @@ -#ifndef Geometry_VeryForwardGeometry_CTPPSPixelSimTopology_h -#define Geometry_VeryForwardGeometry_CTPPSPixelSimTopology_h - -#include -#include "Geometry/VeryForwardGeometry/interface/CTPPSPixelTopology.h" - -class CTPPSPixelSimTopology : public CTPPSPixelTopology { -public: - /* simX and simY are the coordinates as in the simulation: - _________ - | | - | | y - |_________| - - x - */ - class PixelInfo { - public: - PixelInfo(double lower_simX_border, - double higher_simX_border, - double lower_simY_border, - double higher_simY_border, - double eff_factor, - unsigned short pixel_row_no, - unsigned short pixel_col_no) - : lower_simX_border_(lower_simX_border), - higher_simX_border_(higher_simX_border), - lower_simY_border_(lower_simY_border), - higher_simY_border_(higher_simY_border), - eff_factor_(eff_factor), - pixel_row_no_(pixel_row_no), - pixel_col_no_(pixel_col_no), - pixel_index_(pixel_col_no * CTPPSPixelTopology::no_of_pixels_simX_ + pixel_row_no) {} - - inline double higherSimXBorder() const { return higher_simX_border_; } - inline double lowerSimXBorder() const { return lower_simX_border_; } - inline double higherSimYBorder() const { return higher_simY_border_; } - inline double lowerSimYBorder() const { return lower_simY_border_; } - inline double effFactor() const { return eff_factor_; } - inline unsigned short pixelRowNo() const { return pixel_row_no_; } - inline unsigned short pixelColNo() const { return pixel_col_no_; } - inline unsigned short pixelIndex() const { return pixel_index_; } - - private: - double lower_simX_border_; - double higher_simX_border_; - double lower_simY_border_; - double higher_simY_border_; - double eff_factor_; - unsigned short pixel_row_no_; - unsigned short pixel_col_no_; - unsigned short pixel_index_; - }; - -public: - CTPPSPixelSimTopology(); - ~CTPPSPixelSimTopology() {} - - PixelInfo getPixelsInvolved(double x, double y, double sigma, double& hit_pos_x, double& hit_pos_y) const; - - inline void pixelRange(unsigned int arow, - unsigned int acol, - double& lower_x, - double& higher_x, - double& lower_y, - double& higher_y) const { - // x and y in the system of Geant4 SIMULATION - arow = (2 * ROCSizeInX - 1) - arow; - if (arow > (2 * ROCSizeInX - 1) || acol > (3 * ROCSizeInY - 1)) - throw cms::Exception("CTPPSPixelSimTopology") << "rows or columns exceeding limits"; - - // rows (x segmentation) - if (arow == 0) { - lower_x = dead_edge_width_ - phys_active_edge_dist_; // 50 um - higher_x = dead_edge_width_ + pitch_simX_; // 300 um - } else if (arow <= (ROCSizeInX - 2)) { - lower_x = dead_edge_width_ + arow * pitch_simX_; - higher_x = dead_edge_width_ + (arow + 1) * pitch_simX_; - } else if (arow == (ROCSizeInX - 1)) { - lower_x = dead_edge_width_ + arow * pitch_simX_; - higher_x = dead_edge_width_ + (arow + 2) * pitch_simX_; - } else if (arow == ROCSizeInX) { - lower_x = dead_edge_width_ + (arow + 1) * pitch_simX_; - higher_x = dead_edge_width_ + (arow + 3) * pitch_simX_; - } else if (arow <= (2 * ROCSizeInX - 2)) { - lower_x = dead_edge_width_ + (arow + 2) * pitch_simX_; - higher_x = dead_edge_width_ + (arow + 3) * pitch_simX_; - } else if (arow == (2 * ROCSizeInX - 1)) { - lower_x = dead_edge_width_ + (arow + 2) * pitch_simX_; - higher_x = dead_edge_width_ + (arow + 3) * pitch_simX_ + phys_active_edge_dist_; - } - - // columns (y segmentation) - if (acol == 0) { - lower_y = dead_edge_width_ - phys_active_edge_dist_; // 50 um - higher_y = dead_edge_width_ + pitch_simY_; // 350 um - } else if (acol <= (ROCSizeInY - 2)) { - lower_y = dead_edge_width_ + acol * pitch_simY_; - higher_y = dead_edge_width_ + (acol + 1) * pitch_simY_; - } else if (acol == (ROCSizeInY - 1)) { - lower_y = dead_edge_width_ + acol * pitch_simY_; - higher_y = dead_edge_width_ + (acol + 2) * pitch_simY_; - } else if (acol == ROCSizeInY) { - lower_y = dead_edge_width_ + (acol + 1) * pitch_simY_; - higher_y = dead_edge_width_ + (acol + 3) * pitch_simY_; - } else if (acol <= (2 * ROCSizeInY - 2)) { - lower_y = dead_edge_width_ + (acol + 2) * pitch_simY_; - higher_y = dead_edge_width_ + (acol + 3) * pitch_simY_; - } else if (acol == (2 * ROCSizeInY - 1)) { - lower_y = dead_edge_width_ + (acol + 2) * pitch_simY_; - higher_y = dead_edge_width_ + (acol + 4) * pitch_simY_; - } else if (acol == (2 * ROCSizeInY)) { - lower_y = dead_edge_width_ + (acol + 3) * pitch_simY_; - higher_y = dead_edge_width_ + (acol + 5) * pitch_simY_; - } else if (acol <= (3 * ROCSizeInY - 2)) { - lower_y = dead_edge_width_ + (acol + 4) * pitch_simY_; - higher_y = dead_edge_width_ + (acol + 5) * pitch_simY_; - } else if (acol == (3 * ROCSizeInY - 1)) { - lower_y = dead_edge_width_ + (acol + 4) * pitch_simY_; - higher_y = dead_edge_width_ + (acol + 5) * pitch_simY_ + phys_active_edge_dist_; - } - - lower_x = lower_x - simX_width_ / 2.; - lower_y = lower_y - simY_width_ / 2.; - higher_x = higher_x - simX_width_ / 2.; - higher_y = higher_y - simY_width_ / 2.; - } - -private: - double active_edge_x_; - double active_edge_y_; - - inline double activeEdgeFactor(double x, double y) const { - const double inv_sigma = 1. / active_edge_sigma_; // precaching - const double topEdgeFactor = std::erf(-distanceFromTopActiveEdge(x, y) * inv_sigma) * 0.5 + 0.5; - const double bottomEdgeFactor = std::erf(-distanceFromBottomActiveEdge(x, y) * inv_sigma) * 0.5 + 0.5; - const double rightEdgeFactor = std::erf(-distanceFromRightActiveEdge(x, y) * inv_sigma) * 0.5 + 0.5; - const double leftEdgeFactor = std::erf(-distanceFromLeftActiveEdge(x, y) * inv_sigma) * 0.5 + 0.5; - - const double aEF = topEdgeFactor * bottomEdgeFactor * rightEdgeFactor * leftEdgeFactor; - - if (aEF > 1.) - throw cms::Exception("CTPPSPixelSimTopology") << " active edge factor > 1"; - - return aEF; - } - - inline double distanceFromTopActiveEdge(double x, double y) const { return (y - active_edge_y_); } - inline double distanceFromBottomActiveEdge(double x, double y) const { return (-y - active_edge_y_); } - inline double distanceFromRightActiveEdge(double x, double y) const { return (x - active_edge_x_); } - inline double distanceFromLeftActiveEdge(double x, double y) const { return (-x - active_edge_x_); } - - inline unsigned int row(double x) const { - // x in the G4 simulation system - x = x + simX_width_ / 2.; - - // now x in the system centered in the bottom left corner of the sensor (sensor view, rocs behind) - if (x < 0. || x > simX_width_) - throw cms::Exception("CTPPSPixelSimTopology") << "out of reference frame"; - - // rows (x segmentation) - unsigned int arow; - if (x <= (dead_edge_width_ + pitch_simX_)) - arow = 0; - else if (x <= (dead_edge_width_ + (ROCSizeInX - 1) * pitch_simX_)) - arow = int((x - dead_edge_width_ - pitch_simX_) / pitch_simX_) + 1; - else if (x <= (dead_edge_width_ + (ROCSizeInX + 1) * pitch_simX_)) - arow = (ROCSizeInX - 1); - else if (x <= (dead_edge_width_ + (ROCSizeInX + 3) * pitch_simX_)) - arow = ROCSizeInX; - else if (x <= (dead_edge_width_ + (2 * ROCSizeInX + 2) * pitch_simX_)) - arow = int((x - dead_edge_width_ - pitch_simX_) / pitch_simX_) - 1; - else - arow = (2 * ROCSizeInX - 1); - - arow = (2 * ROCSizeInX - 1) - arow; - if (arow > (2 * ROCSizeInX - 1)) - throw cms::Exception("CTPPSPixelSimTopology") << "row number exceeding limit"; - - return arow; - } - - inline unsigned int col(double y) const { - // y in the G4 simulation system - unsigned int column; - - // columns (y segmentation) - // now y in the system centered in the bottom left corner of the sensor (sensor view, rocs behind) - y = y + simY_width_ / 2.; - if (y < 0. || y > simY_width_) - throw cms::Exception("CTPPSPixelSimTopology") << " out of reference frame"; - - if (y <= (dead_edge_width_ + pitch_simY_)) - column = 0; - else if (y <= (dead_edge_width_ + (ROCSizeInY - 1) * pitch_simY_)) - column = int((y - dead_edge_width_ - pitch_simY_) / pitch_simY_) + 1; - else if (y <= (dead_edge_width_ + (ROCSizeInY + 1) * pitch_simY_)) - column = ROCSizeInY - 1; - else if (y <= (dead_edge_width_ + (ROCSizeInY + 3) * pitch_simY_)) - column = ROCSizeInY; - else if (y <= (dead_edge_width_ + (2 * ROCSizeInY + 1) * pitch_simY_)) - column = int((y - dead_edge_width_ - pitch_simY_) / pitch_simY_) - 1; - else if (y <= (dead_edge_width_ + (2 * ROCSizeInY + 3) * pitch_simY_)) - column = 2 * ROCSizeInY - 1; - else if (y <= (dead_edge_width_ + (2 * ROCSizeInY + 5) * pitch_simY_)) - column = 2 * ROCSizeInY; - else if (y <= (dead_edge_width_ + (3 * ROCSizeInY + 3) * pitch_simY_)) - column = int((y - dead_edge_width_ - pitch_simY_) / pitch_simY_) - 3; - else - column = (3 * ROCSizeInY - 1); - - return column; - } - - inline void rowCol2Index(unsigned int arow, unsigned int acol, unsigned int& index) const { - index = acol * no_of_pixels_simX_ + arow; - } - - inline void index2RowCol(unsigned int& arow, unsigned int& acol, unsigned int index) const { - acol = index / no_of_pixels_simX_; - arow = index % no_of_pixels_simX_; - } -}; - -#endif diff --git a/Geometry/VeryForwardGeometry/interface/CTPPSPixelTopology.h b/Geometry/VeryForwardGeometry/interface/CTPPSPixelTopology.h deleted file mode 100644 index de017c8916949..0000000000000 --- a/Geometry/VeryForwardGeometry/interface/CTPPSPixelTopology.h +++ /dev/null @@ -1,59 +0,0 @@ -#ifndef Geometry_VeryForwardGeometry_CTPPSPixelTopology_h -#define Geometry_VeryForwardGeometry_CTPPSPixelTopology_h - -#include "CondFormats/PPSObjects/interface/CTPPSPixelIndices.h" - -/** - *\brief Geometrical and topological information on RPix silicon detector. - * Uses coordinate a frame with origin in the center of the wafer. - **/ -class CTPPSPixelTopology { -public: - CTPPSPixelTopology() = default; - ~CTPPSPixelTopology() = default; - - static constexpr double pitch_simY_ = 150E-3; - static constexpr double pitch_simX_ = 100E-3; - static constexpr double thickness_ = 0.23; - static constexpr unsigned short no_of_pixels_simX_ = 160; - static constexpr unsigned short no_of_pixels_simY_ = 156; - static constexpr unsigned short no_of_pixels_ = 160 * 156; - static constexpr double simX_width_ = 16.6; - static constexpr double simY_width_ = 24.4; - static constexpr double dead_edge_width_ = 200E-3; - static constexpr double active_edge_sigma_ = 0.02; - static constexpr double phys_active_edge_dist_ = 0.150; - - inline double detPitchSimX() const { return pitch_simX_; } - inline double detPitchSimY() const { return pitch_simY_; } - inline double detThickness() const { return thickness_; } - inline unsigned short detPixelSimXNo() const { return no_of_pixels_simX_; } - inline unsigned short detPixelSimYNo() const { return no_of_pixels_simY_; } - inline unsigned short detPixelNo() const { return no_of_pixels_; } - inline double detXWidth() const { return simX_width_; } - inline double detYWidth() const { return simY_width_; } - inline double detDeadEdgeWidth() const { return dead_edge_width_; } - inline double activeEdgeSigma() const { return active_edge_sigma_; } - inline double physActiveEdgeDist() const { return phys_active_edge_dist_; } - - static bool isPixelHit(float xLocalCoordinate, float yLocalCoordinate, bool is3x2 = true) { - // check hit fiducial boundaries - double xModuleSize = 2 * ((no_of_pixels_simX_ / 2. + 1) * pitch_simX_ + dead_edge_width_); - if (xLocalCoordinate < -xModuleSize / 2. || xLocalCoordinate > xModuleSize / 2.) - return false; - - double yModuleSize = (no_of_pixels_simY_ + 4.) * pitch_simY_ + 2. * dead_edge_width_; - double y2x2top = no_of_pixels_simY_ / 6. * pitch_simY_ + dead_edge_width_; - if (is3x2 && (yLocalCoordinate < -yModuleSize / 2. || yLocalCoordinate > yModuleSize / 2.)) - return false; - - if (!is3x2 && (yLocalCoordinate < -yModuleSize / 2. || yLocalCoordinate > y2x2top)) - return false; - - return true; - } - - CTPPSPixelIndices indices_; -}; - -#endif diff --git a/Geometry/VeryForwardGeometry/src/CTPPSPixelSimTopology.cc b/Geometry/VeryForwardGeometry/src/CTPPSPixelSimTopology.cc deleted file mode 100644 index e671d4ef6d0ee..0000000000000 --- a/Geometry/VeryForwardGeometry/src/CTPPSPixelSimTopology.cc +++ /dev/null @@ -1,31 +0,0 @@ -#include "Geometry/VeryForwardGeometry/interface/CTPPSPixelSimTopology.h" - -CTPPSPixelSimTopology::CTPPSPixelSimTopology() { - active_edge_x_ = simX_width_ * 0.5 - phys_active_edge_dist_; - active_edge_y_ = simY_width_ * 0.5 - phys_active_edge_dist_; -} - -CTPPSPixelSimTopology::PixelInfo CTPPSPixelSimTopology::getPixelsInvolved( - double x, double y, double sigma, double& hit_pos_x, double& hit_pos_y) const { - //hit position wrt the bottom left corner of the sensor (-8.3, -12.2) in sensor view, rocs behind - hit_pos_x = x + simX_width_ / 2.; - hit_pos_y = y + simY_width_ / 2.; - if (!(hit_pos_x * hit_pos_y > 0)) - throw cms::Exception("CTPPSPixelSimTopology") << "out of reference frame"; - - double hit_factor = activeEdgeFactor(x, y); - - unsigned int interested_row = row(x); - unsigned int interested_col = col(y); - double low_pixel_range_x, high_pixel_range_x, low_pixel_range_y, high_pixel_range_y; - pixelRange( - interested_row, interested_col, low_pixel_range_x, high_pixel_range_x, low_pixel_range_y, high_pixel_range_y); - - return CTPPSPixelSimTopology::PixelInfo(low_pixel_range_x, - high_pixel_range_x, - low_pixel_range_y, - high_pixel_range_y, - hit_factor, - interested_row, - interested_col); -} diff --git a/RecoPPS/Configuration/python/recoCTPPS_cff.py b/RecoPPS/Configuration/python/recoCTPPS_cff.py index 8d9d79cab6a0c..dde4ac1fa06d8 100644 --- a/RecoPPS/Configuration/python/recoCTPPS_cff.py +++ b/RecoPPS/Configuration/python/recoCTPPS_cff.py @@ -10,6 +10,7 @@ from RecoPPS.ProtonReconstruction.ctppsProtons_cff import * from Geometry.VeryForwardGeometry.geometryRPFromDB_cfi import * +from CalibPPS.ESProducers.ppsTopology_cff import * recoCTPPSTask = cms.Task( totemRPLocalReconstructionTask , diff --git a/RecoPPS/Local/interface/CTPPSPixelRecHitProducer.h b/RecoPPS/Local/interface/CTPPSPixelRecHitProducer.h index b72db43212d16..ef51d012f860e 100644 --- a/RecoPPS/Local/interface/CTPPSPixelRecHitProducer.h +++ b/RecoPPS/Local/interface/CTPPSPixelRecHitProducer.h @@ -18,6 +18,7 @@ #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "FWCore/Utilities/interface/InputTag.h" +#include "FWCore/Utilities/interface/ESGetToken.h" #include "DataFormats/CTPPSReco/interface/CTPPSPixelCluster.h" #include "DataFormats/CTPPSReco/interface/CTPPSPixelRecHit.h" @@ -26,6 +27,9 @@ #include "DataFormats/CTPPSDetId/interface/CTPPSPixelDetId.h" #include "RecoPPS/Local/interface/RPixClusterToHit.h" +#include "CondFormats/PPSObjects/interface/PPSPixelTopology.h" +#include "CondFormats/DataRecord/interface/PPSPixelTopologyRcd.h" + class CTPPSPixelRecHitProducer : public edm::stream::EDProducer<> { public: explicit CTPPSPixelRecHitProducer(const edm::ParameterSet ¶m); @@ -42,10 +46,13 @@ class CTPPSPixelRecHitProducer : public edm::stream::EDProducer<> { edm::InputTag src_; edm::EDGetTokenT> tokenCTPPSPixelCluster_; + edm::ESGetToken pixelTopologyToken_; RPixClusterToHit cluster2hit_; - void run(const edm::DetSetVector &input, edm::DetSetVector &output); + void run(const edm::DetSetVector &input, + edm::DetSetVector &output, + const PPSPixelTopology &ppt); }; #endif diff --git a/RecoPPS/Local/interface/RPixClusterToHit.h b/RecoPPS/Local/interface/RPixClusterToHit.h index 897f72ba390c4..792b832311e74 100644 --- a/RecoPPS/Local/interface/RPixClusterToHit.h +++ b/RecoPPS/Local/interface/RPixClusterToHit.h @@ -10,7 +10,7 @@ #include "DataFormats/Common/interface/DetSetVector.h" #include "DataFormats/CTPPSReco/interface/CTPPSPixelCluster.h" #include "DataFormats/CTPPSReco/interface/CTPPSPixelRecHit.h" -#include "Geometry/VeryForwardGeometry/interface/CTPPSPixelSimTopology.h" +#include "CondFormats/PPSObjects/interface/PPSPixelTopology.h" class RPixClusterToHit { public: @@ -18,8 +18,9 @@ class RPixClusterToHit { void buildHits(unsigned int detId, const std::vector &clusters, - std::vector &hits); - void make_hit(CTPPSPixelCluster aCluster, std::vector &hits); + std::vector &hits, + const PPSPixelTopology &ppt); + void make_hit(CTPPSPixelCluster aCluster, std::vector &hits, const PPSPixelTopology &ppt); ~RPixClusterToHit(); private: diff --git a/RecoPPS/Local/plugins/CTPPSPixelRecHitProducer.cc b/RecoPPS/Local/plugins/CTPPSPixelRecHitProducer.cc index 537756cd9f755..4def708f819bc 100644 --- a/RecoPPS/Local/plugins/CTPPSPixelRecHitProducer.cc +++ b/RecoPPS/Local/plugins/CTPPSPixelRecHitProducer.cc @@ -5,6 +5,7 @@ CTPPSPixelRecHitProducer::CTPPSPixelRecHitProducer(const edm::ParameterSet &conf verbosity_ = conf.getUntrackedParameter("RPixVerbosity"); tokenCTPPSPixelCluster_ = consumes >(src_); produces >(); + pixelTopologyToken_ = esConsumes(); } CTPPSPixelRecHitProducer::~CTPPSPixelRecHitProducer() {} @@ -20,22 +21,25 @@ void CTPPSPixelRecHitProducer::produce(edm::Event &iEvent, const edm::EventSetup edm::Handle > rpCl; iEvent.getByToken(tokenCTPPSPixelCluster_, rpCl); + edm::ESHandle thePixelTopology = iSetup.getHandle(pixelTopologyToken_); + edm::DetSetVector output; // run reconstruction if (!rpCl->empty()) - run(*rpCl, output); + run(*rpCl, output, *thePixelTopology); iEvent.put(std::make_unique >(output)); } void CTPPSPixelRecHitProducer::run(const edm::DetSetVector &input, - edm::DetSetVector &output) { + edm::DetSetVector &output, + const PPSPixelTopology &ppt) { for (const auto &ds_cluster : input) { edm::DetSet &ds_rechit = output.find_or_insert(ds_cluster.id); //calculate the cluster parameters and convert it into a rechit - cluster2hit_.buildHits(ds_cluster.id, ds_cluster.data, ds_rechit.data); + cluster2hit_.buildHits(ds_cluster.id, ds_cluster.data, ds_rechit.data, ppt); } } diff --git a/RecoPPS/Local/src/RPixClusterToHit.cc b/RecoPPS/Local/src/RPixClusterToHit.cc index c34e00a26dbfb..4171bbc8d5c86 100644 --- a/RecoPPS/Local/src/RPixClusterToHit.cc +++ b/RecoPPS/Local/src/RPixClusterToHit.cc @@ -8,20 +8,20 @@ RPixClusterToHit::~RPixClusterToHit() {} void RPixClusterToHit::buildHits(unsigned int detId, const std::vector &clusters, - std::vector &hits) { + std::vector &hits, + const PPSPixelTopology &ppt) { if (verbosity_) - edm::LogInfo("RPixClusterToHit") << " RPixClusterToHit " << detId - << " received cluster array of size = " << clusters.size(); + edm::LogInfo("PPS") << " RPixClusterToHit " << detId << " received cluster array of size = " << clusters.size(); for (unsigned int i = 0; i < clusters.size(); i++) { - make_hit(clusters[i], hits); + make_hit(clusters[i], hits, ppt); } } -void RPixClusterToHit::make_hit(CTPPSPixelCluster aCluster, std::vector &hits) { +void RPixClusterToHit::make_hit(CTPPSPixelCluster aCluster, + std::vector &hits, + const PPSPixelTopology &ppt) { // take a cluster, generate a rec hit and push it in the rec hit vector - //call the topology - CTPPSPixelSimTopology topology; //call the numbering inside the ROC CTPPSPixelIndices pxlInd; // get information from the cluster @@ -67,18 +67,20 @@ void RPixClusterToHit::make_hit(CTPPSPixelCluster aCluster, std::vector -#include "Geometry/VeryForwardGeometry/interface/CTPPSPixelSimTopology.h" +#include "CondFormats/PPSObjects/interface/PPSPixelTopology.h" #include "SimPPS/PPSPixelDigiProducer/interface/RPixSignalPoint.h" class RPixChargeShare { public: - RPixChargeShare(const edm::ParameterSet ¶ms, uint32_t det_id); - std::map Share(const std::vector &charge_map); + RPixChargeShare(const edm::ParameterSet ¶ms, uint32_t det_id, const PPSPixelTopology &ppt); + std::map Share(const std::vector &charge_map, const PPSPixelTopology &ppt); private: uint32_t det_id_; std::vector signalCoupling_; - CTPPSPixelSimTopology theRPixDetTopology_; CTPPSPixelIndices pxlInd; const int pxlRowSize_ = pxlInd.getDefaultRowDetSize(); const int pxlColSize_ = pxlInd.getDefaultColDetSize(); diff --git a/SimPPS/PPSPixelDigiProducer/interface/RPixDetDigitizer.h b/SimPPS/PPSPixelDigiProducer/interface/RPixDetDigitizer.h index 35f2e7dc18ddf..b92fb529f858b 100644 --- a/SimPPS/PPSPixelDigiProducer/interface/RPixDetDigitizer.h +++ b/SimPPS/PPSPixelDigiProducer/interface/RPixDetDigitizer.h @@ -2,9 +2,6 @@ #define SimPPS_PPSPixelDigiProducer_RPix_DET_DIGITIZER_H #include "SimDataFormats/TrackingHit/interface/PSimHit.h" -#include -#include - #include "SimTracker/Common/interface/SiG4UniversalFluctuation.h" #include "SimGeneral/NoiseGenerators/interface/GaussianTailNoiseGenerator.h" @@ -17,6 +14,7 @@ #include "DataFormats/CTPPSDigi/interface/CTPPSPixelDigi.h" #include "DataFormats/CTPPSDigi/interface/CTPPSPixelDigiCollection.h" +#include "CondFormats/PPSObjects/interface/PPSPixelTopology.h" #include "SimPPS/PPSPixelDigiProducer/interface/RPixPileUpSignals.h" @@ -32,13 +30,14 @@ class RPixDetDigitizer { RPixDetDigitizer(const edm::ParameterSet ¶ms, CLHEP::HepRandomEngine &eng, uint32_t det_id, - const edm::EventSetup &iSetup); + const PPSPixelTopology &ppt); void run(const std::vector &input, const std::vector &input_links, std::vector &output_digi, std::vector > > &output_digi_links, - const CTPPSPixelGainCalibrations *pcalibration); + const CTPPSPixelGainCalibrations *pcalibration, + const PPSPixelTopology *ppt); ~RPixDetDigitizer(); @@ -47,7 +46,6 @@ class RPixDetDigitizer { std::unique_ptr theRPixHitChargeConverter; std::unique_ptr theRPixDummyROCSimulator; - int numPixels; double theNoiseInElectrons; // Noise (RMS) in units of electrons. double thePixelThresholdInE; // Pixel noise treshold in electorns. bool noNoise; //if the nos is included diff --git a/SimPPS/PPSPixelDigiProducer/interface/RPixDummyROCSimulator.h b/SimPPS/PPSPixelDigiProducer/interface/RPixDummyROCSimulator.h index 4160a4a936a07..350919310f643 100644 --- a/SimPPS/PPSPixelDigiProducer/interface/RPixDummyROCSimulator.h +++ b/SimPPS/PPSPixelDigiProducer/interface/RPixDummyROCSimulator.h @@ -31,7 +31,6 @@ class RPixDummyROCSimulator { bool dead_pixels_simulation_on_; dead_pixel_set dead_pixels_; int verbosity_; - unsigned short pixels_no_; double threshold_; double electron_per_adc_; int VcaltoElectronGain_; diff --git a/SimPPS/PPSPixelDigiProducer/interface/RPixHitChargeConverter.h b/SimPPS/PPSPixelDigiProducer/interface/RPixHitChargeConverter.h index 10c5405de1b4e..890dea4a73cb1 100644 --- a/SimPPS/PPSPixelDigiProducer/interface/RPixHitChargeConverter.h +++ b/SimPPS/PPSPixelDigiProducer/interface/RPixHitChargeConverter.h @@ -5,13 +5,17 @@ #include "SimPPS/PPSPixelDigiProducer/interface/RPixLinearChargeCollectionDrifter.h" #include "SimPPS/PPSPixelDigiProducer/interface/RPixLinearChargeDivider.h" #include "SimPPS/PPSPixelDigiProducer/interface/RPixChargeShare.h" +#include "CondFormats/PPSObjects/interface/PPSPixelTopology.h" class RPixHitChargeConverter { public: - RPixHitChargeConverter(const edm::ParameterSet ¶ms_, CLHEP::HepRandomEngine &eng, uint32_t det_id); + RPixHitChargeConverter(const edm::ParameterSet ¶ms_, + CLHEP::HepRandomEngine &eng, + uint32_t det_id, + const PPSPixelTopology &ppt); ~RPixHitChargeConverter() = default; - std::map processHit(const PSimHit &hit); + std::map processHit(const PSimHit &hit, const PPSPixelTopology &ppt); private: const uint32_t det_id_; diff --git a/SimPPS/PPSPixelDigiProducer/interface/RPixLinearChargeCollectionDrifter.h b/SimPPS/PPSPixelDigiProducer/interface/RPixLinearChargeCollectionDrifter.h index f1ddc6d9362b3..979b1e8a412e9 100644 --- a/SimPPS/PPSPixelDigiProducer/interface/RPixLinearChargeCollectionDrifter.h +++ b/SimPPS/PPSPixelDigiProducer/interface/RPixLinearChargeCollectionDrifter.h @@ -4,10 +4,11 @@ #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "SimPPS/PPSPixelDigiProducer/interface/RPixSignalPoint.h" #include "SimPPS/PPSPixelDigiProducer/interface/RPixEnergyDepositUnit.h" +#include "CondFormats/PPSObjects/interface/PPSPixelTopology.h" class RPixLinearChargeCollectionDrifter { public: - RPixLinearChargeCollectionDrifter(const edm::ParameterSet ¶ms, uint32_t det_id); + RPixLinearChargeCollectionDrifter(const edm::ParameterSet ¶ms, uint32_t det_id, const PPSPixelTopology &ppt); std::vector Drift(const std::vector &energy_deposition); private: diff --git a/SimPPS/PPSPixelDigiProducer/plugins/PPSPixelDigiAnalyzer.cc b/SimPPS/PPSPixelDigiProducer/plugins/PPSPixelDigiAnalyzer.cc index 02198a1c4eab0..c151d7ecabfc0 100644 --- a/SimPPS/PPSPixelDigiProducer/plugins/PPSPixelDigiAnalyzer.cc +++ b/SimPPS/PPSPixelDigiProducer/plugins/PPSPixelDigiAnalyzer.cc @@ -10,7 +10,6 @@ #include "SimDataFormats/TrackingHit/interface/PSimHit.h" #include "DataFormats/CTPPSDigi/interface/CTPPSPixelDigi.h" #include "DataFormats/CTPPSDigi/interface/CTPPSPixelDigiCollection.h" -#include "Geometry/VeryForwardGeometry/interface/CTPPSPixelSimTopology.h" #include "SimDataFormats/CrossingFrame/interface/CrossingFrame.h" #include "SimDataFormats/CrossingFrame/interface/MixCollection.h" @@ -21,6 +20,8 @@ #include #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "DataFormats/GeometryVector/interface/LocalPoint.h" +#include "CondFormats/PPSObjects/interface/PPSPixelTopology.h" +#include "CondFormats/DataRecord/interface/PPSPixelTopologyRcd.h" #include #include @@ -67,8 +68,8 @@ class PPSPixelDigiAnalyzer : public edm::one::EDAnalyzer psim_token; edm::EDGetTokenT> pixel_token; + edm::ESGetToken pixelTopologyToken_; - CTPPSPixelSimTopology theRPixDetTopology_; unsigned int found_corresponding_digi_count_; unsigned int cumulative_cluster_size_[3]; }; @@ -78,8 +79,7 @@ PPSPixelDigiAnalyzer::PPSPixelDigiAnalyzer(const ParameterSet &pset) hOneHitperEvent(nullptr), hOneHitperEvent2(nullptr), hOneHitperEventCenter(nullptr), - hOneHitperEvent2Center(nullptr), - theRPixDetTopology_() { + hOneHitperEvent2Center(nullptr) { label_ = pset.getUntrackedParameter("label"); verbosity_ = pset.getParameter("Verbosity"); edm::Service file; @@ -99,6 +99,7 @@ PPSPixelDigiAnalyzer::PPSPixelDigiAnalyzer(const ParameterSet &pset) psim_token = consumes(edm::InputTag("g4SimHits", "CTPPSPixelHits")); pixel_token = consumes>(edm::InputTag(label_, "")); //label=RPixDetDigitizer??? + pixelTopologyToken_ = esConsumes(); } PPSPixelDigiAnalyzer::~PPSPixelDigiAnalyzer() {} @@ -126,6 +127,8 @@ void PPSPixelDigiAnalyzer::analyze(const Event &event, const EventSetup &eventSe edm::Handle> CTPPSPixelDigis; event.getByToken(pixel_token, CTPPSPixelDigis); + edm::ESHandle thePixelTopology = eventSetup.getHandle(pixelTopologyToken_); + if (verbosity_ > 0) edm::LogInfo("PPSPixelDigiAnalyzer") << "\n=================== RPDA Starting SimHit access" << " ==================="; @@ -140,12 +143,12 @@ void PPSPixelDigiAnalyzer::analyze(const Event &event, const EventSetup &eventSe double myX = 0; double myY = 0; - theRPixDetTopology_.pixelRange(SELECTED_PIXEL_ROW, - SELECTED_PIXEL_COLUMN, - selected_pixel_lower_x, - selected_pixel_upper_x, - selected_pixel_lower_y, - selected_pixel_upper_y); + thePixelTopology->pixelRange(SELECTED_PIXEL_ROW, + SELECTED_PIXEL_COLUMN, + selected_pixel_lower_x, + selected_pixel_upper_x, + selected_pixel_lower_y, + selected_pixel_upper_y); double hit_inside_selected_pixel[2]; bool found_hit_inside_selected_pixel = false; @@ -229,7 +232,7 @@ void PPSPixelDigiAnalyzer::analyze(const Event &event, const EventSetup &eventSe double uy; unsigned int rr = di->row(); unsigned int cc = di->column(); - theRPixDetTopology_.pixelRange(rr, cc, lx, ux, ly, uy); + thePixelTopology->pixelRange(rr, cc, lx, ux, ly, uy); edm::LogInfo("PPSPixelDigiAnalyzer") << " pixel boundaries x low up, y low up " << lx << " " << ux << " " << ly << " " << uy; diff --git a/SimPPS/PPSPixelDigiProducer/plugins/PPSPixelDigiProducer.cc b/SimPPS/PPSPixelDigiProducer/plugins/PPSPixelDigiProducer.cc index cd565ed49ea1c..88fd33fe8b5ce 100644 --- a/SimPPS/PPSPixelDigiProducer/plugins/PPSPixelDigiProducer.cc +++ b/SimPPS/PPSPixelDigiProducer/plugins/PPSPixelDigiProducer.cc @@ -52,6 +52,8 @@ #include "CondFormats/PPSObjects/interface/CTPPSPixelAnalysisMask.h" #include "CondFormats/PPSObjects/interface/CTPPSPixelGainCalibrations.h" +#include "CondFormats/PPSObjects/interface/PPSPixelTopology.h" +#include "CondFormats/DataRecord/interface/PPSPixelTopologyRcd.h" // user include files #include "SimDataFormats/TrackingHit/interface/PSimHitContainer.h" #include "SimDataFormats/TrackingHit/interface/PSimHit.h" @@ -97,10 +99,11 @@ class CTPPSPixelDigiProducer : public edm::stream::EDProducer<> { edm::EDGetTokenT> tokenCrossingFramePPSPixel; edm::ESGetToken gainCalibESToken_; + edm::ESGetToken thePixelTopologyToken_; }; CTPPSPixelDigiProducer::CTPPSPixelDigiProducer(const edm::ParameterSet& conf) - : conf_(conf), gainCalibESToken_(esConsumes()) { + : conf_(conf), gainCalibESToken_(esConsumes()), thePixelTopologyToken_(esConsumes()) { produces>(); // register data to consume @@ -151,24 +154,18 @@ void CTPPSPixelDigiProducer::fillDescriptions(edm::ConfigurationDescriptions& de desc.add("RPixDeadPixelProbability", 0.001); desc.add("RPixDeadPixelSimulationOn", true); - // CTPPSPixelSimTopology - desc.add("RPixActiveEdgeSmearing", 0.020); - desc.add("RPixActiveEdgePosition", 0.150); - desc.add("mixLabel", "mix"); desc.add("InputCollection", "g4SimHitsCTPPSPixelHits"); descriptions.add("RPixDetDigitizer", desc); } -// // member functions // // ------------ method called to produce the data ------------ void CTPPSPixelDigiProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) { - using namespace edm; if (!rndEngine_) { - Service rng; + edm::Service rng; if (!rng.isAvailable()) { throw cms::Exception("Configuration") << "This class requires the RandomNumberGeneratorService\n" @@ -180,6 +177,7 @@ void CTPPSPixelDigiProducer::produce(edm::Event& iEvent, const edm::EventSetup& // get calibration DB const auto& gainCalibration = iSetup.getData(gainCalibESToken_); + const auto& thePixelTopology = iSetup.getData(thePixelTopologyToken_); // Step A: Get Inputs edm::Handle> cf; @@ -187,20 +185,19 @@ void CTPPSPixelDigiProducer::produce(edm::Event& iEvent, const edm::EventSetup& iEvent.getByToken(tokenCrossingFramePPSPixel, cf); if (verbosity_) { - edm::LogInfo("PPSPixelDigiProducer") << "\n\n=================== Starting SimHit access" - << " ==================="; + edm::LogInfo("PPS") << "PixelDigiProducer \n\n=================== Starting SimHit access" + << " ==================="; MixCollection col{cf.product(), std::pair(-0, 0)}; - edm::LogInfo("PPSPixelDigiProducer") << col; MixCollection::iterator cfi; int count = 0; for (cfi = col.begin(); cfi != col.end(); cfi++) { - edm::LogInfo("PPSPixelDigiProducer") - << " Hit " << count << " has tof " << cfi->timeOfFlight() << " trackid " << cfi->trackId() << " bunchcr " - << cfi.bunch() << " trigger " << cfi.getTrigger() - << ", from EncodedEventId: " << cfi->eventId().bunchCrossing() << " " << cfi->eventId().event() - << " bcr from MixCol " << cfi.bunch(); - edm::LogInfo("PPSPixelDigiProducer") << " Hit: " << (*cfi) << " " << cfi->exitPoint(); + edm::LogInfo("PPS") << "PixelDigiProducer" + << " Hit " << count << " has tof " << cfi->timeOfFlight() << " trackid " << cfi->trackId() + << " bunchcr " << cfi.bunch() << " trigger " << cfi.getTrigger() + << ", from EncodedEventId: " << cfi->eventId().bunchCrossing() << " " + << cfi->eventId().event() << " bcr from MixCol " << cfi.bunch(); + edm::LogInfo("PPS") << " PixelDigiProducer Hit: " << (*cfi) << " " << cfi->exitPoint(); count++; } } @@ -208,7 +205,7 @@ void CTPPSPixelDigiProducer::produce(edm::Event& iEvent, const edm::EventSetup& MixCollection allRPixHits{cf.product(), std::pair(0, 0)}; if (verbosity_) - edm::LogInfo("PPSPixelDigiProducer") << "Input MixCollection size = " << allRPixHits.size(); + edm::LogInfo("PPS") << "PixelDigiProducer Input MixCollection size = " << allRPixHits.size(); //Loop on PSimHit simhit_map SimHitMap; @@ -228,15 +225,15 @@ void CTPPSPixelDigiProducer::produce(edm::Event& iEvent, const edm::EventSetup& edm::DetSet digi_collector(it->first); if (theAlgoMap.find(it->first) == theAlgoMap.end()) { - theAlgoMap[it->first] = - std::make_unique(conf_, *rndEngine_, it->first, iSetup); //a digitizer for eny detector + theAlgoMap[it->first] = std::make_unique( + conf_, *rndEngine_, it->first, thePixelTopology); //a digitizer for any detector } std::vector input_links; std::vector>> output_digi_links; // links to simhits theAlgoMap.at(it->first)->run( - SimHitMap[it->first], input_links, digi_collector.data, output_digi_links, &gainCalibration); + SimHitMap[it->first], input_links, digi_collector.data, output_digi_links, &gainCalibration, &thePixelTopology); if (!digi_collector.data.empty()) { theDigiVector.push_back(digi_collector); @@ -246,7 +243,7 @@ void CTPPSPixelDigiProducer::produce(edm::Event& iEvent, const edm::EventSetup& std::unique_ptr> digi_output(new edm::DetSetVector(theDigiVector)); if (verbosity_) { - edm::LogInfo("PPSPixelDigiProducer") << "digi_output->size()=" << digi_output->size(); + edm::LogInfo("PPS") << "PixelDigiProducer digi_output->size()=" << digi_output->size(); } iEvent.put(std::move(digi_output)); diff --git a/SimPPS/PPSPixelDigiProducer/plugins/RPixDetDigitizer.cc b/SimPPS/PPSPixelDigiProducer/plugins/RPixDetDigitizer.cc index a948f0901d5a6..bda00bd4f7599 100644 --- a/SimPPS/PPSPixelDigiProducer/plugins/RPixDetDigitizer.cc +++ b/SimPPS/PPSPixelDigiProducer/plugins/RPixDetDigitizer.cc @@ -1,16 +1,11 @@ -#include -#include -#include "FWCore/ParameterSet/interface/ParameterSet.h" #include "SimPPS/PPSPixelDigiProducer/interface/RPixDetDigitizer.h" -#include "Geometry/VeryForwardGeometry/interface/CTPPSPixelTopology.h" RPixDetDigitizer::RPixDetDigitizer(const edm::ParameterSet ¶ms, CLHEP::HepRandomEngine &eng, uint32_t det_id, - const edm::EventSetup &iSetup) + const PPSPixelTopology &ppt) : det_id_(det_id) { verbosity_ = params.getParameter("RPixVerbosity"); - numPixels = CTPPSPixelTopology().detPixelNo(); theNoiseInElectrons = params.getParameter("RPixEquivalentNoiseCharge"); thePixelThresholdInE = params.getParameter("RPixDummyROCThreshold"); noNoise = params.getParameter("RPixNoNoise"); @@ -19,7 +14,7 @@ RPixDetDigitizer::RPixDetDigitizer(const edm::ParameterSet ¶ms, theRPixPileUpSignals = std::make_unique(params, det_id_); theRPixDummyROCSimulator = std::make_unique(params, det_id_); - theRPixHitChargeConverter = std::make_unique(params, eng, det_id_); + theRPixHitChargeConverter = std::make_unique(params, eng, det_id_, ppt); } RPixDetDigitizer::~RPixDetDigitizer() {} @@ -28,18 +23,19 @@ void RPixDetDigitizer::run(const std::vector &input, const std::vector &input_links, std::vector &output_digi, std::vector > > &output_digi_links, - const CTPPSPixelGainCalibrations *pcalibrations) { + const CTPPSPixelGainCalibrations *pcalibrations, + const PPSPixelTopology *pixelTopology) { if (verbosity_) - edm::LogInfo("RPixDetDigitizer") << det_id_ << " received input.size()=" << input.size(); + edm::LogInfo("PPS") << "RPixDetDigitizer " << det_id_ << " received input.size()=" << input.size(); theRPixPileUpSignals->reset(); bool links_persistence_checked = links_persistence_ && input_links.size() == input.size(); int input_size = input.size(); for (int i = 0; i < input_size; ++i) { std::map the_pixel_charge_map; - the_pixel_charge_map = theRPixHitChargeConverter->processHit(input[i]); + the_pixel_charge_map = theRPixHitChargeConverter->processHit(input[i], *pixelTopology); if (verbosity_) - edm::LogInfo("RPixDetDigitizer") << det_id_ << " returned hits=" << the_pixel_charge_map.size(); + edm::LogInfo("PPS") << "RPixDetDigitizer " << det_id_ << " returned hits=" << the_pixel_charge_map.size(); if (links_persistence_checked) theRPixPileUpSignals->add(the_pixel_charge_map, input_links[i]); else diff --git a/SimPPS/PPSPixelDigiProducer/src/RPixChargeShare.cc b/SimPPS/PPSPixelDigiProducer/src/RPixChargeShare.cc index bae137e74bf1b..523d0a07f6f0b 100644 --- a/SimPPS/PPSPixelDigiProducer/src/RPixChargeShare.cc +++ b/SimPPS/PPSPixelDigiProducer/src/RPixChargeShare.cc @@ -3,8 +3,8 @@ #include #include -RPixChargeShare::RPixChargeShare(const edm::ParameterSet ¶ms, uint32_t det_id) - : det_id_(det_id), theRPixDetTopology_() { +RPixChargeShare::RPixChargeShare(const edm::ParameterSet ¶ms, uint32_t det_id, const PPSPixelTopology &ppt) + : det_id_(det_id) { verbosity_ = params.getParameter("RPixVerbosity"); signalCoupling_.clear(); ChargeMapFile2E_[0] = params.getParameter("ChargeMapFile2E"); @@ -17,7 +17,7 @@ RPixChargeShare::RPixChargeShare(const edm::ParameterSet ¶ms, uint32_t det_i signalCoupling_.push_back(coupling_constant_); signalCoupling_.push_back((1.0 - coupling_constant_) / 2); - no_of_pixels_ = theRPixDetTopology_.detPixelNo(); + no_of_pixels_ = ppt.getNoPixels(); double xMap, yMap; double chargeprobcollect; @@ -39,12 +39,13 @@ RPixChargeShare::RPixChargeShare(const edm::ParameterSet ¶ms, uint32_t det_i } } -std::map RPixChargeShare::Share(const std::vector &charge_map) { +std::map RPixChargeShare::Share(const std::vector &charge_map, + const PPSPixelTopology &ppt) { std::map thePixelChargeMap; if (verbosity_ > 1) - edm::LogInfo("RPixChargeShare") << det_id_ << " : Clouds to be induced= " << charge_map.size(); + edm::LogInfo("PPS") << "RPixChargeShare " << det_id_ << " : Clouds to be induced= " << charge_map.size(); - double CH = 0; + double cH = 0; for (std::vector::const_iterator i = charge_map.begin(); i != charge_map.end(); ++i) { double hit_pos_x, hit_pos_y; @@ -52,31 +53,32 @@ std::map RPixChargeShare::Share(const std::vector 16.6) { edm::LogInfo("RPixChargeShare") << "**** Attention ((*i).Position().x()+simX_width_/2.)<0||((*i).Position().x()+simX_width_/2.)>simX_width "; - edm::LogInfo("RPixChargeShare") << "(*i).Position().x() = " << (*i).Position().x(); + edm::LogInfo("PPS") << "RPixChargeShare " + << "(*i).Position().x() = " << (*i).Position().x(); continue; } if (((*i).Position().y() + 24.4 / 2.) < 0 || ((*i).Position().y() + 24.4 / 2.) > 24.4) { edm::LogInfo("RPixChargeShare") << "**** Attention ((*i).Position().y()+simY_width_/2.)<0||((*i).Position().y()+simY_width_/2.)>simY_width "; - edm::LogInfo("RPixChargeShare") << "(*i).Position().y() = " << (*i).Position().y(); + edm::LogInfo("PPS") << "RPixChargeShare " + << "(*i).Position().y() = " << (*i).Position().y(); continue; } - CTPPSPixelSimTopology::PixelInfo relevant_pixels = theRPixDetTopology_.getPixelsInvolved( - (*i).Position().x(), (*i).Position().y(), (*i).Sigma(), hit_pos_x, hit_pos_y); + PPSPixelTopology::PixelInfo relevant_pixels = + ppt.getPixelsInvolved((*i).Position().x(), (*i).Position().y(), (*i).Sigma(), hit_pos_x, hit_pos_y); double effic = relevant_pixels.effFactor(); - unsigned short pixel_no = relevant_pixels.pixelIndex(); + unsigned short pixel_no = ppt.pixelIndex(relevant_pixels); double charge_in_pixel = (*i).Charge() * effic; - CH += charge_in_pixel; + cH += charge_in_pixel; if (verbosity_ > 1) - edm::LogInfo("RPixChargeShare") << "Efficiency in detector " << det_id_ << " and pixel no " << pixel_no << " : " - << effic << " ch: " << charge_in_pixel << " CHtot: " << CH; - - // QUI SI POTREBBE INTRODURRE IL CHARGE SHARING TRA I PIXELS .................................. + edm::LogInfo("PPS") << "RPixChargeShare " + << "Efficiency in detector " << det_id_ << " and pixel no " << pixel_no << " : " << effic + << " ch: " << charge_in_pixel << " CHtot: " << cH; if (signalCoupling_[0] == 0.) { thePixelChargeMap[pixel_no] += charge_in_pixel; @@ -88,7 +90,7 @@ std::map RPixChargeShare::Share(const std::vector RPixChargeShare::Share(const std::vector #include "TRandom.h" #include @@ -12,7 +11,6 @@ RPixDummyROCSimulator::RPixDummyROCSimulator(const edm::ParameterSet ¶ms, ui doSingleCalibration_ = params.getParameter("doSingleCalibration"); dead_pixel_probability_ = params.getParameter("RPixDeadPixelProbability"); dead_pixels_simulation_on_ = params.getParameter("RPixDeadPixelSimulationOn"); - pixels_no_ = CTPPSPixelTopology().detPixelNo(); verbosity_ = params.getParameter("RPixVerbosity"); links_persistence_ = params.getParameter("CTPPSPixelDigiSimHitRelationsPersistence"); } @@ -27,7 +25,8 @@ void RPixDummyROCSimulator::ConvertChargeToHits( //one threshold per hybrid unsigned short pixel_no = i->first; if (verbosity_) - edm::LogInfo("RPixDummyROCSimulator") << "Dummy ROC adc and threshold : " << i->second << ", " << threshold_; + edm::LogInfo("PPS") << "RPixDummyROCSimulator " + << "Dummy ROC adc and threshold : " << i->second << ", " << threshold_; if (i->second > threshold_ && (!dead_pixels_simulation_on_ || dead_pixels_.find(pixel_no) == dead_pixels_.end())) { float gain = 0; float pedestal = 0; @@ -59,10 +58,12 @@ void RPixDummyROCSimulator::ConvertChargeToHits( if (links_persistence_) { output_digi_links.push_back(theSignalProvenance[pixel_no]); if (verbosity_) { - edm::LogInfo("RPixDummyROCSimulator") << "digi links size=" << theSignalProvenance[pixel_no].size(); + edm::LogInfo("PPS") << "RPixDummyROCSimulator " + << "digi links size=" << theSignalProvenance[pixel_no].size(); for (unsigned int u = 0; u < theSignalProvenance[pixel_no].size(); ++u) { - edm::LogInfo("RPixDummyROCSimulator") << " digi: particle=" << theSignalProvenance[pixel_no][u].first - << " energy [electrons]=" << theSignalProvenance[pixel_no][u].second; + edm::LogInfo("PPS") << "RPixDummyROCSimulator " + << " digi: particle=" << theSignalProvenance[pixel_no][u].first + << " energy [electrons]=" << theSignalProvenance[pixel_no][u].second; } } } diff --git a/SimPPS/PPSPixelDigiProducer/src/RPixHitChargeConverter.cc b/SimPPS/PPSPixelDigiProducer/src/RPixHitChargeConverter.cc index b451d617faa40..deec914cb1b34 100644 --- a/SimPPS/PPSPixelDigiProducer/src/RPixHitChargeConverter.cc +++ b/SimPPS/PPSPixelDigiProducer/src/RPixHitChargeConverter.cc @@ -1,22 +1,20 @@ #include "SimPPS/PPSPixelDigiProducer/interface/RPixHitChargeConverter.h" -#include "DataFormats/GeometryVector/interface/LocalPoint.h" -#include "SimPPS/PPSPixelDigiProducer/interface/RPixLinearChargeDivider.h" -#include "SimPPS/PPSPixelDigiProducer/interface/RPixLinearChargeCollectionDrifter.h" -#include "SimPPS/PPSPixelDigiProducer/interface/RPixChargeShare.h" RPixHitChargeConverter::RPixHitChargeConverter(const edm::ParameterSet ¶ms, CLHEP::HepRandomEngine &eng, - uint32_t det_id) + uint32_t det_id, + const PPSPixelTopology &ppt) : det_id_(det_id) { verbosity_ = params.getParameter("RPixVerbosity"); theRPixChargeDivider = std::make_unique(params, eng, det_id); - theRPixChargeCollectionDrifter = std::make_unique(params, det_id); - theRPixChargeShare = std::make_unique(params, det_id); + theRPixChargeCollectionDrifter = std::make_unique(params, det_id, ppt); + theRPixChargeShare = std::make_unique(params, det_id, ppt); } -std::map RPixHitChargeConverter::processHit(const PSimHit &hit) { +std::map RPixHitChargeConverter::processHit(const PSimHit &hit, const PPSPixelTopology &ppt) { std::vector ions_along_path = theRPixChargeDivider->divide(hit); if (verbosity_) - edm::LogInfo("RPixHitChargeConverter") << det_id_ << " clouds no generated on the path=" << ions_along_path.size(); - return theRPixChargeShare->Share(theRPixChargeCollectionDrifter->Drift(ions_along_path)); + edm::LogInfo("PPS") << "RPixHitChargeConverter " << det_id_ + << " clouds no generated on the path=" << ions_along_path.size(); + return theRPixChargeShare->Share(theRPixChargeCollectionDrifter->Drift(ions_along_path), ppt); } diff --git a/SimPPS/PPSPixelDigiProducer/src/RPixLinearChargeCollectionDrifter.cc b/SimPPS/PPSPixelDigiProducer/src/RPixLinearChargeCollectionDrifter.cc index ecfd92ccd97d0..a28df9920fe4c 100644 --- a/SimPPS/PPSPixelDigiProducer/src/RPixLinearChargeCollectionDrifter.cc +++ b/SimPPS/PPSPixelDigiProducer/src/RPixLinearChargeCollectionDrifter.cc @@ -1,14 +1,13 @@ #include "SimPPS/PPSPixelDigiProducer/interface/RPixLinearChargeCollectionDrifter.h" -#include "Geometry/VeryForwardGeometry/interface/CTPPSPixelTopology.h" -#include -#include -RPixLinearChargeCollectionDrifter::RPixLinearChargeCollectionDrifter(const edm::ParameterSet ¶ms, uint32_t det_id) { +RPixLinearChargeCollectionDrifter::RPixLinearChargeCollectionDrifter(const edm::ParameterSet ¶ms, + uint32_t det_id, + const PPSPixelTopology &ppt) { verbosity_ = params.getParameter("RPixVerbosity"); GeV_per_electron_ = params.getParameter("RPixGeVPerElectron"); charge_cloud_sigmas_vect_ = params.getParameter >("RPixInterSmearing"); - det_thickness_ = CTPPSPixelTopology().detThickness(); + det_thickness_ = ppt.getThickness(); det_id_ = det_id; } @@ -21,8 +20,8 @@ std::vector RPixLinearChargeCollectionDrifter::Drift( temp_[i].setSigma(getSigma_(energy_deposition[i].Position().z())); temp_[i].setCharge(energy_deposition[i].Energy() / GeV_per_electron_); if (verbosity_ > 1) { - edm::LogInfo("RPixLinearChargeCollectionDrifter") - << det_id_ << " :" << temp_[i].Position() << " " << temp_[i].Sigma() << " " << temp_[i].Charge(); + edm::LogInfo("PPS") << "RPixLinearChargeCollectionDrifter " << det_id_ << " :" << temp_[i].Position() << " " + << temp_[i].Sigma() << " " << temp_[i].Charge(); } } return temp_; diff --git a/SimPPS/PPSPixelDigiProducer/src/RPixLinearChargeDivider.cc b/SimPPS/PPSPixelDigiProducer/src/RPixLinearChargeDivider.cc index 734913db29755..000b7a691ef38 100644 --- a/SimPPS/PPSPixelDigiProducer/src/RPixLinearChargeDivider.cc +++ b/SimPPS/PPSPixelDigiProducer/src/RPixLinearChargeDivider.cc @@ -1,7 +1,7 @@ #include "SimPPS/PPSPixelDigiProducer/interface/RPixLinearChargeDivider.h" +#include "FWCore/MessageLogger/interface/MessageLogger.h" #include "DataFormats/GeometryVector/interface/LocalPoint.h" #include "DataFormats/GeometryVector/interface/LocalVector.h" -#include "Geometry/VeryForwardGeometry/interface/CTPPSPixelTopology.h" RPixLinearChargeDivider::RPixLinearChargeDivider(const edm::ParameterSet& params, CLHEP::HepRandomEngine& eng, @@ -45,7 +45,7 @@ std::vector RPixLinearChargeDivider::divide(const PSimHit } if (verbosity_) { - edm::LogInfo("RPixLinearChargeDivider") << det_id_ << " charge along the track:"; + edm::LogInfo("PPS") << "RPixLinearChargeDivider " << det_id_ << " charge along the track:"; double sum = 0; for (unsigned int i = 0; i < the_energy_path_distribution_.size(); i++) { edm::LogInfo("RPixLinearChargeDivider") @@ -53,7 +53,8 @@ std::vector RPixLinearChargeDivider::divide(const PSimHit << " " << the_energy_path_distribution_[i].Position().z() << " " << the_energy_path_distribution_[i].Energy(); sum += the_energy_path_distribution_[i].Energy(); } - edm::LogInfo("RPixLinearChargeDivider") << "energy dep. sum=" << sum; + edm::LogInfo("PPS") << "RPixLinearChargeDivider " + << "energy dep. sum=" << sum; } return the_energy_path_distribution_; diff --git a/Validation/CTPPS/plugins/CTPPSDirectProtonSimulation.cc b/Validation/CTPPS/plugins/CTPPSDirectProtonSimulation.cc index 9d0861a65e4f4..5201410d0d380 100644 --- a/Validation/CTPPS/plugins/CTPPSDirectProtonSimulation.cc +++ b/Validation/CTPPS/plugins/CTPPSDirectProtonSimulation.cc @@ -41,7 +41,8 @@ #include "Geometry/VeryForwardGeometryBuilder/interface/CTPPSGeometry.h" #include "Geometry/Records/interface/VeryForwardMisalignedGeometryRecord.h" #include "Geometry/VeryForwardRPTopology/interface/RPTopology.h" -#include "Geometry/VeryForwardGeometry/interface/CTPPSPixelTopology.h" +#include "CondFormats/PPSObjects/interface/PPSPixelTopology.h" +#include "CondFormats/DataRecord/interface/PPSPixelTopologyRcd.h" #include "FWCore/ServiceRegistry/interface/Service.h" #include "FWCore/Utilities/interface/RandomNumberGenerator.h" @@ -76,6 +77,7 @@ class CTPPSDirectProtonSimulation : public edm::stream::EDProducer<> { const CTPPSGeometry &geometry, const LHCInfo &lhcInfo, const CTPPSBeamParameters &beamParameters, + const PPSPixelTopology &ppt, const LHCInterpolatedOpticalFunctionsSetCollection &opticalFunctions, CLHEP::HepRandomEngine *rndEngine, @@ -94,6 +96,7 @@ class CTPPSDirectProtonSimulation : public edm::stream::EDProducer<> { // conditions edm::ESGetToken tokenLHCInfo_; edm::ESGetToken tokenBeamParameters_; + edm::ESGetToken pixelTopologyToken_; edm::ESGetToken tokenOpticalFunctions_; edm::ESGetToken tokenGeometry_; edm::ESGetToken tokenDirectSimuData_; @@ -142,6 +145,7 @@ class CTPPSDirectProtonSimulation : public edm::stream::EDProducer<> { CTPPSDirectProtonSimulation::CTPPSDirectProtonSimulation(const edm::ParameterSet &iConfig) : tokenLHCInfo_(esConsumes(edm::ESInputTag{"", iConfig.getParameter("lhcInfoLabel")})), tokenBeamParameters_(esConsumes()), + pixelTopologyToken_(esConsumes()), tokenOpticalFunctions_(esConsumes(edm::ESInputTag{"", iConfig.getParameter("opticsLabel")})), tokenGeometry_(esConsumes()), tokenDirectSimuData_(esConsumes()), @@ -221,6 +225,7 @@ void CTPPSDirectProtonSimulation::produce(edm::Event &iEvent, const edm::EventSe // get conditions auto const &lhcInfo = iSetup.getData(tokenLHCInfo_); auto const &beamParameters = iSetup.getData(tokenBeamParameters_); + auto const &ppt = iSetup.getData(pixelTopologyToken_); auto const &opticalFunctions = iSetup.getData(tokenOpticalFunctions_); auto const &geometry = iSetup.getData(tokenGeometry_); auto const &directSimuData = iSetup.getData(tokenDirectSimuData_); @@ -283,6 +288,7 @@ void CTPPSDirectProtonSimulation::produce(edm::Event &iEvent, const edm::EventSe geometry, lhcInfo, beamParameters, + ppt, opticalFunctions, engine, *pTracks, @@ -317,6 +323,7 @@ void CTPPSDirectProtonSimulation::processProton( const CTPPSGeometry &geometry, const LHCInfo &lhcInfo, const CTPPSBeamParameters &beamParameters, + const PPSPixelTopology &ppt, const LHCInterpolatedOpticalFunctionsSetCollection &opticalFunctions, CLHEP::HepRandomEngine *rndEngine, std::vector &out_tracks, @@ -597,7 +604,7 @@ void CTPPSDirectProtonSimulation::processProton( } bool module3By2 = (geometry.sensor(detIdInt)->sensorType() != DDD_CTPPS_PIXELS_SENSOR_TYPE_2x2); - if (checkIsHit_ && !CTPPSPixelTopology::isPixelHit(h_loc.x(), h_loc.y(), module3By2)) + if (checkIsHit_ && !ppt.isPixelHit(h_loc.x(), h_loc.y(), module3By2)) continue; if (roundToPitch_) { diff --git a/Validation/CTPPS/python/simu_config/base_cff.py b/Validation/CTPPS/python/simu_config/base_cff.py index dac1197b68ca3..c1bf6cc43b3a5 100644 --- a/Validation/CTPPS/python/simu_config/base_cff.py +++ b/Validation/CTPPS/python/simu_config/base_cff.py @@ -111,6 +111,8 @@ ctppsDirectProtonSimulation.produceRecHits = True # local reconstruction +from CalibPPS.ESProducers.ppsTopology_cff import * + from RecoPPS.Local.totemRPLocalReconstruction_cff import * from RecoPPS.Local.ctppsPixelLocalReconstruction_cff import * from RecoPPS.Local.ctppsDiamondLocalReconstruction_cff import *