CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
l1t::Stage1Layer2FlowAlgorithm Class Reference

#include <Stage1Layer2HFRingSumAlgorithmImp.h>

Inheritance diagram for l1t::Stage1Layer2FlowAlgorithm:
l1t::Stage1Layer2HFRingSumAlgorithm

Public Member Functions

virtual void processEvent (const std::vector< l1t::CaloRegion > &regions, const std::vector< l1t::CaloEmCand > &EMCands, const std::vector< l1t::Tau > *taus, l1t::CaloSpare *spare)
 
 Stage1Layer2FlowAlgorithm (CaloParamsHelper *params)
 
virtual ~Stage1Layer2FlowAlgorithm ()
 
- Public Member Functions inherited from l1t::Stage1Layer2HFRingSumAlgorithm
virtual ~Stage1Layer2HFRingSumAlgorithm ()
 

Private Attributes

std::vector< double > cosPhi
 
CaloParamsHelperparams_
 
std::vector< double > sinPhi
 

Detailed Description

Authors
: Maxime Guilbaud R. Alex Barbieri

Description: Flow Algorithm HI

Definition at line 27 of file Stage1Layer2HFRingSumAlgorithmImp.h.

Constructor & Destructor Documentation

l1t::Stage1Layer2FlowAlgorithm::Stage1Layer2FlowAlgorithm ( CaloParamsHelper params)

Definition at line 14 of file Stage1Layer2FlowAlgorithm.cc.

References funct::cos(), cosPhi, i, L1CaloRegionDetId::N_PHI, funct::sin(), and sinPhi.

14  : params_(params)
15 {
16  //now do what ever initialization is needed
17  //Converting phi to be as it is define at GCT (-pi to pi instead of 0 to 2*pi)
18  for(unsigned int i = 0; i < L1CaloRegionDetId::N_PHI; i++) {
19  if(i < 10){
20  sinPhi.push_back(sin(2. * 3.1415927 * i * 1.0 / L1CaloRegionDetId::N_PHI));
21  cosPhi.push_back(cos(2. * 3.1415927 * i * 1.0 / L1CaloRegionDetId::N_PHI));
22  }
23  else {
24  sinPhi.push_back(sin(-3.1415927 + 2. * 3.1415927 * (i-9) * 1.0 / L1CaloRegionDetId::N_PHI));
25  cosPhi.push_back(cos(-3.1415927 + 2. * 3.1415927 * (i-9) * 1.0 / L1CaloRegionDetId::N_PHI));
26  }
27  }
28 }
int i
Definition: DBlmapReader.cc:9
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
static const unsigned N_PHI
l1t::Stage1Layer2FlowAlgorithm::~Stage1Layer2FlowAlgorithm ( )
virtual

Definition at line 31 of file Stage1Layer2FlowAlgorithm.cc.

31 {}

Member Function Documentation

void l1t::Stage1Layer2FlowAlgorithm::processEvent ( const std::vector< l1t::CaloRegion > &  regions,
const std::vector< l1t::CaloEmCand > &  EMCands,
const std::vector< l1t::Tau > *  taus,
l1t::CaloSpare spare 
)
virtual

Implements l1t::Stage1Layer2HFRingSumAlgorithm.

Definition at line 34 of file Stage1Layer2FlowAlgorithm.cc.

References HLT_25ns14e33_v3_cff::region, and l1t::CaloSpare::SetRing().

37  {
38  double q2x = 0;
39  double q2y = 0;
40  double regionET=0.;
41 
42  for(std::vector<CaloRegion>::const_iterator region = regions.begin(); region != regions.end(); region++) {
43 
44  int ieta=region->hwEta();
45  if (ieta > 3 && ieta < 18) {
46  continue;
47  }
48 
49  int iphi=region->hwPhi();
50  regionET=region->hwPt();
51 
52  q2x+= regionET * cosPhi[iphi];
53  q2y+= regionET * sinPhi[iphi];
54  }
55  int HFq2 = q2x*q2x+q2y*q2y;
56  //double psi2 = 0.5 * atan(q2y/q2x);
57 
58  // ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > dummy(0,0,0,0);
59 
60  // l1t::CaloSpare V2 (*&dummy,CaloSpare::CaloSpareType::V2,(int)HFq2,0,0,0);
61 
62  // spares->push_back(V2);
63  spare->SetRing(1, HFq2&0x7);
64 }
void SetRing(unsigned index, int value)
Definition: CaloSpare.cc:42

Member Data Documentation

std::vector<double> l1t::Stage1Layer2FlowAlgorithm::cosPhi
private

Definition at line 38 of file Stage1Layer2HFRingSumAlgorithmImp.h.

Referenced by Stage1Layer2FlowAlgorithm().

CaloParamsHelper* l1t::Stage1Layer2FlowAlgorithm::params_
private

Definition at line 37 of file Stage1Layer2HFRingSumAlgorithmImp.h.

std::vector<double> l1t::Stage1Layer2FlowAlgorithm::sinPhi
private

Definition at line 39 of file Stage1Layer2HFRingSumAlgorithmImp.h.

Referenced by Stage1Layer2FlowAlgorithm().