ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/OSUT3Analysis/AnaTools/plugins/OSUAnalysis.cc
(Generate patch)

Comparing UserCode/OSUT3Analysis/AnaTools/plugins/OSUAnalysis.cc (file contents):
Revision 1.112 by wulsin, Thu Jul 25 12:28:54 2013 UTC vs.
Revision 1.113 by lantonel, Wed Jul 31 09:24:14 2013 UTC

# Line 615 | Line 615 | OSUAnalysis::OSUAnalysis (const edm::Par
615          else if(currentObject == "secondary electrons")       currentObject = "secondaryElectrons";
616          else if(currentObject == "electron-trigobj pairs")    currentObject = "electronTrigobjPairs";
617          else if(currentObject == "muon-trigobj pairs")        currentObject = "muonTrigobjPairs";
618 +        else if(currentObject == "electron-mcparticle pairs")   currentObject = "electronMCparticlePairs";
619 +
620  
621          currentObject.at(0) = toupper(currentObject.at(0));
622          string histoName = "num" + currentObject;
# Line 935 | Line 937 | OSUAnalysis::produce (edm::Event &event,
937          else if(currentObject == "tau-track pairs")         setObjectFlags(currentCut,currentCutIndex,individualFlags,cumulativeFlags,taus .product(),tracks.product(),"tau-track pairs");
938          else if(currentObject == "electron-trigobj pairs")  setObjectFlags(currentCut,currentCutIndex,individualFlags,cumulativeFlags,electrons.product(),trigobjs.product(),"electron-trigobj pairs");
939          else if(currentObject == "muon-trigobj pairs")      setObjectFlags(currentCut,currentCutIndex,individualFlags,cumulativeFlags,muons.product(),trigobjs.product(),"muon-trigobj pairs");
940 +        else if(currentObject == "electron-mcparticle pairs") setObjectFlags(currentCut,currentCutIndex,individualFlags,cumulativeFlags,electrons.product(),mcparticles.product(),"electron-mcparticle pairs");
941  
942          if(currentObject == "stops" && datasetType_ == "signalMC") setObjectFlags(currentCut,currentCutIndex,individualFlags,cumulativeFlags,stops.product(),"stops");
943        }
# Line 1288 | Line 1291 | OSUAnalysis::produce (edm::Event &event,
1291            else if(currentObject == "secondary electrons")                objectToPlot = "secondaryElectrons";
1292            else if(currentObject == "electron-trigobj pairs")             objectToPlot = "electronTrigobjPairs";
1293            else if(currentObject == "muon-trigobj pairs")                 objectToPlot = "muonTrigobjPairs";
1294 +          else if(currentObject == "electron-mcparticle pairs")          objectToPlot = "electronMCparticlePairs";
1295            else objectToPlot = currentObject;
1296  
1297            string tempCurrentObject = objectToPlot;
# Line 2454 | Line 2458 | OSUAnalysis::valueLookup (const BNevent*
2458    else if(variable == "pthat") value = object->pthat;
2459    else if(variable == "qScale") value = object->qScale;
2460    else if(variable == "alphaQCD") value = object->alphaQCD;
2457  else if(variable == "Ht") value = getHt(jets.product());
2461    else if(variable == "alphaQED") value = object->alphaQED;
2462    else if(variable == "scalePDF") value = object->scalePDF;
2463    else if(variable == "x1") value = object->x1;
# Line 2525 | Line 2528 | OSUAnalysis::valueLookup (const BNevent*
2528    else if(variable == "electronScaleFactor") value = electronScaleFactor_;
2529    else if(variable == "stopCTauScaleFactor") value = stopCTauScaleFactor_;
2530    else if(variable == "bTagScaleFactor") value = bTagScaleFactor_;
2531 +
2532 +  else if(variable == "unfilteredHt") value = getHt(jets.product());
2533    else if(variable == "ht") value = chosenHT ();
2534 +
2535    else if(variable == "leadMuPairInvMass"){
2536      pair<const BNmuon *, const BNmuon *> muPair = leadMuonPair ();
2537      TLorentzVector p0 (muPair.first->px, muPair.first->py, muPair.first->pz, muPair.first->energy),
# Line 3625 | Line 3631 | OSUAnalysis::valueLookup (const BNelectr
3631    return value;
3632   } // end electron-muon pair valueLookup
3633  
3634 <
3634 >
3635   //!electron-jet pair valueLookup
3636   double
3637   OSUAnalysis::valueLookup (const BNelectron* object1, const BNjet* object2, string variable, string function, string &stringValue){
# Line 3665 | Line 3671 | OSUAnalysis::valueLookup (const BNelectr
3671    return value;
3672   }
3673  
3674 + //!electron-mcparticle pair valueLookup
3675 + double
3676 + OSUAnalysis::valueLookup (const BNelectron* object1, const BNmcparticle* object2, string variable, string function, string &stringValue){
3677 +
3678 +  double value = 0.0;
3679 +
3680 +  if(variable == "deltaPhi") value = fabs(deltaPhi(object1->phi,object2->phi));
3681 +  else if(variable == "deltaEta") value = fabs(object1->eta - object2->eta);
3682 +  else if(variable == "deltaR") value = deltaR(object1->eta,object1->phi,object2->eta,object2->phi);
3683 +  else if(variable == "threeDAngle")
3684 +    {
3685 +      TVector3 threeVector1(object1->px, object1->py, object1->pz);
3686 +      TVector3 threeVector2(object2->px, object2->py, object2->pz);
3687 +      value = (threeVector1.Angle(threeVector2));
3688 +    }
3689 +  else if(variable == "chargeProduct"){
3690 +    value = object1->charge*object2->charge;
3691 +  }
3692 +
3693 +  else{clog << "WARNING: invalid variable '" << variable << "'\n"; value = -999;}
3694 +  value = applyFunction(function, value);
3695 +
3696 +  return value;
3697 + }
3698 +
3699 +
3700   //!photon-jet pair valueLookup
3701   double
3702   OSUAnalysis::valueLookup (const BNphoton* object1, const BNjet* object2, string variable, string function, string &stringValue){

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines