Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-04-18 22:24:07

0001 #ifndef _SimTracker_SiPhase2Digitizer_Pixel3DDigitizerAlgorithm_h
0002 #define _SimTracker_SiPhase2Digitizer_Pixel3DDigitizerAlgorithm_h
0003 
0004 //-------------------------------------------------------------
0005 // class Pixel3DDigitizerAlgorithm
0006 //
0007 // Specialization of the tracker digitizer for the 3D pixel
0008 // sensors placed at PXB-Layer1 (and possibly Layer2), and
0009 // at PXF-Disk1 and Disk2
0010 //
0011 // Authors: Jordi Duarte-Campderros (CERN/IFCA)
0012 //          Clara Lasaosa Garcia (IFCA)
0013 //--------------------------------------------------------------
0014 
0015 #include "CondFormats/DataRecord/interface/SiPixelQualityRcd.h"
0016 #include "CondFormats/DataRecord/interface/SiPixelFedCablingMapRcd.h"
0017 #include "CondFormats/DataRecord/interface/SiPixelLorentzAngleSimRcd.h"
0018 #include "CondFormats/SiPixelObjects/interface/SiPixelFedCablingMap.h"
0019 #include "Geometry/Records/interface/TrackerDigiGeometryRecord.h"
0020 #include "FWCore/Utilities/interface/ESGetToken.h"
0021 #include "SimTracker/SiPhase2Digitizer/plugins/PixelDigitizerAlgorithm.h"
0022 
0023 // Data formats
0024 #include "DataFormats/GeometryVector/interface/LocalPoint.h"
0025 
0026 // system
0027 #include <functional>
0028 
0029 class Pixel3DDigitizerAlgorithm : public PixelDigitizerAlgorithm {
0030 public:
0031   Pixel3DDigitizerAlgorithm(const edm::ParameterSet& conf, edm::ConsumesCollector iC);
0032   ~Pixel3DDigitizerAlgorithm() override;
0033 
0034   bool select_hit(const PSimHit& hit, double tCorr, double& sigScale) const override;
0035   std::vector<DigitizerUtility::SignalPoint> drift(
0036       const PSimHit& hit,
0037       const Phase2TrackerGeomDetUnit* pixdet,
0038       const GlobalVector& bfield,
0039       const std::vector<DigitizerUtility::EnergyDepositUnit>& ionization_points) const override;
0040   // overload drift
0041   std::vector<DigitizerUtility::SignalPoint> drift(
0042       const PSimHit& hit,
0043       const Phase2TrackerGeomDetUnit* pixdet,
0044       const GlobalVector& bfield,
0045       const std::vector<DigitizerUtility::EnergyDepositUnit>& ionization_points,
0046       bool diffusion_activated) const;
0047 
0048   // New diffusion function: check implementation
0049   std::vector<DigitizerUtility::EnergyDepositUnit> diffusion(const LocalPoint& pos,
0050                                                              const float& ncarriers,
0051                                                              const std::function<LocalVector(float, float)>& u_drift,
0052                                                              const std::pair<float, float> pitches,
0053                                                              const float& thickness) const;
0054   // Specific for 3D-pixel
0055   void induce_signal(const PSimHit& hit,
0056                      const size_t hitIndex,
0057                      const uint32_t tofBin,
0058                      const Phase2TrackerGeomDetUnit* pixdet,
0059                      const std::vector<DigitizerUtility::SignalPoint>& collection_points) override;
0060 
0061 private:
0062   // Radius of Column np and ohmic
0063   const float np_column_radius_;
0064   const float ohm_column_radius_;
0065   // Gap of np column
0066   const float np_column_gap_;
0067 
0068   edm::ESGetToken<SiPixelQuality, SiPixelQualityRcd> siPixelBadModuleToken_;
0069   edm::ESGetToken<SiPixelLorentzAngle, SiPixelLorentzAngleSimRcd> siPixelLorentzAngleToken_;
0070   const edm::ESGetToken<SiPixelFedCablingMap, SiPixelFedCablingMapRcd> fedCablingMapToken_;
0071   const edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> geomToken_;
0072 
0073   // Check if a carrier is inside the column: The point should
0074   // be described in the pixel cell frame
0075   const bool is_inside_n_column_(const LocalPoint& p, const float& sensor_thickness) const;
0076   const bool is_inside_ohmic_column_(const LocalPoint& p, const std::pair<float, float>& pitch) const;
0077 };
0078 #endif