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

Constructor & Destructor Documentation

◆ L1AnalysisRecoMet()

L1Analysis::L1AnalysisRecoMet::L1AnalysisRecoMet ( )

Definition at line 6 of file L1AnalysisRecoMet.cc.

6 {}

◆ ~L1AnalysisRecoMet()

L1Analysis::L1AnalysisRecoMet::~L1AnalysisRecoMet ( )

Definition at line 8 of file L1AnalysisRecoMet.cc.

8 {}

Member Function Documentation

◆ getData()

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

Definition at line 34 of file L1AnalysisRecoMet.h.

34 { return &recoMet_; }

References recoMet_.

◆ Reset()

void L1Analysis::L1AnalysisRecoMet::Reset ( )
inline

Definition at line 35 of file L1AnalysisRecoMet.h.

35 { recoMet_.Reset(); }

References recoMet_, and L1Analysis::L1AnalysisRecoMetDataFormat::Reset().

◆ SetECALFlags()

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.

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 }

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

◆ SetHtMht()

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 }

References isolatedTracks_cfi::caloJets, and l1JetRecoTree_cfi::jetptThreshold.

◆ SetMet()

void L1Analysis::L1AnalysisRecoMet::SetMet ( const edm::Handle< reco::CaloMETCollection recoMet)

Definition at line 10 of file L1AnalysisRecoMet.cc.

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 }

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

Member Data Documentation

◆ recoMet_

L1AnalysisRecoMetDataFormat L1Analysis::L1AnalysisRecoMet::recoMet_
private

Definition at line 38 of file L1AnalysisRecoMet.h.

Referenced by getData(), and Reset().

edm::SortedCollection< EcalRecHit >::const_iterator
std::vector< EcalRecHit >::const_iterator const_iterator
Definition: SortedCollection.h:80
edm::Handle::product
T const * product() const
Definition: Handle.h:70
EcalSeverityLevelAlgo::severityLevel
EcalSeverityLevel::SeverityLevel severityLevel(const DetId &id) const
Evaluate status from id use channelStatus from DB.
Definition: EcalSeverityLevelAlgo.cc:85
l1JetRecoTree_cfi.jetptThreshold
jetptThreshold
Definition: l1JetRecoTree_cfi.py:10
L1Analysis::L1AnalysisRecoMetDataFormat::mHtPhi
float mHtPhi
Definition: L1AnalysisRecoMetDataFormat.h:59
L1Analysis::L1AnalysisRecoMetDataFormat::metPhi
float metPhi
Definition: L1AnalysisRecoMetDataFormat.h:45
L1Analysis::L1AnalysisRecoMetDataFormat::Reset
void Reset()
Definition: L1AnalysisRecoMetDataFormat.h:18
EBDetId
Definition: EBDetId.h:17
reco::MET::sumEt
double sumEt() const
Definition: MET.h:56
L1Analysis::L1AnalysisRecoMetDataFormat::sumEt
float sumEt
Definition: L1AnalysisRecoMetDataFormat.h:60
L1Analysis::L1AnalysisRecoMetDataFormat::Ht
float Ht
Definition: L1AnalysisRecoMetDataFormat.h:57
reco::CaloMET
Definition: CaloMET.h:21
edm::SortedCollection::begin
const_iterator begin() const
Definition: SortedCollection.h:262
isolatedTracks_cfi.caloJets
caloJets
Definition: isolatedTracks_cfi.py:33
L1Analysis::L1AnalysisRecoMetDataFormat::mHt
float mHt
Definition: L1AnalysisRecoMetDataFormat.h:58
edm::SortedCollection::end
const_iterator end() const
Definition: SortedCollection.h:267
L1Analysis::L1AnalysisRecoMetDataFormat::met
float met
Definition: L1AnalysisRecoMetDataFormat.h:42
runTauDisplay.eid
eid
Definition: runTauDisplay.py:298
reco::LeafCandidate::et
double et() const final
transverse energy
Definition: LeafCandidate.h:127
reco::LeafCandidate::phi
double phi() const final
momentum azimuthal angle
Definition: LeafCandidate.h:148
reco::CaloMETCollection
std::vector< reco::CaloMET > CaloMETCollection
collection of CaloMET objects
Definition: CaloMETCollection.h:20
L1Analysis::L1AnalysisRecoMetDataFormat::ecalFlag
unsigned short ecalFlag
Definition: L1AnalysisRecoMetDataFormat.h:61
L1Analysis::L1AnalysisRecoMet::recoMet_
L1AnalysisRecoMetDataFormat recoMet_
Definition: L1AnalysisRecoMet.h:38
RemoveAddSevLevel.flag
flag
Definition: RemoveAddSevLevel.py:116