Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:30:54

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   std::vector<digitizerUtility::SignalPoint> drift(
0035       const PSimHit& hit,
0036       const Phase2TrackerGeomDetUnit* pixdet,
0037       const GlobalVector& bfield,
0038       const std::vector<digitizerUtility::EnergyDepositUnit>& ionization_points) const override;
0039   // overload drift
0040   std::vector<digitizerUtility::SignalPoint> driftFor3DSensors(
0041       const PSimHit& hit,
0042       const Phase2TrackerGeomDetUnit* pixdet,
0043       const GlobalVector& bfield,
0044       const std::vector<digitizerUtility::EnergyDepositUnit>& ionization_points,
0045       bool diffusion_activated) const;
0046 
0047   // New diffusion function: check implementation
0048   std::vector<digitizerUtility::EnergyDepositUnit> diffusion(const LocalPoint& pos,
0049                                                              const float& ncarriers,
0050                                                              const std::function<LocalVector(float, float)>& u_drift,
0051                                                              const std::pair<float, float> pitches,
0052                                                              const float& thickness) const;
0053   // Specific for 3D-pixel
0054   void induce_signal(std::vector<PSimHit>::const_iterator inputBegin,
0055                      const PSimHit& hit,
0056                      const size_t hitIndex,
0057                      const size_t firstHitIndex,
0058                      const uint32_t tofBin,
0059                      const Phase2TrackerGeomDetUnit* pixdet,
0060                      const std::vector<digitizerUtility::SignalPoint>& collection_points) override;
0061 
0062 private:
0063   // Radius of Column np and ohmic
0064   const float np_column_radius_;
0065   const float ohm_column_radius_;
0066   // Gap of np column
0067   const float np_column_gap_;
0068 
0069   edm::ESGetToken<SiPixelQuality, SiPixelQualityRcd> siPixelBadModuleToken_;
0070   edm::ESGetToken<SiPixelLorentzAngle, SiPixelLorentzAngleSimRcd> siPixelLorentzAngleToken_;
0071   const edm::ESGetToken<SiPixelFedCablingMap, SiPixelFedCablingMapRcd> fedCablingMapToken_;
0072   const edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> geomToken_;
0073 
0074   // Check if a carrier is inside the column: The point should
0075   // be described in the pixel cell frame
0076   const bool is_inside_n_column_(const LocalPoint& p, const float& sensor_thickness) const;
0077   const bool is_inside_ohmic_column_(const LocalPoint& p, const std::pair<float, float>& pitch) const;
0078 };
0079 #endif