CMS 3D CMS Logo

Functions | Variables
UCTRegion.cc File Reference
#include <iostream>
#include <cstdlib>
#include <cstdint>
#include <bitset>
#include <string>
#include "UCTRegion.hh"
#include "UCTGeometry.hh"
#include "UCTLogging.hh"
#include "UCTTower.hh"

Go to the source code of this file.

Functions

uint32_t getHitTowerLocation (uint32_t *et)
 
std::ostream & operator<< (std::ostream &os, const UCTRegion &r)
 
bool vetoBit (bitset< 4 > etaPattern, bitset< 4 > phiPattern)
 

Variables

const float activityFraction = 0.125
 
const float ecalActivityFraction = 0.25
 
const float miscActivityFraction = 0.25
 

Function Documentation

◆ getHitTowerLocation()

uint32_t getHitTowerLocation ( uint32_t *  et)

Definition at line 53 of file UCTRegion.cc.

References EgHLTOffHistBins_cfi::et.

53  {
54  uint32_t etSum = et[0] + et[1] + et[2] + et[3];
55  uint32_t iEtSum = (et[0] >> 1) + // 0.5xet[0]
56  (et[1] >> 1) + et[1] + // 1.5xet[1]
57  (et[2] >> 1) + (et[2] << 1) + // 2.5xet[2]
58  (et[3] << 2) - (et[3] >> 1); // 3.5xet[3]
59  uint32_t iAve = 0xDEADBEEF;
60  if (iEtSum <= etSum)
61  iAve = 0;
62  else if (iEtSum <= (etSum << 1))
63  iAve = 1;
64  else if (iEtSum <= (etSum + (etSum << 1)))
65  iAve = 2;
66  else
67  iAve = 3;
68  return iAve;
69 }

◆ operator<<()

std::ostream& operator<< ( std::ostream &  os,
const UCTRegion &  r 
)

Definition at line 277 of file UCTRegion.cc.

References TauDecayModes::dec, and alignCSCRings::r.

277  {
278  if (r.negativeEta)
279  os << "UCTRegion Summary for negative eta " << r.region << " HitTower (eta, phi) = (" << std::dec << r.hitCaloEta()
280  << ", " << r.hitCaloPhi() << ")"
281  << " summary = " << std::hex << r.regionSummary << std::endl;
282  else
283  os << "UCTRegion Summary for positive eta " << r.region << " HitTower (eta, phi) = (" << std::dec << r.hitCaloEta()
284  << ", " << r.hitCaloPhi() << ")"
285  << " summary = " << std::hex << r.regionSummary << std::endl;
286 
287  return os;
288 }

◆ vetoBit()

bool vetoBit ( bitset< 4 >  etaPattern,
bitset< 4 >  phiPattern 
)

Definition at line 29 of file UCTRegion.cc.

29  {
30  bitset<4> badPattern5(string("0101"));
31  bitset<4> badPattern7(string("0111"));
32  bitset<4> badPattern9(string("1001"));
33  bitset<4> badPattern10(string("1010"));
34  bitset<4> badPattern11(string("1011"));
35  bitset<4> badPattern13(string("1101"));
36  bitset<4> badPattern14(string("1110"));
37  bitset<4> badPattern15(string("1111"));
38 
39  bool answer = true;
40 
41  if (etaPattern != badPattern5 && etaPattern != badPattern7 && etaPattern != badPattern10 &&
42  etaPattern != badPattern11 && etaPattern != badPattern13 && etaPattern != badPattern14 &&
43  etaPattern != badPattern15 && phiPattern != badPattern5 &&
44  // phiPattern != badPattern7 && phiPattern != badPattern10 &&
45  phiPattern != badPattern10 && phiPattern != badPattern11 && phiPattern != badPattern13 &&
46  //phiPattern != badPattern14 && phiPattern != badPattern15 &&
47  etaPattern != badPattern9 && phiPattern != badPattern9) {
48  answer = false;
49  }
50  return answer;
51 }

Variable Documentation

◆ activityFraction

const float activityFraction = 0.125

Definition at line 25 of file UCTRegion.cc.

◆ ecalActivityFraction

const float ecalActivityFraction = 0.25

Definition at line 26 of file UCTRegion.cc.

◆ miscActivityFraction

const float miscActivityFraction = 0.25

Definition at line 27 of file UCTRegion.cc.