Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-04-12 23:30:39

0001 #ifndef __SimFastTiming_FastTimingCommon_BTLElectronicsSim_h__
0002 #define __SimFastTiming_FastTimingCommon_BTLElectronicsSim_h__
0003 
0004 #include "FWCore/Framework/interface/Event.h"
0005 #include "FWCore/Framework/interface/EventSetup.h"
0006 
0007 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0008 #include "SimDataFormats/TrackingHit/interface/PSimHit.h"
0009 
0010 #include "DataFormats/FTLDigi/interface/FTLDigiCollections.h"
0011 #include "SimFastTiming/FastTimingCommon/interface/MTDDigitizerTypes.h"
0012 
0013 #include "SimFastTiming/FastTimingCommon/interface/BTLPulseShape.h"
0014 
0015 namespace mtd = mtd_digitizer;
0016 
0017 namespace CLHEP {
0018   class HepRandomEngine;
0019 }
0020 
0021 class BTLElectronicsSim {
0022 public:
0023   BTLElectronicsSim(const edm::ParameterSet& pset, edm::ConsumesCollector iC);
0024 
0025   void getEvent(const edm::Event& evt) {}
0026 
0027   void getEventSetup(const edm::EventSetup& evt) {}
0028 
0029   void run(const mtd::MTDSimHitDataAccumulator& input, BTLDigiCollection& output, CLHEP::HepRandomEngine* hre) const;
0030 
0031   void runTrivialShaper(BTLDataFrame& dataFrame,
0032                         const mtd::MTDSimHitData& chargeColl,
0033                         const mtd::MTDSimHitData& toa1,
0034                         const mtd::MTDSimHitData& toa2,
0035                         const uint8_t row,
0036                         const uint8_t col) const;
0037 
0038   void updateOutput(BTLDigiCollection& coll, const BTLDataFrame& rawDataFrame) const;
0039 
0040   static constexpr int dfSIZE = 2;
0041 
0042 private:
0043   float sigma2_pe(const float& Q, const float& R) const;
0044 
0045   const bool debug_;
0046 
0047   const float bxTime_;
0048   const float testBeamMIPTimeRes_;
0049   const float ScintillatorRiseTime_;
0050   const float ScintillatorDecayTime_;
0051   const float ChannelTimeOffset_;
0052   const float smearChannelTimeOffset_;
0053 
0054   const float EnergyThreshold_;
0055   const float TimeThreshold1_;
0056   const float TimeThreshold2_;
0057   const float ReferencePulseNpe_;
0058 
0059   const float SinglePhotonTimeResolution_;
0060   const float DarkCountRate_;
0061   const float SigmaElectronicNoise_;
0062   const float SigmaClock_;
0063   const bool smearTimeForOOTtails_;
0064   const float Npe_to_pC_;
0065   const float Npe_to_V_;
0066 
0067   // adc/tdc bitwidths
0068   const uint32_t adcNbits_, tdcNbits_;
0069 
0070   // synthesized adc/tdc information
0071   const float adcSaturation_MIP_;
0072   const uint32_t adcBitSaturation_;
0073   const float adcLSB_MIP_;
0074   const float adcThreshold_MIP_;
0075   const float toaLSB_ns_;
0076   const uint32_t tdcBitSaturation_;
0077 
0078   const float CorrCoeff_;
0079   const float cosPhi_;
0080   const float sinPhi_;
0081 
0082   const float ScintillatorDecayTime2_;
0083   const float ScintillatorDecayTimeInv_;
0084   const float SPTR2_;
0085   const float DCRxRiseTime_;
0086   const float SigmaElectronicNoise2_;
0087   const float SigmaClock2_;
0088 
0089   const BTLPulseShape btlPulseShape_;
0090 };
0091 
0092 #endif