test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions | Variables
UCTRegion.cc File Reference
#include <iostream>
#include <stdlib.h>
#include <stdint.h>
#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

uint32_t getHitTowerLocation ( uint32_t *  et)

Definition at line 57 of file UCTRegion.cc.

57  {
58  uint32_t etSum = et[0] + et[1] + et[2] + et[3];
59  uint32_t iEtSum =
60  (et[0] >> 1) + // 0.5xet[0]
61  (et[1] >> 1) + et[1] + // 1.5xet[1]
62  (et[2] >> 1) + (et[2] << 1) + // 2.5xet[2]
63  (et[3] << 2) - (et[3] >> 1) ; // 3.5xet[3]
64  uint32_t iAve = 0xDEADBEEF;
65  if( iEtSum <= etSum) iAve = 0;
66  else if(iEtSum <= (etSum << 1)) iAve = 1;
67  else if(iEtSum <= (etSum + (etSum << 1))) iAve = 2;
68  else iAve = 3;
69  return iAve;
70 }
std::ostream& operator<< ( std::ostream &  os,
const UCTRegion &  r 
)

Definition at line 268 of file UCTRegion.cc.

References TauDecayModes::dec.

268  {
269  if(r.negativeEta)
270  os << "UCTRegion Summary for negative eta " << r.region
271  << " HitTower (eta, phi) = (" << std::dec << r.hitCaloEta() << ", " << r.hitCaloPhi() << ")"
272  << " summary = "<< std::hex << r.regionSummary << std::endl;
273  else
274  os << "UCTRegion Summary for positive eta " << r.region
275  << " HitTower (eta, phi) = (" << std::dec << r.hitCaloEta() << ", " << r.hitCaloPhi() << ")"
276  << " summary = "<< std::hex << r.regionSummary << std::endl;
277 
278  return os;
279 }
bool vetoBit ( bitset< 4 >  etaPattern,
bitset< 4 >  phiPattern 
)

Definition at line 29 of file UCTRegion.cc.

References submit::answer.

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

Variable Documentation

const float activityFraction = 0.125

Definition at line 25 of file UCTRegion.cc.

const float ecalActivityFraction = 0.25

Definition at line 26 of file UCTRegion.cc.

const float miscActivityFraction = 0.25

Definition at line 27 of file UCTRegion.cc.