CMS 3D CMS Logo

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 23 of file L1AnalysisRecoMet.h.

Constructor & Destructor Documentation

L1Analysis::L1AnalysisRecoMet::L1AnalysisRecoMet ( )

Definition at line 7 of file L1AnalysisRecoMet.cc.

8 {
9 }
L1Analysis::L1AnalysisRecoMet::~L1AnalysisRecoMet ( )

Definition at line 11 of file L1AnalysisRecoMet.cc.

12 {
13 }

Member Function Documentation

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

Definition at line 36 of file L1AnalysisRecoMet.h.

References recoMet_.

36 {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 51 of file L1AnalysisRecoMet.cc.

References edm::SortedCollection< T, SORT >::begin(), L1Analysis::L1AnalysisRecoMetDataFormat::ecalFlag, runTauDisplay::eid, edm::SortedCollection< T, SORT >::end(), RemoveAddSevLevel::flag, recoMet_, and EcalSeverityLevelAlgo::severityLevel().

55 {
56  int ecalFlag=0;
57 
58  // loop over EB rechits
59  for(EcalRecHitCollection::const_iterator rechit = ebRecHits->begin();
60  rechit != ebRecHits->end();
61  ++rechit){
62 
63  EBDetId eid(rechit->id());
64  //rechit->recoFlag();
65  //rechit->chi2();
66  //rechit->outOfTimeChi2();
67 
68  //int flag = EcalSeverityLevelAlgo::severityLevel( eid, *ebRecHits, *chStatus );
69  int flag = sevlv->severityLevel( eid, *ebRecHits);
70  if (flag>ecalFlag) ecalFlag = flag;
71  }
72 
73  // not clear what flags are in EE.... don't use them yet
74 
75  recoMet_.ecalFlag = ecalFlag;
76 
77 }
EcalSeverityLevel::SeverityLevel severityLevel(const DetId &id) const
Evaluate status from id use channelStatus from DB.
std::vector< EcalRecHit >::const_iterator const_iterator
const_iterator end() const
L1AnalysisRecoMetDataFormat recoMet_
const_iterator begin() const
void L1Analysis::L1AnalysisRecoMet::SetHtMht ( const edm::Handle< reco::CaloJetCollection caloJets,
float  jetptThreshold 
)

Definition at line 26 of file L1AnalysisRecoMet.cc.

References L1Analysis::L1AnalysisRecoMetDataFormat::Ht, L1Analysis::L1AnalysisRecoMetDataFormat::mHt, L1Analysis::L1AnalysisRecoMetDataFormat::mHtPhi, and recoMet_.

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

Definition at line 15 of file L1AnalysisRecoMet.cc.

References reco::LeafCandidate::et(), L1Analysis::L1AnalysisRecoMetDataFormat::met, L1Analysis::L1AnalysisRecoMetDataFormat::metPhi, reco::LeafCandidate::phi(), edm::Handle< T >::product(), recoMet_, reco::MET::sumEt(), and L1Analysis::L1AnalysisRecoMetDataFormat::sumEt.

16 {
17  const reco::CaloMETCollection *metCol = recoMet.product();
18  const reco::CaloMET theMet = metCol->front();
19 
20  recoMet_.met = theMet.et();
21  recoMet_.metPhi = theMet.phi();
22  recoMet_.sumEt = theMet.sumEt();
23 
24 }
double sumEt() const
Definition: MET.h:56
double et() const final
transverse energy
std::vector< reco::CaloMET > CaloMETCollection
collection of CaloMET objects
T const * product() const
Definition: Handle.h:74
L1AnalysisRecoMetDataFormat recoMet_
double phi() const final
momentum azimuthal angle

Member Data Documentation

L1AnalysisRecoMetDataFormat L1Analysis::L1AnalysisRecoMet::recoMet_
private

Definition at line 40 of file L1AnalysisRecoMet.h.

Referenced by getData(), Reset(), SetECALFlags(), SetHtMht(), and SetMet().