Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:30:33

0001 #include <vector>
0002 #include <iostream>
0003 
0004 #include "L1Trigger/RegionalCaloTrigger/interface/L1RCTElectronIsolationCard.h"
0005 #include "L1Trigger/RegionalCaloTrigger/interface/L1RCTLookupTables.h"
0006 #include "CondFormats/L1TObjects/interface/L1RCTParameters.h"
0007 
0008 int main() {
0009   // For testing use 1:1 LUT
0010   std::vector<double> eGammaECalScaleFactors(32, 1.0);
0011   std::vector<double> eGammaHCalScaleFactors(32, 1.0);
0012   std::vector<double> jetMETECalScaleFactors(32, 1.0);
0013   std::vector<double> jetMETHCalScaleFactors(32, 1.0);
0014   std::vector<double> c,d,e,f,g,h;
0015   L1RCTParameters* rctParameters = 
0016     new L1RCTParameters(1.0,                       // eGammaLSB
0017             1.0,                       // jetMETLSB
0018             3.0,                       // eMinForFGCut
0019             40.0,                      // eMaxForFGCut
0020             0.5,                       // hOeCut
0021             1.0,                       // eMinForHoECut
0022             50.0,                      // eMaxForHoECut
0023             1.0,                       // hMinForHoECut
0024             2.0,                       // eActivityCut
0025             3.0,                       // hActivityCut
0026             3,                         // eicIsolationThreshold
0027                         3,                         // jscQuietThresholdBarrel
0028                         3,                         // jscQuietThresholdEndcap
0029             false,                     // noiseVetoHB
0030             false,                     // noiseVetoHEplus
0031             false,                     // noiseVetoHEminus
0032             false,                     // use Lindsey
0033             eGammaECalScaleFactors,
0034             eGammaHCalScaleFactors,
0035             jetMETECalScaleFactors,
0036             jetMETHCalScaleFactors,
0037             c,
0038             d,
0039             e,
0040             f,
0041             g,
0042             h
0043             );
0044   L1RCTLookupTables* lut = new L1RCTLookupTables();
0045   lut->setRCTParameters(rctParameters);  // transcoder and etScale are not used
0046   L1RCTElectronIsolationCard eic(0,0,lut);
0047   L1RCTRegion r0;
0048   L1RCTRegion r1;
0049   //This should report 1 isolated electron of 100 
0050   r0.setEtIn7Bits(0,0,100);
0051   eic.setRegion(0,r0);
0052   eic.setRegion(1,r1);
0053 
0054   eic.fillElectronCandidates();
0055   eic.print();
0056 
0057   //This should report *no* electrons
0058   r0.setHE_FGBit(0,0,1);
0059   eic.fillElectronCandidates();
0060   eic.print();
0061 
0062   //This should report only a nonisolated electron of 100
0063   r0.setHE_FGBit(0,0,0);
0064   r0.setHE_FGBit(0,1,1);
0065   eic.fillElectronCandidates();
0066   eic.print();
0067 
0068   //This should report an isolated electron of 80 and a nonisolated of 100
0069   r0.setEtIn7Bits(2,0,80);
0070   eic.fillElectronCandidates();
0071   eic.print();
0072                  
0073 
0074 }