NueXsecWeightAna Class Reference

#include <NueXsecWeightAna.h>

Inheritance diagram for NueXsecWeightAna:
NueAnaBase

List of all members.

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

NueXsecWeightfNueXsecWeight
Registryrwtreg
MCReweightmcr

Detailed Description

Definition at line 10 of file NueXsecWeightAna.h.


Constructor & Destructor Documentation

NueXsecWeightAna::NueXsecWeightAna ( NueXsecWeight fw  ) 

Definition at line 13 of file NueXsecWeightAna.cxx.

00013                                                       :
00014   fNueXsecWeight(nuexs)
00015 {}

NueXsecWeightAna::~NueXsecWeightAna (  )  [virtual]

Definition at line 17 of file NueXsecWeightAna.cxx.

00018 {}


Member Function Documentation

void NueXsecWeightAna::Analyze ( int  evt,
RecRecordImp< RecCandHeader > *  st 
) [virtual]

Implements NueAnaBase.

Definition at line 20 of file NueXsecWeightAna.cxx.

References MCReweight::ComputeWeight(), NtpStRecord::evthdr, fNueXsecWeight, SntpHelpers::GetEvent2MCIndex(), MCEventInfo::iresonance, ReleaseType::IsCarrot(), Msg::kError, ReweightHelpers::MCEventInfoFilla(), mcr, MSG, NtpSREventSummary::nevent, NueAnaBase::release, 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 }

void NueXsecWeightAna::SetMCReweight ( MCReweight m  )  [inline]

Definition at line 16 of file NueXsecWeightAna.h.

References mcr.

Referenced by NueModule::Analyze().

00016 {mcr=m;}

void NueXsecWeightAna::SetRegistry ( Registry r  )  [inline]

Definition at line 17 of file NueXsecWeightAna.h.

References rwtreg.

Referenced by NueModule::Analyze().

00017 {rwtreg=r;}


Member Data Documentation

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().


The documentation for this class was generated from the following files:

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1