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