ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/kiesel/TreeWriter/treeWriter.cc
(Generate patch)

Comparing UserCode/kiesel/TreeWriter/treeWriter.cc (file contents):
Revision 1.26 by kiesel, Thu Apr 25 17:37:32 2013 UTC vs.
Revision 1.31 by kiesel, Mon May 6 13:09:32 2013 UTC

# Line 259 | Line 259 | void TreeWriter::Loop() {
259          tree->Branch("type1metPhi", &type1met_phi, "type1metPhi/F");
260          tree->Branch("ht", &ht, "ht/F");
261          tree->Branch("nVertex", &nVertex, "nVertex/I");
262 <        tree->Branch("pu_weight", &pu_weight, "pu_weight/F");
262 >        tree->Branch("weight", &weight, "weight/D");
263          tree->Branch("genElectron", &genElectron);
264          tree->Branch("genPhoton", &genPhoton);
265  
# Line 279 | Line 279 | void TreeWriter::Loop() {
279  
280                  // weights
281                  if (pileupHisto == 0) {
282 <                        pu_weight = 1.;
282 >                        weight = 1.;
283                  } else {
284                          float trueNumInteractions = -1;
285                          for( susy::PUSummaryInfoCollection::const_iterator iBX = event->pu.begin();
# Line 287 | Line 287 | void TreeWriter::Loop() {
287                                  if (iBX->BX == 0)
288                                          trueNumInteractions = iBX->trueNumInteractions;
289                          }
290 <                        pu_weight = pileupHisto->GetBinContent( pileupHisto->FindBin( trueNumInteractions ) );
290 >                        weight = pileupHisto->GetBinContent( pileupHisto->FindBin( trueNumInteractions ) );
291                  }
292  
293                  // get ak5 jets
# Line 298 | Line 298 | void TreeWriter::Loop() {
298  
299                  for(std::vector<susy::Photon>::iterator it = photonVector.begin();
300                                  it != photonVector.end(); ++it ) {
301 <                        if( !(it->isEE() || it->isEB()) && it->isEBEtaGap() && it->isEBPhiGap() && it->isEERingGap() && it->isEEDeeGap() && it->isEBEEGap() && skim )
301 >                        if( !(it->isEE() || it->isEB()) && it->momentum.Pt()<20 && it->isEBEtaGap() && it->isEBPhiGap() && it->isEERingGap() && it->isEEDeeGap() && it->isEBEEGap() && skim )
302                                  continue;
303                          tree::Photon thisphoton;
304                        thisphoton.pt = getPtFromMatchedJet( *it, jetVector, loggingVerbosity );
304  
305                          thisphoton.chargedIso = chargedHadronIso_corrected(*it, event->rho25);
306                          thisphoton.neutralIso = neutralHadronIso_corrected(*it, event->rho25);
307                          thisphoton.photonIso = photonIso_corrected(*it, event->rho25);
308  
309 <                        bool loose_photon_barrel = thisphoton.pt>20
311 <                                && it->isEB()
312 <                                && it->passelectronveto
309 >                        bool loose_photon_barrel = it->isEB()
310                                  && it->hadTowOverEm<0.05
311                                  && it->sigmaIetaIeta<0.012
312                                  && thisphoton.chargedIso<2.6
313                                  && thisphoton.neutralIso<3.5+0.04*thisphoton.pt
314                                  && thisphoton.photonIso<1.3+0.005*thisphoton.pt;
315 <                        bool loose_photon_endcap = thisphoton.pt > 20
316 <                                && it->isEE()
320 <                                && it->passelectronveto
315 >
316 >                        bool loose_photon_endcap = it->isEE()
317                                  && it->hadTowOverEm<0.05
318                                  && it->sigmaIetaIeta<0.034
319                                  && thisphoton.chargedIso<2.3
320                                  && thisphoton.neutralIso<2.9+0.04*thisphoton.pt;
321  
322 <                        if(!(loose_photon_endcap || loose_photon_barrel || thisphoton.pt > 75 ) && skim )
322 >                        thisphoton.ptJet = getPtFromMatchedJet( *it, jetVector, loggingVerbosity );
323 >                        if(!(loose_photon_endcap || loose_photon_barrel || thisphoton.ptJet > 75 ) && skim )
324                                  continue;
325 +                        thisphoton.pt = it->momentum.Pt();
326                          thisphoton.eta = it->momentum.Eta();
327                          thisphoton.phi = it->momentum.Phi();
328                          thisphoton.r9 = it->r9;
# Line 332 | Line 330 | void TreeWriter::Loop() {
330                          thisphoton.hadTowOverEm = it->hadTowOverEm;
331                          thisphoton.pixelseed = it->nPixelSeeds;
332                          thisphoton.conversionSafeVeto = it->passelectronveto;
333 +                        thisphoton.genInformation = 0;
334                          photon.push_back( thisphoton );
335                          if( loggingVerbosity > 2 )
336                                  std::cout << " p_T, gamma = " << thisphoton.pt << std::endl;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines