#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/Framework/interface/MakerMacros.h"
#include "FWCore/Framework/interface/EventSetup.h"
#include <string>
#include <iostream>
#include <iomanip>
#include <vector>
#include <list>
#include "DataFormats/CaloTowers/interface/CaloTowerCollection.h"
#include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h"
#include "Geometry/CaloGeometry/interface/CaloCellGeometry.h"
#include "Geometry/CaloGeometry/interface/CaloGeometry.h"
#include "Geometry/CaloGeometry/interface/CaloSubdetectorGeometry.h"
#include "DataFormats/EcalDetId/interface/EBDetId.h"
#include "DataFormats/EcalDetId/interface/EEDetId.h"
#include "FWCore/Framework/interface/ESHandle.h"
#include "Geometry/CaloTopology/interface/CaloTopology.h"
#include "Geometry/CaloEventSetup/interface/CaloTopologyRecord.h"
#include "Geometry/CaloTopology/interface/CaloTowerConstituentsMap.h"
#include "FastSimulation/L1CaloTriggerProducer/interface/FastL1RegionMap.h"
#include "FastSimDataFormats/External/interface/FastL1BitInfo.h"
Go to the source code of this file.
Classes | |
struct | FastL1Config |
class | FastL1Region |
Description: Container class for L1 regions. More... | |
Functions | |
double | corrEmEt (double et, int eta) |
double | corrJetEt (double et, double eta) |
double | corrJetEt1 (double et, double eta) |
double | corrJetEt2 (double et, double eta) |
double | GCTEnergyTrunc (double et, double LSB=1., bool doEM=false) |
double | RCTEnergyTrunc (double et, double Resol=1., double thres=1024.) |
double corrEmEt | ( | double | et, | |
int | eta | |||
) |
Definition at line 898 of file FastL1Region.cc.
Referenced by FastL1GlobalAlgo::FillL1RegionsTP().
00898 { 00899 00900 00901 const int nscales = 32; 00902 /* 00903 const int nscales = 27; 00904 double etalimit[nscales] = { 0.0,0.087,0.174,0.261,0.348,0.435,0.522,0.609,0.696,0.783,0.870,0.957, 00905 1.044,1.131,1.218,1.305,1.392,1.479,1.566,1.653,1.740,1.830,1.930, 00906 2.043,2.172,2.322,2.500}; 00907 */ 00908 00909 double scfactor[nscales] = { 00910 1.00,1.01,1.02,1.02,1.02,1.06,1.04,1.04,1.05,1.09,1.10,1.10,1.15, 00911 1.20,1.27,1.29,1.32,1.52,1.52,1.48,1.40,1.32,1.26,1.21,1.17,1.15, 00912 1.15,1.15,1.15,1.15,1.15,1.15}; 00913 00914 /* 00915 double scale=1.; 00916 for (int i=0;i<nscales;i++) { 00917 if (std::abs(eta)<etalimit[i]) { 00918 scale = scfactor[i]; 00919 } 00920 } 00921 return (scale*et); 00922 */ 00923 00924 if (eta>=0 && eta <=28) 00925 return (scfactor[eta]*et); 00926 else 00927 return et; 00928 }
double corrJetEt | ( | double | et, | |
double | eta | |||
) |
Definition at line 740 of file FastL1Region.cc.
References corrJetEt1().
Referenced by FastL1GlobalAlgo::addJet().
00741 { 00742 return corrJetEt1(et,eta); 00743 //return corrJetEt2(et,eta); 00744 }
double corrJetEt1 | ( | double | et, | |
double | eta | |||
) |
Definition at line 837 of file FastL1Region.cc.
References funct::A, funct::C, funct::D, i, and funct::sqrt().
Referenced by corrJetEt().
00838 { 00839 double etabin[23] = {-5.115, -4.439, -3.839, -3.33, 00840 -3.0, -2.172, -1.74, -1.392, -1.044, -0.696, -0.348, 00841 0.0, 0.348, 0.696, 1.044, 1.392, 1.74, 2.172, 3.0, 00842 3.33, 3.839, 4.439, 5.115}; 00843 00844 int BinID = 0; 00845 00846 double domainbin_L[22] = {6.52223337753073373e+00,6.64347505748981959e+00,6.78054870174118296e+00,6.75191887554567405e+00, 00847 6.60891660595437802e+00,6.57813476381055473e+00,6.96764764481347232e+00,6.77192746888150943e+00, 00848 7.16209661824076260e+00,7.09640803784948027e+00,7.29886808171882517e+00,7.29883431473330546e+00, 00849 7.24561741344293875e+00,7.05381822724987995e+00,6.52340799679028827e+00,6.96091042775473401e+00, 00850 6.69803071767842262e+00,7.79138848427964259e+00,6.78565437835616603e+00,6.71201461174192904e+00, 00851 6.60832257380386334e+00,6.54875448717649267e+00}; 00852 00853 double domainbin_U[22] = {8.90225568813317558e+00,1.24483653543590922e+01,1.32037091554958987e+01,1.70036104608977681e+01, 00854 3.54325008263432011e+01,4.28758696753095450e+01,4.73079850563588025e+01,4.74182802251108981e+01, 00855 4.62509826468679748e+01,5.02198002212212913e+01,4.69817029938948352e+01,4.77263481299233732e+01, 00856 4.86083837976362076e+01,4.80105593452927337e+01,5.11550616006504200e+01,4.90703092811585861e+01, 00857 4.11879629179572788e+01,3.21820720507165845e+01,1.71844078553560529e+01,1.33158534849654764e+01, 00858 1.43586396719878149e+01,1.08629843894704248e+01}; 00859 00860 double A[22] = {2.03682,-4.36824,-4.45258,-6.76524,-22.5984,-24.5289,-24.0313,-22.1896,-21.7818,-22.9882,-20.3321, 00861 -21.0595,-22.1007,-22.658,-23.6898,-24.8888,-23.3246,-21.5343,-6.41221,-4.58952,-3.17222,0.637666}; 00862 00863 double B[22] = {0.226303,0.683099,0.704578,0.704623,0.825928,0.80086,0.766475,0.726059,0.760964,0.792227,0.789188,0.795219, 00864 0.781097,0.768022,0.740101,0.774782,0.788106,0.814502,0.686877,0.709556,0.628581,0.317453}; 00865 00866 double C[22] = {0.00409083,0.000235995,8.22958e-05,2.47567e-05,0.000127995,0.000132914,0.000133342,0.000133035,0.000125993, 00867 8.25968e-05,9.94442e-05,9.11652e-05,0.000109351,0.000115883,0.00011112,0.000122559,0.00015868,0.000152601, 00868 0.000112927,6.29999e-05,0.000741798,0.00274605}; 00869 00870 double D[22] = {8.24022,7.55916,7.16448,6.31577,5.96339,5.31203,5.35456,4.95243,5.34809,4.93339,5.05723,5.08575,5.18643,5.15202, 00871 4.48249,5.2734,5.51785,8.00182,6.21742,6.96692,7.22975,8.12257}; 00872 00873 double E[22] = {-0.343598,-0.294067,-0.22529,-0.0718625,0.004164,0.081987,0.124964,0.15006,0.145201,0.182151,0.187525,0.184763, 00874 0.170689,0.155268,0.174603,0.133432,0.0719798,-0.0921457,-0.0525274,-0.208415,-0.253542,-0.318476}; 00875 00876 double F[22] = {0.0171799,0.0202499,0.0186897,0.0115477,0.00603883,0.00446235,0.00363449,0.00318894,0.00361997,0.00341508, 00877 0.00366392,0.0036545,0.00352303,0.00349116,0.00294891,0.00353187,0.00460384,0.00711028,0.0109351,0.0182924, 00878 0.01914,0.0161094}; 00879 00880 for(int i = 0; i < 22; i++){ 00881 if(eta > etabin[i] && eta <= etabin[i+1]) 00882 BinID = i; 00883 } 00884 00885 if(et >= domainbin_U[BinID]){ 00886 return 2*(et-A[BinID])/(B[BinID]+sqrt(B[BinID]*B[BinID]-4*A[BinID]*C[BinID]+4*et*C[BinID])); 00887 } 00888 else if(et > domainbin_L[BinID]){ 00889 return 2*(et-D[BinID])/(E[BinID]+sqrt(E[BinID]*E[BinID]-4*D[BinID]*F[BinID]+4*et*F[BinID])); 00890 } 00891 else return et; 00892 }
double corrJetEt2 | ( | double | et, | |
double | eta | |||
) |
Definition at line 749 of file FastL1Region.cc.
References funct::abs(), i, and funct::pow().
00750 { 00751 const int NUMBER_ETA_VALUES = 11; 00752 std::vector< std::vector<float> > m_calibFunc; 00753 00754 m_calibFunc.resize(NUMBER_ETA_VALUES); 00755 00756 // still fill manually 00757 m_calibFunc.at(0).push_back(1); 00758 m_calibFunc.at(0).push_back(1); 00759 m_calibFunc.at(0).push_back(2); 00760 00761 m_calibFunc.at(1).push_back(1); 00762 m_calibFunc.at(1).push_back(2); 00763 m_calibFunc.at(1).push_back(2); 00764 00765 m_calibFunc.at(2).push_back(2); 00766 m_calibFunc.at(2).push_back(2); 00767 m_calibFunc.at(2).push_back(2); 00768 m_calibFunc.at(2).push_back(2); 00769 m_calibFunc.at(2).push_back(3); 00770 m_calibFunc.at(2).push_back(3); 00771 00772 m_calibFunc.at(3).push_back(1); 00773 m_calibFunc.at(3).push_back(1); 00774 m_calibFunc.at(3).push_back(3); 00775 00776 m_calibFunc.at(4).push_back(1); 00777 m_calibFunc.at(4).push_back(3); 00778 m_calibFunc.at(4).push_back(3); 00779 m_calibFunc.at(4).push_back(6); 00780 m_calibFunc.at(4).push_back(6); 00781 m_calibFunc.at(4).push_back(6); 00782 m_calibFunc.at(4).push_back(6); 00783 m_calibFunc.at(4).push_back(6); 00784 00785 m_calibFunc.at(5).push_back(3); 00786 m_calibFunc.at(5).push_back(3); 00787 m_calibFunc.at(5).push_back(3); 00788 00789 m_calibFunc.at(6).push_back(1); 00790 m_calibFunc.at(6).push_back(1); 00791 m_calibFunc.at(6).push_back(4); 00792 00793 m_calibFunc.at(7).push_back(1); 00794 m_calibFunc.at(7).push_back(4); 00795 m_calibFunc.at(7).push_back(4); 00796 00797 m_calibFunc.at(8).push_back(4); 00798 m_calibFunc.at(8).push_back(4); 00799 m_calibFunc.at(8).push_back(4); 00800 m_calibFunc.at(8).push_back(1); 00801 m_calibFunc.at(8).push_back(1); 00802 m_calibFunc.at(8).push_back(1); 00803 00804 m_calibFunc.at(9).push_back(1); 00805 m_calibFunc.at(9).push_back(1); 00806 m_calibFunc.at(9).push_back(5); 00807 00808 m_calibFunc.at(10).push_back(1); 00809 m_calibFunc.at(10).push_back(5); 00810 m_calibFunc.at(10).push_back(5); 00811 00812 00813 double etabin[12] = { 0.0, 0.348, 0.696, 1.044, 1.392, 1.74, 2.172, 3.0, 00814 3.33, 3.839, 4.439, 5.115}; 00815 int BinID = 0; 00816 for(int i = 0; i < 11; i++){ 00817 if(std::abs(eta) >= etabin[i] && eta < etabin[i+1]) 00818 BinID = i; 00819 } 00820 00821 double corrEt = 0; 00822 for (unsigned i=0; i<m_calibFunc.at(BinID).size();i++){ 00823 corrEt += m_calibFunc.at(BinID).at(i)*pow(et,(int)i); 00824 } 00825 00826 uint16_t jetEtOut = (uint16_t)corrEt; 00827 00828 if(jetEtOut < 1024) { 00829 return (double)jetEtOut; 00830 } 00831 return (double)1023; 00832 00833 }
double GCTEnergyTrunc | ( | double | et, | |
double | LSB = 1. , |
|||
bool | doEM = false | |||
) |
Definition at line 948 of file FastL1Region.cc.
References i, HLT_VtxMuL3::L1CaloEmThresholds, and HLT_VtxMuL3::L1CaloJetThresholds.
Referenced by FastL1GlobalAlgo::addJet(), and FastL1GlobalAlgo::isEMCand().
00948 { 00949 00950 //return et; 00951 00952 //double L1CaloEmEtScaleLSB = LSB; 00953 //double L1CaloRegionEtScaleLSB = LSB; 00954 00955 //if (et>0.) et += LSB/2.; // round up 00956 00957 double L1CaloEmThresholds[64] = { 00958 0., 1., 2., 3., 4., 5., 6., 7., 8., 9., 00959 10., 11., 12., 13., 14., 15., 16., 17., 18., 19., 00960 20., 21., 22., 23., 24., 25., 26., 27., 28., 29., 00961 30., 31., 32., 33., 34., 35., 36., 37., 38., 39., 00962 40., 41., 42., 43., 44., 45., 46., 47., 48., 49., 00963 50., 51., 52., 53., 54., 55., 56., 57., 58., 59., 00964 60., 61., 62., 63. 00965 }; 00966 00967 double L1CaloJetThresholds[64] = { 00968 0., 10., 12., 14., 15., 18., 20., 22., 24., 25., 00969 28., 30., 32., 35., 37., 40., 45., 50., 55., 60., 00970 65., 70., 75., 80., 85., 90., 100., 110., 120., 125., 00971 130., 140., 150., 160., 170., 175., 180., 190., 200., 215., 00972 225., 235., 250., 275., 300., 325., 350., 375., 400., 425., 00973 450., 475., 500., 525., 550., 575., 600., 625., 650., 675., 00974 700., 725., 750., 775. 00975 }; 00976 00977 00978 00979 double L1CaloThresholds[64]; 00980 if (doEM) { 00981 for (int i=0;i<64;i++) 00982 L1CaloThresholds[i] = L1CaloEmThresholds[i]; 00983 } else { 00984 for (int i=0;i<64;i++) 00985 L1CaloThresholds[i] = L1CaloJetThresholds[i]; 00986 } 00987 00988 00989 double ret = 0.; 00990 for (int i=63;i>0;i--) { 00991 if (et>=(L1CaloThresholds[i])) { 00992 if (i==63) { 00993 ret = L1CaloThresholds[63]; 00994 } else { 00995 /* 00996 double minL = std::abs(et - L1CaloThresholds[i]); 00997 double minU = std::abs(et - L1CaloThresholds[i+1]); 00998 if (minL<minU) 00999 ret = L1CaloThresholds[i]; 01000 else 01001 ret = L1CaloThresholds[i+1]; 01002 */ 01003 /* 01004 if (doEM) { 01005 ret = L1CaloThresholds[i]; 01006 } else { 01007 ret = L1CaloThresholds[i+1]; 01008 } 01009 */ 01010 ret = L1CaloThresholds[i]; 01011 } 01012 break; 01013 } 01014 } 01015 return ret; 01016 }
double RCTEnergyTrunc | ( | double | et, | |
double | Resol = 1. , |
|||
double | thres = 1024. | |||
) |
Definition at line 933 of file FastL1Region.cc.
References int.
Referenced by FastL1GlobalAlgo::FillMET(), FastL1Region::FillTower(), and FastL1Region::FillTower_Scaled().
00933 { 00934 00935 //return et; 00936 if (et>=thres) return thres; 00937 00938 //et += LSB/2.; 00939 //double ret = (int)(et / LSB) * LSB + LSB; 00940 int iEt = (int)(et / LSB); 00941 double ret = (double)iEt * LSB; 00942 00943 return ret; 00944 }