ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/HbbAnalysis/src/JetFlavour.cc
(Generate patch)

Comparing UserCode/HbbAnalysis/src/JetFlavour.cc (file contents):
Revision 1.6 by amagnan, Tue Feb 9 14:52:25 2010 UTC vs.
Revision 1.9 by amagnan, Thu Mar 17 12:47:39 2011 UTC

# Line 64 | Line 64 | namespace HbbAnalysis {
64  
65      if (debug_) std::cout << "* nMC = " << lNMC << std::endl;
66  
67 <    //loop on MC part to find b and bbar initial particles.
67 >    //loop on MC part to find any initial partons.
68      for (unsigned int imc(0); imc < lNMC; imc++){//loop on MC particles
69        const reco::GenParticle & lPart = (*aGenParticles).at(imc);
70        //break loop if W events
# Line 76 | Line 76 | namespace HbbAnalysis {
76               abs(lPart.pdgId()) == 16 ) ) {
77          isW = true;
78          nWEvts_++;
79 <        if (!isZ) break;
79 >        //if (!isZ) break;
80        }
81        //record when Z event
82        if ( lPart.status() == 3 && lPart.numberOfMothers() > 1 &&
# Line 97 | Line 97 | namespace HbbAnalysis {
97                )
98              )
99            ) {
100 <        if (debug_ > 0) {
100 >        if (debug_ > 1) {
101            std::cout << "** initial parton #" << imc ;
102            printParticle(lPart);
103          }
# Line 106 | Line 106 | namespace HbbAnalysis {
106          else n_antiquarks++;
107          p_partonFlavour->Fill(lPart.pdgId());
108        }
109 <      else if ((debug_ > 0 && imc < 15) || debug_ > 1) {
109 >      else if ((debug_ > 1 && imc < 15) || debug_ > 2) {
110          std::cout << "** not selected: #" << imc;
111          printParticle(lPart);
112        }
# Line 114 | Line 114 | namespace HbbAnalysis {
114      }//loop on MC particles
115  
116      //if (isW == isZ) std::cout << "*** WARNING *** isW = " << isW << ", isZ = " << isZ << std::endl;
117 <    if ((flavour_ > 3 && flavour_ != 21) && !isZ) return 0;
117 >    //if ((flavour_ > 3 && flavour_ != 21) && !isZ) return 0;
118  
119      if (debug_) {
120        std::cout << "nQuarks = " << n_quarks << ", n_antiQuarks = " << n_antiquarks << std::endl;
# Line 136 | Line 136 | namespace HbbAnalysis {
136      nTotal_ += nPartons;
137      assert (nPartons == n_quarks+n_antiquarks);
138  
139 <    if (flavour_ > 3) {
140 <      assert(n_quarks >= 1 && n_antiquarks >= 1);
141 <      assert (nPartons == 2);
142 <    }
139 > //    if (flavour_ > 3) {
140 > //       assert(n_quarks >= 1 && n_antiquarks >= 1);
141 > //       assert (nPartons == 2);
142 > //     }
143  
144      p_nQuarks->Fill(n_quarks);
145      p_nAntiQuarks->Fill(n_antiquarks);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines