Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:47:33

0001 #ifndef _CSCL1TPPARAMETERSCONDITIONS_H
0002 #define _CSCL1TPPARAMETERSCONDITIONS_H
0003 
0004 #include "FWCore/Framework/interface/ESHandle.h"
0005 #include "FWCore/Framework/interface/ESProducer.h"
0006 #include "FWCore/Framework/interface/Event.h"
0007 #include "FWCore/Framework/interface/EventSetup.h"
0008 #include "FWCore/Framework/interface/EventSetupRecordIntervalFinder.h"
0009 #include "FWCore/Framework/interface/Frameworkfwd.h"
0010 #include "FWCore/Framework/interface/MakerMacros.h"
0011 #include "FWCore/Framework/interface/SourceFactory.h"
0012 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0013 #include <cmath>
0014 #include <memory>
0015 
0016 #include "CondFormats/CSCObjects/interface/CSCL1TPParameters.h"
0017 #include "CondFormats/DataRecord/interface/CSCL1TPParametersRcd.h"
0018 #include <DataFormats/MuonDetId/interface/CSCDetId.h>
0019 
0020 class CSCL1TPParametersConditions : public edm::ESProducer, public edm::EventSetupRecordIntervalFinder {
0021 public:
0022   CSCL1TPParametersConditions(const edm::ParameterSet &);
0023   ~CSCL1TPParametersConditions() override;
0024 
0025   inline static CSCL1TPParameters *prefillCSCL1TPParameters();
0026 
0027   typedef std::unique_ptr<CSCL1TPParameters> ReturnType;
0028 
0029   ReturnType produceCSCL1TPParameters(const CSCL1TPParametersRcd &);
0030 
0031 private:
0032   // ----------member data ---------------------------
0033   void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &,
0034                       const edm::IOVSyncValue &,
0035                       edm::ValidityInterval &) override;
0036   CSCL1TPParameters *CSCl1TPParameters;
0037 };
0038 
0039 #include <fstream>
0040 #include <iostream>
0041 #include <vector>
0042 
0043 // to workaround plugin library
0044 inline CSCL1TPParameters *CSCL1TPParametersConditions::prefillCSCL1TPParameters() {
0045   CSCL1TPParameters *cnl1tp = new CSCL1TPParameters();
0046 
0047   cnl1tp->setAlctFifoTbins(16);
0048   cnl1tp->setAlctFifoPretrig(10);
0049   cnl1tp->setAlctDriftDelay(2);
0050   cnl1tp->setAlctNplanesHitPretrig(3);  // was 2, new is 3
0051   cnl1tp->setAlctNplanesHitPattern(4);
0052   cnl1tp->setAlctNplanesHitAccelPretrig(3);  // was 2, new is 3
0053   cnl1tp->setAlctNplanesHitAccelPattern(4);
0054   cnl1tp->setAlctTrigMode(2);
0055   cnl1tp->setAlctAccelMode(0);
0056   cnl1tp->setAlctL1aWindowWidth(7);
0057 
0058   cnl1tp->setClctFifoTbins(12);
0059   cnl1tp->setClctFifoPretrig(7);
0060   cnl1tp->setClctHitPersist(4);  // was 6, new is 4
0061   cnl1tp->setClctDriftDelay(2);
0062   cnl1tp->setClctNplanesHitPretrig(3);  // was 2, new is 3
0063   cnl1tp->setClctNplanesHitPattern(4);
0064   cnl1tp->setClctPidThreshPretrig(2);
0065   cnl1tp->setClctMinSeparation(10);
0066 
0067   return cnl1tp;
0068 }
0069 
0070 #endif