#include <NtpStRecord.h>
Inheritance diagram for NtpStRecord:

Public Member Functions | |
| NtpStRecord () | |
| NtpStRecord (const RecCandHeader &header) | |
| virtual | ~NtpStRecord () |
| void | Clear (Option_t *option="") |
| void | ClearStrips (Option_t *option="") |
| virtual std::ostream & | Print (std::ostream &os) const |
| virtual void | Print (Option_t *option="") const |
| ReleaseType::Release_t | GetRelease () const |
| std::vector< const NtpSREvent * > | GetEvents () const |
| std::vector< const NtpSRTrack * > | GetTracks (int event_index=-1) const |
| std::vector< const NtpSRShower * > | GetShowers (int event_index=-1) const |
| std::vector< const NtpSRStrip * > | GetStrips (int event_index=-1) const |
| std::vector< const NtpMCTruth * > | GetMCTruths () const |
| std::vector< const NtpMCStdHep * > | GetMCStdHeps (int mctruth_index=-1) const |
| std::vector< const NtpTHEvent * > | GetTHEvents () const |
| std::vector< const NtpTHTrack * > | GetTHTracks (int event_index=-1) const |
| std::vector< const NtpTHShower * > | GetTHShowers (int event_index=-1) const |
| const NtpMCTruth * | GetEventMCTruth (int event_index) const |
| Get best match MC truth record for event index. | |
Public Attributes | |
| NtpSREventSummary | evthdr |
| NtpSRShieldSummary | vetohdr |
| NtpSRCosmicRay | crhdr |
| NtpSRDmxStatus | dmxstatus |
| NtpSRDetStatus | detstatus |
| NtpSRTimeStatus | timestatus |
| NtpSRCalStatus | calstatus |
| NtpSRDataQuality | dataquality |
| NtpMCSummary | mchdr |
| NtpMCPhotonResult | photon |
| NtpMCDetSimResult | detsim |
| TClonesArray * | vetostp |
| TClonesArray * | vetoexp |
| TClonesArray * | deadchips |
| TClonesArray * | stp |
| TClonesArray * | slc |
| TClonesArray * | clu |
| TClonesArray * | shw |
| TClonesArray * | trk |
| TClonesArray * | evt |
| TClonesArray * | mc |
| TClonesArray * | stdhep |
| TClonesArray * | digihit |
| TClonesArray * | thstp |
| TClonesArray * | thslc |
| TClonesArray * | thshw |
| TClonesArray * | thtrk |
| TClonesArray * | thevt |
Private Member Functions | |
| void | Init () |
|
|
Definition at line 42 of file NtpStRecord.cxx. References MSG. 00042 : 00043 RecRecordImp<RecCandHeader>(),vetostp(0),vetoexp(0),deadchips(0),stp(0), 00044 slc(0),clu(0),shw(0),trk(0),evt(0),mc(0),stdhep(0),digihit(0),thstp(0), 00045 thslc(0),thshw(0),thtrk(0),thevt(0) { 00046 // Purpose: Default constructor 00047 00048 MSG("NtpSt",Msg::kVerbose) << "NtpStRecord def ctor at " << this << endl; 00049 this -> Init(); 00050 }
|
|
|
Definition at line 53 of file NtpStRecord.cxx. 00053 : 00054 RecRecordImp<RecCandHeader>(hdr),vetostp(0),vetoexp(0),deadchips(0),stp(0),slc(0),clu(0), 00055 shw(0),trk(0),evt(0),mc(0),stdhep(0),digihit(0),thstp(0),thslc(0),thshw(0), 00056 thtrk(0),thevt(0) { 00057 // Purpose: Normal constructor 00058 00059 MSG("NtpSt",Msg::kVerbose) << "NtpStRecord normal ctor at " << this << endl; 00060 this -> Init(); 00061 }
|
|
|
Definition at line 64 of file NtpStRecord.cxx. References clu, deadchips, digihit, evt, RecArrayAllocator::Instance(), mc, MSG, RecArrayAllocator::ReleaseArray(), shw, slc, stdhep, stp, thevt, thshw, thslc, thstp, thtrk, trk, vetoexp, and vetostp. 00064 {
00065 // Purpose: Destructor
00066
00067 MSG("NtpSt",Msg::kVerbose) << "NtpStRecord dtor at " << this << endl;
00068 // Release arrays back to TClonesArray pool for reuse
00069 // Allocated memory of stored objects is retrieved via object Clear call
00070 RecArrayAllocator& allocator = RecArrayAllocator::Instance();
00071 if ( vetostp ) { allocator.ReleaseArray(vetostp); vetostp = 0; }
00072 if ( vetoexp ) { allocator.ReleaseArray(vetoexp); vetoexp = 0; }
00073 if ( deadchips ) { allocator.ReleaseArray(deadchips); deadchips = 0; }
00074 if ( stp ) { allocator.ReleaseArray(stp); stp = 0; }
00075 if ( slc ) { allocator.ReleaseArray(slc); slc = 0; }
00076 if ( clu ) { allocator.ReleaseArray(clu); clu = 0; }
00077 if ( shw ) { allocator.ReleaseArray(shw); shw = 0; }
00078 if ( trk ) { allocator.ReleaseArray(trk); trk = 0; }
00079 if ( evt ) { allocator.ReleaseArray(evt); evt = 0; }
00080 if ( mc ) { allocator.ReleaseArray(mc); mc = 0; }
00081 if ( stdhep ) { allocator.ReleaseArray(stdhep); stdhep = 0; }
00082 if ( digihit ) { allocator.ReleaseArray(digihit); digihit = 0; }
00083 if ( thstp ) { allocator.ReleaseArray(thstp); thstp = 0; }
00084 if ( thslc ) { allocator.ReleaseArray(thslc); thslc = 0; }
00085 if ( thshw ) { allocator.ReleaseArray(thshw); thshw = 0; }
00086 if ( thtrk ) { allocator.ReleaseArray(thtrk); thtrk = 0; }
00087 if ( thevt ) { allocator.ReleaseArray(thevt); thevt = 0; }
00088
00089 }
|
|
|
Definition at line 92 of file NtpStRecord.cxx. References NtpMCDetSimResult::Clear(), clu, deadchips, detsim, digihit, evt, mc, shw, slc, stdhep, stp, thevt, thshw, thslc, thstp, thtrk, trk, vetoexp, and vetostp. Referenced by ClearStrips(), HitView::DrawBasicInfo(), ChainView::DrawBasicInfo(), NtpFile::GetNextRecord(), NtpFile::ReloadRecord(), and NtpFile::~NtpFile(). 00092 {
00093 // Purpose: Clear memory allocated to arrays so that record can
00094 // be reused.
00095
00096 detsim.Clear();
00097 if ( vetostp ) { vetostp -> Clear("C"); }
00098 if ( vetoexp ) { vetoexp -> Clear("C"); }
00099 if ( deadchips ) { deadchips->Clear("C"); }
00100 if ( stp ) { stp -> Clear("C"); }
00101 if ( slc ) { slc -> Clear("C"); }
00102 if ( clu ) { clu -> Clear("C"); }
00103 if ( shw ) { shw -> Clear("C"); }
00104 if ( trk ) { trk -> Clear("C"); }
00105 if ( evt ) { evt -> Clear("C"); }
00106 if ( mc ) { mc -> Clear("C"); }
00107 if ( stdhep ) { stdhep -> Clear("C"); }
00108 if ( digihit ) { digihit -> Clear("C"); }
00109 if ( thstp ) { thstp -> Clear("C"); }
00110 if ( thslc ) { thslc -> Clear("C"); }
00111 if ( thshw ) { thshw -> Clear("C"); }
00112 if ( thtrk ) { thtrk -> Clear("C"); }
00113 if ( thevt ) { thevt -> Clear("C"); }
00114
00115 }
|
|
|
Definition at line 118 of file NtpStRecord.cxx. References Clear(), digihit, stp, thstp, vetoexp, and vetostp. 00118 {
00119 // Purpose: Clear strip and digihit information to reduce output file size
00120
00121 // Standard reconstruction
00122 if ( vetostp ) { vetostp -> Clear("C"); } // clear array and contents
00123 if ( vetoexp ) { vetoexp -> Clear("C"); } //clear array and contents
00124 if ( stp ) { stp -> Clear("C"); } // clear array and contents
00125 if ( slc ) {
00126 TClonesArray& slicearray = *(slc);
00127 for ( int islc = 0; islc <= slicearray.GetLast(); islc++ ) {
00128 NtpSRSlice* ntpslice = dynamic_cast<NtpSRSlice*>(slicearray.At(islc));
00129 ntpslice -> ClearStrips();
00130 }
00131 }
00132
00133 if ( clu ) {
00134 TClonesArray& clusterarray = *(clu);
00135 for ( int iclu = 0; iclu <= clusterarray.GetLast(); iclu++ ) {
00136 NtpSRCluster* ntpcluster=dynamic_cast<NtpSRCluster*>
00137 (clusterarray.At(iclu));
00138 ntpcluster -> ClearStrips();
00139 }
00140 }
00141
00142 if ( shw ) {
00143 TClonesArray& showerarray = *(shw);
00144 for ( int ishw = 0; ishw <= showerarray.GetLast(); ishw++ ) {
00145 NtpSRShower* ntpshower=dynamic_cast<NtpSRShower*>(showerarray.At(ishw));
00146 ntpshower -> ClearStrips();
00147 }
00148 }
00149
00150 if ( trk ) {
00151 TClonesArray& trackarray = *(trk);
00152 for ( int itrk = 0; itrk <= trackarray.GetLast(); itrk++ ) {
00153 NtpSRTrack* ntptrack=dynamic_cast<NtpSRTrack*>(trackarray.At(itrk));
00154 ntptrack -> ClearStrips();
00155 }
00156 }
00157
00158 if ( evt ) {
00159 TClonesArray& eventarray = *(evt);
00160 for ( int ievt = 0; ievt <= eventarray.GetLast(); ievt++ ) {
00161 NtpSREvent* ntpevent=dynamic_cast<NtpSREvent*>(eventarray.At(ievt));
00162 ntpevent -> ClearStrips();
00163 }
00164 }
00165
00166 // Monte carlo
00167 if ( digihit ) { digihit -> Clear("C"); } // clear array and contents
00168
00169 // Truth helper
00170 if ( thstp ) { thstp -> Clear("C"); } // clear array and contents
00171
00172 }
|
|
|
Get best match MC truth record for event index.
Definition at line 498 of file NtpStRecord.cxx. References mc, MSG, and thevt. Referenced by ANtpInfoObjectFillerMRCC::FillEventInformationHelper(). 00498 {
00499 // Get NtpMCTruth entry corresponding to truth helper identified best
00500 // match for specified event_index.
00501
00502 if(event_index < 0 || event_index >= this -> thevt -> GetEntriesFast()) {
00503 // 1:1 relationship between thevt and evt entries, so treat this
00504 // error seriously
00505 MSG("NtpSt",Msg::kWarning)
00506 << "GetEventMCTruth w/event index " << event_index
00507 << "\nis too large for thevt array size "
00508 << this -> thevt->GetEntriesFast() << "." << endl;
00509 return 0;
00510 }
00511
00512 const NtpTHEvent* ntp_event
00513 = dynamic_cast<const NtpTHEvent*>(this -> thevt -> At(event_index));
00514 if(!ntp_event) {
00515 MSG("NtpSt", Msg::kWarning) << "Failed to get NtpTHEvent pointer at "
00516 << event_index << " index." << endl;
00517 return 0;
00518 }
00519
00520 const int mctruth_index = ntp_event -> neumc;
00521 if ( mctruth_index < 0 ) return 0; // valid response if no best match
00522
00523 if( mctruth_index >= this -> mc -> GetEntriesFast() ) {
00524 MSG("NtpSt", Msg::kError)
00525 << "Invalid thevt.neumc index " << mctruth_index
00526 << " exceeds bounds of "
00527 << "mc array, size " << this -> mc -> GetEntriesFast() << endl;
00528 return 0;
00529 }
00530
00531 const NtpMCTruth *truth
00532 = dynamic_cast<const NtpMCTruth *>(this -> mc -> At(mctruth_index));
00533 if(!truth) {
00534 MSG("NtpSt", Msg::kDebug) << "No mc truth at " << mctruth_index << endl;
00535 }
00536
00537 return truth;
00538 }
|
|
|
Definition at line 257 of file NtpStRecord.cxx. Referenced by ANtpInfoObjectFillerMRCC::FillEventInformationHelper(), ParticleTruthMaker::Reco(), ParticleReport::Reco(), and ParticleFinder::Reco(). 00257 {
00258 // Get all events in a record.
00259
00260 vector<const NtpSREvent *> events; // empty list of events
00261
00262 const int nevent = this -> evt -> GetEntriesFast();
00263 if (nevent < 1) return events; // return empty list if no events
00264
00265 for(int i = 0; i < nevent; ++i) {
00266 const NtpSREvent* ntp_event
00267 = dynamic_cast<const NtpSREvent*>(this -> evt -> At(i));
00268 if(!ntp_event) {
00269 MSG("NtpSt", Msg::kWarning) << "Failed to get NtpSREvent pointer at "
00270 << i << " index." << endl;
00271 continue;
00272 }
00273 events.push_back(ntp_event);
00274 }
00275
00276 return events;
00277 }
|
|
|
Definition at line 558 of file NtpStRecord.cxx. References mc, MSG, NtpMCTruth::stdhep, and stdhep. Referenced by HitView::DrawBasicInfo(), ChainView::DrawBasicInfo(), HitView::DrawInteractionDiagram(), ChainView::DrawInteractionDiagram(), HitView::DrawTruthVectors(), and ParticleFinder::Reco(). 00558 {
00559 // Get stdhep entries associated with mc truth entry mctruth_index.
00560 // If mctruth_index < 0 (default) return all stdhep entries in record.
00561
00562 vector<const NtpMCStdHep *> stdheps; // empty list of stdhep entries
00563
00564 // Determine stdhep indices of interest
00565 Int_t begstdhep_index = -1;
00566 Int_t endstdhep_index = -1;
00567 if ( mctruth_index < 0 ) {
00568 // If mc truth entry has not been specified, sthep indices of interest
00569 // is entire range
00570 begstdhep_index = 0;
00571 endstdhep_index = (stdhep -> GetEntriesFast()) - 1;
00572 }
00573 else {
00574 // stdhep indices of interest are those associated with mctruth_index
00575 if ( mctruth_index >= mc -> GetEntriesFast() ) {
00576 MSG("NtpSt",Msg::kWarning)
00577 << "GetMCStdHeps w/mc truth array entry " << mctruth_index
00578 << "\nis too large for mc array size "
00579 << mc -> GetEntriesFast()
00580 << "." << endl;
00581 return stdheps; // empty list of stdhep entries
00582 }
00583 const NtpMCTruth* ntpmctruth
00584 = dynamic_cast<const NtpMCTruth*>(mc -> At(mctruth_index));
00585 if ( !ntpmctruth ) {
00586 MSG("NtpSt", Msg::kWarning) << "Failed to find NtpMCTruth pointer at "
00587 << mctruth_index << " index." << endl;
00588 return stdheps; // empty list of stdhep entries
00589 }
00590
00591 // set stdhep indices according to this mc entry
00592 begstdhep_index = ntpmctruth->stdhep[0];
00593 endstdhep_index = ntpmctruth->stdhep[1];
00594 }
00595
00596 if ( begstdhep_index < 0 || endstdhep_index < 0 ) {
00597 // empty stdheps list, don't think this should ever happen legitimately
00598 MSG("NtpSt",Msg::kWarning) << "No stdhep entries associated with "
00599 << "mctruth_index " << mctruth_index << endl;
00600 return stdheps;
00601 }
00602
00603 // Loop over selected stdhep indices and push to output vector
00604 for ( int istd = begstdhep_index; istd <= endstdhep_index; istd++ ) {
00605 const NtpMCStdHep *ntpstdhep
00606 = dynamic_cast<const NtpMCStdHep *>( stdhep -> At(istd) );
00607 if ( !ntpstdhep ) {
00608 MSG("NtpSt", Msg::kWarning) << "No stdhep at index " << istd << endl;
00609 continue;
00610 }
00611 stdheps.push_back(ntpstdhep);
00612 }
00613
00614 return stdheps; // stdhep entries in selected index range
00615
00616 }
|
|
|
Definition at line 541 of file NtpStRecord.cxx. References mc. Referenced by HitView::DrawBasicInfo(), ChainView::DrawBasicInfo(), HitView::DrawInteractionDiagram(), ChainView::DrawInteractionDiagram(), HitView::DrawTruthVectors(), and ParticleFinder::Reco(). 00541 {
00542 // Get all mc truth events in the record.
00543
00544 vector< const NtpMCTruth* > mctruths; // empty list of mctruths
00545
00546 // Push ptrs to all mc truth entries to output vector
00547 for ( int imc = 0; imc < mc->GetEntriesFast(); imc++ ) {
00548 const NtpMCTruth* ntpmctruth
00549 = dynamic_cast<const NtpMCTruth*>( mc -> At(imc) );
00550 mctruths.push_back(ntpmctruth);
00551 }
00552
00553 return mctruths;
00554
00555 }
|
|
|
Definition at line 231 of file NtpStRecord.cxx. References NtpMCGenInfo::codename, NtpMCSummary::geninfo, RecRecordImp< RecCandHeader >::GetHeader(), RecRecordImp< RecCandHeader >::GetJobHistory(), RecJobHistory::GetProdReleaseType(), VldContext::GetSimFlag(), RecHeader::GetVldContext(), ReleaseType::MakeReleaseType(), and mchdr. Referenced by ANtpInfoObjectFillerMRCC::ABPID(), ANtpRecoNtpManipulator::ANtpRecoNtpManipulator(), MadPIDAnalysis::CreatePAN(), NuAnalysis::ExtractConfig(), SetKNNModule::Reco(), ParticleFinder::Reco(), and NueModule::Reco(). 00231 {
00232 //
00233 // Purpose: Return the Official ReleaseType determination of this record
00234 //
00235
00236 // First try using "modern" method of retrieving release type from
00237 // job history. If that fails, try using old method to
00238 // retrieve release type by title.
00239 ReleaseType::Release_t release
00240 = GetJobHistory().GetProdReleaseType(RecJobHistory::kGMinos |
00241 RecJobHistory::kCand);
00242 if (release != ReleaseType::kUnknown ) return release;
00243
00244 std::string relName = GetTitle();
00245
00246 std::string mcinfo = "";
00247 if(GetHeader().GetVldContext().GetSimFlag() == SimFlag::kMC){
00248 mcinfo = "Carrot";
00249 string temp = mchdr.geninfo.codename;
00250 if(temp.size() != 0){ mcinfo = temp; }
00251 }
00252 return ReleaseType::MakeReleaseType(relName, mcinfo);
00253
00254 }
|
|
|
Definition at line 352 of file NtpStRecord.cxx. Referenced by GetTHShowers(). 00353 {
00354 // Get showers associated with event_index.
00355 // If event_index < 0 (default) return all showers in record.
00356
00357 vector<const NtpSRShower *> showers; // empty list of showers
00358
00359 if ( event_index >= this -> evt -> GetEntriesFast() ) {
00360 MSG("NtpSt",Msg::kWarning)
00361 << "GetShowers w/event index " << event_index
00362 << "\nis too large for evt array size " << this->evt->GetEntriesFast()
00363 << "." << endl;
00364 return showers; // empty shower list
00365 }
00366
00367 if ( event_index < 0 ) {
00368 //loop over showers in a record
00369 for ( int i = 0; i < this -> shw -> GetEntriesFast(); ++i ) {
00370 const NtpSRShower *shower
00371 = dynamic_cast<const NtpSRShower *>(this -> shw -> At(i));
00372 if(!shower) {
00373 MSG("NtpSt", Msg::kWarning) << "No NtpSRShower pointer at "
00374 << event_index << " index." << endl;
00375 continue;
00376 }
00377 showers.push_back(shower);
00378 }
00379 return showers; // all showers in record
00380 }
00381
00382 // event_index >= 0
00383 const NtpSREvent* ntp_event
00384 = dynamic_cast<const NtpSREvent*>(this -> evt -> At(event_index));
00385 if(!ntp_event) {
00386 MSG("NtpSt", Msg::kWarning) << "Failed to get NtpSREvent pointer at "
00387 << event_index << " index." << endl;
00388 return showers;
00389 }
00390
00391 const Int_t *shower_index_array = ntp_event -> shw;
00392 const Int_t nshower = ntp_event -> nshower;
00393
00394 if(nshower < 1 || !shower_index_array) {
00395 MSG("NtpSt", Msg::kDebug)
00396 << "NtpStRecord does not have valid shower index array." <<endl;
00397 return showers;
00398 }
00399
00400 const int shw_size = this -> shw -> GetEntriesFast();
00401
00402 //loop over showers in an event
00403 for(int i = 0; i < nshower; ++i) {
00404 const int index = shower_index_array[i];
00405 if(index >= shw_size) {
00406 MSG("NtpSt", Msg::kWarning) << "Invalid shower index " << index
00407 << " for TClonesArray *shw of size: " << shw_size << endl;
00408 continue;
00409 }
00410 const NtpSRShower *shower
00411 = dynamic_cast<const NtpSRShower *>(this -> shw -> At(index));
00412 if(!shower) {
00413 MSG("NtpSt", Msg::kWarning) << "No NtpSRShower pointer at "
00414 << index << " index." << endl;
00415 continue;
00416 }
00417
00418 showers.push_back(shower);
00419 }
00420
00421 return showers;
00422 }
|
|
|
Definition at line 280 of file NtpStRecord.cxx. Referenced by PETrimmer::DumpIt(), ParticleReport::Reco(), ParticleFinder::Reco(), and PETrimmer::TrimRecord(). 00280 {
00281 // Get strips associated with event_index.
00282 // If event_index < 0 (default) return all strips in record.
00283
00284 vector<const NtpSRStrip *> strips; // empty list of strips
00285
00286 if( event_index >= this -> evt -> GetEntriesFast()) {
00287 MSG("NtpSt",Msg::kWarning)
00288 << "GetStrips w/event index " << event_index
00289 << "\nis too large for evt array size " << this->evt->GetEntriesFast()
00290 << "." << endl;
00291 return strips; // empty
00292 }
00293
00294 // if event index < 0, return all strips
00295 if ( event_index < 0 ) {
00296 //loop over strips in record
00297 for(int i = 0; i < this -> stp -> GetEntriesFast(); ++i) {
00298 const NtpSRStrip *strip
00299 = dynamic_cast<const NtpSRStrip *>(this -> stp -> At(i));
00300 if(!strip) {
00301 MSG("NtpSt", Msg::kWarning)
00302 << "Failed to get NtpSRStrip strip at " << event_index << endl;
00303 continue;
00304 }
00305 strips.push_back(strip);
00306 }
00307 return strips;
00308 }
00309
00310 // event_index >= 0
00311 const NtpSREvent* ntp_event
00312 = dynamic_cast<const NtpSREvent*>(this -> evt -> At(event_index));
00313 if (!ntp_event) {
00314 MSG("NtpSt", Msg::kWarning) << "Failed to get NtpSREvent at "
00315 << event_index << " index." << endl;
00316 return strips;
00317 }
00318
00319 const Int_t *strip_index_array = ntp_event -> stp;
00320 const Int_t nstrip = ntp_event -> nstrip;
00321
00322 if ( nstrip < 1 || !strip_index_array ) {
00323 MSG("NtpSt", Msg::kDebug)
00324 << "NtpStRecord does not have valid strip index array." << endl;
00325 return strips;
00326 }
00327 const int stp_size = this -> stp -> GetEntriesFast();
00328
00329 //loop over strips in an event
00330 for ( int i = 0; i < nstrip; ++i ) {
00331 const int index = strip_index_array[i];
00332 if (index >= stp_size) {
00333 MSG("NtpSt", Msg::kWarning) << "Invalid strip index " << index
00334 << " for TClonesArray *stp of size: " << stp_size << endl;
00335 continue;
00336 }
00337 const NtpSRStrip *strip
00338 = dynamic_cast<const NtpSRStrip *>(this -> stp -> At(index));
00339 if ( !strip ) {
00340 MSG("NtpSt", Msg::kWarning) << "Failed to get NtpSRStrip at "
00341 << index << " index" << endl;
00342 continue;
00343 }
00344
00345 strips.push_back(strip);
00346 }
00347
00348 return strips;
00349 }
|
|
|
Definition at line 619 of file NtpStRecord.cxx. References thevt. Referenced by HitView::DrawBasicInfo(), ChainView::DrawBasicInfo(), HitView::DrawInteractionDiagram(), ChainView::DrawInteractionDiagram(), HitView::DrawTruthVectors(), and ParticleFinder::Reco(). 00619 {
00620 // Get all mc truth helper events in the record.
00621
00622 vector< const NtpTHEvent* > thevents;
00623
00624 // Fill ptrs to all truth helper events to the output vector
00625 for ( int ith = 0; ith < thevt->GetEntriesFast(); ith++ ) {
00626 const NtpTHEvent* ntpthevent
00627 = dynamic_cast<const NtpTHEvent*>( thevt -> At(ith) );
00628 thevents.push_back(ntpthevent);
00629 }
00630
00631 return thevents;
00632
00633 }
|
|
|
Definition at line 676 of file NtpStRecord.cxx. References evt, GetShowers(), NtpSRShower::index, MSG, and thshw. 00676 {
00677 // Get truth helper showers associated with event_index.
00678 // If event_index < 0 return all truth helper showers in record.
00679
00680 vector<const NtpTHShower* > thshowers; // empty list of showers
00681
00682 if ( thshw->GetEntriesFast() <= 0 ) return thshowers; // no th showers
00683
00684 if ( event_index < 0 ) {
00685 // Fill all th showers to output vector
00686 for ( int ishw = 0; ishw < thshw -> GetEntriesFast(); ishw++ ) {
00687 const NtpTHShower *thshower
00688 = dynamic_cast<const NtpTHShower* >(thshw -> At(ishw));
00689 thshowers.push_back(thshower);
00690 }
00691 }
00692 else {
00693 if ( event_index >= evt -> GetEntriesFast() ) {
00694 MSG("NtpSt",Msg::kWarning)
00695 << "GetTHShowers w/event index " << event_index
00696 << "\nis too large for evt array size " << evt -> GetEntriesFast()
00697 << "." << endl;
00698 return thshowers; // empty list
00699 }
00700
00701 std::vector<const NtpSRShower*> showers = GetShowers(event_index);
00702 for ( unsigned int ishw = 0; ishw < showers.size(); ishw++ ) {
00703 const NtpSRShower* ntpshower = showers[ishw];
00704 Int_t shwindex = ntpshower->index;
00705 const NtpTHShower* ntpthshower = dynamic_cast<const NtpTHShower*>
00706 (thshw->At(shwindex));
00707 thshowers.push_back(ntpthshower);
00708 }
00709 }
00710
00711 return thshowers; // return filled showers
00712
00713 }
|
|
|
Definition at line 636 of file NtpStRecord.cxx. References evt, GetTracks(), NtpSRTrack::index, MSG, and thtrk. 00636 {
00637 // Get truth helper tracks associated with event_index.
00638 // If event_index < 0 return all truth helper tracks in record.
00639
00640 vector<const NtpTHTrack *> thtracks; // empty list of tracks
00641
00642 if ( thtrk->GetEntriesFast() <= 0 ) return thtracks; // no th tracks
00643
00644 if ( event_index < 0 ) {
00645 // Fill all th tracks to output vector
00646 for ( int ith = 0; ith < thtrk -> GetEntriesFast(); ith++ ) {
00647 const NtpTHTrack *thtrack
00648 = dynamic_cast<const NtpTHTrack *>(thtrk -> At(ith));
00649 thtracks.push_back(thtrack);
00650 }
00651 }
00652 else {
00653 if ( event_index >= evt -> GetEntriesFast() ) {
00654 MSG("NtpSt",Msg::kWarning)
00655 << "GetTHTracks w/event index " << event_index
00656 << "\nis too large for evt array size " << evt -> GetEntriesFast()
00657 << "." << endl;
00658 return thtracks; // empty list
00659 }
00660
00661 std::vector<const NtpSRTrack*> tracks = GetTracks(event_index);
00662 for ( unsigned int itrk = 0; itrk < tracks.size(); itrk++ ) {
00663 const NtpSRTrack* ntptrack = tracks[itrk];
00664 Int_t trkindex = ntptrack->index;
00665 const NtpTHTrack* ntpthtrack = dynamic_cast<const NtpTHTrack*>
00666 (thtrk->At(trkindex));
00667 thtracks.push_back(ntpthtrack);
00668 }
00669 }
00670
00671 return thtracks; // return filled tracks
00672
00673 }
|
|
|
Definition at line 425 of file NtpStRecord.cxx. Referenced by GetTHTracks(). 00425 {
00426 // Get tracks associated with event_index.
00427 // If event_index < 0 return all tracks in record.
00428
00429 vector<const NtpSRTrack *> tracks; // empty list of tracks
00430
00431 if(event_index >= this -> evt -> GetEntriesFast()) {
00432 MSG("NtpSt",Msg::kWarning)
00433 << "GetTracks w/event index " << event_index
00434 << "\nis too large for evt array size " << this -> evt->GetEntriesFast()
00435 << "." << endl;
00436 return tracks;
00437 }
00438
00439 if( event_index < 0 ) {
00440 //loop over tracks in a record
00441 for(int i = 0; i < this -> trk -> GetEntriesFast(); ++i) {
00442 const NtpSRTrack *track
00443 = dynamic_cast<const NtpSRTrack *>(this -> trk -> At(i));
00444 if (!track) {
00445 MSG("NtpSt", Msg::kWarning) << "No track at " << event_index
00446 << endl;
00447 continue;
00448 }
00449
00450 tracks.push_back(track);
00451 }
00452 return tracks; // all tracks in record
00453 }
00454
00455 // event_index >= 0
00456 const NtpSREvent* ntp_event
00457 = dynamic_cast<const NtpSREvent*>(this -> evt -> At(event_index));
00458 if(!ntp_event) {
00459 MSG("NtpSt", Msg::kWarning) << "Failed to find NtpSREvent pointer at "
00460 << event_index << " index." << endl;
00461 return tracks;
00462 }
00463
00464 const Int_t *track_index_array = ntp_event -> trk;
00465 const Int_t ntrack = ntp_event -> ntrack;
00466
00467 if(ntrack < 1 || !track_index_array) {
00468 MSG("NtpSt", Msg::kDebug)
00469 << "NtpStRecord does not have valid track index array." <<endl;
00470 return tracks;
00471 }
00472
00473 const int trk_size = this -> trk -> GetEntriesFast();
00474
00475 //loop over tracks in an event
00476 for(int i = 0; i < ntrack; ++i) {
00477 const int index = track_index_array[i];
00478 if ( index >= trk_size ) {
00479 MSG("NtpSt", Msg::kWarning) << "Invalid track index " << index
00480 << " for TClonesArray *trk of size: " << trk_size << endl;
00481 continue;
00482 }
00483 const NtpSRTrack *track
00484 = dynamic_cast<const NtpSRTrack *>(this -> trk -> At(index));
00485 if(!track) {
00486 MSG("NtpSt", Msg::kWarning)
00487 << "Failed to get NtpSRTrack pointer at " << index << endl;
00488 continue;
00489 }
00490
00491 tracks.push_back(track);
00492 }
00493
00494 return tracks;
00495 }
|
|
|
Definition at line 176 of file NtpStRecord.cxx. References clu, deadchips, digihit, evt, RecArrayAllocator::GetArray(), RecArrayAllocator::Instance(), mc, RecRecordImp< RecCandHeader >::SetClearable(), shw, slc, stdhep, stp, thevt, thshw, thslc, thstp, thtrk, trk, vetoexp, and vetostp. Referenced by NtpStRecord(). 00176 {
00177 //
00178 // Purpose: Initialize ntuple TClonesArrays
00179 //
00180
00181 // Set variable in record base class to indicate that it is possible
00182 // to recover dynamic memory using Clear() method for this record type
00183 SetClearable(true);
00184
00185 RecArrayAllocator& allocator = RecArrayAllocator::Instance();
00186 if ( !vetostp ) vetostp = allocator.GetArray("NtpSRShieldStrip");
00187 if ( !vetoexp ) vetoexp = allocator.GetArray("NtpSRShieldExpected");
00188 if ( !deadchips ) deadchips = allocator.GetArray("NtpSRDeadChip");
00189 if ( !stp ) stp = allocator.GetArray("NtpSRStrip");
00190 if ( !slc ) slc = allocator.GetArray("NtpSRSlice");
00191 if ( !clu ) clu = allocator.GetArray("NtpSRCluster");
00192 if ( !shw ) shw = allocator.GetArray("NtpSRShower");
00193 if ( !trk ) trk = allocator.GetArray("NtpSRTrack");
00194 if ( !evt ) evt = allocator.GetArray("NtpSREvent");
00195 if ( !mc ) mc = allocator.GetArray("NtpMCTruth");
00196 if ( !stdhep ) stdhep = allocator.GetArray("NtpMCStdHep");
00197 if ( !digihit ) digihit = allocator.GetArray("NtpMCDigiScintHit");
00198 if ( !thstp ) thstp = allocator.GetArray("NtpTHStrip");
00199 if ( !thslc ) thslc = allocator.GetArray("NtpTHSlice");
00200 if ( !thshw ) thshw = allocator.GetArray("NtpTHShower");
00201 if ( !thtrk ) thtrk = allocator.GetArray("NtpTHTrack");
00202 if ( !thevt ) thevt = allocator.GetArray("NtpTHEvent");
00203
00204 }
|
|
|
Reimplemented from RecRecordImp< RecCandHeader >. Definition at line 220 of file NtpStRecord.cxx. References Print(). 00220 {
00221 //
00222 // Purpose: Print record in form supported by TObject::Print
00223 //
00224
00225 Print(std::cout);
00226 return;
00227
00228 }
|
|
|
Reimplemented from RecRecordImp< RecCandHeader >. Definition at line 207 of file NtpStRecord.cxx. References RecRecordImp< T >::Print(). Referenced by MeuAnalysis::MakeSummaryTreeWithNtpStOneSnarl(), and Print(). 00207 {
00208 //
00209 // Purpose: Print status of ntuple record on ostream
00210 //
00211
00212 os << "NtpStRecord::Print" << endl;
00213 RecRecordImp<RecCandHeader>::Print(os);
00214
00215 return os;
00216
00217 }
|
|
|
Definition at line 101 of file NtpStRecord.h. Referenced by NtpSRModule::Reco(). |
|
|
Definition at line 114 of file NtpStRecord.h. Referenced by Clear(), SntpHelpers::GetCluster(), Init(), MadBase::LoadCluster(), ANtpRecoNtpManipulator::SetRecord(), and ~NtpStRecord(). |
|
|
Definition at line 97 of file NtpStRecord.h. Referenced by NtpSRModule::Reco(), and ANtpRecoNtpManipulator::SetRecord(). |
|
|
Definition at line 102 of file NtpStRecord.h. Referenced by MadPIDAnalysis::CreatePAN(), MeuCuts::FillSTSumDetails(), MeuCuts::IsGoodDataQuality(), and NtpSRModule::Reco(). |
|
|
Definition at line 110 of file NtpStRecord.h. Referenced by Clear(), Init(), NtpSRModule::Reco(), and ~NtpStRecord(). |
|
|
Definition at line 105 of file NtpStRecord.h. Referenced by Clear(), and NtpMCModule::Reco(). |
|
|
Definition at line 99 of file NtpStRecord.h. Referenced by EventQualAna::Analyze(), ANtpEventInfoAna::Analyze(), MadPIDAnalysis::CreatePAN(), MadBase::GetEntry(), NtpSRModule::Reco(), and NuMadAnalysis::SetEntry(). |
|
|
Definition at line 122 of file NtpStRecord.h. Referenced by Clear(), ClearStrips(), MCMonitorCosmicHistograms::FillHistsTrue(), Init(), ParticleTruthMaker::Reco(), NtpMCModule::Reco(), and ~NtpStRecord(). |
|
|
Definition at line 98 of file NtpStRecord.h. Referenced by EventQualAna::Analyze(), ANtpEventInfoAna::Analyze(), MadBase::GetEntry(), NtpSRModule::Reco(), NuMadAnalysis::SetEntry(), and ANtpRecoNtpManipulator::SetRecord(). |
|
|
|
|
|
|
Definition at line 104 of file NtpStRecord.h. Referenced by NtpMCModule::Reco(). |
|
|
|
|
|
|
|
|
Definition at line 126 of file NtpStRecord.h. Referenced by Clear(), Init(), MadBase::LoadTHSlice(), NtpTHModule::Reco(), and ~NtpStRecord(). |
|
|
Definition at line 125 of file NtpStRecord.h. Referenced by Clear(), ClearStrips(), MadBase::GetEntry(), Init(), NtpTHModule::Reco(), NuMadAnalysis::SetEntry(), ANtpRecoNtpManipulator::SetRecord(), and ~NtpStRecord(). |
|
|
|
Definition at line 100 of file NtpStRecord.h. Referenced by NuExtraction::ExtractMinMaxEvtTimes(), and NtpSRModule::Reco(). |
|
|
|
Definition at line 109 of file NtpStRecord.h. Referenced by Clear(), ClearStrips(), Init(), NtpSRModule::Reco(), and ~NtpStRecord(). |
|
|
Definition at line 96 of file NtpStRecord.h. Referenced by MadBase::GetEntry(), SntpHelpers::GetShieldStrip(), NtpSRModule::Reco(), NuMadAnalysis::SetEntry(), ANtpRecoNtpManipulator::SetRecord(), and SntpHelpers::shieldSummary(). |
|
|
Definition at line 108 of file NtpStRecord.h. Referenced by ShieldRejVarAna::Analyze(), Clear(), ClearStrips(), MadScanDisplay::Display(), MadEvDisplay::Display(), SntpHelpers::GetShieldStrip(), Init(), MadBase::LoadShieldStrip(), NtpSRModule::Reco(), ANtpRecoNtpManipulator::SetRecord(), and ~NtpStRecord(). |
1.3.9.1