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.25 by mtouch, Wed Jun 6 15:33:21 2012 UTC vs.
Revision 1.26 by mingyang, Thu Jun 7 14:24:07 2012 UTC

# Line 20 | Line 20
20   using namespace mithep;
21  
22   ClassImp(mithep::PhotonTreeWriter)
23 < templateClassImp(mithep::PhotonTreeWriterPhoton)
23 >  templateClassImp(mithep::PhotonTreeWriterPhoton)//ming: what's this?
24   ClassImp(mithep::PhotonTreeWriterDiphotonEvent)
25  
26   //--------------------------------------------------------------------------------------------------
# Line 148 | Line 148 | void PhotonTreeWriter::Process()
148    if( fPileUpDen->GetEntries() > 0 )
149      rho  = (Double_t) fPileUpDen->At(0)->RhoRandomLowEta();
150    
151 <  const BaseVertex *bsp = dynamic_cast<const BaseVertex*>(fBeamspot->At(0));
151 >  const BaseVertex *bsp = dynamic_cast<const BaseVertex*>(fBeamspot->At(0));//ming:what's this?
152      
153    if( !fIsData ) {
154      LoadBranch(fMCParticleName);
# Line 976 | Line 976 | void PhotonTreeWriter::SlaveBegin()
976    TList  *plist  = pclass->GetListOfDataMembers();
977      
978    for (int i=0; i<elist->GetEntries(); ++i) {
979 <    const TDataMember *tdm = static_cast<const TDataMember*>(elist->At(i));
979 >    const TDataMember *tdm = static_cast<const TDataMember*>(elist->At(i));//ming
980      if (!(tdm->IsBasic() && tdm->IsPersistent())) continue;
981      TString typestring;
982      if (TString(tdm->GetTypeName()).BeginsWith("Char_t")) typestring = "B";
# Line 992 | Line 992 | void PhotonTreeWriter::SlaveBegin()
992      else if (TString(tdm->GetTypeName()).BeginsWith("Bool_t")) typestring = "O";
993      else continue;
994      //printf("%s %s: %i\n",tdm->GetTypeName(),tdm->GetName(),int(tdm->GetOffset()));
995 <    Char_t *addr = (Char_t*)fDiphotonEvent;
995 >    Char_t *addr = (Char_t*)fDiphotonEvent;//ming:?
996      assert(sizeof(Char_t)==1);
997      if (fWriteDiphotonTree) hCiCTuple->Branch(tdm->GetName(),addr + tdm->GetOffset(),TString::Format("%s/%s",tdm->GetName(),typestring.Data()));
998      if (fWriteSingleTree) hCiCTupleSingle->Branch(tdm->GetName(),addr + tdm->GetOffset(),TString::Format("%s/%s",tdm->GetName(),typestring.Data()));
# Line 1225 | Line 1225 | void PhotonTreeWriterPhoton<NClus>::SetV
1225        pfcic4_combIso2   = debugVals[12];
1226      }
1227      // -----------------------------------------------------
1228 <      
1228 >    //id mva
1229 >    //2011
1230 >    idmva_tIso1abs=combiso1;
1231 >    idmva_tIso2abs=combiso2;
1232 >    idmva_tIso3abs=trackiso1;
1233 >    idmva_absIsoEcal=ecalisodr03;
1234 >    idmva_absIsoHcal=hcalisodr04;
1235 >    //2012  
1236 >    idmva_CoviEtaiPhi=p->SCluster()->Seed()->CoviEtaiPhi();
1237 >    idmva_s4ratio=p->SCluster()->Seed()->E2x2()/p->SCluster()->Seed()->E5x5();
1238 >    idmva_GammaIso=IsolationTools::PFGammaIsolation(p,0.3,0,fPFCands);
1239 >    idmva_ChargedIso_selvtx=IsolationTools::PFChargedIsolation(p,vtx,0.3,0.,fPFCands);
1240 >    idmva_ChargedIso_worstvtx=IsolationTools::PFChargedIsolation(p,vtx,0.3,0.,fPFCands,&wVtxInd,vtxCol);
1241 >    idmva_PsEffWidthSigmaRR=sqrt(p->SCluster()->PsEffWidthSigmaXX()*p->SCluster()->PsEffWidthSigmaXX()+p->SCluster()->PsEffWidthSigmaYY()*p->SCluster()->PsEffWidthSigmaYY());
1242    }
1243    else {
1244      hasphoton = kFALSE;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines