test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Typedefs | Enumerations | Functions
l1t Namespace Reference

map containing the conditions More...

Classes

class  AlgorithmEvaluation
 
class  CaloCluster
 
class  CaloCondition
 
class  CaloEmCand
 
class  CaloMainProcessor
 
class  CaloParams
 
class  CaloParamsESProducer
 
class  CaloRegion
 
class  CaloStage1Cluster
 
class  CaloStage1FirmwareFactory
 
class  CaloStage2JetAlgorithm
 
class  CaloStage2Nav
 
class  CaloStage2TowerAlgorithmFirmwareImp1
 
class  CaloTools
 
class  CaloTower
 
class  ConditionEvaluation
 
class  DataAlreadyPresentException
 
class  DataInvalidException
 
class  DataManager
 
class  DataWriter
 
class  Description
 
class  EGamma
 
class  EtSum
 
class  FakeInputProducer
 
class  GenToInputProducer
 
class  GtBoard
 
struct  GtConditionCategoryStringToEnum
 
struct  GtConditionTypeStringToEnum
 
class  GtInputDump
 
class  GtProducer
 
class  GtRecordDump
 
class  Interval
 
class  IntervalManager
 
class  Jet
 
class  L1Candidate
 
struct  L1GtBoardTypeStringToEnum
 
struct  L1GtPsbQuadStringToEnum
 
class  L1TCaloRCTToUpgradeConverter
 
class  L1TCaloUpgradeToGCTConverter
 
class  LUT
 
class  MuCondition
 
class  Muon
 
class  OMDSReader
 
class  PhysicalEtAdder
 
class  Stage1Layer2EGammaAlgorithm
 
class  Stage1Layer2EGammaAlgorithmImpPP
 
class  Stage1Layer2EtSumAlgorithm
 
class  Stage1Layer2EtSumAlgorithmImpPP
 
class  Stage1Layer2FirmwareFactory
 
class  Stage1Layer2JetAlgorithm
 
class  Stage1Layer2JetAlgorithmImpHI
 
class  Stage1Layer2JetAlgorithmImpPP
 
class  Stage1Layer2MainProcessor
 
class  Stage1Layer2MainProcessorFirmwareImp1
 
class  Stage1Layer2Producer
 
class  Stage1Layer2SingleTrackHI
 
class  Stage1Layer2TauAlgorithm
 
class  Stage1Layer2TauAlgorithmImpPP
 
class  Stage2CaloAnalyzer
 
class  Stage2Layer1FirmwareFactory
 
class  Stage2Layer1Producer
 
class  Stage2Layer2ClusterAlgorithm
 
class  Stage2Layer2ClusterAlgorithmFirmwareImp1
 
class  Stage2Layer2EGammaAlgorithm
 
class  Stage2Layer2EGammaAlgorithmFirmwareImp1
 
class  Stage2Layer2EtSumAlgorithm
 
class  Stage2Layer2EtSumAlgorithmFirmwareImp1
 
class  Stage2Layer2FirmwareFactory
 
class  Stage2Layer2JetAlgorithm
 
class  Stage2Layer2JetAlgorithmFirmwareImp1
 
class  Stage2Layer2JetSumAlgorithm
 
class  Stage2Layer2JetSumAlgorithmFirmwareImp1
 
class  Stage2Layer2MainProcessorFirmwareImp1
 
class  Stage2Layer2Producer
 
class  Stage2Layer2TauAlgorithm
 
class  Stage2Layer2TauAlgorithmFirmwareImp1
 
class  Stage2MainProcessor
 
class  Stage2MainProcessorFirmwareImp1
 
class  Stage2PreProcessor
 
class  Stage2PreProcessorFirmwareImp1
 
class  Stage2TowerCompressAlgorithm
 
class  Stage2TowerCompressAlgorithmFirmwareImp1
 
class  Stage2TowerDecompressAlgorithm
 
class  Stage2TowerDecompressAlgorithmFirmwareImp1
 
class  Tau
 
class  TriggerMenuXmlParser
 
class  TriggerMenuXmlProducer
 
class  WriterProxy
 
class  WriterProxyT
 

Typedefs

typedef std::map< std::string,
L1GtAlgorithm
AlgorithmMap
 map containing the algorithms More...
 
typedef BXVector< CaloClusterCaloClusterBxCollection
 
typedef BXVector< CaloEmCandCaloEmCandBxCollection
 
typedef BXVector< CaloRegionCaloRegionBxCollection
 
typedef BXVector
< CaloStage1Cluster
CaloStage1ClusterBxCollection
 
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,
GtCondition * > 
ConditionMap
 
typedef BXVector< EGammaEGammaBxCollection
 
typedef BXVector< EtSumEtSumBxCollection
 
typedef AlgorithmMap::iterator ItAlgo
 
typedef ConditionMap::iterator ItCond
 
typedef BXVector< JetJetBxCollection
 
typedef BXVector< L1CandidateL1CandidateBxCollection
 
typedef BXVector< MuonMuonBxCollection
 
typedef BXVector< TauTauBxCollection
 
typedef
edmplugin::PluginFactory
< l1t::WriterProxy *()> 
WriterFactory
 

Enumerations

enum  GtConditionCategory {
  CondNull, CondMuon, CondCalo, CondEnergySum,
  CondJetCounts, CondCorrelation, CondCastor, CondHfBitCounts,
  CondHfRingEtSums, CondBptx, CondExternal
}
 condition categories More...
 
enum  GtConditionType {
  TypeNull, Type1s, Type2s, Type2wsc,
  Type2cor, Type3s, Type4s, TypeETM,
  TypeETT, TypeHTT, TypeHTM, TypeJetCounts,
  TypeCastor, TypeHfBitCounts, TypeHfRingEtSums, TypeBptx,
  TypeExternal
}
 
enum  L1GtBoardType {
  GTFE, FDL, PSB, GMT,
  TCS, TIM, BoardNull
}
 board types in GT More...
 
enum  L1GtPsbQuad {
  Free, TechTr, IsoEGQ, NoIsoEGQ,
  CenJetQ, ForJetQ, TauJetQ, ESumsQ,
  JetCountsQ, MQB1, MQB2, MQF3,
  MQF4, MQB5, MQB6, MQF7,
  MQF8, MQB9, MQB10, MQF11,
  MQF12, CastorQ, HfQ, BptxQ,
  GtExternalQ, PsbQuadNull
}
 quadruples sent to GT via PSB More...
 

Functions

bool compareCorrJets (l1t::Jet m, l1t::Jet n)
 
bool compareJets (l1t::Jet i, l1t::Jet j)
 
int deltaGctPhi (const CaloRegion &region, const CaloRegion &neighbor)
 
void HICaloRingSubtraction (const std::vector< l1t::CaloRegion > &regions, std::vector< l1t::CaloRegion > *subRegions)
 ------------— For heavy ion ----------------------------------— More...
 
void JetCalibration1 (std::vector< l1t::Jet > *uncalibjets, std::vector< double > jetSF, std::vector< l1t::Jet > *jets, bool applyJetCalibration, double jetLSB)
 
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 l1GtPsbQuadEnumToString (const L1GtPsbQuad &)
 
L1GtPsbQuad l1GtPsbQuadStringToEnum (const std::string &)
 
void RegionCorrection (const std::vector< l1t::CaloRegion > &regions, const std::vector< l1t::CaloEmCand > &EMCands, std::vector< l1t::CaloRegion > *subRegions, std::vector< double > regionSubtraction, bool PUSubtract)
 ------— New region correction (PUsub, no response correction at the moment) --------— More...
 
void slidingWindowJetFinder (const int, const std::vector< l1t::CaloRegion > *regions, std::vector< l1t::Jet > *uncalibjets)
 

Detailed Description

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
: Vasile Mihai Ghete - HEPHY Vienna

$Date$ $Revision$

Typedef Documentation

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

map containing the algorithms

Definition at line 32 of file TriggerMenuFwd.h.

Definition at line 65 of file CaloCluster.h.

Definition at line 26 of file CaloEmCand.h.

Definition at line 47 of file CaloRegion.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, GtCondition*> l1t::ConditionMap

Definition at line 29 of file TriggerMenuFwd.h.

Definition at line 11 of file EGamma.h.

Definition at line 10 of file EtSum.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 9 of file L1Candidate.h.

Definition at line 9 of file Muon.h.

Definition at line 10 of file Tau.h.

Definition at line 88 of file WriterProxy.h.

Enumeration Type Documentation

condition categories

Enumerator
CondNull 
CondMuon 
CondCalo 
CondEnergySum 
CondJetCounts 
CondCorrelation 
CondCastor 
CondHfBitCounts 
CondHfRingEtSums 
CondBptx 
CondExternal 

Definition at line 128 of file GtDefinitions.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 TypeJetCounts : JetCounts TypeCastor : CASTOR condition (logical result only; definition in CASTOR) TypeHfBitCounts : HfBitCounts TypeHfRingEtSums : HfRingEtSums TypeBptx: BPTX (logical result only; definition in BPTX system) TypeExternal: external conditions (logical result only; definition in L1 GT external systems)

Enumerator
TypeNull 
Type1s 
Type2s 
Type2wsc 
Type2cor 
Type3s 
Type4s 
TypeETM 
TypeETT 
TypeHTT 
TypeHTM 
TypeJetCounts 
TypeCastor 
TypeHfBitCounts 
TypeHfRingEtSums 
TypeBptx 
TypeExternal 

Definition at line 99 of file GtDefinitions.h.

board types in GT

Enumerator
GTFE 
FDL 
PSB 
GMT 
TCS 
TIM 
BoardNull 

Definition at line 28 of file GtDefinitions.h.

28  {
29  GTFE,
30  FDL,
31  PSB,
32  GMT,
33  TCS,
34  TIM,
35  BoardNull
36 };

quadruples sent to GT via PSB

Enumerator
Free 
TechTr 
IsoEGQ 
NoIsoEGQ 
CenJetQ 
ForJetQ 
TauJetQ 
ESumsQ 
JetCountsQ 
MQB1 
MQB2 
MQF3 
MQF4 
MQB5 
MQB6 
MQF7 
MQF8 
MQB9 
MQB10 
MQF11 
MQF12 
CastorQ 
HfQ 
BptxQ 
GtExternalQ 
PsbQuadNull 

Definition at line 47 of file GtDefinitions.h.

Function Documentation

bool l1t::compareCorrJets ( l1t::Jet  m,
l1t::Jet  n 
)

Definition at line 12 of file JetCalibrationMethods.cc.

References l1t::L1Candidate::hwPt().

Referenced by JetCalibration1().

12  {
13  return (m.hwPt() < n.hwPt() );
14  }
int hwPt() const
Definition: L1Candidate.cc:69
bool l1t::compareJets ( l1t::Jet  i,
l1t::Jet  j 
)

Definition at line 30 of file JetFinderMethods.cc.

References l1t::L1Candidate::hwPt().

Referenced by slidingWindowJetFinder().

30  {
31  return (i.hwPt() < j.hwPt() );
32  }
int hwPt() const
Definition: L1Candidate.cc:69
int l1t::deltaGctPhi ( const CaloRegion &  region,
const CaloRegion &  neighbor 
)

Definition at line 19 of file JetFinderMethods.cc.

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

Referenced by slidingWindowJetFinder().

20  {
21  int phi1 = region.hwPhi();
22  int phi2 = neighbor.hwPhi();
23  int diff = phi1 - phi2;
24  if (std::abs(phi1 - phi2) == L1CaloRegionDetId::N_PHI-1) { //18 regions in phi
25  diff = -diff/std::abs(diff);
26  }
27  return diff;
28  }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
static const unsigned N_PHI
void l1t::HICaloRingSubtraction ( const std::vector< l1t::CaloRegion > &  regions,
std::vector< l1t::CaloRegion > *  subRegions 
)

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

Definition at line 18 of file PUSubtractionMethods.cc.

References i, bookConverter::max, and L1CaloRegionDetId::N_ETA.

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

20  {
21  int puLevelHI[L1CaloRegionDetId::N_ETA];
22  double r_puLevelHI[L1CaloRegionDetId::N_ETA];
23  int etaCount[L1CaloRegionDetId::N_ETA];
24  for(unsigned i = 0; i < L1CaloRegionDetId::N_ETA; ++i)
25  {
26  puLevelHI[i] = 0;
27  r_puLevelHI[i] = 0.0;
28  etaCount[i] = 0;
29  }
30 
31  for(std::vector<CaloRegion>::const_iterator region = regions.begin();
32  region != regions.end(); region++){
33  r_puLevelHI[region->hwEta()] += region->hwPt();
34  etaCount[region->hwEta()]++;
35  }
36 
37  for(unsigned i = 0; i < L1CaloRegionDetId::N_ETA; ++i)
38  {
39  puLevelHI[i] = floor(r_puLevelHI[i]/etaCount[i] + 0.5);
40  }
41 
42  for(std::vector<CaloRegion>::const_iterator region = regions.begin(); region!= regions.end(); region++){
43  int subPt = std::max(0, region->hwPt() - puLevelHI[region->hwEta()]);
44  int subEta = region->hwEta();
45  int subPhi = region->hwPhi();
46 
47  ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > *lorentz =
48  new ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> >();
49 
50  CaloRegion newSubRegion(*lorentz, 0, 0, subPt, subEta, subPhi, 0, 0, 0);
51  subRegions->push_back(newSubRegion);
52  }
53  }
int i
Definition: DBlmapReader.cc:9
static const unsigned N_ETA
void l1t::JetCalibration1 ( std::vector< l1t::Jet > *  uncalibjets,
std::vector< double >  jetSF,
std::vector< l1t::Jet > *  jets,
bool  applyJetCalibration,
double  jetLSB 
)

Definition at line 16 of file JetCalibrationMethods.cc.

References alpha, compareCorrJets(), reco::btau::jetEta, reco::btau::jetPhi, reco::btau::jetPt, and python.multivaluedict::sort().

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

21  {
22 
23  for (std::vector<l1t::Jet>::const_iterator uncalibjet = uncalibjets->begin(); uncalibjet != uncalibjets->end(); ++uncalibjet){
24 
25  if (!applyJetCalibration) {
26  l1t::Jet corrjets = *uncalibjet;
27  jets->push_back(corrjets);
28  continue;
29  }
30 
31  int jetPt = (uncalibjet->hwPt())*jetLSB; // correction factors are parameterized as functions of physical pt
32  int jetPhi = uncalibjet->hwPhi();
33  int jetEta = uncalibjet->hwEta();
34  int jetQual = uncalibjet->hwQual();
35  double jpt = 0.0;
36 
37  double alpha = jetSF[2*jetEta + 0]; //Scale factor (See jetSF_cfi.py)
38  double gamma = ((jetSF[2*jetEta + 1])); //Offset
39 
40  jpt = jetPt*alpha+gamma;
41  unsigned int corjetET =(int) (jpt/jetLSB);
42 
43  ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > *jetLorentz =
44  new ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> >();
45  l1t::Jet corrjets(*jetLorentz, corjetET, jetEta, jetPhi, jetQual);
46 
47  jets->push_back(corrjets);
48 
49 
50  }
51 
52  std::sort(jets->begin(), jets->end(), compareCorrJets);
53  std::reverse(jets->begin(), jets->end());
54  }
float alpha
Definition: AMPTWrapper.h:95
Definition: Jet.h:13
vector< PseudoJet > jets
bool compareCorrJets(l1t::Jet m, l1t::Jet n)
std::string l1t::l1GtBoardTypeEnumToString ( const L1GtBoardType boardType)

Definition at line 144 of file GtDefinitions.cc.

References BoardNull, and query::result.

144  {
145  char const *result= valueToKey(boardType, l1GtBoardTypeStringToEnumMap);
146  if (boardType == l1t::BoardNull) {
147  edm::LogInfo("GtDefinitions")
148  << "\n l1t::BoardNull means no valid board type defined!";
149  }
150  if (!result) {
151  edm::LogInfo("GtDefinitions") << "\n '" << boardType
152  << "' is not a recognized l1t::L1GtBoardType. "
153  << "\n Return l1t::BoardNull, which means no valid board type defined!";
154  return "l1t::BoardNull";
155  }
156  return result;
157 }
tuple result
Definition: query.py:137
l1t::L1GtBoardType l1t::l1GtBoardTypeStringToEnum ( const std::string &  label)

Definition at line 128 of file GtDefinitions.cc.

References BoardNull, BoardNull, and relativeConstraints::value.

128  {
129  l1t::L1GtBoardType value = keyToValue(label.c_str(), l1GtBoardTypeStringToEnumMap);
130  if (value == (l1t::L1GtBoardType) - 1) {
131  edm::LogInfo("GtDefinitions") << "\n '" << label
132  << "' is not a recognized l1t::L1GtBoardType. \n Return l1t::BoardNull.";
133  value = l1t::BoardNull;
134  }
135 
136  if (value == l1t::BoardNull) {
137  edm::LogInfo("GtDefinitions")
138  << "\n l1t::BoardNull means no valid board type defined!";
139  }
140 
141  return value;
142 }
L1GtBoardType
board types in GT
Definition: GtDefinitions.h:28
std::string l1t::l1GtConditionCategoryEnumToString ( const GtConditionCategory &  conditionCategory)

Definition at line 248 of file GtDefinitions.cc.

References CondNull, and query::result.

248  {
249  char const *result = valueToKey(conditionCategory, l1GtConditionCategoryStringToEnumMap);
250  if (conditionCategory == l1t::CondNull)
251  edm::LogInfo("GtDefinitions")
252  << "\n Return l1t::CondNull, which means no valid condition category defined!";
253 
254  if (!result) {
255  result = "l1t::CondNull";
256  edm::LogInfo("GtDefinitions") << "\n '" << conditionCategory
257  << "' is not a recognized l1t::GtConditionCategory. "
258  << "\n Return l1t::CondNull, which means no valid condition category defined!";
259  }
260 
261  return result;
262 }
tuple result
Definition: query.py:137
l1t::GtConditionCategory l1t::l1GtConditionCategoryStringToEnum ( const std::string &  label)

Definition at line 229 of file GtDefinitions.cc.

References CondNull, CondNull, and relativeConstraints::value.

229  {
230  l1t::GtConditionCategory value = keyToValue(label.c_str(), l1GtConditionCategoryStringToEnumMap);
231  // in case of unrecognized l1t::GtConditionCategory, return l1t::CondNull
232  // to be dealt by the corresponding module
233  if (value == (l1t::GtConditionCategory) -1) {
234  edm::LogInfo("GtDefinitions") << "\n '" << label
235  << "' is not a recognized l1t::GtConditionCategory. \n Return l1t::CondNull.";
236 
237  value = l1t::CondNull;
238  }
239 
240  if (value == l1t::CondNull) {
241  edm::LogInfo("GtDefinitions")
242  << "\n l1t::CondNull means no valid condition category defined!";
243  }
244 
245  return value;
246 }
GtConditionCategory
condition categories
std::string l1t::l1GtConditionTypeEnumToString ( const GtConditionType &  conditionType)

Definition at line 215 of file GtDefinitions.cc.

References query::result, and TypeNull.

215  {
216  const char *result = valueToKey(conditionType, l1GtConditionTypeStringToEnumMap);
217  if (conditionType == l1t::TypeNull)
218  edm::LogInfo("GtDefinitions")
219  << "\n Return l1t::TypeNull, which means no valid condition type defined!";
220  if (!result) {
221  result = "l1t::TypeNull";
222  edm::LogInfo("GtDefinitions") << "\n '" << conditionType
223  << "' is not a recognized l1t::GtConditionType. "
224  << "\n Return l1t::TypeNull, which means no valid condition type defined!";
225  }
226  return result;
227 }
tuple result
Definition: query.py:137
l1t::GtConditionType l1t::l1GtConditionTypeStringToEnum ( const std::string &  label)

Definition at line 195 of file GtDefinitions.cc.

References TypeNull, TypeNull, and relativeConstraints::value.

195  {
196  l1t::GtConditionType value = keyToValue(label.c_str(), l1GtConditionTypeStringToEnumMap);
197 
198  // in case of unrecognized l1t::GtConditionType, return l1t::TypeNull
199  // to be dealt by the corresponding module
200  if (value == (l1t::GtConditionType) -1) {
201  edm::LogInfo("GtDefinitions") << "\n '" << label
202  << "' is not a recognized l1t::GtConditionType. \n Return l1t::TypeNull.";
203 
204  value = l1t::TypeNull;
205  }
206 
207  if (value == l1t::TypeNull) {
208  edm::LogInfo("GtDefinitions")
209  << "\n l1t::TypeNull means no valid condition type defined!";
210  }
211 
212  return value;
213 }
GtConditionType
Definition: GtDefinitions.h:99
std::string l1t::l1GtPsbQuadEnumToString ( const L1GtPsbQuad psbQuad)

Definition at line 180 of file GtDefinitions.cc.

References PsbQuadNull, and query::result.

180  {
181  char const*result = valueToKey(psbQuad, l1GtPsbQuadStringToEnumMap);
182  if (psbQuad == l1t::PsbQuadNull)
183  edm::LogInfo("GtDefinitions") << "\n l1t::PsbQuadNull means no valid PSB quadruplet defined!";
184  if (!result) {
185  result = "l1t::PsbQuadNull";
186  edm::LogInfo("GtDefinitions") << "\n '" << psbQuad
187  << "' is not a recognized l1t::L1GtPsbQuad. "
188  << "\n Return l1t::PsbQuadNull, which means no valid PSB quadruplet defined!";
189  }
190 
191  return result;
192 }
tuple result
Definition: query.py:137
l1t::L1GtPsbQuad l1t::l1GtPsbQuadStringToEnum ( const std::string &  label)

Definition at line 162 of file GtDefinitions.cc.

References PsbQuadNull, PsbQuadNull, and relativeConstraints::value.

162  {
163  l1t::L1GtPsbQuad value = keyToValue(label.c_str(), l1GtPsbQuadStringToEnumMap);
164  // in case of unrecognized l1t::L1GtPsbQuad, return l1t::PsbQuadNull
165  // to be dealt by the corresponding module
166  if (value == -1) {
167  edm::LogInfo("GtDefinitions") << "\n '" << label
168  << "' is not a recognized l1t::L1GtPsbQuad. \n Return l1t::PsbQuadNull.";
169  value = l1t::PsbQuadNull;
170  }
171 
172  if (value == l1t::PsbQuadNull) {
173  edm::LogInfo("GtDefinitions")
174  << "\n l1t::PsbQuadNull means no valid PSB quadruplet defined!";
175  }
176 
177  return value;
178 }
L1GtPsbQuad
quadruples sent to GT via PSB
Definition: GtDefinitions.h:47
void l1t::RegionCorrection ( const std::vector< l1t::CaloRegion > &  regions,
const std::vector< l1t::CaloEmCand > &  EMCands,
std::vector< l1t::CaloRegion > *  subRegions,
std::vector< double >  regionSubtraction,
bool  PUSubtract 
)

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

Definition at line 58 of file PUSubtractionMethods.cc.

References alpha, and l1t::L1Candidate::hwPt().

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

63 {
64 
65  int puMult = 0;
66  // ------------ This calulates PUM0 -------------------
67  for(std::vector<CaloRegion>::const_iterator notCorrectedRegion = regions.begin();
68  notCorrectedRegion != regions.end(); notCorrectedRegion++){
69  int regionET = notCorrectedRegion->hwPt();
70  // cout << "regionET: " << regionET <<endl;
71  if (regionET > 0) {puMult++;}
72  }
73 
74  for(std::vector<CaloRegion>::const_iterator notCorrectedRegion = regions.begin();
75  notCorrectedRegion != regions.end(); notCorrectedRegion++){
76 
77  if(!PUSubtract) {
78  CaloRegion newSubRegion= *notCorrectedRegion;
79  subRegions->push_back(newSubRegion);
80  continue;
81  }
82 
83  int regionET = notCorrectedRegion->hwPt();
84  int regionEta = notCorrectedRegion->hwEta();
85  int regionPhi = notCorrectedRegion->hwPhi();
86 
87  int regionEtCorr (0);
88  // Only non-empty regions are corrected
89  if (regionET !=0) {
90  int energyECAL2x1=0;
91  // Find associated 2x1 ECAL energy (EG are calibrated,
92  // we should not scale them up, it affects the isolation routines)
93  // 2x1 regions have the MAX tower contained in the 4x4 region that its position points to.
94  // This is to not break isolation.
95  for(CaloEmCandBxCollection::const_iterator egCand = EMCands.begin();
96  egCand != EMCands.end(); egCand++) {
97  int et = egCand->hwPt();
98  if(egCand->hwPhi() == regionPhi && egCand->hwEta() == regionEta) {
99  energyECAL2x1=et;
100  break; // I do not really like "breaks"
101  }
102  }
103 
104  //comment out region corrections (below) at the moment since they're broken
105 
106  //double alpha = regionSF[2*regionEta + 0]; //Region Scale factor (See regionSF_cfi)
107  //double gamma = 2*((regionSF[2*regionEta + 1])/9); //Region Offset.
108  // It needs to be divided by nine from the jet derived value in the lookup table.
109  // Multiplied by 2 because gamma is given in regionPhysicalET (=regionEt*regionLSB),
110  // while we want regionEt= physicalEt/LSB and LSB=.5.
111 
112 
113  //if(!ResponseCorr || regionET<20) {alpha=1; gamma=0;}
114  double alpha=1; double gamma=0;
115 
116 
117  int pumbin = (int) puMult/22; //396 Regions. Bins are 22 wide. Dividing by 22 gives which bin# of the 18 bins.
118 
119  double puSub = regionSubtraction[18*regionEta+pumbin]*2;
120  // The values in regionSubtraction are MULTIPLIED by
121  // RegionLSB=.5 (physicalRegionEt), so to get back unmultiplied
122  // regionSubtraction we want to multiply the number by 2
123  // (aka divide by LSB).
124 
125  int corrpum0pt (0);
126  if(regionET - puSub>0) {
127  int pum0pt = (regionET - puSub-energyECAL2x1); //subtract ECAl energy
128 
129  corrpum0pt = pum0pt*alpha+gamma+energyECAL2x1;
130  //add back in ECAL energy, calibrate regions(not including the ECAL2x1).
131  if (corrpum0pt <0 || pum0pt<0) {corrpum0pt=0;} //zero floor
132  }
133  regionEtCorr = corrpum0pt;
134  }
135 
136  ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > *lorentz =
137  new ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> >();
138  CaloRegion newSubRegion(*lorentz, 0, 0, regionEtCorr, regionEta, regionPhi, 0, 0, 0);
139  subRegions->push_back(newSubRegion);
140  }
141 
142 }
float alpha
Definition: AMPTWrapper.h:95
void l1t::slidingWindowJetFinder ( const int  jetSeedThreshold,
const std::vector< l1t::CaloRegion > *  regions,
std::vector< l1t::Jet > *  uncalibjets 
)

Definition at line 34 of file JetFinderMethods.cc.

References compareJets(), gather_cfg::cout, deltaGctPhi(), reco::btau::jetEta, reco::btau::jetPhi, and python.multivaluedict::sort().

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

36  {
37  // std::cout << "Jet Seed: " << jetSeedThreshold << std::endl;
38  for(std::vector<CaloRegion>::const_iterator region = regions->begin(); region != regions->end(); region++) {
39  double regionET = region->hwPt(); //regionPhysicalEt(*region);
40  if (regionET <= jetSeedThreshold) continue;
41  double neighborN_et = 0;
42  double neighborS_et = 0;
43  double neighborE_et = 0;
44  double neighborW_et = 0;
45  double neighborNE_et = 0;
46  double neighborSW_et = 0;
47  double neighborNW_et = 0;
48  double neighborSE_et = 0;
49  unsigned int nNeighbors = 0;
50  for(std::vector<CaloRegion>::const_iterator neighbor = regions->begin(); neighbor != regions->end(); neighbor++) {
51  double neighborET = neighbor->hwPt(); //regionPhysicalEt(*neighbor);
52  if(deltaGctPhi(*region, *neighbor) == 1 &&
53  (region->hwEta() ) == neighbor->hwEta()) {
54  neighborN_et = neighborET;
55  nNeighbors++;
56  continue;
57  }
58  else if(deltaGctPhi(*region, *neighbor) == -1 &&
59  (region->hwEta() ) == neighbor->hwEta()) {
60  neighborS_et = neighborET;
61  nNeighbors++;
62  continue;
63  }
64  else if(deltaGctPhi(*region, *neighbor) == 0 &&
65  (region->hwEta() + 1) == neighbor->hwEta()) {
66  neighborE_et = neighborET;
67  nNeighbors++;
68  continue;
69  }
70  else if(deltaGctPhi(*region, *neighbor) == 0 &&
71  (region->hwEta() - 1) == neighbor->hwEta()) {
72  neighborW_et = neighborET;
73  nNeighbors++;
74  continue;
75  }
76  else if(deltaGctPhi(*region, *neighbor) == 1 &&
77  (region->hwEta() + 1) == neighbor->hwEta()) {
78  neighborNE_et = neighborET;
79  nNeighbors++;
80  continue;
81  }
82  else if(deltaGctPhi(*region, *neighbor) == -1 &&
83  (region->hwEta() - 1) == neighbor->hwEta()) {
84  neighborSW_et = neighborET;
85  nNeighbors++;
86  continue;
87  }
88  else if(deltaGctPhi(*region, *neighbor) == 1 &&
89  (region->hwEta() - 1) == neighbor->hwEta()) {
90  neighborNW_et = neighborET;
91  nNeighbors++;
92  continue;
93  }
94  else if(deltaGctPhi(*region, *neighbor) == -1 &&
95  (region->hwEta() + 1) == neighbor->hwEta()) {
96  neighborSE_et = neighborET;
97  nNeighbors++;
98  continue;
99  }
100  }
101  if(regionET > neighborN_et &&
102  regionET > neighborNW_et &&
103  regionET > neighborW_et &&
104  regionET > neighborSW_et &&
105  regionET >= neighborNE_et &&
106  regionET >= neighborE_et &&
107  regionET >= neighborSE_et &&
108  regionET >= neighborS_et) {
109  unsigned int jetET = regionET +
110  neighborN_et + neighborS_et + neighborE_et + neighborW_et +
111  neighborNE_et + neighborSW_et + neighborSE_et + neighborNW_et;
112  /*
113  int jetPhi = region->hwPhi() * 4 +
114  ( - 2 * (neighborS_et + neighborSE_et + neighborSW_et)
115  + 2 * (neighborN_et + neighborNE_et + neighborNW_et) ) / jetET;
116  if(jetPhi < 0) {
117 
118  }
119  else if(jetPhi >= ((int) N_JET_PHI)) {
120  jetPhi -= N_JET_PHI;
121  }
122  int jetEta = region->hwEta() * 4 +
123  ( - 2 * (neighborW_et + neighborNW_et + neighborSW_et)
124  + 2 * (neighborE_et + neighborNE_et + neighborSE_et) ) / jetET;
125  if(jetEta < 0) jetEta = 0;
126  if(jetEta >= ((int) N_JET_ETA)) jetEta = N_JET_ETA - 1;
127  */
128  // Temporarily use the region granularity -- we will try to improve as above when code is debugged
129  int jetPhi = region->hwPhi();
130  int jetEta = region->hwEta();
131 
132  bool neighborCheck = (nNeighbors == 8);
133  // On the eta edge we only expect 5 neighbors
134  if (!neighborCheck && (jetEta == 0 || jetEta == 21) && nNeighbors == 5)
135  neighborCheck = true;
136 
137  if (!neighborCheck) {
138  std::cout << "phi: " << jetPhi << " eta: " << jetEta << " n: " << nNeighbors << std::endl;
139  assert(false);
140  }
141 
142  //first iteration, eta cut defines forward
143  //const bool forward = (jetEta <= 4 || jetEta >= 17);
144  const bool forward = (jetEta < 4 || jetEta > 17);
145  int jetQual = 0;
146  if(forward)
147  jetQual |= 0x2;
148 
149  ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > *jetLorentz =
150  new ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> >();
151  l1t::Jet theJet(*jetLorentz, jetET, jetEta, jetPhi, jetQual);
152  //l1t::Jet theJet(0, jetET, jetEta, jetPhi);
153 
154  uncalibjets->push_back(theJet);
155  }
156  }
157 
158  // // separate loops for the central jets at the edges of HF, composed of 6 regions only.
159  // for(std::vector<CaloRegion>::const_iterator region = regions->begin(); region != regions->end(); region++) {
160  // double regionET = region->hwPt();
161  // // look at only the left eta wall
162  // if (region->hwEta() != 4) continue;
163  // if (regionET < jetSeedThreshold) continue;
164  // double neighborN_et = 0;
165  // double neighborS_et = 0;
166  // double neighborE_et = 0;
167  // //double neighborW_et = 0;
168  // double neighborNE_et = 0;
169  // //double neighborSW_et = 0;
170  // //double neighborNW_et = 0;
171  // double neighborSE_et = 0;
172  // unsigned int nNeighbors = 0;
173  // for(std::vector<CaloRegion>::const_iterator neighbor = regions->begin(); neighbor != regions->end(); neighbor++) {
174 
175  // double neighborET = neighbor->hwPt(); //regionPhysicalEt(*neighbor);
176  // if(deltaGctPhi(*region, *neighbor) == 1 &&
177  // (region->hwEta() ) == neighbor->hwEta()) {
178  // neighborN_et = neighborET;
179  // nNeighbors++;
180  // continue;
181  // }
182  // else if(deltaGctPhi(*region, *neighbor) == -1 &&
183  // (region->hwEta() ) == neighbor->hwEta()) {
184  // neighborS_et = neighborET;
185  // nNeighbors++;
186  // continue;
187  // }
188  // else if(deltaGctPhi(*region, *neighbor) == 0 &&
189  // (region->hwEta() + 1) == neighbor->hwEta()) {
190  // neighborE_et = neighborET;
191  // nNeighbors++;
192  // continue;
193  // }
194  // // else if(deltaGctPhi(*region, *neighbor) == 0 &&
195  // // (region->hwEta() - 1) == neighbor->hwEta()) {
196  // // neighborW_et = neighborET;
197  // // nNeighbors++;
198  // // continue;
199  // // }
200  // else if(deltaGctPhi(*region, *neighbor) == 1 &&
201  // (region->hwEta() + 1) == neighbor->hwEta()) {
202  // neighborNE_et = neighborET;
203  // nNeighbors++;
204  // continue;
205  // }
206  // // else if(deltaGctPhi(*region, *neighbor) == -1 &&
207  // // (region->hwEta() - 1) == neighbor->hwEta()) {
208  // // neighborSW_et = neighborET;
209  // // nNeighbors++;
210  // // continue;
211  // // }
212  // // else if(deltaGctPhi(*region, *neighbor) == 1 &&
213  // // (region->hwEta() - 1) == neighbor->hwEta()) {
214  // // neighborNW_et = neighborET;
215  // // nNeighbors++;
216  // // continue;
217  // // }
218  // else if(deltaGctPhi(*region, *neighbor) == -1 &&
219  // (region->hwEta() + 1) == neighbor->hwEta()) {
220  // neighborSE_et = neighborET;
221  // nNeighbors++;
222  // continue;
223  // }
224  // }
225  // if(regionET > neighborN_et &&
226  // //regionET > neighborNW_et &&
227  // //regionET > neighborW_et &&
228  // //regionET > neighborSW_et &&
229  // regionET >= neighborNE_et &&
230  // regionET >= neighborE_et &&
231  // regionET >= neighborSE_et &&
232  // regionET >= neighborS_et) {
233  // unsigned int jetET = regionET +
234  // neighborN_et + neighborS_et + neighborE_et + /*neighborW_et +*/
235  // neighborNE_et + /*neighborSW_et +*/ neighborSE_et;// + neighborNW_et;
236  // /*
237  // int jetPhi = region->hwPhi() * 4 +
238  // ( - 2 * (neighborS_et + neighborSE_et + neighborSW_et)
239  // + 2 * (neighborN_et + neighborNE_et + neighborNW_et) ) / jetET;
240  // if(jetPhi < 0) {
241 
242  // }
243  // else if(jetPhi >= ((int) N_JET_PHI)) {
244  // jetPhi -= N_JET_PHI;
245  // }
246  // int jetEta = region->hwEta() * 4 +
247  // ( - 2 * (neighborW_et + neighborNW_et + neighborSW_et)
248  // + 2 * (neighborE_et + neighborNE_et + neighborSE_et) ) / jetET;
249  // if(jetEta < 0) jetEta = 0;
250  // if(jetEta >= ((int) N_JET_ETA)) jetEta = N_JET_ETA - 1;
251  // */
252  // // Temporarily use the region granularity -- we will try to improve as above when code is debugged
253  // int jetPhi = region->hwPhi();
254  // int jetEta = region->hwEta();
255 
256  // bool neighborCheck = (nNeighbors == 5);
257  // // On the eta edge we only expect 5 neighbors
258  // // if (!neighborCheck && (jetEta == 0 || jetEta == 21) && nNeighbors == 5)
259  // // neighborCheck = true;
260 
261  // if (!neighborCheck) {
262  // std::cout << "phi: " << jetPhi << " eta: " << jetEta << " n: " << nNeighbors << std::endl;
263  // assert(false);
264  // }
265 
266  // const bool forward = false; //by definition
267  // int jetQual = 0;
268  // if(forward)
269  // jetQual |= 0x2;
270 
271  // ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > *jetLorentz =
272  // new ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> >();
273  // l1t::Jet theJet(*jetLorentz, jetET, jetEta, jetPhi, jetQual);
274  // //l1t::Jet theJet(0, jetET, jetEta, jetPhi);
275 
276  // jets->push_back(theJet);
277  // }
278  // }
279 
280  // // separate loops for the central jets at the edges of HF, composed of 6 regions only.
281  // for(std::vector<CaloRegion>::const_iterator region = regions->begin(); region != regions->end(); region++) {
282  // double regionET = region->hwPt();
283  // // look at only the right eta wall
284  // if (region->hwEta() != 17) continue;
285  // if (regionET < jetSeedThreshold) continue;
286  // double neighborN_et = 0;
287  // double neighborS_et = 0;
288  // //double neighborE_et = 0;
289  // double neighborW_et = 0;
290  // //double neighborNE_et = 0;
291  // double neighborSW_et = 0;
292  // double neighborNW_et = 0;
293  // //double neighborSE_et = 0;
294  // unsigned int nNeighbors = 0;
295  // for(std::vector<CaloRegion>::const_iterator neighbor = regions->begin(); neighbor != regions->end(); neighbor++) {
296 
297  // double neighborET = neighbor->hwPt(); //regionPhysicalEt(*neighbor);
298  // if(deltaGctPhi(*region, *neighbor) == 1 &&
299  // (region->hwEta() ) == neighbor->hwEta()) {
300  // neighborN_et = neighborET;
301  // nNeighbors++;
302  // continue;
303  // }
304  // else if(deltaGctPhi(*region, *neighbor) == -1 &&
305  // (region->hwEta() ) == neighbor->hwEta()) {
306  // neighborS_et = neighborET;
307  // nNeighbors++;
308  // continue;
309  // }
310  // // else if(deltaGctPhi(*region, *neighbor) == 0 &&
311  // // (region->hwEta() + 1) == neighbor->hwEta()) {
312  // // neighborE_et = neighborET;
313  // // nNeighbors++;
314  // // continue;
315  // // }
316  // else if(deltaGctPhi(*region, *neighbor) == 0 &&
317  // (region->hwEta() - 1) == neighbor->hwEta()) {
318  // neighborW_et = neighborET;
319  // nNeighbors++;
320  // continue;
321  // }
322  // // else if(deltaGctPhi(*region, *neighbor) == 1 &&
323  // // (region->hwEta() + 1) == neighbor->hwEta()) {
324  // // neighborNE_et = neighborET;
325  // // nNeighbors++;
326  // // continue;
327  // // }
328  // else if(deltaGctPhi(*region, *neighbor) == -1 &&
329  // (region->hwEta() - 1) == neighbor->hwEta()) {
330  // neighborSW_et = neighborET;
331  // nNeighbors++;
332  // continue;
333  // }
334  // else if(deltaGctPhi(*region, *neighbor) == 1 &&
335  // (region->hwEta() - 1) == neighbor->hwEta()) {
336  // neighborNW_et = neighborET;
337  // nNeighbors++;
338  // continue;
339  // }
340  // // else if(deltaGctPhi(*region, *neighbor) == -1 &&
341  // // (region->hwEta() + 1) == neighbor->hwEta()) {
342  // // neighborSE_et = neighborET;
343  // // nNeighbors++;
344  // // continue;
345  // // }
346  // }
347  // if(//regionET > neighborN_et &&
348  // regionET > neighborNW_et &&
349  // regionET > neighborW_et &&
350  // regionET > neighborSW_et &&
351  // //regionET >= neighborNE_et &&
352  // //regionET >= neighborE_et &&
353  // //regionET >= neighborSE_et &&
354  // regionET >= neighborS_et) {
355  // unsigned int jetET = regionET +
356  // neighborN_et + neighborS_et + /*neighborE_et + */neighborW_et +
357  // /*neighborNE_et +*/ neighborSW_et + /*neighborSE_et + */neighborNW_et;
358  // /*
359  // int jetPhi = region->hwPhi() * 4 +
360  // ( - 2 * (neighborS_et + neighborSE_et + neighborSW_et)
361  // + 2 * (neighborN_et + neighborNE_et + neighborNW_et) ) / jetET;
362  // if(jetPhi < 0) {
363 
364  // }
365  // else if(jetPhi >= ((int) N_JET_PHI)) {
366  // jetPhi -= N_JET_PHI;
367  // }
368  // int jetEta = region->hwEta() * 4 +
369  // ( - 2 * (neighborW_et + neighborNW_et + neighborSW_et)
370  // + 2 * (neighborE_et + neighborNE_et + neighborSE_et) ) / jetET;
371  // if(jetEta < 0) jetEta = 0;
372  // if(jetEta >= ((int) N_JET_ETA)) jetEta = N_JET_ETA - 1;
373  // */
374  // // Temporarily use the region granularity -- we will try to improve as above when code is debugged
375  // int jetPhi = region->hwPhi();
376  // int jetEta = region->hwEta();
377 
378  // bool neighborCheck = (nNeighbors == 5);
379  // // On the eta edge we only expect 5 neighbors
380  // // if (!neighborCheck && (jetEta == 0 || jetEta == 21) && nNeighbors == 5)
381  // // neighborCheck = true;
382 
383  // if (!neighborCheck) {
384  // std::cout << "phi: " << jetPhi << " eta: " << jetEta << " n: " << nNeighbors << std::endl;
385  // assert(false);
386  // }
387 
388  // const bool forward = false; //by definition
389  // int jetQual = 0;
390  // if(forward)
391  // jetQual |= 0x2;
392 
393  // ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > *jetLorentz =
394  // new ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> >();
395  // l1t::Jet theJet(*jetLorentz, jetET, jetEta, jetPhi, jetQual);
396  // //l1t::Jet theJet(0, jetET, jetEta, jetPhi);
397 
398  // jets->push_back(theJet);
399  // }
400  // }
401 
402  //the jets should be sorted, highest pT first.
403  // do not truncate the jet list, GT converter handles that
404  std::sort(uncalibjets->begin(), uncalibjets->end(), compareJets);
405  std::reverse(uncalibjets->begin(), uncalibjets->end());
406  }
Definition: Jet.h:13
compareCands< edm::Handle< L1GctJetCandCollection > > compareJets
int deltaGctPhi(const CaloRegion &region, const CaloRegion &neighbor)
tuple cout
Definition: gather_cfg.py:121