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.11 by mingyang, Sun May 27 16:39:19 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 222 | Line 236 | Bool_t MVATools::PassMVASelection(const
236    //initilize the bool value
237    PassMVA=kFALSE;
238    
239 <  Float_t photon_bdt =  MVATools::GetMVAbdtValueOld(p,vtx,trackCol,vtxCol, _tRho, els, applyElectronVeto);
239 >  Float_t photon_bdt =  MVATools::GetMVAbdtValue_2011(p,vtx,trackCol,vtxCol, _tRho, els, applyElectronVeto);
240    
241    if (isbarrel) {
242      if(bdt>bdtCutBarrel){
# Line 279 | Line 293 | Int_t MVATools::PassElectronVetoInt(cons
293  
294   //--------------------------------------------------------------------------------------------------
295  
296 < Float_t MVATools::GetMVAbdtValue(const Photon* p,const Vertex* vtx,const TrackCol* trackCol,const VertexCol* vtxCol,Double_t _tRho, const PFCandidateCol *fPFCands,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(const P
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())));
378 >    myphoton_ESEffSigmaRR=p->EffSigmaRR();
379    }
380 <        
380 >  
381    if (isbarrel) {
382      reader = fReaderBarrel;
383    }
# Line 407 | Line 421 | Float_t MVATools::GetMVAbdtValue(const P
421    return bdt;
422   }
423  
424 < Float_t MVATools::GetMVAbdtValueOld(const Photon* p,const Vertex* vtx,const TrackCol* trackCol,const VertexCol* vtxCol,Double_t _tRho,const ElectronCol* els,Bool_t applyElectronVeto) {
424 > Float_t MVATools::GetMVAbdtValue_2011(const Photon* p,const Vertex* vtx,const TrackCol* trackCol,const VertexCol* vtxCol,Double_t _tRho,const ElectronCol* els,Bool_t applyElectronVeto) {
425    
426    //get the variables used to compute MVA variables
427    ecalIso3 = p->EcalRecHitIsoDr03();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines