CMS 3D CMS Logo

Namespaces | Classes | Typedefs | Enumerations | Functions
l1t Namespace Reference

delete x; More...

Namespaces

 emtf
 
 stage1
 
 stage2
 

Classes

class  AlgorithmEvaluation
 
class  AMC13DumpToRaw
 
class  AMCDumpToRaw
 
class  Block
 
class  BlockHeader
 
class  BXVectorInputProducer
 
class  CaloCluster
 
class  CaloCondition
 
class  CaloConfig
 
class  CaloConfigHelper
 
class  CaloEmCand
 
class  CaloMainProcessor
 
class  CaloParams
 
class  CaloParamsHelper
 
class  CaloRegion
 
class  CaloSpare
 
class  CaloStage1Cluster
 
class  CaloStage1FirmwareFactory
 
class  CaloStage2JetAlgorithm
 
class  CaloStage2Nav
 
class  CaloStage2TowerAlgorithmFirmwareImp1
 
class  CaloTools
 
class  CaloTower
 
class  ClusterShapes
 
class  ConditionEvaluation
 
class  CorrCondition
 
class  CorrWithOverlapRemovalCondition
 
class  CTP7Payload
 
class  DataAlreadyPresentException
 
class  DataInvalidException
 
class  DataManager
 
class  DataWriter
 
class  DataWriterExt
 
class  Description
 
class  EGamma
 
class  EMTFDaqOut
 
class  EMTFHit
 
class  EMTFHitExtra
 
class  EmtfPtAssignment
 
class  EMTFTrack
 
class  EMTFTrackExtra
 
class  EndCapParamsHelper
 
class  EnergySumCondition
 
class  EtSum
 
class  EtSumHelper
 
class  ExternalCondition
 
class  FakeInputProducer
 
class  ForestHelper
 
class  GenToInputProducer
 
class  GlobalBoard
 
class  GlobalParamsHelper
 
class  GlobalScales
 
class  GMTInternalMuon
 
struct  GtConditionCategoryStringToEnum
 
struct  GtConditionTypeStringToEnum
 
class  GtInputDump
 
class  GtRecordDump
 
class  HGCalCluster
 
class  HGCalClusterT
 
class  HGCalMulticluster
 
class  HGCalTower
 
class  HGCalTriggerCell
 
class  HGCFETriggerDigi
 
class  Interval
 
class  IntervalManager
 
class  Jet
 
class  L1Candidate
 
class  L1ComparatorRun2
 
class  L1DataEmulResult
 
struct  L1GtBoardTypeStringToEnum
 
class  L1TCaloRCTToUpgradeConverter
 
class  L1TCaloStage1LutWriter
 
class  L1TCaloTowersFilter
 
class  L1TCaloUpgradeToGCTConverter
 
class  L1TDigiToRaw
 
class  L1TExtCondLegacyToStage2
 
class  L1TExtCondProducer
 
class  L1TGlobalAnalyzer
 
class  L1TGlobalUtil
 
class  L1TGlobalUtilHelper
 
struct  L1TGtObjectStringToEnum
 the string to enum and enum to string conversions for GlobalObject More...
 
class  L1TRawToDigi
 
class  L1TStage1Layer2Producer
 
class  L1TStage2CaloAnalyzer
 
class  LUT
 
class  Mask
 
class  MicroGMTAbsoluteIsolationCheckLUT
 
class  MicroGMTAbsoluteIsolationCheckLUTFactory
 
class  MicroGMTCaloIndexSelectionLUT
 
class  MicroGMTCaloIndexSelectionLUTFactory
 
class  MicroGMTCancelOutUnit
 
class  MicroGMTConfiguration
 
class  MicroGMTExtrapolationLUT
 
class  MicroGMTExtrapolationLUTFactory
 
class  MicroGMTIsolationUnit
 
class  MicroGMTLUT
 
class  MicroGMTMatchQualFineLUT
 
class  MicroGMTMatchQualLUT
 
class  MicroGMTMatchQualLUTFactory
 
class  MicroGMTMatchQualSimpleLUT
 
class  MicroGMTRankPtQualLUT
 
class  MicroGMTRankPtQualLUTFactory
 
class  MicroGMTRelativeIsolationCheckLUT
 
class  MicroGMTRelativeIsolationCheckLUTFactory
 
class  MP7BufferDumpToRaw
 
class  MP7Payload
 
class  MTF7Payload
 
class  MuCondition
 
class  Muon
 
class  MuonCaloSum
 
class  MuonRawDigiTranslator
 
class  OMDSReader
 
class  OnlineDBqueryHelper
 
class  Packer
 
class  PackerFactory
 
class  PackerTokens
 
class  PackingSetup
 
class  PackingSetupFactory
 
class  Parameter
 
class  Payload
 
class  PhysicsToBitConverter
 
class  PrescalesVetosHelper
 
class  rctDataBase
 
class  RegionalMuonCand
 
class  RegionalMuonRawDigiTranslator
 
class  Setting
 
class  Stage1Layer2CentralityAlgorithm
 
class  Stage1Layer2DiTauAlgorithm
 
class  Stage1Layer2EGammaAlgorithm
 
class  Stage1Layer2EGammaAlgorithmImpHI
 
class  Stage1Layer2EGammaAlgorithmImpHW
 
class  Stage1Layer2EGammaAlgorithmImpPP
 
class  Stage1Layer2EtSumAlgorithm
 
class  Stage1Layer2EtSumAlgorithmImpHI
 
class  Stage1Layer2EtSumAlgorithmImpHW
 
class  Stage1Layer2EtSumAlgorithmImpPP
 
class  Stage1Layer2FirmwareFactory
 
class  Stage1Layer2FlowAlgorithm
 
class  Stage1Layer2HFBitCountAlgorithm
 
class  Stage1Layer2HFMinimumBias
 
class  Stage1Layer2HFRingSumAlgorithm
 
class  Stage1Layer2JetAlgorithm
 
class  Stage1Layer2JetAlgorithmImpHI
 
class  Stage1Layer2JetAlgorithmImpPP
 
class  Stage1Layer2JetAlgorithmImpSimpleHW
 
class  Stage1Layer2MainProcessor
 
class  Stage1Layer2MainProcessorFirmwareImp1
 
class  Stage1Layer2SingleTrackHI
 
class  Stage1Layer2TauAlgorithm
 
class  Stage1Layer2TauAlgorithmImpHW
 
class  Stage1Layer2TauAlgorithmImpPP
 
class  Stage1TauIsolationLUT
 
class  Stage2Layer1FirmwareFactory
 
class  Stage2Layer2ClusterAlgorithm
 
class  Stage2Layer2ClusterAlgorithmFirmwareImp1
 
class  Stage2Layer2DemuxEGAlgo
 
class  Stage2Layer2DemuxEGAlgoFirmwareImp1
 
class  Stage2Layer2DemuxJetAlgo
 
class  Stage2Layer2DemuxJetAlgoFirmwareImp1
 
class  Stage2Layer2DemuxSumsAlgo
 
class  Stage2Layer2DemuxSumsAlgoFirmwareImp1
 
class  Stage2Layer2DemuxTauAlgo
 
class  Stage2Layer2DemuxTauAlgoFirmwareImp1
 
class  Stage2Layer2EGAlgorithmFirmwareImp1
 
class  Stage2Layer2EGammaAlgorithm
 
class  Stage2Layer2EGammaAlgorithmFirmwareImp1
 
class  Stage2Layer2EtSumAlgorithm
 
class  Stage2Layer2EtSumAlgorithmFirmwareImp1
 
class  Stage2Layer2FirmwareFactory
 
class  Stage2Layer2JetAlgorithm
 
class  Stage2Layer2JetAlgorithmFirmwareImp1
 
class  Stage2Layer2JetSumAlgorithm
 
class  Stage2Layer2JetSumAlgorithmFirmwareImp1
 
class  Stage2Layer2MainProcessorFirmwareImp1
 
class  Stage2Layer2SumsAlgorithmFirmwareImp1
 
class  Stage2Layer2TauAlgorithm
 
class  Stage2Layer2TauAlgorithmFirmwareImp1
 
class  Stage2MainProcessor
 
class  Stage2MainProcessorFirmwareImp1
 
class  Stage2PreProcessor
 
class  Stage2PreProcessorFirmwareImp1
 
class  Stage2TowerCompressAlgorithm
 
class  Stage2TowerCompressAlgorithmFirmwareImp1
 
class  Stage2TowerDecompressAlgorithm
 
class  Stage2TowerDecompressAlgorithmFirmwareImp1
 
class  TableRow
 
class  Tau
 
class  TriggerMenuParser
 
class  TriggerSystem
 
class  TrigSystem
 
class  Unpacker
 
class  UnpackerCollections
 
class  UnpackerFactory
 
class  WriterProxy
 
class  WriterProxyT
 
class  XmlConfigParser
 
class  XmlConfigReader
 

Typedefs

typedef std::map< std::string, GlobalAlgorithmAlgorithmMap
 map containing the algorithms More...
 
typedef std::vector< BlockBlocks
 
typedef BXVector< CaloClusterCaloClusterBxCollection
 
typedef BXVector< CaloEmCandCaloEmCandBxCollection
 
typedef BXVector< CaloRegionCaloRegionBxCollection
 
typedef BXVector< CaloSpareCaloSpareBxCollection
 
typedef BXVector< CaloStage1ClusterCaloStage1ClusterBxCollection
 
typedef BXVector< CaloTowerCaloTowerBxCollection
 
typedef AlgorithmMap::const_iterator CItAlgo
 iterators through map containing the algorithms More...
 
typedef ConditionMap::const_iterator CItCond
 iterators through map containing the conditions More...
 
typedef std::map< std::string, GlobalCondition * > ConditionMap
 
typedef BXVector< EGammaEGammaBxCollection
 
typedef edm::Ref< EGammaBxCollectionEGammaRef
 
typedef edm::RefVector< EGammaBxCollectionEGammaRefVector
 
typedef std::vector< EGammaRefEGammaVectorRef
 
typedef std::vector< EMTFDaqOutEMTFDaqOutCollection
 
typedef std::vector< EMTFHitEMTFHitCollection
 
typedef std::vector< EMTFHitExtraEMTFHitExtraCollection
 
typedef std::vector< EMTFTrackEMTFTrackCollection
 
typedef std::vector< EMTFTrackExtraEMTFTrackExtraCollection
 
typedef BXVector< EtSumEtSumBxCollection
 
typedef edm::Ref< EtSumBxCollectionEtSumRef
 
typedef edm::RefVector< EtSumBxCollectionEtSumRefVector
 
typedef std::vector< EtSumRefEtSumVectorRef
 
typedef std::vector< GMTInternalMuonGMTInternalMuonCollection
 
typedef std::list< std::shared_ptr< GMTInternalMuon > > GMTInternalMuonList
 
typedef std::map< int, std::vector< std::shared_ptr< GMTInternalMuon > > > GMTInternalWedges
 
typedef BXVector< HGCalClusterHGCalClusterBxCollection
 
typedef BXVector< HGCalMulticlusterHGCalMulticlusterBxCollection
 
typedef BXVector< HGCalTowerHGCalTowerBxCollection
 
typedef BXVector< HGCalTriggerCellHGCalTriggerCellBxCollection
 
typedef edm::SortedCollection< HGCFETriggerDigiHGCFETriggerDigiCollection
 
typedef edm::Ptr< HGCFETriggerDigiHGCFETriggerDigiPtr
 
typedef std::vector< HGCFETriggerDigiPtrHGCFETriggerDigiPtrVector
 
typedef edm::Ref< HGCFETriggerDigiCollectionHGCFETriggerDigiRef
 
typedef edm::RefVector< HGCFETriggerDigiCollectionHGCFETriggerDigiRefVector
 
typedef AlgorithmMap::iterator ItAlgo
 
typedef ConditionMap::iterator ItCond
 
typedef BXVector< JetJetBxCollection
 
typedef edm::Ref< JetBxCollectionJetRef
 
typedef edm::RefVector< JetBxCollectionJetRefVector
 
typedef std::vector< JetRefJetVectorRef
 
typedef BXVector< L1CandidateL1CandidateBxCollection
 
typedef edm::Ref< L1CandidateBxCollectionL1CandidateRef
 
typedef edm::RefVector< L1CandidateBxCollectionL1CandidateRefVector
 
typedef std::vector< L1CandidateRefL1CandidateVectorRef
 
typedef BXVector< L1DataEmulResultL1DataEmulResultBxCollection
 
typedef BXVector< MuonMuonBxCollection
 
typedef BXVector< MuonCaloSumMuonCaloSumBxCollection
 
typedef edm::Ref< MuonBxCollectionMuonRef
 
typedef edm::RefVector< MuonBxCollectionMuonRefVector
 
typedef std::vector< MuonRefMuonVectorRef
 
typedef Packer *( pack_fct) ()
 
typedef edmplugin::PluginFactory< pack_fctPackerFactoryT
 
typedef std::map< std::pair< int, int >, PackersPackerMap
 
typedef std::vector< std::shared_ptr< Packer > > Packers
 
typedef edmplugin::PluginFactory< prov_fctPackingSetupFactoryT
 
typedef PackingSetup *( prov_fct) ()
 
typedef BXVector< RegionalMuonCandRegionalMuonCandBxCollection
 
typedef BXVector< TauTauBxCollection
 
typedef edm::Ref< TauBxCollectionTauRef
 
typedef edm::RefVector< TauBxCollectionTauRefVector
 
typedef std::vector< TauRefTauVectorRef
 
typedef Unpacker *( unpack_fct) ()
 
typedef edmplugin::PluginFactory< unpack_fctUnpackerFactoryT
 
typedef std::map< int, std::shared_ptr< Unpacker > > UnpackerMap
 
typedef edmplugin::PluginFactory< l1t::WriterProxy *()> WriterFactory
 

Enumerations

enum  block_t { MP7 = 0, CTP7, MTF7 }
 
enum  cancel_t {
  bmtf_bmtf, omtf_bmtf_pos, omtf_emtf_pos, omtf_omtf_pos,
  emtf_emtf_pos, omtf_bmtf_neg, omtf_emtf_neg, omtf_omtf_neg,
  emtf_emtf_neg
}
 
enum  cancelmode { tracks, coordinate }
 
enum  GlobalObject {
  gtMu, gtEG, gtJet, gtTau,
  gtETM, gtETT, gtHTT, gtHTM,
  gtETMHF, gtTowerCount, gtMinBiasHFP0, gtMinBiasHFM0,
  gtMinBiasHFP1, gtMinBiasHFM1, gtETTem, gtExternal,
  ObjNull
}
 
enum  GtConditionCategory {
  CondNull, CondMuon, CondCalo, CondEnergySum,
  CondCorrelation, CondExternal, CondCorrelationWithOverlapRemoval
}
 condition categories More...
 
enum  GtConditionType {
  TypeNull, Type1s, Type2s, Type2wsc,
  Type2cor, Type3s, Type4s, TypeETM,
  TypeETT, TypeHTT, TypeHTM, TypeETMHF,
  TypeTowerCount, TypeMinBiasHFP0, TypeMinBiasHFM0, TypeMinBiasHFP1,
  TypeMinBiasHFM1, TypeETTem, TypeExternal, Type2corWithOverlapRemoval
}
 
enum  L1GtBoardType { MP7 = 0, BoardNull }
 board types in GT More...
 
enum  tftype {
  bmtf, omtf_neg, omtf_pos, emtf_neg,
  emtf_pos
}
 

Functions

int calc_chamber (int _station, int _sector, int _subsector, int _ring, int _csc_ID)
 
float calc_eta (int bits)
 
float calc_eta_from_theta_rad (float _theta_rad)
 
int calc_eta_GMT (float val)
 
float calc_phi_glob_deg (float loc, int sect)
 
float calc_phi_glob_deg_hit (float loc, int sect_ind)
 
float calc_phi_glob_rad (float loc, int sect)
 
float calc_phi_glob_rad_hit (float loc, int sect_ind)
 
float calc_phi_GMT_deg (int bits)
 
float calc_phi_GMT_deg_corr (int bits)
 
int calc_phi_GMT_int (float val)
 
float calc_phi_GMT_rad (int bits)
 
float calc_phi_loc_deg (int bits)
 
int calc_phi_loc_int (float val)
 
float calc_phi_loc_rad (int bits)
 
float calc_pt (int bits)
 
int calc_pt_GMT (float val)
 
int calc_ring (int _station, int _csc_ID, int _strip)
 
int calc_sector_from_index (int index)
 
int calc_sector_GMT (int _sector)
 
int calc_subsector (int _station, int _chamber)
 
float calc_theta_deg (float _eta)
 
float calc_theta_deg_from_int (int _theta_int)
 
float calc_theta_rad (float _eta)
 
float calc_theta_rad_from_int (int _theta_int)
 
int calc_uGMT_chamber (int _csc_ID, int _subsector, int _neighbor, int _station)
 
void calibrateAndRankJets (CaloParamsHelper *params, const std::vector< l1t::Jet > *input, std::vector< l1t::Jet > *output)
 
void calibrateAndRankTaus (CaloParamsHelper *params, const std::vector< l1t::Tau > *input, std::vector< l1t::Tau > *output)
 
template<class T >
T castTo (const char *arg)
 
template<>
bool castTo< bool > (const char *arg)
 
template<>
char castTo< char > (const char *arg)
 
template<>
double castTo< double > (const char *arg)
 
template<>
float castTo< float > (const char *arg)
 
template<>
int castTo< int > (const char *arg)
 
template<>
long castTo< long > (const char *arg)
 
template<>
long double castTo< long double > (const char *arg)
 
template<>
long long castTo< long long > (const char *arg)
 
template<>
short castTo< short > (const char *arg)
 
template<>
unsigned char castTo< unsigned char > (const char *arg)
 
template<>
unsigned int castTo< unsigned int > (const char *arg)
 
template<>
unsigned long castTo< unsigned long > (const char *arg)
 
template<>
unsigned long long castTo< unsigned long long > (const char *arg)
 
template<>
unsigned short castTo< unsigned short > (const char *arg)
 
template<class T >
T castTo_impl (const char *arg, std::true_type, std::false_type)
 
template<class T >
T castTo_impl (const char *arg, std::false_type, std::true_type)
 
template<class T >
T castTo_impl (const char *arg, std::false_type, std::false_type)
 
template<class T >
T castToInt_impl (const char *arg, std::true_type)
 
template<class T >
T castToInt_impl (const char *arg, std::false_type)
 
unsigned int convertFromHexStringToInt (const std::string &aHexString)
 
l1t::LUT convertToLUT (const std::vector< uint64_t > &v, int padding=-1) noexcept
 
l1t::LUT convertToLUT (const std::vector< char > &v, int padding=-1) noexcept
 
l1t::LUT convertToLUT (const std::vector< short > &v, int padding=-1) noexcept
 
l1t::LUT convertToLUT (const std::vector< int > &v, int padding=-1) noexcept
 
l1t::LUT convertToLUT (const std::vector< long > &v, int padding=-1) noexcept
 
l1t::LUT convertToLUT (const std::vector< long long > &v, int padding=-1) noexcept
 
l1t::LUT convertToLUT (const std::vector< unsigned char > &v, int padding=-1) noexcept
 
l1t::LUT convertToLUT (const std::vector< unsigned short > &v, int padding=-1) noexcept
 
l1t::LUT convertToLUT (const std::vector< unsigned int > &v, int padding=-1) noexcept
 
template<class varType >
varType convertVariable (const std::string &aVar)
 
int deltaGctPhi (const CaloRegion &region, const CaloRegion &neighbor)
 
void EGammaToGtScales (CaloParamsHelper *params, const std::vector< l1t::EGamma > *input, std::vector< l1t::EGamma > *output)
 
void EtSumToGtScales (CaloParamsHelper *params, const std::vector< l1t::EtSum > *input, std::vector< l1t::EtSum > *output)
 
void getBXRange (int nbx, int &first, int &last)
 
const unsigned int gtEta (const unsigned int iEta)
 
unsigned char hgcal_bad_codec (0xff)
 
void HICaloRingSubtraction (const std::vector< l1t::CaloRegion > &regions, std::vector< l1t::CaloRegion > *subRegions, CaloParamsHelper *params)
 ------------— For heavy ion ----------------------------------— More...
 
void JetCalibration (std::vector< l1t::Jet > *uncalibjets, std::vector< double > jetCalibrationParams, std::vector< l1t::Jet > *jets, std::string jetCalibrationType, double jetLSB)
 
void JetToGtEtaScales (CaloParamsHelper *params, const std::vector< l1t::Jet > *input, std::vector< l1t::Jet > *output)
 
void JetToGtPtScales (CaloParamsHelper *params, const std::vector< l1t::Jet > *input, std::vector< l1t::Jet > *output)
 
std::string l1GtBoardTypeEnumToString (const L1GtBoardType &)
 
L1GtBoardType l1GtBoardTypeStringToEnum (const std::string &)
 
std::string l1GtConditionCategoryEnumToString (const GtConditionCategory &)
 
GtConditionCategory l1GtConditionCategoryStringToEnum (const std::string &)
 
std::string l1GtConditionTypeEnumToString (const GtConditionType &)
 
GtConditionType l1GtConditionTypeStringToEnum (const std::string &)
 
std::string l1TGtObjectEnumToString (const GlobalObject &)
 
l1t::GlobalObject l1TGtObjectStringToEnum (const std::string &)
 
std::ostream & operator<< (std::ostream &os, const l1t::CaloParamsHelper &p)
 
bool operator> (const l1t::Tau &a, const l1t::Tau &b)
 
bool operator> (const l1t::EGamma &a, const l1t::EGamma &b)
 
bool operator> (l1t::EGamma &a, l1t::EGamma &b)
 
bool operator> (l1t::Tau &a, l1t::Tau &b)
 
bool operator> (const l1t::Jet &a, l1t::Jet &b)
 
unsigned int pack15bits (int pt, int eta, int phi)
 
unsigned int pack16bits (int pt, int eta, int phi)
 
unsigned int pack16bitsEgammaSpecial (int pt, int eta, int phi)
 
void passThroughJets (const std::vector< l1t::CaloRegion > *regions, std::vector< l1t::Jet > *uncalibjets)
 
void RegionCorrection (const std::vector< l1t::CaloRegion > &regions, std::vector< l1t::CaloRegion > *subRegions, CaloParamsHelper *params)
 ------— New region correction (PUsub, no response correction at the moment) --------— More...
 
void simpleHWSubtraction (const std::vector< l1t::CaloRegion > &regions, std::vector< l1t::CaloRegion > *subRegions)
 
void slidingWindowJetFinder (const int, const std::vector< l1t::CaloRegion > *regions, std::vector< l1t::Jet > *uncalibjets)
 
void SortEGammas (std::vector< l1t::EGamma > *input, std::vector< l1t::EGamma > *output)
 
void SortJets (std::vector< l1t::Jet > *input, std::vector< l1t::Jet > *output)
 
void SortTaus (std::vector< l1t::Tau > *input, std::vector< l1t::Tau > *output)
 
std::vector< std::string > str2VecStr_ (const std::string &aStr, const std::string &delim)
 
void str2VecStr_ (const std::string &aStr, const std::string &delim, std::vector< std::string > &aVec)
 
void TauToGtEtaScales (CaloParamsHelper *params, const std::vector< l1t::Tau > *input, std::vector< l1t::Tau > *output)
 
void TauToGtPtScales (CaloParamsHelper *params, const std::vector< l1t::Tau > *input, std::vector< l1t::Tau > *output)
 
void TwelveByTwelveFinder (const int, const std::vector< l1t::CaloRegion > *regions, std::vector< l1t::Jet > *uncalibjets)
 
void TwoByTwoFinder (const int, const int, const std::vector< l1t::CaloRegion > *regions, std::vector< l1t::Jet > *uncalibjets)
 

Detailed Description

delete x;

map containing the conditions

Description: Simple Navigator class for the CaloTowers

Author
: Sam Harper - RAL

Description: Firmware headers

Implementation: Collects concrete algorithm implmentations.

Author
: R. Alex Barbieri MIT Kalanand Mishra, Fermilab

Description: Firmware headers

Implementation: Collects concrete algorithm implmentations.

Author
: R. Alex Barbieri MIT

Description: Firmware headers

Implementation: Concrete firmware implementations

Author
: Jim Brooke - University of Bristol

Description: Firmware headers

Implementation: Concrete firmware implementations

Author
: Jim Brooke - University of Bristol Modified: Adam Elwood - ICL

Description: enums for the L1 GT.

Implementation: Defines various enums for CondFormats L1 GT. For each enum, define the lightweight "maps" for enum string label and enum value

Author
: Vladimir Rekovic, Brian Winer, OSU Vasile Mihai Ghete - HEPHY Vienna

$Date$ $Revision$

Typedef Documentation

typedef std::map<std::string, GlobalAlgorithm> l1t::AlgorithmMap

map containing the algorithms

Definition at line 32 of file TriggerMenuFwd.h.

typedef std::vector<Block> l1t::Blocks

Definition at line 72 of file Block.h.

Definition at line 85 of file CaloCluster.h.

Definition at line 26 of file CaloEmCand.h.

Definition at line 47 of file CaloRegion.h.

Definition at line 10 of file CaloSpare.h.

Definition at line 27 of file CaloStage1Cluster.h.

Definition at line 10 of file CaloTower.h.

typedef AlgorithmMap::const_iterator l1t::CItAlgo

iterators through map containing the algorithms

Definition at line 39 of file TriggerMenuFwd.h.

typedef ConditionMap::const_iterator l1t::CItCond

iterators through map containing the conditions

Definition at line 35 of file TriggerMenuFwd.h.

typedef std::map<std::string, GlobalCondition*> l1t::ConditionMap

Definition at line 29 of file TriggerMenuFwd.h.

Definition at line 11 of file EGamma.h.

Definition at line 13 of file EGamma.h.

Definition at line 14 of file EGamma.h.

typedef std::vector< EGammaRef > l1t::EGammaVectorRef

Definition at line 15 of file EGamma.h.

typedef std::vector<EMTFDaqOut> l1t::EMTFDaqOutCollection

Definition at line 130 of file EMTFDaqOut.h.

typedef std::vector<EMTFHit> l1t::EMTFHitCollection

Definition at line 158 of file EMTFHit.h.

Definition at line 112 of file EMTFHitExtra.h.

typedef std::vector<EMTFTrack> l1t::EMTFTrackCollection

Definition at line 201 of file EMTFTrack.h.

Definition at line 96 of file EMTFTrackExtra.h.

Definition at line 10 of file EtSum.h.

Definition at line 12 of file EtSum.h.

Definition at line 13 of file EtSum.h.

typedef std::vector< EtSumRef > l1t::EtSumVectorRef

Definition at line 14 of file EtSum.h.

Definition at line 7 of file GMTInternalMuonFwd.h.

Definition at line 10 of file GMTInternalMuonFwd.h.

typedef std::map<int, std::vector<std::shared_ptr<GMTInternalMuon> > > l1t::GMTInternalWedges

Definition at line 9 of file GMTInternalMuonFwd.h.

Definition at line 36 of file HGCalCluster.h.

Definition at line 29 of file HGCalMulticluster.h.

Definition at line 10 of file HGCalTower.h.

Definition at line 13 of file HGCalTriggerCell.h.

Definition at line 13 of file HGCFETriggerDigiFwd.h.

Definition at line 21 of file HGCFETriggerDigiFwd.h.

Definition at line 22 of file HGCFETriggerDigiFwd.h.

Definition at line 19 of file HGCFETriggerDigiFwd.h.

Definition at line 20 of file HGCFETriggerDigiFwd.h.

typedef AlgorithmMap::iterator l1t::ItAlgo

Definition at line 40 of file TriggerMenuFwd.h.

typedef ConditionMap::iterator l1t::ItCond

Definition at line 36 of file TriggerMenuFwd.h.

Definition at line 10 of file Jet.h.

Definition at line 12 of file Jet.h.

Definition at line 13 of file Jet.h.

typedef std::vector< JetRef > l1t::JetVectorRef

Definition at line 14 of file Jet.h.

Definition at line 9 of file L1Candidate.h.

Definition at line 11 of file L1Candidate.h.

Definition at line 12 of file L1Candidate.h.

typedef std::vector< L1CandidateRef > l1t::L1CandidateVectorRef

Definition at line 13 of file L1Candidate.h.

Definition at line 7 of file L1DataEmulResult.h.

Definition at line 10 of file Muon.h.

Definition at line 7 of file MuonCaloSumFwd.h.

Definition at line 12 of file Muon.h.

Definition at line 13 of file Muon.h.

typedef std::vector< MuonRef > l1t::MuonVectorRef

Definition at line 14 of file Muon.h.

typedef Packer*( l1t::pack_fct) ()

Definition at line 9 of file PackerFactory.h.

Definition at line 10 of file PackerFactory.h.

typedef std::map<std::pair<int, int>, Packers> l1t::PackerMap

Definition at line 25 of file PackingSetup.h.

typedef std::vector<std::shared_ptr<Packer> > l1t::Packers

Definition at line 20 of file Packer.h.

Definition at line 10 of file PackingSetupFactory.h.

typedef PackingSetup*( l1t::prov_fct) ()

Definition at line 9 of file PackingSetupFactory.h.

Definition at line 10 of file RegionalMuonCandFwd.h.

Definition at line 10 of file Tau.h.

Definition at line 12 of file Tau.h.

Definition at line 13 of file Tau.h.

typedef std::vector< TauRef > l1t::TauVectorRef

Definition at line 14 of file Tau.h.

typedef Unpacker*( l1t::unpack_fct) ()

Definition at line 9 of file UnpackerFactory.h.

Definition at line 10 of file UnpackerFactory.h.

typedef std::map<int, std::shared_ptr<Unpacker> > l1t::UnpackerMap

Definition at line 27 of file PackingSetup.h.

Definition at line 88 of file WriterProxy.h.

Enumeration Type Documentation

Enumerator
MP7 
CTP7 
MTF7 

Definition at line 10 of file Block.h.

10 { MP7 = 0, CTP7, MTF7 };
Definition: Block.h:10
Enumerator
tracks 
coordinate 

Definition at line 11 of file MicroGMTCancelOutUnit.h.

L1 GT objects ObjNull catch all errors

Enumerator
gtMu 
gtEG 
gtJet 
gtTau 
gtETM 
gtETT 
gtHTT 
gtHTM 
gtETMHF 
gtTowerCount 
gtMinBiasHFP0 
gtMinBiasHFM0 
gtMinBiasHFP1 
gtMinBiasHFM1 
gtETTem 
gtExternal 
ObjNull 

Definition at line 16 of file GlobalObject.h.

condition categories

Enumerator
CondNull 
CondMuon 
CondCalo 
CondEnergySum 
CondCorrelation 
CondExternal 
CondCorrelationWithOverlapRemoval 

Definition at line 85 of file GlobalDefinitions.h.

condition types TypeNull: null type - for condition constructor only Type1s : one particle Type2s : two particles, same type, no spatial correlations among them Type2wsc : two particles, same type, with spatial correlations among them Type2cor : two particles, different type, with spatial correlations among them Type3s : three particles, same type Type4s : four particles, same type TypeETM, TypeETT, TypeHTT, TypeHTM : ETM, ETT, HTT, HTM TypeExternal: external conditions (logical result only; definition in L1 GT external systems)

Enumerator
TypeNull 
Type1s 
Type2s 
Type2wsc 
Type2cor 
Type3s 
Type4s 
TypeETM 
TypeETT 
TypeHTT 
TypeHTM 
TypeETMHF 
TypeTowerCount 
TypeMinBiasHFP0 
TypeMinBiasHFM0 
TypeMinBiasHFP1 
TypeMinBiasHFM1 
TypeETTem 
TypeExternal 
Type2corWithOverlapRemoval 

Definition at line 52 of file GlobalDefinitions.h.

board types in GT

Enumerator
MP7 
BoardNull 

Definition at line 28 of file GlobalDefinitions.h.

28  {
29  MP7,
30  BoardNull
31 };
Definition: Block.h:10
Enumerator
bmtf 
omtf_neg 
omtf_pos 
emtf_neg 
emtf_pos 

Definition at line 7 of file RegionalMuonCandFwd.h.

Function Documentation

int l1t::calc_chamber ( int  _station,
int  _sector,
int  _subsector,
int  _ring,
int  _csc_ID 
)

Definition at line 156 of file EMTFHitTools.cc.

Referenced by l1t::stage2::emtf::MEBlockUnpacker::unpack().

156  {
157  int tmp_chamber = -999;
158  if (_station == 1) {
159  tmp_chamber = ((_sector-1) * 6) + _csc_ID + 2; // Chamber offset of 2: First chamber in sector 1 is chamber 3
160  if (_ring == 2) tmp_chamber -= 3;
161  if (_ring == 3) tmp_chamber -= 6;
162  if (_subsector == 2) tmp_chamber += 3;
163  if (tmp_chamber > 36) tmp_chamber -= 36;
164  }
165  else if (_ring == 1) {
166  tmp_chamber = ((_sector-1) * 3) + _csc_ID + 1; // Chamber offset of 1: First chamber in sector 1 is chamber 2
167  if (tmp_chamber > 18) tmp_chamber -= 18;
168  }
169  else if (_ring == 2) {
170  tmp_chamber = ((_sector-1) * 6) + _csc_ID - 3 + 2; // Chamber offset of 2: First chamber in sector 1 is chamber 3
171  if (tmp_chamber > 36) tmp_chamber -= 36;
172  }
173  return tmp_chamber;
174  } // End EMTFHit::calc_chamber
float l1t::calc_eta ( int  bits)
inline

Definition at line 17 of file EMTFTrackTools.h.

Referenced by l1t::EMTFTrack::ImportSP().

17 { return bits * 0.010875; }
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision bits
float l1t::calc_eta_from_theta_rad ( float  _theta_rad)
inline

Definition at line 18 of file EMTFHitTools.h.

References cmsBatch::log, and funct::tan().

Referenced by L1TMuonEndCapTrackProducer::produce().

18 { return -1 * log( tan( _theta_rad / 2 ) ); }
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
int l1t::calc_eta_GMT ( float  val)
inline

Definition at line 18 of file EMTFTrackTools.h.

18 { return val / 0.010875; }
float l1t::calc_phi_glob_deg ( float  loc,
int  sect 
)
inline

Definition at line 28 of file EMTFTrackTools.h.

References tmp.

Referenced by l1t::EMTFTrack::ImportSP(), and L1TMuonEndCapTrackProducer::produce().

28  {
29  float tmp = loc + 15 + (sect - 1)*60; return (tmp < 180) ? tmp : tmp - 360; }
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
float l1t::calc_phi_glob_deg_hit ( float  loc,
int  sect_ind 
)
inline

Definition at line 19 of file EMTFHitTools.h.

References tmp.

Referenced by L1TMuonEndCapTrackProducer::produce().

19  {
20  float tmp = loc + 15 + (sect_ind < 6 ? sect_ind : sect_ind - 6)*60;
21  return (tmp < 180) ? tmp : tmp - 360; }
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
float l1t::calc_phi_glob_rad ( float  loc,
int  sect 
)
inline

Definition at line 30 of file EMTFTrackTools.h.

References Geom::pi(), and tmp.

Referenced by l1t::EMTFTrack::ImportSP(), and L1TMuonEndCapTrackProducer::produce().

30  {
31  float tmp = loc + (Geom::pi()/12) + (sect - 1)*(Geom::pi()/3); return (tmp < Geom::pi()) ? tmp : tmp - 2*Geom::pi(); }
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
constexpr double pi()
Definition: Pi.h:31
float l1t::calc_phi_glob_rad_hit ( float  loc,
int  sect_ind 
)
inline

Definition at line 22 of file EMTFHitTools.h.

References Geom::pi(), and tmp.

Referenced by L1TMuonEndCapTrackProducer::produce().

22  {
23  float tmp = loc + (Geom::pi()/12) + (sect_ind < 6 ? sect_ind : sect_ind - 6)*(Geom::pi()/3);
24  return (tmp < Geom::pi()) ? tmp : tmp - 2*Geom::pi(); }
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
constexpr double pi()
Definition: Pi.h:31
float l1t::calc_phi_GMT_deg ( int  bits)
inline

Definition at line 24 of file EMTFTrackTools.h.

24 { return (bits * 0.625) + 0.3125; } /* x (360/576) + (180/576) */
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision bits
float l1t::calc_phi_GMT_deg_corr ( int  bits)
inline

Definition at line 25 of file EMTFTrackTools.h.

25 { return (bits * 0.625 * 1.0208) + 0.3125 * 1.0208 + 0.552; } /* AWB mod 09.02.16 */
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision bits
int l1t::calc_phi_GMT_int ( float  val)
inline

Definition at line 27 of file EMTFTrackTools.h.

27 { return (val - 0.3125) / 0.625; } /* - (180/576) / (360/576) */
float l1t::calc_phi_GMT_rad ( int  bits)
inline

Definition at line 26 of file EMTFTrackTools.h.

References Geom::pi().

26 { return (bits * Geom::pi() / 288) + (Geom::pi() / 576); } /* x (2*pi/576) + (pi/576) */
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision bits
constexpr double pi()
Definition: Pi.h:31
float l1t::calc_phi_loc_deg ( int  bits)
inline

Definition at line 21 of file EMTFTrackTools.h.

Referenced by l1t::EMTFTrack::ImportSP(), and L1TMuonEndCapTrackProducer::produce().

21 { return (bits / 60.0) - 22.0; }
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision bits
int l1t::calc_phi_loc_int ( float  val)
inline

Definition at line 23 of file EMTFTrackTools.h.

23 { return (val + 2) * 60; }
float l1t::calc_phi_loc_rad ( int  bits)
inline

Definition at line 22 of file EMTFTrackTools.h.

References Geom::pi().

Referenced by l1t::EMTFTrack::ImportSP(), and L1TMuonEndCapTrackProducer::produce().

22 { return (bits * Geom::pi() / 10800) - (22 * Geom::pi() / 180); }
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision bits
constexpr double pi()
Definition: Pi.h:31
float l1t::calc_pt ( int  bits)
inline

Definition at line 15 of file EMTFTrackTools.h.

Referenced by l1t::EMTFTrack::ImportSP().

15 { return (bits - 1) * 0.5; }
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision bits
int l1t::calc_pt_GMT ( float  val)
inline

Definition at line 16 of file EMTFTrackTools.h.

16 { return (val * 2) + 1; }
int l1t::calc_ring ( int  _station,
int  _csc_ID,
int  _strip 
)

Definition at line 140 of file EMTFHitTools.cc.

Referenced by l1t::stage2::emtf::MEBlockUnpacker::unpack().

140  {
141  if (_station > 1) {
142  if (_csc_ID < 4) return 1;
143  else if (_csc_ID < 10) return 2;
144  else return -999;
145  }
146  else if (_station == 1) {
147  if (_csc_ID < 4 && _strip > 127) return 4;
148  else if (_csc_ID < 4 && _strip >= 0) return 1;
149  else if (_csc_ID > 3 && _csc_ID < 7) return 2;
150  else if (_csc_ID > 6 && _csc_ID < 10) return 3;
151  else return -999;
152  }
153  else return -999;
154  } // End EMTFHit::calc_ring
int l1t::calc_sector_from_index ( int  index)
inline

Definition at line 33 of file EMTFTrackTools.h.

Referenced by L1TMuonEndCapTrackProducer::produce().

33 { return (index < 6) ? index + 1 : index - 5; }
int l1t::calc_sector_GMT ( int  _sector)
inline

Definition at line 32 of file EMTFTrackTools.h.

Referenced by l1t::EMTFTrack::ImportSP(), and L1TMuonEndCapTrackProducer::produce().

32 { return _sector - 1; }
int l1t::calc_subsector ( int  _station,
int  _chamber 
)
inline

Definition at line 12 of file EMTFHitTools.h.

Referenced by l1t::EMTFHit::ImportCSCCorrelatedLCTDigi().

12  { // Why does emulator have the following csc_ID dependence? - AWB 11.04.16
13  if ( _station == 1 ) return ( (_chamber % 6) > 2 ) ? 1 : 2; // "if(station == 1 && id > 3 && id < 7)" - AWB 11.04.16
14  else if ( _station < 0 || _chamber < 0 ) return -999; // Function works because first 3 chambers in sector 1 are 3/4/5,
15  else return -1; } // while the last 3 in sector 6 are 36/1/2
float l1t::calc_theta_deg ( float  _eta)
inline

Definition at line 19 of file EMTFTrackTools.h.

References JetChargeProducer_cfi::exp, and Geom::pi().

19 { return 2*atan( exp(-1*_eta) ) * (180/Geom::pi()); }
constexpr double pi()
Definition: Pi.h:31
float l1t::calc_theta_deg_from_int ( int  _theta_int)
inline

Definition at line 16 of file EMTFHitTools.h.

Referenced by L1TMuonEndCapTrackProducer::produce().

16 { return _theta_int * 0.2851562 + 8.5; }
float l1t::calc_theta_rad ( float  _eta)
inline

Definition at line 20 of file EMTFTrackTools.h.

References JetChargeProducer_cfi::exp.

20 { return 2*atan( exp(-1*_eta) ); }
float l1t::calc_theta_rad_from_int ( int  _theta_int)
inline

Definition at line 17 of file EMTFHitTools.h.

References Geom::pi().

Referenced by L1TMuonEndCapTrackProducer::produce().

17 { return (_theta_int * 0.2851562 + 8.5) * (Geom::pi() / 180); }
constexpr double pi()
Definition: Pi.h:31
int l1t::calc_uGMT_chamber ( int  _csc_ID,
int  _subsector,
int  _neighbor,
int  _station 
)

Definition at line 32 of file EMTFTrackTools.cc.

Referenced by l1t::stage2::emtf::SPBlockUnpacker::unpack().

32  {
33  if (_station == 1) {
34  if ( _csc_ID == 3 && _neighbor == 1 && _subsector == 2 ) return 1;
35  else if ( _csc_ID == 6 && _neighbor == 1 && _subsector == 2 ) return 2;
36  else if ( _csc_ID == 9 && _neighbor == 1 && _subsector == 2 ) return 3;
37  else if ( _csc_ID == 3 && _neighbor == 0 && _subsector == 2 ) return 4;
38  else if ( _csc_ID == 6 && _neighbor == 0 && _subsector == 2 ) return 5;
39  else if ( _csc_ID == 9 && _neighbor == 0 && _subsector == 2 ) return 6;
40  else return 0;
41  }
42  else {
43  if ( _csc_ID == 3 && _neighbor == 1 ) return 1;
44  else if ( _csc_ID == 9 && _neighbor == 1 ) return 2;
45  else if ( _csc_ID == 3 && _neighbor == 0 ) return 3;
46  else if ( _csc_ID == 9 && _neighbor == 0 ) return 4;
47  else return 0;
48  }
49  }
void l1t::calibrateAndRankJets ( CaloParamsHelper params,
const std::vector< l1t::Jet > *  input,
std::vector< l1t::Jet > *  output 
)

Definition at line 12 of file legacyGtHelper.cc.

References l1t::LUT::data(), stringResolutionProvider_cfi::eta, l1t::CaloParamsHelper::jetCalibrationLUT(), PFRecoTauDiscriminationByIsolation_cfi::offset, and EnergyCorrector::pt.

Referenced by l1t::Stage1Layer2JetAlgorithmImpSimpleHW::processEvent().

14  {
15 
16  for(std::vector<l1t::Jet>::const_iterator itJet = input->begin();
17  itJet != input->end(); ++itJet){
18  unsigned int pt = itJet->hwPt();
19  if(pt > ((1<<10) -1) )
20  pt = ((1<<10) -1);
21  unsigned int eta = itJet->hwEta();
22  if (eta>10){ // LUT is symmetric in eta. For eta>10 map to corresponding eta<10 bin
23  int offset=2*(eta-10)-1;
24  eta=eta-offset;
25  }
26  unsigned int lutAddress = (eta<<10)+pt;
27 
28  unsigned int rank = params->jetCalibrationLUT()->data(lutAddress);
29 
30  ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > ldummy(0,0,0,0);
31  l1t::Jet outJet(*&ldummy, rank, itJet->hwEta(), itJet->hwPhi(), itJet->hwQual());
32  output->push_back(outJet);
33  }
34  }
static std::string const input
Definition: EdmProvDump.cc:44
Definition: Jet.h:16
void l1t::calibrateAndRankTaus ( CaloParamsHelper params,
const std::vector< l1t::Tau > *  input,
std::vector< l1t::Tau > *  output 
)

Definition at line 36 of file legacyGtHelper.cc.

References l1t::LUT::data(), stringResolutionProvider_cfi::eta, EnergyCorrector::pt, and l1t::CaloParamsHelper::tauCalibrationLUT().

Referenced by l1t::Stage1Layer2TauAlgorithmImpHW::processEvent().

38  {
39 
40  for(std::vector<l1t::Tau>::const_iterator itTau = input->begin();
41  itTau != input->end(); ++itTau){
42  unsigned int pt = itTau->hwPt();
43  if(pt > ((1<<10) -1) )
44  pt = ((1<<10) -1);
45  unsigned int eta = itTau->hwEta();
46  unsigned int lutAddress = (eta<<10)+pt;
47 
48  unsigned int rank = params->tauCalibrationLUT()->data(lutAddress);
49 
50  ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > ldummy(0,0,0,0);
51  l1t::Tau outTau(*&ldummy, rank, itTau->hwEta(), itTau->hwPhi(), itTau->hwQual());
52  output->push_back(outTau);
53  }
54  }
Definition: Tau.h:16
static std::string const input
Definition: EdmProvDump.cc:44
template<class T >
T l1t::castTo ( const char *  arg)

Definition at line 133 of file Parameter.h.

133  {
134  return castTo_impl<T>(arg, std::is_integral<T>(), std::is_floating_point<T>());
135 }
A arg
Definition: Factorize.h:36
template<>
bool l1t::castTo< bool > ( const char *  arg)

Definition at line 80 of file Parameter.cc.

References NULL.

Referenced by l1t::Parameter::~Parameter().

80  {
81  if( strlen(arg) > 3 ){
82  // look for "true"
83  if( strstr(arg,"true") != NULL && strstr(arg,"false") == NULL ) return true;
84  // look for "false"
85  if( strstr(arg,"true") == NULL && strstr(arg,"false") != NULL ) return false;
86  }
87  // look for "a number
88  char *endptr = NULL;
89  long retval = strtol(arg,&endptr,0);
90  if( *endptr == '\0' ) return retval;
91  // nothing worked
92  throw runtime_error("Cannot convert '" + string(arg)+ "' to boolean");
93 }
#define NULL
Definition: scimark2.h:8
A arg
Definition: Factorize.h:36
template<>
char l1t::castTo< char > ( const char *  arg)

Definition at line 95 of file Parameter.cc.

References castTo< long long >().

Referenced by l1t::Parameter::~Parameter().

95 { return castTo<long long>(arg); }
A arg
Definition: Factorize.h:36
long long castTo< long long >(const char *arg)
Definition: Parameter.cc:72
template<>
double l1t::castTo< double > ( const char *  arg)

Definition at line 107 of file Parameter.cc.

References castTo< long double >().

Referenced by l1t::Parameter::~Parameter().

107 { return castTo<long double>(arg); }
long double castTo< long double >(const char *arg)
Definition: Parameter.cc:100
A arg
Definition: Factorize.h:36
template<>
float l1t::castTo< float > ( const char *  arg)

Definition at line 106 of file Parameter.cc.

References castTo< long double >().

Referenced by l1t::Parameter::~Parameter().

106 { return castTo<long double>(arg); }
long double castTo< long double >(const char *arg)
Definition: Parameter.cc:100
A arg
Definition: Factorize.h:36
template<>
int l1t::castTo< int > ( const char *  arg)

Definition at line 97 of file Parameter.cc.

References castTo< long long >().

Referenced by l1t::Parameter::~Parameter().

97 { return castTo<long long>(arg); }
A arg
Definition: Factorize.h:36
long long castTo< long long >(const char *arg)
Definition: Parameter.cc:72
template<>
long l1t::castTo< long > ( const char *  arg)

Definition at line 98 of file Parameter.cc.

References castTo< long long >().

Referenced by l1t::Parameter::~Parameter().

98 { return castTo<long long>(arg); }
A arg
Definition: Factorize.h:36
long long castTo< long long >(const char *arg)
Definition: Parameter.cc:72
template<>
long double l1t::castTo< long double > ( const char *  arg)

Definition at line 100 of file Parameter.cc.

References NULL.

Referenced by castTo< double >(), castTo< float >(), castTo_impl(), and l1t::Parameter::~Parameter().

100  {
101  char *endptr = NULL;
102  long double retval = strtold(arg,&endptr);
103  if( *endptr == '\0' ) return retval;
104  else throw runtime_error("Cannot convert '" + string(arg) + "' to floating point type");
105 }
#define NULL
Definition: scimark2.h:8
A arg
Definition: Factorize.h:36
template<>
long long l1t::castTo< long long > ( const char *  arg)

Definition at line 72 of file Parameter.cc.

References NULL.

Referenced by castTo< char >(), castTo< int >(), castTo< long >(), castTo< short >(), castToInt_impl(), and l1t::Parameter::~Parameter().

72  {
73  char *endptr = NULL;
74  long long retval = strtoll(arg,&endptr,0);
75  if( *endptr == '\0' ) return retval;
76  else throw runtime_error("Cannot convert '" + string(arg)+ "' to integral type");
77 }
#define NULL
Definition: scimark2.h:8
A arg
Definition: Factorize.h:36
template<>
short l1t::castTo< short > ( const char *  arg)

Definition at line 96 of file Parameter.cc.

References castTo< long long >().

Referenced by l1t::Parameter::~Parameter().

96 { return castTo<long long>(arg); }
A arg
Definition: Factorize.h:36
long long castTo< long long >(const char *arg)
Definition: Parameter.cc:72
template<>
unsigned char l1t::castTo< unsigned char > ( const char *  arg)

Definition at line 115 of file Parameter.cc.

References castTo< unsigned long long >().

Referenced by l1t::Parameter::~Parameter().

115 { return castTo<unsigned long long>(arg); }
A arg
Definition: Factorize.h:36
unsigned long long castTo< unsigned long long >(const char *arg)
Definition: Parameter.cc:109
template<>
unsigned int l1t::castTo< unsigned int > ( const char *  arg)

Definition at line 117 of file Parameter.cc.

References castTo< unsigned long long >().

Referenced by l1t::Parameter::~Parameter().

117 { return castTo<unsigned long long>(arg); }
A arg
Definition: Factorize.h:36
unsigned long long castTo< unsigned long long >(const char *arg)
Definition: Parameter.cc:109
template<>
unsigned long l1t::castTo< unsigned long > ( const char *  arg)

Definition at line 118 of file Parameter.cc.

References castTo< unsigned long long >().

Referenced by l1t::Parameter::~Parameter().

118 { return castTo<unsigned long long>(arg); }
A arg
Definition: Factorize.h:36
unsigned long long castTo< unsigned long long >(const char *arg)
Definition: Parameter.cc:109
template<>
unsigned long long l1t::castTo< unsigned long long > ( const char *  arg)

Definition at line 109 of file Parameter.cc.

References NULL.

Referenced by castTo< unsigned char >(), castTo< unsigned int >(), castTo< unsigned long >(), castTo< unsigned short >(), castToInt_impl(), and l1t::Parameter::~Parameter().

109  {
110  char *endptr = NULL;
111  unsigned long long retval = strtoull(arg,&endptr,0);
112  if( *endptr == '\0' ) return retval;
113  else throw runtime_error("Cannot convert '" + string(arg)+ "' to unsigned integral type");
114 }
#define NULL
Definition: scimark2.h:8
A arg
Definition: Factorize.h:36
template<>
unsigned short l1t::castTo< unsigned short > ( const char *  arg)

Definition at line 116 of file Parameter.cc.

References castTo< unsigned long long >().

Referenced by l1t::Parameter::~Parameter().

116 { return castTo<unsigned long long>(arg); }
A arg
Definition: Factorize.h:36
unsigned long long castTo< unsigned long long >(const char *arg)
Definition: Parameter.cc:109
template<class T >
T l1t::castTo_impl ( const char *  arg,
std::true_type  ,
std::false_type   
)

Definition at line 137 of file Parameter.h.

Referenced by l1t::Parameter::~Parameter().

137  {
138  return castToInt_impl<T>(arg, std::is_unsigned<T>());
139 }
A arg
Definition: Factorize.h:36
template<class T >
T l1t::castTo_impl ( const char *  arg,
std::false_type  ,
std::true_type   
)

Definition at line 149 of file Parameter.h.

References castTo< long double >().

149  {
150  return castTo<long double>(arg);
151 }
long double castTo< long double >(const char *arg)
Definition: Parameter.cc:100
A arg
Definition: Factorize.h:36
template<class T >
T l1t::castTo_impl ( const char *  arg,
std::false_type  ,
std::false_type   
)

Definition at line 153 of file Parameter.h.

153  {
154  return T(arg);
155 }
A arg
Definition: Factorize.h:36
long double T
template<class T >
T l1t::castToInt_impl ( const char *  arg,
std::true_type   
)

Definition at line 141 of file Parameter.h.

References castTo< unsigned long long >().

Referenced by l1t::Parameter::~Parameter().

141  {
143 }
A arg
Definition: Factorize.h:36
unsigned long long castTo< unsigned long long >(const char *arg)
Definition: Parameter.cc:109
template<class T >
T l1t::castToInt_impl ( const char *  arg,
std::false_type   
)

Definition at line 145 of file Parameter.h.

References castTo< long long >().

145  {
146  return castTo<long long>(arg);
147 }
A arg
Definition: Factorize.h:36
long long castTo< long long >(const char *arg)
Definition: Parameter.cc:72
unsigned int l1t::convertFromHexStringToInt ( const std::string &  aHexString)

Definition at line 46 of file Tools.cc.

References mps_fire::i, funct::pow(), and AlCaHLTBitMon_QueryRunRegistry::string.

47 {
48  std::map<std::string, int> hexnums;
49  std::string strHexNums("0123456789ABCDEF");
50  for(unsigned int i=0; i<strHexNums.size(); i++)
51  hexnums[strHexNums.substr(i,1)] = i;
52  unsigned int tempNum(0);
53  for (unsigned int i=aHexString.size()-1; i>=2; i--)
54  tempNum += hexnums[aHexString.substr(i,1)]*pow(16,(aHexString.size()-1-i));
55 
56  return tempNum;
57 }
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
l1t::LUT l1t::convertToLUT ( const std::vector< uint64_t > &  v,
int  padding = -1 
)
noexcept

Definition at line 10 of file ConvertToLUT.h.

References mps_fire::i, lumiPlot::lut, and l1t::LUT::read().

Referenced by convertToLUT(), L1TMuonGlobalParamsHelper::loadFromOnline(), and readCaloLayer2OnlineSettings().

10  {
11 
12  unsigned int addrWidth = ( 32 - __builtin_clz( uint32_t(v.size()-1) ) );
13  std::stringstream oss;
14  oss << "#<header> V1 " << addrWidth << " 31 </header> " << std::endl; // hardcode 32 bits for data
15  for(unsigned int i=0; i<v.size(); i++) oss << i << " " << v[i] << std::endl;
16  // add padding to 2^addrWidth rows
17  if( padding >=0 )
18  for(unsigned int i=v.size(); i<(size_t)(1<<addrWidth); i++)
19  oss << i << " " << padding << std::endl;
20 
21  l1t::LUT lut;
22  lut.read(oss);
23 
24  return lut;
25 }
int read(std::istream &stream)
Definition: LUT.cc:35
Definition: LUT.h:29
l1t::LUT l1t::convertToLUT ( const std::vector< char > &  v,
int  padding = -1 
)
noexcept

Definition at line 27 of file ConvertToLUT.h.

References convertToLUT().

27  {
28  return convertToLUT(std::vector<uint64_t>(v.begin(),v.end()), padding);
29 }
l1t::LUT convertToLUT(const std::vector< unsigned int > &v, int padding=-1) noexcept
Definition: ConvertToLUT.h:48
l1t::LUT l1t::convertToLUT ( const std::vector< short > &  v,
int  padding = -1 
)
noexcept

Definition at line 30 of file ConvertToLUT.h.

References convertToLUT().

30  {
31  return convertToLUT(std::vector<uint64_t>(v.begin(),v.end()), padding);
32 }
l1t::LUT convertToLUT(const std::vector< unsigned int > &v, int padding=-1) noexcept
Definition: ConvertToLUT.h:48
l1t::LUT l1t::convertToLUT ( const std::vector< int > &  v,
int  padding = -1 
)
noexcept

Definition at line 33 of file ConvertToLUT.h.

References convertToLUT().

33  {
34  return convertToLUT(std::vector<uint64_t>(v.begin(),v.end()), padding);
35 }
l1t::LUT convertToLUT(const std::vector< unsigned int > &v, int padding=-1) noexcept
Definition: ConvertToLUT.h:48
l1t::LUT l1t::convertToLUT ( const std::vector< long > &  v,
int  padding = -1 
)
noexcept

Definition at line 36 of file ConvertToLUT.h.

References convertToLUT().

36  {
37  return convertToLUT(std::vector<uint64_t>(v.begin(),v.end()), padding);
38 }
l1t::LUT convertToLUT(const std::vector< unsigned int > &v, int padding=-1) noexcept
Definition: ConvertToLUT.h:48
l1t::LUT l1t::convertToLUT ( const std::vector< long long > &  v,
int  padding = -1 
)
noexcept

Definition at line 39 of file ConvertToLUT.h.

References convertToLUT().

39  {
40  return convertToLUT(std::vector<uint64_t>(v.begin(),v.end()), padding);
41 }
l1t::LUT convertToLUT(const std::vector< unsigned int > &v, int padding=-1) noexcept
Definition: ConvertToLUT.h:48
l1t::LUT l1t::convertToLUT ( const std::vector< unsigned char > &  v,
int  padding = -1 
)
noexcept

Definition at line 42 of file ConvertToLUT.h.

References convertToLUT().

42  {
43  return convertToLUT(std::vector<uint64_t>(v.begin(),v.end()), padding);
44 }
l1t::LUT convertToLUT(const std::vector< unsigned int > &v, int padding=-1) noexcept
Definition: ConvertToLUT.h:48
l1t::LUT l1t::convertToLUT ( const std::vector< unsigned short > &  v,
int  padding = -1 
)
noexcept

Definition at line 45 of file ConvertToLUT.h.

References convertToLUT().

45  {
46  return convertToLUT(std::vector<uint64_t>(v.begin(),v.end()), padding);
47 }
l1t::LUT convertToLUT(const std::vector< unsigned int > &v, int padding=-1) noexcept
Definition: ConvertToLUT.h:48
l1t::LUT l1t::convertToLUT ( const std::vector< unsigned int > &  v,
int  padding = -1 
)
noexcept

Definition at line 48 of file ConvertToLUT.h.

References convertToLUT().

48  {
49  return convertToLUT(std::vector<uint64_t>(v.begin(),v.end()), padding);
50 }
l1t::LUT convertToLUT(const std::vector< unsigned int > &v, int padding=-1) noexcept
Definition: ConvertToLUT.h:48
template<class varType >
varType l1t::convertVariable ( const std::string &  aVar)

Definition at line 20 of file Tools.h.

References MillePedeFileConverter_cfg::e, cppFunctionSkipper::exception, mps_fire::i, NULL, AlCaHLTBitMon_QueryRunRegistry::string, and groupFilesInBlocks::temp.

21 {
22  varType temp;
23  try{
24  temp = boost::lexical_cast<varType>(aVar);
25  }
26  catch (std::exception& e)
27  {
28  std::map<std::string, int> hexnums;
29  std::string strHexNums("0123456789ABCDEFabcdef");
30  for(unsigned int i=0; i<strHexNums.size(); i++)
31  hexnums[strHexNums.substr(i,1)] = i;
32  char *endptr = NULL;
33  if ( aVar.substr(0,2) == "0x" && aVar.substr(2,aVar.size()).find_first_not_of(strHexNums) == std::string::npos)
34  temp = strtol(aVar.c_str(),&endptr,0);//convertFromHexStringToInt(aVar);
35  else
36  throw std::runtime_error(std::string("Method convertVariable error: ") + e.what());
37  }
38 
39  return temp;
40 }
#define NULL
Definition: scimark2.h:8
int l1t::deltaGctPhi ( const CaloRegion region,
const CaloRegion neighbor 
)

Definition at line 18 of file JetFinderMethods.cc.

References funct::abs(), mps_update::diff, l1t::L1Candidate::hwPhi(), and L1CaloRegionDetId::N_PHI.

Referenced by slidingWindowJetFinder(), TwelveByTwelveFinder(), and TwoByTwoFinder().

19  {
20  int phi1 = region.hwPhi();
21  int phi2 = neighbor.hwPhi();
22  int diff = phi1 - phi2;
23  if (std::abs(phi1 - phi2) == L1CaloRegionDetId::N_PHI-1) { //18 regions in phi
24  diff = -diff/std::abs(diff);
25  }
26  return diff;
27  }
bool neighbor(int endcap, int sector, int SectIndex, int id, int sub, int station)
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
static const unsigned N_PHI
void l1t::EGammaToGtScales ( CaloParamsHelper params,
const std::vector< l1t::EGamma > *  input,
std::vector< l1t::EGamma > *  output 
)

Definition at line 99 of file legacyGtHelper.cc.

References gtEta().

Referenced by l1t::Stage1Layer2EGammaAlgorithmImpPP::processEvent(), l1t::Stage1Layer2EGammaAlgorithmImpHI::processEvent(), and l1t::Stage1Layer2EGammaAlgorithmImpHW::processEvent().

101  {
102 
103  for(std::vector<l1t::EGamma>::const_iterator itEGamma = input->begin();
104  itEGamma != input->end(); ++itEGamma){
105  unsigned newEta = gtEta(itEGamma->hwEta());
106  unsigned newPhi = itEGamma->hwPhi();
107  const uint16_t rankPt = (uint16_t)itEGamma->hwPt(); //max value?
108 
109  //hwQual &10 == 10 means that the object came from a sort and is padding
110  if((itEGamma->hwQual() & 0x10) == 0x10)
111  {
112  newEta = 0x0;
113  newPhi = 0x0;
114  }
115 
116  ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > ldummy(0,0,0,0);
117 
118  l1t::EGamma gtEGamma(*&ldummy, rankPt, newEta, newPhi,
119  itEGamma->hwQual(), itEGamma->hwIso());
120  output->push_back(gtEGamma);
121  }
122  }
const unsigned int gtEta(const unsigned int iEta)
static std::string const input
Definition: EdmProvDump.cc:44
void l1t::EtSumToGtScales ( CaloParamsHelper params,
const std::vector< l1t::EtSum > *  input,
std::vector< l1t::EtSum > *  output 
)

Definition at line 165 of file legacyGtHelper.cc.

References L1Analysis::kMissingHt.

Referenced by l1t::Stage1Layer2EtSumAlgorithmImpPP::processEvent(), l1t::Stage1Layer2EtSumAlgorithmImpHW::processEvent(), and l1t::Stage1Layer2EtSumAlgorithmImpHI::processEvent().

167  {
168  for(std::vector<l1t::EtSum>::const_iterator itEtSum = input->begin();
169  itEtSum != input->end(); ++itEtSum){
170 
171  uint16_t rankPt;
172  // Hack for now to make sure they come out with the right scale
173  //rankPt = params->jetScale().rank((uint16_t)itEtSum->hwPt());
174  rankPt = (uint16_t)itEtSum->hwPt();
175  if (EtSum::EtSumType::kMissingHt == itEtSum->getType())
176  {
177  // if(rankPt > params->HtMissScale().linScaleMax()) rankPt = params->HtMissScale().linScaleMax();
178  // params->HtMissScale().linScaleMax() always returns zero. Hardcode 512 for now
179 
180  // comment out for mht/ht (already in GT scale)
181  //if(rankPt > 512) rankPt = 512;
182  //rankPt = params->HtMissScale().rank(rankPt*params->emScale().linearLsb());
183  }
184 
185  ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > ldummy(0,0,0,0);
186 
187  l1t::EtSum gtEtSum(*&ldummy, itEtSum->getType(), rankPt, 0,
188  itEtSum->hwPhi(), itEtSum->hwQual());
189 
190  output->push_back(gtEtSum);
191  }
192  }
static std::string const input
Definition: EdmProvDump.cc:44
void l1t::getBXRange ( int  nbx,
int &  first,
int &  last 
)
const unsigned int l1t::gtEta ( const unsigned int  iEta)

Definition at line 194 of file legacyGtHelper.cc.

Referenced by EGammaToGtScales(), JetToGtEtaScales(), l1t::Stage2Layer2DemuxJetAlgoFirmwareImp1::processEvent(), and TauToGtEtaScales().

195  {
196  unsigned rctEta = (iEta<11 ? 10-iEta : iEta-11);
197  return (((rctEta % 7) & 0x7) | (iEta<11 ? 0x8 : 0));
198  }
unsigned char l1t::hgcal_bad_codec ( 0xff  )
void l1t::HICaloRingSubtraction ( const std::vector< l1t::CaloRegion > &  regions,
std::vector< l1t::CaloRegion > *  subRegions,
CaloParamsHelper params 
)

------------— For heavy ion ----------------------------------—

Definition at line 19 of file PUSubtractionMethods.cc.

References mps_fire::i, hpstanc_transforms::max, and L1CaloRegionDetId::N_ETA.

Referenced by l1t::Stage1Layer2SingleTrackHI::processEvent(), l1t::Stage1Layer2JetAlgorithmImpHI::processEvent(), and RegionCorrection().

22  {
23  int puLevelHI[L1CaloRegionDetId::N_ETA];
24 
25  for(unsigned i = 0; i < L1CaloRegionDetId::N_ETA; ++i)
26  {
27  puLevelHI[i] = 0;
28  }
29 
30  for(std::vector<CaloRegion>::const_iterator region = regions.begin();
31  region != regions.end(); region++){
32  puLevelHI[region->hwEta()] += region->hwPt();
33  }
34 
35  for(unsigned i = 0; i < L1CaloRegionDetId::N_ETA; ++i)
36  {
37  //puLevelHI[i] = floor(((double)puLevelHI[i] / (double)L1CaloRegionDetId::N_PHI)+0.5);
38  puLevelHI[i] = (puLevelHI[i] + 9) * 455 / (1 << 13); // approx equals X/18 +0.5
39  }
40 
41  for(std::vector<CaloRegion>::const_iterator region = regions.begin(); region!= regions.end(); region++){
42  int subPt = std::max(0, region->hwPt() - puLevelHI[region->hwEta()]);
43  int subEta = region->hwEta();
44  int subPhi = region->hwPhi();
45 
46 
47  ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > ldummy(0,0,0,0);
48 
49  CaloRegion newSubRegion(*&ldummy, 0, 0, subPt, subEta, subPhi, region->hwQual(), region->hwEtEm(), region->hwEtHad());
50  subRegions->push_back(newSubRegion);
51  }
52  }
static const unsigned N_ETA
void l1t::JetCalibration ( std::vector< l1t::Jet > *  uncalibjets,
std::vector< double >  jetCalibrationParams,
std::vector< l1t::Jet > *  jets,
std::string  jetCalibrationType,
double  jetLSB 
)

Definition at line 12 of file JetCalibrationMethods.cc.

References alpha, CustomPhysics_cfi::gamma, createfilelist::int, reco::btau::jetEta, reco::btau::jetPhi, and reco::btau::jetPt.

Referenced by l1t::Stage1Layer2EtSumAlgorithmImpPP::processEvent(), and l1t::Stage1Layer2JetAlgorithmImpPP::processEvent().

17  {
18 
19  for (std::vector<l1t::Jet>::const_iterator uncalibjet = uncalibjets->begin(); uncalibjet != uncalibjets->end(); ++uncalibjet){
20 
21  if (jetCalibrationType == "None") {
22  l1t::Jet corrjets = *uncalibjet;
23  jets->push_back(corrjets);
24  continue;
25  }
26 
27  if (jetCalibrationType == "Stage1JEC") {
28  int jetPt = (uncalibjet->hwPt())*jetLSB; // correction factors are parameterized as functions of physical pt
29  int jetPhi = uncalibjet->hwPhi();
30  int jetEta = uncalibjet->hwEta();
31  int jetQual = uncalibjet->hwQual();
32  double jpt = 0.0;
33 
34  double alpha = jetCalibrationParams[2*jetEta + 0]; //Scale factor (See jetSF_cfi.py)
35  double gamma = ((jetCalibrationParams[2*jetEta + 1])); //Offset
36 
37  jpt = jetPt*alpha+gamma;
38  unsigned int corjetET =(int) (jpt/jetLSB);
39 
40  ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > jetLorentz(0,0,0,0);
41  l1t::Jet corrjets(*&jetLorentz, corjetET, jetEta, jetPhi, jetQual);
42 
43  jets->push_back(corrjets);
44  }
45  }
46  }
float alpha
Definition: AMPTWrapper.h:95
Definition: Jet.h:16
vector< PseudoJet > jets
void l1t::JetToGtEtaScales ( CaloParamsHelper params,
const std::vector< l1t::Jet > *  input,
std::vector< l1t::Jet > *  output 
)

Definition at line 57 of file legacyGtHelper.cc.

References gtEta(), and gtJet.

Referenced by l1t::Stage1Layer2JetAlgorithmImpHI::processEvent(), l1t::Stage1Layer2JetAlgorithmImpPP::processEvent(), and l1t::Stage1Layer2JetAlgorithmImpSimpleHW::processEvent().

59  {
60 
61  for(std::vector<l1t::Jet>::const_iterator itJet = input->begin();
62  itJet != input->end(); ++itJet){
63  unsigned newPhi = itJet->hwPhi();
64  unsigned newEta = gtEta(itJet->hwEta());
65 
66  // jets with hwQual & 10 ==10 are "padding" jets from a sort, set their eta and phi
67  // to the max value
68  if((itJet->hwQual() & 0x10) == 0x10)
69  {
70  newEta = 0x0;
71  newPhi = 0x0;
72  }
73 
74  ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > ldummy(0,0,0,0);
75 
76  l1t::Jet gtJet(*&ldummy, itJet->hwPt(), newEta, newPhi, itJet->hwQual());
77  output->push_back(gtJet);
78  }
79  }
const unsigned int gtEta(const unsigned int iEta)
static std::string const input
Definition: EdmProvDump.cc:44
Definition: Jet.h:16
void l1t::JetToGtPtScales ( CaloParamsHelper params,
const std::vector< l1t::Jet > *  input,
std::vector< l1t::Jet > *  output 
)

Definition at line 81 of file legacyGtHelper.cc.

References gtJet, l1t::CaloParamsHelper::jetScale(), L1CaloEtScale::linScaleMax(), and L1CaloEtScale::rank().

Referenced by l1t::Stage1Layer2JetAlgorithmImpHI::processEvent(), and l1t::Stage1Layer2JetAlgorithmImpPP::processEvent().

83  {
84 
85  for(std::vector<l1t::Jet>::const_iterator itJet = input->begin();
86  itJet != input->end(); ++itJet){
87  uint16_t linPt = (uint16_t)itJet->hwPt();
88  if(linPt > params->jetScale().linScaleMax() ) linPt = params->jetScale().linScaleMax();
89  const uint16_t rankPt = params->jetScale().rank(linPt);
90 
91  ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > ldummy(0,0,0,0);
92 
93  l1t::Jet gtJet(*&ldummy, rankPt, itJet->hwEta(), itJet->hwPhi(), itJet->hwQual());
94  output->push_back(gtJet);
95  }
96  }
static std::string const input
Definition: EdmProvDump.cc:44
Definition: Jet.h:16
std::string l1t::l1GtBoardTypeEnumToString ( const L1GtBoardType boardType)

Definition at line 110 of file GlobalDefinitions.cc.

References BoardNull, and mps_fire::result.

110  {
111  char const *result= valueToKey(boardType, l1GtBoardTypeStringToEnumMap);
112  if (boardType == l1t::BoardNull) {
113  edm::LogInfo("L1TGlobal")
114  << "\n l1t::BoardNull means no valid board type defined!";
115  }
116  if (!result) {
117  edm::LogInfo("L1TGlobal") << "\n '" << boardType
118  << "' is not a recognized l1t::L1GtBoardType. "
119  << "\n Return l1t::BoardNull, which means no valid board type defined!";
120  return "l1t::BoardNull";
121  }
122  return result;
123 }
l1t::L1GtBoardType l1t::l1GtBoardTypeStringToEnum ( const std::string &  label)

Definition at line 94 of file GlobalDefinitions.cc.

References BoardNull, BoardNull, and relativeConstraints::value.

94  {
95  l1t::L1GtBoardType value = keyToValue(label.c_str(), l1GtBoardTypeStringToEnumMap);
96  if (value == (l1t::L1GtBoardType) - 1) {
97  edm::LogInfo("L1TGlobal") << "\n '" << label
98  << "' is not a recognized l1t::L1GtBoardType. \n Return l1t::BoardNull.";
99  value = l1t::BoardNull;
100  }
101 
102  if (value == l1t::BoardNull) {
103  edm::LogInfo("L1TGlobal")
104  << "\n l1t::BoardNull means no valid board type defined!";
105  }
106 
107  return value;
108 }
L1GtBoardType
board types in GT
Definition: value.py:1
std::string l1t::l1GtConditionCategoryEnumToString ( const GtConditionCategory conditionCategory)

Definition at line 182 of file GlobalDefinitions.cc.

References CondNull, and mps_fire::result.

182  {
183  char const *result = valueToKey(conditionCategory, l1GtConditionCategoryStringToEnumMap);
184  if (conditionCategory == l1t::CondNull)
185  edm::LogInfo("L1TGlobal")
186  << "\n Return l1t::CondNull, which means no valid condition category defined!";
187 
188  if (!result) {
189  result = "l1t::CondNull";
190  edm::LogInfo("L1TGlobal") << "\n '" << conditionCategory
191  << "' is not a recognized l1t::GtConditionCategory. "
192  << "\n Return l1t::CondNull, which means no valid condition category defined!";
193  }
194 
195  return result;
196 }
l1t::GtConditionCategory l1t::l1GtConditionCategoryStringToEnum ( const std::string &  label)

Definition at line 163 of file GlobalDefinitions.cc.

References CondNull, CondNull, and relativeConstraints::value.

163  {
164  l1t::GtConditionCategory value = keyToValue(label.c_str(), l1GtConditionCategoryStringToEnumMap);
165  // in case of unrecognized l1t::GtConditionCategory, return l1t::CondNull
166  // to be dealt by the corresponding module
167  if (value == (l1t::GtConditionCategory) -1) {
168  edm::LogInfo("L1TGlobal") << "\n '" << label
169  << "' is not a recognized l1t::GtConditionCategory. \n Return l1t::CondNull.";
170 
171  value = l1t::CondNull;
172  }
173 
174  if (value == l1t::CondNull) {
175  edm::LogInfo("L1TGlobal")
176  << "\n l1t::CondNull means no valid condition category defined!";
177  }
178 
179  return value;
180 }
GtConditionCategory
condition categories
Definition: value.py:1
std::string l1t::l1GtConditionTypeEnumToString ( const GtConditionType conditionType)

Definition at line 149 of file GlobalDefinitions.cc.

References mps_fire::result, and TypeNull.

149  {
150  const char *result = valueToKey(conditionType, l1GtConditionTypeStringToEnumMap);
151  if (conditionType == l1t::TypeNull)
152  edm::LogInfo("L1TGlobal")
153  << "\n Return l1t::TypeNull, which means no valid condition type defined!";
154  if (!result) {
155  result = "l1t::TypeNull";
156  edm::LogInfo("L1TGlobal") << "\n '" << conditionType
157  << "' is not a recognized l1t::GtConditionType. "
158  << "\n Return l1t::TypeNull, which means no valid condition type defined!";
159  }
160  return result;
161 }
l1t::GtConditionType l1t::l1GtConditionTypeStringToEnum ( const std::string &  label)

Definition at line 129 of file GlobalDefinitions.cc.

References TypeNull, TypeNull, and relativeConstraints::value.

129  {
130  l1t::GtConditionType value = keyToValue(label.c_str(), l1GtConditionTypeStringToEnumMap);
131 
132  // in case of unrecognized l1t::GtConditionType, return l1t::TypeNull
133  // to be dealt by the corresponding module
134  if (value == (l1t::GtConditionType) -1) {
135  edm::LogInfo("L1TGlobal") << "\n '" << label
136  << "' is not a recognized l1t::GtConditionType. \n Return l1t::TypeNull.";
137 
138  value = l1t::TypeNull;
139  }
140 
141  if (value == l1t::TypeNull) {
142  edm::LogInfo("L1TGlobal")
143  << "\n l1t::TypeNull means no valid condition type defined!";
144  }
145 
146  return value;
147 }
Definition: value.py:1
std::string l1t::l1TGtObjectEnumToString ( const GlobalObject gtObject)

Definition at line 78 of file GlobalObject.cc.

References gtEG, gtETM, gtETMHF, gtETT, gtETTem, gtExternal, gtHTM, gtHTT, gtJet, gtMinBiasHFM0, gtMinBiasHFM1, gtMinBiasHFP0, gtMinBiasHFP1, gtMu, gtTau, gtTowerCount, ObjNull, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by l1t::CorrCondition::evaluateCondition(), and l1t::CorrWithOverlapRemovalCondition::evaluateCondition().

78  {
79 
80  std::string gtObjectString;
81 
82  switch (gtObject) {
83 
84  case gtMu: {
85  gtObjectString = "Mu";
86  }
87  break;
88 
89  case gtEG: {
90  gtObjectString = "EG";
91  }
92  break;
93 
94  case gtTau: {
95  gtObjectString = "Tau";
96  }
97  break;
98 
99  case gtJet: {
100  gtObjectString = "Jet";
101  }
102  break;
103 
104  case gtETM: {
105  gtObjectString = "ETM";
106  }
107  break;
108 
109  case gtETT: {
110  gtObjectString = "ETT";
111  }
112  break;
113 
114  case gtHTT: {
115  gtObjectString = "HTT";
116  }
117  break;
118 
119  case gtHTM: {
120  gtObjectString = "HTM";
121  }
122  break;
123 
124  case gtETMHF: {
125  gtObjectString = "ETMHF";
126  }
127  break;
128 
129  case gtTowerCount: {
130  gtObjectString = "TowerCount";
131  }
132  break;
133 
134  case gtMinBiasHFP0: {
135  gtObjectString = "MinBiasHFP0";
136  }
137  break;
138 
139  case gtMinBiasHFM0: {
140  gtObjectString = "MinBiasHFM0";
141  }
142  break;
143 
144  case gtMinBiasHFP1: {
145  gtObjectString = "MinBiasHFP1";
146  }
147  break;
148 
149  case gtMinBiasHFM1: {
150  gtObjectString = "MinBiasHFM1";
151  }
152  break;
153 
154  case gtETTem: {
155  gtObjectString = "ETTem";
156  }
157  break;
158 
159  case gtExternal: {
160  gtObjectString = "External";
161  }
162  break;
163 
164  case ObjNull: {
165  gtObjectString = "ObjNull";
166  edm::LogInfo("L1TGlobal")
167  << "\n ObjNull means no valid GlobalObject defined!";
168  }
169  break;
170 
171  default: {
172  edm::LogInfo("L1TGlobal") << "\n '" << gtObject
173  << "' is not a recognized GlobalObject. "
174  << "\n Return ObjNull, which means no valid GlobalObject defined!";
175 
176  gtObjectString = "ObjNull";
177 
178  }
179  break;
180  }
181 
182  return gtObjectString;
183 
184 }
l1t::GlobalObject l1t::l1TGtObjectStringToEnum ( const std::string &  )

Definition at line 27 of file GlobalObject.cc.

References runEdmFileComparison::found, gtEG, gtETM, gtETMHF, gtETT, gtETTem, gtExternal, gtHTM, gtHTT, gtJet, gtMinBiasHFM0, gtMinBiasHFM1, gtMinBiasHFP0, gtMinBiasHFP1, gtMu, gtTau, gtTowerCount, mps_fire::i, l1t::L1TGtObjectStringToEnum::label, ObjNull, l1t::L1TGtObjectStringToEnum::value, and relativeConstraints::value.

27  {
28 
29 
30 
31  static const l1t::L1TGtObjectStringToEnum l1TGtObjectStringToEnumMap[] = {
32  {"Mu", gtMu},
33  {"EG", gtEG},
34  {"Tau", gtTau},
35  {"Jet", gtJet},
36  {"ETM", gtETM},
37  {"ETT", gtETT},
38  {"HTT", gtHTT},
39  {"HTM", gtHTM},
40  {"ETMHF", gtETMHF},
41  {"TowerCount",gtTowerCount},
42  {"MinBiasHFP0", gtMinBiasHFP0},
43  {"MinBiasHFM0", gtMinBiasHFM0},
44  {"MinBiasHFP1", gtMinBiasHFP1},
45  {"MinBiasHFM1", gtMinBiasHFM1},
46  {"ETTem", gtETTem},
47  {"External", gtExternal},
48  {"ObjNull", ObjNull},
49  {0, (GlobalObject) - 1}
50  };
51 
53 
54  bool found = false;
55  for (int i = 0; l1TGtObjectStringToEnumMap[i].label && (!found); ++i)
56  if (!std::strcmp(label.c_str(), l1TGtObjectStringToEnumMap[i].label)) {
57  found = true;
58  value = l1TGtObjectStringToEnumMap[i].value;
59  }
60 
61  // in case of unrecognized GlobalObject, returns Mu
62  // and write a warning (to not throw an exception)
63  if (!found) {
64  edm::LogInfo("L1TGlobal") << "\n '" << label
65  << "' is not a recognized GlobalObject. \n Return ObjNull.";
66 
67  value = ObjNull;
68  }
69 
70  if (value == ObjNull) {
71  edm::LogInfo("L1TGlobal")
72  << "\n ObjNull means no valid GlobalObject defined!";
73  }
74 
75  return value;
76 }
GlobalObject
Definition: GlobalObject.h:16
the string to enum and enum to string conversions for GlobalObject
Definition: GlobalObject.h:39
Definition: value.py:1
std::ostream & l1t::operator<< ( std::ostream &  os,
const l1t::CaloParamsHelper p 
)

Definition at line 17 of file CaloParamsHelper.cc.

17  {
18  return os << "CaloParamsHelper...";
19  }
bool l1t::operator> ( const l1t::Tau a,
const l1t::Tau b 
)

Definition at line 16 of file Stage2Layer2TauAlgorithmFirmwareImp1.cc.

References reco::LeafCandidate::pt().

17  {
18  return a.pt() > b.pt();
19  }
virtual double pt() const final
transverse momentum
bool l1t::operator> ( const l1t::EGamma a,
const l1t::EGamma b 
)

Definition at line 18 of file Stage2Layer2EGammaAlgorithmFirmwareImp1.cc.

References reco::LeafCandidate::pt().

19  {
20  return a.pt() > b.pt();
21  }
virtual double pt() const final
transverse momentum
bool l1t::operator> ( l1t::EGamma a,
l1t::EGamma b 
)
inline

Definition at line 18 of file Stage2Layer2DemuxEGAlgoFirmwareImp1.cc.

References l1t::L1Candidate::hwEta(), l1t::L1Candidate::hwPhi(), and reco::LeafCandidate::pt().

19  {
20  if ( a.pt() == b.pt() ){
21  if( a.hwPhi() == b.hwPhi() ){
22  return a.hwEta() > b.hwEta();
23  }
24  else{
25  return a.hwPhi() > b.hwPhi();
26  }
27 
28  }
29  else{
30  return a.pt() > b.pt();
31  }
32  }
virtual double pt() const final
transverse momentum
int hwPhi() const
Definition: L1Candidate.h:50
int hwEta() const
Definition: L1Candidate.h:49
bool l1t::operator> ( l1t::Tau a,
l1t::Tau b 
)
inline

Definition at line 18 of file Stage2Layer2DemuxTauAlgoFirmwareImp1.cc.

References l1t::L1Candidate::hwEta(), l1t::L1Candidate::hwPhi(), and reco::LeafCandidate::pt().

19  {
20  if ( a.pt() == b.pt() ){
21  if( a.hwPhi() == b.hwPhi() ){
22  return a.hwEta() > b.hwEta();
23  }
24  else{
25  return a.hwPhi() > b.hwPhi();
26  }
27 
28  }
29  else{
30  return a.pt() > b.pt();
31  }
32  }
virtual double pt() const final
transverse momentum
int hwPhi() const
Definition: L1Candidate.h:50
int hwEta() const
Definition: L1Candidate.h:49
bool l1t::operator> ( const l1t::Jet a,
l1t::Jet b 
)

Definition at line 22 of file Stage2Layer2JetAlgorithmFirmwareImp1.cc.

References l1t::L1Candidate::hwPt().

22  {
23  return a.hwPt() > b.hwPt();
24  }
int hwPt() const
Definition: L1Candidate.h:48
unsigned int l1t::pack15bits ( int  pt,
int  eta,
int  phi 
)

Definition at line 19 of file HardwareSortingMethods.cc.

20  {
21  return( ((pt & 0x3f)) + ((eta & 0xf) << 6) + ((phi & 0x1f) << 10));
22  }
unsigned int l1t::pack16bits ( int  pt,
int  eta,
int  phi 
)

Definition at line 24 of file HardwareSortingMethods.cc.

25  {
26  return( 0x8000 + ((pt & 0x3f)) + ((eta & 0xf) << 6) + ((phi & 0x1f) << 10));
27  }
unsigned int l1t::pack16bitsEgammaSpecial ( int  pt,
int  eta,
int  phi 
)

Definition at line 29 of file HardwareSortingMethods.cc.

30  {
31  return( 0x8000 + ((pt & 0x3f) << 9) + ((eta & 0xf)) + ((phi & 0x1f) << 4));
32  }
void l1t::passThroughJets ( const std::vector< l1t::CaloRegion > *  regions,
std::vector< l1t::Jet > *  uncalibjets 
)

Definition at line 30 of file JetFinderMethods.cc.

References reco::btau::jetEta, and reco::btau::jetPhi.

32  {
33  for(std::vector<CaloRegion>::const_iterator region = regions->begin(); region != regions->end(); region++) {
34  int jetQual = 0;
35  if( region->hwEta() < 4 || region->hwEta() > 17)
36  jetQual = 2;
37  int jetET = region->hwPt();
38  int jetEta = region->hwEta();
39  int jetPhi = region->hwPhi();
40 
41  ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > jetLorentz(0,0,0,0);
42  l1t::Jet theJet(*&jetLorentz, jetET, jetEta, jetPhi, jetQual);
43  uncalibjets->push_back(theJet);
44  }
45  }
Definition: Jet.h:16
void l1t::RegionCorrection ( const std::vector< l1t::CaloRegion > &  regions,
std::vector< l1t::CaloRegion > *  subRegions,
CaloParamsHelper params 
)

------— New region correction (PUsub, no response correction at the moment) --------—

Definition at line 77 of file PUSubtractionMethods.cc.

References HICaloRingSubtraction(), createfilelist::int, hpstanc_transforms::max, l1t::CaloParamsHelper::regionPUSType(), l1t::CaloParamsHelper::regionPUSValue(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by l1t::Stage1Layer2EGammaAlgorithmImpPP::processEvent(), l1t::Stage1Layer2TauAlgorithmImpPP::processEvent(), l1t::Stage1Layer2EtSumAlgorithmImpPP::processEvent(), l1t::Stage1Layer2JetAlgorithmImpPP::processEvent(), l1t::Stage1Layer2EtSumAlgorithmImpHW::processEvent(), l1t::Stage1Layer2JetAlgorithmImpSimpleHW::processEvent(), l1t::Stage1Layer2TauAlgorithmImpHW::processEvent(), and l1t::Stage1Layer2EGammaAlgorithmImpHW::processEvent().

80  {
81 
82  std::string regionPUSType = params->regionPUSType();
83 
84  if(regionPUSType == "None") {
85  for(std::vector<CaloRegion>::const_iterator notCorrectedRegion = regions.begin();
86  notCorrectedRegion != regions.end(); notCorrectedRegion++){
87  CaloRegion newSubRegion= *notCorrectedRegion;
88  subRegions->push_back(newSubRegion);
89  }
90  }
91 
92  if (regionPUSType == "HICaloRingSub") {
93  HICaloRingSubtraction(regions, subRegions, params);
94  }
95 
96  if (regionPUSType == "PUM0") {
97  int puMult = 0;
98 
99  // ------------ This calulates PUM0 ------------------
100  for(std::vector<CaloRegion>::const_iterator notCorrectedRegion = regions.begin();
101  notCorrectedRegion != regions.end(); notCorrectedRegion++){
102  int regionET = notCorrectedRegion->hwPt();
103  if (regionET > 0) {puMult++;}
104  }
105  int pumbin = (int) puMult/22;
106  if(pumbin == 18) pumbin = 17; // if puMult = 396 exactly there is an overflow
107 
108  for(std::vector<CaloRegion>::const_iterator notCorrectedRegion = regions.begin();
109  notCorrectedRegion != regions.end(); notCorrectedRegion++){
110 
111  int regionET = notCorrectedRegion->hwPt();
112  int regionEta = notCorrectedRegion->hwEta();
113  int regionPhi = notCorrectedRegion->hwPhi();
114 
115  //int puSub = ceil(regionPUSParams[18*regionEta+pumbin]*2);
116  int puSub = params->regionPUSValue(pumbin, regionEta);
117  // The values in regionSubtraction are MULTIPLIED by
118  // RegionLSB=.5 (physicalRegionEt), so to get back unmultiplied
119  // regionSubtraction we want to multiply the number by 2
120  // (aka divide by LSB).
121 
122  int regionEtCorr = std::max(0, regionET - puSub);
123  if(regionET == 1023)
124  regionEtCorr = 1023; // do not subtract overflow regions
125  if((regionET==255) && (regionEta < 4 || regionEta > 17))
126  regionEtCorr = 255;
127 
128  ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > lorentz(0,0,0,0);
129  CaloRegion newSubRegion(*&lorentz, 0, 0, regionEtCorr, regionEta, regionPhi, notCorrectedRegion->hwQual(), notCorrectedRegion->hwEtEm(), notCorrectedRegion->hwEtHad());
130  subRegions->push_back(newSubRegion);
131  }
132  }
133  }
void HICaloRingSubtraction(const std::vector< l1t::CaloRegion > &regions, std::vector< l1t::CaloRegion > *subRegions, CaloParamsHelper *params)
------------— For heavy ion ----------------------------------—
void l1t::simpleHWSubtraction ( const std::vector< l1t::CaloRegion > &  regions,
std::vector< l1t::CaloRegion > *  subRegions 
)

Definition at line 54 of file PUSubtractionMethods.cc.

56  {
57  for(std::vector<CaloRegion>::const_iterator region = regions.begin();
58  region != regions.end(); region++){
59  int subEta = region->hwEta();
60  int subPhi = region->hwPhi();
61  int subPt = region->hwPt();
62 
63  if(subPt != (2<<10)-1)
64  subPt = subPt - (10+subEta); // arbitrary value chosen in meeting
65  if(subPt < 0)
66  subPt = 0;
67  ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > ldummy(0,0,0,0);
68 
69  CaloRegion newSubRegion(*&ldummy, 0, 0, subPt, subEta, subPhi, region->hwQual(), region->hwEtEm(), region->hwEtHad());
70  subRegions->push_back(newSubRegion);
71  }
72  }
void l1t::slidingWindowJetFinder ( const int  jetSeedThreshold,
const std::vector< l1t::CaloRegion > *  regions,
std::vector< l1t::Jet > *  uncalibjets 
)

Definition at line 47 of file JetFinderMethods.cc.

References gather_cfg::cout, deltaGctPhi(), reco::btau::jetEta, reco::btau::jetPhi, and neighbor().

Referenced by l1t::Stage1Layer2EtSumAlgorithmImpPP::processEvent(), l1t::Stage1Layer2JetAlgorithmImpPP::processEvent(), and l1t::Stage1Layer2JetAlgorithmImpSimpleHW::processEvent().

50  {
51  for(std::vector<CaloRegion>::const_iterator region = regions->begin(); region != regions->end(); region++) {
52  int regionET = region->hwPt(); //regionPhysicalEt(*region);
53  if (regionET <= jetSeedThreshold) continue;
54  int neighborN_et = 0;
55  int neighborS_et = 0;
56  int neighborE_et = 0;
57  int neighborW_et = 0;
58  int neighborNE_et = 0;
59  int neighborSW_et = 0;
60  int neighborNW_et = 0;
61  int neighborSE_et = 0;
62  unsigned int nNeighbors = 0;
63  for(std::vector<CaloRegion>::const_iterator neighbor = regions->begin(); neighbor != regions->end(); neighbor++) {
64  int neighborET = neighbor->hwPt(); //regionPhysicalEt(*neighbor);
65  if(deltaGctPhi(*region, *neighbor) == 1 &&
66  (region->hwEta() ) == neighbor->hwEta()) {
67  neighborN_et = neighborET;
68  nNeighbors++;
69  continue;
70  }
71  else if(deltaGctPhi(*region, *neighbor) == -1 &&
72  (region->hwEta() ) == neighbor->hwEta()) {
73  neighborS_et = neighborET;
74  nNeighbors++;
75  continue;
76  }
77  else if(deltaGctPhi(*region, *neighbor) == 0 &&
78  (region->hwEta() + 1) == neighbor->hwEta()) {
79  neighborE_et = neighborET;
80  nNeighbors++;
81  continue;
82  }
83  else if(deltaGctPhi(*region, *neighbor) == 0 &&
84  (region->hwEta() - 1) == neighbor->hwEta()) {
85  neighborW_et = neighborET;
86  nNeighbors++;
87  continue;
88  }
89  else if(deltaGctPhi(*region, *neighbor) == 1 &&
90  (region->hwEta() + 1) == neighbor->hwEta()) {
91  neighborNE_et = neighborET;
92  nNeighbors++;
93  continue;
94  }
95  else if(deltaGctPhi(*region, *neighbor) == -1 &&
96  (region->hwEta() - 1) == neighbor->hwEta()) {
97  neighborSW_et = neighborET;
98  nNeighbors++;
99  continue;
100  }
101  else if(deltaGctPhi(*region, *neighbor) == 1 &&
102  (region->hwEta() - 1) == neighbor->hwEta()) {
103  neighborNW_et = neighborET;
104  nNeighbors++;
105  continue;
106  }
107  else if(deltaGctPhi(*region, *neighbor) == -1 &&
108  (region->hwEta() + 1) == neighbor->hwEta()) {
109  neighborSE_et = neighborET;
110  nNeighbors++;
111  continue;
112  }
113  }
114  if(regionET > neighborN_et &&
115  regionET > neighborNW_et &&
116  regionET > neighborW_et &&
117  regionET > neighborSW_et &&
118  regionET >= neighborNE_et &&
119  regionET >= neighborE_et &&
120  regionET >= neighborSE_et &&
121  regionET >= neighborS_et) {
122  unsigned int jetET = regionET +
123  neighborN_et + neighborS_et + neighborE_et + neighborW_et +
124  neighborNE_et + neighborSW_et + neighborSE_et + neighborNW_et;
125 
126  int jetPhi = region->hwPhi();
127  int jetEta = region->hwEta();
128 
129  bool neighborCheck = (nNeighbors == 8);
130  // On the eta edge we only expect 5 neighbors
131  if (!neighborCheck && (jetEta == 0 || jetEta == 21) && nNeighbors == 5)
132  neighborCheck = true;
133 
134  if (!neighborCheck) {
135  std::cout << "phi: " << jetPhi << " eta: " << jetEta << " n: " << nNeighbors << std::endl;
136  assert(false);
137  }
138 
139  //first iteration, eta cut defines forward
140  //const bool forward = (jetEta <= 4 || jetEta >= 17);
141  const bool forward = (jetEta < 4 || jetEta > 17);
142  int jetQual = 0;
143  if(forward)
144  jetQual |= 0x2;
145 
146  // check for input overflow regions
147  if(forward && regionET == 255) {
148  jetET = 1023; // 10 bit max
149  } else if(!forward && regionET == 1023) {
150  jetET = 1023; // 10 bit max
151  } else if(region->hwEta() == 17) {
152  if(neighborNE_et == 255 || neighborE_et == 255 || neighborSE_et == 255)
153  jetET = 1023; // 10 bit max
154  } else if(region->hwEta() == 4) {
155  if(neighborNW_et == 255 || neighborW_et == 255 || neighborSW_et == 255)
156  jetET = 1023; // 10 bit max
157  }
158 
159  ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > jetLorentz(0,0,0,0);
160  l1t::Jet theJet(*&jetLorentz, jetET, jetEta, jetPhi, jetQual);
161  //l1t::Jet theJet(0, jetET, jetEta, jetPhi);
162 
163  uncalibjets->push_back(theJet);
164  }
165  }
166  }
bool neighbor(int endcap, int sector, int SectIndex, int id, int sub, int station)
Definition: Jet.h:16
int deltaGctPhi(const CaloRegion &region, const CaloRegion &neighbor)
void l1t::SortEGammas ( std::vector< l1t::EGamma > *  input,
std::vector< l1t::EGamma > *  output 
)

Definition at line 392 of file HardwareSortingMethods.cc.

References gt_to_fw_phi_map, mps_fire::i, diffTreeTool::index, createfilelist::int, gen::k, reco::HaloData::minus, presort_egamma(), alignCSCRings::r, l1t::L1Candidate::setHwEta(), l1t::L1Candidate::setHwIso(), l1t::L1Candidate::setHwPhi(), l1t::L1Candidate::setHwPt(), l1t::L1Candidate::setHwQual(), sort_by_row_in_groups(), and super_sort_matrix_rows().

Referenced by l1t::Stage1Layer2EGammaAlgorithmImpPP::processEvent(), l1t::Stage1Layer2EGammaAlgorithmImpHI::processEvent(), and l1t::Stage1Layer2EGammaAlgorithmImpHW::processEvent().

394  {
395  //Initialize
396  const int FIBER_PAIRS = 18;
397  const int N_INPUT_EGAMMAS = 4;
398  const int N_PRESORTED_ROWS_EGAMMA = 36;
399  const int PRESORT_DEPTH = 4;
400  const int N_EGAMMA_FIRST_GROUP_SIZE = 6;
401  const int N_EGAMMA_SECOND_GROUP_SIZE = 6;
402  const int N_EGAMMA_FIRST_GROUPS = 6;
403  const int N_KEEP_EGAMMA = 4;
404 
405  //Input
406  //Each egamma: RCT isolation, RCT order, phi index, eta index
407 
408  vector<l1t::L1Candidate> iso_egamma_array_p, iso_egamma_array_m; //reusing objects. should probably rename to something like "object"
409  vector<l1t::L1Candidate> noniso_egamma_array_p, noniso_egamma_array_m;
410 
411  for(int k=0; k<2*N_INPUT_EGAMMAS*FIBER_PAIRS; k++){
412  l1t::L1Candidate dummyJet;
413  dummyJet.setHwPt(0);
414  dummyJet.setHwEta(99);
415  dummyJet.setHwPhi(99);
416  dummyJet.setHwQual(0x10);
417  if(k<N_INPUT_EGAMMAS*FIBER_PAIRS){
418  iso_egamma_array_p.push_back(dummyJet);
419  noniso_egamma_array_p.push_back(dummyJet);
420  }
421  else{
422  iso_egamma_array_m.push_back(dummyJet);
423  noniso_egamma_array_m.push_back(dummyJet);
424  }
425  }
426 
427  for (std::vector<l1t::EGamma>::const_iterator ineg = input->begin();
428  ineg != input->end(); ++ineg){
429  int fiberNum = (int) floor(gt_to_fw_phi_map[ineg->hwPhi()]/2);
430  int index = ineg->hwQual();
431  bool iso = ineg->hwIso();
432  bool minus = (ineg->hwEta() < 11);
433 
434  // while waiting for firmware LUT, set all iso to true
435  //iso = true;
436 
437  if(iso && minus)
438  iso_egamma_array_m[8*fiberNum+index] = *ineg;
439  else if (iso && !minus)
440  iso_egamma_array_p[8*fiberNum+index] = *ineg;
441  else if (!iso && minus)
442  noniso_egamma_array_m[8*fiberNum+index] = *ineg;
443  else if (!iso && !minus)
444  noniso_egamma_array_p[8*fiberNum+index] = *ineg;
445 
446  }
447 
448  // std::cout << "iso_egamma_array_m" << std::endl;
449  // for(int i = 0; i < (int)iso_egamma_array_m.size(); ++i)
450  // {
451  // std::cout << iso_egamma_array_m[i].hwPt() << " "
452  // << iso_egamma_array_m[i].hwEta() << " "
453  // << iso_egamma_array_m[i].hwPhi() << std::endl;
454  // }
455 
456  // std::cout << "iso_egamma_array_p" << std::endl;
457  // for(int i = 0; i < (int)iso_egamma_array_p.size(); ++i)
458  // {
459  // std::cout << iso_egamma_array_p[i].hwPt() << " "
460  // << iso_egamma_array_p[i].hwEta() << " "
461  // << iso_egamma_array_p[i].hwPhi() << std::endl;
462  // }
463 
464  //verbose = true;
465  //1
466  std::vector<std::vector<l1t::L1Candidate> > presorted_iso_matrix_sig_p = presort_egamma(iso_egamma_array_p, N_PRESORTED_ROWS_EGAMMA/2, PRESORT_DEPTH);
467  std::vector<std::vector<l1t::L1Candidate> > presorted_iso_matrix_sig_m = presort_egamma(iso_egamma_array_m, N_PRESORTED_ROWS_EGAMMA/2, PRESORT_DEPTH);
468  std::vector<std::vector<l1t::L1Candidate> > presorted_non_iso_matrix_sig_p = presort_egamma(noniso_egamma_array_p, N_PRESORTED_ROWS_EGAMMA/2, PRESORT_DEPTH);
469  std::vector<std::vector<l1t::L1Candidate> > presorted_non_iso_matrix_sig_m = presort_egamma(noniso_egamma_array_m, N_PRESORTED_ROWS_EGAMMA/2, PRESORT_DEPTH);
470 
471  //2
472  std::vector<std::vector<l1t::L1Candidate> > iso_row_presorted_energies_matrix_sig_p = sort_by_row_in_groups(presorted_iso_matrix_sig_p, N_EGAMMA_FIRST_GROUP_SIZE);
473  std::vector<std::vector<l1t::L1Candidate> > iso_row_presorted_energies_matrix_sig_m = sort_by_row_in_groups(presorted_iso_matrix_sig_m, N_EGAMMA_FIRST_GROUP_SIZE);
474  std::vector<std::vector<l1t::L1Candidate> > non_iso_row_presorted_energies_matrix_sig_p = sort_by_row_in_groups(presorted_non_iso_matrix_sig_p, N_EGAMMA_FIRST_GROUP_SIZE);
475  std::vector<std::vector<l1t::L1Candidate> > non_iso_row_presorted_energies_matrix_sig_m = sort_by_row_in_groups(presorted_non_iso_matrix_sig_m, N_EGAMMA_FIRST_GROUP_SIZE);
476 
477  //3
478  std::vector<std::vector<l1t::L1Candidate> > iso_super_sorted_energies_matrix_sig_p = super_sort_matrix_rows(iso_row_presorted_energies_matrix_sig_p, N_EGAMMA_FIRST_GROUP_SIZE, N_KEEP_EGAMMA);
479  std::vector<std::vector<l1t::L1Candidate> > iso_super_sorted_energies_matrix_sig_m = super_sort_matrix_rows(iso_row_presorted_energies_matrix_sig_m, N_EGAMMA_FIRST_GROUP_SIZE, N_KEEP_EGAMMA);
480  std::vector<std::vector<l1t::L1Candidate> > non_iso_super_sorted_energies_matrix_sig_p = super_sort_matrix_rows(non_iso_row_presorted_energies_matrix_sig_p, N_EGAMMA_FIRST_GROUP_SIZE, N_KEEP_EGAMMA);
481  std::vector<std::vector<l1t::L1Candidate> > non_iso_super_sorted_energies_matrix_sig_m = super_sort_matrix_rows(non_iso_row_presorted_energies_matrix_sig_m, N_EGAMMA_FIRST_GROUP_SIZE, N_KEEP_EGAMMA);
482  //combine plus and minus
483  std::vector<std::vector<l1t::L1Candidate> > iso_super_sorted_energies_matrix_sig (N_EGAMMA_FIRST_GROUPS, std::vector<l1t::L1Candidate>(N_KEEP_EGAMMA) );
484  std::vector<std::vector<l1t::L1Candidate> > non_iso_super_sorted_energies_matrix_sig (N_EGAMMA_FIRST_GROUPS, std::vector<l1t::L1Candidate>(N_KEEP_EGAMMA) );
485  for(int r=0; r<N_EGAMMA_FIRST_GROUPS/2; r++){
486  iso_super_sorted_energies_matrix_sig[r] = iso_super_sorted_energies_matrix_sig_m[r];
487  iso_super_sorted_energies_matrix_sig[r+N_EGAMMA_FIRST_GROUPS/2] = iso_super_sorted_energies_matrix_sig_p[r];
488  non_iso_super_sorted_energies_matrix_sig[r] = non_iso_super_sorted_energies_matrix_sig_m[r];
489  non_iso_super_sorted_energies_matrix_sig[r+N_EGAMMA_FIRST_GROUPS/2] = non_iso_super_sorted_energies_matrix_sig_p[r];
490  }
491 
492  //4
493  std::vector<std::vector<l1t::L1Candidate> > iso_stage2_row_sorted_matrix_sig = sort_by_row_in_groups(iso_super_sorted_energies_matrix_sig, N_EGAMMA_SECOND_GROUP_SIZE);
494  std::vector<std::vector<l1t::L1Candidate> > non_iso_stage2_row_sorted_matrix_sig = sort_by_row_in_groups(non_iso_super_sorted_energies_matrix_sig, N_EGAMMA_SECOND_GROUP_SIZE);
495 
496  //5
497  std::vector<std::vector<l1t::L1Candidate> > iso_stage2_super_sorted_matrix_sig = super_sort_matrix_rows(iso_stage2_row_sorted_matrix_sig, N_EGAMMA_SECOND_GROUP_SIZE, N_KEEP_EGAMMA);
498  std::vector<std::vector<l1t::L1Candidate> > non_iso_stage2_super_sorted_matrix_sig = super_sort_matrix_rows(non_iso_stage2_row_sorted_matrix_sig, N_EGAMMA_SECOND_GROUP_SIZE, N_KEEP_EGAMMA);
499 
500  //Prepare output
501  std::vector<l1t::L1Candidate> sorted_iso_egammas = iso_stage2_super_sorted_matrix_sig[0];
502  std::vector<l1t::L1Candidate> sorted_noniso_egammas = non_iso_stage2_super_sorted_matrix_sig[0];
503 
504  //verbose = false;
505 
506  for(unsigned int i = 0; i < 4; ++i)
507  {
508  l1t::EGamma *ineg = static_cast<l1t::EGamma *>( &sorted_iso_egammas[i] );
509  ineg->setHwIso(1);
510  output->push_back(*ineg);
511  }
512  for(unsigned int i = 0; i < 4; ++i)
513  {
514  l1t::EGamma *ineg = static_cast<l1t::EGamma *>( &sorted_noniso_egammas[i] );
515  output->push_back(*ineg);
516  }
517  }
void setHwQual(int qual)
Definition: L1Candidate.h:44
static std::string const input
Definition: EdmProvDump.cc:44
int k[5][pyjets_maxn]
void setHwPhi(int phi)
Definition: L1Candidate.h:43
void setHwIso(int iso)
Definition: L1Candidate.h:45
int gt_to_fw_phi_map[]
std::vector< std::vector< l1t::L1Candidate > > presort_egamma(std::vector< l1t::L1Candidate > input_egamma, int rows, int cols)
std::vector< std::vector< l1t::L1Candidate > > super_sort_matrix_rows(std::vector< std::vector< l1t::L1Candidate > > input_matrix, unsigned int group_size, unsigned int n_keep)
void setHwPt(int pt)
Definition: L1Candidate.h:41
void setHwEta(int eta)
Definition: L1Candidate.h:42
std::vector< std::vector< l1t::L1Candidate > > sort_by_row_in_groups(std::vector< std::vector< l1t::L1Candidate > > input_matrix, int group_size)
void l1t::SortJets ( std::vector< l1t::Jet > *  input,
std::vector< l1t::Jet > *  output 
)

Definition at line 258 of file HardwareSortingMethods.cc.

References fw_to_gt_phi_map, gt_to_fw_phi_map, l1t::L1Candidate::hwQual(), mps_fire::i, presort(), l1t::L1Candidate::setHwQual(), sort_by_row_in_groups(), and super_sort_matrix_rows().

Referenced by l1t::Stage1Layer2JetAlgorithmImpHI::processEvent(), l1t::Stage1Layer2EtSumAlgorithmImpPP::processEvent(), l1t::Stage1Layer2JetAlgorithmImpPP::processEvent(), and l1t::Stage1Layer2JetAlgorithmImpSimpleHW::processEvent().

259  {
260  //verbose = true;
261  const int CENTRAL_ETA_SLICES = 14;
262  const int N_PHI_GROUPS = 5;
263  const int N_PRESORTED_ROWS_CENTRAL = CENTRAL_ETA_SLICES*N_PHI_GROUPS;
264  const int PRESORT_DEPTH = 4;
265  const int N_KEEP_CENTRAL = 4;
266  const int N_ETA_GROUP_SIZE_CENTRAL = 4;
267  const int N_ETA_GROUPS_CENTRAL = 4;
268 
269  const int HFM_ETA_SLICES = 4;
270  const int HFP_ETA_SLICES = 4;
271  const int N_PRESORTED_ROWS_HFM = HFM_ETA_SLICES*N_PHI_GROUPS;
272  const int N_PRESORTED_ROWS_HFP = HFP_ETA_SLICES*N_PHI_GROUPS;
273  const int N_KEEP_FORWARD = 4;
274 
275  const int cen_nrows = 18;
276  const int cen_ncols = 14;
277  const int hfm_nrows = 18, hfp_nrows = 18;
278  const int hfm_ncols = 4, hfp_ncols = 4;
279 
280  std::vector<std::vector<l1t::L1Candidate> > cen_input_energy (cen_nrows, std::vector<l1t::L1Candidate>(cen_ncols));
281  std::vector<std::vector<l1t::L1Candidate> > hfm_input_energy (hfm_nrows, std::vector<l1t::L1Candidate>(hfm_ncols));
282  std::vector<std::vector<l1t::L1Candidate> > hfp_input_energy (hfp_nrows, std::vector<l1t::L1Candidate>(hfp_ncols));
283 
284  for (std::vector<l1t::Jet>::const_iterator injet = input->begin();
285  injet != input->end(); ++injet){
286  if(injet->hwEta() >= 4 && injet->hwEta() <= 17 )
287  {
288  unsigned int myrow = gt_to_fw_phi_map[injet->hwPhi()];
289  unsigned int mycol = injet->hwEta()-4; //hardcoding is bad
290  cen_input_energy[myrow][mycol] = *injet;
291  }
292  else if(injet->hwEta() < 4)
293  {
294  unsigned int myrow = gt_to_fw_phi_map[injet->hwPhi()];
295  unsigned int mycol = injet->hwEta(); //hardcoding is bad
296  hfm_input_energy[myrow][mycol] = *injet;
297  }
298  else if(injet->hwEta() > 17)
299  {
300  unsigned int myrow = gt_to_fw_phi_map[injet->hwPhi()];
301  unsigned int mycol = injet->hwEta()-18; //hardcoding is bad
302  hfp_input_energy[myrow][mycol] = *injet;
303  }
304  else
305  edm::LogError("HardwareJetSort") << "Region out of bounds: " << injet->hwEta();
306  }
307 
308  for(int i = 0; i < cen_nrows; ++i)
309  for(int j = 0; j < cen_ncols; ++j)
310  {
311  if(cen_input_energy[i][j].hwPt() == 0)
312  {
313  cen_input_energy[i][j].setHwPhi(fw_to_gt_phi_map[i]);
314  cen_input_energy[i][j].setHwEta(4+j);
315  }
316  }
317 
318  for(int i = 0; i < hfm_nrows; ++i)
319  for(int j = 0; j < hfm_ncols; ++j)
320  {
321  if(hfm_input_energy[i][j].hwPt() == 0)
322  {
323  hfm_input_energy[i][j].setHwPhi(fw_to_gt_phi_map[i]);
324  hfm_input_energy[i][j].setHwEta(j);
325  hfm_input_energy[i][j].setHwQual(2);
326  }
327  }
328 
329  for(int i = 0; i < hfp_nrows; ++i)
330  for(int j = 0; j < hfp_ncols; ++j)
331  {
332  if(hfp_input_energy[i][j].hwPt() == 0)
333  {
334  hfp_input_energy[i][j].setHwPhi(fw_to_gt_phi_map[i]);
335  hfp_input_energy[i][j].setHwEta(j+18);
336  hfp_input_energy[i][j].setHwQual(2);
337  }
338  }
339 
340  //Each CLK is one clock
341 
342  //CLK 1
343  std::vector<std::vector<l1t::L1Candidate> > presorted_energies_matrix_sig = presort(cen_input_energy, N_PRESORTED_ROWS_CENTRAL, PRESORT_DEPTH);
344  std::vector<std::vector<l1t::L1Candidate> > hfm_presorted_energies_matrix_sig = presort(hfm_input_energy, N_PRESORTED_ROWS_HFM, PRESORT_DEPTH);
345  std::vector<std::vector<l1t::L1Candidate> > hfp_presorted_energies_matrix_sig = presort(hfp_input_energy, N_PRESORTED_ROWS_HFP, PRESORT_DEPTH);
346 
347  //CLK 2
348  std::vector<std::vector<l1t::L1Candidate> > row_presorted_energies_matrix_sig = sort_by_row_in_groups(presorted_energies_matrix_sig, N_PHI_GROUPS);
349  std::vector<std::vector<l1t::L1Candidate> > hfm_row_presorted_energies_matrix_sig = sort_by_row_in_groups(hfm_presorted_energies_matrix_sig, N_PHI_GROUPS);
350  std::vector<std::vector<l1t::L1Candidate> > hfp_row_presorted_energies_matrix_sig = sort_by_row_in_groups(hfp_presorted_energies_matrix_sig, N_PHI_GROUPS);
351 
352  //CLK 3
353  std::vector<std::vector<l1t::L1Candidate> > sorted_eta_slices_energies_matrix_sig = super_sort_matrix_rows(row_presorted_energies_matrix_sig, N_PHI_GROUPS, N_KEEP_CENTRAL);
354  std::vector<std::vector<l1t::L1Candidate> > hfm_sorted_eta_slices_energies_matrix_sig = super_sort_matrix_rows(hfm_row_presorted_energies_matrix_sig, N_PHI_GROUPS, N_KEEP_FORWARD);
355  std::vector<std::vector<l1t::L1Candidate> > hfp_sorted_eta_slices_energies_matrix_sig = super_sort_matrix_rows(hfp_row_presorted_energies_matrix_sig, N_PHI_GROUPS, N_KEEP_FORWARD);
356 
357  //CLK 4
358  std::vector<std::vector<l1t::L1Candidate> > row_presorted_eta_slices_energies_matrix_sig = sort_by_row_in_groups(sorted_eta_slices_energies_matrix_sig, N_ETA_GROUP_SIZE_CENTRAL);
359  std::vector<std::vector<l1t::L1Candidate> > hfm_row_presorted_eta_slices_energies_matrix_sig = sort_by_row_in_groups(hfm_sorted_eta_slices_energies_matrix_sig, HFM_ETA_SLICES);
360  std::vector<std::vector<l1t::L1Candidate> > hfp_row_presorted_eta_slices_energies_matrix_sig = sort_by_row_in_groups(hfp_sorted_eta_slices_energies_matrix_sig, HFP_ETA_SLICES);
361 
362  //CLK 5
363  std::vector<std::vector<l1t::L1Candidate> > sorted_eta_groups_energies_matrix_sig = super_sort_matrix_rows(row_presorted_eta_slices_energies_matrix_sig, N_ETA_GROUP_SIZE_CENTRAL, N_KEEP_CENTRAL);
364  std::vector<std::vector<l1t::L1Candidate> > hfm_sorted_final_energies_matrix_sig = super_sort_matrix_rows(hfm_row_presorted_eta_slices_energies_matrix_sig, HFM_ETA_SLICES, N_KEEP_FORWARD);
365  std::vector<std::vector<l1t::L1Candidate> > hfp_sorted_final_energies_matrix_sig = super_sort_matrix_rows(hfp_row_presorted_eta_slices_energies_matrix_sig, HFP_ETA_SLICES, N_KEEP_FORWARD);
366 
367  //CLK 6
368  std::vector<std::vector<l1t::L1Candidate> > row_presorted_eta_groups_energies_matrix_sig = sort_by_row_in_groups(sorted_eta_groups_energies_matrix_sig, N_ETA_GROUPS_CENTRAL);
369  std::vector<std::vector<l1t::L1Candidate> > hf_merged_plus_minus_forward_energies_matrix_sig(2, std::vector<l1t::L1Candidate>(N_KEEP_FORWARD));
370  hf_merged_plus_minus_forward_energies_matrix_sig[0] = hfm_sorted_final_energies_matrix_sig[0];
371  hf_merged_plus_minus_forward_energies_matrix_sig[1] = hfp_sorted_final_energies_matrix_sig[0];
372  std::vector<std::vector<l1t::L1Candidate> > hf_row_presorted_merged_plus_minus_forward_energies_matrix_sig = sort_by_row_in_groups(hf_merged_plus_minus_forward_energies_matrix_sig, 2);
373 
374  //CLK 7
375  std::vector<std::vector<l1t::L1Candidate> > sorted_final_energies_matrix_sig = super_sort_matrix_rows(row_presorted_eta_groups_energies_matrix_sig, N_ETA_GROUPS_CENTRAL, N_KEEP_CENTRAL);
376  std::vector<std::vector<l1t::L1Candidate> > hf_sorted_final_merged_plus_minus_forward_energies_matrix_sig = super_sort_matrix_rows(hf_row_presorted_merged_plus_minus_forward_energies_matrix_sig, 2, N_KEEP_FORWARD);
377 
378  for(unsigned int i = 0; i < 4; ++i)
379  {
380  l1t::Jet *intjet = static_cast<l1t::Jet *>( &sorted_final_energies_matrix_sig[0][i] );
381  output->push_back(*intjet);
382  }
383  for(unsigned int i = 0; i < 4; ++i)
384  {
385  l1t::Jet *intjet = static_cast<l1t::Jet *>( &hf_sorted_final_merged_plus_minus_forward_energies_matrix_sig[0][i] );
386  intjet->setHwQual(intjet->hwQual() | 2);
387  output->push_back(*intjet);
388  }
389  //verbose = false;
390  }
void setHwQual(int qual)
Definition: L1Candidate.h:44
static std::string const input
Definition: EdmProvDump.cc:44
Definition: Jet.h:16
int fw_to_gt_phi_map[]
int hwQual() const
Definition: L1Candidate.h:51
int gt_to_fw_phi_map[]
std::vector< std::vector< l1t::L1Candidate > > super_sort_matrix_rows(std::vector< std::vector< l1t::L1Candidate > > input_matrix, unsigned int group_size, unsigned int n_keep)
std::vector< std::vector< l1t::L1Candidate > > presort(std::vector< std::vector< l1t::L1Candidate > > energies, int rows, int cols)
std::vector< std::vector< l1t::L1Candidate > > sort_by_row_in_groups(std::vector< std::vector< l1t::L1Candidate > > input_matrix, int group_size)
void l1t::SortTaus ( std::vector< l1t::Tau > *  input,
std::vector< l1t::Tau > *  output 
)

Definition at line 519 of file HardwareSortingMethods.cc.

References fw_to_gt_phi_map, gt_to_fw_phi_map, mps_fire::i, presort(), sort_by_row_in_groups(), and super_sort_matrix_rows().

Referenced by l1t::Stage1Layer2SingleTrackHI::processEvent(), l1t::Stage1Layer2TauAlgorithmImpPP::processEvent(), and l1t::Stage1Layer2TauAlgorithmImpHW::processEvent().

520  {
521  const int CENTRAL_ETA_SLICES = 14;
522  const int N_PHI_GROUPS = 5;
523  const int N_PRESORTED_ROWS_CENTRAL = CENTRAL_ETA_SLICES*N_PHI_GROUPS;
524  const int PRESORT_DEPTH = 4;
525  const int N_KEEP_CENTRAL = 4;
526  const int N_ETA_GROUP_SIZE_CENTRAL = 4;
527  const int N_ETA_GROUPS_CENTRAL = 4;
528 
529  const int cen_nrows = 18;
530  const int cen_ncols = 14;
531 
532  std::vector<std::vector<l1t::L1Candidate> > cen_input_energy (cen_nrows, std::vector<l1t::L1Candidate>(cen_ncols));
533 
534  for (std::vector<l1t::Tau>::const_iterator injet = input->begin();
535  injet != input->end(); ++injet){
536  if(injet->hwEta() >= 4 && injet->hwEta() <= 17 )
537  {
538  unsigned int myrow = gt_to_fw_phi_map[injet->hwPhi()];
539  unsigned int mycol = injet->hwEta()-4; //hardcoding is bad
540  cen_input_energy[myrow][mycol] = *injet;
541  }
542  else
543  edm::LogError("HardwareTauSort") << "Region out of bounds: " << injet->hwEta();
544  }
545 
546  for(int i = 0; i < cen_nrows; ++i)
547  for(int j = 0; j < cen_ncols; ++j)
548  {
549  if(cen_input_energy[i][j].hwPt() == 0)
550  {
551  cen_input_energy[i][j].setHwPhi(fw_to_gt_phi_map[i]);
552  cen_input_energy[i][j].setHwEta(4+j);
553  }
554  }
555 
556  //Each CLK is one clock
557 
558  //CLK 1
559  std::vector<std::vector<l1t::L1Candidate> > presorted_energies_matrix_sig = presort(cen_input_energy, N_PRESORTED_ROWS_CENTRAL, PRESORT_DEPTH);
560  //CLK 2
561  std::vector<std::vector<l1t::L1Candidate> > row_presorted_energies_matrix_sig = sort_by_row_in_groups(presorted_energies_matrix_sig, N_PHI_GROUPS);
562  //CLK 3
563  std::vector<std::vector<l1t::L1Candidate> > sorted_eta_slices_energies_matrix_sig = super_sort_matrix_rows(row_presorted_energies_matrix_sig, N_PHI_GROUPS, N_KEEP_CENTRAL);
564  //CLK 4
565  std::vector<std::vector<l1t::L1Candidate> > row_presorted_eta_slices_energies_matrix_sig = sort_by_row_in_groups(sorted_eta_slices_energies_matrix_sig, N_ETA_GROUP_SIZE_CENTRAL);
566  //CLK 5
567  std::vector<std::vector<l1t::L1Candidate> > sorted_eta_groups_energies_matrix_sig = super_sort_matrix_rows(row_presorted_eta_slices_energies_matrix_sig, N_ETA_GROUP_SIZE_CENTRAL, N_KEEP_CENTRAL);
568  //CLK 6
569  std::vector<std::vector<l1t::L1Candidate> > row_presorted_eta_groups_energies_matrix_sig = sort_by_row_in_groups(sorted_eta_groups_energies_matrix_sig, N_ETA_GROUPS_CENTRAL);
570  //CLK 7
571  std::vector<std::vector<l1t::L1Candidate> > sorted_final_energies_matrix_sig = super_sort_matrix_rows(row_presorted_eta_groups_energies_matrix_sig, N_ETA_GROUPS_CENTRAL, N_KEEP_CENTRAL);
572 
573  for(unsigned int i = 0; i < 4; ++i)
574  {
575  l1t::Tau *intjet = static_cast<l1t::Tau *>( &sorted_final_energies_matrix_sig[0][i] );
576  output->push_back(*intjet);
577  }
578  }
Definition: Tau.h:16
static std::string const input
Definition: EdmProvDump.cc:44
int fw_to_gt_phi_map[]
int gt_to_fw_phi_map[]
std::vector< std::vector< l1t::L1Candidate > > super_sort_matrix_rows(std::vector< std::vector< l1t::L1Candidate > > input_matrix, unsigned int group_size, unsigned int n_keep)
std::vector< std::vector< l1t::L1Candidate > > presort(std::vector< std::vector< l1t::L1Candidate > > energies, int rows, int cols)
std::vector< std::vector< l1t::L1Candidate > > sort_by_row_in_groups(std::vector< std::vector< l1t::L1Candidate > > input_matrix, int group_size)
std::vector< std::string > l1t::str2VecStr_ ( const std::string &  aStr,
const std::string &  delim 
)

Definition at line 23 of file Tools.cc.

References full, and dumpparser::parse().

Referenced by l1t::Setting::addTableRow(), l1t::TrigSystem::checkIdExistsAndSetSetting_(), l1t::Setting::getVector(), l1t::Setting::Setting(), and l1t::Setting::setValue().

24 {
25  std::vector<std::string> aVec;
26 
27  if ( !parse ( aStr.c_str(),
28  (
29  ( (*(boost::spirit::classic::anychar_p - delim.c_str() )) [boost::spirit::classic::push_back_a ( aVec ) ] % delim.c_str() )
30  ), boost::spirit::classic::nothing_p ).full )
31  {
32  throw std::runtime_error ("Wrong value format: " + aStr);
33  }
34 
35  for(auto it = aVec.begin(); it != aVec.end(); ++it)
36  {
37  while (*(it->begin()) == ' ' || *(it->begin()) == '\n')
38  it->erase(it->begin());
39  while (*(it->end()-1) == ' ' || *(it->end()-1) == '\n')
40  it->erase(it->end()-1);
41  }
42 
43  return aVec;
44 }
Definition: GenABIO.cc:180
def parse(path, config)
Definition: dumpparser.py:13
void l1t::str2VecStr_ ( const std::string &  aStr,
const std::string &  delim,
std::vector< std::string > &  aVec 
)

Definition at line 4 of file Tools.cc.

References full, and dumpparser::parse().

5 {
6  if ( !parse ( aStr.c_str(),
7  (
8  ( (*(boost::spirit::classic::anychar_p - delim.c_str() )) [boost::spirit::classic::push_back_a ( aVec ) ] % delim.c_str() )
9  ), boost::spirit::classic::nothing_p ).full )
10  {
11  throw std::runtime_error ("Wrong value format: " + aStr);
12  }
13 
14  for(auto it = aVec.begin(); it != aVec.end(); ++it)
15  {
16  while (*(it->begin()) == ' ' || *(it->begin()) == '\n')
17  it->erase(it->begin());
18  while (*(it->end()-1) == ' ' || *(it->end()-1) == '\n')
19  it->erase(it->end()-1);
20  }
21 }
Definition: GenABIO.cc:180
def parse(path, config)
Definition: dumpparser.py:13
void l1t::TauToGtEtaScales ( CaloParamsHelper params,
const std::vector< l1t::Tau > *  input,
std::vector< l1t::Tau > *  output 
)

Definition at line 124 of file legacyGtHelper.cc.

References gtEta(), and gtTau.

Referenced by l1t::Stage1Layer2SingleTrackHI::processEvent(), l1t::Stage1Layer2TauAlgorithmImpPP::processEvent(), and l1t::Stage1Layer2TauAlgorithmImpHW::processEvent().

126  {
127  for(std::vector<l1t::Tau>::const_iterator itTau = input->begin();
128  itTau != input->end(); ++itTau){
129  unsigned newPhi = itTau->hwPhi();
130  unsigned newEta = gtEta(itTau->hwEta());
131 
132  // taus with hwQual & 10 ==10 are "padding" jets from a sort, set their eta and phi
133  // to the max value
134  if((itTau->hwQual() & 0x10) == 0x10)
135  {
136  newEta = 0x0;
137  newPhi = 0x0;
138  }
139 
140 
141  ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > ldummy(0,0,0,0);
142 
143  l1t::Tau gtTau(*&ldummy, itTau->hwPt(), newEta, newPhi, itTau->hwQual(), itTau->hwIso());
144  output->push_back(gtTau);
145  }
146  }
Definition: Tau.h:16
const unsigned int gtEta(const unsigned int iEta)
static std::string const input
Definition: EdmProvDump.cc:44
void l1t::TauToGtPtScales ( CaloParamsHelper params,
const std::vector< l1t::Tau > *  input,
std::vector< l1t::Tau > *  output 
)

Definition at line 148 of file legacyGtHelper.cc.

References gtTau, l1t::CaloParamsHelper::jetScale(), L1CaloEtScale::linScaleMax(), and L1CaloEtScale::rank().

Referenced by l1t::Stage1Layer2SingleTrackHI::processEvent(), and l1t::Stage1Layer2TauAlgorithmImpPP::processEvent().

150  {
151  for(std::vector<l1t::Tau>::const_iterator itTau = input->begin();
152  itTau != input->end(); ++itTau){
153  uint16_t linPt = (uint16_t)itTau->hwPt();
154  if(linPt > params->jetScale().linScaleMax() ) linPt = params->jetScale().linScaleMax();
155  const uint16_t rankPt = params->jetScale().rank(linPt);
156 
157  ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > ldummy(0,0,0,0);
158 
159  l1t::Tau gtTau(*&ldummy, rankPt, itTau->hwEta(), itTau->hwPhi(), itTau->hwQual(), itTau->hwIso());
160  output->push_back(gtTau);
161  }
162  }
Definition: Tau.h:16
static std::string const input
Definition: EdmProvDump.cc:44
void l1t::TwelveByTwelveFinder ( const int  jetSeedThreshold,
const std::vector< l1t::CaloRegion > *  regions,
std::vector< l1t::Jet > *  uncalibjets 
)

Definition at line 168 of file JetFinderMethods.cc.

References gather_cfg::cout, deltaGctPhi(), reco::btau::jetEta, reco::btau::jetPhi, and neighbor().

Referenced by l1t::Stage1Layer2EGammaAlgorithmImpPP::processEvent(), l1t::Stage1Layer2TauAlgorithmImpPP::processEvent(), l1t::Stage1Layer2TauAlgorithmImpHW::processEvent(), and l1t::Stage1Layer2EGammaAlgorithmImpHW::processEvent().

171  {
172  for(std::vector<CaloRegion>::const_iterator region = regions->begin(); region != regions->end(); region++) {
173  int regionET = region->hwPt(); //regionPhysicalEt(*region);
174  if (regionET < jetSeedThreshold) continue;
175  int neighborN_et = 0;
176  int neighborS_et = 0;
177  int neighborE_et = 0;
178  int neighborW_et = 0;
179  int neighborNE_et = 0;
180  int neighborSW_et = 0;
181  int neighborNW_et = 0;
182  int neighborSE_et = 0;
183  unsigned int nNeighbors = 0;
184  for(std::vector<CaloRegion>::const_iterator neighbor = regions->begin(); neighbor != regions->end(); neighbor++) {
185  int neighborET = neighbor->hwPt(); //regionPhysicalEt(*neighbor);
186  if(deltaGctPhi(*region, *neighbor) == 1 &&
187  (region->hwEta() ) == neighbor->hwEta()) {
188  neighborN_et = neighborET;
189  nNeighbors++;
190  continue;
191  }
192  else if(deltaGctPhi(*region, *neighbor) == -1 &&
193  (region->hwEta() ) == neighbor->hwEta()) {
194  neighborS_et = neighborET;
195  nNeighbors++;
196  continue;
197  }
198  else if(deltaGctPhi(*region, *neighbor) == 0 &&
199  (region->hwEta() + 1) == neighbor->hwEta()) {
200  neighborE_et = neighborET;
201  nNeighbors++;
202  continue;
203  }
204  else if(deltaGctPhi(*region, *neighbor) == 0 &&
205  (region->hwEta() - 1) == neighbor->hwEta()) {
206  neighborW_et = neighborET;
207  nNeighbors++;
208  continue;
209  }
210  else if(deltaGctPhi(*region, *neighbor) == 1 &&
211  (region->hwEta() + 1) == neighbor->hwEta()) {
212  neighborNE_et = neighborET;
213  nNeighbors++;
214  continue;
215  }
216  else if(deltaGctPhi(*region, *neighbor) == -1 &&
217  (region->hwEta() - 1) == neighbor->hwEta()) {
218  neighborSW_et = neighborET;
219  nNeighbors++;
220  continue;
221  }
222  else if(deltaGctPhi(*region, *neighbor) == 1 &&
223  (region->hwEta() - 1) == neighbor->hwEta()) {
224  neighborNW_et = neighborET;
225  nNeighbors++;
226  continue;
227  }
228  else if(deltaGctPhi(*region, *neighbor) == -1 &&
229  (region->hwEta() + 1) == neighbor->hwEta()) {
230  neighborSE_et = neighborET;
231  nNeighbors++;
232  continue;
233  }
234  }
235  unsigned int jetET = regionET +
236  neighborN_et + neighborS_et + neighborE_et + neighborW_et +
237  neighborNE_et + neighborSW_et + neighborSE_et + neighborNW_et;
238 
239  int jetPhi = region->hwPhi();
240  int jetEta = region->hwEta();
241 
242  bool neighborCheck = (nNeighbors == 8);
243  // On the eta edge we only expect 5 neighbors
244  if (!neighborCheck && (jetEta == 0 || jetEta == 21) && nNeighbors == 5)
245  neighborCheck = true;
246 
247  if (!neighborCheck) {
248  std::cout << "phi: " << jetPhi << " eta: " << jetEta << " n: " << nNeighbors << std::endl;
249  assert(false);
250  }
251 
252  //first iteration, eta cut defines forward
253  //const bool forward = (jetEta <= 4 || jetEta >= 17);
254  const bool forward = (jetEta < 4 || jetEta > 17);
255  int jetQual = 0;
256  if(forward)
257  jetQual |= 0x2;
258 
259  ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > jetLorentz(0,0,0,0);
260  l1t::Jet theJet(*&jetLorentz, jetET, jetEta, jetPhi, jetQual);
261  //l1t::Jet theJet(0, jetET, jetEta, jetPhi);
262 
263  uncalibjets->push_back(theJet);
264  }
265  }
bool neighbor(int endcap, int sector, int SectIndex, int id, int sub, int station)
Definition: Jet.h:16
int deltaGctPhi(const CaloRegion &region, const CaloRegion &neighbor)
void l1t::TwoByTwoFinder ( const int  jetSeedThreshold,
const int  etaMask,
const std::vector< l1t::CaloRegion > *  regions,
std::vector< l1t::Jet > *  uncalibjets 
)

Definition at line 267 of file JetFinderMethods.cc.

References gather_cfg::cout, deltaGctPhi(), reco::btau::jetEta, reco::btau::jetPhi, hpstanc_transforms::max, and neighbor().

Referenced by l1t::Stage1Layer2JetAlgorithmImpHI::processEvent().

271  {
272  for(std::vector<CaloRegion>::const_iterator region = regions->begin(); region != regions->end(); region++) {
273  int regionET = region->hwPt();
274  if (regionET <= jetSeedThreshold) continue;
275  int subEta = region->hwEta();
276  if((etaMask & (1<<subEta))>>subEta) regionET = 0;
277  int neighborN_et = 0;
278  int neighborS_et = 0;
279  int neighborE_et = 0;
280  int neighborW_et = 0;
281  int neighborNE_et = 0;
282  int neighborSW_et = 0;
283  int neighborNW_et = 0;
284  int neighborSE_et = 0;
285  unsigned int nNeighbors = 0;
286  for(std::vector<CaloRegion>::const_iterator neighbor = regions->begin(); neighbor != regions->end(); neighbor++) {
287  int neighborET = neighbor->hwPt();
288  int subEta2 = neighbor->hwEta();
289  if((etaMask & (1<<subEta2))>>subEta2) neighborET = 0;
290 
291  if(deltaGctPhi(*region, *neighbor) == 1 &&
292  (region->hwEta() ) == neighbor->hwEta()) {
293  neighborN_et = neighborET;
294  nNeighbors++;
295  continue;
296  }
297  else if(deltaGctPhi(*region, *neighbor) == -1 &&
298  (region->hwEta() ) == neighbor->hwEta()) {
299  neighborS_et = neighborET;
300  nNeighbors++;
301  continue;
302  }
303  else if(deltaGctPhi(*region, *neighbor) == 0 &&
304  (region->hwEta() + 1) == neighbor->hwEta()) {
305  neighborE_et = neighborET;
306  nNeighbors++;
307  continue;
308  }
309  else if(deltaGctPhi(*region, *neighbor) == 0 &&
310  (region->hwEta() - 1) == neighbor->hwEta()) {
311  neighborW_et = neighborET;
312  nNeighbors++;
313  continue;
314  }
315  else if(deltaGctPhi(*region, *neighbor) == 1 &&
316  (region->hwEta() + 1) == neighbor->hwEta()) {
317  neighborNE_et = neighborET;
318  nNeighbors++;
319  continue;
320  }
321  else if(deltaGctPhi(*region, *neighbor) == -1 &&
322  (region->hwEta() - 1) == neighbor->hwEta()) {
323  neighborSW_et = neighborET;
324  nNeighbors++;
325  continue;
326  }
327  else if(deltaGctPhi(*region, *neighbor) == 1 &&
328  (region->hwEta() - 1) == neighbor->hwEta()) {
329  neighborNW_et = neighborET;
330  nNeighbors++;
331  continue;
332  }
333  else if(deltaGctPhi(*region, *neighbor) == -1 &&
334  (region->hwEta() + 1) == neighbor->hwEta()) {
335  neighborSE_et = neighborET;
336  nNeighbors++;
337  continue;
338  }
339 
340  }
341  if(regionET > neighborN_et &&
342  regionET > neighborNW_et &&
343  regionET > neighborW_et &&
344  regionET > neighborSW_et &&
345  regionET >= neighborNE_et &&
346  regionET >= neighborE_et &&
347  regionET >= neighborSE_et &&
348  regionET >= neighborS_et) {
349 
350  // use the highest-pT 2x2 jet inside this 3x3
351  unsigned int jetET_NW;
352  unsigned int jetET_NE;
353  unsigned int jetET_SW;
354  unsigned int jetET_SE;
355 
356  jetET_NW = regionET + neighborW_et + neighborNW_et + neighborN_et;
357  jetET_NE = regionET + neighborE_et + neighborNE_et + neighborN_et;
358  jetET_SW = regionET + neighborS_et + neighborSW_et + neighborW_et;
359  jetET_SE = regionET + neighborS_et + neighborSE_et + neighborE_et;
360 
361  unsigned int jetET = std::max(jetET_NW, jetET_NE);
362  jetET = std::max(jetET, jetET_SW);
363  jetET = std::max(jetET, jetET_SE);
364 
365  int jetPhi = region->hwPhi();
366  int jetEta = region->hwEta();
367 
368  bool neighborCheck = (nNeighbors == 8);
369  // On the eta edge we only expect 5 neighbor
370  if (!neighborCheck && (jetEta == 0 || jetEta == 21) && nNeighbors == 5)
371  neighborCheck = true;
372 
373  if (!neighborCheck) {
374  std::cout << "phi: " << jetPhi << " eta: " << jetEta << " n: " << nNeighbors << std::endl;
375  assert(false);
376  }
377 
378  //first iteration, eta cut defines forward
379  const bool forward = (jetEta < 4 || jetEta > 17);
380  int jetQual = 0;
381  if(forward)
382  jetQual |= 0x2;
383 
384  ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > jetLorentz(0,0,0,0);
385  l1t::Jet theJet(*&jetLorentz, jetET, jetEta, jetPhi, jetQual);
386  uncalibjets->push_back(theJet);
387  }
388  }
389  }
bool neighbor(int endcap, int sector, int SectIndex, int id, int sub, int station)
Definition: Jet.h:16
int deltaGctPhi(const CaloRegion &region, const CaloRegion &neighbor)