Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef _CSCDBL1TPPARAMETERSCONDITIONS_H
0002 #define _CSCDBL1TPPARAMETERSCONDITIONS_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/CSCDBL1TPParameters.h"
0017 #include "CondFormats/DataRecord/interface/CSCDBL1TPParametersRcd.h"
0018 #include <DataFormats/MuonDetId/interface/CSCDetId.h>
0019 
0020 class CSCDBL1TPParametersConditions : public edm::ESProducer, public edm::EventSetupRecordIntervalFinder {
0021 public:
0022   CSCDBL1TPParametersConditions(const edm::ParameterSet &);
0023   ~CSCDBL1TPParametersConditions() override;
0024 
0025   inline static CSCDBL1TPParameters *prefillCSCDBL1TPParameters();
0026 
0027   typedef std::unique_ptr<CSCDBL1TPParameters> ReturnType;
0028 
0029   ReturnType produceCSCDBL1TPParameters(const CSCDBL1TPParametersRcd &);
0030 
0031 private:
0032   // ----------member data ---------------------------
0033   void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &,
0034                       const edm::IOVSyncValue &,
0035                       edm::ValidityInterval &) override;
0036 };
0037 
0038 #include <fstream>
0039 #include <iostream>
0040 #include <vector>
0041 
0042 // to workaround plugin library
0043 inline CSCDBL1TPParameters *CSCDBL1TPParametersConditions::prefillCSCDBL1TPParameters() {
0044   CSCDBL1TPParameters *cnl1tp = new CSCDBL1TPParameters();
0045 
0046   cnl1tp->setAlctFifoTbins(16);
0047   cnl1tp->setAlctFifoPretrig(10);
0048   cnl1tp->setAlctDriftDelay(2);
0049   cnl1tp->setAlctNplanesHitPretrig(3);  // was 2, new is 3
0050   cnl1tp->setAlctNplanesHitPattern(4);
0051   cnl1tp->setAlctNplanesHitAccelPretrig(3);  // was 2, new is 3
0052   cnl1tp->setAlctNplanesHitAccelPattern(4);
0053   cnl1tp->setAlctTrigMode(2);
0054   cnl1tp->setAlctAccelMode(0);
0055   cnl1tp->setAlctL1aWindowWidth(7);
0056 
0057   cnl1tp->setClctFifoTbins(12);
0058   cnl1tp->setClctFifoPretrig(7);
0059   cnl1tp->setClctHitPersist(4);  // was 6, new is 4
0060   cnl1tp->setClctDriftDelay(2);
0061   cnl1tp->setClctNplanesHitPretrig(3);  // was 2, new is 3
0062   cnl1tp->setClctNplanesHitPattern(4);
0063   cnl1tp->setClctPidThreshPretrig(2);
0064   cnl1tp->setClctMinSeparation(10);
0065 
0066   // the new parameters
0067   cnl1tp->setTmbMpcBlockMe1a(0);
0068   cnl1tp->setTmbAlctTrigEnable(0);
0069   cnl1tp->setTmbClctTrigEnable(0);
0070   cnl1tp->setTmbMatchTrigEnable(1);
0071   cnl1tp->setTmbMatchTrigWindowSize(7);
0072   cnl1tp->setTmbTmbL1aWindowSize(7);
0073 
0074   return cnl1tp;
0075 }
0076 
0077 #endif