NuExtraction Class Reference

#include <NuExtraction.h>

List of all members.

Public Member Functions

 NuExtraction ()
 ~NuExtraction ()
void ExtractAdditionalDSTVariables (NuEvent &nu) const
void ExtractAuxiliaryInfo (const NtpStRecord &ntp, const NtpSREvent &evt, const NtpFitSARecord *pntpSA, NuEvent &nu) const
void ExtractBasicInfo (const NtpStRecord &ntp, const NtpSREvent &evt, NuEvent &nu) const
void ExtractBeamInfoDB (NuEvent &nu) const
void ExtractCoilCurrent (NuEvent &nu) const
void ExtractCoilInfo (NuEvent &nu) const
void ExtractDataQuality (NuEvent &nu) const
void ExtractEvtInfo (const NtpSREvent &evt, NuEvent &nu) const
void ExtractGeneralInfo (const NtpStRecord &ntp, NuEvent &nu) const
void ExtractLITags (const NtpStRecord &ntp, NuEvent &nu) const
void ExtractMajorityCurvature (const NtpStRecord &ntp, const NtpSREvent &evt, NuEvent &nu) const
void ExtractTimeToNearestSpill (NuEvent &nu) const
void ExtractTimingFiducial (NuEvent &nu) const
void ExtractVertexTimeFit (const NtpStRecord &ntp, const NtpSREvent &evt, NuEvent &nu) const
void ExtractTrkShwInfo (const NtpStRecord &ntp, const NtpSREvent &evt, NuEvent &nu) const
void ExtractMinMaxEvtTimes (const NtpStRecord &ntp, const NtpSREvent &evt, NuEvent &nu) const
void ExtractSAFitInfo (const NtpFitSARecord *pntpSA, NuEvent &nu) const
void ExtractShwInfo (const NtpStRecord &ntp, const NtpSREvent &evt, NuEvent &nu) const
void ExtractTrkInfo (const NtpStRecord &ntp, const NtpSREvent &evt, NuEvent &nu) const
void ExtractNCInfo (const NtpStRecord *ptnp, Int_t eventNb, NuEvent &nu) const
void NuMCEventFromNuEvent (const NuEvent &nu, NuMCEvent &numc) const
void NuEventFromNuMCEvent (const NuMCEvent &mc, NuEvent &nu) const

Protected Member Functions

void ExtractNthTrkInfo (int trkIdx, const NtpStRecord &ntp, const NtpSREvent &evt, NuEvent &nu) const
 Helper for ExtractTrkInfo.


Detailed Description

Definition at line 22 of file NuExtraction.h.


Constructor & Destructor Documentation

NuExtraction::NuExtraction (  ) 

Definition at line 71 of file NuExtraction.cxx.

References Msg::kDebug, and MSG.

00072 {
00073   MSG("NuExtraction",Msg::kDebug)
00074     <<"Running NuExtraction Constructor..."<<endl;
00075 
00076 
00077   MSG("NuExtraction",Msg::kDebug)
00078     <<"Finished NuExtraction Constructor"<<endl;
00079 }

NuExtraction::~NuExtraction (  ) 

Definition at line 83 of file NuExtraction.cxx.

References Msg::kDebug, and MSG.

00084 {
00085   MSG("NuExtraction",Msg::kDebug)
00086     <<"Running NuExtraction Destructor..."<<endl;
00087 
00088 
00089   MSG("NuExtraction",Msg::kDebug)
00090     <<"Finished NuExtraction Destructor"<<endl;
00091 }


Member Function Documentation

void NuExtraction::ExtractAdditionalDSTVariables ( NuEvent nu  )  const

Definition at line 1232 of file NuExtraction.cxx.

Referenced by ExtractAuxiliaryInfo().

01233 {
01234 
01236 /*
01237   //get an instance of the code library
01238   const NuLibrary& lib=NuLibrary::Instance();
01239 
01240   //set fiducial volume variables useful for DST interactive use
01241   if (nu.detector==Detector::kNear) {
01242     nu.fvnmb=lib.cuts.IsInFidVolNDNuMuBar
01243       (nu.xTrkVtx,nu.yTrkVtx,nu.zTrkVtx);
01244     nu.fvpitt=lib.cuts.IsInFidVolPitt
01245       (nu.xTrkVtx,nu.yTrkVtx,nu.zTrkVtx,nu.uTrkVtx,nu.vTrkVtx);
01246     nu.fvcc=lib.cuts.IsInFidVolNDCC0250Std
01247       (nu.xTrkVtx,nu.yTrkVtx,nu.zTrkVtx);
01248   }
01249   else if (nu.detector==Detector::kFar) {
01250     nu.fvcc=lib.cuts.IsInFidVolFDCC0250Std
01251       (nu.planeTrkVtx,nu.rTrkVtx);
01252     //just set these other two to the std CC one
01253     //there are no specialised FD fid vols yet
01254     nu.fvnmb=nu.fvcc;
01255     nu.fvpitt=nu.fvcc;
01256   }
01257   else {
01258     cout<<"Ahhhh, det="<<nu.detector<<endl;
01259   }
01260 */
01261 
01262 }

void NuExtraction::ExtractAuxiliaryInfo ( const NtpStRecord ntp,
const NtpSREvent evt,
const NtpFitSARecord pntpSA,
NuEvent nu 
) const

Definition at line 113 of file NuExtraction.cxx.

References ExtractAdditionalDSTVariables(), ExtractBeamInfoDB(), ExtractDataQuality(), ExtractLITags(), ExtractMinMaxEvtTimes(), ExtractSAFitInfo(), ExtractTimeToNearestSpill(), ExtractTimingFiducial(), and ExtractVertexTimeFit().

Referenced by NuAnalysis::DoExtractions().

00117 {
00118   //extract a bunch of supplementary information needed for analysis
00119 
00120   //get the SA fitter information if it is available
00121   this->ExtractSAFitInfo(pntpSA,nu);
00122   //get the timing info
00123   this->ExtractMinMaxEvtTimes(ntp,evt,nu);
00124   this->ExtractTimeToNearestSpill(nu);
00125   this->ExtractTimingFiducial(nu);
00126   this->ExtractVertexTimeFit(ntp, evt, nu);
00127   //get the data quality
00128   this->ExtractDataQuality(nu);
00129   this->ExtractLITags(ntp,nu);
00130   this->ExtractBeamInfoDB(nu);//done per snarl but do here as safer
00131   this->ExtractAdditionalDSTVariables(nu);
00132 }

void NuExtraction::ExtractBasicInfo ( const NtpStRecord ntp,
const NtpSREvent evt,
NuEvent nu 
) const

Definition at line 95 of file NuExtraction.cxx.

References ExtractEvtInfo(), ExtractGeneralInfo(), ExtractShwInfo(), and ExtractTrkInfo().

Referenced by NuAnalysis::ChargeSeparationOneSnarl(), and NuAnalysis::MakeFullDST().

00098 {
00100 
00101   //get the run, snarl, etc info
00102   this->ExtractGeneralInfo(ntp,nu);
00103   //get info from the evt
00104   this->ExtractEvtInfo(evt,nu);
00105   //extract trk info (needed to get best track info)
00106   this->ExtractTrkInfo(ntp,evt,nu);
00107   //extract shw info
00108   this->ExtractShwInfo(ntp,evt,nu);
00109 }

void NuExtraction::ExtractBeamInfoDB ( NuEvent nu  )  const

Definition at line 370 of file NuExtraction.cxx.

References BeamType::AsString(), BeamMonSpill::BeamType(), NuEvent::beamTypeDB, NuEvent::detector, MuELoss::e, BeamMonSpill::fBpmInt, BeamMonSpill::fHornCur, BeamMonSpill::fTortgt, BDSpillAccessor::Get(), VldTimeStamp::GetSeconds(), VldContext::GetTimeStamp(), NuReco::GetVldContext(), NuEvent::goodBeam, NuEvent::hornCur, NuEvent::hornIsReverse, NuLibrary::Instance(), BeamMonSpill::IsRHCRunning(), SimFlag::kData, Msg::kInfo, BeamType::kL010z185i, BeamType::kL010z185i_rev, Msg::kWarning, BDSpillAccessor::LoadSpill(), MAXMSG, NuEvent::nBatch, NuEvent::potDB, NuLibrary::reco, NuEvent::runPeriod, BMSpillAna::SelectSpill(), BMSpillAna::SetSpill(), BMSpillAna::SetTimeDiff(), NuEvent::simFlag, BeamMonSpill::SpillTime(), BMSpillAna::UseDatabaseCuts(), NuEvent::useDBForBeamInfo, NuUtilities::vtsRunIEnd, NuUtilities::vtsRunIIEnd, NuUtilities::vtsRunIIIEnd, NuUtilities::vtsRunIVEnd, NuUtilities::vtsRunIXEnd, NuUtilities::vtsRunVEnd, NuUtilities::vtsRunVIEnd, NuUtilities::vtsRunVIIEnd, NuUtilities::vtsRunVIIIEnd, and NuUtilities::vtsRunXEnd.

Referenced by NuDemoModule::Ana(), ExtractAuxiliaryInfo(), and NuAnalysis::MakeFullDST().

00371 {
00372   //note that all beam data is per snarl (not event)
00373   //there is an inefficiency in calling this function for every
00374   //event in a ND snarl (but probably not a big deal)
00375 
00376   //check if data
00377   if (nu.simFlag!=SimFlag::kData) {
00378     MAXMSG("NuExtraction",Msg::kInfo,1)
00379       <<"Not extracting BeamInfoDB for simFlag="<<nu.simFlag
00380       <<endl;
00381     return;
00382   }
00383 
00384   //check whether to use the database
00385   if (!nu.useDBForBeamInfo) {
00386     MAXMSG("NuExtraction",Msg::kWarning,1)
00387       <<"Not extracting BeamInfoDB (flag set to not query database)"
00388       <<endl;
00389     //leave values as current (for re-reconstruction case)
00390     return;
00391   }
00392 
00393   MAXMSG("NuExtraction",Msg::kInfo,1)
00394     <<"Extracting BeamInfoDB for simFlag="<<nu.simFlag
00395     <<", detector="<<nu.detector<<endl;
00396 
00397   //get an instance of the code library
00398   const NuLibrary& lib=NuLibrary::Instance();
00399 
00400   //get the event time stamp
00401   VldContext vc=lib.reco.GetVldContext(nu);
00402   VldTimeStamp vts=vc.GetTimeStamp();
00403 
00404   //get a spill accessor
00405   BDSpillAccessor &sa = BDSpillAccessor::Get();
00406   const BeamMonSpill *bs = sa.LoadSpill(vts);
00407 
00408   //now determine if good beam
00409   Bool_t goodBeam=false;
00410   BMSpillAna bmana;
00411   bmana.UseDatabaseCuts();
00412   bmana.SetSpill(*bs);
00413 
00414   //set the time difference to determine if spill is in time
00415   VldTimeStamp delta_vts=vts-bs->SpillTime();
00416   bmana.SetTimeDiff(delta_vts.GetSeconds());
00417 
00418   //determine whether to select
00419   if(bmana.SelectSpill()) goodBeam=true;
00420   else goodBeam=false;
00421 
00422   //store the variable
00423   nu.goodBeam=goodBeam;
00424 
00425   //store the beam variables (these are junk if the spill is not in time)
00426   nu.hornCur=bs->fHornCur;
00427   nu.beamTypeDB=bs->BeamType();
00428   nu.potDB=bs->fTortgt;
00429 
00430   const float* batchStructure = bs->fBpmInt;
00431   Int_t batchCounter = 0;
00432   for (Int_t iBatch = 0; iBatch < 6; ++iBatch){
00433     if (batchStructure[iBatch] > 1e-5){++batchCounter;}
00434   }
00435   nu.nBatch = batchCounter;
00436 
00437   if     (vts.GetSeconds() < NuUtilities::vtsRunIEnd.GetSeconds()) nu.runPeriod = 1;
00438   else if(vts.GetSeconds() < NuUtilities::vtsRunIIEnd.GetSeconds()) nu.runPeriod = 2;
00439   else if(vts.GetSeconds() < NuUtilities::vtsRunIIIEnd.GetSeconds()) nu.runPeriod = 3;
00440   else if(vts.GetSeconds() < NuUtilities::vtsRunIVEnd.GetSeconds()) nu.runPeriod = 4;
00441   else if(vts.GetSeconds() < NuUtilities::vtsRunVEnd.GetSeconds()) nu.runPeriod = 5;
00442   else if(vts.GetSeconds() < NuUtilities::vtsRunVIEnd.GetSeconds()) nu.runPeriod = 6;
00443   else if(vts.GetSeconds() < NuUtilities::vtsRunVIIEnd.GetSeconds()) nu.runPeriod = 7;
00444   else if(vts.GetSeconds() < NuUtilities::vtsRunVIIIEnd.GetSeconds()) nu.runPeriod = 8;
00445   else if(vts.GetSeconds() < NuUtilities::vtsRunIXEnd.GetSeconds()) nu.runPeriod = 9;
00446   else if(vts.GetSeconds() < NuUtilities::vtsRunXEnd.GetSeconds()) nu.runPeriod = 10;
00447   else nu.runPeriod = 11;
00448 
00449   // Check for RHC
00450   if (BeamMonSpill::IsRHCRunning(vts)){
00451     MAXMSG("NuExtraction",Msg::kInfo, 10)
00452       << "Found RHC date: " << vts.AsString() << endl;
00453     nu.hornIsReverse =  true;
00454     nu.hornCur *= -1;
00455     if (nu.beamTypeDB == BeamType::kL010z185i_rev){
00456       MAXMSG("NuAnalysis", Msg::kInfo, 10) << "RHC beam already set to kL010z185i_rev."
00457                                            << " Doing nothing."
00458                                            << endl;
00459     }
00460     else if (nu.beamTypeDB == BeamType::kL010z185i){
00461       MAXMSG("NuAnalysis", Msg::kWarning, 10000) << "RHC beam set to kL010z185i. "
00462                                                  << "Setting maually to kL010z185i_rev. "
00463                                                  << "But this shouldn't happen! "
00464                                                  << "Please look into what's gone wrong."
00465                                                  << endl;
00466       nu.beamTypeDB = BeamType::kL010z185i_rev;
00467     }
00468     else {MAXMSG("NuAnalysis",Msg::kWarning,1000)
00469       << "No non le010z185i RHC beam types -- keeping " 
00470       << BeamType::AsString(static_cast<BeamType::BeamType_t>(nu.beamTypeDB)) << endl;}
00471   }
00472   else {
00473     MAXMSG("NuExtraction",Msg::kInfo, 10)
00474       << "Found FHC date: " << vts.AsString() << endl;
00475     nu.hornIsReverse = false;
00476   }
00477 
00478   MAXMSG("NuExtraction",Msg::kInfo,10)
00479     <<"Extracting BeamInfoDB found"
00480     <<  " goodBeam=" << nu.goodBeam
00481     << ", hornCur=" << nu.hornCur
00482     << ", beamTypeDB=" << nu.beamTypeDB
00483     << ", potDB=" << nu.potDB
00484     << ", hornIsReverse="<< (nu.hornIsReverse?"Yes":"No")
00485     << ", runPeriod=" << nu.runPeriod
00486     << endl;
00487 
00488   //other possibilities
00489   //Float_t hbw=bs->fProfWidX*1000.;//make it in mm
00490   //Float_t vbw=bs->fProfWidY*1000.;//make it in mm
00491   //Float_t hpos1=bs->fTargProfX*1000.;//make it in mm
00492   //Float_t vpos1=bs->fTargProfY*1000.;//make it in mm
00493   //BeamType::BeamType_t beamType=bs->BeamType();
00494   //Bool_t horn_on = bs->GetStatusBits().horn_on;
00495   //Bool_t target_in = bs->GetStatusBits().target_in;
00496 }

void NuExtraction::ExtractCoilCurrent ( NuEvent nu  )  const

Definition at line 279 of file NuExtraction.cxx.

References NuEvent::coilCurrent, NuEvent::detector, CoilTools::GetCoilState(), BfldDbiCoilState::GetCurrent(), Dcs_Mag_Near::GetCurrent(), CoilTools::GetMagNear(), NuReco::GetVldContext(), CoilTools::Instance(), NuLibrary::Instance(), SimFlag::kData, Detector::kFar, Msg::kInfo, Detector::kNear, Msg::kWarning, MAXMSG, NuLibrary::reco, NuEvent::simFlag, and NuEvent::useDBForDataQuality.

Referenced by ExtractCoilInfo().

00280 {
00281   //return if not data
00282   if (nu.simFlag!=SimFlag::kData) {
00283     MAXMSG("NuExtraction",Msg::kInfo,1)
00284       <<"Not extracting CoilCurrent for simFlag="<<nu.simFlag<<endl;
00285     return;
00286   }
00287 
00288   //check whether to use the database
00289   if (!nu.useDBForDataQuality) {//use data quality flag
00290     MAXMSG("NuExtraction",Msg::kWarning,1)
00291       <<"Not extracting CoilCurrent (flag set to not query database)"
00292       <<endl;
00293     //leave values as they are (for re-reconstruction case)
00294     return;
00295   }
00296 
00297   //get an instance of the code library
00298   const NuLibrary& lib=NuLibrary::Instance();
00299 
00300   //get vc
00301   VldContext vc=lib.reco.GetVldContext(nu);
00302 
00303   //get the current, depending on detector
00304   if (nu.detector==Detector::kNear) {
00305     const Dcs_Mag_Near* magnear=CoilTools::Instance().GetMagNear(vc);
00306     if (magnear) nu.coilCurrent=magnear->GetCurrent();
00307     else {
00308       MAXMSG("NuExtraction",Msg::kWarning,10)
00309         <<"No rows in Dcs_Mag_Near DB table for VldContext="<<vc
00310         <<" setting coilCurrent=0"<<endl;
00311       nu.coilCurrent=0;//set to default value
00312     }
00313   }
00314   else if (nu.detector==Detector::kFar) {
00315     const BfldDbiCoilState* coilstate1=
00316       CoilTools::Instance().GetCoilState(vc,1);
00317     const BfldDbiCoilState* coilstate2=
00318       CoilTools::Instance().GetCoilState(vc,2);
00319     //ahh, two values, one slot ... take average
00320     if (coilstate1 && coilstate2) {
00321       nu.coilCurrent=0.5*(coilstate1->GetCurrent()+
00322                           coilstate2->GetCurrent());
00323     }
00324     else {
00325       MAXMSG("NuExtraction",Msg::kInfo,10)
00326         <<"Insufficient rows in BfldDbiCoilState DB table, VldContext="
00327         <<vc<<" setting coilCurrent=0"<<endl;
00328       nu.coilCurrent=0;//set to default value
00329     }
00330   }
00331   else cout<<"Ahhh, det="<<nu.detector<<endl;
00332 
00333   //The old slow way:
00334   //DbiResultPtr<Dcs_Mag_Near> ptr(vc);
00335   //if(ptr.GetNumRows()){
00336   //const Dcs_Mag_Near* row=ptr.GetRow(0);
00337   //nu.coilCurrent=row->GetCurrent();
00338   //}
00339   //else {
00340   //MAXMSG("NuExtraction",Msg::kInfo,10)
00341   //  <<"No rows in Dcs_Mag_Near DB table for VldContext="<<vc
00342   //  <<" setting coilCurrent=0"<<endl;
00343   //nu.coilCurrent=0;//set to default value
00344   //}
00345 
00346   MAXMSG("NuExtraction",Msg::kInfo,10)
00347     <<"Extracted CoilCurrent="<<nu.coilCurrent<<endl;
00348 }

void NuExtraction::ExtractCoilInfo ( NuEvent nu  )  const

Definition at line 225 of file NuExtraction.cxx.

References NuEvent::coilIsOk, NuEvent::coilIsReverse, ExtractCoilCurrent(), NuUtilities::GetDigit(), NuReco::GetVldContext(), NuLibrary::Instance(), CoilTools::IsOK(), CoilTools::IsReverse(), SimFlag::kData, Msg::kInfo, Msg::kWarning, MAXMSG, NuLibrary::reco, NuEvent::run, NuEvent::simFlag, and NuEvent::useDBForDataQuality.

Referenced by NuAnalysis::ChargeSeparationOneSnarl(), and NuAnalysis::MakeFullDST().

00226 {
00227   //return if not data
00228   if (nu.simFlag!=SimFlag::kData) {
00229     MAXMSG("NuExtraction",Msg::kInfo,1)
00230       <<"Not extracting Coil info for simFlag="<<nu.simFlag<<endl;
00231     //set these to be the most likely values
00232     nu.coilIsOk=true;
00233     int fieldNo = NuUtilities::GetDigit(nu.run, 5);
00234     if (fieldNo == 1 || fieldNo == 3) {
00235       MAXMSG("NuExtraction",Msg::kInfo,1)
00236       << "Found field id #" << fieldNo << ", setting coil current to forward."
00237       <<endl;
00238       nu.coilIsReverse=false;
00239     }
00240     else if (fieldNo == 2 || fieldNo == 4) {
00241       MAXMSG("NuExtraction",Msg::kInfo,1)
00242       << "Found field id #" << fieldNo << ", setting coil current to reverse."
00243       <<endl;
00244       nu.coilIsReverse=true;
00245     }
00246     else {
00247       MAXMSG("NuExtraction",Msg::kWarning,1)
00248       << "Don't recognize field id #" << fieldNo << ", only 1, 2, 3, 4 are allowed values.  Assuming field is forward."
00249       <<endl;
00250       nu.coilIsReverse=false;
00251     }
00252     return;
00253   }
00254 
00255   //check whether to use the database
00256   if (!nu.useDBForDataQuality) {//use data quality flag
00257     MAXMSG("NuExtraction",Msg::kWarning,1)
00258       <<"Not extracting CoilCurrent (flag set to not query database)"
00259       <<endl;
00260     //leave values as current (for re-reconstruction case)
00261     return;
00262   }
00263 
00264   //get an instance of the code library
00265   const NuLibrary& lib=NuLibrary::Instance();
00266   VldContext vc=lib.reco.GetVldContext(nu);
00267 
00268   //extract the information about the coil using CoilTools
00269   //this is much faster than using the database
00270   nu.coilIsOk=CoilTools::IsOK(vc);
00271   nu.coilIsReverse=CoilTools::IsReverse(vc);
00272 
00273   //get the coil current here too
00274   this->ExtractCoilCurrent(nu);
00275 }

void NuExtraction::ExtractDataQuality ( NuEvent nu  )  const

Definition at line 588 of file NuExtraction.cxx.

References NuEvent::deltaNanoSecToSpillGPS, NuEvent::deltaSecToSpillGPS, VldContext::GetDetector(), VldTimeStamp::GetNanoSec(), SpillServerMonFinder::GetNearestSpill(), VldTimeStamp::GetSec(), SpillServerMon::GetSpillTime(), SpillServerMon::GetSpillTimeError(), SpillServerMon::GetSpillType(), VldContext::GetTimeStamp(), NuReco::GetVldContext(), NuEvent::gpsError, NuEvent::gpsSpillType, SpillServerMonFinder::Instance(), NuLibrary::Instance(), DataUtil::IsGoodData(), DataUtil::IsGoodDataCOIL(), DataUtil::IsGoodDataGPS(), DataUtil::IsGoodDataHV(), NuEvent::isGoodDataQuality, NuEvent::isGoodDataQualityCOIL, NuEvent::isGoodDataQualityGPS, NuEvent::isGoodDataQualityHV, NuEvent::isGoodDataQualityRUN, DataUtil::IsGoodDataRUN(), SimFlag::kData, Detector::kFar, Msg::kInfo, Detector::kNear, Msg::kWarning, MAXMSG, NuEvent::numActiveCrates, NuEvent::numGoodSnarls, NuEvent::numTimeFrames, NuLibrary::reco, NuEvent::simFlag, NuEvent::snarlRateMax, NuEvent::snarlRateMedian, and NuEvent::useDBForDataQuality.

Referenced by NuDemoModule::Ana(), ExtractAuxiliaryInfo(), NuAnalysis::LIRejectionTest(), and NuAnalysis::MakeFullDST().

00589 {
00590   //return if not data
00591   if (nu.simFlag!=SimFlag::kData) {
00592     MAXMSG("NuExtraction",Msg::kInfo,1)
00593       <<"Not extracting Data Quality info for simFlag="<<nu.simFlag<<endl;
00594     //set these to be the most likely values
00595     nu.isGoodDataQuality = 1;
00596     nu.isGoodDataQualityRUN = 1;
00597     nu.isGoodDataQualityCOIL = 1;
00598     nu.isGoodDataQualityHV = 1;
00599     nu.isGoodDataQualityGPS = 1;
00600     return;
00601   }
00602 
00603   //check whether to use the database
00604   if (!nu.useDBForDataQuality) {
00605     MAXMSG("NuExtraction",Msg::kWarning,1)
00606       <<"Not extracting DataQuality"
00607       <<" (flag set to not query database)"
00608       <<", isGoodDataQuality="<<nu.isGoodDataQuality
00609       <<endl;
00610     //nu.isGoodDataQuality=leave as current value
00611     return;
00612   }
00613 
00614   // get validity context from ntuple record
00615   //const RecCandHeader* ntpHeader = &(ntp.GetHeader());
00616   //VldContext cx = ntpHeader->GetVldContext();
00617   //get an instance of the code library
00618   const NuLibrary& lib=NuLibrary::Instance();
00619   VldContext cx = lib.reco.GetVldContext(nu);
00620 
00621   // check data quality
00622   // ==================
00623   // run DataUtil methods
00624 
00625   nu.isGoodDataQuality = DataUtil::IsGoodData(cx);
00626   nu.isGoodDataQualityRUN = DataUtil::IsGoodDataRUN(cx);
00627   nu.isGoodDataQualityCOIL = DataUtil::IsGoodDataCOIL(cx);
00628   nu.isGoodDataQualityHV = DataUtil::IsGoodDataHV(cx);
00629   nu.isGoodDataQualityGPS = DataUtil::IsGoodDataGPS(cx);
00630 
00631   // extract run quality variables
00632   // =============================
00633 
00634   // far detector - search DbuFarRunQuality table
00635   if( cx.GetDetector() == Detector::kFar ) {
00636     // perform database query
00637     DbiResultPtr<DbuFarRunQuality> farquery("DBUFARRUNQUALITY",cx,0);
00638 
00639     if( farquery.GetNumRows()>0 ){
00640       const DbuFarRunQuality* rowptr = farquery.GetRow(0);
00641       nu.numActiveCrates = rowptr->GetCrateMask();
00642       nu.numTimeFrames = rowptr->GetTimeFrames();
00643       nu.numGoodSnarls = rowptr->GetGoodSnarls();
00644       nu.snarlRateMedian = rowptr->GetMedianSnarlRate();
00645       nu.snarlRateMax = rowptr->GetMaxSnarlRate();
00646     }
00647   }
00648 
00649   // near detector
00650   if( cx.GetDetector() == Detector::kNear ) {
00651     //perform database query
00652     DbiResultPtr<DbuNearRunQuality> nearquery("DBUNEARRUNQUALITY",cx,0);
00653 
00654     if( nearquery.GetNumRows()>0 ){
00655       const DbuNearRunQuality* rowptr = nearquery.GetRow(0);
00656       nu.numActiveCrates = 8 - rowptr->GetColdCrates();
00657       nu.numTimeFrames = rowptr->GetSubrunLength();
00658       nu.numGoodSnarls = rowptr->GetTriggersSpill();
00659       nu.snarlRateMedian = rowptr->GetSnarlRateMedian();
00660       nu.snarlRateMax = rowptr->GetSnarlRateMax();
00661     }
00662   }
00663 
00664 
00665   // extract gps data
00666   // ================
00667   // use SpillServerMonFinder to access nearest spill monitoring block,
00668   // only necessary for far detector
00669   if( cx.GetDetector() == Detector::kFar ) {
00670 
00671     SpillServerMonFinder& spillFinder = SpillServerMonFinder::Instance();
00672     const SpillServerMon& nearestSpill = spillFinder.GetNearestSpill(cx);
00673     VldTimeStamp dt = nearestSpill.GetSpillTime()-cx.GetTimeStamp();
00674 
00675     nu.deltaSecToSpillGPS = dt.GetSec();
00676     nu.deltaNanoSecToSpillGPS = dt.GetNanoSec();
00677     nu.gpsError = nearestSpill.GetSpillTimeError();
00678     nu.gpsSpillType = nearestSpill.GetSpillType();
00679   }
00680 
00681   // coil currents
00682   // =============
00683   // set this information in ExtractCoilInfo() method
00684 }

void NuExtraction::ExtractEvtInfo ( const NtpSREvent evt,
NuEvent nu 
) const

Definition at line 725 of file NuExtraction.cxx.

References NtpSRPlane::beg, NtpSRPlane::begu, NtpSRPlane::begv, NtpSRPlane::end, NtpSREvent::end, NtpSRPlane::endu, NtpSRPlane::endv, NuEvent::evt, NuEvent::evtphsigcor, NuEvent::evtphsigmap, NtpSREvent::index, NtpSRPlane::n, NtpSREvent::ndigit, NuEvent::ndigitEvt, NtpSREvent::nshower, NuEvent::nshw, NtpSREvent::nstrip, NuEvent::nstripEvt, NtpSREvent::ntrack, NuEvent::ntrk, NtpSRPlane::nu, NtpSRPlane::nv, NtpSREvent::ph, NtpSRVertex::plane, NtpSREvent::plane, NuEvent::planeEvtBeg, NuEvent::planeEvtBegu, NuEvent::planeEvtBegv, NuEvent::planeEvtEnd, NuEvent::planeEvtEndu, NuEvent::planeEvtEndv, NuEvent::planeEvtN, NuEvent::planeEvtNu, NuEvent::planeEvtNv, NuEvent::planeEvtVtx, NtpSREvent::primshw, NuEvent::primshw, NtpSREvent::primtrk, NuEvent::primtrk, NtpSRPulseHeight::raw, NuEvent::rawPhEvt, NtpSRPulseHeight::sigcor, NtpSRStripPulseHeight::sigmap, NtpSREvent::slc, NuEvent::slc, NtpSRVertex::t, NuEvent::tEvtVtx, NtpSRVertex::u, NuEvent::uEvtEnd, NuEvent::uEvtVtx, NtpSRVertex::v, NuEvent::vEvtEnd, NuEvent::vEvtVtx, NtpSREvent::vtx, NtpSRVertex::x, NuEvent::xEvtEnd, NuEvent::xEvtVtx, NtpSRVertex::y, NuEvent::yEvtEnd, NuEvent::yEvtVtx, NtpSRVertex::z, NuEvent::zEvtEnd, and NuEvent::zEvtVtx.

Referenced by NuDemoModule::Ana(), NuAnalysis::EnergySpect(), NuAnalysis::EnergySpectMC(), ExtractBasicInfo(), NuAnalysis::LIRejectionTest(), and NuAnalysis::N_1().

00727 {
00729 
00730   nu.evt=evt.index;
00731   nu.slc=evt.slc;
00732   nu.ndigitEvt=evt.ndigit;
00733   nu.nstripEvt=evt.nstrip;
00734   nu.nshw=evt.nshower;
00735   nu.ntrk=evt.ntrack;
00736   nu.primshw=evt.primshw;
00737   nu.primtrk=evt.primtrk;
00738   nu.rawPhEvt=evt.ph.raw;
00739   nu.evtphsigcor=evt.ph.sigcor;
00740   nu.evtphsigmap=evt.ph.sigmap;
00741   nu.planeEvtN=evt.plane.n;
00742   nu.planeEvtNu=evt.plane.nu;
00743   nu.planeEvtNv=evt.plane.nv;
00744 
00745   nu.xEvtVtx=evt.vtx.x;
00746   nu.yEvtVtx=evt.vtx.y;
00747   nu.zEvtVtx=evt.vtx.z;
00748   nu.uEvtVtx=evt.vtx.u;
00749   nu.vEvtVtx=evt.vtx.v;
00750   nu.tEvtVtx=evt.vtx.t;
00751   nu.planeEvtVtx=evt.vtx.plane;
00752   nu.planeEvtBeg=evt.plane.beg;
00753   nu.planeEvtBegu=evt.plane.begu;
00754   nu.planeEvtBegv=evt.plane.begv;
00755 
00756   nu.xEvtEnd=evt.end.x;
00757   nu.yEvtEnd=evt.end.y;
00758   nu.zEvtEnd=evt.end.z;
00759   nu.uEvtEnd=evt.end.u;
00760   nu.vEvtEnd=evt.end.v;
00761   nu.planeEvtEnd=evt.plane.end;
00762   nu.planeEvtEndu=evt.plane.endu;
00763   nu.planeEvtEndv=evt.plane.endv;
00764 
00765 }

void NuExtraction::ExtractGeneralInfo ( const NtpStRecord ntp,
NuEvent nu 
) const

Definition at line 136 of file NuExtraction.cxx.

References NtpSRPlane::beg, NuEvent::detector, NtpSRPlane::end, NuEvent::errorCode, NtpStRecord::evthdr, VldContext::GetDetector(), RecDataHeader::GetErrorCode(), RecRecordImp< T >::GetHeader(), VldTimeStamp::GetNanoSec(), RecPhysicsHeader::GetRemoteSpillType(), RecDataHeader::GetRun(), RecDataHeader::GetRunType(), VldTimeStamp::GetSec(), VldTimeStamp::GetSeconds(), VldContext::GetSimFlag(), RecPhysicsHeader::GetSnarl(), RecDataHeader::GetSubRun(), RecPhysicsHeader::GetTimeFrame(), VldContext::GetTimeStamp(), RecPhysicsHeader::GetTrigSrc(), RecHeader::GetVldContext(), SimFlag::kMC, Detector::kNear, Msg::kWarning, MAXMSG, NtpStRecord::mc, NtpSREventSummary::ph, NtpSREventSummary::plane, NuEvent::planeEvtHdrBeg, NuEvent::planeEvtHdrEnd, NuEvent::remoteSpillType, NuEvent::run, NuEvent::runType, NtpSRPulseHeight::sigcor, NuEvent::simFlag, NuEvent::snarl, NuEvent::snarlPulseHeight, NuEvent::subRun, NuEvent::timeFrame, NuEvent::timeNanoSec, NuEvent::timeSec, NuEvent::timeSeconds, NuEvent::trigSrc, NtpSREventSummary::trigtime, and NuEvent::trigtime.

Referenced by NuDemoModule::Ana(), NuAnalysis::ChargeSeparationOneSnarl(), NuAnalysis::ChargeSignCut(), NuAnalysis::Efficiencies(), NuAnalysis::EnergySpect(), NuAnalysis::EnergySpectMC(), ExtractBasicInfo(), NuAnalysis::LIRejectionTest(), NuAnalysis::MakeFullDST(), NuAnalysis::N_1(), and NuAnalysis::NuMuBarAppearance().

00138 {
00139   const RecCandHeader& rec=ntp.GetHeader();
00140 
00141   nu.run=rec.GetRun();
00142   nu.subRun=rec.GetSubRun();
00143   nu.runType=rec.GetRunType();
00144   nu.errorCode=rec.GetErrorCode();
00145   nu.snarl=rec.GetSnarl();
00146   nu.trigSrc=rec.GetTrigSrc();
00147   nu.timeFrame=rec.GetTimeFrame();
00148   nu.remoteSpillType=rec.GetRemoteSpillType();
00149 
00150   nu.detector=rec.GetVldContext().GetDetector();
00151   nu.simFlag=rec.GetVldContext().GetSimFlag();
00152   nu.timeSec=rec.GetVldContext().GetTimeStamp().GetSec();
00153   nu.timeNanoSec=rec.GetVldContext().GetTimeStamp().GetNanoSec();
00154   nu.timeSeconds=rec.GetVldContext().GetTimeStamp().GetSeconds();
00155 
00156   const NtpSREventSummary& evthdr=ntp.evthdr;
00157   nu.trigtime=evthdr.trigtime;
00158   nu.planeEvtHdrBeg=evthdr.plane.beg;
00159   nu.planeEvtHdrEnd=evthdr.plane.end;
00160   nu.snarlPulseHeight=evthdr.ph.sigcor;
00161 
00162   //a hack to correct the trigger bit of the cosmic MC in the ND
00163   if (nu.simFlag==SimFlag::kMC && nu.detector==Detector::kNear) {
00164     //the cosmic MC doesn't have any entries
00165     TClonesArray& mcTca=*ntp.mc;
00166     if (mcTca.GetEntries()==0){
00167       MAXMSG("MeuAnalysis",Msg::kWarning,5)
00168         <<"Performing hack to correct the fTrigSrc of"
00169         <<" ND cosmic MC, was="
00170         <<nu.trigSrc<<", setting to 4"<<endl;
00171       nu.trigSrc=4;//a plane trigger
00172     }
00173   }
00174 }

void NuExtraction::ExtractLITags ( const NtpStRecord ntp,
NuEvent nu 
) const

Definition at line 352 of file NuExtraction.cxx.

References NtpStRecord::evthdr, NuReco::FDRCBoundary(), NuLibrary::Instance(), LISieve::IsLI(), NuEvent::isLI, NuEvent::litag, NtpSREventSummary::litime, NuEvent::litime, and NuLibrary::reco.

Referenced by NuDemoModule::Ana(), and ExtractAuxiliaryInfo().

00353 {
00355 
00356   //get an event header
00357   const NtpSREventSummary& evthdr=ntp.evthdr;
00358 
00359   //get an instance of the code library
00360   const NuLibrary& lib=NuLibrary::Instance();
00361 
00362   //extract all the possible LI variables
00363   nu.litime=evthdr.litime;
00364   nu.isLI=LISieve::IsLI(ntp);
00365   nu.litag=lib.reco.FDRCBoundary(nu);
00366 }

void NuExtraction::ExtractMajorityCurvature ( const NtpStRecord ntp,
const NtpSREvent evt,
NuEvent nu 
) const

Definition at line 1180 of file NuExtraction.cxx.

References NuEvent::calcMajCurv, MajorityCurvature::CurvatureImproved(), NuReco::GetTrackWithIndexX(), NuLibrary::Instance(), MajCInfo::jitter, MajCInfo::jPID, Msg::kInfo, Msg::kWarning, MajCInfo::majC, NuLibrary::majC, MAXMSG, NuEvent::ntrk, NuLibrary::reco, NuReco::SetBestTrkMajorityCurvature(), MajCInfo::smoothMajC, and NuEvent::trkExists.

Referenced by NuAnalysis::ExtractPIDsAndWeights().

01183 {
01184   //check if a track exists
01185   if (nu.ntrk<=0) {
01186     MAXMSG("NuReco",Msg::kInfo,3)
01187       <<"ExtractMajorityCurvature: no tracks so nothing to do"
01188       <<", ntrk="<<nu.ntrk<<endl;
01189     nu.trkExists=false;
01190     return;
01191   }
01192 
01193   //check if flag is set to not calc maj curv
01194   if (!nu.calcMajCurv) {
01195     MAXMSG("NuReco",Msg::kWarning,1)
01196       <<"ExtractMajorityCurvature: flag set to calcMajCurv="
01197       <<nu.calcMajCurv<<endl;
01198     return;
01199   }
01200 
01201   //get an instance of the code library
01202   const NuLibrary& lib = NuLibrary::Instance();
01203 
01204   for(int trkIdx = 1; trkIdx <= 3; ++trkIdx){
01205     //get pointer to trk
01206     const NtpSRTrack* ptrk=lib.reco.GetTrackWithIndexX(ntp, evt, trkIdx-1);
01207 
01208     //check if track exists
01209     if(ptrk){
01210       //get a reference
01211       const NtpSRTrack& trk = *ptrk;
01212 
01213       const MajCInfo majCInfo = lib.majC.CurvatureImproved(&trk);
01214       get_jitter(nu, trkIdx) = majCInfo.jitter;
01215       get_jPID(nu, trkIdx) = majCInfo.jPID;
01216       get_majC(nu, trkIdx) = majCInfo.majC;
01217       //get_majCRatio(nu, trkIdx) = majCInfo.majCRatio;
01218       //get_rms(nu, trkIdx) = majCInfo.rms;
01219       //get_simpleMajC(nu, trkIdx) = majCInfo.simpleMajC;
01220       get_smoothMajC(nu, trkIdx) = majCInfo.smoothMajC;
01221       //get_sqJitter(nu, trkIdx) = majCInfo.sqJitter;
01222       //get_totWidth(nu, trkIdx) = majCInfo.totWidth;
01223     }
01224   } // end for trkIdx
01225 
01226   //copy across the MajCurv variables for the best track
01227   lib.reco.SetBestTrkMajorityCurvature(nu);
01228 }

void NuExtraction::ExtractMinMaxEvtTimes ( const NtpStRecord ntp,
const NtpSREvent evt,
NuEvent nu 
) const

Definition at line 1266 of file NuExtraction.cxx.

References NtpSRTimeStatus::crate_t0_ns, NuEvent::crateT0, NuEvent::detector, NtpSRStrip::index, Msg::kDebug, Detector::kFar, Msg::kInfo, SimFlag::kMC, Detector::kNear, Msg::kWarning, MAXMSG, Munits::ns, NtpSREvent::nstrip, NtpSRTimeStatus::rollover_53mhz, NuEvent::rollover_53mhz, NtpSRTimeStatus::rollover_last_53mhz, NuEvent::rollover_last_53mhz, NtpSRTimeStatus::sgate_10mhz, NuEvent::sgate_10mhz, NtpSRTimeStatus::sgate_53mhz, NuEvent::sgate_53mhz, NuEvent::simFlag, NtpSREvent::stp, NtpStRecord::stp, NtpSRStrip::strip, NtpSRStrip::time0, NtpSRStrip::time1, NuEvent::timeNanoSec, and NtpStRecord::timestatus.

Referenced by NuDemoModule::Ana(), ExtractAuxiliaryInfo(), and NuAnalysis::LIRejectionTest().

01269 {
01270   //get a multiset to hold all the strip times
01271   multiset<Double_t> times;
01272   const TClonesArray& stpTca=(*ntp.stp);
01273 
01274   Double_t timemax=-1.e10;
01275   Double_t timemin=1.e10;
01276 
01277   MsgFormat ffmt("%9.9f");
01278 
01279   //Extract the crate t0:
01280 
01281   NtpSRTimeStatus timeStatus = ntp.timestatus;
01282   nu.crateT0 = timeStatus.crate_t0_ns * Munits::ns;
01283   nu.sgate_10mhz = timeStatus.sgate_10mhz;
01284   nu.sgate_53mhz = timeStatus.sgate_53mhz;
01285   nu.rollover_53mhz = timeStatus.rollover_53mhz;
01286   nu.rollover_last_53mhz = timeStatus.rollover_last_53mhz;
01287 
01288 /*
01289   Double_t snarlTime=(nu.timeNanoSec*(Munits::ns));
01290   if (snarlTime>0.999999981 && snarlTime<0.999999983) {
01291     const Int_t numStps=stpTca.GetEntriesFast();
01292     Int_t counter=0;
01293     //loop over strips in snarl
01294     for (Int_t i=0;i<numStps;++i) {
01295       const NtpSRStrip* pstp=
01296         dynamic_cast<NtpSRStrip*>(stpTca[i]);
01297       const NtpSRStrip& stp=(*pstp);
01298 
01299       if (stp.time1>0.000029999) {
01300         MAXMSG("NuExtraction",Msg::kInfo,10000)
01301           <<"run="<<nu.run<<", subrun="<<nu.subRun
01302           <<", snarl="<<nu.snarl<<", i="<<i
01303           <<", count="<<counter<<", evt="<<nu.evt
01304           <<", ind="<<stp.index<<", s,pl="<<stp.strip<<","<<stp.plane
01305           <<endl
01306           <<"  t1="<<ffmt(stp.time1)
01307           <<", snlTime="<<ffmt(snarlTime)
01308           <<", raw="<<stp.ph1.raw
01309           <<", sigC="<<stp.ph1.sigcor
01310           <<endl;
01311       }
01312       counter++;
01313     }
01314   }
01315 */
01316 
01317   MAXMSG("NuExtraction",Msg::kDebug,200)
01318     <<"evt.nstrip="<<evt.nstrip<<endl;
01319   for (Int_t i=0;i<evt.nstrip;i++) {
01320     //check for bug where strip index is -1
01321     if (evt.stp[i]<0) {
01322       MAXMSG("MeuCuts",Msg::kInfo,50)
01323         <<"Skipping strip with evt.stp[i]="<<evt.stp[i]<<endl;
01324       continue;
01325     }
01326 
01327     const NtpSRStrip& stp=
01328       *(dynamic_cast<NtpSRStrip*>(stpTca[evt.stp[i]]));
01329 
01330     Double_t snarlTime=(nu.timeNanoSec*(Munits::ns));
01331     Double_t striptime=-999;
01332 
01333     //get the min/max time
01334     //code from MadTVAnalysis
01335     if (nu.detector==Detector::kNear) {
01336       if (nu.simFlag==SimFlag::kMC &&
01337           snarlTime>0.999999981 && snarlTime<0.999999983) {
01338         MAXMSG("NuExtraction",Msg::kWarning,1)
01339           <<"Deal with odd times: setting fNanoSec to zero, snarlTime="
01340           <<ffmt(snarlTime)<<endl;
01341         snarlTime=0;
01342       }
01343 
01344       //get the time relative to the snarl time
01345       striptime=stp.time1-snarlTime;
01346 
01347       //check if min/max
01348       if(striptime<=timemin && striptime!=-999) timemin=striptime;
01349       if(striptime>=timemax) timemax=striptime;
01350     }
01351     else if (nu.detector==Detector::kFar) {
01352       //get the times relative to the snarl time
01353       Double_t striptime1=stp.time1-snarlTime;
01354       Double_t striptime0=stp.time0-snarlTime;
01355       striptime=-999;
01356       if(striptime1>0 && striptime0<0) striptime=striptime1;
01357       if(striptime0>0 && striptime1<0) striptime=striptime0;
01358       if(striptime0>0 && striptime1>0) striptime=(striptime0+
01359                                                   striptime1)/2.;
01360 
01361       //check if min/max
01362       if(striptime<=timemin && striptime!=-999) timemin=striptime;
01363       if(striptime>=timemax) timemax=striptime;
01364     }
01365     else cout<<"Ahhh, detector not known"<<endl;
01366 
01367     Double_t time=stp.time0;
01368     if (time<0 || time>1) time=stp.time1;
01369 
01370     if (time>0 && time<=1) {
01371       times.insert(time);
01372     }
01373     //else just don't put the time in the map - clearly rubbish
01374     if (nu.detector==Detector::kNear) {
01375       MAXMSG("NuExtraction",Msg::kDebug,1000)
01376         <<"i="<<stp.index<<", s="<<stp.strip<<", t1="<<ffmt(stp.time1)
01377         <<", tmn="<<ffmt(timemin)<<", tmx="<<ffmt(timemax)
01378         <<", snlTime="<<ffmt(snarlTime)<<endl;
01379     }
01380     else {
01381       MAXMSG("NuExtraction",Msg::kDebug,1000)
01382         <<"i="<<stp.index<<", s="<<stp.strip
01383         <<", t0="<<ffmt(stp.time0)<<", t1="<<ffmt(stp.time1)
01384         <<", tmn="<<ffmt(timemin)<<", tmx="<<ffmt(timemax)
01385         <<", snlTime="<<ffmt(snarlTime)
01386         //<<", pl="<<stp.plane
01387         //<<", sigC="<<stp.ph1.sigcor<<", tpos="<<stp.tpos<<endl;
01388         <<endl;
01389     }
01390   }
01391 
01392   //get the median time from the map
01393   multiset<Double_t>::const_iterator it=times.begin();
01394   advance(it,times.size()/2);
01395   Double_t medianTime=*it;
01396   MAXMSG("NuExtraction",Msg::kDebug,100)
01397     <<"Median time="<<medianTime<<endl;
01398 
01399   //set the NuEvent variables
01400   nu.medianTime=medianTime;
01401   nu.timeEvtMin=timemin;
01402   nu.timeEvtMax=timemax;
01403 
01404 
01406   //sanity check and debug printout
01407   if ((timemin+nu.crateT0)<0 || (nu.run==36608 && nu.snarl==42717 && false)) {
01408     //Bad time, run=36608, snarl=42717, evt=0
01409     Double_t timemax=-1.e-10;
01410     Double_t timemin=1.e10;
01411 
01412     MAXMSG("NuExtraction",Msg::kError,1000)
01413       <<"Bad time, run="<<nu.run<<", snarl="<<nu.snarl
01414       <<", evt="<<nu.evt<<endl;
01415     for (Int_t i=0;i<evt.nstrip;i++) {
01416       //check for bug where strip index is -1
01417       if (evt.stp[i]<0) {
01418         MAXMSG("MeuCuts",Msg::kInfo,50)
01419           <<"Skipping strip with evt.stp[i]="<<evt.stp[i]<<endl;
01420         continue;
01421       }
01422 
01423       const NtpSRStrip& stp=
01424         *(dynamic_cast<NtpSRStrip*>(stpTca[evt.stp[i]]));
01425 
01426       Double_t snarlTime=(nu.timeNanoSec*(Munits::ns));
01427       Double_t striptime=-999;
01428 
01429       //get the min/max time
01430       //code from MadTVAnalysis
01431       if (nu.detector==Detector::kNear) {
01432         //get the time relative to the snarl time
01433         striptime=stp.time1-snarlTime;
01434 
01435         //check if min/max
01436         if(striptime<=timemin) timemin=striptime;
01437         if(striptime>=timemax) timemax=striptime;
01438       }
01439       else if (nu.detector==Detector::kFar) {
01440         //get the times relative to the snarl time
01441         Double_t striptime1=stp.time1-snarlTime;
01442         Double_t striptime0=stp.time0-snarlTime;
01443         striptime=-999;
01444         if(striptime1>0 && striptime0<0) striptime=striptime1;
01445         if(striptime0>0 && striptime1<0) striptime=striptime0;
01446         if(striptime0>0 && striptime1>0) striptime=(striptime0+
01447                                                     striptime1)/2.;
01448 
01449         //check if min/max
01450         if(striptime<=timemin) timemin=striptime;
01451         if(striptime>=timemax) timemax=striptime;
01452       }
01453       else cout<<"Ahhh, detector not known"<<endl;
01454 
01455       MAXMSG("NuExtraction",Msg::kInfo,1000)
01456         <<"strip="<<stp.strip
01457         <<", t0="<<ffmt(stp.time0)<<", t1="<<ffmt(stp.time1)
01458         <<", stp.index="<<stp.index
01459         <<endl
01460         <<"  tmn="<<ffmt(timemin)<<", tmx="<<ffmt(timemax)
01461         <<", stime="<<ffmt(striptime)
01462         <<", snlTime="<<ffmt(snarlTime)<<endl
01463         <<"  plane="<<stp.plane
01464         <<", ph0.raw="<<stp.ph0.raw
01465         <<", ph1.raw="<<stp.ph1.raw
01466         <<endl;
01467     }
01468   }
01469 }

void NuExtraction::ExtractNCInfo ( const NtpStRecord ptnp,
Int_t  eventNb,
NuEvent nu 
) const

Definition at line 1472 of file NuExtraction.cxx.

References ANtpEventInfoNC::closeTimeDeltaZ, NuEvent::closeTimeDeltaZ, det, ANtpTrackInfoNC::dtdz, NuEvent::dtdz, ANtpEventInfoNC::edgeActivityPH, NuEvent::edgeActivityPH, ANtpEventInfoNC::edgeActivityStrips, NuEvent::edgeActivityStrips, ANtpTrackInfo::endMetersToCloseEdge, NuEvent::endMetersToCloseEdge, ANtpInfoObjectFillerNC::FillInformation(), ANtpRecoNtpManipulator::GetClusterArray(), VldContext::GetDetector(), ANtpRecoNtpManipulator::GetStripArray(), RecRecordImp< T >::GetVldContext(), ANtpInfoObjectFillerNC::InitializekNN(), Msg::kDebug, ANtpEventInfoNC::maxConsecutivePlanes, NuEvent::maxConsecutivePlanes, ANtpEventInfoNC::minTimeSeparation, NuEvent::minTimeSeparation, MSG, ANtpEventInfoNC::oppEdgePH, NuEvent::oppEdgePH, ANtpEventInfoNC::oppEdgeStrips, NuEvent::oppEdgeStrips, ANtpTruthInfoBeam::Reset(), ANtpShowerInfoNC::Reset(), ANtpTrackInfoNC::Reset(), ANtpEventInfoNC::Reset(), ANtpInfoObjectFillerNC::SetClusterArray(), ANtpInfoObjectFillerNC::SetDetector(), ANtpRecoNtpManipulator::SetPrimaryShowerCriteria(), ANtpRecoNtpManipulator::SetPrimaryTrackCriteria(), ANtpRecoNtpManipulator::SetRecord(), ANtpInfoObjectFiller::SetStripArray(), ANtpEventInfoNC::slicePHFraction, NuEvent::slicePHFraction, ANtpTrackInfo::traceEndZ, NuEvent::traceEndZ, ANtpShowerInfoNC::transverseRMSU, NuEvent::transverseRMSU, ANtpShowerInfoNC::transverseRMSV, NuEvent::transverseRMSV, ANtpTrackInfo::vtxMetersToCloseEdge, ANtpEventInfo::vtxMetersToCloseEdge, NuEvent::vtxMetersToCloseEdgeEvt, NuEvent::vtxMetersToCloseEdgeTrk, ANtpTrackInfo::vtxMetersToCoil, ANtpEventInfo::vtxMetersToCoil, NuEvent::vtxMetersToCoilEvt, and NuEvent::vtxMetersToCoilTrk.

Referenced by NuAnalysis::MakeFullDST().

01475 {
01476   // Protection against reset of gDirectory
01477   // The call to InitializekNN() uses another file.
01478   TDirectory *tmpd = gDirectory;
01479   MSG("NuExtraction",Msg::kDebug) << "Start ExtractNCInfo, gDirectory is : ";
01480   //gDirectory->pwd();
01481 
01482   // See AnalysisNtuple/Module/CondensedNtpModuleNC::Ana()
01483   // create the ntpManipulator object
01484   static ANtpInfoObjectFillerNC   *InfoFiller   = new ANtpInfoObjectFillerNC();
01485   static ANtpRecoNtpManipulator *ntpManipulator = new ANtpRecoNtpManipulator();
01486   NtpStRecord            *tryRec = const_cast<NtpStRecord*>(pntp);
01487   ntpManipulator->SetRecord(tryRec);
01488   static ANtpEventInfoNC   *EventInfo  = new ANtpEventInfoNC();
01489   static ANtpTrackInfoNC   *TrackInfo  = new ANtpTrackInfoNC();
01490   static ANtpShowerInfoNC  *ShowerInfo = new ANtpShowerInfoNC();
01491   static ANtpTruthInfoBeam *TruthInfo  = new ANtpTruthInfoBeam();
01492 
01493   // Extract Header Info
01494   //====================
01495   // Detector - 1 near, 2 far - needed for filling the HeaderInfo
01496   Detector::Detector_t det = tryRec->GetVldContext()->GetDetector();
01497   InfoFiller->SetDetector(det);
01498   InfoFiller->SetStripArray(ntpManipulator->GetStripArray());
01499   InfoFiller->SetClusterArray(ntpManipulator->GetClusterArray());
01500 
01501   // Extract Event/Track/Shower/Truth Info
01502   //======================================
01503   //set up which flags you want to use to determine the primary shower or track
01504   //a value of 0 for a flag means it will not be used
01505   ntpManipulator->SetPrimaryTrackCriteria(0,1,0); // nplanes, length, total pulse height
01506   ntpManipulator->SetPrimaryShowerCriteria(0,1);  // nplanes, total pulse height
01507 
01508 
01509   // Initialize kNN, only once per snarl
01510   //====================================
01511   InfoFiller->InitializekNN(ntpManipulator);
01512 
01513   // Reset the Info Objects
01514   //=======================
01515   EventInfo->Reset();
01516   TrackInfo->Reset();
01517   ShowerInfo->Reset();
01518   TruthInfo->Reset();
01519 
01520   // Fill event, track, shower and truth and calculate variables needed
01521   //===================================================================
01522   InfoFiller->FillInformation(eventNb, ntpManipulator, EventInfo, TrackInfo, ShowerInfo, TruthInfo);
01523 
01524   // Fill the NuEvent variables
01525   //===========================
01526   // event
01527   nu.closeTimeDeltaZ = EventInfo->closeTimeDeltaZ;
01528   nu.edgeActivityStrips = EventInfo->edgeActivityStrips;
01529   nu.edgeActivityPH = EventInfo->edgeActivityPH;
01530   nu.oppEdgeStrips = EventInfo->oppEdgeStrips;
01531   nu.oppEdgePH = EventInfo->oppEdgePH;
01532   nu.vtxMetersToCoilEvt = EventInfo->vtxMetersToCoil;
01533   nu.vtxMetersToCloseEdgeEvt = EventInfo->vtxMetersToCloseEdge;
01534   nu.minTimeSeparation = EventInfo->minTimeSeparation;
01535 
01536   nu.slicePHFraction = EventInfo->slicePHFraction;
01537   nu.maxConsecutivePlanes = EventInfo->maxConsecutivePlanes;
01538 
01539   // shower
01540   nu.transverseRMSU = ShowerInfo->transverseRMSU;
01541   nu.transverseRMSV = ShowerInfo->transverseRMSV;
01542 
01543   // track
01544   nu.dtdz = TrackInfo->dtdz;
01545   nu.endMetersToCloseEdge = TrackInfo->endMetersToCloseEdge;
01546   nu.vtxMetersToCloseEdgeTrk = TrackInfo->vtxMetersToCloseEdge;
01547   nu.vtxMetersToCoilTrk = TrackInfo->vtxMetersToCoil;
01548   nu.traceEndZ = TrackInfo->traceEndZ;
01549 
01550   MSG("NuExtraction",Msg::kDebug) << "End ExtractNCInfo, gDirectory is : ";
01551   gDirectory = tmpd;
01552   //gDirectory->pwd();
01553 }

void NuExtraction::ExtractNthTrkInfo ( int  trkIdx,
const NtpStRecord ntp,
const NtpSREvent evt,
NuEvent nu 
) const [protected]

Helper for ExtractTrkInfo.

Definition at line 1064 of file NuExtraction.cxx.

References NtpSRPlane::beg, NtpSRPlane::begu, NtpSRPlane::begv, NuReco::CalculateHorizontalVerticalStripNumber(), NuReco::CalculateParallelStripInset(), NuReco::CalculatePerpendicularStripFlag(), NtpSRTrackTime::cdtds, NtpSRTrackTime::chi2, NtpSRFitTrack::chi2, NtpSRTrack::contained, NtpSRVertex::dcosy, NtpSRVertex::dcosz, NtpSRFiducial::dr, NtpSRTrack::ds, NtpSRFiducial::dz, NtpSRTrack::end, NtpSRPlane::end, NtpSRPlane::endu, NtpSRPlane::endv, NtpSRMomentum::eqp, NtpSRTrack::fidall, NtpSRTrack::fidend, NtpSRTrack::fidvtx, NtpSRTrack::fit, NtpSRTrackTime::forwardNDOF, NtpSRTrackTime::forwardRMS, NuReco::GetCosBetweenPr_Theta(), NuReco::GetEdgeRegion(), NuReco::GetPhi(), NuReco::GetRegion(), NuReco::GetShowerEnergyNearTrack(), NuReco::GetTrackCharge(), NuReco::GetTrackEnergyFromCurvCor(), NuReco::GetTrackEnergyFromRangeCor(), NuReco::GetTrackFirstStrip(), NuReco::GetTrackFirstStripIsU(), NuReco::GetTrackFirstUStrip(), NuReco::GetTrackFirstVStrip(), NuReco::GetTrackLastStrip(), NuReco::GetTrackLastStripIsU(), NuReco::GetTrackLastUStrip(), NuReco::GetTrackLastVStrip(), NuReco::GetTrackWithIndexX(), NuReco::GetTrkQPFraction(), NuReco::GetTrueTrackId(), NuEvent::hornIsReverse, NtpSRTrack::index, NuLibrary::Instance(), NtpSRTrack::momentum, NtpSRPlane::n, NtpSRTrackTime::ndigit, NtpSRTrack::ndigit, NtpSRFitTrack::ndof, NtpSRTrack::nstrip, NtpSRTrackPlane::ntrklike, NtpSRPlane::nu, NtpSRPlane::nv, NtpSRFitTrack::pass, NtpSRTrack::ph, NtpSRVertex::plane, NtpSRTrack::plane, NtpSRMomentum::qp, NtpSRMomentum::qp_rangebiased, NtpSRMomentum::range, NuLibrary::reco, NtpSRPulseHeight::sigcor, NtpSRStripPulseHeight::sigmap, NtpSRVertex::t, NtpSRTrackTime::t0, NtpSRTrack::time, NtpSRFiducial::trace, NtpSRVertex::u, NtpSRVertex::v, NtpSRTrack::vtx, NtpSRVertex::x, NtpSRVertex::y, and NtpSRVertex::z.

Referenced by ExtractTrkInfo().

01068 {
01069   //get an instance of the code library
01070   const NuLibrary& lib = NuLibrary::Instance();
01071 
01072   //get pointer to trk
01073   const NtpSRTrack* ptrk = lib.reco.GetTrackWithIndexX(ntp, evt, trkIdx-1);
01074 
01075   //set this to default to no track exists
01076   get_trkExists(nu, trkIdx) = false;
01077 
01078   //check if track exists
01079   if(ptrk){
01080     //get a reference
01081     const NtpSRTrack& trk = *ptrk;
01082 
01083     get_trkExists(nu, trkIdx) = true;
01084     get_trkIndex(nu, trkIdx) = trk.index;
01085     get_ndigitTrk(nu, trkIdx) = trk.ndigit;
01086     get_nstripTrk(nu, trkIdx) = trk.nstrip;
01087     get_trkEnCorRange(nu, trkIdx) =
01088       lib.reco.GetTrackEnergyFromRangeCor(trk.momentum.range, nu);
01089     get_trkEnCorCurv(nu, trkIdx) =
01090       lib.reco.GetTrackEnergyFromCurvCor(trk.momentum.qp, nu);
01091     get_trkShwEnNear(nu, trkIdx) =
01092       lib.reco.GetShowerEnergyNearTrack(ntp, trk,
01093                                         &get_trkShwEnNearDW(nu, trkIdx));
01094     get_trkMomentumRange(nu, trkIdx) = trk.momentum.range;
01095     get_containedTrk(nu, trkIdx) = trk.contained;
01096     get_trkfitpass(nu, trkIdx) = trk.fit.pass;
01097     get_trkvtxdcosz(nu, trkIdx) = trk.vtx.dcosz;
01098     get_trkvtxdcosy(nu, trkIdx) = trk.vtx.dcosy;
01099     get_trknplane(nu, trkIdx) = trk.plane.n;
01100     get_charge(nu, trkIdx) = lib.reco.GetTrackCharge(trk, nu.hornIsReverse);
01101     get_qp(nu, trkIdx) = trk.momentum.qp;
01102     get_qp_rangebiased(nu, trkIdx) = trk.momentum.qp_rangebiased;
01103     get_sigqp(nu, trkIdx) = trk.momentum.eqp;
01104     if(get_sigqp(nu, trkIdx) != 0.0)
01105       get_qp_sigqp(nu, trkIdx) = get_qp(nu, trkIdx) / get_sigqp(nu, trkIdx);
01106     get_chi2(nu, trkIdx) = trk.fit.chi2;
01107     get_ndof(nu, trkIdx) = trk.fit.ndof;
01108     get_qpFraction(nu, trkIdx) = lib.reco.GetTrkQPFraction(trk);
01109     get_trkVtxUVDiffPl(nu, trkIdx) = trk.plane.begu-trk.plane.begv;
01110     get_trkLength(nu, trkIdx) = abs(trk.plane.end-trk.plane.beg+1);
01111     get_planeTrkNu(nu, trkIdx) = trk.plane.nu;
01112     get_planeTrkNv(nu, trkIdx) = trk.plane.nv;
01113     get_ntrklike(nu, trkIdx) = trk.plane.ntrklike;
01114     get_trkphsigcor(nu, trkIdx) = trk.ph.sigcor;
01115     get_trkphsigmap(nu, trkIdx) = trk.ph.sigmap;
01116     get_trkIdMC(nu, trkIdx) = lib.reco.GetTrueTrackId(ntp,trk);
01117     get_trkds(nu, trkIdx) = trk.ds;
01118 
01119     //majority curvature is extracted in its own function
01120 
01121     get_xTrkVtx(nu, trkIdx) = trk.vtx.x;
01122     get_yTrkVtx(nu, trkIdx) = trk.vtx.y;
01123     get_zTrkVtx(nu, trkIdx) = trk.vtx.z;
01124     get_uTrkVtx(nu, trkIdx) = trk.vtx.u;
01125     get_vTrkVtx(nu, trkIdx) = trk.vtx.v;
01126     get_tTrkVtx(nu, trkIdx) = trk.vtx.t;
01127     get_planeTrkVtx(nu, trkIdx) = trk.vtx.plane;
01128     get_planeTrkBeg(nu, trkIdx) = trk.plane.beg;
01129     get_planeTrkBegu(nu, trkIdx) = trk.plane.begu;
01130     get_planeTrkBegv(nu, trkIdx) = trk.plane.begv;
01131     get_inverseBetaTrk(nu, trkIdx) = trk.time.cdtds;
01132     get_t0Trk(nu, trkIdx) = trk.time.t0;
01133     get_chi2TimeTrk(nu, trkIdx) = trk.time.chi2;
01134     get_ndigitTimeTrk(nu, trkIdx) = trk.time.ndigit;
01135     get_forwardRMSTrk(nu, trkIdx) = trk.time.forwardRMS;
01136     get_forwardNDOFTrk(nu, trkIdx) = trk.time.forwardNDOF;
01137     get_stripTrkBeg(nu, trkIdx) = lib.reco.GetTrackFirstStrip(ntp, trk);
01138     get_stripTrkBegu(nu, trkIdx) = lib.reco.GetTrackFirstUStrip(ntp, trk);
01139     get_stripTrkBegv(nu, trkIdx) = lib.reco.GetTrackFirstVStrip(ntp, trk);
01140     get_stripTrkEnd(nu, trkIdx) = lib.reco.GetTrackLastStrip(ntp,trk);
01141     get_stripTrkEndu(nu, trkIdx) = lib.reco.GetTrackLastUStrip(ntp,trk);
01142     get_stripTrkEndv(nu, trkIdx) = lib.reco.GetTrackLastVStrip(ntp,trk);
01143     get_stripTrkBegIsu(nu, trkIdx) = lib.reco.GetTrackFirstStripIsU(ntp, trk);
01144     get_stripTrkEndIsu(nu, trkIdx) = lib.reco.GetTrackLastStripIsU(ntp, trk);
01145     get_regionTrkVtx(nu, trkIdx) = lib.reco.GetRegion(ntp, trk.vtx);
01146     get_edgeRegionTrkVtx(nu, trkIdx) = lib.reco.GetEdgeRegion(ntp,trk.vtx);
01147     get_edgeRegionTrkEnd(nu, trkIdx) = lib.reco.GetEdgeRegion(ntp,trk.end);
01148     get_phiTrkVtx(nu, trkIdx) = lib.reco.GetPhi(trk.vtx);
01149     get_phiTrkEnd(nu, trkIdx) = lib.reco.GetPhi(trk.end);
01150 
01151     lib.reco.CalculateParallelStripInset(nu, trkIdx);
01152     lib.reco.CalculatePerpendicularStripFlag(nu, trkIdx);
01153     lib.reco.CalculateHorizontalVerticalStripNumber(nu, trkIdx);
01154 
01155     get_xTrkEnd(nu, trkIdx) = trk.end.x;
01156     get_yTrkEnd(nu, trkIdx) = trk.end.y;
01157     get_zTrkEnd(nu, trkIdx) = trk.end.z;
01158     get_uTrkEnd(nu, trkIdx) = trk.end.u;
01159     get_vTrkEnd(nu, trkIdx) = trk.end.v;
01160     get_planeTrkEnd(nu, trkIdx) = trk.plane.end;
01161     get_planeTrkEndu(nu, trkIdx) = trk.plane.endu;
01162     get_planeTrkEndv(nu, trkIdx) = trk.plane.endv;
01163 
01164     get_drTrkFidall(nu, trkIdx) = trk.fidall.dr;
01165     get_dzTrkFidall(nu, trkIdx) = trk.fidall.dz;
01166     get_drTrkFidvtx(nu, trkIdx) = trk.fidvtx.dr;
01167     get_dzTrkFidvtx(nu, trkIdx) = trk.fidvtx.dz;
01168     get_drTrkFidend(nu, trkIdx) = trk.fidend.dr;
01169     get_dzTrkFidend(nu, trkIdx) = trk.fidend.dz;
01170     get_traceTrkFidall(nu, trkIdx) = trk.fidall.trace;
01171     get_traceTrkFidvtx(nu, trkIdx) = trk.fidvtx.trace;
01172     get_traceTrkFidend(nu, trkIdx) = trk.fidend.trace;
01173 
01174     get_cosPrTrkVtx(nu, trkIdx) = lib.reco.GetCosBetweenPr_Theta(trk);
01175   }
01176 }

void NuExtraction::ExtractSAFitInfo ( const NtpFitSARecord pntpSA,
NuEvent nu 
) const

Definition at line 178 of file NuExtraction.cxx.

References NtpFitSARecord::fitsa, NuReco::GetTrackCharge(), NuReco::GetVldContext(), NuLibrary::Instance(), Msg::kDebug, MAXMSG, NuLibrary::reco, NuReco::SetBestTrkSAFit(), and NuReco::uvz2xyz().

Referenced by ExtractAuxiliaryInfo().

00180 {
00181   if (!pntpSA) {
00182     MAXMSG("MeuAnalysis",Msg::kDebug,5)
00183       <<"ExtractSAFitInfo: no NtpFitSARecord"<<endl;
00184     return;
00185   }
00186 
00187   //get a reference
00188   const NtpFitSARecord& ntpSA=*pntpSA;
00189   const TClonesArray& fitsaTca=(*ntpSA.fitsa);
00190 
00191   //get an instance of the code library
00192   const NuLibrary& lib=NuLibrary::Instance();
00193 
00194   for(int trkIdx = 1; trkIdx <= 3; ++trkIdx){
00195 
00196     if(get_trkIndex(nu, trkIdx) >= 0){
00197       const NtpFitSA& fitsa =
00198         *(NtpFitSA*)(fitsaTca[get_trkIndex(nu, trkIdx)]);
00199 
00200       get_trkfitpassSA(nu, trkIdx) = fitsa.fit.pass;
00201       get_trkvtxdcoszSA(nu, trkIdx) = fitsa.fit.dcosz;
00202       get_chargeSA(nu, trkIdx) = lib.reco.GetTrackCharge
00203         (fitsa.fit.qp, nu.hornIsReverse);
00204       get_qpSA(nu, trkIdx) = fitsa.fit.qp;
00205       get_sigqpSA(nu, trkIdx) = fitsa.fit.eqp;
00206       get_chi2SA(nu, trkIdx) = fitsa.fit.chi2;
00207       get_ndofSA(nu, trkIdx) = fitsa.fit.ndf;
00208       get_probSA(nu, trkIdx) = TMath::Prob(fitsa.fit.chi2, fitsa.fit.ndf);
00209       TVector3 xyz = lib.reco.uvz2xyz(fitsa.fit.u, fitsa.fit.v,fitsa.fit.z,
00210                                       lib.reco.GetVldContext(nu));
00211       get_xTrkVtxSA(nu, trkIdx) = xyz.X();
00212       get_yTrkVtxSA(nu, trkIdx) = xyz.Y();
00213       get_zTrkVtxSA(nu, trkIdx) = fitsa.fit.z;
00214       get_uTrkVtxSA(nu, trkIdx) = fitsa.fit.u;
00215       get_vTrkVtxSA(nu, trkIdx) = fitsa.fit.v;
00216     }
00217   } // end for trkIdx
00218 
00219   //copy across the variables for the best track
00220   lib.reco.SetBestTrkSAFit(nu);
00221 }

void NuExtraction::ExtractShwInfo ( const NtpStRecord ntp,
const NtpSREvent evt,
NuEvent nu 
) const

Definition at line 769 of file NuExtraction.cxx.

References NuEvent::avgShwHitMip, NtpSRPlane::beg, NtpSRPlane::end, NuReco::GetShowerEnergyCor(), NuReco::GetShowerWithIndexX(), NuReco::GetShwMaxPlane(), NtpSRStripPulseHeight::gev, NuLibrary::Instance(), ReleaseType::IsElm(), ReleaseType::IsFir(), ReleaseType::IsGinkgo(), ReleaseType::IsHickory(), ReleaseType::IsIvy(), ReleaseType::IsJuniper(), CandShowerHandle::kCC, CandShowerHandle::kNC, CandShowerHandle::kWtCC, CandShowerHandle::kWtNC, NtpSRShowerPulseHeight::linCCgev, NtpSRShowerPulseHeight::linNCgev, NuEvent::maxShwHitMip, NuEvent::maxShwPlaneMip, NtpSRStripPulseHeight::mip, NtpSRPlane::n, NtpSRShower::ndigit, NtpSRShower::nstrip, NtpSRShower::ph, NtpSRShower::plane, NuEvent::primshw, NuLibrary::reco, NuEvent::releaseType, NuReco::SetBestShw(), NtpSREvent::shw, NtpStRecord::shw, NuEvent::shwExists, NuEvent::shwPctLength, NuEvent::shwPctWidth, NtpSRShower::shwph, NuEvent::shwRmsT, NuEvent::shwSumHitLength, NuEvent::shwSumHitWidth, NtpSRShower::stp, NtpStRecord::stp, NtpSRShower::stpph0mip, NtpSRShower::stpph1mip, NtpSRShower::vtx, NtpSRShowerPulseHeight::wtCCgev, NtpSRShowerPulseHeight::wtNCgev, NtpSRVertex::x, NtpSRVertex::y, and NtpSRVertex::z.

Referenced by NuAnalysis::EnergySpect(), NuAnalysis::EnergySpectMC(), ExtractBasicInfo(), ExtractTrkShwInfo(), NuAnalysis::LIRejectionTest(), and NuAnalysis::N_1().

00772 {
00773   //get an instance of the code library
00774   const NuLibrary& lib = NuLibrary::Instance();
00775 
00776   for(int shwIdx = 1; shwIdx <= 5; ++shwIdx){
00777     //get pointer to shower
00778     const NtpSRShower* pshw = lib.reco.GetShowerWithIndexX(ntp, evt, shwIdx-1);
00779 
00780     get_shwExists(nu, shwIdx) = false;
00781 
00782     //check if shower exists
00783     if(pshw){
00784       //get a reference
00785       const NtpSRShower& shw = *pshw;
00786       //fill the variable(s)
00787       get_shwExists(nu, shwIdx) = true;
00788       get_ndigitShw(nu, shwIdx) = shw.ndigit;
00789       get_nstripShw(nu, shwIdx) = shw.nstrip;
00790       get_nplaneShw(nu, shwIdx) = shw.plane.n;
00791       get_shwEnCor(nu, shwIdx) = lib.reco.GetShowerEnergyCor
00792         (shw.shwph.linCCgev, CandShowerHandle::kCC, nu);
00793       get_shwEnNoCor(nu, shwIdx) = shw.shwph.linCCgev;//has to go first
00794 
00795       // For elm and beyond, shwEnLinCCNoCor is the calorimetric energy 
00796       // with no correction at all, and shwEnLinCCCor is the 
00797       // corrected one stored in the SNTP.
00798       // This is to avoid multiple corrections made 
00799       // in both SNTPs and DSTs
00800       // junting@physics.utexas.edu 
00801       if(ReleaseType::IsElm(nu.releaseType)     ||
00802          ReleaseType::IsFir(nu.releaseType)     ||
00803          ReleaseType::IsGinkgo(nu.releaseType)  ||
00804          ReleaseType::IsHickory(nu.releaseType) ||
00805          ReleaseType::IsIvy(nu.releaseType)     ||
00806          ReleaseType::IsJuniper(nu.releaseType) ){
00807 
00808         get_shwEnLinCCNoCor(nu, shwIdx) = shw.ph.gev;
00809         get_shwEnLinCCCor(nu, shwIdx) = shw.shwph.linCCgev;
00810       }
00811       else{
00812         get_shwEnLinCCNoCor(nu, shwIdx) = shw.shwph.linCCgev;
00813         get_shwEnLinCCCor(nu, shwIdx) = lib.reco.GetShowerEnergyCor
00814           (shw.shwph.linCCgev, CandShowerHandle::kCC, nu);
00815       }
00816       get_shwEnLinNCCor(nu, shwIdx) = lib.reco.GetShowerEnergyCor
00817         (shw.shwph.linNCgev, CandShowerHandle::kNC, nu);
00818       get_shwEnLinNCNoCor(nu, shwIdx) = shw.shwph.linNCgev;
00819       get_shwEnWtCCCor(nu, shwIdx) = lib.reco.GetShowerEnergyCor
00820         (shw.shwph.wtCCgev, CandShowerHandle::kWtCC, nu);
00821       get_shwEnWtCCNoCor(nu, shwIdx) = shw.shwph.wtCCgev;
00822       get_shwEnWtNCCor(nu, shwIdx) = lib.reco.GetShowerEnergyCor
00823         (shw.shwph.wtNCgev, CandShowerHandle::kWtNC, nu);
00824       get_shwEnWtNCNoCor(nu, shwIdx) = shw.shwph.wtNCgev;
00825 
00826       //Note: shw.ph.gev=shw.shwph.wtCCgev
00827       get_shwEnMip(nu, shwIdx) = shw.ph.mip;
00828       get_planeShwBeg(nu, shwIdx) = shw.plane.beg;
00829       get_planeShwEnd(nu, shwIdx) = shw.plane.end;
00830       get_planeShwMax(nu, shwIdx) = lib.reco.GetShwMaxPlane(ntp, shw);
00831       get_xShwVtx(nu, shwIdx) = shw.vtx.x;
00832       get_yShwVtx(nu, shwIdx) = shw.vtx.y;
00833       get_zShwVtx(nu, shwIdx) = shw.vtx.z;
00834     }
00835   } // end for shwIdx
00836 
00837   // MINOS+ shower variables
00838   // junting@physics.utexas.edu
00839   lib.reco.SetBestShw(nu); 
00840 
00841   // for the best shower
00842   if(nu.shwExists){
00843     int shw_planeBeg = 500;       // first plane
00844     float shw_posu = 0.;          // m, average position of u strips weighted energy dep
00845     float shw_posv = 0.;          // m, average position of v strips weighted energy dep
00846     float shw_enu = 0.;           // energy dep in u planes
00847     float shw_env = 0.;           // energy dep in v planes      
00848     float shw_maxHitMip = 0.;     // maximum hit mip in a shower  
00849     TH1F* shw_histT = new TH1F("shw_histT", "shw_histT", 500, 0, 5);
00850     TH1F* shw_histL = new TH1F("shw_histL", "shw_histL", 200, 0, 200);   
00851     TH1F* shw_hitMipHist = new TH1F("shw_hitMipHist", "shw_hitMipHist", 100, 0, 100);     
00852     
00853     TClonesArray& showerArray = *(ntp.shw); 
00854     TClonesArray& stripArray  = *(ntp.stp);
00855     int ishw = evt.shw[nu.primshw];
00856     NtpSRShower* ntpShower = dynamic_cast <NtpSRShower*> (showerArray[ishw]);
00857 
00858     // first strip loop
00859     for(int k = 0; k < ntpShower->nstrip; k++){
00860       int istp = ntpShower->stp[k];
00861       NtpSRStrip* ntpStrip = dynamic_cast <NtpSRStrip*> (stripArray[istp]);
00862       int stp_view   = ntpStrip->planeview;
00863       float stp_tpos = ntpStrip->tpos;
00864       double stp_mip = ntpShower->stpph0mip[k] + ntpShower->stpph1mip[k];
00865       int stp_plane  = ntpStrip->plane;
00866 
00867       if(stp_plane < shw_planeBeg)
00868         shw_planeBeg = stp_plane;
00869 
00870       if(stp_view == 2){
00871         shw_posu += stp_tpos * stp_mip;
00872         shw_enu += stp_mip;
00873       }
00874       else{
00875         shw_posv += stp_tpos * stp_mip;
00876         shw_env += stp_mip;
00877       }
00878 
00879     } // end of strip loop            
00880 
00881     shw_posu /= shw_enu;
00882     shw_posv /= shw_env;
00883     nu.shwSumHitLength  = 0.;
00884     nu.shwSumHitWidth   = 0.;
00885 
00886     // second strip loop
00887     for(int k = 0; k < ntpShower->nstrip; k++){
00888     
00889       int istp = ntpShower->stp[k];
00890       NtpSRStrip* ntpStrip = dynamic_cast <NtpSRStrip*> (stripArray[istp]);
00891       int stp_plane  = ntpStrip->plane;
00892       float stp_tpos = ntpStrip->tpos;
00893       double stp_mip = ntpShower->stpph0mip[k] + ntpShower->stpph1mip[k];
00894       float stp_l = (float)(stp_plane - shw_planeBeg);
00895       float stp_t;
00896       int stp_view = ntpStrip->planeview;
00897       if(stp_view == 2)
00898         stp_t = abs(stp_tpos - shw_posu);
00899       else
00900         stp_t = abs(stp_tpos - shw_posv);
00901 
00902       // fill shower profile hist
00903       shw_histL->Fill(stp_l, stp_mip);
00904       shw_histT->Fill(stp_t, stp_mip);
00905 
00906       // sum hit positions weighted by mip
00907       nu.shwSumHitLength += stp_mip * stp_l;
00908       nu.shwSumHitWidth  += stp_mip * stp_t;
00909 
00910       // fill shower hit mip hist
00911       shw_hitMipHist->Fill(stp_mip);
00912 
00913       // find max hit mip
00914       if (stp_mip > shw_maxHitMip)
00915         shw_maxHitMip = stp_mip;
00916 
00917     } // end of strip loop  
00918 
00919     const int N = 9;
00920     Double_t shw_pctLength[N];
00921     Double_t shw_pctWidth[N];
00922     Double_t pct[N] = {0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9};
00923     shw_histL->GetQuantiles(N, shw_pctLength, pct);    
00924     shw_histT->GetQuantiles(N, shw_pctWidth,  pct);    
00925     nu.shwPctLength = 0.;
00926     nu.shwPctWidth  = 0.;
00927     for(int i = 0; i < N; i++){
00928       nu.shwPctLength += shw_pctLength[i];
00929       nu.shwPctWidth += shw_pctWidth[i];
00930     }
00931 
00932     nu.avgShwHitMip = shw_hitMipHist->GetMean();  
00933     nu.shwRmsT = shw_histT->GetRMS();  
00934     nu.maxShwPlaneMip = shw_histL->GetMaximum();
00935     nu.maxShwHitMip = shw_maxHitMip;
00936 
00937     delete shw_histT;
00938     delete shw_histL;
00939     delete shw_hitMipHist;    
00940   }
00941 
00942   // for all showers
00943   if(nu.nshw > 0){
00944 
00945     int shw_planeBeg = 500;       // first plane
00946     float shw_posu = 0.;          // m, average position of u strips weighted energy dep
00947     float shw_posv = 0.;          // m, average position of v strips weighted energy dep
00948     float shw_enu = 0.;           // energy dep in u planes
00949     float shw_env = 0.;           // energy dep in v planes      
00950     float shw_maxHitMip = 0.;     // maximum hit mip in a shower  
00951     TH1F* shw_histT = new TH1F("shw_histT", "shw_histT", 500, 0, 5);
00952     TH1F* shw_histL = new TH1F("shw_histL", "shw_histL", 200, 0, 200);   
00953     TH1F* shw_hitMipHist = new TH1F("shw_hitMipHist", "shw_hitMipHist", 100, 0, 100);     
00954 
00955     TClonesArray& showerArray = *(ntp.shw); 
00956     TClonesArray& stripArray  = *(ntp.stp);
00957 
00958     // first shower loop
00959     for(int is = 0; is < evt.nshower; is++){
00960       int ishw = evt.shw[is];
00961       NtpSRShower* ntpShower = dynamic_cast <NtpSRShower*> (showerArray[ishw]);   
00962 
00963       // strip loop
00964       for(int k = 0; k < ntpShower->nstrip; k++){
00965         int istp = ntpShower->stp[k];
00966         NtpSRStrip* ntpStrip = dynamic_cast <NtpSRStrip*> (stripArray[istp]);
00967         int stp_view   = ntpStrip->planeview;
00968         float stp_tpos = ntpStrip->tpos;
00969         double stp_mip = ntpShower->stpph0mip[k] + ntpShower->stpph1mip[k];
00970         int stp_plane  = ntpStrip->plane;
00971 
00972         if(stp_plane < shw_planeBeg)
00973           shw_planeBeg = stp_plane;
00974 
00975         if(stp_view == 2){
00976           shw_posu += stp_tpos * stp_mip;
00977           shw_enu += stp_mip;
00978         }
00979         else{
00980           shw_posv += stp_tpos * stp_mip;
00981           shw_env += stp_mip;
00982         }
00983       } // end of strip loop            
00984 
00985     } // end of first shower loop
00986 
00987     shw_posu /= shw_enu;
00988     shw_posv /= shw_env;
00989     nu.shwSumHitLengthAllShws  = 0.;
00990     nu.shwSumHitWidthAllShws   = 0.;
00991 
00992     // second shower loop    
00993     for(int is = 0; is < evt.nshower; is++){
00994       int ishw = evt.shw[is];
00995       NtpSRShower* ntpShower = dynamic_cast <NtpSRShower*> (showerArray[ishw]);   
00996 
00997       // strip loop            
00998       for(int k = 0; k < ntpShower->nstrip; k++){
00999     
01000         int istp = ntpShower->stp[k];
01001         NtpSRStrip* ntpStrip = dynamic_cast <NtpSRStrip*> (stripArray[istp]);
01002         int stp_plane  = ntpStrip->plane;
01003         float stp_tpos = ntpStrip->tpos;
01004         double stp_mip = ntpShower->stpph0mip[k] + ntpShower->stpph1mip[k];
01005         float stp_l = (float)(stp_plane - shw_planeBeg);
01006         float stp_t;
01007         int stp_view = ntpStrip->planeview;
01008         if(stp_view == 2)
01009           stp_t = abs(stp_tpos - shw_posu);
01010         else
01011           stp_t = abs(stp_tpos - shw_posv);
01012 
01013         // fill shower profile hist
01014         shw_histL->Fill(stp_l, stp_mip);
01015         shw_histT->Fill(stp_t, stp_mip);
01016 
01017         // sum hit positions weighted by mip
01018         nu.shwSumHitLengthAllShws += stp_mip * stp_l;
01019         nu.shwSumHitWidthAllShws  += stp_mip * stp_t;
01020 
01021         // fill shower hit mip hist
01022         shw_hitMipHist->Fill(stp_mip);
01023 
01024         // find max hit mip
01025         if (stp_mip > shw_maxHitMip)
01026           shw_maxHitMip = stp_mip;
01027 
01028       } // end of strip loop  
01029 
01030     } // end of second shower loop
01031 
01032     const int N = 9;
01033     Double_t shw_pctLength[N];
01034     Double_t shw_pctWidth[N];
01035     Double_t pct[N] = {0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9};
01036     shw_histL->GetQuantiles(N, shw_pctLength, pct);    
01037     shw_histT->GetQuantiles(N, shw_pctWidth,  pct);    
01038     nu.shwPctLengthAllShws = 0.;
01039     nu.shwPctWidthAllShws  = 0.;
01040     for(int i = 0; i < N; i++){
01041       nu.shwPctLengthAllShws += shw_pctLength[i];
01042       nu.shwPctWidthAllShws  += shw_pctWidth[i];
01043     }
01044 
01045     nu.avgShwHitMipAllShws   = shw_hitMipHist->GetMean();  
01046     nu.shwRmsTAllShws        = shw_histT->GetRMS();  
01047     nu.maxShwPlaneMipAllShws = shw_histL->GetMaximum();
01048     nu.maxShwHitMipAllShws   = shw_maxHitMip;
01049     nu.nplaneAllShws         = 0.;
01050     for(int i = 1; i < shw_histL->GetNbinsX(); i++)
01051       if(shw_histL->GetBinContent(i) != 0)
01052         nu.nplaneAllShws++;
01053     nu.planeAllShwMax = shw_histL->GetMaximumBin();
01054 
01055     delete shw_histT;
01056     delete shw_histL;
01057     delete shw_hitMipHist;    
01058   }
01059 
01060 }

void NuExtraction::ExtractTimeToNearestSpill ( NuEvent nu  )  const

Definition at line 500 of file NuExtraction.cxx.

References NuEvent::detector, VldTimeStamp::GetNanoSec(), VldTimeStamp::GetSec(), SpillTimeFinder::GetTimeOfNearestSpill(), SpillTimeFinder::GetTimeToNearestSpill(), NuReco::GetVldContext(), NuLibrary::Instance(), SpillTimeFinder::Instance(), SimFlag::kData, Msg::kInfo, Msg::kWarning, MAXMSG, NuEvent::nearestSpillNanosec, NuEvent::nearestSpillSec, NuLibrary::reco, NuEvent::simFlag, NuEvent::timeToNearestSpill, and NuEvent::useDBForSpillTiming.

Referenced by NuDemoModule::Ana(), ExtractAuxiliaryInfo(), and NuAnalysis::LIRejectionTest().

00501 {
00502   //check if data
00503   if (nu.simFlag!=SimFlag::kData) {
00504     MAXMSG("NuExtraction",Msg::kInfo,1)
00505       <<"Not extracting TimeToNearestSpill for simFlag="<<nu.simFlag
00506       <<endl;
00507     //set a default value
00508     nu.timeToNearestSpill=-999999;
00509     return;
00510   }
00511   
00512 //   //check if the far detector
00513 //   if (nu.detector!=Detector::kFar) {
00514 //     MAXMSG("NuExtraction",Msg::kInfo,1)
00515 //       <<"Not extracting TimeToNearestSpill for detector="<<nu.detector
00516 //       <<endl;
00517 //     //set a default value
00518 //     nu.timeToNearestSpill=-999999;
00519 //     return;
00520 //   }
00521   
00522   //check whether to use the database
00523   if (!nu.useDBForSpillTiming) {
00524     MAXMSG("NuExtraction",Msg::kWarning,1)
00525       <<"Not extracting TimeToNearestSpill"
00526       <<" (flag set to not query database)"
00527       <<", nu.timeToNearestSpill="<<nu.timeToNearestSpill
00528       <<endl;
00529     //leave as current value (for re-reconstruction case)
00530     return;
00531   }
00532 
00533   MAXMSG("NuExtraction",Msg::kInfo,1)
00534     <<"Extracting TimeToNearestSpill for simFlag="<<nu.simFlag
00535     <<", detector="<<nu.detector<<endl;
00536   SpillTimeFinder& spillFinder=SpillTimeFinder::Instance();
00537 
00538   //get an instance of the code library
00539   const NuLibrary& lib=NuLibrary::Instance();
00540 
00541   VldContext vc=lib.reco.GetVldContext(nu);
00542   nu.timeToNearestSpill=spillFinder.GetTimeToNearestSpill(vc);
00543 
00544   VldTimeStamp nearestspill = spillFinder.GetTimeOfNearestSpill(vc);
00545   nu.nearestSpillSec = nearestspill.GetSec();
00546   nu.nearestSpillNanosec = nearestspill.GetNanoSec();
00547 }

void NuExtraction::ExtractTimingFiducial ( NuEvent nu  )  const

Definition at line 551 of file NuExtraction.cxx.

References NuEvent::detector, FarTimingFidFinder::GetFarTimingFid(), Detector::kNear, NuEvent::timeSec, and NuEvent::timingFiducial.

Referenced by ExtractAuxiliaryInfo().

00552 {
00553   if (Detector::kNear == nu.detector){
00554     return;
00555   }
00556 
00557   FarTimingFidFinder& timingFidFinder = FarTimingFidFinder::Instance();
00558   Int_t snarlTimeInSeconds = nu.timeSec;
00559   Int_t crate = 2;
00560   Int_t timingFiducialCrate2 = timingFidFinder.GetFarTimingFid(snarlTimeInSeconds, crate);
00561   nu.timingFiducial = timingFiducialCrate2;
00562 }

void NuExtraction::ExtractTrkInfo ( const NtpStRecord ntp,
const NtpSREvent evt,
NuEvent nu 
) const

Definition at line 688 of file NuExtraction.cxx.

References ExtractNthTrkInfo(), NtpSREvent::index, Msg::kDebug, MAXMSG, NtpSREvent::nshower, and NtpSREvent::ntrack.

Referenced by NuAnalysis::EnergySpect(), NuAnalysis::EnergySpectMC(), ExtractBasicInfo(), ExtractTrkShwInfo(), NuAnalysis::LIRejectionTest(), and NuAnalysis::N_1().

00691 {
00692   Msg::LogLevel_t logLevel=Msg::kDebug;
00693 
00694   MAXMSG("NuExtraction",logLevel,200)
00695     <<"evt="<<evt.index<<", trks="<<evt.ntrack
00696     <<", shws="<<evt.nshower<<endl;
00697 
00698   for(int trkIdx = 1; trkIdx <= 3; ++trkIdx){
00699     ExtractNthTrkInfo(trkIdx, ntp, evt, nu);
00700   }
00701 
00702 }

void NuExtraction::ExtractTrkShwInfo ( const NtpStRecord ntp,
const NtpSREvent evt,
NuEvent nu 
) const

Definition at line 706 of file NuExtraction.cxx.

References ExtractShwInfo(), ExtractTrkInfo(), NtpSREvent::index, Msg::kDebug, MAXMSG, NtpSREvent::nshower, and NtpSREvent::ntrack.

Referenced by NuDemoModule::Ana().

00709 {
00710   Msg::LogLevel_t logLevel=Msg::kDebug;
00711 
00712   MAXMSG("NuExtraction",logLevel,200)
00713     <<"evt="<<evt.index<<", trks="<<evt.ntrack
00714     <<", shws="<<evt.nshower<<endl;
00715 
00716   //extract the trk info
00717   this->ExtractTrkInfo(ntp,evt,nu);
00718 
00719   //extract the shower info (does 1-3)
00720   this->ExtractShwInfo(ntp,evt,nu);
00721 }

void NuExtraction::ExtractVertexTimeFit ( const NtpStRecord ntp,
const NtpSREvent evt,
NuEvent nu 
) const

Definition at line 565 of file NuExtraction.cxx.

References NtpSREvent::index, passfail(), NtpTimingFit::RunBeamFit(), NuEvent::vtxFitChi2DoF, NuEvent::vtxFitPassFail, NuEvent::vtxFitTime, and NuEvent::vtxFitTimeError.

Referenced by ExtractAuxiliaryInfo().

00568 {
00569   Double_t vtxtime = -999.9;
00570   Double_t vtxtime_error = -999.9;
00571   Double_t chi2_dof = -999.9;
00572 
00573   NtpStRecord* evilConstCast = const_cast<NtpStRecord*> (&ntp);
00574 
00575   Bool_t passfail = NtpTimingFit::RunBeamFit(evilConstCast,
00576                                              (Int_t) evt.index,
00577                                              vtxtime,
00578                                              vtxtime_error,
00579                                              chi2_dof);
00580 
00581   nu.vtxFitPassFail = passfail;
00582   nu.vtxFitTime = vtxtime;
00583   nu.vtxFitTimeError = vtxtime_error;
00584   nu.vtxFitChi2DoF = chi2_dof;
00585 }

void NuExtraction::NuEventFromNuMCEvent ( const NuMCEvent mc,
NuEvent nu 
) const

Definition at line 1735 of file NuExtraction.cxx.

References NuMCEvent::aMC, NuEvent::aMC, NuMCEvent::anaVersion, NuEvent::anaVersion, NuMCEvent::anaWeightCC2010, NuEvent::anaWeightCC2010, NuMCEvent::apply1SigmaWeight, NuEvent::apply1SigmaWeight, NuMCEvent::applyBeamWeight, NuEvent::applyBeamWeight, NuMCEvent::applyDetectorWeight, NuEvent::applyDetectorWeight, NuMCEvent::applyGeneratorWeight, NuEvent::applyGeneratorWeight, NuMCEvent::beamType, NuEvent::beamType, NuMCEvent::beamWeight, NuEvent::beamWeight, NuMCEvent::detector, NuEvent::detector, NuMCEvent::detectorWeight, NuEvent::detectorWeight, NuMCEvent::detectorWeightNM, NuEvent::detectorWeightNM, NuMCEvent::detectorWeightNMB, NuEvent::detectorWeightNMB, NuMCEvent::energyMC, NuEvent::energyMC, NuMCEvent::entry, NuEvent::entry, NuMCEvent::fluxErr, NuEvent::fluxErr, NuMCEvent::generatorWeight, NuEvent::generatorWeight, NuMCEvent::hadronicFinalStateMC, NuEvent::hadronicFinalStateMC, NuMCEvent::hornIsReverse, NuEvent::hornIsReverse, NuMCEvent::iaction, NuEvent::iaction, NuMCEvent::initialStateMC, NuEvent::initialStateMC, NuMCEvent::intensity, NuEvent::intensity, NuMCEvent::inu, NuEvent::inu, NuMCEvent::InukeFormTN, NuEvent::InukeFormTN, NuMCEvent::InukeFormTP, NuEvent::InukeFormTP, NuMCEvent::InukeNknockN, NuEvent::InukeNknockN, NuMCEvent::InukeNknockP, NuEvent::InukeNknockP, NuMCEvent::InukeNNPiN, NuEvent::InukeNNPiN, NuMCEvent::InukeNNPiP, NuEvent::InukeNNPiP, NuMCEvent::InukeNucrad, NuEvent::InukeNucrad, NuMCEvent::InukeNwts, NuEvent::InukeNwts, NuMCEvent::InukeNXsecN, NuEvent::InukeNXsecN, NuMCEvent::InukeNXsecP, NuEvent::InukeNXsecP, NuMCEvent::InukePi2PiN, NuEvent::InukePi2PiN, NuMCEvent::InukePi2PiP, NuEvent::InukePi2PiP, NuMCEvent::InukePiAbsorbN, NuEvent::InukePiAbsorbN, NuMCEvent::InukePiAbsorbP, NuEvent::InukePiAbsorbP, NuMCEvent::InukePiCExchgN, NuEvent::InukePiCExchgN, NuMCEvent::InukePiCExchgP, NuEvent::InukePiCExchgP, NuMCEvent::InukePiEScatN, NuEvent::InukePiEScatN, NuMCEvent::InukePiEScatP, NuEvent::InukePiEScatP, NuMCEvent::InukePiInEScatN, NuEvent::InukePiInEScatN, NuMCEvent::InukePiInEScatP, NuEvent::InukePiInEScatP, NuMCEvent::InukePiXsecN, NuEvent::InukePiXsecN, NuMCEvent::InukePiXsecP, NuEvent::InukePiXsecP, NuMCEvent::InukeWrad, NuEvent::InukeWrad, NuMCEvent::inunoosc, NuEvent::inunoosc, NuMCEvent::iresonance, NuEvent::iresonance, NuMCEvent::isInFidVolCCMC, NuEvent::isInFidVolCCMC, NuMCEvent::itg, NuEvent::itg, NuMCEvent::maxMomPreInukeFSneutMC, NuEvent::maxMomPreInukeFSneutMC, NuMCEvent::maxMomPreInukeFSprotMC, NuEvent::maxMomPreInukeFSprotMC, NuMCEvent::mc, NuEvent::mc, NuMCEvent::mu1EnMC, NuEvent::mu1EnMC, NuMCEvent::mu1PxMC, NuEvent::mu1PxMC, NuMCEvent::mu1PyMC, NuEvent::mu1PyMC, NuMCEvent::mu1PzMC, NuEvent::mu1PzMC, NuMCEvent::Ndecay, NuEvent::Ndecay, NuMCEvent::NdxdzFar, NuEvent::NdxdzFar, NuMCEvent::NdxdzNea, NuEvent::NdxdzNea, NuMCEvent::NdydzFar, NuEvent::NdydzFar, NuMCEvent::NdydzNea, NuEvent::NdydzNea, NuMCEvent::Necm, NuEvent::Necm, NuMCEvent::NenergyF, NuEvent::NenergyF, NuMCEvent::NenergyN, NuEvent::NenergyN, NuMCEvent::neuEnMC, NuEvent::neuEnMC, NuMCEvent::neuPxMC, NuEvent::neuPxMC, NuMCEvent::neuPyMC, NuEvent::neuPyMC, NuMCEvent::neuPzMC, NuEvent::neuPzMC, NuMCEvent::Nimpwt, NuEvent::Nimpwt, NuMCEvent::Npz, NuEvent::Npz, NuMCEvent::nucleusMC, NuEvent::nucleusMC, NuMCEvent::numPreInukeFSneutMC, NuEvent::numPreInukeFSneutMC, NuMCEvent::numPreInukeFSprotMC, NuEvent::numPreInukeFSprotMC, NuMCEvent::NWtFar, NuEvent::NWtFar, NuMCEvent::NWtNear, NuEvent::NWtNear, NuMCEvent::pdPx, NuEvent::pdPx, NuMCEvent::pdPy, NuEvent::pdPy, NuMCEvent::pdPz, NuEvent::pdPz, NuMCEvent::planeTrkVtxMC, NuEvent::planeTrkVtxMC, NuMCEvent::ppdxdz, NuEvent::ppdxdz, NuMCEvent::ppdydz, NuEvent::ppdydz, NuMCEvent::ppenergy, NuEvent::ppenergy, NuMCEvent::ppmedium, NuEvent::ppmedium, NuMCEvent::pppz, NuEvent::pppz, NuMCEvent::ppvx, NuEvent::ppvx, NuMCEvent::ppvy, NuEvent::ppvy, NuMCEvent::ppvz, NuEvent::ppvz, NuMCEvent::ptype, NuEvent::ptype, NuMCEvent::q2MC, NuEvent::q2MC, NuMCEvent::releaseType, NuEvent::releaseType, NuMCEvent::reweightVersion, NuEvent::reweightVersion, NuMCEvent::rTrkVtxMC, NuEvent::rTrkVtxMC, NuMCEvent::run, NuEvent::run, NuMCEvent::runPeriod, NuEvent::runPeriod, NuMCEvent::rw, NuEvent::rw, NuMCEvent::rwActual, NuEvent::rwActual, NuMCEvent::shwEn2MC, NuEvent::shwEn2MC, NuMCEvent::shwEnMC, NuEvent::shwEnMC, NuMCEvent::shwEnWeight, NuEvent::shwEnWeight, NuMCEvent::sigma, NuEvent::sigma, NuMCEvent::simFlag, NuEvent::simFlag, NuMCEvent::snarl, NuEvent::snarl, NuMCEvent::subRun, NuEvent::subRun, NuMCEvent::tgen, NuEvent::tgen, NuMCEvent::tgtEnMC, NuEvent::tgtEnMC, NuMCEvent::tgtPxMC, NuEvent::tgtPxMC, NuMCEvent::tgtPyMC, NuEvent::tgtPyMC, NuMCEvent::tgtPzMC, NuEvent::tgtPzMC, NuMCEvent::timeNanoSec, NuEvent::timeNanoSec, NuMCEvent::timeSec, NuEvent::timeSec, NuMCEvent::timeSeconds, NuEvent::timeSeconds, NuMCEvent::tptype, NuEvent::tptype, NuMCEvent::tpx, NuEvent::tpx, NuMCEvent::tpy, NuEvent::tpy, NuMCEvent::tpz, NuEvent::tpz, NuMCEvent::trigtime, NuEvent::trigtime, NuMCEvent::trkContainmentMC, NuEvent::trkContainmentMC, NuMCEvent::trkEn2MC, NuEvent::trkEn2MC, NuMCEvent::trkEndEnMC, NuEvent::trkEndEnMC, NuMCEvent::trkEnMC, NuEvent::trkEnMC, NuMCEvent::trkEnWeight, NuEvent::trkEnWeight, NuMCEvent::trkStartEnMC, NuEvent::trkStartEnMC, NuMCEvent::tvx, NuEvent::tvx, NuMCEvent::tvy, NuEvent::tvy, NuMCEvent::tvz, NuEvent::tvz, NuMCEvent::vtxuMC, NuEvent::vtxuMC, NuMCEvent::vtxvMC, NuEvent::vtxvMC, NuMCEvent::vtxxMC, NuEvent::vtxxMC, NuMCEvent::vtxyMC, NuEvent::vtxyMC, NuMCEvent::vtxzMC, NuEvent::vtxzMC, NuMCEvent::Vx, NuEvent::Vx, NuMCEvent::Vy, NuEvent::Vy, NuMCEvent::Vz, NuEvent::Vz, NuMCEvent::w2MC, NuEvent::w2MC, NuMCEvent::xMC, NuEvent::xMC, NuMCEvent::y2MC, NuEvent::y2MC, NuMCEvent::yMC, NuEvent::yMC, NuMCEvent::zMC, and NuEvent::zMC.

Referenced by NuZBeamReweight::ExtractZBeamReweight().

01737 {
01738   //copy the info across
01739 
01741   //book keeping  quantities
01743   nu.entry=mc.entry;
01744 
01746   //snarl/run based quantities
01748   nu.run=mc.run;
01749   nu.subRun=mc.subRun;
01750   nu.snarl=mc.snarl;
01751 
01752   nu.runPeriod=mc.runPeriod;
01753   nu.intensity=mc.intensity;
01754   nu.hornIsReverse=mc.hornIsReverse;
01755   nu.beamType=mc.beamType;
01756 
01757   nu.detector=mc.detector;
01758   nu.simFlag=mc.simFlag;
01759   nu.timeSec=mc.timeSec;
01760   nu.timeNanoSec=mc.timeNanoSec;
01761   nu.timeSeconds=mc.timeSeconds;
01762   nu.trigtime=mc.trigtime;
01763 
01764   nu.releaseType=mc.releaseType;
01765   nu.anaVersion=mc.anaVersion;
01766 
01768   //truth variables
01770   nu.energyMC=mc.energyMC;
01771 
01772   nu.neuEnMC=mc.neuEnMC;
01773   nu.neuPxMC=mc.neuPxMC;
01774   nu.neuPyMC=mc.neuPyMC;
01775   nu.neuPzMC=mc.neuPzMC;
01776 
01777   nu.mu1EnMC=mc.mu1EnMC;
01778   nu.mu1PxMC=mc.mu1PxMC;
01779   nu.mu1PyMC=mc.mu1PyMC;
01780   nu.mu1PzMC=mc.mu1PzMC;
01781 
01782   nu.tgtEnMC=mc.tgtEnMC;
01783   nu.tgtPxMC=mc.tgtPxMC;
01784   nu.tgtPyMC=mc.tgtPyMC;
01785   nu.tgtPzMC=mc.tgtPzMC;
01786 
01787   nu.zMC=mc.zMC;
01788   nu.aMC=mc.aMC;
01789   nu.nucleusMC=mc.nucleusMC;
01790   nu.initialStateMC=mc.initialStateMC;
01791   nu.hadronicFinalStateMC=mc.hadronicFinalStateMC;
01792   nu.numPreInukeFSprotMC=mc.numPreInukeFSprotMC;
01793   nu.numPreInukeFSneutMC=mc.numPreInukeFSneutMC;
01794   nu.maxMomPreInukeFSprotMC=mc.maxMomPreInukeFSprotMC;
01795   nu.maxMomPreInukeFSneutMC=mc.maxMomPreInukeFSneutMC;
01796 
01797   nu.yMC=mc.yMC;
01798   nu.y2MC=mc.y2MC;
01799   nu.xMC=mc.xMC;
01800   nu.q2MC=mc.q2MC;
01801   nu.w2MC=mc.w2MC;
01802 
01803   nu.trkEnMC=mc.trkEnMC;
01804   nu.trkEn2MC=mc.trkEn2MC;
01805   nu.shwEnMC=mc.shwEnMC;
01806   nu.shwEn2MC=mc.shwEn2MC;
01807 
01808   nu.trkEndEnMC=mc.trkEndEnMC;
01809   nu.trkStartEnMC=mc.trkStartEnMC;
01810   nu.trkContainmentMC=mc.trkContainmentMC;
01811 
01812   nu.sigma=mc.sigma;
01813   nu.iaction=mc.iaction;
01814   nu.iresonance=mc.iresonance;
01815   nu.inu=mc.inu;
01816   nu.inunoosc=mc.inunoosc;
01817   nu.itg=mc.itg;
01818 
01819   nu.vtxxMC=mc.vtxxMC;
01820   nu.vtxyMC=mc.vtxyMC;
01821   nu.vtxzMC=mc.vtxzMC;
01822   nu.vtxuMC=mc.vtxuMC;
01823   nu.vtxvMC=mc.vtxvMC;
01824   nu.planeTrkVtxMC=mc.planeTrkVtxMC;
01825   nu.rTrkVtxMC=mc.rTrkVtxMC;
01826 
01827   nu.mc=mc.mc;//copy across the index of the true event
01828 
01829   nu.Npz=mc.Npz;
01830   nu.NdxdzNea=mc.NdxdzNea;
01831   nu.NdydzNea=mc.NdydzNea;
01832   nu.NenergyN=mc.NenergyN;
01833   nu.NWtNear=mc.NWtNear;
01834   nu.NdxdzFar=mc.NdxdzFar;
01835   nu.NdydzFar=mc.NdydzFar;
01836   nu.NenergyF=mc.NenergyF;
01837   nu.NWtFar=mc.NWtFar;
01838   nu.Ndecay=mc.Ndecay;
01839   nu.Vx=mc.Vx;
01840   nu.Vy=mc.Vy;
01841   nu.Vz=mc.Vz;
01842   nu.pdPx=mc.pdPx;
01843   nu.pdPy=mc.pdPy;
01844   nu.pdPz=mc.pdPz;
01845   nu.ppdxdz=mc.ppdxdz;
01846   nu.ppdydz=mc.ppdydz;
01847   nu.pppz=mc.pppz;
01848   nu.ppenergy=mc.ppenergy;
01849   nu.ppmedium=mc.ppmedium;
01850   nu.ppvx=mc.ppvx;
01851   nu.ppvy=mc.ppvy;
01852   nu.ppvz=mc.ppvz;
01853   nu.ptype=mc.ptype;
01854   nu.Necm=mc.Necm;
01855   nu.Nimpwt=mc.Nimpwt;
01856   nu.tvx=mc.tvx;
01857   nu.tvy=mc.tvy;
01858   nu.tvz=mc.tvz;
01859   nu.tpx=mc.tpx;
01860   nu.tpy=mc.tpy;
01861   nu.tpz=mc.tpz;
01862   nu.tptype=mc.tptype;
01863   nu.tgen=mc.tgen;
01864 
01865   //copy the weights
01866   nu.reweightVersion = mc.reweightVersion;
01867   nu.applyBeamWeight = mc.applyBeamWeight;
01868   nu.apply1SigmaWeight = mc.apply1SigmaWeight;
01869   nu.applyDetectorWeight = mc.applyDetectorWeight;
01870   nu.applyGeneratorWeight = mc.applyGeneratorWeight;
01871   
01872   nu.rw=mc.rw;
01873   nu.fluxErr=mc.fluxErr;
01874   nu.rwActual=mc.rwActual;
01875   nu.generatorWeight=mc.generatorWeight;
01876   nu.detectorWeight=mc.detectorWeight;
01877   nu.anaWeightCC2010=mc.anaWeightCC2010;
01878 
01879   nu.trkEnWeight=mc.trkEnWeight;
01880   nu.shwEnWeight=mc.shwEnWeight;
01881   nu.beamWeight=mc.beamWeight;
01882   nu.detectorWeightNMB=mc.detectorWeightNMB;
01883   nu.detectorWeightNM=mc.detectorWeightNM;
01884 
01885   nu.InukeNwts  =  (Int_t)mc.InukeNwts ;
01886   nu.InukePiCExchgP  =  mc.InukePiCExchgP ;   //0
01887   nu.InukePiCExchgN  =  mc.InukePiCExchgN ;   //1
01888   nu.InukePiEScatP  =  mc.InukePiEScatP ;     //2
01889   nu.InukePiEScatN  =  mc.InukePiEScatN ;     //3
01890   nu.InukePiInEScatP  =  mc.InukePiInEScatP ;  //4
01891   nu.InukePiInEScatN  =  mc.InukePiInEScatN ;  //5
01892   nu.InukePiAbsorbP  =  mc.InukePiAbsorbP ;   //6
01893   nu.InukePiAbsorbN  =  mc.InukePiAbsorbN ;   //7
01894   nu.InukePi2PiP  =  mc.InukePi2PiP ;         //8
01895   nu.InukePi2PiN  =  mc.InukePi2PiN ;         //9
01896   nu.InukeNknockP  =  mc.InukeNknockP ;       //10
01897   nu.InukeNknockN  =  mc.InukeNknockN ;       //11
01898   nu.InukeNNPiP  =  mc.InukeNNPiP ;           //12
01899   nu.InukeNNPiN  =  mc.InukeNNPiN ;           //13
01900   nu.InukeFormTP  =  mc.InukeFormTP ;      //14
01901   nu.InukeFormTN  =  mc.InukeFormTN ;      //15
01902   nu.InukePiXsecP  =  mc.InukePiXsecP ;     //16
01903   nu.InukePiXsecN  =  mc.InukePiXsecN ;     //17
01904   nu.InukeNXsecP  =  mc.InukeNXsecP ;      //18
01905   nu.InukeNXsecN  =  mc.InukeNXsecN ;      //19
01906   nu.InukeNucrad  =  mc.InukeNucrad ;
01907   nu.InukeWrad  =  mc.InukeWrad ;
01908 
01909   nu.isInFidVolCCMC = mc.isInFidVolCCMC;
01910 }

void NuExtraction::NuMCEventFromNuEvent ( const NuEvent nu,
NuMCEvent numc 
) const

Definition at line 1556 of file NuExtraction.cxx.

References NuEvent::aMC, NuMCEvent::aMC, NuEvent::anaVersion, NuMCEvent::anaVersion, NuEvent::anaWeightCC2010, NuMCEvent::anaWeightCC2010, NuEvent::apply1SigmaWeight, NuMCEvent::apply1SigmaWeight, NuEvent::applyBeamWeight, NuMCEvent::applyBeamWeight, NuEvent::applyDetectorWeight, NuMCEvent::applyDetectorWeight, NuEvent::applyGeneratorWeight, NuMCEvent::applyGeneratorWeight, NuEvent::beamType, NuMCEvent::beamType, NuEvent::beamWeight, NuMCEvent::beamWeight, NuEvent::detector, NuMCEvent::detector, NuEvent::detectorWeight, NuMCEvent::detectorWeight, NuEvent::detectorWeightNM, NuMCEvent::detectorWeightNM, NuEvent::detectorWeightNMB, NuMCEvent::detectorWeightNMB, NuEvent::energyMC, NuMCEvent::energyMC, NuEvent::entry, NuMCEvent::entry, NuEvent::fluxErr, NuMCEvent::fluxErr, NuEvent::generatorWeight, NuMCEvent::generatorWeight, NuEvent::hadronicFinalStateMC, NuMCEvent::hadronicFinalStateMC, NuEvent::hornIsReverse, NuMCEvent::hornIsReverse, NuEvent::iaction, NuMCEvent::iaction, NuEvent::initialStateMC, NuMCEvent::initialStateMC, NuEvent::intensity, NuMCEvent::intensity, NuEvent::inu, NuMCEvent::inu, NuEvent::InukeFormTN, NuMCEvent::InukeFormTN, NuEvent::InukeFormTP, NuMCEvent::InukeFormTP, NuEvent::InukeNknockN, NuMCEvent::InukeNknockN, NuEvent::InukeNknockP, NuMCEvent::InukeNknockP, NuEvent::InukeNNPiN, NuMCEvent::InukeNNPiN, NuEvent::InukeNNPiP, NuMCEvent::InukeNNPiP, NuEvent::InukeNucrad, NuMCEvent::InukeNucrad, NuEvent::InukeNwts, NuMCEvent::InukeNwts, NuEvent::InukeNXsecN, NuMCEvent::InukeNXsecN, NuEvent::InukeNXsecP, NuMCEvent::InukeNXsecP, NuEvent::InukePi2PiN, NuMCEvent::InukePi2PiN, NuEvent::InukePi2PiP, NuMCEvent::InukePi2PiP, NuEvent::InukePiAbsorbN, NuMCEvent::InukePiAbsorbN, NuEvent::InukePiAbsorbP, NuMCEvent::InukePiAbsorbP, NuEvent::InukePiCExchgN, NuMCEvent::InukePiCExchgN, NuEvent::InukePiCExchgP, NuMCEvent::InukePiCExchgP, NuEvent::InukePiEScatN, NuMCEvent::InukePiEScatN, NuEvent::InukePiEScatP, NuMCEvent::InukePiEScatP, NuEvent::InukePiInEScatN, NuMCEvent::InukePiInEScatN, NuEvent::InukePiInEScatP, NuMCEvent::InukePiInEScatP, NuEvent::InukePiXsecN, NuMCEvent::InukePiXsecN, NuEvent::InukePiXsecP, NuMCEvent::InukePiXsecP, NuEvent::InukeWrad, NuMCEvent::InukeWrad, NuEvent::inunoosc, NuMCEvent::inunoosc, NuEvent::iresonance, NuMCEvent::iresonance, NuEvent::isInFidVolCCMC, NuMCEvent::isInFidVolCCMC, NuEvent::itg, NuMCEvent::itg, NuEvent::maxMomPreInukeFSneutMC, NuMCEvent::maxMomPreInukeFSneutMC, NuEvent::maxMomPreInukeFSprotMC, NuMCEvent::maxMomPreInukeFSprotMC, NuEvent::mc, NuMCEvent::mc, NuEvent::mu1EnMC, NuMCEvent::mu1EnMC, NuEvent::mu1PxMC, NuMCEvent::mu1PxMC, NuEvent::mu1PyMC, NuMCEvent::mu1PyMC, NuEvent::mu1PzMC, NuMCEvent::mu1PzMC, NuEvent::Ndecay, NuMCEvent::Ndecay, NuEvent::NdxdzFar, NuMCEvent::NdxdzFar, NuEvent::NdxdzNea, NuMCEvent::NdxdzNea, NuEvent::NdydzFar, NuMCEvent::NdydzFar, NuEvent::NdydzNea, NuMCEvent::NdydzNea, NuEvent::Necm, NuMCEvent::Necm, NuEvent::NenergyF, NuMCEvent::NenergyF, NuEvent::NenergyN, NuMCEvent::NenergyN, NuEvent::neuEnMC, NuMCEvent::neuEnMC, NuEvent::neuPxMC, NuMCEvent::neuPxMC, NuEvent::neuPyMC, NuMCEvent::neuPyMC, NuEvent::neuPzMC, NuMCEvent::neuPzMC, NuEvent::Nimpwt, NuMCEvent::Nimpwt, NuEvent::Npz, NuMCEvent::Npz, NuEvent::nucleusMC, NuMCEvent::nucleusMC, NuEvent::numPreInukeFSneutMC, NuMCEvent::numPreInukeFSneutMC, NuEvent::numPreInukeFSprotMC, NuMCEvent::numPreInukeFSprotMC, NuEvent::NWtFar, NuMCEvent::NWtFar, NuEvent::NWtNear, NuMCEvent::NWtNear, NuEvent::pdPx, NuMCEvent::pdPx, NuEvent::pdPy, NuMCEvent::pdPy, NuEvent::pdPz, NuMCEvent::pdPz, NuEvent::planeTrkVtxMC, NuMCEvent::planeTrkVtxMC, NuEvent::ppdxdz, NuMCEvent::ppdxdz, NuEvent::ppdydz, NuMCEvent::ppdydz, NuEvent::ppenergy, NuMCEvent::ppenergy, NuEvent::ppmedium, NuMCEvent::ppmedium, NuEvent::pppz, NuMCEvent::pppz, NuEvent::ppvx, NuMCEvent::ppvx, NuEvent::ppvy, NuMCEvent::ppvy, NuEvent::ppvz, NuMCEvent::ppvz, NuEvent::ptype, NuMCEvent::ptype, NuEvent::q2MC, NuMCEvent::q2MC, NuEvent::releaseType, NuMCEvent::releaseType, NuEvent::reweightVersion, NuMCEvent::reweightVersion, NuEvent::rTrkVtxMC, NuMCEvent::rTrkVtxMC, NuEvent::run, NuMCEvent::run, NuEvent::runPeriod, NuMCEvent::runPeriod, NuEvent::rw, NuMCEvent::rw, NuEvent::rwActual, NuMCEvent::rwActual, NuEvent::shwEn2MC, NuMCEvent::shwEn2MC, NuEvent::shwEnMC, NuMCEvent::shwEnMC, NuEvent::shwEnWeight, NuMCEvent::shwEnWeight, NuEvent::sigma, NuMCEvent::sigma, NuEvent::simFlag, NuMCEvent::simFlag, NuEvent::snarl, NuMCEvent::snarl, NuEvent::subRun, NuMCEvent::subRun, NuEvent::tgen, NuMCEvent::tgen, NuEvent::tgtEnMC, NuMCEvent::tgtEnMC, NuEvent::tgtPxMC, NuMCEvent::tgtPxMC, NuEvent::tgtPyMC, NuMCEvent::tgtPyMC, NuEvent::tgtPzMC, NuMCEvent::tgtPzMC, NuEvent::timeNanoSec, NuMCEvent::timeNanoSec, NuEvent::timeSec, NuMCEvent::timeSec, NuEvent::timeSeconds, NuMCEvent::timeSeconds, NuEvent::tptype, NuMCEvent::tptype, NuEvent::tpx, NuMCEvent::tpx, NuEvent::tpy, NuMCEvent::tpy, NuEvent::tpz, NuMCEvent::tpz, NuEvent::trigtime, NuMCEvent::trigtime, NuEvent::trkContainmentMC, NuMCEvent::trkContainmentMC, NuEvent::trkEn2MC, NuMCEvent::trkEn2MC, NuEvent::trkEndEnMC, NuMCEvent::trkEndEnMC, NuEvent::trkEnMC, NuMCEvent::trkEnMC, NuEvent::trkEnWeight, NuMCEvent::trkEnWeight, NuEvent::trkStartEnMC, NuMCEvent::trkStartEnMC, NuEvent::tvx, NuMCEvent::tvx, NuEvent::tvy, NuMCEvent::tvy, NuEvent::tvz, NuMCEvent::tvz, NuEvent::vtxuMC, NuMCEvent::vtxuMC, NuEvent::vtxvMC, NuMCEvent::vtxvMC, NuEvent::vtxxMC, NuMCEvent::vtxxMC, NuEvent::vtxyMC, NuMCEvent::vtxyMC, NuEvent::vtxzMC, NuMCEvent::vtxzMC, NuEvent::Vx, NuMCEvent::Vx, NuEvent::Vy, NuMCEvent::Vy, NuEvent::Vz, NuMCEvent::Vz, NuEvent::w2MC, NuMCEvent::w2MC, NuEvent::xMC, NuMCEvent::xMC, NuEvent::y2MC, NuMCEvent::y2MC, NuEvent::yMC, NuMCEvent::yMC, NuEvent::zMC, and NuMCEvent::zMC.

Referenced by NuPlots::FillTrueFidEnergySpect(), and NuAnalysis::LoopOverTruthInfo().

01558 {
01559   //copy the info across
01560 
01562   //book keeping  quantities
01564   numc.entry=nu.entry;
01565 
01567   //snarl/run based quantities
01569   numc.run=nu.run;
01570   numc.subRun=nu.subRun;
01571   numc.snarl=nu.snarl;
01572 
01573   numc.runPeriod=nu.runPeriod;
01574   numc.intensity=nu.intensity;
01575   numc.hornIsReverse=nu.hornIsReverse;
01576   numc.beamType=nu.beamType;
01577 
01578   numc.detector=nu.detector;
01579   numc.simFlag=nu.simFlag;
01580   numc.timeSec=nu.timeSec;
01581   numc.timeNanoSec=nu.timeNanoSec;
01582   numc.timeSeconds=nu.timeSeconds;
01583   numc.trigtime=nu.trigtime;
01584 
01585   numc.releaseType=nu.releaseType;
01586   numc.anaVersion=nu.anaVersion;
01587 
01589   //truth variables
01591   numc.energyMC=nu.energyMC;
01592 
01593   numc.neuEnMC=nu.neuEnMC;
01594   numc.neuPxMC=nu.neuPxMC;
01595   numc.neuPyMC=nu.neuPyMC;
01596   numc.neuPzMC=nu.neuPzMC;
01597 
01598   numc.mu1EnMC=nu.mu1EnMC;
01599   numc.mu1PxMC=nu.mu1PxMC;
01600   numc.mu1PyMC=nu.mu1PyMC;
01601   numc.mu1PzMC=nu.mu1PzMC;
01602 
01603   numc.tgtEnMC=nu.tgtEnMC;
01604   numc.tgtPxMC=nu.tgtPxMC;
01605   numc.tgtPyMC=nu.tgtPyMC;
01606   numc.tgtPzMC=nu.tgtPzMC;
01607 
01608   numc.zMC=nu.zMC;
01609   numc.aMC=nu.aMC;
01610   numc.nucleusMC=nu.nucleusMC;
01611   numc.initialStateMC=nu.initialStateMC;
01612   numc.hadronicFinalStateMC=nu.hadronicFinalStateMC;
01613   numc.numPreInukeFSprotMC=nu.numPreInukeFSprotMC;
01614   numc.numPreInukeFSneutMC=nu.numPreInukeFSneutMC;
01615   numc.maxMomPreInukeFSprotMC=nu.maxMomPreInukeFSprotMC;
01616   numc.maxMomPreInukeFSneutMC=nu.maxMomPreInukeFSneutMC;
01617 
01618   numc.yMC=nu.yMC;
01619   numc.y2MC=nu.y2MC;
01620   numc.xMC=nu.xMC;
01621   numc.q2MC=nu.q2MC;
01622   numc.w2MC=nu.w2MC;
01623 
01624   numc.trkEnMC=nu.trkEnMC;
01625   numc.trkEn2MC=nu.trkEn2MC;
01626   numc.shwEnMC=nu.shwEnMC;
01627   numc.shwEn2MC=nu.shwEn2MC;
01628 
01629   numc.trkEndEnMC=nu.trkEndEnMC;
01630   numc.trkStartEnMC=nu.trkStartEnMC;
01631   numc.trkContainmentMC=nu.trkContainmentMC;
01632 
01633   numc.sigma=nu.sigma;
01634   numc.iaction=nu.iaction;
01635   numc.iresonance=nu.iresonance;
01636   numc.inu=nu.inu;
01637   numc.inunoosc=nu.inunoosc;
01638   numc.itg=nu.itg;
01639 
01640   numc.vtxxMC=nu.vtxxMC;
01641   numc.vtxyMC=nu.vtxyMC;
01642   numc.vtxzMC=nu.vtxzMC;
01643   numc.vtxuMC=nu.vtxuMC;
01644   numc.vtxvMC=nu.vtxvMC;
01645   numc.planeTrkVtxMC=nu.planeTrkVtxMC;
01646   numc.rTrkVtxMC=nu.rTrkVtxMC;
01647 
01648   numc.mc=nu.mc;//copy across the index of the true event
01649 
01650   numc.Npz=nu.Npz;
01651   numc.NdxdzNea=nu.NdxdzNea;
01652   numc.NdydzNea=nu.NdydzNea;
01653   numc.NenergyN=nu.NenergyN;
01654   numc.NWtNear=nu.NWtNear;
01655   numc.NdxdzFar=nu.NdxdzFar;
01656   numc.NdydzFar=nu.NdydzFar;
01657   numc.NenergyF=nu.NenergyF;
01658   numc.NWtFar=nu.NWtFar;
01659   numc.Ndecay=nu.Ndecay;
01660   numc.Vx=nu.Vx;
01661   numc.Vy=nu.Vy;
01662   numc.Vz=nu.Vz;
01663   numc.pdPx=nu.pdPx;
01664   numc.pdPy=nu.pdPy;
01665   numc.pdPz=nu.pdPz;
01666   numc.ppdxdz=nu.ppdxdz;
01667   numc.ppdydz=nu.ppdydz;
01668   numc.pppz=nu.pppz;
01669   numc.ppenergy=nu.ppenergy;
01670   numc.ppmedium=nu.ppmedium;
01671   numc.ppvx=nu.ppvx;
01672   numc.ppvy=nu.ppvy;
01673   numc.ppvz=nu.ppvz;
01674   numc.ptype=nu.ptype;
01675   numc.Necm=nu.Necm;
01676   numc.Nimpwt=nu.Nimpwt;
01677   numc.tvx=nu.tvx;
01678   numc.tvy=nu.tvy;
01679   numc.tvz=nu.tvz;
01680   numc.tpx=nu.tpx;
01681   numc.tpy=nu.tpy;
01682   numc.tpz=nu.tpz;
01683   numc.tptype=nu.tptype;
01684   numc.tgen=nu.tgen;
01685 
01686   //copy the weights
01687   numc.reweightVersion = nu.reweightVersion;
01688   numc.applyBeamWeight = nu.applyBeamWeight;
01689   numc.apply1SigmaWeight = nu.apply1SigmaWeight;
01690   numc.applyDetectorWeight = nu.applyDetectorWeight;
01691   numc.applyGeneratorWeight = nu.applyGeneratorWeight;
01692   
01693   numc.rw=nu.rw;
01694   numc.fluxErr=nu.fluxErr;
01695   numc.rwActual=nu.rwActual;
01696   numc.generatorWeight=nu.generatorWeight;
01697   numc.detectorWeight=nu.detectorWeight;
01698   numc.anaWeightCC2010=nu.anaWeightCC2010;
01699 
01700   numc.trkEnWeight=nu.trkEnWeight;
01701   numc.shwEnWeight=nu.shwEnWeight;
01702   numc.beamWeight=nu.beamWeight;
01703   numc.detectorWeightNMB=nu.detectorWeightNMB;
01704   numc.detectorWeightNM=nu.detectorWeightNM;
01705 
01706   numc.InukeNwts  =  nu.InukeNwts ;
01707   numc.InukePiCExchgP  =  nu.InukePiCExchgP ;   //0
01708   numc.InukePiCExchgN  =  nu.InukePiCExchgN ;   //1
01709   numc.InukePiEScatP  =  nu.InukePiEScatP ;     //2
01710   numc.InukePiEScatN  =  nu.InukePiEScatN ;     //3
01711   numc.InukePiInEScatP  =  nu.InukePiInEScatP ;  //4
01712   numc.InukePiInEScatN  =  nu.InukePiInEScatN ;  //5
01713   numc.InukePiAbsorbP  =  nu.InukePiAbsorbP ;   //6
01714   numc.InukePiAbsorbN  =  nu.InukePiAbsorbN ;   //7
01715   numc.InukePi2PiP  =  nu.InukePi2PiP ;         //8
01716   numc.InukePi2PiN  =  nu.InukePi2PiN ;         //9
01717   numc.InukeNknockP  =  nu.InukeNknockP ;       //10
01718   numc.InukeNknockN  =  nu.InukeNknockN ;       //11
01719   numc.InukeNNPiP  =  nu.InukeNNPiP ;           //12
01720   numc.InukeNNPiN  =  nu.InukeNNPiN ;           //13
01721   numc.InukeFormTP  =  nu.InukeFormTP ;      //14
01722   numc.InukeFormTN  =  nu.InukeFormTN ;      //15
01723   numc.InukePiXsecP  =  nu.InukePiXsecP ;     //16
01724   numc.InukePiXsecN  =  nu.InukePiXsecN ;     //17
01725   numc.InukeNXsecP  =  nu.InukeNXsecP ;      //18
01726   numc.InukeNXsecN  =  nu.InukeNXsecN ;      //19
01727   numc.InukeNucrad  =  nu.InukeNucrad ;
01728   numc.InukeWrad  =  nu.InukeWrad ;
01729 
01730   numc.isInFidVolCCMC = nu.isInFidVolCCMC;
01731 }


The documentation for this class was generated from the following files:
Generated on Mon Aug 11 01:06:27 2014 for loon by  doxygen 1.4.7