137 |
|
readers[i]->AddVariable( "RelPreshowerEnergy", &RelPreshowerEnergy ); |
138 |
|
} |
139 |
|
} |
140 |
+ |
|
141 |
+ |
if(VariableType==6){ |
142 |
+ |
readers[i]->AddVariable( "HoE", &HoE ); |
143 |
+ |
readers[i]->AddVariable( "covIEtaIEta", &covIEtaIEta ); |
144 |
+ |
readers[i]->AddVariable( "tIso1abs", &tIso1abs ); |
145 |
+ |
readers[i]->AddVariable( "tIso3abs", &tIso3abs ); |
146 |
+ |
readers[i]->AddVariable( "tIso2abs", &tIso2abs ); |
147 |
+ |
readers[i]->AddVariable( "R9", &R9 ); |
148 |
+ |
readers[i]->AddVariable( "absIsoEcal", &absIsoEcal ); |
149 |
+ |
readers[i]->AddVariable( "absIsoHcal", &absIsoHcal ); |
150 |
+ |
readers[i]->AddVariable( "RelE5x5", &RelE5x5 ); |
151 |
+ |
readers[i]->AddVariable( "EtaWidth", &EtaWidth ); |
152 |
+ |
readers[i]->AddVariable( "PhiWidth", &PhiWidth ); |
153 |
+ |
readers[i]->AddVariable( "CoviEtaiPhi", &CoviEtaiPhi ); |
154 |
+ |
readers[i]->AddVariable( "CoviPhiiPhi", &CoviPhiiPhi ); |
155 |
+ |
readers[i]->AddVariable( "NVertexes", &NVertexes ); |
156 |
+ |
if(i==0){ |
157 |
+ |
readers[i]->AddVariable( "RelPreshowerEnergy", &RelPreshowerEnergy ); |
158 |
+ |
} |
159 |
+ |
} |
160 |
+ |
|
161 |
|
} |
162 |
|
|
163 |
|
fReaderEndcap->BookMVA("BDT method",EndcapWeights); |
168 |
|
|
169 |
|
} |
170 |
|
|
171 |
< |
Bool_t MVATools::PassMVASelection(const Photon* p,const Vertex* vtx,const TrackCol* trackCol,const VertexCol* vtxCol,Double_t _tRho,const ElectronCol* els,Float_t bdtCutBarrel, Float_t bdtCutEndcap) { |
171 |
> |
Bool_t MVATools::PassMVASelection(const Photon* p,const Vertex* vtx,const TrackCol* trackCol,const VertexCol* vtxCol,Double_t _tRho,Float_t bdtCutBarrel, Float_t bdtCutEndcap) { |
172 |
|
|
173 |
|
//initilize the bool value |
174 |
|
PassMVA=kFALSE; |
175 |
|
|
176 |
< |
Float_t photon_bdt = MVATools::GetMVAbdtValue(p,vtx,trackCol,vtxCol, _tRho,els); |
176 |
> |
Float_t photon_bdt = MVATools::GetMVAbdtValue(p,vtx,trackCol,vtxCol, _tRho); |
177 |
|
|
178 |
|
if (isbarrel) { |
179 |
|
if(bdt>bdtCutBarrel){ |
229 |
|
|
230 |
|
//-------------------------------------------------------------------------------------------------- |
231 |
|
|
232 |
< |
Float_t MVATools::GetMVAbdtValue(const Photon* p,const Vertex* vtx,const TrackCol* trackCol,const VertexCol* vtxCol,Double_t _tRho,const ElectronCol* els) { |
232 |
> |
Float_t MVATools::GetMVAbdtValue(const Photon* p,const Vertex* vtx,const TrackCol* trackCol,const VertexCol* vtxCol,Double_t _tRho) { |
233 |
|
|
234 |
|
//get the variables used to compute MVA variables |
235 |
|
ecalIso3 = p->EcalRecHitIsoDr03(); |
251 |
|
|
252 |
|
RawEnergy = p->SCluster()->RawEnergy(); |
253 |
|
|
233 |
– |
dRTrack = PhotonTools::ElectronVetoCiC(p, els); |
234 |
– |
|
254 |
|
//mva varialbes v1 and v2 |
255 |
|
tIso1 = (combIso1) *50./p->Et(); |
256 |
|
tIso3 = (trackIso3)*50./p->Et(); |
305 |
|
|
306 |
|
bdt = reader->EvaluateMVA("BDT method"); |
307 |
|
|
308 |
< |
printf("HoE: %f\n",HoE); |
308 |
> |
/* printf("HoE: %f\n",HoE); |
309 |
|
printf("covIEtaIEta: %f\n",covIEtaIEta); |
310 |
|
printf("tIso1abs: %f\n",tIso1abs); |
311 |
|
printf("tIso3abs: %f\n",tIso3abs); |
332 |
|
|
333 |
|
if (!isbarrel) { |
334 |
|
printf("RelPreshowerEnergy: %f\n",RelPreshowerEnergy); |
335 |
< |
} |
335 |
> |
}*/ |
336 |
|
|
337 |
|
return bdt; |
338 |
|
} |