Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:21:37

0001 #include <iostream>
0002 #include <fstream>
0003 #include <vector>
0004 
0005 #include "L1Trigger/RegionalCaloTrigger/interface/L1RCT.h"
0006 #include "L1Trigger/RegionalCaloTrigger/interface/L1RCTLookupTables.h"
0007 #include "CondFormats/L1TObjects/interface/L1RCTParameters.h"
0008 
0009 int main(){
0010   // For testing use 1:1 LUT
0011   std::vector<double> eGammaECalScaleFactors(32, 1.0);
0012   std::vector<double> eGammaHCalScaleFactors(32, 1.0);
0013   std::vector<double> jetMETECalScaleFactors(32, 1.0);
0014   std::vector<double> jetMETHCalScaleFactors(32, 1.0);
0015   std::vector<double> c,d,e,f,g,h;
0016   L1RCTParameters* rctParameters = 
0017     new L1RCTParameters(1.0,                       // eGammaLSB
0018             1.0,                       // jetMETLSB
0019             3.0,                       // eMinForFGCut
0020             40.0,                      // eMaxForFGCut
0021             0.5,                       // hOeCut
0022             1.0,                       // eMinForHoECut
0023             50.0,                      // eMaxForHoECut
0024             1.0,                       // hMinForHoECut
0025             2.0,                       // eActivityCut
0026             3.0,                       // hActivityCut
0027             3,                         // eicIsolationThreshold
0028                         3,                         // jscQuietThresholdBarrel
0029                         3,                         // jscQuietThresholdEndcap
0030             false,                     // noiseVetoHB
0031             false,                     // noiseVetoHEplus
0032             false,                     // noiseVetoHEminus
0033             false,                     // use Lindsey
0034             eGammaECalScaleFactors,
0035             eGammaHCalScaleFactors,
0036             jetMETECalScaleFactors,
0037             jetMETHCalScaleFactors,
0038             c,
0039             d,
0040             e,
0041             f,
0042             g,
0043             h
0044             );  
0045   L1RCTLookupTables* lut = new L1RCTLookupTables();
0046   lut->setRCTParameters(rctParameters);  // transcoder and etScale are not used
0047   L1RCT rct(lut);
0048   char inputname[256];
0049   for(int i=1; i<=100;i++){
0050     sprintf(inputname,"data/rct-input-%i.dat",i);
0051     rct.fileInput(inputname);
0052     rct.processEvent();
0053     rct.printJSC();
0054   }
0055 }