Go to the documentation of this file.00001 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00002 #include "AnalysisDataFormats/TopObjects/interface/TtFullLeptonicEvent.h"
00003 #include "AnalysisDataFormats/TopObjects/interface/TtFullLepEvtPartons.h"
00004
00005
00006 void
00007 TtFullLeptonicEvent::print(const int verbosity) const
00008 {
00009 if(verbosity%10 <= 0)
00010 return;
00011
00012 edm::LogInfo log("TtFullLeptonicEvent");
00013
00014 log << "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ \n";
00015
00016
00017 log << " TtGenEvent says: ";
00018 if( !this->genEvent()->isTtBar() ) log << "Not TtBar";
00019 else if( this->genEvent()->isFullHadronic() ) log << "Fully Hadronic TtBar";
00020 else if( this->genEvent()->isSemiLeptonic() ) log << "Semi-leptonic TtBar";
00021 else if( this->genEvent()->isFullLeptonic() ) {
00022 log << "Fully Leptonic TtBar, ";
00023 switch( this->genEvent()->fullLeptonicChannel().first ) {
00024 case WDecay::kElec : log << "Electron-"; break;
00025 case WDecay::kMuon : log << "Muon-" ; break;
00026 case WDecay::kTau : log << "Tau-" ; break;
00027 default : log << "Unknown-" ; break;
00028 }
00029 switch( this->genEvent()->fullLeptonicChannel().second ) {
00030 case WDecay::kElec : log << "Electron-"; break;
00031 case WDecay::kMuon : log << "Muon-" ; break;
00032 case WDecay::kTau : log << "Tau-" ; break;
00033 default : log << "Unknown-" ; break;
00034 }
00035 log << "Channel";
00036 }
00037 log << "\n";
00038
00039
00040 log << " Number of available event hypothesis classes: " << this->numberOfAvailableHypoClasses() << " \n";
00041
00042
00043 log << " - JetLepComb: ";
00044 log << " b ";
00045 log << " bbar ";
00046 log << " e1(+) ";
00047 log << " e2(-) ";
00048 log << " mu1(+)";
00049 log << " mu2(-)";
00050 log << "\n";
00051
00052
00053 typedef std::map<HypoClassKey, std::vector<HypoCombPair> >::const_iterator EventHypo;
00054 for(EventHypo hyp = evtHyp_.begin(); hyp != evtHyp_.end(); ++hyp) {
00055 HypoClassKey hypKey = (*hyp).first;
00056
00057 log << "------------------------------------------------------------ \n";
00058 switch(hypKey) {
00059 case kGeom : log << " Geom" ; break;
00060 case kWMassMaxSumPt : log << " WMassMaxSumPt"; break;
00061 case kMaxSumPtWMass : log << " MaxSumPtWMass"; break;
00062 case kGenMatch : log << " GenMatch" ; break;
00063 case kMVADisc : log << " MVADisc" ; break;
00064 case kKinFit : log << " KinFit" ; break;
00065 case kKinSolution : log << " KinSolution" ; break;
00066 default : log << " Unknown";
00067 }
00068 log << "-Hypothesis: \n";
00069 unsigned nOfHyp = this->numberOfAvailableHypos(hypKey);
00070 if(nOfHyp > 1) {
00071 log << " * Number of available jet combinations: " << nOfHyp << "\n";
00072 if(verbosity < 10)
00073 log << " The following was found to be the best one:\n";
00074 }
00075
00076 if(verbosity < 10)
00077 nOfHyp = 1;
00078 for(unsigned cmb=0; cmb<nOfHyp; cmb++) {
00079
00080 if( !this->isHypoValid(hypKey, cmb) )
00081 log << " * Not valid! \n";
00082
00083 else {
00084
00085 log << " * JetLepComb:";
00086 std::vector<int> jets = this->jetLeptonCombination(hypKey, cmb);
00087 for(unsigned int iJet = 0; iJet < jets.size(); iJet++) {
00088 log << " " << jets[iJet] << " ";
00089 }
00090 log << "\n";
00091
00092 switch(hypKey) {
00093 case kGenMatch : log << " * Sum(DeltaR) : " << this->genMatchSumDR(cmb) << " \n"
00094 << " * Sum(DeltaPt): " << this->genMatchSumPt(cmb) << " \n"; break;
00095 case kKinSolution : log << " * Weight : " << this->solWeight(cmb) << " \n"
00096 << " * isWrongCharge: " << this->isWrongCharge() << " \n"; break;
00097 default : break;
00098 }
00099
00100 if(verbosity%10 >= 2) {
00101 log << " * Candidates (pt; eta; phi; mass):\n";
00102 printParticle(log, "top ", this->top (hypKey, cmb));
00103 printParticle(log, "W plus ", this->wPlus(hypKey, cmb));
00104 if(verbosity%10 >= 3) {
00105 printParticle(log, "b ", this->b (hypKey, cmb));
00106 printParticle(log, "leptonBar ", this->leptonBar(hypKey, cmb));
00107 printParticle(log, "neutrino ", this->neutrino (hypKey, cmb));
00108 }
00109 printParticle(log, "topBar ", this->topBar(hypKey, cmb));
00110 printParticle(log, "W minus ", this->wMinus(hypKey, cmb));
00111 if(verbosity%10 >= 3) {
00112 printParticle(log, "bBar ", this->bBar (hypKey, cmb));
00113 printParticle(log, "lepton ", this->lepton (hypKey, cmb));
00114 printParticle(log, "neutrinoBar ", this->neutrinoBar(hypKey, cmb));
00115 }
00116 }
00117 }
00118 }
00119 }
00120
00121 log << "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++";
00122 }