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 Member Functions | Private Attributes
METManager Class Reference

#include <METManager.h>

Public Member Functions

void addGenBenchmark (std::string GenBenchmarkName)
 setup a genericBenchmark More...
 
void coutTailEvents (const int entry, const double DeltaMETcut, const double DeltaPhicut, const double MET1cut) const
 cout events in tail of Delta(MET1,MET2) More...
 
void FillHisto (std::string)
 
reco::MET getMET1 ()
 
reco::MET getMET2 ()
 
 METManager (std::string outmetfilename)
 
void propagateJECtoMET1 (const std::vector< reco::CaloJet > caloJets, const std::vector< reco::CaloJet > corr_caloJets)
 propagate the Jet Energy Corrections to the MET More...
 
void propagateJECtoMET2 (const std::vector< reco::CaloJet > caloJets, const std::vector< reco::CaloJet > corr_caloJets)
 
void SetIgnoreParticlesIDs (const std::vector< unsigned int > *)
 
void setMET1 (const reco::MET *)
 
void setMET1 (const reco::GenParticleCollection *)
 set METX with the GenMet computed from the GenParticleCollection with computeGenMET(...) More...
 
void setMET1 (const reco::PFCandidateCollection &)
 set METX with the pfMet recomputed from the pfCandidates_ with recomputePFMET(...) More...
 
void setMET2 (const reco::MET *)
 
void setMET2 (const reco::GenParticleCollection *)
 
void setMET2 (const reco::PFCandidateCollection &)
 
void SetSpecificIdCut (const std::vector< unsigned int > *, const std::vector< double > *)
 
void write ()
 Write the output root file of the genericBenchmark. More...
 

Private Member Functions

reco::MET computeGenMET (const reco::GenParticleCollection *) const
 private functions More...
 
reco::MET propagateJEC (const reco::MET &, const std::vector< reco::CaloJet > caloJets, const std::vector< reco::CaloJet > corr_caloJets) const
 
reco::MET recomputePFMET (const reco::PFCandidateCollection &) const
 

Private Attributes

std::map< std::string,
GenericBenchmark
GenBenchmarkMap_
 map of GenericBenchmarks, the key is his name More...
 
reco::MET MET1_
 data members More...
 
reco::MET MET2_
 
TFile * outfile_
 
std::string outmetfilename_
 
std::vector< double > trueMetSpecificEtaCut_
 
std::vector< unsigned int > trueMetSpecificIdCut_
 
std::vector< unsigned int > vIgnoreParticlesIDs_
 

Detailed Description

Definition at line 15 of file METManager.h.

Constructor & Destructor Documentation

METManager::METManager ( std::string  outmetfilename)

Definition at line 12 of file METManager.cc.

References gather_cfg::cout, outfile_, and outmetfilename_.

13 {
14  outmetfilename_=Filename;
15  std::cout << "Info: DQM is not yet used in METManager."<<std::endl;
16  std::cout << "pfMET validation histograms will be saved to '" << outmetfilename_ << "'" << std::endl;
17  outfile_ = new TFile(outmetfilename_.c_str(), "RECREATE");
18  //void setup(DQMStore *, bool PlotAgainstReco, minDeltaEt,
19  // float maxDeltaEt, float minDeltaPhi, float maxDeltaPhi);
20  //GenBenchmark_.setup(NULL, true, -200., 200., -3.2, 3.2);
21 }
TFile * outfile_
Definition: METManager.h:74
std::string outmetfilename_
Definition: METManager.h:73
tuple cout
Definition: gather_cfg.py:121

Member Function Documentation

void METManager::addGenBenchmark ( std::string  GenBenchmarkName)

setup a genericBenchmark

Definition at line 145 of file METManager.cc.

References GenBenchmarkMap_, NULL, outfile_, outmetfilename_, getHLTPrescaleColumns::path, GenericBenchmark::setfile(), GenericBenchmark::setup(), and AlCaHLTBitMon_QueryRunRegistry::string.

146 {
147  GenericBenchmark GenBenchmark;
148  std::string path = outmetfilename_+":/PFTask";
149  if (GenBenchmarkMap_.size()==0)
150  {
151  //gDirectory->pwd();
152  outfile_->mkdir("PFTask");
153  //std::cout << "FL : path.c_str() = " << path.c_str() << std::endl;
154  //outfile_->pwd();
155  //outfile_->cd(path.c_str());
156  gDirectory->cd(path.c_str());
157  //gDirectory->pwd();
158  //outfile_->pwd();
159  gDirectory->mkdir("Benchmarks");
160  //outfile_->mkdir("Benchmarks");
161  //outfile_->pwd();
162  }
163  path = outmetfilename_+":/PFTask/Benchmarks";
164  gDirectory->cd(path.c_str());
165  gDirectory->mkdir(GenBenchmarkName.c_str());
166  path = outmetfilename_+":/PFTask/Benchmarks/"+GenBenchmarkName;
167  //std::cout << "FL : path.c_str() = " << path.c_str() << std::endl;
168  gDirectory->cd(path.c_str());
169  //gDirectory->pwd();
170  //const std::string path = outmetfilename_+":/PFTask/Benchmarks/"+GenBenchmarkName; //+ "/";
171  //std::cout << "path.c_str() = " << path.c_str() << std::endl;
172  //void setup(DQMStore *, bool PlotAgainstReco, minDeltaEt,
173  // float maxDeltaEt, float minDeltaPhi, float maxDeltaPhi);
174  GenBenchmark.setfile(outfile_);
175  GenBenchmark.setup(NULL, true, -200., 200., -3.2, 3.2, true);
176 
177  GenBenchmarkMap_[GenBenchmarkName]=GenBenchmark;
178  //GenBenchmarkV_.push_back(GenBenchmark);
179 }
TFile * outfile_
Definition: METManager.h:74
void setfile(TFile *file)
#define NULL
Definition: scimark2.h:8
std::string outmetfilename_
Definition: METManager.h:73
std::map< std::string, GenericBenchmark > GenBenchmarkMap_
map of GenericBenchmarks, the key is his name
Definition: METManager.h:72
void setup(DQMStore *DQM=NULL, bool PlotAgainstReco_=true, float minDeltaEt=-100., float maxDeltaEt=50., float minDeltaPhi=-0.5, float maxDeltaPhi=0.5, bool doMetPlots=false)
reco::MET METManager::computeGenMET ( const reco::GenParticleCollection genParticleList) const
private

private functions

Definition at line 98 of file METManager.cc.

References abs, funct::cos(), gather_cfg::cout, eta(), i, p4, benchmark_cfg::pdgId, phi, funct::sin(), mathSSE::sqrt(), trueMetSpecificEtaCut_, trueMetSpecificIdCut_, and vIgnoreParticlesIDs_.

Referenced by setMET1(), and setMET2().

99 {
100 
101  double trueMEY = 0.0;
102  double trueMEX = 0.0;;
103  double true_met = 0.0;;
104  double true_set = 0.0;;
105 
106  //std::cout << "(*genParticleList).size() = " << (*genParticleList).size() << std::endl;
107  for( unsigned i = 0; i < (*genParticleList).size(); i++ ) {
108 
109  //std::cout << "(*genParticleList)[i].eta() = " << (*genParticleList)[i].eta() << std::endl;
110 
111  if( (*genParticleList)[i].status() == 1 && fabs((*genParticleList)[i].eta()) < 5.0 ) {
112 
113  bool ignoreThisPart=false;
114  if (vIgnoreParticlesIDs_.size()==0) std::cout << "Warning : METManager: vIgnoreParticlesIDs_.size()==0" << std::endl;
115  for (unsigned int idc=0;idc<vIgnoreParticlesIDs_.size();++idc)
116  {
117  if(std::abs((*genParticleList)[i].pdgId()) == (int)vIgnoreParticlesIDs_[idc])
118  ignoreThisPart=true;
119  }
120  for (unsigned int specificIdc=0;specificIdc<trueMetSpecificIdCut_.size();++specificIdc)
121  {
122  if (std::abs((*genParticleList)[i].pdgId())== (int)trueMetSpecificIdCut_[specificIdc] &&
123  fabs((*genParticleList)[i].eta()) > trueMetSpecificEtaCut_[specificIdc])
124  ignoreThisPart=true;
125  }
126 
127  if (!ignoreThisPart) {
128  //trueMEX -= (*genParticleList)[i].px();
129  //trueMEY -= (*genParticleList)[i].py();
130  trueMEX -= (*genParticleList)[i].et()*cos((*genParticleList)[i].phi());
131  trueMEY -= (*genParticleList)[i].et()*sin((*genParticleList)[i].phi());
132  true_set += (*genParticleList)[i].pt();
133  }
134  }
135  }
136  true_met = sqrt( trueMEX*trueMEX + trueMEY*trueMEY );
137  //const double true_phi = atan2(trueMEY,trueMEX);
138  //std::cout << "true_met = " << true_met << std::endl;
139  //std::cout << "true_phi = " << true_phi << std::endl;
140  math::XYZTLorentzVector p4(trueMEX, trueMEY, 0., true_met);
141  math::XYZPoint vtx(0.,0.,0.);
142  return reco::MET(true_set,p4,vtx);
143 }
int i
Definition: DBlmapReader.cc:9
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
#define abs(x)
Definition: mlp_lapack.h:159
T eta() const
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:30
Definition: MET.h:32
T sqrt(T t)
Definition: SSEVec.h:48
double p4[4]
Definition: TauolaWrapper.h:92
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:13
std::vector< unsigned int > vIgnoreParticlesIDs_
Definition: METManager.h:75
std::vector< double > trueMetSpecificEtaCut_
Definition: METManager.h:77
std::vector< unsigned int > trueMetSpecificIdCut_
Definition: METManager.h:76
tuple cout
Definition: gather_cfg.py:121
Definition: DDAxes.h:10
void METManager::coutTailEvents ( const int  entry,
const double  DeltaMETcut,
const double  DeltaPhicut,
const double  MET1cut 
) const

cout events in tail of Delta(MET1,MET2)

Definition at line 240 of file METManager.cc.

References gather_cfg::cout, SiPixelRawToDigiRegional_cfi::deltaPhi, PFBenchmarkAlgo::deltaPhi(), MET1_, MET2_, reco::LeafCandidate::phi(), and reco::LeafCandidate::pt().

241 {
242  const double deltaMET=MET2_.pt()-MET1_.pt();
244  //std::cout << "Delta Phi = " << deltaPhi << std::endl;
245  //std::cout << "fabs(Delta Phi) = " << fabs(deltaPhi) << std::endl;
246 
247  if (MET1_.pt()>MET1cut && (fabs(deltaMET)>DeltaMETcut || fabs(deltaPhi)>DeltaPhicut))
248  {
249  std::cout << " =====================PFMETBenchmark =================" << std::endl;
250  std::cout << "process entry "<< entry << std::endl;
251  std::cout << "Delta MET = " << deltaMET << std::endl;
252  std::cout << "MET1 = " << MET1_.pt() << std::endl;
253  std::cout << "MET2 = " << MET2_.pt() << std::endl;
254 
255  std::cout << "Delta Phi = " << deltaPhi << std::endl;
256  std::cout << "Phi1 = " << MET1_.phi() << std::endl;
257  std::cout << "Phi2 = " << MET2_.phi() << std::endl;
258 
259  }
260 }
reco::MET MET2_
Definition: METManager.h:70
virtual float phi() const GCC11_FINAL
momentum azimuthal angle
std::pair< std::string, MonitorElement * > entry
Definition: ME_MAP.h:8
reco::MET MET1_
data members
Definition: METManager.h:69
tuple cout
Definition: gather_cfg.py:121
static double deltaPhi(const T *, const U *)
virtual float pt() const GCC11_FINAL
transverse momentum
void METManager::FillHisto ( std::string  Name)

Fill the genericBenchmark histograms string = name of the folder in the root file (=name of the GenBenchmark)

Definition at line 23 of file METManager.cc.

References gather_cfg::cout, GenBenchmarkMap_, i, MET1_, MET2_, outfile_, outmetfilename_, and AlCaHLTBitMon_QueryRunRegistry::string.

24 {
25  //std::cout << "Name = " << Name << std::endl;
26  const std::string fullname=outmetfilename_+":/PFTask/Benchmarks/"+Name;
27 
28  std::map<std::string, GenericBenchmark>::const_iterator i = GenBenchmarkMap_.find( Name );
29  if ( i == GenBenchmarkMap_.end() )
30  {
31  std::cout << "Error in METManager::FillHisto(string): " << Name << " is not in GenBenchmarkMap_" << std::endl;
32  }
33  else
34  {
35  GenBenchmarkMap_[Name].setfile(outfile_);
36  std::vector<reco::MET> vmet1;
37  std::vector<reco::MET> vmet2;
38  vmet1.push_back(MET1_);
39  vmet2.push_back(MET2_);
40  GenBenchmarkMap_[Name].fill(&vmet2,&vmet1,true,false,false,-1.,-1.,-1.,999.);
41  //std::cout << "MET1_.met = " << MET1_.pt() << std::endl;
42  //std::cout << "MET1_.phi = " << MET1_.phi() << std::endl;
43  //std::cout << "MET1_.sumEt = " << MET1_.sumEt() << std::endl;
44  }
45  return;
46 }
int i
Definition: DBlmapReader.cc:9
TFile * outfile_
Definition: METManager.h:74
reco::MET MET2_
Definition: METManager.h:70
std::string outmetfilename_
Definition: METManager.h:73
reco::MET MET1_
data members
Definition: METManager.h:69
std::map< std::string, GenericBenchmark > GenBenchmarkMap_
map of GenericBenchmarks, the key is his name
Definition: METManager.h:72
tuple cout
Definition: gather_cfg.py:121
reco::MET METManager::getMET1 ( )
inline

Definition at line 56 of file METManager.h.

References MET1_.

56 {return MET1_;}
reco::MET MET1_
data members
Definition: METManager.h:69
reco::MET METManager::getMET2 ( )
inline

Definition at line 57 of file METManager.h.

References MET2_.

57 {return MET2_;}
reco::MET MET2_
Definition: METManager.h:70
reco::MET METManager::propagateJEC ( const reco::MET MET,
const std::vector< reco::CaloJet caloJets,
const std::vector< reco::CaloJet corr_caloJets 
) const
private

Definition at line 274 of file METManager.cc.

References gather_cfg::cout, p4, reco::LeafCandidate::px(), reco::LeafCandidate::py(), mathSSE::sqrt(), and reco::MET::sumEt().

Referenced by propagateJECtoMET1(), and propagateJECtoMET2().

276 {
277 
278  //std::cout << "FL : MET = " << MET.pt() << std::endl;
279  double caloJetCorPX = 0.0;
280  double caloJetCorPY = 0.0;
281  double caloJetCorSET = 0.0;
282 
283  if (caloJets.size()>0 && corr_caloJets.size()==0) std::cout << "No corrected calo jets found !" << std::endl;
284  //std::cout << "caloJets.size() = " << caloJets.size() << std::endl;
285  //std::cout << "corr_caloJets.size() = " << corr_caloJets.size() << std::endl;
286 
287  for(unsigned int caloJetc=0;caloJetc<caloJets.size();++caloJetc)
288  {
289  //std::cout << "caloJets[" << caloJetc << "].pt() = " << caloJets[caloJetc].pt() << std::endl;
290  //std::cout << "caloJets[" << caloJetc << "].phi() = " << caloJets[caloJetc].phi() << std::endl;
291  //std::cout << "caloJets[" << caloJetc << "].eta() = " << caloJets[caloJetc].eta() << std::endl;
292  //}
293  for(unsigned int corr_caloJetc=0;corr_caloJetc<corr_caloJets.size();++corr_caloJetc)
294  {
295  //std::cout << "corr_caloJets[" << corr_caloJetc << "].pt() = " << corr_caloJets[corr_caloJetc].pt() << std::endl;
296  //std::cout << "corr_caloJets[" << corr_caloJetc << "].phi() = " << corr_caloJets[corr_caloJetc].phi() << std::endl;
297  //std::cout << "corr_caloJets[" << corr_caloJetc << "].eta() = " << corr_caloJets[corr_caloJetc].eta() << std::endl;
298  //}
299  Float_t DeltaPhi = corr_caloJets[corr_caloJetc].phi() - caloJets[caloJetc].phi();
300  Float_t DeltaEta = corr_caloJets[corr_caloJetc].eta() - caloJets[caloJetc].eta();
301  Float_t DeltaR2 = DeltaPhi*DeltaPhi + DeltaEta*DeltaEta;
302  if( DeltaR2 < 0.0001 && caloJets[caloJetc].pt() > 20.0 )
303  {
304  caloJetCorPX += (corr_caloJets[corr_caloJetc].px() - caloJets[caloJetc].px());
305  caloJetCorPY += (corr_caloJets[corr_caloJetc].py() - caloJets[caloJetc].py());
306  caloJetCorSET += (corr_caloJets[corr_caloJetc].pt() - caloJets[caloJetc].pt());
307  }
308  }
309  }
310  const double corr_calomet=sqrt((MET.px()-caloJetCorPX)*(MET.px()-caloJetCorPX)+(MET.py()-caloJetCorPY)*(MET.py()-caloJetCorPY));
311  const double corr_set=MET.sumEt()+caloJetCorSET;
312  //calo_phi = atan2((cm.py()-caloJetCorPY),(cm.px()-caloJetCorPX));
313  math::XYZTLorentzVector p4(MET.px()-caloJetCorPX, MET.py()-caloJetCorPY, 0., corr_calomet);
314  math::XYZPoint vtx(0.,0.,0.);
315 
316  //std::cout << "FL : corrMET = " << corr_calomet << std::endl;
317  return reco::MET(corr_set,p4,vtx);
318 }
virtual double py() const GCC11_FINAL
y coordinate of momentum vector
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:30
double sumEt() const
Definition: MET.h:48
Definition: MET.h:32
T sqrt(T t)
Definition: SSEVec.h:48
double p4[4]
Definition: TauolaWrapper.h:92
virtual double px() const GCC11_FINAL
x coordinate of momentum vector
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:13
tuple cout
Definition: gather_cfg.py:121
void METManager::propagateJECtoMET1 ( const std::vector< reco::CaloJet caloJets,
const std::vector< reco::CaloJet corr_caloJets 
)

propagate the Jet Energy Corrections to the MET

Definition at line 262 of file METManager.cc.

References MET1_, and propagateJEC().

264 {
265  MET1_=propagateJEC(MET1_,caloJets,corr_caloJets);
266 }
reco::MET MET1_
data members
Definition: METManager.h:69
reco::MET propagateJEC(const reco::MET &, const std::vector< reco::CaloJet > caloJets, const std::vector< reco::CaloJet > corr_caloJets) const
Definition: METManager.cc:274
void METManager::propagateJECtoMET2 ( const std::vector< reco::CaloJet caloJets,
const std::vector< reco::CaloJet corr_caloJets 
)

Definition at line 268 of file METManager.cc.

References MET2_, and propagateJEC().

270 {
271  MET2_=propagateJEC(MET2_,caloJets,corr_caloJets);
272 }
reco::MET MET2_
Definition: METManager.h:70
reco::MET propagateJEC(const reco::MET &, const std::vector< reco::CaloJet > caloJets, const std::vector< reco::CaloJet > corr_caloJets) const
Definition: METManager.cc:274
reco::MET METManager::recomputePFMET ( const reco::PFCandidateCollection pfCandidates) const
private

Definition at line 181 of file METManager.cc.

References SpecificPFMETData::ChargedEMFraction, SpecificPFMETData::ChargedHadFraction, funct::cos(), alignCSCRings::e, CaloMET_cfi::met, SpecificPFMETData::MuonFraction, SpecificPFMETData::NeutralEMFraction, SpecificPFMETData::NeutralHadFraction, p4, phi, funct::sin(), timingPdfMaker::specific, mathSSE::sqrt(), theta(), SpecificPFMETData::Type6Fraction, and SpecificPFMETData::Type7Fraction.

Referenced by setMET1(), and setMET2().

182 {
183 
185  typedef math::XYZPoint Point;
186 
187  double sum_et = 0.0;
188  double sum_ex = 0.0;
189  double sum_ey = 0.0;
190  double sum_ez = 0.0;
191 
192  double NeutralEMEt = 0.0;
193  double NeutralHadEt = 0.0;
194  double ChargedEMEt = 0.0;
195  double ChargedHadEt = 0.0;
196  double MuonEt = 0.0;
197  double type6Et = 0.0;
198  double type7Et = 0.0;
199 
200  for (unsigned int pfc=0;pfc<pfCandidates.size();++pfc) {
201  double phi = pfCandidates[pfc].phi();
202  double theta = pfCandidates[pfc].theta();
203  double e = pfCandidates[pfc].energy();
204  double et = e*sin(theta);
205  sum_ez += e*cos(theta);
206  sum_et += et;
207  sum_ex += et*cos(phi);
208  sum_ey += et*sin(phi);
209 
210  // compute met specific data:
211  if (pfCandidates[pfc].particleId() == 1) ChargedHadEt += et;
212  if (pfCandidates[pfc].particleId() == 2) ChargedEMEt += et;
213  if (pfCandidates[pfc].particleId() == 3) MuonEt += et;
214  if (pfCandidates[pfc].particleId() == 4) NeutralEMEt += et;
215  if (pfCandidates[pfc].particleId() == 5) NeutralHadEt += et;
216  if (pfCandidates[pfc].particleId() == 6) type6Et += et;
217  if (pfCandidates[pfc].particleId() == 7) type7Et += et;
218 
219  }
220 
221  const double Et_total=NeutralEMEt+NeutralHadEt+ChargedEMEt+ChargedHadEt+MuonEt+type6Et+type7Et;
222 
223  double met = sqrt( sum_ex*sum_ex + sum_ey*sum_ey );
224  const LorentzVector p4( -sum_ex, -sum_ey, 0.0, met);
225  const Point vtx(0.0,0.0,0.0);
226 
228  specific.NeutralEMFraction = NeutralEMEt/Et_total;
229  specific.NeutralHadFraction = NeutralHadEt/Et_total;
230  specific.ChargedEMFraction = ChargedEMEt/Et_total;
231  specific.ChargedHadFraction = ChargedHadEt/Et_total;
232  specific.MuonFraction = MuonEt/Et_total;
233  specific.Type6Fraction = type6Et/Et_total;
234  specific.Type7Fraction = type7Et/Et_total;
235 
236  reco::PFMET specificPFMET( specific, sum_et, p4, vtx );
237  return specificPFMET;
238 }
dictionary specific
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Geom::Theta< T > theta() const
std::pair< double, double > Point
Definition: CaloEllipse.h:18
std::vector< PFCandidatePtr > pfCandidates(const PFJet &jet, int particleId, bool sort=true)
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:30
T sqrt(T t)
Definition: SSEVec.h:48
double p4[4]
Definition: TauolaWrapper.h:92
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
MET made from Particle Flow Candidates.
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:13
math::PtEtaPhiELorentzVectorF LorentzVector
Definition: DDAxes.h:10
void METManager::SetIgnoreParticlesIDs ( const std::vector< unsigned int > *  vIgnoreParticlesIDs)

Definition at line 87 of file METManager.cc.

References vIgnoreParticlesIDs_.

88 {
89  vIgnoreParticlesIDs_=(*vIgnoreParticlesIDs);
90 }
std::vector< unsigned int > vIgnoreParticlesIDs_
Definition: METManager.h:75
void METManager::setMET1 ( const reco::MET met)

Definition at line 57 of file METManager.cc.

References CaloMET_cfi::met, and MET1_.

58 {
59  MET1_=*met;
60 }
reco::MET MET1_
data members
Definition: METManager.h:69
void METManager::setMET1 ( const reco::GenParticleCollection genParticleList)

set METX with the GenMet computed from the GenParticleCollection with computeGenMET(...)

Definition at line 67 of file METManager.cc.

References computeGenMET(), and MET1_.

68 {
69  MET1_=computeGenMET(genParticleList);
70 }
reco::MET computeGenMET(const reco::GenParticleCollection *) const
private functions
Definition: METManager.cc:98
reco::MET MET1_
data members
Definition: METManager.h:69
void METManager::setMET1 ( const reco::PFCandidateCollection pfCandidates)

set METX with the pfMet recomputed from the pfCandidates_ with recomputePFMET(...)

Definition at line 77 of file METManager.cc.

References MET1_, and recomputePFMET().

78 {
80 }
reco::MET recomputePFMET(const reco::PFCandidateCollection &) const
Definition: METManager.cc:181
std::vector< PFCandidatePtr > pfCandidates(const PFJet &jet, int particleId, bool sort=true)
reco::MET MET1_
data members
Definition: METManager.h:69
void METManager::setMET2 ( const reco::MET met)

Definition at line 62 of file METManager.cc.

References CaloMET_cfi::met, and MET2_.

63 {
64  MET2_=*met;
65 }
reco::MET MET2_
Definition: METManager.h:70
void METManager::setMET2 ( const reco::GenParticleCollection genParticleList)

Definition at line 72 of file METManager.cc.

References computeGenMET(), and MET2_.

73 {
74  MET2_=computeGenMET(genParticleList);
75 }
reco::MET MET2_
Definition: METManager.h:70
reco::MET computeGenMET(const reco::GenParticleCollection *) const
private functions
Definition: METManager.cc:98
void METManager::setMET2 ( const reco::PFCandidateCollection pfCandidates)

Definition at line 82 of file METManager.cc.

References MET2_, and recomputePFMET().

83 {
85 }
reco::MET MET2_
Definition: METManager.h:70
reco::MET recomputePFMET(const reco::PFCandidateCollection &) const
Definition: METManager.cc:181
std::vector< PFCandidatePtr > pfCandidates(const PFJet &jet, int particleId, bool sort=true)
void METManager::SetSpecificIdCut ( const std::vector< unsigned int > *  Id,
const std::vector< double > *  Eta 
)

Definition at line 92 of file METManager.cc.

References trueMetSpecificEtaCut_, and trueMetSpecificIdCut_.

93 {
96 }
std::vector< double > trueMetSpecificEtaCut_
Definition: METManager.h:77
std::vector< unsigned int > trueMetSpecificIdCut_
Definition: METManager.h:76
void METManager::write ( void  )

Write the output root file of the genericBenchmark.

Definition at line 48 of file METManager.cc.

References GenBenchmarkMap_, i, and outmetfilename_.

49 {
50  if (GenBenchmarkMap_.size()>0)
51  {
52  std::map<std::string, GenericBenchmark>::iterator i = GenBenchmarkMap_.begin();
53  ((*i).second).write(outmetfilename_);
54  }
55 }
int i
Definition: DBlmapReader.cc:9
void write()
Write the output root file of the genericBenchmark.
Definition: METManager.cc:48
std::string outmetfilename_
Definition: METManager.h:73
std::map< std::string, GenericBenchmark > GenBenchmarkMap_
map of GenericBenchmarks, the key is his name
Definition: METManager.h:72

Member Data Documentation

std::map<std::string,GenericBenchmark> METManager::GenBenchmarkMap_
private

map of GenericBenchmarks, the key is his name

Definition at line 72 of file METManager.h.

Referenced by addGenBenchmark(), FillHisto(), and write().

reco::MET METManager::MET1_
private

data members

Definition at line 69 of file METManager.h.

Referenced by coutTailEvents(), FillHisto(), getMET1(), propagateJECtoMET1(), and setMET1().

reco::MET METManager::MET2_
private

Definition at line 70 of file METManager.h.

Referenced by coutTailEvents(), FillHisto(), getMET2(), propagateJECtoMET2(), and setMET2().

TFile* METManager::outfile_
private

Definition at line 74 of file METManager.h.

Referenced by addGenBenchmark(), FillHisto(), and METManager().

std::string METManager::outmetfilename_
private

Definition at line 73 of file METManager.h.

Referenced by addGenBenchmark(), FillHisto(), METManager(), and write().

std::vector<double> METManager::trueMetSpecificEtaCut_
private

Definition at line 77 of file METManager.h.

Referenced by computeGenMET(), and SetSpecificIdCut().

std::vector<unsigned int> METManager::trueMetSpecificIdCut_
private

Definition at line 76 of file METManager.h.

Referenced by computeGenMET(), and SetSpecificIdCut().

std::vector<unsigned int> METManager::vIgnoreParticlesIDs_
private

Definition at line 75 of file METManager.h.

Referenced by computeGenMET(), and SetIgnoreParticlesIDs().