MCNNFiller Class Reference

#include <MCNNFiller.h>

List of all members.

Public Member Functions

 MCNNFiller ()
 ~MCNNFiller ()
void SetBestMatchesToFill (Int_t bmtf)
void FillMCNN (NueAnaReader *nueana, NNReader *nread)
void FillBestMatches (NueRecord *record, NNReader *nread)
void SetMCNNpidFile (const char *pdffile_in)
void Setycut (Float_t ycut_in)
void SetMaxRunNC (Int_t maxrunnc_in)

Private Attributes

MCNNpidnnpid
LEMNNpidlemnn
LEMNNbarpidlemnnbar
LEMbarpidlembar
LEM4pidlem4
Int_t bestmatches_tofill
Float_t ycut
Int_t maxrunnc

Detailed Description

Definition at line 12 of file MCNNFiller.h.


Constructor & Destructor Documentation

MCNNFiller::MCNNFiller (  ) 

Definition at line 18 of file MCNNFiller.cxx.

References bestmatches_tofill, lem4, lembar, lemnnbar, maxrunnc, and ycut.

00018                       {
00019 
00020   cout << "Started MCNNFiller..." << endl;
00021   bestmatches_tofill=50;//<-- default value
00022   //nnpid = new MCNNpid();
00023   //lemnn = new LEMNNpid();
00024   lemnnbar = new LEMNNbarpid();
00025   lembar = new LEMbarpid();
00026   lem4 = new LEM4pid();
00027   ycut=1.0;
00028   maxrunnc=21099999;
00029 
00030 }

MCNNFiller::~MCNNFiller (  ) 

Definition at line 32 of file MCNNFiller.cxx.

00032                        {
00033 
00034   
00035 }


Member Function Documentation

void MCNNFiller::FillBestMatches ( NueRecord record,
NNReader nread 
)

Definition at line 87 of file MCNNFiller.cxx.

References bestmatches_tofill, MCNNVars::bmatch, NNReader::GetBestMatch(), MCNNBestMatch::interactionType, maxrunnc, NueRecord::mcnnv, and MCNNBestMatch::run.

Referenced by FillMCNN().

00087                                                                   {
00088 
00089   //Int_t numbmatches=TMath::Min(nread->GetNumBestMatches(),bestmatches_tofill);
00090   Int_t elcont=0;
00091   Int_t ii=0;
00092 
00093   //for(int ii=0;ii<numbmatches;++ii){
00094   while(elcont<bestmatches_tofill && ii<nread->GetNumBestMatches()){
00095 
00096     TClonesArray& bmatcharray = *(record->mcnnv.bmatch);
00097     MCNNBestMatch *pepito = nread->GetBestMatch(ii);
00098     if(pepito->interactionType==1 || (pepito->interactionType==0 && pepito->run<=maxrunnc)){
00099       new (bmatcharray[elcont]) MCNNBestMatch(pepito);
00100       ++elcont;
00101     }
00102     ++ii;
00103   }//<--loop over best matches
00104 
00105 
00106 }

void MCNNFiller::FillMCNN ( NueAnaReader nueana,
NNReader nread 
)

Definition at line 46 of file MCNNFiller.cxx.

References MCNNVars::bestmatches, bestmatches_tofill, FillBestMatches(), MCNNVars::fracCC, MCNNVars::fracCCy, NueAnaReader::GetfracCCy(), NNReader::GetInputCCE(), LEM4pid::GetLEM4pid(), LEMNNbarpid::GetLEMNNbarpid(), NueAnaReader::GetMeanFracQMatched(), NueAnaReader::GetNCMeanFracQMatched(), NueAnaReader::GetNCymean(), NNReader::GetNumBestMatches(), NueAnaReader::Getymean(), lem4, lemnnbar, MCNNVars::mcnn_var1, MCNNVars::mcnn_var2, NueRecord::mcnnv, MCNNVars::mcpresel, NNReader::mcpresel, MCNNVars::meanfracQmatched, MinosCompactEvent::meanPlane, MCNNVars::meanPlane, MCNNVars::meanU, MinosCompactEvent::meanU, MCNNVars::meanV, MinosCompactEvent::meanV, MCNNVars::ncmeanfracQmatched, MCNNVars::ncymean, NueAnaReader::nuerecord, NNReader::qtot, MCNNVars::qtot, ycut, and MCNNVars::ymean.

Referenced by MCNNMergeModule::Reco().

00046                                                               {
00047   
00048   if(nueana!=NULL){
00049     if(nread!=NULL){
00050 
00051       nueana->nuerecord->mcnnv.bestmatches=TMath::Min(nread->GetNumBestMatches(),bestmatches_tofill);
00052       nueana->nuerecord->mcnnv.meanU=nread->GetInputCCE()->meanU;
00053       nueana->nuerecord->mcnnv.meanV=nread->GetInputCCE()->meanV;
00054       nueana->nuerecord->mcnnv.meanPlane=nread->GetInputCCE()->meanPlane;      
00055       nueana->nuerecord->mcnnv.mcpresel=nread->mcpresel;
00056       nueana->nuerecord->mcnnv.qtot=(int)nread->qtot;      
00057 
00058       FillBestMatches(nueana->nuerecord,nread); 
00059 
00060       //Fill this stuff after filling best matches
00061       
00062       //3rd Generation LEM
00063       //nueana->nuerecord->mcnnv.mcnn_var1=lemnn->GetLEMpid(nueana->nuerecord);
00064      
00065       //4th Generation LEMBAR
00066       //nueana->nuerecord->mcnnv.mcnn_var1=lembar->GetLEMbarpid(nueana->nuerecord); 
00067       nueana->nuerecord->mcnnv.mcnn_var1=lem4->GetLEM4pid(nueana->nuerecord);
00068       nueana->nuerecord->mcnnv.mcnn_var2=lemnnbar->GetLEMNNbarpid(nueana->nuerecord);
00069       nueana->nuerecord->mcnnv.fracCC=nueana->GetfracCCy(ycut);
00070       nueana->nuerecord->mcnnv.fracCCy=nueana->GetfracCCy(0.5);
00071       nueana->nuerecord->mcnnv.ymean=nueana->Getymean(ycut);
00072       nueana->nuerecord->mcnnv.meanfracQmatched=nueana->GetMeanFracQMatched(ycut);
00073 
00074       nueana->nuerecord->mcnnv.ncymean=nueana->GetNCymean(ycut);
00075       nueana->nuerecord->mcnnv.ncmeanfracQmatched=nueana->GetNCMeanFracQMatched(ycut);
00076 
00077     } else {
00078       cout << "Warning! Passed a NULL NNReader object to FillMCNN in MCNNFiller" << endl;
00079     }
00080   } else {
00081     cout << "Warning ! Passed a NULL NueRecord to FillMCNN in MCNNFiller" << endl;
00082   }
00083 
00084 }

void MCNNFiller::SetBestMatchesToFill ( Int_t  bmtf  ) 

Definition at line 39 of file MCNNFiller.cxx.

References bestmatches_tofill.

Referenced by MCNNMergeModule::BeginJob().

00039                                                {
00040 
00041   bestmatches_tofill=bmtf;
00042 
00043 }

void MCNNFiller::SetMaxRunNC ( Int_t  maxrunnc_in  ) 

Definition at line 126 of file MCNNFiller.cxx.

References maxrunnc.

00126                                              {
00127 
00128   maxrunnc=maxrunnc_in;
00129 
00130 }

void MCNNFiller::SetMCNNpidFile ( const char *  pdffile_in  ) 

Definition at line 110 of file MCNNFiller.cxx.

References nnpid.

Referenced by MCNNMergeModule::BeginJob().

00110                                                      {
00111 
00112 delete nnpid;
00113  nnpid = new MCNNpid(pdffile_in);
00114 
00115 }

void MCNNFiller::Setycut ( Float_t  ycut_in  ) 

Definition at line 118 of file MCNNFiller.cxx.

References nnpid, MCNNpid::Setycut(), and ycut.

Referenced by MCNNMergeModule::BeginJob().

00118                                        {
00119 
00120   ycut=ycut_in;
00121   nnpid->Setycut(ycut_in);
00122 
00123 }


Member Data Documentation

Definition at line 30 of file MCNNFiller.h.

Referenced by FillBestMatches(), FillMCNN(), MCNNFiller(), and SetBestMatchesToFill().

Definition at line 29 of file MCNNFiller.h.

Referenced by FillMCNN(), and MCNNFiller().

Definition at line 28 of file MCNNFiller.h.

Referenced by MCNNFiller().

Definition at line 26 of file MCNNFiller.h.

Definition at line 27 of file MCNNFiller.h.

Referenced by FillMCNN(), and MCNNFiller().

Int_t MCNNFiller::maxrunnc [private]

Definition at line 32 of file MCNNFiller.h.

Referenced by FillBestMatches(), MCNNFiller(), and SetMaxRunNC().

Definition at line 25 of file MCNNFiller.h.

Referenced by SetMCNNpidFile(), and Setycut().

Float_t MCNNFiller::ycut [private]

Definition at line 31 of file MCNNFiller.h.

Referenced by FillMCNN(), MCNNFiller(), and Setycut().


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

Generated on 22 Nov 2017 for loon by  doxygen 1.6.1