#include <NCEventAdder.h>
Inheritance diagram for NC::FakeDataAdder:

Public Member Functions | |
| FakeDataAdder () | |
| virtual | ~FakeDataAdder () |
| virtual void | Config (const Registry &r) |
| Override this function to handle additional registry options. | |
| virtual void | AddEvents (NCExtrapolationModule *mod, NCEventInfo *eventInfo, TChain *nearData, TChain *nearMC, TChain *farData, TChain *farMC, TChain *farMCTau, TChain *farMCElectron) const |
| You should implement this function to call back to NCExtrapolationModule::AddEventToExtrapolations. | |
Protected Member Functions | |
| void | AddEventsToExtrapolations (NCExtrapolationModule *mod, NCEventInfo *eventInfo, TChain *chain) const |
Protected Attributes | |
| bool | fSkipMC |
| Don't add MC because LoadExtrapolationsFile!="". | |
| bool | fSkipData |
| Don't add data because IncludeDataFromLoadedExtrapolations. | |
Definition at line 83 of file NCEventAdder.h.
|
|
Definition at line 240 of file NCEventAdder.cxx.
|
|
|
Definition at line 246 of file NCEventAdder.cxx. 00247 {
00248 }
|
|
||||||||||||||||||||||||||||||||||||
|
You should implement this function to call back to NCExtrapolationModule::AddEventToExtrapolations.
Implements NC::IEventAdder. Definition at line 271 of file NCEventAdder.cxx. References AddEventsToExtrapolations(), and fSkipMC. 00279 {
00280 if(fSkipMC && fSkipData) return;
00281
00282 // Add near MC as both MC and fake data
00283 AddEventsToExtrapolations(mod, eventInfo, nearMC);
00284
00285 // Add all the far MC and as data as well
00286 AddEventsToExtrapolations(mod, eventInfo, farMCTau);
00287 AddEventsToExtrapolations(mod, eventInfo, farMCElectron);
00288 AddEventsToExtrapolations(mod, eventInfo, farMC);
00289 }
|
|
||||||||||||||||
|
Definition at line 293 of file NCEventAdder.cxx. References NCExtrapolationModule::AddEventToExtrapolations(), LoopRunLimitHelper::AreDone(), det, ANtpHeaderInfo::detector, Detector::Detector_t, NCEventInfo::FillFromChain(), NCEventInfo::header, MSG, and NC::EventAdderBase::ReportOnEventInfo(). Referenced by AddEvents(). 00296 {
00297 if(chain->GetEntries() < 1){
00298 MSG("NC::FakeDataAdder", Msg::kError) << "No entries in chain!" << endl;
00299 return;
00300 }
00301
00302 eventInfo->FillFromChain(chain, 0);
00303
00304 ReportOnEventInfo(eventInfo);
00305
00306 // The file limit
00307 Detector::Detector_t det = Detector::Detector_t(eventInfo->header->detector);
00308 const int limit = (det == Detector::kNear) ? fRunLimitNearMC : fRunLimitFarMC;
00309
00310 const int eventTot = chain->GetEntries();
00311
00312 LoopRunLimitHelper runLimitHelper(limit, eventTot, eventInfo);
00313
00314 //loop over the entries in the tree
00315 for(int i = 0; i < eventTot; ++i){
00316 eventInfo->FillFromChain(chain, i);
00317
00318 if(runLimitHelper.AreDone(i, eventInfo)) break;
00319
00320 if(!fSkipMC) mod->AddEventToExtrapolations(false);
00321 // chain->GetEntry(i);
00322 if(!fSkipData) mod->AddEventToExtrapolations(true);
00323 }//end loop over data chain
00324 }
|
|
|
Override this function to handle additional registry options. This default implementation fills the run limit member variables Reimplemented from NC::EventAdderBase. Definition at line 252 of file NCEventAdder.cxx. References NC::EventAdderBase::Config(), fSkipData, fSkipMC, and Registry::Get(). 00253 {
00254 NC::EventAdderBase::Config(r);
00255
00256 bool ok = true;
00257
00258 const char* tmps;
00259 ok = ok && r.Get("LoadExtrapolationsFile", tmps);
00260 fSkipMC = TString(tmps) != "";
00261 int tmpi;
00262 ok = ok && r.Get("IncludeDataFromLoadedExtrapolations", tmpi);
00263 // This key only takes effect when we're loading anyway
00264 fSkipData = fSkipMC && tmpi;
00265
00266 assert(ok);
00267 }
|
|
|
Don't add data because IncludeDataFromLoadedExtrapolations.
Definition at line 106 of file NCEventAdder.h. Referenced by Config(). |
|
|
Don't add MC because LoadExtrapolationsFile!="".
Definition at line 105 of file NCEventAdder.h. Referenced by AddEvents(), and Config(). |
1.3.9.1