CMS 3D CMS Logo

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

#include <L1AnalysisRecoMet.h>

Public Member Functions

L1AnalysisRecoMetDataFormatgetData ()
 
 L1AnalysisRecoMet ()
 
void Reset ()
 
void SetECALFlags (const edm::ESHandle< EcalChannelStatus > chStatus, const edm::Handle< EcalRecHitCollection > ebRecHits, const edm::Handle< EcalRecHitCollection > eeRecHits, const EcalSeverityLevelAlgo *sevlv)
 
void SetHtMht (const edm::Handle< reco::CaloJetCollection > caloJets, float jetptThreshold)
 
void SetMet (const edm::Handle< reco::CaloMETCollection > recoMet)
 
 ~L1AnalysisRecoMet ()
 

Private Attributes

L1AnalysisRecoMetDataFormat recoMet_
 

Detailed Description

Definition at line 22 of file L1AnalysisRecoMet.h.

Constructor & Destructor Documentation

L1Analysis::L1AnalysisRecoMet::L1AnalysisRecoMet ( )

Definition at line 6 of file L1AnalysisRecoMet.cc.

6 {}
L1Analysis::L1AnalysisRecoMet::~L1AnalysisRecoMet ( )

Definition at line 8 of file L1AnalysisRecoMet.cc.

8 {}

Member Function Documentation

L1AnalysisRecoMetDataFormat* L1Analysis::L1AnalysisRecoMet::getData ( void  )
inline

Definition at line 34 of file L1AnalysisRecoMet.h.

References recoMet_.

34 { return &recoMet_; }
L1AnalysisRecoMetDataFormat recoMet_
void L1Analysis::L1AnalysisRecoMet::Reset ( )
inline
void L1Analysis::L1AnalysisRecoMet::SetECALFlags ( const edm::ESHandle< EcalChannelStatus chStatus,
const edm::Handle< EcalRecHitCollection ebRecHits,
const edm::Handle< EcalRecHitCollection eeRecHits,
const EcalSeverityLevelAlgo sevlv 
)

Definition at line 42 of file L1AnalysisRecoMet.cc.

References runTauDisplay::eid, and EcalSeverityLevelAlgo::severityLevel().

45  {
46  int ecalFlag = 0;
47 
48  // loop over EB rechits
49  for (EcalRecHitCollection::const_iterator rechit = ebRecHits->begin(); rechit != ebRecHits->end(); ++rechit) {
50  EBDetId eid(rechit->id());
51  //rechit->recoFlag();
52  //rechit->chi2();
53  //rechit->outOfTimeChi2();
54 
55  //int flag = EcalSeverityLevelAlgo::severityLevel( eid, *ebRecHits, *chStatus );
56  int flag = sevlv->severityLevel(eid, *ebRecHits);
57  if (flag > ecalFlag)
58  ecalFlag = flag;
59  }
60 
61  // not clear what flags are in EE.... don't use them yet
62 
63  recoMet_.ecalFlag = ecalFlag;
64 }
EcalSeverityLevel::SeverityLevel severityLevel(const DetId &id) const
Evaluate status from id use channelStatus from DB.
std::vector< EcalRecHit >::const_iterator const_iterator
L1AnalysisRecoMetDataFormat recoMet_
void L1Analysis::L1AnalysisRecoMet::SetHtMht ( const edm::Handle< reco::CaloJetCollection caloJets,
float  jetptThreshold 
)

Definition at line 19 of file L1AnalysisRecoMet.cc.

20  {
21  float mHx = 0.;
22  float mHy = 0.;
23 
24  recoMet_.Ht = 0;
25  recoMet_.mHt = -999;
26  recoMet_.mHtPhi = -999;
27 
28  for (reco::CaloJetCollection::const_iterator calojet = caloJets->begin(); calojet != caloJets->end(); ++calojet) {
29  if (calojet->pt() > jetptThreshold) {
30  mHx += -1. * calojet->px();
31  mHy += -1. * calojet->py();
32  recoMet_.Ht += calojet->pt();
33  }
34  }
35 
36  TVector2 *tv2 = new TVector2(mHx, mHy);
37 
38  recoMet_.mHt = tv2->Mod();
39  recoMet_.mHtPhi = tv2->Phi();
40 }
L1AnalysisRecoMetDataFormat recoMet_
void L1Analysis::L1AnalysisRecoMet::SetMet ( const edm::Handle< reco::CaloMETCollection recoMet)

Definition at line 10 of file L1AnalysisRecoMet.cc.

References reco::LeafCandidate::et(), reco::LeafCandidate::phi(), edm::Handle< T >::product(), and reco::MET::sumEt().

10  {
11  const reco::CaloMETCollection *metCol = recoMet.product();
12  const reco::CaloMET theMet = metCol->front();
13 
14  recoMet_.met = theMet.et();
15  recoMet_.metPhi = theMet.phi();
16  recoMet_.sumEt = theMet.sumEt();
17 }
double sumEt() const
Definition: MET.h:56
std::vector< reco::CaloMET > CaloMETCollection
collection of CaloMET objects
T const * product() const
Definition: Handle.h:70
double et() const final
transverse energy
L1AnalysisRecoMetDataFormat recoMet_
double phi() const final
momentum azimuthal angle

Member Data Documentation

L1AnalysisRecoMetDataFormat L1Analysis::L1AnalysisRecoMet::recoMet_
private

Definition at line 38 of file L1AnalysisRecoMet.h.

Referenced by getData(), and Reset().