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

NNReader Class Reference

#include <NNReader.h>

List of all members.

Public Member Functions

 NNReader ()
 NNReader (const char *name, Bool_t isMC_in)
 NNReader (const char *name, const char *name2, Bool_t isMC_in)
 ~NNReader ()
Int_t Add (const char *namefile_in)
Bool_t GetEntry (Int_t srCtr_in)
Int_t GetEntries ()
void SetBranches ()
void SetDefaults ()
Float_t CalculatePOT (Int_t filenum, Int_t filetype)
Float_t CalculatePOT ()
Float_t GetfracCC ()
Float_t GetfracCCy (Float_t y_cut)
Int_t GetNnue ()
Int_t GetNnuey (Float_t y_cut)
Float_t Getymean ()
Int_t GetNumBestMatches ()
void SetMaxNumBestMatches (Int_t nbm_in)
void SetMaxRunNC (Int_t run_in)
void SetMaxRunNue (Int_t run_in)
Float_t GetMeanFracQMatched ()
MinosCompactEventGetInputCCE ()
MinosAnalysisResultGetMinosAnalysisResult ()
MCNNBestMatchGetBestMatch (Int_t entry_in)
void Reset ()
void SetFracNue (Float_t frac_in)
void SetFracNC (Float_t frac_in)
Float_t GetWeightedfracCCy (Float_t y_cut)
Float_t GetWeightedMeanFracQMatched ()

Public Attributes

Bool_t isMC
Int_t num_best_matches
Int_t max_run_nc
Int_t max_run_nue
Int_t run
Int_t snarl
Int_t evt
Int_t nuid
Int_t nuidnoosc
Int_t action
Float_t nue
Float_t nuenoosc
Float_t reco_nue
Float_t y
Float_t emfrac
Int_t ires
Float_t qtot
Float_t vtxx
Float_t vtxy
Float_t vtxz
Float_t vtxu
Float_t vtxv
Float_t tvtxx
Float_t tvtxy
Float_t tvtxz
Int_t tptype
Float_t tpx
Float_t tpy
Float_t tpz
Int_t npln
Int_t nplnu
Int_t nplnv
Int_t nstp
Int_t mcpresel
Int_t datapresel
Int_t nxtalk
Int_t nxtalk_tagged
Int_t nxtalk_mistagged
Int_t nphysics
Float_t w2
Float_t totpt
Float_t good_pot
Float_t total_pot
Int_t good_snarl
Float_t snarl_pot
Int_t BM_run
Int_t BM_snarl
Float_t BM_true_enu
Float_t BM_true_y
Int_t BM_interactionType
Int_t BM_resonanceCode
Int_t BM_nuFlavor
Float_t BM_dlnL
MinosAnalysisResultmar
MinosCompactEventcce
Int_t current_entry

Private Attributes

TChain * chain
TChain * chain_pot
Int_t usingboth
TH1F * h_frac_nue
TH1F * h_frac_nc
Float_t weightedmeanfracQmatched
Bool_t branchesset
MCNNBestMatchbmatch

Static Private Attributes

const Float_t POT_file_carrot_FD = 2.91*1e20
const Float_t POT_file_daikon_FD = 6.5*1e20
const Float_t POT_file_carrot_ND = 1.0024*1e16
const Float_t POT_file_daikon_ND = 1.936*1e16


Constructor & Destructor Documentation

NNReader::NNReader  ) 
 

Definition at line 17 of file NNReader.cxx.

References bmatch, cce, chain, current_entry, h_frac_nc, h_frac_nue, isMC, mar, max_run_nc, max_run_nue, num_best_matches, SetDefaults(), and usingboth.

00017                   {
00018 
00019   isMC=true;
00020   chain = new TChain("nn");
00021   num_best_matches=20;
00022   usingboth=0;
00023   current_entry=0;
00024   cce = new MinosCompactEvent();
00025   mar = new MinosAnalysisResult();
00026   bmatch = new MCNNBestMatch();
00027   max_run_nc = 30000000;
00028   max_run_nue = 30000000;
00029   cout << "Assuming name of tree is \"nn\"" << endl;
00030   SetDefaults();
00031   h_frac_nue = new TH1F("h_frac_nue","",20,-0.5,1.5);
00032   h_frac_nc = new TH1F("h_frac_nc","",20,-0.5,1.5);
00033 
00034 }

NNReader::NNReader const char *  name,
Bool_t  isMC_in
 

Definition at line 36 of file NNReader.cxx.

References bmatch, cce, chain, current_entry, h_frac_nc, h_frac_nue, isMC, mar, max_run_nc, max_run_nue, num_best_matches, SetDefaults(), and usingboth.

00036                                                   {
00037 
00038   isMC=isMC_in;
00039   chain = new TChain(name);
00040   num_best_matches=20;  
00041   usingboth=0;
00042   current_entry =0;
00043   cce = new MinosCompactEvent();
00044   mar = new MinosAnalysisResult();
00045   bmatch = new MCNNBestMatch();
00046   max_run_nc = 30000000;
00047   max_run_nue = 30000000;
00048   SetDefaults();
00049   h_frac_nue = new TH1F("h_frac_nue","",20,-0.5,1.5);
00050   h_frac_nc = new TH1F("h_frac_nc","",20,-0.5,1.5);
00051 
00052 }

NNReader::NNReader const char *  name,
const char *  name2,
Bool_t  isMC_in
 

Definition at line 54 of file NNReader.cxx.

References bmatch, cce, chain, chain_pot, current_entry, h_frac_nc, h_frac_nue, isMC, mar, max_run_nc, max_run_nue, num_best_matches, SetDefaults(), and usingboth.

00054                                                                      {
00055 
00056   isMC=isMC_in;
00057   chain = new TChain(name);
00058   chain_pot = new TChain(name2);
00059   num_best_matches=20;  
00060   usingboth=1;
00061   current_entry=0;
00062   cce = new MinosCompactEvent();
00063   mar = new MinosAnalysisResult();
00064   bmatch = new MCNNBestMatch();
00065   max_run_nc = 30000000;
00066   max_run_nue = 30000000;
00067   SetDefaults();
00068   h_frac_nue = new TH1F("h_frac_nue","",20,-0.5,1.5);
00069   h_frac_nc = new TH1F("h_frac_nc","",20,-0.5,1.5);
00070 
00071 }

NNReader::~NNReader  ) 
 

Definition at line 73 of file NNReader.cxx.

00073                    {
00074 
00075   delete h_frac_nue;
00076   delete h_frac_nc;
00077 }


Member Function Documentation

Int_t NNReader::Add const char *  namefile_in  ) 
 

Definition at line 287 of file NNReader.cxx.

References chain, chain_pot, and usingboth.

Referenced by MCNNMergeModule::BeginJob(), and FileLumper::FileLumper().

00287                                           {
00288 
00289   Int_t outcome=chain->Add(namefile_in);
00290   Int_t outcome2=0;
00291   if(usingboth==1){
00292     outcome2=chain_pot->Add(namefile_in);
00293   }
00294   //SetBranches();<--
00295   if(usingboth==1 && outcome!=outcome2){
00296     cout << "WARNING: did not add same number of files for main chain and for pot chain!!" << endl;
00297     cout << "--> Main chain: " << outcome << "; POT chain: " << outcome2 << endl;
00298   }
00299 
00300   return outcome;
00301 
00302 }

Float_t NNReader::CalculatePOT  ) 
 

Definition at line 353 of file NNReader.cxx.

References chain_pot, and usingboth.

00353                               {
00354 
00355   if(usingboth!=1){
00356     cout << "WARNING: Cannot calculate POT in this way; do not have pot tree (need to specify in constructor)" << endl;
00357     return -1;
00358   } else {
00359     Float_t pot_out=0;
00360     Int_t int_srCtr=0;
00361     while(chain_pot->GetEntry(int_srCtr)){
00362       ++int_srCtr;      
00363       pot_out+=good_pot;
00364     }
00365 
00366     return pot_out;
00367     
00368   }
00369 
00370 }

Float_t NNReader::CalculatePOT Int_t  filenum,
Int_t  filetype
 

Definition at line 323 of file NNReader.cxx.

References isMC, POT_file_carrot_FD, POT_file_carrot_ND, POT_file_daikon_FD, and POT_file_daikon_ND.

00323                                                            {
00324 
00325   Float_t pot_out=0;
00326   if(isMC==true){
00327     if(filetype==0){//<--carrot FD
00328       pot_out=filenum*POT_file_carrot_FD*1e-12;
00329       cout << "Using carrot FD POT" << endl;
00330     }
00331     if(filetype==1){//<--daikon FD
00332       pot_out=filenum*POT_file_daikon_FD*1e-12;
00333       cout << "Using daikon FD POT " << endl;
00334     }
00335     if(filetype==2){//<--carrot ND
00336       pot_out=filenum*POT_file_carrot_ND*1e-12;
00337       cout << "Using carrot ND POT" << endl;
00338     }
00339     if(filetype==3){//<--daikon ND
00340       pot_out=filenum*POT_file_daikon_ND*1e-12;
00341       cout << "Using daikon ND POT " << endl;
00342     }
00343 
00344   }else {
00345     cout << "Don't know how to calculate POT for data; only MC so far; program me!" << endl;
00346   }
00347 
00348   return pot_out;
00349 
00350 }

MCNNBestMatch * NNReader::GetBestMatch Int_t  entry_in  ) 
 

Definition at line 693 of file NNReader.cxx.

References bmatch, ComparisonResult::dLnL, MCNNBestMatch::dlnL, ComparisonResult::eNu, MCNNBestMatch::fracQmatched, ComparisonResult::fractionQMatched, GetNumBestMatches(), ComparisonResult::idact, ComparisonResult::idnu, ComparisonResult::idres, MCNNBestMatch::interactionType, mar, MCNNBestMatch::nuFlavor, MCNNBestMatch::resonanceCode, MinosAnalysisResult::ResultList, ComparisonResult::run, MCNNBestMatch::run, ComparisonResult::snarl, MCNNBestMatch::snarl, MCNNBestMatch::stdhepsize, MCNNBestMatch::true_enu, MCNNBestMatch::true_y, and ComparisonResult::y.

Referenced by MCNNFiller::FillBestMatches().

00693                                                    {
00694 
00695   if(entry_in<GetNumBestMatches()){
00696     const ComparisonResult *compres = dynamic_cast<const ComparisonResult*>(mar->ResultList->At(entry_in));
00697 
00698     //bmatch->Clear();
00699     //bmatch->Reset();
00700   
00701     bmatch->run=compres->run;
00702     bmatch->snarl=compres->snarl;
00703     bmatch->interactionType=compres->idact;
00704     bmatch->nuFlavor=compres->idnu;
00705     bmatch->true_enu=compres->eNu;
00706     bmatch->true_y=compres->y;
00707     bmatch->resonanceCode=compres->idres;
00708     bmatch->dlnL=compres->dLnL;
00709     bmatch->fracQmatched=compres->fractionQMatched;
00710     bmatch->stdhepsize=0;
00711     
00712     return bmatch;
00713 
00714   }
00715 
00716   else return NULL;
00717 
00718   }

Int_t NNReader::GetEntries  ) 
 

Definition at line 316 of file NNReader.cxx.

References chain.

Referenced by MCNNMergeModule::BeginJob(), and FileLumper::FileLumper().

00316                           {
00317 
00318   return chain->GetEntries();
00319 
00320 }

Bool_t NNReader::GetEntry Int_t  srCtr_in  ) 
 

Definition at line 305 of file NNReader.cxx.

References branchesset, chain, current_entry, and SetBranches().

Referenced by FileLumper::FileLumper(), and MCNNMergeModule::Reco().

00305                                        {
00306 
00307   if(branchesset==false){
00308     SetBranches();
00309   }
00310   current_entry=srCtr_in;
00311   return chain->GetEntry(srCtr_in);
00312 
00313 }

Float_t NNReader::GetfracCC  ) 
 

Definition at line 372 of file NNReader.cxx.

References abs(), ComparisonResult::idact, ComparisonResult::idnu, mar, num_best_matches, MinosAnalysisResult::ResultList, and ComparisonResult::run.

00372                            {
00373 
00374   Int_t nresults = mar->ResultList->GetEntries();
00375   Int_t match_nue = 0;
00376   Int_t matches = 0;
00377 
00378   Int_t bm=0;
00379   Int_t bma=0;
00380   while(bma<num_best_matches && bm<nresults){
00381         
00382     const ComparisonResult *compres = dynamic_cast<const ComparisonResult*>(mar->ResultList->At(bm));
00383 
00384     Int_t filetype=compres->run/100000;
00385     Int_t max_run=0;
00386     if(filetype==210){
00387       max_run=max_run_nc;
00388     } else {
00389       max_run=max_run_nue;
00390     }
00391     
00392     if(compres->run <= max_run){
00393 
00394       if(abs(compres->idnu)==12 && compres->idact==1){
00395         ++match_nue;
00396         ++matches;
00397       } else {
00398         ++matches;
00399       }  
00400       
00401       ++bma;
00402 
00403     }
00404     
00405     ++bm;      
00406 
00407   }//looping over first NUMBER_BEST_MATCHES best matches
00408   
00409   Float_t fracCC;
00410   //-->Calculating fracCC and filling histograms
00411   if(matches!=0){
00412     fracCC=match_nue*1./matches;
00413   } else {
00414     fracCC=-1;
00415   }   
00416 
00417   return fracCC;
00418 
00419 }

Float_t NNReader::GetfracCCy Float_t  y_cut  ) 
 

Definition at line 422 of file NNReader.cxx.

References abs(), ComparisonResult::idact, ComparisonResult::idnu, mar, num_best_matches, MinosAnalysisResult::ResultList, ComparisonResult::run, and ComparisonResult::y.

00422                                          {
00423 
00424   Int_t nresults = mar->ResultList->GetEntries();
00425   Int_t match_nue = 0;
00426   Int_t matches = 0;
00427 
00428   Int_t bm=0;
00429   Int_t bma=0;
00430 
00431   while(bma<num_best_matches && bm<nresults){
00432         
00433     const ComparisonResult *compres = dynamic_cast<const ComparisonResult*>(mar->ResultList->At(bm));
00434 
00435     Int_t filetype=compres->run/100000;
00436     Int_t max_run=0;
00437     if(filetype==210){
00438       max_run=max_run_nc;
00439     } else {
00440       max_run=max_run_nue;
00441     }
00442     
00443     if(compres->run <= max_run){
00444 
00445       if(abs(compres->idnu)==12 && compres->idact==1 && compres->y<y_cut){
00446         ++match_nue;
00447         ++matches;
00448       } else {
00449         ++matches; 
00450       }  
00451       
00452       ++bma;
00453 
00454     }
00455     
00456     ++bm;
00457 
00458   }//looping over first NUMBER_BEST_MATCHES best matches
00459   
00460   Float_t fracCCy;
00461   //-->Calculating fracCC and filling histograms
00462   if(matches!=0){
00463     fracCCy=match_nue*1./matches;
00464   } else {
00465     fracCCy=-1;
00466   }   
00467 
00468   return fracCCy;
00469 
00470 }

MinosCompactEvent * NNReader::GetInputCCE  ) 
 

Definition at line 679 of file NNReader.cxx.

Referenced by FileLumper::FileLumper(), and MCNNFiller::FillMCNN().

00679                                         {
00680   
00681   return cce;
00682 
00683 }

Float_t NNReader::GetMeanFracQMatched  ) 
 

Definition at line 632 of file NNReader.cxx.

References abs(), ComparisonResult::fractionQMatched, ComparisonResult::idact, ComparisonResult::idnu, mar, num_best_matches, MinosAnalysisResult::ResultList, and ComparisonResult::run.

00632                                      {
00633 
00634   Int_t nresults = mar->ResultList->GetEntries();
00635   Int_t matches = 0;
00636   Float_t meanfracQmatched=0;
00637 
00638   Int_t bm=0;
00639   Int_t bma=0;
00640   while(bma<num_best_matches && bm<nresults){
00641         
00642     const ComparisonResult *compres = dynamic_cast<const ComparisonResult*>(mar->ResultList->At(bm));
00643     
00644     Int_t filetype=compres->run/100000;
00645     Int_t max_run=0;
00646     if(filetype==210){
00647       max_run=max_run_nc;
00648     } else {
00649       max_run=max_run_nue;
00650     }
00651 
00652     if(compres->run <= max_run){
00653 
00654       if(abs(compres->idnu)==12 && compres->idact==1){
00655         meanfracQmatched += compres->fractionQMatched;
00656         ++matches;
00657       }
00658 
00659       ++bma;
00660 
00661     }
00662     
00663     ++bm;
00664 
00665   }//looping over first NUMBER_BEST_MATCHES best matches
00666   
00667   //-->Calculating meanfracQmatched;
00668   if(matches!=0){
00669     meanfracQmatched=meanfracQmatched*1./matches;
00670   } else {
00671     meanfracQmatched=-1;
00672   }
00673 
00674   return meanfracQmatched;
00675 
00676 }

MinosAnalysisResult * NNReader::GetMinosAnalysisResult  ) 
 

Definition at line 686 of file NNReader.cxx.

Referenced by FileLumper::FileLumper().

00686                                                      {
00687   
00688   return mar;
00689 
00690 }

Int_t NNReader::GetNnue  ) 
 

Definition at line 473 of file NNReader.cxx.

References abs(), ComparisonResult::idact, ComparisonResult::idnu, mar, num_best_matches, MinosAnalysisResult::ResultList, and ComparisonResult::run.

00473                        {
00474 
00475   Int_t nresults = mar->ResultList->GetEntries();
00476   Int_t match_nue = 0;
00477   //Int_t matches = 0;
00478 
00479   Int_t bm=0;
00480   Int_t bma=0;
00481   while(bma<num_best_matches && bm<nresults){
00482         
00483     const ComparisonResult *compres = dynamic_cast<const ComparisonResult*>(mar->ResultList->At(bm));
00484     
00485     Int_t filetype=compres->run/100000;
00486     Int_t max_run=0;
00487     if(filetype==210){
00488       max_run=max_run_nc;
00489     } else {
00490       max_run=max_run_nue;
00491     }
00492 
00493     if(compres->run <= max_run){
00494       
00495       if(abs(compres->idnu)==12 && compres->idact==1){
00496         ++match_nue;
00497         //++matches;
00498         //} else {
00499         //++matches;
00500       }  
00501 
00502       ++bma;
00503 
00504     }
00505 
00506     ++bm;
00507 
00508   }//looping over first NUMBER_BEST_MATCHES best matches
00509 
00510   return match_nue;
00511 
00512 }

Int_t NNReader::GetNnuey Float_t  y_cut  ) 
 

Definition at line 515 of file NNReader.cxx.

References abs(), ComparisonResult::idact, ComparisonResult::idnu, mar, num_best_matches, MinosAnalysisResult::ResultList, ComparisonResult::run, and ComparisonResult::y.

00515                                      {
00516 
00517   Int_t nresults = mar->ResultList->GetEntries();
00518   Int_t match_nue = 0;
00519   //Int_t matches = 0;
00520 
00521   Int_t bm=0;
00522   Int_t bma=0;
00523   while(bma<num_best_matches && bm<nresults){
00524         
00525     const ComparisonResult *compres = dynamic_cast<const ComparisonResult*>(mar->ResultList->At(bm));
00526     
00527     Int_t filetype=compres->run/100000;
00528     Int_t max_run=0;
00529     if(filetype==210){
00530       max_run=max_run_nc;
00531     } else {
00532       max_run=max_run_nue;
00533     }
00534 
00535     if(compres->run <= max_run){
00536       
00537       if(abs(compres->idnu)==12 && compres->idact==1 && compres->y<y_cut){
00538         ++match_nue;
00539         //  ++matches;
00540         //} else {
00541         //++matches; 
00542       }  
00543     
00544       ++bma;
00545   
00546     }
00547 
00548     ++bm;
00549 
00550   }//looping over first NUMBER_BEST_MATCHES best matches
00551  
00552   return match_nue;
00553 
00554 }

Int_t NNReader::GetNumBestMatches  ) 
 

Definition at line 603 of file NNReader.cxx.

References mar, and MinosAnalysisResult::ResultList.

Referenced by MCNNFiller::FillBestMatches(), MCNNFiller::FillMCNN(), and GetBestMatch().

00603                                  {
00604 
00605   return mar->ResultList->GetEntries();
00606 
00607 }

Float_t NNReader::GetWeightedfracCCy Float_t  y_cut  ) 
 

Definition at line 746 of file NNReader.cxx.

References abs(), ComparisonResult::fractionQMatched, h_frac_nc, h_frac_nue, ComparisonResult::idact, ComparisonResult::idnu, mar, num_best_matches, MinosAnalysisResult::ResultList, ComparisonResult::run, weightedmeanfracQmatched, and ComparisonResult::y.

00746                                                  {
00747 
00748   Int_t nresults = mar->ResultList->GetEntries();
00749   Int_t match_nue = 0;
00750   weightedmeanfracQmatched=0;
00751   Int_t matches = 0;
00752   Int_t matches_mfqm=0;
00753 
00754   Int_t bm=0;
00755   Int_t bma=0;
00756 
00757   while(bma<num_best_matches && bm<nresults){
00758         
00759     const ComparisonResult *compres = dynamic_cast<const ComparisonResult*>(mar->ResultList->At(bm));
00760 
00761     Int_t filetype=compres->run/100000;
00762     Int_t proba=0;
00763     if(filetype==210){
00764       proba=(int)h_frac_nc->GetRandom();
00765     } else {
00766       proba=(int)h_frac_nue->GetRandom();
00767     }
00768     
00769     //proba=1;
00770 
00771     if(proba==1){
00772 
00773       if(abs(compres->idnu)==12 && compres->idact==1){
00774         weightedmeanfracQmatched += compres->fractionQMatched;
00775         ++matches_mfqm;
00776         if(compres->y<y_cut){
00777           ++match_nue;
00778         }
00779         ++matches;
00780       } else {
00781         ++matches; 
00782       }  
00783       
00784       ++bma;
00785 
00786     }
00787     
00788     ++bm;
00789 
00790   }//looping over first NUMBER_BEST_MATCHES best matches
00791   
00792   Float_t fracCCy;
00793   //-->Calculating fracCC and filling histograms
00794   if(matches!=0){
00795    fracCCy=match_nue*1./matches; 
00796   } else {
00797     fracCCy=-1;
00798   }   
00799 
00800   if(matches_mfqm!=0){
00801     weightedmeanfracQmatched=weightedmeanfracQmatched*1./matches_mfqm;
00802   } else {
00803     weightedmeanfracQmatched=-1;
00804   }
00805 
00806   return fracCCy;
00807 
00808 }

Float_t NNReader::GetWeightedMeanFracQMatched  ) 
 

Definition at line 811 of file NNReader.cxx.

00811                                              {
00812 
00813   return weightedmeanfracQmatched;
00814 
00815 }

Float_t NNReader::Getymean  ) 
 

Definition at line 557 of file NNReader.cxx.

References abs(), ComparisonResult::idact, ComparisonResult::idnu, mar, num_best_matches, MinosAnalysisResult::ResultList, ComparisonResult::run, and ComparisonResult::y.

00557                           {
00558 
00559   Float_t result=-1;
00560   Int_t matches=0;
00561   Int_t nresults = mar->ResultList->GetEntries();
00562   Float_t ely=0;
00563   
00564 
00565   Int_t bm=0;
00566   Int_t bma=0;
00567   while(bma<num_best_matches && bm<nresults){
00568         
00569     const ComparisonResult *compres = dynamic_cast<const ComparisonResult*>(mar->ResultList->At(bm));
00570     
00571     Int_t filetype=compres->run/100000;
00572     Int_t max_run=0;
00573     if(filetype==210){
00574       max_run=max_run_nc;
00575     } else {
00576       max_run=max_run_nue;
00577     }
00578 
00579     if(compres->run <= max_run){
00580 
00581       if(abs(compres->idnu)==12 && compres->idact==1){
00582         ely += compres->y;
00583         ++matches;       
00584       }
00585       
00586       ++bma;
00587 
00588     }
00589   
00590     ++bm;
00591 
00592   }//looping over first NUMBER_BEST_MATCHES best matches
00593   
00594   if(matches!=0){
00595     result=ely*1./matches;
00596   }
00597  
00598   return result;
00599 
00600 }

void NNReader::Reset  ) 
 

Definition at line 721 of file NNReader.cxx.

References chain, and MCNNBestMatch::Reset().

00721                     {
00722 
00723   chain->Reset();
00724 
00725 }

void NNReader::SetBranches  ) 
 

Definition at line 80 of file NNReader.cxx.

References action, branchesset, cce, chain, chain_pot, datapresel, emfrac, evt, good_pot, good_snarl, ires, isMC, mar, mcpresel, npln, nplnu, nplnv, nstp, nue, nuenoosc, nuid, nuidnoosc, qtot, reco_nue, run, snarl, snarl_pot, total_pot, totpt, tptype, tpx, tpy, tpz, tvtxx, tvtxy, tvtxz, usingboth, vtxu, vtxv, vtxx, vtxy, vtxz, and w2.

Referenced by GetEntry().

00080                           {
00081 
00082   if(isMC==true){
00083     //cout << "Going over MC" << endl;
00084   } else {
00085     //cout << "Going over data" << endl;
00086   }
00087 
00088   //Branches
00089   //--------
00090   if(chain->GetBranchStatus("cce")){
00091     chain->SetBranchAddress("cce",&cce);
00092   }  
00093   if(chain->GetBranchStatus("comparisonResults")){
00094     chain->SetBranchAddress("comparisonResults",&mar);
00095   }
00096   if(chain->GetBranchStatus("run")){
00097     chain->SetBranchAddress("run",&run);
00098   }
00099   if(chain->GetBranchStatus("snarl")){
00100     chain->SetBranchAddress("snarl",&snarl);
00101   }  
00102   if(chain->GetBranchStatus("evt")){
00103     chain->SetBranchAddress("evt",&evt);
00104   }
00105   if(chain->GetBranchStatus("nuid")){
00106     chain->SetBranchAddress("nuid",&nuid);
00107   }
00108   if(chain->GetBranchStatus("nuidnoosc")){
00109     chain->SetBranchAddress("nuidnoosc",&nuidnoosc);
00110   }
00111   if(chain->GetBranchStatus("action")){
00112     chain->SetBranchAddress("action",&action);
00113   }
00114   if(chain->GetBranchStatus("nue")){
00115     chain->SetBranchAddress("nue",&nue);
00116   }
00117   if(chain->GetBranchStatus("nuenoosc")){
00118     chain->SetBranchAddress("nuenoosc",&nuenoosc);
00119   }
00120   if(chain->GetBranchStatus("reco_nue")){
00121     chain->SetBranchAddress("reco_nue",&reco_nue);
00122   }
00123   //if(chain->GetBranchStatus("y")){
00124   //Note: For some reason y comes out with default value even though it is correctly set. 
00125   // Do not understand this. I think could be conflicting with y in MinosCompactEvent since it's exactly same name, but don't know. 
00126   // To extract y from mcnn files, have to uncomment this and just use the y from the MinosCompactEvent  
00127   // as nread->GetInputCCE()->y 
00128   // chain->SetBranchAddress("y",&y);
00129   //}
00130   if(chain->GetBranchStatus("emfrac")){
00131     chain->SetBranchAddress("emfrac",&emfrac);
00132   }  
00133   if(chain->GetBranchStatus("ires")){
00134     chain->SetBranchAddress("ires",&ires);
00135   }   
00136   if(chain->GetBranchStatus("qtot")){
00137     chain->SetBranchAddress("qtot",&qtot);
00138   }
00139   if(chain->GetBranchStatus("vtxx")){
00140     chain->SetBranchAddress("vtxx",&vtxx);
00141   }
00142   if(chain->GetBranchStatus("vtxy")){
00143     chain->SetBranchAddress("vtxy",&vtxy);
00144   }
00145   if(chain->GetBranchStatus("vtxz")){
00146     chain->SetBranchAddress("vtxz",&vtxz);
00147   }
00148   if(chain->GetBranchStatus("vtxu")){
00149     chain->SetBranchAddress("vtxu",&vtxu);
00150   }
00151   if(chain->GetBranchStatus("vtxv")){
00152     chain->SetBranchAddress("vtxv",&vtxv);
00153   }
00154   if(chain->GetBranchStatus("tvtxx")){
00155     chain->SetBranchAddress("tvtxx",&tvtxx);
00156   }
00157   if(chain->GetBranchStatus("tvtxy")){
00158     chain->SetBranchAddress("tvtxy",&tvtxy);
00159   }
00160   if(chain->GetBranchStatus("tvtxz")){
00161     chain->SetBranchAddress("tvtxz",&tvtxz);
00162   }
00163   if(chain->GetBranchStatus("tptype")){
00164     chain->SetBranchAddress("tptype",&tptype);
00165   }
00166   if(chain->GetBranchStatus("tpx")){
00167     chain->SetBranchAddress("tpx",&tpx);
00168   }
00169   if(chain->GetBranchStatus("tpy")){
00170     chain->SetBranchAddress("tpy",&tpy);
00171   }  
00172   if(chain->GetBranchStatus("tpz")){
00173     chain->SetBranchAddress("tpz",&tpz);
00174   }
00175   if(chain->GetBranchStatus("npln")){
00176     chain->SetBranchAddress("npln",&npln);
00177   }
00178   if(chain->GetBranchStatus("nplnu")){
00179     chain->SetBranchAddress("nplnu",&nplnu);
00180   }
00181   if(chain->GetBranchStatus("nplnv")){
00182     chain->SetBranchAddress("nplnv",&nplnv);
00183   }
00184   if(chain->GetBranchStatus("nstp")){
00185     chain->SetBranchAddress("nstp",&nstp);
00186   }
00187   if(chain->GetBranchStatus("mcpresel")){
00188     chain->SetBranchAddress("mcpresel",&mcpresel);
00189   }
00190   if(chain->GetBranchStatus("datapresel")){
00191     chain->SetBranchAddress("datapresel",&datapresel);
00192   }
00193   if(chain->GetBranchStatus("snarl_pot")){
00194     chain->SetBranchAddress("snarl_pot",&snarl_pot);
00195   }
00196   if(chain->GetBranchStatus("good_snarl")){
00197     chain->SetBranchAddress("good_snarl",&good_snarl);
00198   }
00199 
00200   //Do not really understand why, but had to comment these out as they were giving seg. fault in /nfs/raid2/ochoa/mcnn/FD/9.6M_19.1M_Daikon-Daikon_PlaneOffsetOnly files, in particular with 21011116 run and with GetEntry(0)
00201   //-->They are not filled anyways !
00202   /*if(chain->GetBranchStatus("nxtalk")){
00203     chain->SetBranchAddress("nxtalk",&nxtalk);
00204   }
00205   if(chain->GetBranchStatus("nxtalk_tagged")){
00206     chain->SetBranchAddress("nxtalk_tagged",&nxtalk_tagged);
00207   }
00208   if(chain->GetBranchStatus("nxtalk_mistagged")){
00209     chain->SetBranchAddress("nxtalk_mistagged",&nxtalk_mistagged);
00210   }
00211   if(chain->GetBranchStatus("nphysics")){
00212     chain->SetBranchAddress("nphysics",&nphysics);
00213   }
00214   */
00215   if(chain->GetBranchStatus("w2")){
00216     chain->SetBranchAddress("w2",&w2);
00217   }
00218   if(chain->GetBranchStatus("totpt")){
00219     chain->SetBranchAddress("totpt",&totpt);
00220   }
00221     
00222   //POT chain
00223   if(usingboth==1 && chain_pot->GetBranchStatus("good_pot")){
00224     chain_pot->SetBranchAddress("good_pot",&good_pot);
00225   }
00226   if(usingboth==1 && chain_pot->GetBranchStatus("total_pot")){
00227     chain_pot->SetBranchAddress("total_pot",&total_pot);
00228   }
00229 
00230   branchesset=true;
00231   
00232 }

void NNReader::SetDefaults  ) 
 

Definition at line 235 of file NNReader.cxx.

References action, branchesset, datapresel, emfrac, evt, good_pot, good_snarl, ires, mcpresel, nphysics, npln, nplnu, nplnv, nstp, nue, nuenoosc, nuid, nuidnoosc, nxtalk, nxtalk_mistagged, nxtalk_tagged, qtot, reco_nue, run, snarl, snarl_pot, total_pot, totpt, tptype, tpx, tpy, tpz, tvtxx, tvtxy, tvtxz, vtxu, vtxv, vtxx, vtxy, vtxz, w2, and y.

Referenced by NNReader().

00235                           {
00236 
00237   run=-1;
00238   snarl=-1;
00239   evt=-1;
00240   nuid=-1;
00241   nuidnoosc=-1;
00242   action=-1;
00243   nue=-1;
00244   nuenoosc=-1;
00245   reco_nue=-1;
00246   y=-1;
00247   emfrac=-1;
00248   ires=-1;
00249   qtot=-1;
00250   vtxx=-1;
00251   vtxy=-1;
00252   vtxz=-1;
00253   vtxu=-1;
00254   vtxv=-1;
00255   tvtxx=-1;
00256   tvtxy=-1;
00257   tvtxz=-1;
00258   tptype=-1;
00259   tpx=-1;
00260   tpy=-1;
00261   tpz=-1;
00262   npln=-1;  
00263   nplnu=-1;
00264   nplnv=-1;
00265   nstp=-1;
00266   mcpresel=-1;
00267   datapresel=-1;
00268   nxtalk=-1;
00269   nxtalk_tagged=-1;
00270   nxtalk_mistagged=-1;
00271   nphysics=-1;
00272   w2=-1;
00273   totpt=-1;
00274   
00275   //-->pot
00276   good_pot=-1;
00277   total_pot=-1;
00278   good_snarl=-1;
00279   snarl_pot=-1;
00280 
00281   //-->others
00282   branchesset=false;
00283 
00284 }

void NNReader::SetFracNC Float_t  frac_in  ) 
 

Definition at line 737 of file NNReader.cxx.

References h_frac_nc, and MCNNBestMatch::Reset().

00737                                        {
00738 
00739   h_frac_nc->Reset();
00740   h_frac_nc->Fill(1.,frac_in);
00741   h_frac_nc->Fill(0.,1-frac_in);
00742 
00743 }

void NNReader::SetFracNue Float_t  frac_in  ) 
 

Definition at line 728 of file NNReader.cxx.

References h_frac_nue, and MCNNBestMatch::Reset().

00728                                         {
00729 
00730   h_frac_nue->Reset();
00731   h_frac_nue->Fill(1.,frac_in);
00732   h_frac_nue->Fill(0.,1-frac_in);
00733 
00734 }

void NNReader::SetMaxNumBestMatches Int_t  nbm_in  ) 
 

Definition at line 610 of file NNReader.cxx.

References num_best_matches.

00610                                                {
00611 
00612   num_best_matches=nbm_in;
00613 
00614 }

void NNReader::SetMaxRunNC Int_t  run_in  ) 
 

Definition at line 617 of file NNReader.cxx.

References max_run_nc.

00617                                       {
00618 
00619   max_run_nc=run_in;
00620 
00621 }

void NNReader::SetMaxRunNue Int_t  run_in  ) 
 

Definition at line 624 of file NNReader.cxx.

References max_run_nue.

00624                                        {
00625 
00626   max_run_nue=run_in;
00627 
00628 }


Member Data Documentation

Int_t NNReader::action
 

Definition at line 55 of file NNReader.h.

Referenced by SetBranches(), FileLumper::SetBranches(), and SetDefaults().

Float_t NNReader::BM_dlnL
 

Definition at line 102 of file NNReader.h.

Int_t NNReader::BM_interactionType
 

Definition at line 99 of file NNReader.h.

Int_t NNReader::BM_nuFlavor
 

Definition at line 101 of file NNReader.h.

Int_t NNReader::BM_resonanceCode
 

Definition at line 100 of file NNReader.h.

Int_t NNReader::BM_run
 

Definition at line 95 of file NNReader.h.

Int_t NNReader::BM_snarl
 

Definition at line 96 of file NNReader.h.

Float_t NNReader::BM_true_enu
 

Definition at line 97 of file NNReader.h.

Float_t NNReader::BM_true_y
 

Definition at line 98 of file NNReader.h.

MCNNBestMatch* NNReader::bmatch [private]
 

Definition at line 120 of file NNReader.h.

Referenced by GetBestMatch(), and NNReader().

Bool_t NNReader::branchesset [private]
 

Definition at line 119 of file NNReader.h.

Referenced by GetEntry(), SetBranches(), and SetDefaults().

MinosCompactEvent* NNReader::cce
 

Definition at line 105 of file NNReader.h.

Referenced by NNReader(), and SetBranches().

TChain* NNReader::chain [private]
 

Definition at line 109 of file NNReader.h.

Referenced by Add(), GetEntries(), GetEntry(), NNReader(), Reset(), and SetBranches().

TChain* NNReader::chain_pot [private]
 

Definition at line 110 of file NNReader.h.

Referenced by Add(), CalculatePOT(), NNReader(), and SetBranches().

Int_t NNReader::current_entry
 

Definition at line 106 of file NNReader.h.

Referenced by GetEntry(), and NNReader().

Int_t NNReader::datapresel
 

Definition at line 80 of file NNReader.h.

Referenced by SetBranches(), FileLumper::SetBranches(), and SetDefaults().

Float_t NNReader::emfrac
 

Definition at line 60 of file NNReader.h.

Referenced by SetBranches(), FileLumper::SetBranches(), and SetDefaults().

Int_t NNReader::evt
 

Definition at line 52 of file NNReader.h.

Referenced by MCNNMergeModule::Reco(), SetBranches(), FileLumper::SetBranches(), and SetDefaults().

Float_t NNReader::good_pot
 

Definition at line 89 of file NNReader.h.

Referenced by SetBranches(), and SetDefaults().

Int_t NNReader::good_snarl
 

Definition at line 91 of file NNReader.h.

Referenced by SetBranches(), FileLumper::SetBranches(), and SetDefaults().

TH1F* NNReader::h_frac_nc [private]
 

Definition at line 117 of file NNReader.h.

Referenced by GetWeightedfracCCy(), NNReader(), and SetFracNC().

TH1F* NNReader::h_frac_nue [private]
 

Definition at line 116 of file NNReader.h.

Referenced by GetWeightedfracCCy(), NNReader(), and SetFracNue().

Int_t NNReader::ires
 

Definition at line 61 of file NNReader.h.

Referenced by SetBranches(), FileLumper::SetBranches(), and SetDefaults().

Bool_t NNReader::isMC
 

Definition at line 19 of file NNReader.h.

Referenced by CalculatePOT(), NNReader(), and SetBranches().

MinosAnalysisResult* NNReader::mar
 

Definition at line 104 of file NNReader.h.

Referenced by GetBestMatch(), GetfracCC(), GetfracCCy(), GetMeanFracQMatched(), GetNnue(), GetNnuey(), GetNumBestMatches(), GetWeightedfracCCy(), Getymean(), NNReader(), and SetBranches().

Int_t NNReader::max_run_nc
 

Definition at line 21 of file NNReader.h.

Referenced by NNReader(), and SetMaxRunNC().

Int_t NNReader::max_run_nue
 

Definition at line 22 of file NNReader.h.

Referenced by NNReader(), and SetMaxRunNue().

Int_t NNReader::mcpresel
 

Definition at line 79 of file NNReader.h.

Referenced by MCNNFiller::FillMCNN(), SetBranches(), FileLumper::SetBranches(), and SetDefaults().

Int_t NNReader::nphysics
 

Definition at line 84 of file NNReader.h.

Referenced by FileLumper::SetBranches(), and SetDefaults().

Int_t NNReader::npln
 

Definition at line 75 of file NNReader.h.

Referenced by PreselModif(), SetBranches(), FileLumper::SetBranches(), and SetDefaults().

Int_t NNReader::nplnu
 

Definition at line 76 of file NNReader.h.

Referenced by SetBranches(), FileLumper::SetBranches(), and SetDefaults().

Int_t NNReader::nplnv
 

Definition at line 77 of file NNReader.h.

Referenced by SetBranches(), FileLumper::SetBranches(), and SetDefaults().

Int_t NNReader::nstp
 

Definition at line 78 of file NNReader.h.

Referenced by PreselModif(), SetBranches(), FileLumper::SetBranches(), and SetDefaults().

Float_t NNReader::nue
 

Definition at line 56 of file NNReader.h.

Referenced by SetBranches(), FileLumper::SetBranches(), and SetDefaults().

Float_t NNReader::nuenoosc
 

Definition at line 57 of file NNReader.h.

Referenced by SetBranches(), FileLumper::SetBranches(), and SetDefaults().

Int_t NNReader::nuid
 

Definition at line 53 of file NNReader.h.

Referenced by SetBranches(), FileLumper::SetBranches(), and SetDefaults().

Int_t NNReader::nuidnoosc
 

Definition at line 54 of file NNReader.h.

Referenced by SetBranches(), FileLumper::SetBranches(), and SetDefaults().

Int_t NNReader::num_best_matches
 

Definition at line 20 of file NNReader.h.

Referenced by GetfracCC(), GetfracCCy(), GetMeanFracQMatched(), GetNnue(), GetNnuey(), GetWeightedfracCCy(), Getymean(), NNReader(), and SetMaxNumBestMatches().

Int_t NNReader::nxtalk
 

Definition at line 81 of file NNReader.h.

Referenced by FileLumper::SetBranches(), and SetDefaults().

Int_t NNReader::nxtalk_mistagged
 

Definition at line 83 of file NNReader.h.

Referenced by FileLumper::SetBranches(), and SetDefaults().

Int_t NNReader::nxtalk_tagged
 

Definition at line 82 of file NNReader.h.

Referenced by FileLumper::SetBranches(), and SetDefaults().

const Float_t NNReader::POT_file_carrot_FD = 2.91*1e20 [static, private]
 

Definition at line 10 of file NNReader.cxx.

Referenced by CalculatePOT().

const Float_t NNReader::POT_file_carrot_ND = 1.0024*1e16 [static, private]
 

Definition at line 12 of file NNReader.cxx.

Referenced by CalculatePOT().

const Float_t NNReader::POT_file_daikon_FD = 6.5*1e20 [static, private]
 

Definition at line 11 of file NNReader.cxx.

Referenced by CalculatePOT().

const Float_t NNReader::POT_file_daikon_ND = 1.936*1e16 [static, private]
 

Definition at line 13 of file NNReader.cxx.

Referenced by CalculatePOT().

Float_t NNReader::qtot
 

Definition at line 62 of file NNReader.h.

Referenced by MCNNFiller::FillMCNN(), PreselModif(), SetBranches(), FileLumper::SetBranches(), and SetDefaults().

Float_t NNReader::reco_nue
 

Definition at line 58 of file NNReader.h.

Referenced by SetBranches(), FileLumper::SetBranches(), and SetDefaults().

Int_t NNReader::run
 

Definition at line 50 of file NNReader.h.

Referenced by MCNNMergeModule::Reco(), SetBranches(), FileLumper::SetBranches(), and SetDefaults().

Int_t NNReader::snarl
 

Definition at line 51 of file NNReader.h.

Referenced by MCNNMergeModule::Reco(), SetBranches(), FileLumper::SetBranches(), and SetDefaults().

Float_t NNReader::snarl_pot
 

Definition at line 92 of file NNReader.h.

Referenced by SetBranches(), FileLumper::SetBranches(), and SetDefaults().

Float_t NNReader::total_pot
 

Definition at line 90 of file NNReader.h.

Referenced by SetBranches(), and SetDefaults().

Float_t NNReader::totpt
 

Definition at line 86 of file NNReader.h.

Referenced by SetBranches(), FileLumper::SetBranches(), and SetDefaults().

Int_t NNReader::tptype
 

Definition at line 71 of file NNReader.h.

Referenced by SetBranches(), FileLumper::SetBranches(), and SetDefaults().

Float_t NNReader::tpx
 

Definition at line 72 of file NNReader.h.

Referenced by SetBranches(), FileLumper::SetBranches(), and SetDefaults().

Float_t NNReader::tpy
 

Definition at line 73 of file NNReader.h.

Referenced by SetBranches(), FileLumper::SetBranches(), and SetDefaults().

Float_t NNReader::tpz
 

Definition at line 74 of file NNReader.h.

Referenced by SetBranches(), FileLumper::SetBranches(), and SetDefaults().

Float_t NNReader::tvtxx
 

Definition at line 68 of file NNReader.h.

Referenced by SetBranches(), FileLumper::SetBranches(), and SetDefaults().

Float_t NNReader::tvtxy
 

Definition at line 69 of file NNReader.h.

Referenced by SetBranches(), FileLumper::SetBranches(), and SetDefaults().

Float_t NNReader::tvtxz
 

Definition at line 70 of file NNReader.h.

Referenced by SetBranches(), FileLumper::SetBranches(), and SetDefaults().

Int_t NNReader::usingboth [private]
 

Definition at line 115 of file NNReader.h.

Referenced by Add(), CalculatePOT(), NNReader(), and SetBranches().

Float_t NNReader::vtxu
 

Definition at line 66 of file NNReader.h.

Referenced by SetBranches(), FileLumper::SetBranches(), and SetDefaults().

Float_t NNReader::vtxv
 

Definition at line 67 of file NNReader.h.

Referenced by SetBranches(), FileLumper::SetBranches(), and SetDefaults().

Float_t NNReader::vtxx
 

Definition at line 63 of file NNReader.h.

Referenced by SetBranches(), FileLumper::SetBranches(), SetDefaults(), VtxIsContainedFD(), and VtxIsContainedND().

Float_t NNReader::vtxy
 

Definition at line 64 of file NNReader.h.

Referenced by SetBranches(), FileLumper::SetBranches(), SetDefaults(), VtxIsContainedFD(), and VtxIsContainedND().

Float_t NNReader::vtxz
 

Definition at line 65 of file NNReader.h.

Referenced by SetBranches(), FileLumper::SetBranches(), SetDefaults(), VtxIsContainedFD(), and VtxIsContainedND().

Float_t NNReader::w2
 

Definition at line 85 of file NNReader.h.

Referenced by SetBranches(), FileLumper::SetBranches(), and SetDefaults().

Float_t NNReader::weightedmeanfracQmatched [private]
 

Definition at line 118 of file NNReader.h.

Referenced by GetWeightedfracCCy().

Float_t NNReader::y
 

Definition at line 59 of file NNReader.h.

Referenced by FileLumper::SetBranches(), and SetDefaults().


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