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

Comparing UserCode/MitPhysics/Utils/src/MVATools.cc (file contents):
Revision 1.13 by mingyang, Tue May 29 21:20:12 2012 UTC vs.
Revision 1.15 by mingyang, Mon Jun 11 09:04:33 2012 UTC

# Line 191 | Line 191 | void MVATools::InitializeMVA(int Variabl
191      }    
192  
193      if(VariableType==1201){
194 <      readers[i]->AddVariable( "myphoton_pfchargedisogood03", &myphoton_pfchargedisogood03);
194 >      /*readers[i]->AddVariable( "myphoton_pfchargedisogood03", &myphoton_pfchargedisogood03);
195        readers[i]->AddVariable( "myphoton_pfchargedisobad03", &myphoton_pfchargedisobad03);
196        readers[i]->AddVariable( "myphoton_pfphotoniso03", &myphoton_pfphotoniso03 );
197        readers[i]->AddVariable( "myphoton_sieie", &myphoton_sieie );
# Line 204 | Line 204 | void MVATools::InitializeMVA(int Variabl
204        readers[i]->AddVariable( "event_rho", &event_rho );
205        if(i==0){
206          readers[i]->AddVariable( "myphoton_ESEffSigmaRR", &myphoton_ESEffSigmaRR);
207 <      }
207 >        }*/
208 >      readers[i]->AddVariable( "ph.r9", &myphoton_r9 );
209 >      readers[i]->AddVariable( "ph.sigietaieta", &myphoton_sieie );
210 >      readers[i]->AddVariable( "ph.scetawidth", &myphoton_etawidth );
211 >      readers[i]->AddVariable( "ph.scphiwidth", &myphoton_phiwidth );
212 >      readers[i]->AddVariable( "ph.idmva_CoviEtaiPhi", &myphoton_sieip );
213 >      readers[i]->AddVariable( "ph.idmva_s4ratio", &myphoton_s4ratio );
214 >      readers[i]->AddVariable( "ph.idmva_GammaIso", &myphoton_pfphotoniso03 );
215 >      readers[i]->AddVariable( "ph.idmva_ChargedIso_selvtx", &myphoton_pfchargedisogood03);
216 >      readers[i]->AddVariable( "ph.idmva_ChargedIso_worstvtx", &myphoton_pfchargedisobad03);
217 >      readers[i]->AddVariable( "ph.sceta", &myphoton_SCeta );
218 >      readers[i]->AddVariable( "rho", &event_rho );
219 >      if(i==0){
220 >        readers[i]->AddVariable( "1.00023*ph.idmva_PsEffWidthSigmaRR + 0.0913", &myphoton_ESEffSigmaRR);
221 >      }
222      }
223      
224    }
# Line 279 | Line 293 | Int_t MVATools::PassElectronVetoInt(cons
293  
294   //--------------------------------------------------------------------------------------------------
295  
296 < Float_t MVATools::GetMVAbdtValue_2012_globe(const Photon* p,const Vertex* vtx,const TrackCol* trackCol,const VertexCol* vtxCol,Double_t _tRho, const PFCandidateCol *fPFCands,Bool_t applyNewScale,const ElectronCol* els,Bool_t applyElectronVeto) {
296 > Float_t MVATools::GetMVAbdtValue_2012_globe(const Photon* p,const Vertex* vtx,const TrackCol* trackCol,const VertexCol* vtxCol,Double_t _tRho, const PFCandidateCol *fPFCands,const ElectronCol* els,Bool_t applyElectronVeto) {
297    
298    //get the variables used to compute MVA variables
299    ecalIso3 = p->EcalRecHitIsoDr03();
# Line 354 | Line 368 | Float_t MVATools::GetMVAbdtValue_2012_gl
368    myphoton_etawidth=EtaWidth;
369    myphoton_phiwidth=PhiWidth;
370    myphoton_r9=R9;
371 <  myphoton_s4ratio=p->SCluster()->Seed()->E2x2()/p->SCluster()->Seed()->E5x5();
371 >  myphoton_s4ratio=p->S4Ratio();
372    myphoton_SCeta=ScEta_MVA;
373    event_rho= _tRho;
374  
375    myphoton_ESEffSigmaRR=-99;
376  
377    if(!isbarrel){
378 <    myphoton_ESEffSigmaRR=float(sqrt((p->SCluster()->PsEffWidthSigmaXX())*(p->SCluster()->PsEffWidthSigmaXX())+(p->SCluster()->PsEffWidthSigmaYY())*(p->SCluster()->PsEffWidthSigmaYY())));
365 <  }
366 <
367 <  if(applyNewScale){
368 <    if(isbarrel){
369 <      myphoton_s4ratio=1.0055*myphoton_s4ratio;
370 <    }
371 <    if(!isbarrel){
372 <      myphoton_s4ratio=1.0085*myphoton_s4ratio;
373 <      myphoton_ESEffSigmaRR=1.04*myphoton_ESEffSigmaRR;
374 <    }
378 >    myphoton_ESEffSigmaRR=p->EffSigmaRR();
379    }
380    
381    if (isbarrel) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines