NuMIPP Class Reference

#include <NuMIPP.h>

List of all members.

Public Member Functions

 NuMIPP ()
virtual ~NuMIPP ()
 NuMIPP (const NuXMLConfig &xmlConfig)
virtual void ApplyMippWeights (NuEvent &event) const

Private Member Functions

 ClassDef (NuMIPP, 0)

Private Attributes

Bool_t fApplyMippWeights

Detailed Description

Definition at line 9 of file NuMIPP.h.


Constructor & Destructor Documentation

NuMIPP::NuMIPP (  ) 

Definition at line 15 of file NuMIPP.cxx.

00016   : fApplyMippWeights(false)
00017 {
00018 }

NuMIPP::~NuMIPP (  )  [virtual]

Definition at line 42 of file NuMIPP.cxx.

00043 {
00044 }

NuMIPP::NuMIPP ( const NuXMLConfig xmlConfig  )  [explicit]

Definition at line 21 of file NuMIPP.cxx.

References fApplyMippWeights, NuXMLConfig::UseBeamWeight(), and NuXMLConfig::UseMIPPWeight().

00022 {
00023   //If xmlConfig variable apply mipp weights is false, set fApplyMippWeights = false;
00024   //Otherwise, check that the xml config is set to 'no SKZP'
00025   //If SKZP is on, print out a message telling the user they're an idiot, then die in protest
00026   //If SKZP is off, set fApplyMippWeights = true;  
00027   
00028   if(xmlConfig.UseBeamWeight()==true&&xmlConfig.UseMIPPWeight()==true){
00029     cout<<"Choose SKZP or MIPP weights, you cannot have both"<<endl;
00030     assert(0);
00031   }
00032   else if(xmlConfig.UseMIPPWeight()==true){
00033     fApplyMippWeights=true;
00034   }
00035   else{
00036     fApplyMippWeights=false;
00037   }
00038   
00039 }


Member Function Documentation

void NuMIPP::ApplyMippWeights ( NuEvent event  )  const [virtual]

Definition at line 47 of file NuMIPP.cxx.

References fApplyMippWeights, NuMIPPWeightCalculator::getWeight(), NuEvent::tpx, NuEvent::tpy, and NuEvent::tpz.

Referenced by DataMCPlots::PrepareEventForPlotting().

00048 {
00049   if (!fApplyMippWeights){return;}
00050   //Apply the weights here;
00051   int pdg=event.tptype;
00052   NuMIPPWeightCalculator *weights= new NuMIPPWeightCalculator(pdg,"/minos/app/radovic/dstProcessing_dev/minos_yields.root");
00053   double myMippWeight=weights->getWeight(sqrt((event.tpx*event.tpx)+(event.tpy*event.tpy)),event.tpz);
00054   if(myMippWeight!=myMippWeight){
00055     myMippWeight=1;
00056   }
00057   if(myMippWeight<0){
00058     myMippWeight=1;
00059   }
00060   event.rw = myMippWeight;
00061   weights->NuMIPPWeightCalculator::~NuMIPPWeightCalculator();
00062 
00063   return;
00064 }

NuMIPP::ClassDef ( NuMIPP  ,
 
) [private]

Member Data Documentation

Bool_t NuMIPP::fApplyMippWeights [private]

Definition at line 19 of file NuMIPP.h.

Referenced by ApplyMippWeights(), and NuMIPP().


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

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1