Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-02-10 03:06:50

0001 #ifndef __SimFastTiming_FastTimingCommon_ETLElectronicsSim_h__
0002 #define __SimFastTiming_FastTimingCommon_ETLElectronicsSim_h__
0003 
0004 #include "CommonTools/Utils/interface/FormulaEvaluator.h"
0005 
0006 #include "FWCore/Framework/interface/Event.h"
0007 #include "FWCore/Framework/interface/EventSetup.h"
0008 
0009 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0010 #include "SimDataFormats/TrackingHit/interface/PSimHit.h"
0011 
0012 #include "DataFormats/FTLDigi/interface/FTLDigiCollections.h"
0013 #include "SimFastTiming/FastTimingCommon/interface/MTDDigitizerTypes.h"
0014 
0015 #include "Geometry/Records/interface/MTDDigiGeometryRecord.h"
0016 #include "Geometry/MTDGeometryBuilder/interface/MTDGeometry.h"
0017 #include "Geometry/CommonTopologies/interface/PixelTopology.h"
0018 
0019 #include "SimFastTiming/FastTimingCommon/interface/ETLPulseShape.h"
0020 
0021 namespace mtd = mtd_digitizer;
0022 
0023 namespace CLHEP {
0024   class HepRandomEngine;
0025 }
0026 
0027 class ETLElectronicsSim {
0028 public:
0029   ETLElectronicsSim(const edm::ParameterSet& pset, edm::ConsumesCollector iC);
0030 
0031   void getEvent(const edm::Event& evt) {}
0032 
0033   void getEventSetup(const edm::EventSetup& evt);
0034 
0035   void run(const mtd::MTDSimHitDataAccumulator& input, ETLDigiCollection& output, CLHEP::HepRandomEngine* hre) const;
0036 
0037   void runTrivialShaper(ETLDataFrame& dataFrame,
0038                         const mtd::MTDSimHitData& chargeColl,
0039                         const mtd::MTDSimHitData& toa1,
0040                         const mtd::MTDSimHitData& toa2,
0041                         const uint8_t row,
0042                         const uint8_t column) const;
0043 
0044   void updateOutput(ETLDigiCollection& coll, const ETLDataFrame& rawDataFrame) const;
0045 
0046   static constexpr int dfSIZE = 5;
0047 
0048 private:
0049   const edm::ESGetToken<MTDGeometry, MTDDigiGeometryRecord> geomToken_;
0050   const MTDGeometry* geom_;
0051 
0052   const bool debug_;
0053   const float bxTime_;
0054   const float integratedLum_;
0055 
0056   const ETLPulseShape etlPulseShape_;
0057 
0058   // adc/tdc bitwidths
0059   const uint32_t adcNbits_, tdcNbits_;
0060 
0061   // synthesized adc/tdc information
0062   const float adcSaturation_MIP_;
0063   const float adcLSB_MIP_;
0064   const uint32_t adcBitSaturation_;
0065   const float adcThreshold_MIP_;
0066   const float iThreshold_MIP_;
0067   const float toaLSB_ns_;
0068   const uint32_t tdcBitSaturation_;
0069   const float referenceChargeColl_;
0070   const float noiseLevel_;
0071   const float sigmaDistorsion_;
0072   const float sigmaTDC_;
0073   const reco::FormulaEvaluator formulaLandauNoise_;
0074 };
0075 
0076 #endif