MicroDSTMaker Class Reference

Job module to create uDSTs. More...

#include <MicroDSTMaker.h>

Inheritance diagram for MicroDSTMaker:

JobCModule List of all members.

Public Member Functions

 MicroDSTMaker ()
virtual ~MicroDSTMaker ()
const RegistryDefaultConfig () const
void Config (const Registry &r)
void EndJob ()

Static Public Member Functions

static void AddExtraction (NCExtractionFactory *e)

Private Member Functions

void FillRecoInfo (ANtpRecoInfo *recoInfo, ANtpHeaderInfo *headerInfo, ANtpEventInfoNC *eventInfo, ANtpShowerInfoNC *showerInfo, ANtpTrackInfoNC *trackInfo, ANtpBeamInfo *beamInfo, NCAnalysisCuts *cuts, int targetPos)
 Fill the ANtpRecoInfo object based on the other info objects.
void ExtractNCCC (TChain *chain)
 Loop over chain and produce the uDST tree.
void CountPOTs ()
void WritePOTInfo ()
double GetTotalPOTCount ()
 Return sum(fPOTs).
void FillExtractionAndAnalysisVectors ()
 Populate the list of extractions and their associated analysis infos.
void CreateNtupleTree (TFile *&file, TTree *&tree, TTree *&beamTree, TString filename, TString treename, bool truthBranch, bool mrccBranch)
 Create output file and tree with correct branches.
void MakeuDST ()
void AddToBeamNtuple ()
 TTree::Fill() the beam stripped and unstripped ntuples if they're not already too big.
void AddToNtuple ()
 TTree::Fill() the uDST stripped and unstripped ntuples if they're not already too big.
void WriteFile (TFile *tf, TTree *events, TTree *beam)
 Write the beam and events trees into the tf file.
void ParseExtractionsList (TString extractions)
bool OutputFileTooBig ()
 Does fNtpFile exceed 1.8Gb?
bool StrippedOutputFileTooBig ()
 Does fStrippedNtpFile exceed 1.8Gb?

Static Private Member Functions

static std::vector< NCExtractionFactory * > & GetExtractionFactories ()
 The various extractions that have registered themselves.

Private Attributes

TString fFileName
 name of file holding output from extractions
TString fTreeName
 name of AnalysisNtuples trees (data and mc)
TString fFilePath
 path to AnalysisNtuples
TString fDataSet
 data set to use in the fDataPath, year-month or mc
NCType::EDataMC fDataType
 Are we running on data or MC?
TFile * fNtpFile
 file holding output from extractions
TTree * fBeamNtuple
 ntuple for each spill to keep beam info
TTree * fBeamNtupleStp
 ntuple for each spill to keep beam info
TTree * fNtuple
 ntuple for uDST of data events
TTree * fMCNtuple
 ntuple for uDST of MC events
TFile * fStrippedNtpFile
 file holding output from extractions
TTree * fStrippedNtuple
 ntuple for uDST of data events
TTree * fStrippedMCNtuple
 ntuple for uDST of MC events
BeamType::BeamType_t fBeamType
 beam - see Conventions/BeamType.h
bool fUseAllBeams
 flag to use all beam configurations
bool fUseAllL010z
 flag to use all data in the LE-10 configuration
bool fUseAll185i
 flag to use all data with horn current = -185 kA
NCType::ECuts fCutSuite
 which cuts to use - see NCType.h
bool fUseMCAsData
 use the MC as data for testing purposes
double fMCPOTPerSnarlOrSubrun
 MC POT in units of 1e12 POT, per snarl for ND or per subrun for FD.
int fFileCountLimit
 maximum number of files to process from all trees
TString fExtractionsList
ANtpEventInfoNCfEventInfo
ANtpEventInfoMRCCfMRCCInfo
ANtpHeaderInfofHeaderInfo
ANtpBeamInfofBeamInfo
ANtpShowerInfoNCfShowerInfo
ANtpTrackInfoNCfTrackInfo
ANtpTruthInfoBeamfTruthInfo
ANtpRecoInfofRecoInfo
std::vector< NCExtraction * > fExtractions
 The extractions that we'll be using.
std::vector< ANtpAnalysisInfo * > fAnalysisInfos
 The associated analysis info objects for the extractions.
NCAnalysisCutsfCuts
NCEventInfofInfo
NC::RunUtil::ERunType fRunPeriod
std::map< int, double > fPOTs
 Map from run/subrun to pots in the run/subrun.

Detailed Description

Job module to create uDSTs.

Definition at line 76 of file MicroDSTMaker.h.


Constructor & Destructor Documentation

MicroDSTMaker::MicroDSTMaker (  ) 

Definition at line 48 of file MicroDSTMaker.cxx.

References fBeamInfo, fEventInfo, fHeaderInfo, fInfo, fMRCCInfo, fRecoInfo, fShowerInfo, fTrackInfo, fTruthInfo, Msg::kDebug, and MSG.

00048                              :
00049   fNtpFile(0),
00050   fNtuple(0),
00051   fStrippedNtpFile(0),
00052   fRunPeriod(NC::RunUtil::kRunAll)
00053 {
00054   MSG("JobC", Msg::kDebug) << "MicroDSTMaker::Constructor" << endl;
00055 
00056   fHeaderInfo = new ANtpHeaderInfo;
00057   fBeamInfo = new ANtpBeamInfo;
00058   fRecoInfo = new ANtpRecoInfo;
00059   fEventInfo = new ANtpEventInfoNC;
00060   fShowerInfo = new ANtpShowerInfoNC;
00061   fTrackInfo = new ANtpTrackInfoNC;
00062   fTruthInfo = new ANtpTruthInfoBeam;
00063   fMRCCInfo = new ANtpEventInfoMRCC;
00064 
00065   fInfo = new NCEventInfo;
00066 
00067 }

MicroDSTMaker::~MicroDSTMaker (  )  [virtual]

Definition at line 70 of file MicroDSTMaker.cxx.

References fBeamInfo, fCuts, fEventInfo, fHeaderInfo, fInfo, fMRCCInfo, fRecoInfo, fShowerInfo, fTrackInfo, fTruthInfo, Msg::kDebug, and MSG.

00071 {
00072 
00073   MSG("JobC", Msg::kDebug) << "MicroDSTMaker::Destructor" << endl;
00074 
00075   // free all the memory allocated dynamically
00076   if (fHeaderInfo) delete fHeaderInfo;
00077   if (fBeamInfo) delete fBeamInfo;
00078   if (fRecoInfo) delete fRecoInfo;
00079   if (fEventInfo) delete fEventInfo;
00080   if (fShowerInfo) delete fShowerInfo;
00081   if (fTruthInfo) delete fTruthInfo;
00082   if (fTrackInfo) delete fTrackInfo;
00083   if (fMRCCInfo) delete fMRCCInfo;
00084   if (fCuts) delete fCuts;
00085 
00086   if (fInfo) delete fInfo;
00087 
00088 }


Member Function Documentation

static void MicroDSTMaker::AddExtraction ( NCExtractionFactory e  )  [inline, static]

Definition at line 86 of file MicroDSTMaker.h.

References MuELoss::e, and GetExtractionFactories().

00086 {GetExtractionFactories().push_back(e);}

void MicroDSTMaker::AddToBeamNtuple (  )  [private]

TTree::Fill() the beam stripped and unstripped ntuples if they're not already too big.

Definition at line 447 of file MicroDSTMaker.cxx.

References fBeamNtuple, fBeamNtupleStp, OutputFileTooBig(), and StrippedOutputFileTooBig().

Referenced by ExtractNCCC().

00448 {
00449   const bool canWriteFull = !OutputFileTooBig();
00450   const bool canWriteStripped = !StrippedOutputFileTooBig();
00451 
00452   if(canWriteFull)
00453     fBeamNtuple->Fill();
00454   if(canWriteStripped)
00455     fBeamNtupleStp->Fill();
00456 }

void MicroDSTMaker::AddToNtuple (  )  [private]

TTree::Fill() the uDST stripped and unstripped ntuples if they're not already too big.

Definition at line 459 of file MicroDSTMaker.cxx.

References fCuts, fNtuple, fRecoInfo, fStrippedNtuple, OutputFileTooBig(), NCAnalysisCuts::PassesFinalSelection(), and StrippedOutputFileTooBig().

Referenced by ExtractNCCC().

00460 {
00461   //fill the appropriate uDST ntuple
00462 
00463   const bool canWriteFull = !OutputFileTooBig();
00464   const bool canWriteStripped = !StrippedOutputFileTooBig();
00465 
00466   if(canWriteFull) fNtuple->Fill();
00467 
00468   if(fCuts->PassesFinalSelection(fRecoInfo) && canWriteStripped)
00469     fStrippedNtuple->Fill();
00470 }

void MicroDSTMaker::Config ( const Registry r  )  [virtual]

Return the actual configuration. If your module directly pulls its configuration from the fConfig Registry, you don't need to override this. Override if you have local config variables.

Reimplemented from JobCModule.

Definition at line 301 of file MicroDSTMaker.cxx.

References fBeamType, fCutSuite, fDataSet, fExtractionsList, fFileCountLimit, fFileName, fFilePath, fRunPeriod, fTreeName, fUseAll185i, fUseAllBeams, fUseAllL010z, fUseMCAsData, Registry::Get(), and BeamType::TagToEnum().

00302 {
00303   int         tmpb;  // a temp bool.
00304   int         tmpi;  // a temp int.
00305   const char* tmps;  // a temp string
00306 
00307   if (r.Get("FileName",         tmps)) fFileName          = tmps;
00308   if (r.Get("TreeName",         tmps)) fTreeName          = tmps;
00309   if (r.Get("FilePath",         tmps)) fFilePath          = tmps;
00310   if (r.Get("UseMCAsData",      tmpb)) fUseMCAsData       = tmpb;
00311   if (r.Get("BeamType",         tmps)) fBeamType          = BeamType::TagToEnum(tmps);
00312   if (r.Get("UseAllBeams",      tmpb)) fUseAllBeams       = tmpb;
00313   if (r.Get("UseAllL010z",      tmpb)) fUseAllL010z       = tmpb;
00314   if (r.Get("UseAll185i",       tmpb)) fUseAll185i        = tmpb;
00315   if (r.Get("ExtractionsList",  tmps)) fExtractionsList   = tmps;
00316   if (r.Get("CutSuite",         tmpi)) fCutSuite          = NCType::ECuts(tmpi);
00317   if (r.Get("FileCountLimit",   tmpi)) fFileCountLimit    = tmpi;
00318   if (r.Get("DataSet",          tmps)){
00319     fDataSet           = tmps;
00320     fDataSet.Remove(TString::kLeading, '/');
00321   }
00322   if (r.Get("RunPeriod",        tmpi)) fRunPeriod         = NC::RunUtil::ERunType(tmpi);
00323 }

void MicroDSTMaker::CountPOTs (  )  [private]

Definition at line 474 of file MicroDSTMaker.cxx.

References ANtpHeaderInfo::detector, fBeamInfo, fDataType, fHeaderInfo, fMCPOTPerSnarlOrSubrun, fPOTs, NCType::kData, Detector::kNear, ANtpBeamInfo::protonIntensity, ANtpHeaderInfo::run, and ANtpHeaderInfo::subRun.

Referenced by ExtractNCCC().

00475 {
00476   int runCode = 100*fHeaderInfo->run + fHeaderInfo->subRun;
00477   map<int, double>::iterator itr=fPOTs.find(runCode);
00478 
00479   if(fDataType==NCType::kData){
00480 
00481     if( itr != fPOTs.end() )
00482       fPOTs[runCode] += fBeamInfo->protonIntensity;
00483     else
00484       fPOTs[runCode] = fBeamInfo->protonIntensity;
00485   }
00486   else{
00487     // For MC... This is a bit funky. In the ND,
00488     // fMCPOTPerSnarlOrSubrun is per snarl, but in the FD it's per
00489     // subrun. 
00490     if(fHeaderInfo->detector == Detector::kNear){
00491       if( itr != fPOTs.end())
00492         fPOTs[runCode] += fMCPOTPerSnarlOrSubrun;
00493       else
00494         fPOTs[runCode] = fMCPOTPerSnarlOrSubrun;
00495     }
00496     else{
00497       // FD. Doesn't matter whether the subrun was already in the map,
00498       // because fMCPOTPerSnarlOrSubrun is set to the POT per subrun
00499       fPOTs[runCode] = fMCPOTPerSnarlOrSubrun;
00500     }
00501   }
00502 }

void MicroDSTMaker::CreateNtupleTree ( TFile *&  file,
TTree *&  tree,
TTree *&  beamTree,
TString  filename,
TString  treename,
bool  truthBranch,
bool  mrccBranch 
) [private]

Create output file and tree with correct branches.

Parameters:
[out] file Set to the file created
[out] tree Set to the tree contained in that file
[out] beamTree Set to the beam tree contained in file
filename The name of the file to create
treename The name to give tree
truthBranch Whether to create a "truth" branch
Creates branches "header", "beam", "reco", "analysis*" and optionally "truth". Also "beam.header" and "beam.beam"

Attaches these branches to the relevent ANtp* member variables.

Definition at line 99 of file MicroDSTMaker.cxx.

References fAnalysisInfos, fBeamInfo, fExtractions, fHeaderInfo, fMRCCInfo, fRecoInfo, fTruthInfo, Msg::kInfo, and MSG.

Referenced by MakeuDST().

00104 {
00105   // save the current directory so as to not attach files to each other
00106   TDirectory* saveDir = gDirectory;
00107 
00108   file = new TFile(filename, "RECREATE");
00109   tree = new TTree("uDST", treename);
00110   tree->Branch("header.", "ANtpHeaderInfo", &fHeaderInfo, 64000, 2);
00111 
00112   if(truthBranch)
00113     tree->Branch("truth.", "ANtpTruthInfoBeam", &fTruthInfo, 64000, 2);
00114 
00115   tree->Branch("beam.", "ANtpBeamInfo", &fBeamInfo, 64000, 2);
00116   tree->Branch("reco.", "ANtpRecoInfo", &fRecoInfo, 64000, 2);
00117 
00118   // Since we pointed the input chain's mrcc branch at fMRCCInfo, this
00119   // line is enough to implement copying the mrcc branch across to the
00120   // output uDST unchanged
00121   if(mrccBranch)
00122     tree->Branch("mrcc.", "ANtpEventInfoMRCC", &fMRCCInfo, 64000, 2);
00123 
00124   for(unsigned int i = 0; i < fExtractions.size(); ++i) {
00125     string branchName = fExtractions[i]->ClassName();
00126     branchName = branchName.erase(0, 12); // this gives the ending,
00127     // "DP", "ADM", etc.
00128     branchName = "analysis" + branchName + ".";
00129 
00130     // add the analysis branches
00131     MSG("MicroDSTMaker", Msg::kInfo)
00132       << "Setting " << branchName << " branch..." << endl;
00133     tree->Branch(branchName.c_str(), "ANtpAnalysisInfo",
00134                  &fAnalysisInfos[i], 64000, 2);
00135   }
00136 
00137   tree->SetDirectory(file);
00138 
00139   beamTree = new TTree("beam", "AnalysisTree");
00140   beamTree->Branch("header.", "ANtpHeaderInfo", &fHeaderInfo, 64000, 2);
00141   beamTree->Branch("beam.", "ANtpBeamInfo", &fBeamInfo, 64000, 2);
00142   beamTree->SetDirectory(file);
00143 
00144   // return to original directory
00145   saveDir->cd();
00146 }

const Registry & MicroDSTMaker::DefaultConfig (  )  const [virtual]

Get the default configuration registry. This should normally be overridden. One useful idiom is to implement it like:

const Registry& MyModule::DefaultConfig() const { static Registry cfg; // never is destroyed if (cfg.Size()) return cfg; // already filled it // set defaults: cfg.Set("TheAnswer",42); cfg.Set("Units","unknown"); return cfg; }

Reimplemented from JobCModule.

Definition at line 270 of file MicroDSTMaker.cxx.

References ReleaseType::k04, NCType::kCCCuts, ReleaseType::kDaikon, ReleaseType::kDogwood, NC::RunUtil::kRunAll, Registry::LockValues(), Registry::Set(), and Registry::UnLockValues().

00271 {
00272   static Registry r;
00273 
00274   r.UnLockValues();
00275 
00276   r.Set("FileName",               "ncccSeparation.root");
00277   r.Set("TreeName",               "antp");
00278   r.Set("FilePath",               "");
00279   r.Set("PDFPath",                "DP_histos_far.root");
00280   r.Set("ReadPDFs",               false);
00281   r.Set("BeamType",               "L010z185i");
00282   r.Set("UseAllBeams",            false);
00283   r.Set("UseAllL010z",            false);
00284   r.Set("UseAll185i",             false);
00285   r.Set("ExtractionsList",        "TOm");
00286   r.Set("RPAnnUseLowETrain",      false);
00287   r.Set("FileCountLimit",         1000000000);
00288   r.Set("DataSet",                "/");
00289   r.Set("CutSuite",               int(NCType::kCCCuts));
00290 
00291   r.Set("MCVersion",              
00292         ReleaseType::kDogwood | ReleaseType::kDaikon | ReleaseType::k04);
00293 
00294   r.Set("RunPeriod",              int(NC::RunUtil::kRunAll));
00295 
00296   r.LockValues();
00297   return r;
00298 }

void MicroDSTMaker::EndJob (  )  [virtual]

Implement for notification of end of job

Reimplemented from JobCModule.

Definition at line 91 of file MicroDSTMaker.cxx.

References JobCModule::GetConfig(), Msg::kInfo, MakeuDST(), MSG, and Registry::Print().

00092 {
00093   MSG("MicroDSTMaker", Msg::kInfo) << "Running with registry:" << endl;
00094   GetConfig().Print();
00095   MakeuDST();
00096 }

void MicroDSTMaker::ExtractNCCC ( TChain *  chain  )  [private]

Loop over chain and produce the uDST tree.

Definition at line 326 of file MicroDSTMaker.cxx.

References AddToBeamNtuple(), AddToNtuple(), NCEventInfo::analysis, NCEventInfo::beam, ANtpBeamInfo::beamType, CountPOTs(), ANtpHeaderInfo::detector, NCEventInfo::event, fAnalysisInfos, fBeamInfo, fBeamType, fCuts, fDataType, fEventInfo, fExtractions, fFileCountLimit, fHeaderInfo, FillRecoInfo(), fInfo, fMCPOTPerSnarlOrSubrun, fRecoInfo, fShowerInfo, fTrackInfo, fTruthInfo, MCInfo::GetMCPoT(), NCEventInfo::header, NCAnalysisCuts::InBeamFiducialVolume(), NCAnalysisCuts::IsGoodBeamEvent(), NCAnalysisCuts::IsGoodBeamSnarl(), NCAnalysisCuts::IsNewSnarl(), NCType::kData, Msg::kFatal, Msg::kInfo, NCType::kMC, ReleaseType::kUnknown, MSG, ANtpBeamInfo::protonIntensity, NCEventInfo::reco, ANtpHeaderInfo::run, NCEventInfo::SetInfoObjects(), NCAnalysisCuts::SetInfoObjects(), NCEventInfo::shower, ANtpHeaderInfo::softVersion, ReleaseType::StringToType(), ANtpHeaderInfo::subRun, ANtpBeamInfo::tr101d, NCEventInfo::track, ANtpBeamInfo::trtgtd, and NCEventInfo::truth.

Referenced by MakeuDST().

00327 {
00328 
00329   MSG("MicroDSTMaker", Msg::kInfo) << "ExtractNCCC" << endl;
00330 
00331   int ctr = 0;
00332   int passSnarl = 0;
00333   int passEvt = 0;
00334   int passFid = 0;
00335   bool passCut1 = false;
00336   bool passCut2 = false;
00337   bool passCut3 = false;
00338   bool newSnarl = false;
00339 
00340   int fileCtr = 0;
00341   int prevRun = -1;
00342   int prevSubRun = -1;
00343 
00344   chain->GetEntry(0);
00345   //Get The proper POT/Snarl value
00346   Detector::Detector_t detType = (Detector::Detector_t)fHeaderInfo->detector;
00347 
00348   if(fDataType==NCType::kMC){
00349     const char* mcString = (fHeaderInfo->softVersion).Data();
00350     ReleaseType::Release_t mcType=ReleaseType::StringToType(mcString);
00351     if (mcType==ReleaseType::kUnknown) {
00352         MSG("MicroDSTMaker",Msg::kFatal)
00353           << "Can't figure out MC version, bailing." << endl;
00354         // Dummy message to make sure it really quits
00355         MSG("MicroDSTMaker",Msg::kFatal)
00356           << "Goodbye" << endl;
00357     }
00358 
00359     fMCPOTPerSnarlOrSubrun = MCInfo::GetMCPoT(detType,fBeamType,mcType);
00360     MSG("MicroDSTMaker",Msg::kInfo) << "MC POT per snarl: "
00361                                        << fMCPOTPerSnarlOrSubrun << endl;
00362   }
00363 
00364   //loop over the entries in the tree
00365   while( chain->GetEntry(ctr) && fileCtr<fFileCountLimit){
00366     if(ctr % 20000 == 0)
00367       MSG("MicroDSTMaker", Msg::kInfo)
00368         << "entry " << ctr << " file " << fileCtr << endl;
00369 
00370     ++ctr;
00371 
00372     if(fHeaderInfo->run != prevRun || fHeaderInfo->subRun != prevSubRun){
00373       prevRun = fHeaderInfo->run;
00374       prevSubRun = fHeaderInfo->subRun;
00375       ++fileCtr;
00376     }
00377 
00378     if(fDataType==NCType::kData){
00379       fTruthInfo = 0;
00380       fBeamInfo->protonIntensity = fBeamInfo->trtgtd;
00381       if(fBeamInfo->protonIntensity <= 0.0) 
00382         fBeamInfo->protonIntensity = fBeamInfo->tr101d;
00383       if(fBeamInfo->protonIntensity <= 0.0) 
00384         fBeamInfo->protonIntensity = 0.;
00385     }
00386     else if(fDataType==NCType::kMC){
00387       //make sure the mc beam type is the correct one
00388       fBeamInfo->beamType = (Int_t)(fBeamType);
00389       fBeamInfo->protonIntensity = fMCPOTPerSnarlOrSubrun;
00390     }
00391     else{
00392       assert(0 && "Data Type neither MC or data. Bailing.");
00393     }
00394 
00395     //set the info objects to use
00396     fCuts->SetInfoObjects(fHeaderInfo, fBeamInfo, fEventInfo,
00397                           fTrackInfo, fShowerInfo, fTruthInfo);
00398     fInfo->SetInfoObjects(fHeaderInfo, fBeamInfo, fEventInfo,
00399                            fTrackInfo, fShowerInfo, 0, 0, fTruthInfo);
00400 
00401     newSnarl = fCuts->IsNewSnarl();
00402 
00403     if (passCut1 = (fCuts->IsGoodBeamSnarl()) ) passSnarl++;
00404     if (passCut2 = (fCuts->IsGoodBeamEvent() && passCut1) ) passEvt++;
00405     if (passCut3 = (fCuts->InBeamFiducialVolume() && passCut2)) passFid++;
00406 
00407     if( newSnarl && passCut1 ){
00408       CountPOTs();
00409       AddToBeamNtuple();
00410     }
00411 
00412     if (!passCut2) continue;
00413 
00414     FillRecoInfo(fRecoInfo, fHeaderInfo,
00415                  fEventInfo, fShowerInfo,
00416                  fTrackInfo, fBeamInfo, fCuts,
00417                  fBeamInfo->beamType);
00418 
00419     NCEventInfo evtInfo;
00420     evtInfo.beam=fBeamInfo;
00421     evtInfo.event=fEventInfo;
00422     evtInfo.header=fHeaderInfo;
00423     evtInfo.reco=fRecoInfo;
00424     evtInfo.shower=fShowerInfo;
00425     evtInfo.track=fTrackInfo;
00426     evtInfo.truth=fTruthInfo;
00427     
00428 
00429     for (unsigned int i = 0; i < fExtractions.size(); ++i){
00430       evtInfo.analysis=fAnalysisInfos[i];
00431       NCExtraction* ext=fExtractions[i];
00432       ext->FillAnalysisInfo(evtInfo, fBeamInfo->beamType);
00433     }
00434     AddToNtuple();
00435 
00436   }//end loop over chain
00437 
00438   // print some details about cuts
00439   MSG("MicroDSTMaker", Msg::kInfo)
00440     << passSnarl << "/" << ctr << " passed IsGoodBeamSnarl()\n"
00441     << passEvt << "/" << passSnarl << " passed IsGoodBeamEvent()\n"
00442     << passFid << "/" << passEvt << " passed fiducial cuts"
00443     << endl;
00444 }

void MicroDSTMaker::FillExtractionAndAnalysisVectors (  )  [private]

Populate the list of extractions and their associated analysis infos.

Definition at line 250 of file MicroDSTMaker.cxx.

References ANtpHeaderInfo::dataType, fAnalysisInfos, fExtractions, fExtractionsList, fHeaderInfo, Msg::kInfo, MSG, and ParseExtractionsList().

Referenced by MakeuDST().

00251 {
00252   MSG("MicroDSTMaker", Msg::kInfo) << "SimFlag =  "
00253                                    << fHeaderInfo->dataType << endl;
00254 
00255   fExtractions.clear();
00256   ParseExtractionsList(fExtractionsList);
00257 
00258   //fill the vector of analysis info objects (one per extraction)
00259   MSG("MicroDSTMaker", Msg::kInfo)
00260     << "Using " << fExtractions.size() << " extraction  methods."
00261     << " Now adding the corresponding ANtpAnalysisInfo objects..."
00262     << endl;
00263   
00264   fAnalysisInfos.clear();
00265   for (unsigned int i = 0; i < fExtractions.size(); ++i)
00266     fAnalysisInfos.push_back(new ANtpAnalysisInfo);
00267 }

void MicroDSTMaker::FillRecoInfo ( ANtpRecoInfo recoInfo,
ANtpHeaderInfo headerInfo,
ANtpEventInfoNC eventInfo,
ANtpShowerInfoNC showerInfo,
ANtpTrackInfoNC trackInfo,
ANtpBeamInfo beamInfo,
NCAnalysisCuts cuts,
int  targetPos 
) [private]

Fill the ANtpRecoInfo object based on the other info objects.

Definition at line 563 of file MicroDSTMaker.cxx.

References ANtpEventInfoNC::closeTimeDeltaZ, ANtpRecoInfo::closeTimeDeltaZ, ANtpEventInfoNC::closeTimeEvent, ANtpRecoInfo::closeTimeEvent, ANtpEventInfoNC::consecutivePlanes, ANtpRecoInfo::consecutivePlanes, ANtpEventInfoNC::contPlaneCount, ANtpRecoInfo::contPlaneCount, ANtpEventInfoNC::contPlaneCount050, ANtpRecoInfo::contPlaneCount050, EnergyCorrections::CorrectMomentumFromRange(), EnergyCorrections::CorrectSignedMomentumFromCurvature(), ANtpTrackInfo::dcosZVtx, ANtpRecoInfo::deltaTimeSpill, ANtpHeaderInfo::detector, MuELoss::e, ANtpEventInfoNC::edgeActivityPH, ANtpRecoInfo::edgeActivityPH, ANtpEventInfoNC::edgeActivityStrips, ANtpRecoInfo::edgeActivityStrips, ANtpEventInfo::energyGeV, ANtpRecoInfo::eventInSnarl, ANtpRecoInfo::eventLength, ANtpRecoInfo::evtEnergyGeV, ANtpEventInfoNC::evtTimeDiff, ANtpRecoInfo::evtTimeDiff, fDataType, NCEventInfo::FindMEGAFitWeight(), fInfo, ANtpTrackInfo::fitMomentum, fRunPeriod, NCEventInfo::GetEventEnergy(), NCEventInfo::GetEventVertex(), NCEventInfo::GetShowerEnergy(), NCEventInfo::GetTrackEnergy(), ANtpRecoInfo::hadronicY, NCAnalysisCuts::InBeamFiducialVolume(), ANtpEventInfo::index, ANtpRecoInfo::inFiducialVolume, NCAnalysisCuts::IsCleanLowMultSnarl(), ANtpRecoInfo::isCleanLowMultSnarl, ANtpRecoInfo::isFullyContained, NCAnalysisCuts::IsGoodShower(), ANtpRecoInfo::isGoodShower, NCAnalysisCuts::IsMultiCutsClean(), ANtpRecoInfo::isMultiCutsClean, NCAnalysisCuts::IsSimpleCutsClean(), ANtpRecoInfo::isSimpleCutsClean, NCAnalysisCuts::IsStoppingBeamMuon(), CandShowerHandle::kCC, NCType::kData, Detector::kFar, NCType::kMC, CandShowerHandle::kNC, Detector::kNear, ANtpTrackInfo::length, ANtpEventInfoNC::lengthInPlanes, ANtpEventInfoNC::maxConsecutivePlanes, ANtpRecoInfo::maxConsecutivePlanes, ANtpEventInfoNC::minTimeSeparation, ANtpRecoInfo::minTimeSeparation, ANtpRecoInfo::muDCosZVtx, ANtpRecoInfo::muEnergy, ANtpBeamInfo::nearestNSToSpill, ANtpRecoInfo::nuEnergy, ANtpRecoInfo::nuEnergyCC, ANtpRecoInfo::nuEnergyNC, ANtpRecoInfo::numberTracks, ANtpEventInfoNC::oppEdgePH, ANtpRecoInfo::oppEdgePH, ANtpEventInfoNC::oppEdgeStrips, ANtpRecoInfo::oppEdgeStrips, ANtpRecoInfo::pass, ANtpRecoInfo::passesCuts, ANtpShowerInfo::planes, ANtpTrackInfo::planes, ANtpEventInfo::planes, ANtpRecoInfo::planes, ANtpTrackInfo::rangeMomentum, ANtpRecoInfo::Reset(), ANtpRecoInfo::runPeriod, ANtpEventInfoNC::sharedStripFraction, ANtpRecoInfo::sharedStripFraction, ANtpRecoInfo::showerEnergy, ANtpRecoInfo::showerEnergyCC, ANtpRecoInfo::showerEnergyNC, ANtpRecoInfo::showerPlanes, ANtpEventInfo::showers, ANtpRecoInfo::showerTotalStrips, ANtpTrackInfo::sigmaQoverP, ANtpRecoInfo::sigmaQoverP, ANtpEventInfoNC::slicePHFraction, ANtpRecoInfo::slicePHFraction, ANtpEventInfoNC::stripTime1st, ANtpShowerInfo::totalStrips, ANtpEventInfo::totalStrips, ANtpRecoInfo::totalStrips, ANtpEventInfoNC::trackExtension, ANtpRecoInfo::trackExtension, ANtpRecoInfo::trackLength, ANtpRecoInfo::trackMomentum, ANtpRecoInfo::trackPlanes, ANtpRecoInfo::trackRange, ANtpEventInfo::tracks, ANtpRecoInfo::vtxR, ANtpRecoInfo::vtxX, ANtpRecoInfo::vtxY, ANtpRecoInfo::vtxZ, and ANtpRecoInfo::weight.

Referenced by ExtractNCCC().

00571 {
00572   //reset the values
00573   recoInfo->Reset();
00574 
00575   // This leaves the run period set at ANtpDefVal::kInt for data
00576   if(fDataType==NCType::kMC) recoInfo->runPeriod = (int)fRunPeriod;
00577 
00578   recoInfo->inFiducialVolume = (int)cuts->InBeamFiducialVolume();
00579   recoInfo->isFullyContained = (int)(cuts->InBeamFiducialVolume() &&
00580                                      cuts->IsStoppingBeamMuon());
00581 
00582   recoInfo->passesCuts = 1;
00583   recoInfo->pass = 1;
00584 
00585   //GetEventEnergy returns sum of track and shower energy - NC events
00586   //dont count the track energy so just make the reco'd nu energy
00587   //for NC events the shower energy only
00588   const bool stop = cuts->IsStoppingBeamMuon();
00589   recoInfo->nuEnergyCC = fInfo->GetEventEnergy(CandShowerHandle::kCC, stop);
00590   recoInfo->nuEnergyNC = fInfo->GetShowerEnergy(CandShowerHandle::kNC);
00591   recoInfo->nuEnergy   = fInfo->GetEventEnergy(CandShowerHandle::kCC, stop);
00592 
00593   if(eventInfo->tracks > 0)
00594     recoInfo->muEnergy = fInfo->GetTrackEnergy(stop);
00595   else
00596     recoInfo->muEnergy = 0.;
00597 
00598   if(eventInfo->showers > 0){
00599     recoInfo->showerEnergy = fInfo->GetShowerEnergy(CandShowerHandle::kCC);
00600     recoInfo->showerEnergyCC = fInfo->GetShowerEnergy(CandShowerHandle::kCC);
00601     recoInfo->showerEnergyNC = fInfo->GetShowerEnergy(CandShowerHandle::kNC);
00602   }
00603   else{
00604     recoInfo->showerEnergy = 0.;
00605     recoInfo->showerEnergyCC = 0.;
00606     recoInfo->showerEnergyNC = 0.;
00607   }
00608 
00609   //check that this is a reasonable shower
00610   recoInfo->isGoodShower = (int)cuts->IsGoodShower();
00611 
00612 
00613   if(recoInfo->nuEnergy > 0.){
00614     recoInfo->hadronicY = recoInfo->showerEnergy;
00615     recoInfo->hadronicY /= recoInfo->nuEnergy;
00616   }
00617 
00618   recoInfo->muDCosZVtx = trackInfo->dcosZVtx;
00619   double vtxX = 0., vtxY = 0., vtxZ = 0.;
00620   recoInfo->vtxR = fInfo->GetEventVertex(vtxX, vtxY, vtxZ);
00621   recoInfo->vtxX = vtxX;
00622   recoInfo->vtxY = vtxY;
00623   recoInfo->vtxZ = vtxZ;
00624   recoInfo->eventLength = eventInfo->lengthInPlanes;
00625   recoInfo->trackExtension = eventInfo->trackExtension;
00626   recoInfo->numberTracks = eventInfo->tracks;
00627   recoInfo->trackLength = trackInfo->length;
00628 
00629   bool isdata = fDataType==NCType::kData;
00630   Detector::Detector_t detType = (Detector::Detector_t)headerInfo->detector;
00631 
00632   recoInfo->trackMomentum = CorrectSignedMomentumFromCurvature(trackInfo->fitMomentum,
00633                                                                isdata, detType );
00634 
00635   //RPL 17/08/04: protect against passing -ive momenta to correction fn
00636   if( 0 < trackInfo->rangeMomentum ){
00637     recoInfo->trackRange = CorrectMomentumFromRange(trackInfo->rangeMomentum,
00638                                                     isdata, detType);
00639   }
00640   else{
00641     recoInfo->trackRange = trackInfo->rangeMomentum;
00642   }
00643 
00644   recoInfo->sigmaQoverP = trackInfo->sigmaQoverP;
00645   recoInfo->eventInSnarl = eventInfo->index;
00646 
00647   recoInfo->weight = 1.0;
00648   // calculate the MEGA weight for MC events
00649   if(fDataType==NCType::kMC){
00650     // if the second argument is false, it uses the mock data weight
00651     // if it is true, it uses the weight from the best fit to the data
00652     //here find which run it is
00653     recoInfo->weight = fInfo->FindMEGAFitWeight(beamType,fRunPeriod);
00654   }
00655 
00656   // data cleaning variables
00657   recoInfo->minTimeSeparation = eventInfo->minTimeSeparation;
00658   recoInfo->closeTimeEvent = eventInfo->closeTimeEvent;
00659 
00660   recoInfo->totalStrips = eventInfo->totalStrips;
00661   recoInfo->planes = eventInfo->planes;
00662   recoInfo->trackPlanes = trackInfo->planes;
00663   recoInfo->showerPlanes = showerInfo->planes;
00664   recoInfo->showerTotalStrips = showerInfo->totalStrips;
00665   recoInfo->evtEnergyGeV = eventInfo->energyGeV;
00666 
00667   if(detType == Detector::kNear){
00668     recoInfo->closeTimeDeltaZ = eventInfo->closeTimeDeltaZ;
00669     recoInfo->edgeActivityPH = eventInfo->edgeActivityPH;
00670     recoInfo->edgeActivityStrips = eventInfo->edgeActivityStrips;
00671     recoInfo->oppEdgePH = eventInfo->oppEdgePH;
00672     recoInfo->oppEdgeStrips = eventInfo->oppEdgeStrips;
00673     recoInfo->slicePHFraction = eventInfo->slicePHFraction;
00674     recoInfo->evtTimeDiff = eventInfo->evtTimeDiff;
00675     recoInfo->sharedStripFraction = eventInfo->sharedStripFraction;
00676     recoInfo->isCleanLowMultSnarl = int(cuts->IsCleanLowMultSnarl());
00677     recoInfo->isMultiCutsClean = int(cuts->IsMultiCutsClean());
00678     recoInfo->isSimpleCutsClean = int(cuts->IsSimpleCutsClean());
00679     recoInfo->consecutivePlanes = eventInfo->consecutivePlanes;
00680     recoInfo->maxConsecutivePlanes = eventInfo->maxConsecutivePlanes;
00681     recoInfo->contPlaneCount =  eventInfo->contPlaneCount;
00682     recoInfo->contPlaneCount050 = eventInfo->contPlaneCount050;
00683   }
00684 
00685   // Cutting on the cleaning is common in analysis macros.
00686   // Considering FD events to always be clean simplifies that code.
00687   if(detType == Detector::kFar){
00688     recoInfo->isSimpleCutsClean = 1;
00689     recoInfo->isMultiCutsClean = 1;
00690   }
00691 
00692   recoInfo->deltaTimeSpill = (eventInfo->stripTime1st - 
00693                               1e-9*beamInfo->nearestNSToSpill)*1e6;//in us
00694 }

static std::vector<NCExtractionFactory*>& MicroDSTMaker::GetExtractionFactories (  )  [inline, static, private]

The various extractions that have registered themselves.

Definition at line 90 of file MicroDSTMaker.h.

Referenced by AddExtraction(), and ParseExtractionsList().

00091   {
00092     // This can't just be a member variable because of the
00093     // "static initialization order fiasco"
00094     static std::vector<NCExtractionFactory*> facts;
00095     return facts;
00096   };

double MicroDSTMaker::GetTotalPOTCount (  )  [private]

Return sum(fPOTs).

Definition at line 529 of file MicroDSTMaker.cxx.

References fPOTs.

00530 {
00531   double ret = 0;
00532   for(map<int, double>::iterator it = fPOTs.begin(); 
00533       it != fPOTs.end(); ++it) ret += it->second;
00534   return ret;
00535 }

void MicroDSTMaker::MakeuDST (  )  [private]

Definition at line 149 of file MicroDSTMaker.cxx.

References CreateNtupleTree(), ExtractNCCC(), fBeamInfo, fBeamNtuple, fBeamNtupleStp, fBeamType, fCuts, fCutSuite, fDataType, fEventInfo, fFileName, fFilePath, fHeaderInfo, FillExtractionAndAnalysisVectors(), fInfo, fMRCCInfo, fNtpFile, fNtuple, fPOTs, fShowerInfo, fStrippedNtpFile, fStrippedNtuple, fTrackInfo, fTreeName, fTruthInfo, fUseAll185i, fUseAllBeams, fUseAllL010z, NCType::kCCCuts, NCType::kData, Msg::kFatal, Msg::kInfo, NC::RunUtil::kMaxRun, NCType::kMC, NCType::kNCCCFidCuts, NCType::kNCCuts, MSG, NCAnalysisCuts::SetBeamType(), NCEventInfo::SetInfoObjects(), NCAnalysisCuts::SetInfoObjects(), NCAnalysisCuts::SetUseAll185i(), NCAnalysisCuts::SetUseAllBeams(), NCAnalysisCuts::SetUseAllL010z(), and WriteFile().

Referenced by EndJob().

00150 {
00151   //make the chain for the data you want to use
00152   TChain chain(fTreeName);
00153 
00154   chain.Add(fFilePath);
00155 
00156   fDataType=chain.FindBranch("truth.") ? NCType::kMC : NCType::kData;
00157 
00158   bool haveMRCCBranch=chain.FindBranch("mrcc.");
00159 
00160   MSG("MicroDSTMaker", Msg::kInfo) << "adding path " << fFilePath
00161                                       << " to chain." << endl;
00162 
00163   // Need to set run period for MC. We're using kRunAll as the "unknown" value
00164   if(fDataType==NCType::kMC && 
00165      (fRunPeriod<NC::RunUtil::kRunI || fRunPeriod>NC::RunUtil::kMaxRun)){
00166     MSG("MicroDSTMaker", Msg::kFatal) 
00167       << "Run Period not set, or set wrongly, when running on MC. Bailing" << endl;
00168     // Dummy to make it exit here
00169     MSG("MicroDSTMaker", Msg::kInfo)  << endl;
00170   }
00171 
00172   chain.SetBranchAddress("header.", &fHeaderInfo);
00173   chain.SetBranchAddress("beam.",   &fBeamInfo);
00174   chain.SetBranchAddress("event.",  &fEventInfo);
00175   chain.SetBranchAddress("shower.", &fShowerInfo);
00176   chain.SetBranchAddress("track.",  &fTrackInfo);
00177 
00178   if(fDataType==NCType::kMC) chain.SetBranchAddress("truth.",  &fTruthInfo);
00179   if(haveMRCCBranch)         chain.SetBranchAddress("mrcc.",  &fMRCCInfo);
00180 
00181   chain.GetEntry(0);
00182 
00183   //figure out which kind of cuts object to use
00184   MSG("MicroDSTMaker", Msg::kInfo) << "fCutSuite = " << fCutSuite << endl;
00185   switch(fCutSuite){
00186   case NCType::kCCCuts:      fCuts = new NCAnalysisCutsCC;      break;
00187   case NCType::kNCCuts:      fCuts = new NCAnalysisCutsNC;      break;
00188   case NCType::kNCCCFidCuts: fCuts = new NCAnalysisCutsNCCCFid; break;
00189   default: assert(0 && "Unknown cut suite");
00190   }
00191 
00192   fCuts->SetInfoObjects(fHeaderInfo, fBeamInfo, fEventInfo,
00193                         fTrackInfo, fShowerInfo, fTruthInfo);
00194   fInfo->SetInfoObjects(fHeaderInfo, fBeamInfo, fEventInfo,
00195                         fTrackInfo, fShowerInfo, 0, 0, fTruthInfo);
00196 
00197   // beam type from the BeamAna stuff
00198   fCuts->SetBeamType(fBeamType);
00199 
00200   //check if should be using all L010z or 185i data
00201   fCuts->SetUseAllBeams(fUseAllBeams);
00202   fCuts->SetUseAllL010z(fUseAllL010z);
00203   fCuts->SetUseAll185i(fUseAll185i);
00204 
00205   //fill the vectors holding the extraction and analysis objects
00206   FillExtractionAndAnalysisVectors();
00207 
00208   //make a file and the trees to go into the file
00209   TString fileName = fFileName;
00210 
00211   //indicate you have a stripped file
00212   TString stripFileName = fileName;
00213   int pos = stripFileName.Index(".root");
00214   stripFileName.Insert(pos, "_strip");
00215 
00216   CreateNtupleTree(fStrippedNtpFile, fStrippedNtuple, fBeamNtupleStp,
00217                    stripFileName, "Stripped AnalysisTree", fDataType==NCType::kMC,
00218                    haveMRCCBranch);
00219 
00220   CreateNtupleTree(fNtpFile, fNtuple, fBeamNtuple,
00221                    fileName, "AnalysisTree", fDataType==NCType::kMC,
00222                    haveMRCCBranch);
00223 
00224   MSG("MicroDSTMaker", Msg::kInfo) << "filenames " << fileName
00225                                       << " " << stripFileName << endl;
00226 
00227   //clear the data POT map
00228   fPOTs.clear();
00229 
00230   // Loop over the input chain and actually do the extraction
00231   ExtractNCCC(&chain);
00232 
00233   WriteFile(fNtpFile, fNtuple, fBeamNtuple);
00234   WriteFile(fStrippedNtpFile, fStrippedNtuple, fBeamNtupleStp);
00235 
00236   const int ntupleEntries = fNtuple->GetEntries();
00237 
00238   //check to see if there was anything in the ntuples,
00239   //if not remove the file from the system
00240   if(ntupleEntries < 1){
00241     TSystemFile ntp(fileName, "./");
00242     TSystemFile strip(stripFileName, "./");
00243 
00244     ntp.Delete();
00245     strip.Delete();
00246   }
00247 }

bool MicroDSTMaker::OutputFileTooBig (  )  [private]

Does fNtpFile exceed 1.8Gb?

Definition at line 724 of file MicroDSTMaker.cxx.

References fNtpFile, Msg::kWarning, and MAXMSG.

Referenced by AddToBeamNtuple(), and AddToNtuple().

00725 {
00726   //keep filling the ntuple if the total file size < 1.8 Gb
00727   if(fNtpFile->GetSize() < 1850400000)
00728     return false;
00729   else{
00730     MAXMSG("MicroDSTMaker", Msg::kWarning,1)
00731       << "Size limit exceeded no longer filling full ntuple" << endl;
00732     return true;
00733   }
00734 }

void MicroDSTMaker::ParseExtractionsList ( TString  extractions  )  [private]

Takes a space separated string of NCExtraction code names and adds the relevant objects to fExtractions

Definition at line 697 of file MicroDSTMaker.cxx.

References fCuts, fExtractions, JobCModule::GetConfig(), GetExtractionFactories(), Msg::kInfo, MSG, and NC::Utility::ParseStringList().

Referenced by FillExtractionAndAnalysisVectors().

00698 {
00699   MSG("MicroDSTMaker", Msg::kInfo) << "Registered extractions:\n";
00700 
00701   const vector<TString> extrsArgNames = NC::Utility::ParseStringList(extrs);
00702 
00703   for(unsigned int n = 0; n < GetExtractionFactories().size(); ++n){
00704     NCExtractionFactory* ex = GetExtractionFactories()[n];
00705     const TString codeName = ex->GetCodeName();
00706 
00707     MSG("MicroDSTMaker", Msg::kInfo) << "  " << codeName << " - ";
00708 
00709     bool inExtrs = false;
00710     for(unsigned int i = 0; i < extrsArgNames.size(); ++i)
00711       if(extrsArgNames[i] == codeName) inExtrs = true;
00712 
00713     if(inExtrs){
00714       MSG("MicroDSTMaker", Msg::kInfo) << "Creating\n";
00715       fExtractions.push_back(ex->Create(fCuts, GetConfig()));
00716     }
00717     else{
00718       MSG("MicroDSTMaker", Msg::kInfo) << "Not in ExtractionsList\n";
00719     }
00720   }
00721 }

bool MicroDSTMaker::StrippedOutputFileTooBig (  )  [private]

Does fStrippedNtpFile exceed 1.8Gb?

Definition at line 737 of file MicroDSTMaker.cxx.

References fStrippedNtpFile, Msg::kWarning, and MAXMSG.

Referenced by AddToBeamNtuple(), and AddToNtuple().

00738 {
00739   //keep filling the ntuple if the total file size < 1.8 Gb
00740   if(fStrippedNtpFile->GetSize() < 1850400000)
00741     return false;
00742   else{
00743     MAXMSG("MicroDSTMaker", Msg::kWarning,1)
00744       << "Size limit exceeded no longer filling stripped ntuple" << endl;
00745     return true;
00746   }
00747 }

void MicroDSTMaker::WriteFile ( TFile *  tf,
TTree *  events,
TTree *  beam 
) [private]

Write the beam and events trees into the tf file.

Definition at line 538 of file MicroDSTMaker.cxx.

References Msg::kInfo, MSG, and WritePOTInfo().

Referenced by MakeuDST().

00539 {
00540 
00541   // get a pointer to the current directory
00542   // this is one of the output files
00543   TDirectory* saveDir = gDirectory;
00544 
00545   file->cd();
00546 
00547   events->Write();
00548   beam->Write();
00549   WritePOTInfo();
00550 
00551   file->cd();
00552 
00553   file->Write("",TObject::kOverwrite);
00554 
00555   MSG("MicroDSTMaker", Msg::kInfo) << "file " << file->GetName()
00556                                       << " written" << endl;
00557   //file->Close();
00558 
00559   saveDir->cd();
00560 }

void MicroDSTMaker::WritePOTInfo (  )  [private]

Definition at line 505 of file MicroDSTMaker.cxx.

References fDataType, fPOTs, NCType::kData, Msg::kInfo, and MSG.

Referenced by WriteFile().

00506 {
00507   if(fPOTs.size() != 0){
00508     int firstRun = fPOTs.begin()->first;
00509     //last run is given by the first entry in the reversed map
00510     int lastRun = fPOTs.rbegin()->first;
00511     TH1F *potHist = new TH1F(fDataType==NCType::kData ? "dataPOT" : "mcPOT", 
00512                              "", 
00513                              lastRun-firstRun+1,
00514                              firstRun, 
00515                              lastRun+1);
00516     map<int, double>::iterator itr = fPOTs.begin();
00517     while( itr != fPOTs.end() ){
00518       potHist->Fill(itr->first + 0.5, itr->second);
00519       ++itr;
00520     }
00521     potHist->Write();
00522     MSG("MicroDSTMaker", Msg::kInfo) << "total POT = "
00523                                         << potHist->Integral()
00524                                         << " x 10^{12}" << endl;
00525   }
00526 }


Member Data Documentation

std::vector<ANtpAnalysisInfo *> MicroDSTMaker::fAnalysisInfos [private]

The associated analysis info objects for the extractions.

Definition at line 196 of file MicroDSTMaker.h.

Referenced by CreateNtupleTree(), ExtractNCCC(), and FillExtractionAndAnalysisVectors().

ANtpBeamInfo* MicroDSTMaker::fBeamInfo [private]

Definition at line 187 of file MicroDSTMaker.h.

Referenced by CountPOTs(), CreateNtupleTree(), ExtractNCCC(), MakeuDST(), MicroDSTMaker(), and ~MicroDSTMaker().

TTree* MicroDSTMaker::fBeamNtuple [private]

ntuple for each spill to keep beam info

Definition at line 165 of file MicroDSTMaker.h.

Referenced by AddToBeamNtuple(), and MakeuDST().

TTree* MicroDSTMaker::fBeamNtupleStp [private]

ntuple for each spill to keep beam info

Definition at line 166 of file MicroDSTMaker.h.

Referenced by AddToBeamNtuple(), and MakeuDST().

BeamType::BeamType_t MicroDSTMaker::fBeamType [private]

beam - see Conventions/BeamType.h

Definition at line 172 of file MicroDSTMaker.h.

Referenced by Config(), ExtractNCCC(), and MakeuDST().

NCAnalysisCuts* MicroDSTMaker::fCuts [private]

Definition at line 197 of file MicroDSTMaker.h.

Referenced by AddToNtuple(), ExtractNCCC(), MakeuDST(), ParseExtractionsList(), and ~MicroDSTMaker().

NCType::ECuts MicroDSTMaker::fCutSuite [private]

which cuts to use - see NCType.h

Definition at line 176 of file MicroDSTMaker.h.

Referenced by Config(), and MakeuDST().

TString MicroDSTMaker::fDataSet [private]

data set to use in the fDataPath, year-month or mc

Definition at line 161 of file MicroDSTMaker.h.

Referenced by Config().

NCType::EDataMC MicroDSTMaker::fDataType [private]

Are we running on data or MC?

Definition at line 163 of file MicroDSTMaker.h.

Referenced by CountPOTs(), ExtractNCCC(), FillRecoInfo(), MakeuDST(), and WritePOTInfo().

ANtpEventInfoNC* MicroDSTMaker::fEventInfo [private]

Definition at line 184 of file MicroDSTMaker.h.

Referenced by ExtractNCCC(), MakeuDST(), MicroDSTMaker(), and ~MicroDSTMaker().

std::vector<NCExtraction *> MicroDSTMaker::fExtractions [private]

The extractions that we'll be using.

Definition at line 194 of file MicroDSTMaker.h.

Referenced by CreateNtupleTree(), ExtractNCCC(), FillExtractionAndAnalysisVectors(), and ParseExtractionsList().

TString MicroDSTMaker::fExtractionsList [private]

Definition at line 181 of file MicroDSTMaker.h.

Referenced by Config(), and FillExtractionAndAnalysisVectors().

int MicroDSTMaker::fFileCountLimit [private]

maximum number of files to process from all trees

Definition at line 180 of file MicroDSTMaker.h.

Referenced by Config(), and ExtractNCCC().

TString MicroDSTMaker::fFileName [private]

name of file holding output from extractions

Definition at line 158 of file MicroDSTMaker.h.

Referenced by Config(), and MakeuDST().

TString MicroDSTMaker::fFilePath [private]

path to AnalysisNtuples

Definition at line 160 of file MicroDSTMaker.h.

Referenced by Config(), and MakeuDST().

ANtpHeaderInfo* MicroDSTMaker::fHeaderInfo [private]

Definition at line 186 of file MicroDSTMaker.h.

Referenced by CountPOTs(), CreateNtupleTree(), ExtractNCCC(), FillExtractionAndAnalysisVectors(), MakeuDST(), MicroDSTMaker(), and ~MicroDSTMaker().

NCEventInfo* MicroDSTMaker::fInfo [private]

Definition at line 198 of file MicroDSTMaker.h.

Referenced by ExtractNCCC(), FillRecoInfo(), MakeuDST(), MicroDSTMaker(), and ~MicroDSTMaker().

TTree* MicroDSTMaker::fMCNtuple [private]

ntuple for uDST of MC events

Definition at line 168 of file MicroDSTMaker.h.

double MicroDSTMaker::fMCPOTPerSnarlOrSubrun [private]

MC POT in units of 1e12 POT, per snarl for ND or per subrun for FD.

Definition at line 179 of file MicroDSTMaker.h.

Referenced by CountPOTs(), and ExtractNCCC().

ANtpEventInfoMRCC* MicroDSTMaker::fMRCCInfo [private]

Definition at line 185 of file MicroDSTMaker.h.

Referenced by CreateNtupleTree(), MakeuDST(), MicroDSTMaker(), and ~MicroDSTMaker().

TFile* MicroDSTMaker::fNtpFile [private]

file holding output from extractions

Definition at line 164 of file MicroDSTMaker.h.

Referenced by MakeuDST(), and OutputFileTooBig().

TTree* MicroDSTMaker::fNtuple [private]

ntuple for uDST of data events

Definition at line 167 of file MicroDSTMaker.h.

Referenced by AddToNtuple(), and MakeuDST().

std::map<int, double> MicroDSTMaker::fPOTs [private]

Map from run/subrun to pots in the run/subrun.

Definition at line 203 of file MicroDSTMaker.h.

Referenced by CountPOTs(), GetTotalPOTCount(), MakeuDST(), and WritePOTInfo().

ANtpRecoInfo* MicroDSTMaker::fRecoInfo [private]

Definition at line 191 of file MicroDSTMaker.h.

Referenced by AddToNtuple(), CreateNtupleTree(), ExtractNCCC(), MicroDSTMaker(), and ~MicroDSTMaker().

NC::RunUtil::ERunType MicroDSTMaker::fRunPeriod [private]

Definition at line 201 of file MicroDSTMaker.h.

Referenced by Config(), and FillRecoInfo().

ANtpShowerInfoNC* MicroDSTMaker::fShowerInfo [private]

Definition at line 188 of file MicroDSTMaker.h.

Referenced by ExtractNCCC(), MakeuDST(), MicroDSTMaker(), and ~MicroDSTMaker().

TTree* MicroDSTMaker::fStrippedMCNtuple [private]

ntuple for uDST of MC events

Definition at line 171 of file MicroDSTMaker.h.

TFile* MicroDSTMaker::fStrippedNtpFile [private]

file holding output from extractions

Definition at line 169 of file MicroDSTMaker.h.

Referenced by MakeuDST(), and StrippedOutputFileTooBig().

TTree* MicroDSTMaker::fStrippedNtuple [private]

ntuple for uDST of data events

Definition at line 170 of file MicroDSTMaker.h.

Referenced by AddToNtuple(), and MakeuDST().

ANtpTrackInfoNC* MicroDSTMaker::fTrackInfo [private]

Definition at line 189 of file MicroDSTMaker.h.

Referenced by ExtractNCCC(), MakeuDST(), MicroDSTMaker(), and ~MicroDSTMaker().

TString MicroDSTMaker::fTreeName [private]

name of AnalysisNtuples trees (data and mc)

Definition at line 159 of file MicroDSTMaker.h.

Referenced by Config(), and MakeuDST().

ANtpTruthInfoBeam* MicroDSTMaker::fTruthInfo [private]

Definition at line 190 of file MicroDSTMaker.h.

Referenced by CreateNtupleTree(), ExtractNCCC(), MakeuDST(), MicroDSTMaker(), and ~MicroDSTMaker().

bool MicroDSTMaker::fUseAll185i [private]

flag to use all data with horn current = -185 kA

Definition at line 175 of file MicroDSTMaker.h.

Referenced by Config(), and MakeuDST().

bool MicroDSTMaker::fUseAllBeams [private]

flag to use all beam configurations

Definition at line 173 of file MicroDSTMaker.h.

Referenced by Config(), and MakeuDST().

bool MicroDSTMaker::fUseAllL010z [private]

flag to use all data in the LE-10 configuration

Definition at line 174 of file MicroDSTMaker.h.

Referenced by Config(), and MakeuDST().

bool MicroDSTMaker::fUseMCAsData [private]

use the MC as data for testing purposes

Definition at line 178 of file MicroDSTMaker.h.

Referenced by Config().


The documentation for this class was generated from the following files:
Generated on Thu Jul 10 22:53:02 2014 for loon by  doxygen 1.4.7