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

Public Member Functions | |
| MadBase (TChain *chainSR=0, TChain *chainMC=0, TChain *chainTH=0, TChain *chainEM=0) | |
| MadBase (JobC *, string, int) | |
| ~MadBase () | |
| Int_t | GetEntry (Int_t run, Int_t snarl) |
| Int_t | GetEntry (Int_t entry) |
| void | InitChain (TChain *chainSR, TChain *chainMC, TChain *chainTH, TChain *chainEM, bool build_index=false) |
| void | Clear () |
| const NtpSREventSummary * | GetEventSummary () |
| const RecCandHeader * | GetHeader () |
| const NtpSRTrack * | GetTrack (Int_t) |
| const NtpSRTrack * | GetLargestTrackFromEvent (Int_t, Int_t &) |
| const NtpSRShower * | GetShower (Int_t) |
| const NtpSRCluster * | GetCluster (Int_t) |
| const NtpSRShower * | GetLargestShowerFromEvent (Int_t, Int_t &) |
| const NtpSRShower * | GetShowerAtTrackVertex (Int_t, Int_t, Int_t &) |
| const NtpSREvent * | GetEvent (Int_t) |
| const NtpSRSlice * | GetSlice (Int_t) |
| const NtpSRShieldStrip * | GetShieldStrip (Int_t) |
| const NtpSRStrip * | GetStrip (Int_t) |
| const NtpMCTruth * | GetTruth (Int_t) |
| const NtpMCStdHep * | GetStdHep (Int_t) |
| const NtpMCTruth * | GetTruthForReco (Int_t, Int_t &) |
| const NtpTHSlice * | GetSliceForRecoTH (Int_t, Int_t &) |
| const NtpMCTruth * | GetTruthForRecoTH (Int_t, Int_t &) |
| const NtpTHTrack * | GetTHTrack (Int_t) |
| const NtpTHEvent * | GetTHEvent (Int_t) |
| const NtpTHShower * | GetTHShower (Int_t) |
| const NtpTHSlice * | GetTHSlice (Int_t) |
| const NtpEMShower * | GetEMShower (Int_t) |
Protected Member Functions | |
| Bool_t | LoadTrack (Int_t idx) |
| Bool_t | LoadShower (Int_t idx) |
| Bool_t | LoadCluster (Int_t idx) |
| Bool_t | LoadEvent (Int_t idx) |
| Bool_t | LoadSlice (Int_t idx) |
| Bool_t | LoadShieldStrip (Int_t idx) |
| Bool_t | LoadStrip (Int_t idx) |
| Bool_t | LoadTruth (Int_t idx) |
| Bool_t | LoadStdHep (Int_t idx) |
| Bool_t | LoadTHTrack (Int_t) |
| Bool_t | LoadTHEvent (Int_t) |
| Bool_t | LoadTHShower (Int_t) |
| Bool_t | LoadTHSlice (Int_t) |
| Bool_t | LoadEMShower (Int_t) |
| Bool_t | LoadLargestTrackFromEvent (Int_t event, Int_t &trkidx) |
| Bool_t | LoadShower_Jim (Int_t event, Int_t &shwidx, Int_t detector) |
| Bool_t | LoadLargestShowerFromEvent (Int_t event, Int_t &shwidx) |
| Bool_t | LoadShowerAtTrackVertex (Int_t event, Int_t track, Int_t &shwidx) |
| Bool_t | LoadTruthForReco (Int_t, Int_t &) |
| Bool_t | LoadTruthForRecoTH (Int_t, Int_t &) |
| Bool_t | LoadSliceForRecoTH (Int_t, Int_t &) |
| Float_t | RecoShwEnergy (Int_t ishw=0, Int_t opt=-1, Int_t det=1) |
Protected Attributes | |
| MadChain * | fChain |
| JobC * | fJC |
| string | jcPath |
| int | fCurRun |
| int | lastEntry |
| int | whichSource |
| NtpStRecord * | strecord |
| NtpSRRecord * | record |
| const RecCandHeader * | ntpHeader |
| NtpSRShieldSummary * | shieldSummary |
| NtpSREventSummary * | eventSummary |
| NtpSRDmxStatus * | dmxStatus |
| NtpSRDetStatus * | detStatus |
| NtpSREvent * | ntpEvent |
| NtpSRTrack * | ntpTrack |
| NtpSRShower * | ntpShower |
| NtpSRCluster * | ntpCluster |
| NtpSRSlice * | ntpSlice |
| NtpSRShieldStrip * | ntpShieldStrip |
| NtpSRStrip * | ntpStrip |
| NtpMCRecord * | mcrecord |
| NtpMCSummary * | mcHeader |
| NtpMCTruth * | ntpTruth |
| NtpMCStdHep * | ntpStdHep |
| NtpTHRecord * | threcord |
| NtpTHSlice * | ntpTHSlice |
| NtpTHEvent * | ntpTHEvent |
| NtpTHTrack * | ntpTHTrack |
| NtpTHShower * | ntpTHShower |
| NtpEMRecord * | emrecord |
| NtpEMSummary * | ntpEMSummary |
| NtpEMShower * | ntpEMShower |
| Bool_t | isMC |
| Bool_t | isTH |
| Bool_t | isEM |
| Bool_t | isST |
| Int_t | Nentries |
|
||||||||||||||||||||
|
Definition at line 14 of file MadBase.cxx. References Clear(), emrecord, fCurRun, InitChain(), isEM, isMC, isST, isTH, lastEntry, mcrecord, Nentries, record, strecord, threcord, and whichSource. 00016 {
00017
00018 fCurRun = -1;
00019 lastEntry = -1;
00020 if(!chainSR) {
00021 record = 0;
00022 emrecord = 0;
00023 mcrecord = 0;
00024 threcord = 0;
00025 strecord = 0;
00026 Clear();
00027 whichSource = -1;
00028 isMC = true;
00029 isTH = true;
00030 isEM = true;
00031 isST = false;
00032 Nentries = -1;
00033 fCurRun = -1;
00034 return;
00035 }
00036
00037 InitChain(chainSR,chainMC,chainTH,chainEM);
00038 whichSource = 0;
00039
00040 }
|
|
||||||||||||||||
|
Definition at line 42 of file MadBase.cxx. References Clear(), emrecord, fChain, fCurRun, fJC, isEM, isMC, isST, isTH, jcPath, lastEntry, mcrecord, Nentries, record, strecord, threcord, and whichSource. 00043 {
00044 record = 0;
00045 emrecord = 0;
00046 mcrecord = 0;
00047 threcord = 0;
00048 strecord = 0;
00049 Clear();
00050 isMC = true;
00051 isTH = true;
00052 isEM = true;
00053 isST = false;
00054 Nentries = entries;
00055 whichSource = 1;
00056 jcPath = path;
00057 fCurRun = -1;
00058 lastEntry = -1;
00059 fJC = j;
00060 fChain = NULL;
00061 }
|
|
|
Definition at line 63 of file MadBase.cxx. 00064 {
00065 if(fChain) delete fChain;
00066 }
|
|
|
|
Definition at line 755 of file MadBase.cxx. References LoadCluster(). 00755 {
00756 if(!LoadCluster(i)) return 0;
00757 else return ntpCluster;
00758 }
|
|
|
Definition at line 829 of file MadBase.cxx. References LoadEMShower(). 00829 {
00830 if(!LoadEMShower(i)) return 0;
00831 else return ntpEMShower;
00832 }
|
|
|
Definition at line 74 of file MadBase.cxx. References Clear(), NtpSRRecord::detstatus, NtpStRecord::detstatus, detStatus, NtpSRRecord::dmxstatus, NtpStRecord::dmxstatus, dmxStatus, NtpEMRecord::emhdr, MadChain::emRecord, emrecord, eventSummary, NtpSRRecord::evthdr, NtpStRecord::evthdr, fChain, fCurRun, fJC, MadChain::Get(), MomNavigator::GetFragment(), RecRecordImp< T >::GetHeader(), RecDataHeader::GetRun(), JobC::Input, isEM, isMC, isTH, jcPath, lastEntry, LoadCluster(), LoadEMShower(), LoadEvent(), LoadShieldStrip(), LoadShower(), LoadSlice(), LoadStdHep(), LoadTHEvent(), LoadTHShower(), LoadTHSlice(), LoadTHTrack(), LoadTrack(), LoadTruth(), NtpMCRecord::mchdr, NtpStRecord::mchdr, mcHeader, MadChain::mcRecord, mcrecord, JobC::Mom, NtpMCSummary::nmc, ntpEMSummary, ntpHeader, JobC::Path, JobCInput::Prev(), MadChain::Record, record, shieldSummary, MadChain::stRecord, strecord, MadChain::thRecord, threcord, NtpStRecord::thstp, NtpSRRecord::vetohdr, NtpStRecord::vetohdr, and whichSource. 00075 {
00076 //zero everything before next snarl
00077 Clear();
00078
00079 //get records
00080 int status = 0;
00081 if(whichSource==-1) return 0;
00082 else if(whichSource==0) {
00083 if(entry!=lastEntry) {
00084 status = fChain->Get(entry);
00085 lastEntry = entry;
00086 }
00087 else status = 1;
00088 record = fChain->Record;
00089 strecord = fChain->stRecord;
00090 mcrecord = fChain->mcRecord;
00091 threcord = fChain->thRecord;
00092 emrecord = fChain->emRecord;
00093 }
00094 else if(whichSource==1) {
00095 //allow for possibility that reco path can change event by event:
00096 isMC = isTH = isEM = true;
00097 //Get entry:
00098 //cout << "Getting Cand entry " << entry << " from "
00099 // << jcPath.c_str() << endl;
00100 if(entry!=lastEntry) {
00101 if(entry<lastEntry) fJC->Input.Prev(lastEntry-entry-2);
00102 //else fJC->Input.Next(entry-lastEntry);
00103 fJC->Path(jcPath.c_str()).RunNin(1);
00104 lastEntry = entry;
00105 }
00106 //Look for records in mom:
00107 record = (NtpSRRecord*) fJC->Mom.GetFragment("NtpSRRecord");
00108 mcrecord = (NtpMCRecord*) fJC->Mom.GetFragment("NtpMCRecord");
00109 threcord = (NtpTHRecord*) fJC->Mom.GetFragment("NtpTHRecord");
00110 emrecord = (NtpEMRecord*) fJC->Mom.GetFragment("NtpEMRecord");
00111 //if no SR record quit
00112 if(record==0) return 0;
00113 //otherwise check for other records:
00114 status = 1;
00115 if(mcrecord==0) isMC = false;
00116 if(threcord==0) isTH = false;
00117 if(emrecord==0) isEM = false;
00118 }
00119 else return 0;
00120
00121 //set other things:
00122 if(isST){
00123 ntpHeader = &(strecord->GetHeader());
00124 mcHeader = &(strecord->mchdr);
00125 shieldSummary = &(strecord->vetohdr);
00126 eventSummary = &(strecord->evthdr);
00127 dmxStatus = &(strecord->dmxstatus);
00128 detStatus = &(strecord->detstatus);
00129 if(mcHeader->nmc==0) {
00130 isMC = false; isTH = false;
00131 }
00132 else {
00133 isMC = true;
00134 TClonesArray &array = *(strecord->thstp);
00135 if(array.GetEntries()>0) isTH = true;
00136 }
00137 }
00138 else {
00139 ntpHeader = &(record->GetHeader());
00140 shieldSummary = &(record->vetohdr);
00141 eventSummary = &(record->evthdr);
00142 dmxStatus = &(record->dmxstatus);
00143 detStatus = &(record->detstatus);
00144 }
00145 fCurRun = ntpHeader->GetRun();
00146
00147 LoadSlice(0);
00148 LoadEvent(0);
00149 LoadTrack(0);
00150 LoadCluster(0);
00151 LoadShower(0);
00152 LoadShieldStrip(0);
00153
00154 if(isEM) {
00155 ntpEMSummary = &(emrecord->emhdr);
00156 LoadEMShower(0);
00157 }
00158
00159 if(isMC) {
00160 if(isST) mcHeader = &(strecord->mchdr);
00161 else mcHeader = &(mcrecord->mchdr);
00162 LoadTruth(0);
00163 LoadStdHep(0);
00164 }
00165
00166 if(isTH) {
00167 LoadTHSlice(0);
00168 LoadTHEvent(0);
00169 LoadTHTrack(0);
00170 LoadTHShower(0);
00171 }
00172 return status;
00173
00174 }
|
|
||||||||||||
|
|
Definition at line 767 of file MadBase.cxx. References LoadEvent(). Referenced by MadQEID::CalcQEVars(), MadNsID::CalcVars(), MadDpID::CalcVars(), and NearbyVertexFinder::ProcessEntry(). 00767 {
00768 if(!LoadEvent(i)) return 0;
00769 else return ntpEvent;
00770 }
|
|
|
Definition at line 222 of file MadBase.h. Referenced by MadDpID::CalcVars(), MadTVAnalysis::ComputeLowPHRatio(), MadMKAnalysis::ComputeLowPHRatio(), and NearbyVertexFinder::ProcessEntry(). 00222 {return eventSummary;}
|
|
|
Definition at line 223 of file MadBase.h. Referenced by MadDpID::CalcVars(), and MadDpID::FillPDFs(). 00223 {return ntpHeader;}
|
|
||||||||||||
|
Definition at line 759 of file MadBase.cxx. References LoadLargestShowerFromEvent(). Referenced by MadNsID::CalcVars(). 00759 {
00760 if(!LoadLargestShowerFromEvent(i,j)) return 0;
00761 else return ntpShower;
00762 }
|
|
||||||||||||
|
Definition at line 747 of file MadBase.cxx. References LoadLargestTrackFromEvent(). Referenced by MadQEID::CalcQEVars(), MadNsID::CalcVars(), and MadDpID::CalcVars(). 00747 {
00748 if(!LoadLargestTrackFromEvent(i,j)) return 0;
00749 else return ntpTrack;
00750 }
|
|
|
Definition at line 775 of file MadBase.cxx. References LoadShieldStrip(). 00775 {
00776 if(!LoadShieldStrip(i)) return 0;
00777 else return ntpShieldStrip;
00778
00779 }
|
|
|
Definition at line 751 of file MadBase.cxx. References LoadShower(). Referenced by MadQEID::CalcQEVars(). 00751 {
00752 if(!LoadShower(i)) return 0;
00753 else return ntpShower;
00754 }
|
|
||||||||||||||||
|
Definition at line 763 of file MadBase.cxx. References LoadShowerAtTrackVertex(). 00763 {
00764 if(!LoadShowerAtTrackVertex(i,j,k)) return 0;
00765 else return ntpShower;
00766 }
|
|
|
Definition at line 771 of file MadBase.cxx. References LoadSlice(). 00771 {
00772 if(!LoadSlice(i)) return 0;
00773 else return ntpSlice;
00774 }
|
|
||||||||||||
|
Definition at line 800 of file MadBase.cxx. References LoadSliceForRecoTH(). 00800 {
00801 if(!LoadSliceForRecoTH(i,j)) return 0;
00802 else return ntpTHSlice;
00803 }
|
|
|
Definition at line 790 of file MadBase.cxx. References LoadStdHep(). 00790 {
00791 if(!LoadStdHep(i)) return 0;
00792 else return ntpStdHep;
00793 }
|
|
|
Definition at line 780 of file MadBase.cxx. References LoadStrip(). Referenced by MadQEID::CalcQEVars(), MadNsID::CalcVars(), MadQEID::IsShowHit(), and MadQEID::IsTrkHit(). 00780 {
00781 if(!LoadStrip(i)) return 0;
00782 else return ntpStrip;
00783 }
|
|
|
Definition at line 814 of file MadBase.cxx. References LoadTHEvent(). 00814 {
00815 if(!LoadTHEvent(i)) return 0;
00816 else return ntpTHEvent;
00817 }
|
|
|
Definition at line 819 of file MadBase.cxx. References LoadTHShower(). 00819 {
00820 if(!LoadTHShower(i)) return 0;
00821 else return ntpTHShower;
00822 }
|
|
|
Definition at line 824 of file MadBase.cxx. References LoadTHSlice(). 00824 {
00825 if(!LoadTHSlice(i)) return 0;
00826 else return ntpTHSlice;
00827 }
|
|
|
Definition at line 809 of file MadBase.cxx. References LoadTHTrack(). 00809 {
00810 if(!LoadTHTrack(i)) return 0;
00811 else return ntpTHTrack;
00812 }
|
|
|
Definition at line 741 of file MadBase.cxx. References LoadTrack(). 00741 {
00742 if(!LoadTrack(i)) return 0;
00743 else return ntpTrack;
00744
00745 }
|
|
|
Definition at line 785 of file MadBase.cxx. References LoadTruth(). 00785 {
00786 if(!LoadTruth(i)) return 0;
00787 else return ntpTruth;
00788 }
|
|
||||||||||||
|
Definition at line 795 of file MadBase.cxx. References LoadTruthForReco(). Referenced by MadDpID::FillPDFs(). 00795 {
00796 if(!LoadTruthForReco(i,j)) return 0;
00797 else return ntpTruth;
00798 }
|
|
||||||||||||
|
Definition at line 804 of file MadBase.cxx. References LoadTruthForRecoTH(). Referenced by NearbyVertexFinder::ProcessEntry(). 00804 {
00805 if(!LoadTruthForRecoTH(i,j)) return 0;
00806 else return ntpTruth;
00807 }
|
|
||||||||||||||||||||||||
|
|
|
Definition at line 726 of file MadBase.cxx. References emrecord, NtpEMRecord::emshw, and ntpEMShower. Referenced by MadScanDisplay::Display(), MadEvDisplay::Display(), GetEMShower(), GetEntry(), and MadHandScan::HandScanDisplay(). 00726 {
00727
00728 Bool_t status = false;
00729 if(!isEM) return status;
00730 TClonesArray& showerArray = *(emrecord->emshw);
00731 //MAK:06/06/05 if(ishw>=0&&ishw<showerArray.GetEntries()) {
00732 if(ishw>=0&&ishw<showerArray.GetEntries()) {
00733 ntpEMShower = dynamic_cast<NtpEMShower *>(showerArray[ishw]);
00734 status = true;
00735 }
00736 else ntpEMShower = 0;
00737
00738 return status;
00739 }
|
|
|
||||||||||||
|
||||||||||||
|
|
Definition at line 709 of file MadBase.cxx. References ntpShieldStrip, record, strecord, NtpSRRecord::vetostp, and NtpStRecord::vetostp. Referenced by GetEntry(), GetShieldStrip(), and NuMadAnalysis::SetEntry(). 00709 {
00710
00711 Bool_t status = false;
00712 TClonesArray* pointStripArray = NULL;
00713 if(isST) pointStripArray = (strecord->vetostp);
00714 else pointStripArray = (record->vetostp);
00715 TClonesArray& stripArray = *pointStripArray;
00716 //MAK:06/06/05 if(istp>=0&&istp<stripArray.GetEntries()) {
00717 if(istp>=0&&istp<stripArray.GetEntriesFast()) {
00718 ntpShieldStrip = dynamic_cast<NtpSRShieldStrip *>(stripArray[istp]);
00719 status = true;
00720 }
00721 else ntpShieldStrip = 0;
00722
00723 return status;
00724 }
|
|
|
||||||||||||||||
|
Definition at line 363 of file MadBase.cxx. References LoadEvent(), LoadLargestTrackFromEvent(), LoadShower(), NtpSREvent::nshower, ntpEvent, ntpShower, ntpTrack, NtpSREvent::ntrack, NtpSREvent::primshw, RecoShwEnergy(), NtpSREvent::shw, NtpSRShower::vtx, NtpSRTrack::vtx, and NtpSRVertex::z. Referenced by MadPIDAnalysis::AnnVar(), MadDpAnalysis::AnnVar(), MadTVAnalysis::CreatePAN(), MadPIDAnalysis::CreatePAN(), MadMKAnalysis::CreatePAN(), MadDpAnalysis::CreatePAN(), MadScanDisplay::Display(), and MadScanDisplay::InFidNoTrk(). 00363 {
00364
00365 Bool_t status = false;
00366 ntpShower = 0;
00367 if(!LoadEvent(ievt)) return status;
00368 int *showers = ntpEvent->shw;
00369 if(ntpEvent->ntrack==0 && ntpEvent->nshower>0) {
00370 ishw = showers[0];
00371 ntpShower = 0;
00372 status = true;
00373 LoadShower(ishw);
00374 }
00375 if(ntpEvent->primshw<0) return false;
00376
00377 if(ntpEvent->nshower>0 && ntpEvent->ntrack> 0) {
00378 if(!LoadShower(showers[0])) return status;
00379 ishw = showers[0];
00380 ntpShower = 0;
00381 LoadShower(ishw);
00382 int track_index = -1;
00383 LoadLargestTrackFromEvent(ievt,track_index);
00384 Double_t reco_eshwcc,reco_eshwccw;
00385 Int_t shwtype=0;
00386 shwtype=0;
00387 reco_eshwcc = RecoShwEnergy(ishw,shwtype,detector);
00388 shwtype=1;
00389 reco_eshwccw = RecoShwEnergy(ishw,shwtype,detector);
00390 if(track_index!=-1){
00391 Double_t trvz= ntpTrack ->vtx.z;
00392 Double_t shvz= ntpShower->vtx.z;
00393 if(fabs(trvz-shvz)<0.5 || (fabs(trvz-shvz)>=0.5 && reco_eshwcc > 2)) {
00394 status=true;
00395 }
00396 else if(fabs(trvz-shvz)>=0.5 && reco_eshwcc <= 2) {
00397 status=false;
00398 }
00399 }
00400 }
00401 if(!status) ishw=-1;
00402
00403 return status;
00404 }
|
|
||||||||||||||||
|
Definition at line 436 of file MadBase.cxx. References NtpSRStripPulseHeight::gev, NtpSRShowerPulseHeight::linCCgev, LoadEvent(), LoadShower(), LoadTrack(), NtpSREvent::nshower, ntpEvent, ntpShower, ntpTrack, NtpSRShower::ph, NtpSREvent::shw, NtpSRShower::shwph, NtpSRTrack::vtx, NtpSRShower::vtx, and NtpSRVertex::z. Referenced by MadAnalysis::CreatePAN(), MadEvDisplay::Display(), GetShowerAtTrackVertex(), and MadQuantities::ShowerValidation(). 00436 {
00437
00438 Bool_t status = false;
00439 ntpShower = 0;
00440 if(!LoadEvent(ievt)) return status;
00441 if(!LoadTrack(itrk)) return status;
00442
00443 Float_t closest_ph = 0;
00444 Float_t closest_vtx = 1000.;
00445 const Float_t close_enough=7*0.06; // about 1 interaction length
00446 int *showers = ntpEvent->shw;
00447 for(int i=0;i<ntpEvent->nshower;i++){
00448 if(!LoadShower(showers[i])) continue;
00449 /*
00450 Float_t vtx_sep = TMath::Sqrt(TMath::Power(ntpShower->vtx.x-ntpTrack->vtx.x,2) +
00451 TMath::Power(ntpShower->vtx.y-ntpTrack->vtx.y,2) +
00452 TMath::Power(ntpShower->vtx.z-ntpTrack->vtx.z,2));
00453 */
00454 Float_t vtx_sep = TMath::Abs(ntpShower->vtx.z-ntpTrack->vtx.z);
00455
00456 // if this is the closest shower
00457 if(vtx_sep < closest_vtx) {
00458 ishw = showers[i];
00459 closest_vtx = vtx_sep;
00460 // this is a check to make sure we have R1.16 or greater shw variables
00461 if(ntpShower->shwph.linCCgev>0) closest_ph = ntpShower->shwph.linCCgev;
00462 else closest_ph=ntpShower->ph.gev;
00463 }
00464 // if this isn't the closest shower but it's within close_enough m of the
00465 // track vertex and has a larger pulseheight
00466 else if(vtx_sep<close_enough && ntpShower->ph.gev>closest_ph){
00467 ishw = showers[i];
00468 closest_vtx = vtx_sep;
00469
00470 if(ntpShower->shwph.linCCgev>0) closest_ph = ntpShower->shwph.linCCgev;
00471 else closest_ph=ntpShower->ph.gev;
00472 }
00473 }
00474 ntpShower = 0;
00475 // only associate showers within close_enough m of the track vertex
00476 if(closest_vtx<close_enough){
00477 status = true;
00478 LoadShower(ishw);
00479 }
00480 return status;
00481 }
|
|
|
Definition at line 501 of file MadBase.cxx. References ntpSlice, record, NtpSRRecord::slc, NtpStRecord::slc, and strecord. Referenced by MadTVAnalysis::CreatePAN(), MadMKAnalysis::CreatePAN(), MadAnalysis::CreatePAN(), MadScanDisplay::Display(), MadEvDisplay::Display(), GetEntry(), GetSlice(), MadScanDisplay::InFidNoTrk(), MadScanDisplay::InFidTrk(), MadCluAnalysis::IsTrackInSlice(), LoadSliceForRecoTH(), MadCBSQEAnalysis::MakeQEFile(), MadScanDisplay::ROICalc(), and NuMadAnalysis::SetEntry(). 00501 {
00502
00503 Bool_t status = false;
00504 TClonesArray* pointSliceArray = NULL;
00505 if(isST) pointSliceArray = (strecord->slc);
00506 else pointSliceArray = (record->slc);
00507 TClonesArray& sliceArray = *pointSliceArray;
00508 //MAK:06/06/05 if(islc>=0&&islc<sliceArray.GetEntries()) {
00509 if(islc>=0&&islc<sliceArray.GetEntriesFast()) {
00510 ntpSlice = dynamic_cast<NtpSRSlice *>(sliceArray[islc]);
00511 status = true;
00512 }
00513 else ntpSlice = 0;
00514
00515 return status;
00516 }
|
|
||||||||||||
|
Definition at line 627 of file MadBase.cxx. References LoadEvent(), LoadSlice(), LoadTHSlice(), ntpEvent, ntpSlice, and NtpSREvent::slc. Referenced by MadScanDisplay::Display(), MadEvDisplay::Display(), GetSliceForRecoTH(), MadScanDisplay::NextPass(), MadEvDisplay::NextPass(), MadScanDisplay::PrevPass(), and MadEvDisplay::PrevPass(). 00627 {
00628
00629 Bool_t status = false;
00630 ntpSlice = 0;
00631 if(!LoadEvent(ievt)) return status;
00632 if(!isMC) return status;
00633 if(!isTH) return status;
00634
00635 /*
00636 Int_t itru = 0;
00637 if(LoadTruthForRecoTH(ievt,itru)){
00638 Int_t count = 0;
00639 while(!status){
00640 if(!LoadTHSlice(count)) break;
00641 if(ntpTHSlice->neumc==itru) {
00642 if(LoadSlice(count)){
00643 islice = count;
00644 status = true;
00645 }
00646 }
00647 count += 1;
00648 }
00649 }
00650 */
00651
00652 //Tingjun's sugggested change:
00653 islice = ntpEvent->slc;
00654 if (LoadSlice(islice)&&LoadTHSlice(islice)) status = true;
00655
00656 return status;
00657 }
|
|
|
Definition at line 571 of file MadBase.cxx. References mcrecord, ntpStdHep, NtpMCRecord::stdhep, NtpStRecord::stdhep, and strecord. Referenced by MadScanDisplay::DrawInteractionDiagram(), MadEvDisplay::DrawInteractionDiagram(), GetEntry(), GetStdHep(), MadQuantities::HadronicFinalState(), MadQuantities::Initial_state(), MadCluAnalysis::Plot(), and MadQuantities::SetStdHepVars(). 00571 {
00572
00573 Bool_t status = false;
00574 if(!isMC) return status;
00575 TClonesArray* pointStdhepArray = NULL;
00576 if(isST) pointStdhepArray = (strecord->stdhep);
00577 else pointStdhepArray = (mcrecord->stdhep);
00578 TClonesArray& stdhepArray = *pointStdhepArray;
00579 //MAK:06/06/05 if(ish>=0&&ish<stdhepArray.GetEntries()) {
00580 if(ish>=0&&ish<stdhepArray.GetEntriesFast()) {
00581 ntpStdHep = dynamic_cast<NtpMCStdHep *>(stdhepArray[ish]);
00582 status = true;
00583 }
00584 else ntpStdHep = 0;
00585
00586 return status;
00587 }
|
|
|
|
Definition at line 270 of file MadBase.cxx. References ntpTHEvent, strecord, NtpTHRecord::thevt, NtpStRecord::thevt, and threcord. Referenced by MadPIDAnalysis::CreatePAN(), MadAnalysis::CreatePAN(), MadScanDisplay::Display(), MadEvDisplay::Display(), GetEntry(), GetTHEvent(), and MadQuantities::ShowerValidation(). 00270 {
00271
00272 Bool_t status = false;
00273 if(!isTH) return status;
00274 TClonesArray* pointEventArray = NULL;
00275 if(isST) pointEventArray = (strecord->thevt);
00276 else pointEventArray = (threcord->thevt);
00277 TClonesArray& eventArray = *pointEventArray;
00278 //MAK:06/06/05 if(ievt>=0&&ievt<eventArray.GetEntries()) {
00279 if(ievt>=0&&ievt<eventArray.GetEntriesFast()) {
00280 ntpTHEvent = dynamic_cast<NtpTHEvent *>(eventArray[ievt]);
00281 status = true;
00282 }
00283 else ntpTHEvent = 0;
00284
00285 return status;
00286 }
|
|
|
Definition at line 483 of file MadBase.cxx. References ntpTHShower, strecord, threcord, NtpTHRecord::thshw, and NtpStRecord::thshw. Referenced by MadMKAnalysis::CreatePAN(), MadAnalysis::CreatePAN(), MadScanDisplay::DrawTextBox(), MadEvDisplay::DrawTextBox(), GetEntry(), GetTHShower(), LoadTruthForRecoTH(), and MadQuantities::ShowerValidation(). 00483 {
00484
00485 Bool_t status = false;
00486 if(!isTH) return status;
00487 TClonesArray* pointShowerArray = NULL;
00488 if(isST) pointShowerArray = (strecord->thshw);
00489 else pointShowerArray = (threcord->thshw);
00490 TClonesArray& showerArray = *pointShowerArray;
00491 //MAK:06/06/05 if(ishw>=0&&ishw<showerArray.GetEntries()) {
00492 if(ishw>=0&&ishw<showerArray.GetEntriesFast()) {
00493 ntpTHShower = dynamic_cast<NtpTHShower *>(showerArray[ishw]);
00494 status = true;
00495 }
00496 else ntpTHShower = 0;
00497
00498 return status;
00499 }
|
|
|
Definition at line 518 of file MadBase.cxx. References ntpTHSlice, strecord, threcord, NtpTHRecord::thslc, and NtpStRecord::thslc. Referenced by MadScanDisplay::DrawTextBox(), MadEvDisplay::DrawTextBox(), GetEntry(), GetTHSlice(), and LoadSliceForRecoTH(). 00518 {
00519
00520 Bool_t status = false;
00521 if(!isTH) return status;
00522 TClonesArray* pointSliceArray = NULL;
00523 if(isST) pointSliceArray = (strecord->thslc);
00524 else pointSliceArray = (threcord->thslc);
00525 TClonesArray& sliceArray = *pointSliceArray;
00526 //MAK:06/06/05 if(islc>=0&&islc<sliceArray.GetEntries()) {
00527 if(islc>=0&&islc<sliceArray.GetEntriesFast()) {
00528 ntpTHSlice = dynamic_cast<NtpTHSlice *>(sliceArray[islc]);
00529 status = true;
00530 }
00531 else ntpTHSlice = 0;
00532
00533 return status;
00534 }
|
|
|
Definition at line 288 of file MadBase.cxx. References ntpTHTrack, strecord, threcord, NtpTHRecord::thtrk, and NtpStRecord::thtrk. Referenced by MadAnalysis::CreatePAN(), MadScanDisplay::DrawTextBox(), MadEvDisplay::DrawTextBox(), GetEntry(), GetTHTrack(), LoadTruthForRecoTH(), MadTestAnalysis::MakeMyFile(), MadPIDAnalysis::MakeMyFile(), MadDpAnalysis::MakeMyFile(), MadEdAnalysis::MyMakeMyFile(), and MadQuantities::ShowerValidation(). 00288 {
00289
00290 Bool_t status = false;
00291 if(!isTH) return status;
00292 TClonesArray* pointTrackArray = NULL;
00293 if(isST) pointTrackArray = (strecord->thtrk);
00294 else pointTrackArray = (threcord->thtrk);
00295 TClonesArray& trackArray = *pointTrackArray;
00296 //MAK:06/06/05 if(itrk>=0&&itrk<trackArray.GetEntries()) {
00297 if(itrk>=0&&itrk<trackArray.GetEntriesFast()) {
00298 ntpTHTrack = dynamic_cast<NtpTHTrack *>(trackArray[itrk]);
00299 status = true;
00300 }
00301 else ntpTHTrack = 0;
00302
00303 return status;
00304 }
|
|
|
|
||||||||||||
|
Definition at line 589 of file MadBase.cxx. References LoadEvent(), LoadTruth(), NtpMCRecord::mc, NtpStRecord::mc, mcrecord, ntpEvent, ntpTruth, strecord, NtpSREvent::vtx, NtpMCTruth::vtxx, NtpMCTruth::vtxy, NtpMCTruth::vtxz, NtpSRVertex::x, NtpSRVertex::y, and NtpSRVertex::z. Referenced by MadScanDisplay::Display(), MadEvDisplay::Display(), and GetTruthForReco(). 00589 {
00590
00591 Bool_t status = false;
00592 ntpTruth = 0;
00593 if(!LoadEvent(ievt)) return status;
00594 if(!isMC) return status;
00595
00596 TClonesArray* pointMcArray = NULL;
00597 if(isST) pointMcArray = (strecord->mc);
00598 else pointMcArray = (mcrecord->mc);
00599 TClonesArray& mcArray = *pointMcArray;
00600 if(mcArray.GetEntries()==1) { //if only one MC event is present just load it
00601 LoadTruth(0);
00602 return true;
00603 }
00604
00605 float mindist = 999;
00606 int itr = 0;
00607 //loop over all MC events and look for closest vertex to reco vertex
00608 for(int i=0;i<mcArray.GetEntries();i++){
00609 ntpTruth = dynamic_cast<NtpMCTruth *>(mcArray[i]);
00610 float dist = sqrt(TMath::Power(ntpTruth->vtxx/100.-ntpEvent->vtx.x,2)
00611 +TMath::Power(ntpTruth->vtxy/100.-ntpEvent->vtx.y,2)
00612 +TMath::Power(ntpTruth->vtxz/100.-ntpEvent->vtx.z,2));
00613 if(dist<mindist) {
00614 itr = i;
00615 mindist = dist;
00616 }
00617 }
00618
00619 if(mindist<0.5) { //Need to place a fairly loose cut to pick up showers
00620 status = true; //From looking at FarDet events, a cut of 0.5m
00621 LoadTruth(itr); //correctly pairs up 95% of events (LE beam,unoscillated)
00622 itruth = itr;
00623 }
00624 return status;
00625 }
|
|
||||||||||||
|
||||||||||||||||
|
Definition at line 406 of file MadBase.cxx. References CorrectShowerEnergyFar(), CorrectShowerEnergyNear(), det, NtpSRShowerPulseHeight::EMgev, NtpSRStripPulseHeight::gev, NtpSRShowerPulseHeight::linCCgev, NtpSRShowerPulseHeight::linNCgev, LoadShower(), ntpShower, NtpSRShower::ph, NtpSRShower::shwph, NtpSRShowerPulseHeight::wtCCgev, and NtpSRShowerPulseHeight::wtNCgev. Referenced by LoadShower_Jim(). 00406 {
00407 //use SR reco
00408 Float_t shower_ene=0;
00409
00410 if(LoadShower(ishw)) {
00411 if(det==1){
00412 if(opt==-1) shower_ene = ntpShower->ph.gev;
00413 if(opt==0) shower_ene = CorrectShowerEnergyNear(ntpShower->shwph.linCCgev,CandShowerHandle::kCC);
00414 if(opt==1) shower_ene = CorrectShowerEnergyNear(ntpShower->shwph.wtCCgev,CandShowerHandle::kWtCC);
00415 if(opt==2) shower_ene = CorrectShowerEnergyNear(ntpShower->shwph.linNCgev,CandShowerHandle::kNC);
00416 if(opt==3) shower_ene = CorrectShowerEnergyNear(ntpShower->shwph.wtNCgev,CandShowerHandle::kWtNC);
00417 if(opt==4) shower_ene = ntpShower->shwph.EMgev;
00418 return shower_ene;
00419 }
00420 if(det==2){
00421 if(opt==-1) shower_ene = ntpShower->ph.gev;
00422 if(opt==0) shower_ene = CorrectShowerEnergyFar(ntpShower->shwph.linCCgev,CandShowerHandle::kCC);
00423 if(opt==1) shower_ene = CorrectShowerEnergyFar(ntpShower->shwph.wtCCgev,CandShowerHandle::kWtCC);
00424 if(opt==2) shower_ene = CorrectShowerEnergyFar(ntpShower->shwph.linNCgev,CandShowerHandle::kNC);
00425 if(opt==3) shower_ene = CorrectShowerEnergyFar(ntpShower->shwph.wtNCgev,CandShowerHandle::kWtNC);
00426 if(opt==4) shower_ene = ntpShower->shwph.EMgev;
00427 return shower_ene;
00428
00429 }
00430 }
00431 return 0;
00432 }
|
|
|
Definition at line 58 of file MadBase.h. Referenced by GetEntry(). |
|
|
Definition at line 57 of file MadBase.h. Referenced by GetEntry(). |
|
|
Definition at line 79 of file MadBase.h. Referenced by GetEntry(), InitChain(), LoadEMShower(), and MadBase(). |
|
|
Definition at line 56 of file MadBase.h. Referenced by Clear(), and GetEntry(). |
|
|
Definition at line 44 of file MadBase.h. Referenced by GetEntry(), InitChain(), and MadBase(). |
|
|
Definition at line 47 of file MadBase.h. Referenced by GetEntry(), and MadBase(). |
|
|
Definition at line 45 of file MadBase.h. Referenced by GetEntry(), and MadBase(). |
|
|
Definition at line 85 of file MadBase.h. Referenced by GetEntry(), InitChain(), and MadBase(). |
|
|
Definition at line 83 of file MadBase.h. Referenced by GetEntry(), InitChain(), and MadBase(). |
|
|
Definition at line 86 of file MadBase.h. Referenced by InitChain(), and MadBase(). |
|
|
Definition at line 84 of file MadBase.h. Referenced by GetEntry(), InitChain(), and MadBase(). |
|
|
Definition at line 46 of file MadBase.h. Referenced by GetEntry(), and MadBase(). |
|
|
Definition at line 48 of file MadBase.h. Referenced by GetEntry(), and MadBase(). |
|
|
Definition at line 69 of file MadBase.h. Referenced by GetEntry(). |
|
|
Definition at line 68 of file MadBase.h. Referenced by GetEntry(), InitChain(), LoadStdHep(), LoadTruth(), LoadTruthForReco(), and MadBase(). |
|
|
Definition at line 87 of file MadBase.h. Referenced by InitChain(), and MadBase(). |
|
|
Definition at line 63 of file MadBase.h. Referenced by Clear(), and LoadCluster(). |
|
|
Definition at line 81 of file MadBase.h. Referenced by Clear(), and LoadEMShower(). |
|
|
Definition at line 80 of file MadBase.h. Referenced by Clear(), and GetEntry(). |
|
|
Definition at line 60 of file MadBase.h. Referenced by Clear(), LoadEvent(), LoadLargestShowerFromEvent(), LoadLargestTrackFromEvent(), LoadShower_Jim(), LoadShowerAtTrackVertex(), LoadSliceForRecoTH(), LoadTruthForReco(), and LoadTruthForRecoTH(). |
|
|
Definition at line 54 of file MadBase.h. Referenced by Clear(), and GetEntry(). |
|
|
Definition at line 65 of file MadBase.h. Referenced by Clear(), and LoadShieldStrip(). |
|
|
Definition at line 62 of file MadBase.h. Referenced by Clear(), LoadLargestShowerFromEvent(), LoadShower(), LoadShower_Jim(), LoadShowerAtTrackVertex(), and RecoShwEnergy(). |
|
|
Definition at line 64 of file MadBase.h. Referenced by Clear(), LoadSlice(), and LoadSliceForRecoTH(). |
|
|
Definition at line 71 of file MadBase.h. Referenced by Clear(), and LoadStdHep(). |
|
|
Definition at line 66 of file MadBase.h. Referenced by Clear(), and LoadStrip(). |
|
|
Definition at line 75 of file MadBase.h. Referenced by LoadTHEvent(). |
|
|
Definition at line 77 of file MadBase.h. Referenced by Clear(), LoadTHShower(), and LoadTruthForRecoTH(). |
|
|
Definition at line 74 of file MadBase.h. Referenced by Clear(), and LoadTHSlice(). |
|
|
Definition at line 76 of file MadBase.h. Referenced by Clear(), LoadTHTrack(), and LoadTruthForRecoTH(). |
|
|
Definition at line 61 of file MadBase.h. Referenced by Clear(), LoadLargestTrackFromEvent(), LoadShower_Jim(), LoadShowerAtTrackVertex(), and LoadTrack(). |
|
|
Definition at line 70 of file MadBase.h. Referenced by Clear(), LoadTruth(), LoadTruthForReco(), and LoadTruthForRecoTH(). |
|
|
Definition at line 53 of file MadBase.h. Referenced by GetEntry(), InitChain(), LoadCluster(), LoadEvent(), LoadShieldStrip(), LoadShower(), LoadSlice(), LoadStrip(), LoadTrack(), and MadBase(). |
|
|
Definition at line 55 of file MadBase.h. Referenced by Clear(), and GetEntry(). |
|
|
Definition at line 52 of file MadBase.h. Referenced by GetEntry(), InitChain(), LoadCluster(), LoadEvent(), LoadShieldStrip(), LoadShower(), LoadSlice(), LoadStdHep(), LoadStrip(), LoadTHEvent(), LoadTHShower(), LoadTHSlice(), LoadTHTrack(), LoadTrack(), LoadTruth(), LoadTruthForReco(), and MadBase(). |
|
|
Definition at line 73 of file MadBase.h. Referenced by GetEntry(), InitChain(), LoadTHEvent(), LoadTHShower(), LoadTHSlice(), LoadTHTrack(), and MadBase(). |
|
|
Definition at line 50 of file MadBase.h. Referenced by GetEntry(), and MadBase(). |
1.3.9.1