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

Comparing UserCode/MitPhysics/Mods/src/PhotonTreeWriter.cc (file contents):
Revision 1.5 by bendavid, Sun Dec 11 00:03:04 2011 UTC vs.
Revision 1.6 by bendavid, Tue Dec 13 21:13:23 2011 UTC

# Line 64 | Line 64 | PhotonTreeWriter::PhotonTreeWriter(const
64    fPFJets            (0),
65  
66    fLoopOnGoodElectrons(kFALSE),
67 <  fInvertElectronVeto(kFALSE),  
67 >  fApplyElectronVeto(kTRUE),  
68  
69    fWriteDiphotonTree(kTRUE),
70    fWriteSingleTree(kTRUE),
# Line 209 | Line 209 | void PhotonTreeWriter::Process()
209    fDiphotonEvent->dphidijetgg = -99.;
210    
211    Int_t nhitsbeforevtxmax = 1;
212 <  if (fInvertElectronVeto) nhitsbeforevtxmax = 999;  
212 >  if (!fApplyElectronVeto) nhitsbeforevtxmax = 999;  
213    
214    if (egcol->GetEntries()>=2) {
215      
# Line 252 | Line 252 | void PhotonTreeWriter::Process()
252      const MCParticle *phgen1 = 0;
253      const MCParticle *phgen2 = 0;
254      if( !fIsData ) {
255 <      phgen1 = PhotonTools::MatchMC(p1,fMCParticles,fInvertElectronVeto);
256 <      phgen2 = PhotonTools::MatchMC(p2,fMCParticles,fInvertElectronVeto);
255 >      phgen1 = PhotonTools::MatchMC(p1,fMCParticles,!fApplyElectronVeto);
256 >      phgen2 = PhotonTools::MatchMC(p2,fMCParticles,!fApplyElectronVeto);
257      }
258      
259   /*    if (phgen1 && phgen2) {
# Line 455 | Line 455 | void PhotonTreeWriter::Process()
455  
456      const MCParticle *phgen = 0;
457      if( !fIsData ) {
458 <      phgen = PhotonTools::MatchMC(p,fMCParticles,fInvertElectronVeto);
458 >      phgen = PhotonTools::MatchMC(p,fMCParticles,!fApplyElectronVeto);
459      }
460  
461      if (fExcludeSinglePrompt && phgen) return;
# Line 510 | Line 510 | void PhotonTreeWriter::SlaveBegin()
510    }
511    
512  
513 +  if (fIsData) {
514 +    fPhFixDataFile = gSystem->Getenv("CMSSW_BASE") + TString("/src/MitPhysics/data/PhotonFixGRPV22.dat");
515 +  }
516 +  else {
517 +    fPhFixDataFile = gSystem->Getenv("CMSSW_BASE") + TString("/src/MitPhysics/data/PhotonFixSTART42V13.dat");
518 +  }
519    
520    //initialize photon energy corrections
521    //PhotonFix::initialise("4_2",std::string((gSystem->Getenv("CMSSW_BASE") + TString("/src/MitPhysics/data/PhotonFix.dat")).Data()));  
# Line 604 | Line 610 | void PhotonTreeWriter::FindHiggsPtAndZ(F
610    // loop over all GEN particles and look for status 1 photons
611    for(UInt_t i=0; i<fMCParticles->GetEntries(); ++i) {
612      const MCParticle* p = fMCParticles->At(i);
613 <    if( p->Is(MCParticle::kH) || (fInvertElectronVeto && (p->AbsPdgId()==23||p->AbsPdgId()==24) ) ) {
613 >    if( p->Is(MCParticle::kH) || (!fApplyElectronVeto && (p->AbsPdgId()==23||p->AbsPdgId()==24) ) ) {
614        pt=p->Pt();
615        decayZ = p->DecayVertex().Z();
616        mass = p->Mass();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines