#include <NueXsecWeightAna.h>
Inheritance diagram for NueXsecWeightAna:

Public Member Functions | |
| NueXsecWeightAna (NueXsecWeight &fw) | |
| virtual | ~NueXsecWeightAna () |
| void | SetMCReweight (MCReweight *m) |
| void | SetRegistry (Registry *r) |
| void | Analyze (int evt, RecRecordImp< RecCandHeader > *st) |
Private Attributes | |
| NueXsecWeight & | fNueXsecWeight |
| Registry * | rwtreg |
| MCReweight * | mcr |
|
|
Definition at line 13 of file NueXsecWeightAna.cxx. 00013 : 00014 fNueXsecWeight(nuexs) 00015 {}
|
|
|
Definition at line 17 of file NueXsecWeightAna.cxx. 00018 {}
|
|
||||||||||||
|
Implements NueAnaBase. Definition at line 20 of file NueXsecWeightAna.cxx. References MCReweight::ComputeWeight(), NtpStRecord::evthdr, fNueXsecWeight, SntpHelpers::GetEvent2MCIndex(), MCEventInfo::iresonance, ReleaseType::IsCarrot(), ReweightHelpers::MCEventInfoFilla(), mcr, MSG, NtpSREventSummary::nevent, rwtreg, and NueXsecWeight::xsecweight. Referenced by NueRecordAna::FillTrue(). 00021 {
00022 NtpStRecord *st=dynamic_cast<NtpStRecord *>(srobj);
00023 if(st==0){
00024 MSG("NueXsecWeightAna",Msg::kError)<<"Trying to do mc reweighting on an event"
00025 <<" that comes from a non NtpStRecord"<<endl
00026 <<"That's not a good idea"
00027 <<"I haven't even tried to implement it"<<endl;
00028 return;
00029 }
00030 if(st->evthdr.nevent == 0 ) return;
00031
00032 double gw = 1.0;
00033
00034 if(ReleaseType::IsCarrot(release)){
00035 MCEventInfo ei;
00036
00037 int thn = SntpHelpers::GetEvent2MCIndex(evtn,st);
00038 if(thn<0) {
00039 fNueXsecWeight.xsecweight=1.0;
00040 return;
00041 }
00042
00043 ReweightHelpers::MCEventInfoFilla(&ei,st,thn);
00044 NuParent *np=0;
00045 if(ei.iresonance!=1005){
00046 gw = mcr->ComputeWeight(&ei,np,rwtreg);
00047 }
00048 }
00049
00050 fNueXsecWeight.xsecweight=gw;
00051 }
|
|
|
Definition at line 16 of file NueXsecWeightAna.h. References mcr. Referenced by NueModule::Analyze(). 00016 {mcr=m;}
|
|
|
Definition at line 17 of file NueXsecWeightAna.h. References rwtreg. Referenced by NueModule::Analyze(). 00017 {rwtreg=r;}
|
|
|
Definition at line 21 of file NueXsecWeightAna.h. Referenced by Analyze(). |
|
|
Definition at line 23 of file NueXsecWeightAna.h. Referenced by Analyze(), and SetMCReweight(). |
|
|
Definition at line 22 of file NueXsecWeightAna.h. Referenced by Analyze(), and SetRegistry(). |
1.3.9.1