Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

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
Int_t bestmatches_tofill
Float_t ycut
Int_t maxrunnc


Constructor & Destructor Documentation

MCNNFiller::MCNNFiller  ) 
 

Definition at line 18 of file MCNNFiller.cxx.

References bestmatches_tofill, maxrunnc, nnpid, and ycut.

00018                       {
00019 
00020   cout << "Started MCNNFiller..." << endl;
00021   bestmatches_tofill=50;//<-- default value
00022   nnpid = new MCNNpid();
00023   ycut=1.0;
00024   maxrunnc=21099999;
00025 
00026 }

MCNNFiller::~MCNNFiller  ) 
 

Definition at line 28 of file MCNNFiller.cxx.

00028                        {
00029 
00030   
00031 }


Member Function Documentation

void MCNNFiller::FillBestMatches NueRecord record,
NNReader nread
 

Definition at line 74 of file MCNNFiller.cxx.

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

Referenced by FillMCNN().

00074                                                                   {
00075 
00076   //Int_t numbmatches=TMath::Min(nread->GetNumBestMatches(),bestmatches_tofill);
00077   Int_t elcont=0;
00078   Int_t ii=0;
00079 
00080   //for(int ii=0;ii<numbmatches;++ii){
00081   while(elcont<bestmatches_tofill && ii<nread->GetNumBestMatches()){
00082 
00083     TClonesArray& bmatcharray = *(record->mcnnv.bmatch);
00084     MCNNBestMatch *pepito = nread->GetBestMatch(ii);
00085     if(pepito->interactionType==1 || (pepito->interactionType==0 && pepito->run<=maxrunnc)){
00086       new (bmatcharray[elcont]) MCNNBestMatch(pepito);
00087       ++elcont;
00088     }
00089     ++ii;
00090   }//<--loop over best matches
00091 
00092 
00093 }

void MCNNFiller::FillMCNN NueAnaReader nueana,
NNReader nread
 

Definition at line 42 of file MCNNFiller.cxx.

References MCNNVars::bestmatches, FillBestMatches(), MCNNVars::fracCC, MCNNVars::fracCCy, NueAnaReader::GetfracCCy(), NNReader::GetInputCCE(), MCNNpid::GetMCNNpid(), NueAnaReader::GetMeanFracQMatched(), NNReader::GetNumBestMatches(), NueAnaReader::Getymean(), MCNNVars::mcnn_var1, MCNNVars::mcnn_var2, NueRecord::mcnnv, NNReader::mcpresel, MCNNVars::mcpresel, MCNNVars::meanfracQmatched, MinosCompactEvent::meanPlane, MCNNVars::meanPlane, MinosCompactEvent::meanU, MCNNVars::meanU, MinosCompactEvent::meanV, MCNNVars::meanV, nnpid, MinosCompactEvent::nPlanes, NueAnaReader::nuerecord, NNReader::qtot, MCNNVars::qtot, ycut, and MCNNVars::ymean.

Referenced by MCNNMergeModule::Reco().

00042                                                               {
00043   
00044   if(nueana!=NULL){
00045     if(nread!=NULL){
00046 
00047       nueana->nuerecord->mcnnv.bestmatches=TMath::Min(nread->GetNumBestMatches(),bestmatches_tofill);
00048       nueana->nuerecord->mcnnv.meanU=nread->GetInputCCE()->meanU;
00049       nueana->nuerecord->mcnnv.meanV=nread->GetInputCCE()->meanV;
00050       nueana->nuerecord->mcnnv.meanPlane=nread->GetInputCCE()->meanPlane;      
00051       nueana->nuerecord->mcnnv.mcpresel=nread->mcpresel;
00052       nueana->nuerecord->mcnnv.qtot=(int)nread->qtot;      
00053       nueana->nuerecord->mcnnv.mcnn_var2=nread->GetInputCCE()->nPlanes;
00054 
00055       FillBestMatches(nueana->nuerecord,nread); 
00056 
00057       //Fill this stuff after filling best matches
00058       nueana->nuerecord->mcnnv.mcnn_var1=nnpid->GetMCNNpid(nueana);
00059       nueana->nuerecord->mcnnv.fracCC=nueana->GetfracCCy(ycut);
00060       nueana->nuerecord->mcnnv.fracCCy=nueana->GetfracCCy(0.5);
00061       nueana->nuerecord->mcnnv.ymean=nueana->Getymean(ycut);
00062       nueana->nuerecord->mcnnv.meanfracQmatched=nueana->GetMeanFracQMatched(ycut);
00063 
00064     } else {
00065       cout << "Warning! Passed a NULL NNReader object to FillMCNN in MCNNFiller" << endl;
00066     }
00067   } else {
00068     cout << "Warning ! Passed a NULL NueRecord to FillMCNN in MCNNFiller" << endl;
00069   }
00070 
00071 }

void MCNNFiller::SetBestMatchesToFill Int_t  bmtf  ) 
 

Definition at line 35 of file MCNNFiller.cxx.

References bestmatches_tofill.

Referenced by MCNNMergeModule::BeginJob().

00035                                                {
00036 
00037   bestmatches_tofill=bmtf;
00038 
00039 }

void MCNNFiller::SetMaxRunNC Int_t  maxrunnc_in  ) 
 

Definition at line 112 of file MCNNFiller.cxx.

References maxrunnc.

00112                                              {
00113 
00114   maxrunnc=maxrunnc_in;
00115 
00116 }

void MCNNFiller::SetMCNNpidFile const char *  pdffile_in  ) 
 

Definition at line 96 of file MCNNFiller.cxx.

References nnpid.

Referenced by MCNNMergeModule::BeginJob().

00096                                                      {
00097 
00098   delete nnpid;
00099   nnpid = new MCNNpid(pdffile_in);
00100 
00101 }

void MCNNFiller::Setycut Float_t  ycut_in  ) 
 

Definition at line 104 of file MCNNFiller.cxx.

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

Referenced by MCNNMergeModule::BeginJob().

00104                                        {
00105 
00106   ycut=ycut_in;
00107   nnpid->Setycut(ycut_in);
00108 
00109 }


Member Data Documentation

Int_t MCNNFiller::bestmatches_tofill [private]
 

Definition at line 22 of file MCNNFiller.h.

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

Int_t MCNNFiller::maxrunnc [private]
 

Definition at line 24 of file MCNNFiller.h.

Referenced by MCNNFiller(), and SetMaxRunNC().

MCNNpid* MCNNFiller::nnpid [private]
 

Definition at line 21 of file MCNNFiller.h.

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

Float_t MCNNFiller::ycut [private]
 

Definition at line 23 of file MCNNFiller.h.

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


The documentation for this class was generated from the following files:
Generated on Mon Feb 15 11:09:31 2010 for loon by  doxygen 1.3.9.1