NuPIDInterface Class Reference

#include <NuPIDInterface.h>

List of all members.

Public Member Functions

 NuPIDInterface ()
 ~NuPIDInterface ()
void GetAbID (const NtpStRecord &ntp, const NtpSREvent &evt, NuEvent &nu)
void GetDpID (const NtpStRecord &ntp, const NtpSREvent &evt, NuEvent &nu)
void GetRoID (const NtpStRecord &ntp, const NtpSREvent &evt, NuEvent &nu)
void GetJmID (const NtpStRecord &ntp, const NtpSREvent &evt, NuEvent &nu)
void GetRoID2007 (const NtpStRecord &ntp, const NtpSREvent &evt, NuEvent &nu)
void GetRoIDNuMuBar (const NtpStRecord &ntp, const NtpSREvent &evt, NuEvent &nu)
void GetRoIDPlus (NuEvent &nu)

Private Member Functions

void PrintReleaseTypeEtc (const NuEvent &nu) const
std::string GetFileNameAbID (const NuEvent &nu) const
 *
std::string GetFileNameRoID (const NuEvent &nu) const
std::string GetFileNameJmID (const NuEvent &nu) const
std::string GetFileNamekNNID (const NuEvent &nu, int type) const
std::string GetFileNameJeID (const NuEvent &nu) const
void GetRoIDEvt (const NtpSREvent &evt, NuEvent &nu) const
void GetRoIDNthTrk (int trkIdx, const NtpStRecord &ntp, const NtpSREvent &evt, NuEvent &nu) const
void GetJmIDEvt (const NtpSREvent &evt, NuEvent &nu) const
void GetJmIDNthTrk (int trkIdx, const NtpStRecord &ntp, const NtpSREvent &evt, NuEvent &nu) const
RegistrySubReg_FillkNN (int k, int keybase, int keytrue, string keylist, string shortknn, string usetrack)
void InitialiseAbID (const NuEvent &nu)
void InitialiseDpID (const NuEvent &nu)
void InitialiseRoID (const NuEvent &nu)
void InitialiseRoID2007 (const NuEvent &nu)
void InitialiseRoIDNuMuBar (const NuEvent &nu)
void InitialiseJmID (const NuEvent &nu)
void InitialiseJeID (const NuEvent &nu)

Private Attributes

LoadPDFpoLoadPDF
LoadPDFpoLoadPDFKin
PIDCalculatorpoPIDCalculator
PIDCalculatorpoPIDCalculatorKin
MadAbIDabID
MadDpIDdpID
NuMadAnalysismad
Anp::InterfaceroInterface
Anp::InterfacejmInterface
RegistryroRegistry
RegistryjmRegistry

Detailed Description

Definition at line 22 of file NuPIDInterface.h.


Constructor & Destructor Documentation

NuPIDInterface::NuPIDInterface (  ) 

Definition at line 36 of file NuPIDInterface.cxx.

References abID, dpID, jmInterface, Msg::kDebug, mad, MSG, poLoadPDF, poLoadPDFKin, poPIDCalculator, poPIDCalculatorKin, roInterface, and roRegistry.

00037 {
00038   MSG("NuPIDInterface",Msg::kDebug)
00039     <<"Running NuPIDInterface Constructor..."<<endl;
00040 
00041   //initialise pointers
00042   poLoadPDF=0;
00043   poLoadPDFKin=0;
00044   poPIDCalculator=0;
00045   poPIDCalculatorKin=0;
00046   abID=0;
00047   dpID=0;
00048   mad=0;
00049   roInterface=0;
00050   jmInterface=0;
00051   roRegistry=0;
00052 
00053   MSG("NuPIDInterface",Msg::kDebug)
00054     <<"Finished NuPIDInterface Constructor"<<endl;
00055 }

NuPIDInterface::~NuPIDInterface (  ) 

Definition at line 59 of file NuPIDInterface.cxx.

References Msg::kDebug, and MSG.

00060 {
00061   MSG("NuPIDInterface",Msg::kDebug)
00062     <<"Running NuPIDInterface Destructor..."<<endl;
00063 
00064   //if (poLoadPDF) delete poLoadPDF;
00065   //if (poLoadPDFKin) delete poLoadPDFKin;
00066   //if (poPIDCalculator) delete poPIDCalculator;
00067   //if (poPIDCalculatorKin) delete poPIDCalculatorKin;
00068   //if (abID) delete abID;
00069   //if (dpID) delete dpID;
00070   //if (mad) delete mad;
00071   //if (roInterface) delete roInterface;
00072   //if (roRegistry) delete roRegistry;
00073 
00074   MSG("NuPIDInterface",Msg::kDebug)
00075     <<"Finished NuPIDInterface Destructor"<<endl;
00076 }


Member Function Documentation

void NuPIDInterface::GetAbID ( const NtpStRecord ntp,
const NtpSREvent evt,
NuEvent nu 
)

Definition at line 929 of file NuPIDInterface.cxx.

References NuEvent::abID, abID, MadAbID::CalcPID(), and InitialiseAbID().

Referenced by NuAnalysis::ExtractPIDsAndWeights(), and NuAnalysis::LIRejectionTest().

00931 {
00932   //initialise if required
00933   if (!abID) this->InitialiseAbID(nu);
00934 
00935   //get the value
00936   nu.abID=abID->CalcPID(&evt,&ntp);
00937 }

void NuPIDInterface::GetDpID ( const NtpStRecord ntp,
const NtpSREvent evt,
NuEvent nu 
)

Definition at line 1534 of file NuPIDInterface.cxx.

References MadDpID::CalcPID(), NuEvent::dpID, dpID, NuEvent::evt, InitialiseDpID(), mad, and NuMadAnalysis::SetEntry().

Referenced by NuAnalysis::ExtractPIDsAndWeights(), and NuAnalysis::LIRejectionTest().

01536 {
01537   //initialise if required
01538   if (!dpID) this->InitialiseDpID(nu);
01539 
01540   //give the ntp to the mad interface
01541   mad->SetEntry(&ntp);
01542 
01543   //get the value
01544   nu.dpID=dpID->CalcPID(mad,nu.evt,0);
01545 }

std::string NuPIDInterface::GetFileNameAbID ( const NuEvent nu  )  const [private]

*

Definition at line 186 of file NuPIDInterface.cxx.

References NuEvent::beamType, NuEvent::detector, NuLibrary::general, NuGeneral::GetReleaseDirToUse(), NuLibrary::Instance(), ReleaseType::IsCedar(), ReleaseType::IsDaikon(), Msg::kError, Detector::kFar, Msg::kInfo, BeamType::kL010z000i, BeamType::kL010z170i, BeamType::kL010z185i, BeamType::kL010z185i_rev, BeamType::kL010z200i, BeamType::kL100z200i, BeamType::kL150z200i, BeamType::kL200z200i, BeamType::kL250z200i, BeamType::kM000z000i_nova, BeamType::kM000z200i_nova, BeamType::kM000z200i_nova_rev, Detector::kNear, MAXMSG, NuEvent::mcVersion, MSG, NuUtilities::PrintRelease(), PrintReleaseTypeEtc(), NuEvent::recoVersion, and NuEvent::releaseType.

Referenced by InitialiseAbID().

00187 {
00188   //get an instance of the code library
00189   const NuLibrary& lib=NuLibrary::Instance();
00190 
00191   string sBase=lib.general.GetReleaseDirToUse("Mad");
00192   string sFileName=sBase+"/Mad/data/ab_pdf_near_le_cedar_daikon.root";
00193   Bool_t badVersions=false;
00194 
00195   //Set it to defaults that don't exist so the code stops if we don't
00196   //set the release type
00197   string sVegetable = "Aubergine";
00198   string sTree = "Bonsai";
00199   string sBeam = "LHC";
00200   string sDetector = "Nova";
00201 
00202   // Assuming cedar since these are the only available training files
00203   sTree = "cedar";
00204   if (!ReleaseType::IsCedar(nu.recoVersion)){
00205     MAXMSG("NuPIDInterface",Msg::kInfo,1) << "Assuming cedar reco version in AbID initialization (changed from "
00206     << NuUtilities::PrintRelease(nu.releaseType) << ") since those are the only available training files" << endl;
00207   }
00208 
00209   if (ReleaseType::IsDaikon(nu.mcVersion)){
00210     sVegetable = "daikon";
00211   }
00212   else{
00213     badVersions=true;
00214   }
00215 
00216   if (nu.detector == Detector::kNear){
00217     sDetector = "near";
00218     if (nu.beamType==BeamType::kL010z185i ||
00219         nu.beamType==BeamType::kL010z185i_rev) {
00220       sBeam = "le";
00221     }
00222     else if (nu.beamType==BeamType::kL010z170i) {
00223       sBeam = "le170";
00224     }
00225     else if (nu.beamType==BeamType::kL010z200i) {
00226       sBeam = "le200";
00227     }
00228     else if (nu.beamType==BeamType::kL010z000i) {
00229       sBeam = "le0";
00230     }
00231     else if (nu.beamType==BeamType::kL100z200i ||
00232              nu.beamType==BeamType::kL150z200i ||
00233              nu.beamType==BeamType::kL200z200i) {
00234       //is this correct? Not sure what pme really is
00235       sBeam = "pme";
00236     }
00237     else if (nu.beamType==BeamType::kL250z200i ||
00238              nu.beamType==BeamType::kM000z000i_nova ||
00239              nu.beamType==BeamType::kM000z200i_nova ||
00240              nu.beamType==BeamType::kM000z200i_nova_rev) {
00241       sBeam = "phe";
00242     }
00243     else {
00244       MSG("NuPIDInterface",Msg::kError)
00245         <<"Ahhh, BeamType not recognised: "<<nu.beamType<<endl;
00246       assert(false);
00247     }
00248   }
00249   else if (nu.detector==Detector::kFar) {
00250     sDetector = "far";
00251     //check if beamtype is phe
00252     if (nu.beamType==BeamType::kL250z200i) {
00253       sBeam = "phe";
00254     }
00255     else {
00256       sBeam = "le";
00257     }
00258   }
00259   else {
00260     cout<<"Ahhh, detector="<<nu.detector<<" not recognised"<<endl;
00261   }
00262 
00263   sFileName = sBase
00264     + "/Mad/data/ab_pdf_"
00265     + sDetector + "_"
00266     + sBeam + "_"
00267     + sTree + "_"
00268     + sVegetable + ".root";
00269   /*
00270   if (nu.detector==Detector::kNear) {
00271     if (ReleaseType::IsCedar(nu.recoVersion) &&
00272         ReleaseType::IsDaikon(nu.mcVersion)) {
00273       //check the beam type
00274       if (nu.beamType==BeamType::kL010z185i) {
00275         sFileName=sBase+"/Mad/data/ab_pdf_near_le_cedar_daikon.root";
00276       }
00277       else if (nu.beamType==BeamType::kL010z170i) {
00278         sFileName=sBase+
00279           "/Mad/data/ab_pdf_near_le170_cedar_daikon.root";
00280       }
00281       else if (nu.beamType==BeamType::kL010z200i) {
00282         sFileName=sBase+
00283           "/Mad/data/ab_pdf_near_le200_cedar_daikon.root";
00284       }
00285       else if (nu.beamType==BeamType::kL010z000i) {
00286         sFileName=sBase+
00287           "/Mad/data/ab_pdf_near_le0_cedar_daikon.root";
00288       }
00289       else if (nu.beamType==BeamType::kL100z200i ||
00290                nu.beamType==BeamType::kL150z200i ||
00291                nu.beamType==BeamType::kL200z200i) {
00292         //is this correct? Not sure what pme really is
00293         sFileName=sBase+
00294           "/Mad/data/ab_pdf_near_pme_cedar_daikon.root";
00295       }
00296       else if (nu.beamType==BeamType::kL250z200i) {
00297         sFileName=sBase+
00298           "/Mad/data/ab_pdf_near_phe_cedar_daikon.root";
00299       }
00300       else {
00301         MSG("NuPIDInterface",Msg::kError)
00302           <<"Ahhh, BeamType not recognised: "<<nu.beamType<<endl;
00303         assert(false);
00304       }
00305     }
00306     else {
00307       badVersions=true;
00308     }
00309   }
00310   else if (nu.detector==Detector::kFar) {
00311     if (ReleaseType::IsCedar(nu.recoVersion) &&
00312         ReleaseType::IsDaikon(nu.mcVersion)) {
00313       //check if beamtype is phe
00314       if (nu.beamType==BeamType::kL250z200i) {
00315         sFileName=sBase+"/Mad/data/ab_pdf_far_phe_cedar_daikon.root";
00316       }
00317       else {
00318         sFileName=sBase+"/Mad/data/ab_pdf_far_le_cedar_daikon.root";
00319       }
00320     }
00321     else {
00322       badVersions=true;
00323     }
00324   }
00325   else {
00326     cout<<"Ahhh, detector="<<nu.detector<<" not recognised"<<endl;
00327   }
00328   */
00329   if (badVersions) {
00330     MSG("NuPIDInterface",Msg::kError)
00331       <<"Ahhh, ReleaseType not recognised:"<<endl;
00332     this->PrintReleaseTypeEtc(nu);
00333     MSG("NuPIDInterface",Msg::kError)<<"Will abort here..."<<endl;
00334     assert(false);
00335   }
00336 
00337   return sFileName;
00338 }

std::string NuPIDInterface::GetFileNameJeID ( const NuEvent nu  )  const [private]

Definition at line 487 of file NuPIDInterface.cxx.

References NuEvent::detector, NuLibrary::general, NuGeneral::GetReleaseDirToUse(), NuLibrary::Instance(), ReleaseType::IsCedar(), ReleaseType::IsDaikon(), Msg::kError, Detector::kFar, Detector::kNear, NuEvent::mcVersion, MSG, PrintReleaseTypeEtc(), and NuEvent::recoVersion.

Referenced by InitialiseJeID().

00488 {
00489   //get an instance of the code library
00490   const NuLibrary& lib=NuLibrary::Instance();
00491 
00492   string sBase=lib.general.GetReleaseDirToUse("NuMuBar");
00493   string sFileName=sBase+"/NuMuBar/data/pid_evans_cedar_daikon_LE185.root";
00494   Bool_t badVersions=false;
00495 
00496   if (nu.detector==Detector::kNear) {
00497     if (ReleaseType::IsCedar(nu.recoVersion) &&
00498         ReleaseType::IsDaikon(nu.mcVersion)) {
00499       sFileName=sBase+"/NuMuBar/data/pid_evans_cedar_daikon_LE185.root";
00500     }
00501     else {
00502       badVersions=true;
00503     }
00504   }
00505   else if (nu.detector==Detector::kFar) {
00506     badVersions=true;
00507   }
00508   else {
00509     cout<<"Ahhh, detector="<<nu.detector<<" not recognised"<<endl;
00510   }
00511 
00512   if (badVersions) {
00513     MSG("NuPIDInterface",Msg::kError)
00514       <<"Ahhh, ReleaseType not recognised:"<<endl;
00515     this->PrintReleaseTypeEtc(nu);
00516     MSG("NuPIDInterface",Msg::kError)<<"Will abort here..."<<endl;
00517     assert(false);
00518   }
00519 
00520   return sFileName;
00521 }

std::string NuPIDInterface::GetFileNameJmID ( const NuEvent nu  )  const [private]

Definition at line 345 of file NuPIDInterface.cxx.

References GetFileNamekNNID().

Referenced by InitialiseJmID().

00346 {
00347   return GetFileNamekNNID(nu,3);
00348 }

std::string NuPIDInterface::GetFileNamekNNID ( const NuEvent nu,
int  type = 1 
) const [private]

Definition at line 349 of file NuPIDInterface.cxx.

References NuEvent::detector, NuLibrary::general, NuGeneral::GetReleaseDirToUse(), NuLibrary::Instance(), ReleaseType::IsDaikon(), ReleaseType::IsDogwood(), Msg::kDebug, Msg::kError, Detector::kFar, Msg::kInfo, Detector::kNear, MAXMSG, NuEvent::mcVersion, MSG, NuUtilities::PrintRelease(), PrintReleaseTypeEtc(), NuEvent::recoVersion, and NuEvent::releaseType.

Referenced by GetFileNameJmID(), and GetFileNameRoID().

00350 {
00351 
00352   //get an instance of the code library
00353   const NuLibrary& lib=NuLibrary::Instance();
00354 
00356   //NOTE: the input files are no longer distributed so they
00357   //have to be copied to the local site
00358   //the NuMuBar/data directory is the place to copy or soft
00359   //link the files to
00361 
00362   string sBase=lib.general.GetReleaseDirToUse("NuMuBar");
00363   //string sFileName=sBase+"/Mad/data/roid.pid.near.cedar.daikon.root";
00364   string sFileName=sBase+"/NuMuBar/data/knn.physics.near.daikon_04.dogwood1.L010z185i.root";
00365   if(type ==2) sFileName=sBase+"/NuMuBar/data/knn.physics.20p3GeV.near.daikon_04.dogwood1.L010z185i.root";
00366   if(type ==3) sFileName=sBase+"/NuMuBar/data/knn.physics.Alt.near.daikon_04.dogwood1.L010z185i.root";
00367 
00368   Bool_t badVersions=false;
00369 
00370   //Set it to defaults that don't exist so the code stops if we don't
00371   //set the release type
00372   string sVegetable = "Aubergine";
00373   string sTree = "Bonsai";
00374   string sBeam = "LHC";
00375   string sDetector = "Nova";
00376 
00377 //  if (ReleaseType::IsCedar(nu.recoVersion)){
00378 //    //
00379 //    // Cedar files for "Alt" do not exist
00380 //    //
00381 //    sTree = "dogwood1";
00382 //  }
00383 //  else if (ReleaseType::IsDogwood(nu.recoVersion)){
00384 //    sTree = "dogwood1";
00385 //  }
00386 //  else {
00387 //    badVersions=true;
00388 //  }
00389   // Assuming dogwood1 since these are the only available training files
00390   sTree = "dogwood1";
00391   if (!ReleaseType::IsDogwood(nu.recoVersion)){
00392     MAXMSG("NuPIDInterface",Msg::kInfo,1) << "Assuming dogwood1 reco version in RoID initialization (changed from "
00393     << NuUtilities::PrintRelease(nu.releaseType) << ") since those are the only available training files" << endl;
00394   }
00395 
00396 
00397   if (ReleaseType::IsDaikon(nu.mcVersion)){
00398     sVegetable = "daikon_04";
00399   }
00400   else{
00401     badVersions=true;
00402   }
00403 
00404   if (nu.detector==Detector::kNear) {
00405     sDetector = "near";
00406   }
00407   else if (nu.detector==Detector::kFar) {
00408     sDetector = "far";
00409   }
00410   else {
00411     cout<<"Ahhh, detector="<<nu.detector<<" not recognised"<<endl;
00412   }
00413 
00414   //There is no alternative:
00415   sBeam = "L010z185i";
00416   if(type==1)
00417     {
00418       sFileName = sBase + "/NuMuBar/data/knn.physics.";
00419     }
00420   else if(type==2)
00421     {
00422       sFileName = sBase + "/NuMuBar/data/knn.physics.20p3GeV.";
00423     }
00424   else if(type==3)
00425     {
00426       sFileName = sBase + "/NuMuBar/data/knn.physics.Alt.";
00427     }
00428   else{
00429     cerr<<"NuPIDInterface::GetFileNamekNNID  -- invalid type "<<type<<endl;
00430     assert(false);
00431   }
00432   sFileName+= sDetector + "."
00433     + sVegetable + "."
00434     + sTree + "."
00435     + sBeam + ".root";
00436 
00437   if (badVersions) {
00438     MSG("NuPIDInterface",Msg::kError)
00439       <<"Ahhh, ReleaseType not recognised:"<<endl;
00440     this->PrintReleaseTypeEtc(nu);
00441     MSG("NuPIDInterface",Msg::kError)<<"Will abort here..."<<endl;
00442     assert(false);
00443   }
00444 
00445   //open input file stream
00446   ifstream file(sFileName.c_str());
00447 
00448   //check if file exists
00449   if(!file){
00450     //file does not exist
00451     MSG("NuPIDInterface",Msg::kError)
00452       <<endl<<endl
00453       <<"GetFileNameRoID: file does not exist, filename="
00454       <<sFileName<<endl<<endl;
00455     MSG("NuPIDInterface",Msg::kError)
00456       <<endl<<endl
00457       <<"The RO PID input files are no longer distributed so they"
00458       <<endl
00459       <<"have to be copied to the local site. The NuMuBar/data"
00460       <<endl
00461       <<"directory is the place to copy or soft link the files to"
00462       <<endl
00463       <<"The Cedar/Daikon files are documented here:"
00464       <<endl
00465       <<"    http://home.fnal.gov/~rustem/PhysicsNtuple/"
00466       <<endl
00467       <<"and possibly located here:"
00468       <<endl
00469       <<"    /afs/fnal.gov/files/home/room1/rustem/data/muon-knn"
00470       <<endl<<endl;
00471     MSG("NuPIDInterface",Msg::kError)
00472       <<endl<<endl<<"Asserting here..."<<endl<<endl;
00473     assert(false);
00474   }
00475   else {
00476     //file exists, test is complete so close ifstream
00477     MSG("NuPIDInterface",Msg::kDebug)
00478       <<"File exists with name="<<sFileName<<endl;
00479     file.close();
00480   }
00481 
00482   return sFileName;
00483 }

std::string NuPIDInterface::GetFileNameRoID ( const NuEvent nu  )  const [private]

Definition at line 341 of file NuPIDInterface.cxx.

References GetFileNamekNNID().

Referenced by InitialiseRoID(), and InitialiseRoID2007().

00342 {
00343   return GetFileNamekNNID(nu,1);
00344 }

void NuPIDInterface::GetJmID ( const NtpStRecord ntp,
const NtpSREvent evt,
NuEvent nu 
)

Definition at line 1207 of file NuPIDInterface.cxx.

References NuEvent::entry, Anp::Interface::FillSnarl(), GetJmIDEvt(), GetJmIDNthTrk(), InitialiseJmID(), NuEvent::jmEndPh, NuEvent::jmEndPhEvt, NuEvent::jmEventknn204, NuEvent::jmEventknn204Evt, NuEvent::jmEventknn205, NuEvent::jmEventknn205Evt, NuEvent::jmEventknn206, NuEvent::jmEventknn206Evt, NuEvent::jmEventknn207, NuEvent::jmEventknn207Evt, NuEvent::jmEventknn208, NuEvent::jmEventknn208Evt, NuEvent::jmEventknnID, NuEvent::jmEventknnIDEvt, NuEvent::jmID, NuEvent::jmIDEvt, jmInterface, NuEvent::jmMeanPh, NuEvent::jmMeanPhEvt, NuEvent::jmScatteringU, NuEvent::jmScatteringUEvt, NuEvent::jmScatteringUV, NuEvent::jmScatteringUVEvt, NuEvent::jmScatteringV, NuEvent::jmScatteringVEvt, NuEvent::jmTrackPlane, NuEvent::jmTrackPlaneEvt, Msg::kDebug, Msg::kWarning, MAXMSG, and MSG.

Referenced by NuAnalysis::ExtractPIDsAndWeights().

01209 {
01210 
01211   //initialise if required
01212   if (!jmInterface) this->InitialiseJmID(nu);
01213 
01214   //variable to turn on all the useful messages if required
01215   Msg::LogLevel_t logLevel=Msg::kDebug;
01216 
01217   //have to protect against PhysicsNtuple altering the global state
01218   TDirectory* tmpd = gDirectory;
01219   MSG("NuPIDInterface",Msg::kDebug)
01220     <<"TDirectory before GetJmID is:"<<endl;
01221   //tmpd->pwd();
01222 
01223   //jm_pass keeps the same value unless it's a new snarl
01224   static Bool_t jm_pass=false;
01225   static Int_t lastSnarl=-999;
01226   MAXMSG("NuPIDInterface",logLevel,100)
01227     <<"lastSnarl="<<lastSnarl<<", nu.entry="<<nu.entry<<endl;
01228   if (nu.entry!=lastSnarl) {
01229     MAXMSG("NuPIDInterface",logLevel,50)
01230       <<"NuPIDInterface::GetJmID FillSnarl..."<<endl;
01231     jm_pass=jmInterface->FillSnarl(const_cast<NtpStRecord*>(&ntp));
01232   }
01233   lastSnarl=nu.entry;
01234   //get the variables
01235   if (jm_pass) {
01236     //get the roid for the evt, trk1, trk2 and trk3
01237     this->GetJmIDEvt(evt,nu);
01238     this->GetJmIDNthTrk(1, ntp, evt, nu);
01239     this->GetJmIDNthTrk(2, ntp, evt, nu);
01240     this->GetJmIDNthTrk(3, ntp, evt, nu);
01241   }
01242   else {
01243     MAXMSG("NuPIDInterface",Msg::kWarning,100)
01244       <<"Event did not pass JM ID FillSnarl"<<endl;
01245   }
01246 
01247   //copy the variables across to the "best" roid variables
01248   //these variables allow a level of indirection and can be
01249   //changed to the "best" value at a later stage
01250   //for now, just use the evt
01251 
01252   nu.jmID=nu.jmIDEvt;
01253   nu.jmTrackPlane=nu.jmTrackPlaneEvt;
01254   nu.jmMeanPh=nu.jmMeanPhEvt;
01255   nu.jmEndPh=nu.jmEndPhEvt;
01256   nu.jmScatteringU=nu.jmScatteringUEvt;
01257   nu.jmScatteringV=nu.jmScatteringVEvt;
01258   nu.jmScatteringUV=nu.jmScatteringUVEvt;
01259   nu.jmEventknnID=nu.jmEventknnIDEvt;
01260   nu.jmEventknn208=nu.jmEventknn208Evt;
01261   nu.jmEventknn207=nu.jmEventknn207Evt;
01262   nu.jmEventknn206=nu.jmEventknn206Evt;
01263   nu.jmEventknn205=nu.jmEventknn205Evt;
01264   nu.jmEventknn204=nu.jmEventknn204Evt;
01265   gDirectory=tmpd;
01266   //  MAXMSG("NuPIDInterface",logLevel,100)
01267   //gDirectory->pwd();
01268 }

void NuPIDInterface::GetJmIDEvt ( const NtpSREvent evt,
NuEvent nu 
) const [private]

Definition at line 1272 of file NuPIDInterface.cxx.

References Anp::Interface::GetVar(), NuEvent::jmEndPhEvt, NuEvent::jmEventknn204Evt, NuEvent::jmEventknn205Evt, NuEvent::jmEventknn206Evt, NuEvent::jmEventknn207Evt, NuEvent::jmEventknn208Evt, NuEvent::jmEventknnIDEvt, NuEvent::jmIDEvt, jmInterface, NuEvent::jmMeanPhEvt, NuEvent::jmScatteringUEvt, NuEvent::jmScatteringUVEvt, NuEvent::jmScatteringVEvt, NuEvent::jmTrackPlaneEvt, Msg::kError, and MSG.

Referenced by GetJmID().

01274 {
01275   if (!jmInterface) {
01276     MSG("NuPIDInterface",Msg::kError)
01277       <<"NuPIDInterface: jmInterface not initialised = "<<jmInterface
01278       <<endl<<"Will assert here..."<<endl;
01279     assert(false);
01280   }
01281   //NtpStRecord* st=const_cast<NtpStRecord*>(&ntp);//nasty!
01282   NtpSREvent* pevt=const_cast<NtpSREvent*>(&evt);//nasty!
01283 
01284 
01285   //float GetVar(const std::string &, TObject *) const;
01286   nu.jmIDEvt=     jmInterface->GetVar("shortid",pevt);
01287   nu.jmTrackPlaneEvt= jmInterface->GetVar("ntrkpl" ,pevt);
01288   nu.jmMeanPhEvt= jmInterface->GetVar("meanph" ,pevt);
01289   nu.jmEndPhEvt=  jmInterface->GetVar("endph"  ,pevt);
01290   nu.jmScatteringUEvt=  jmInterface->GetVar("scatu"  ,pevt);
01291   nu.jmScatteringVEvt=  jmInterface->GetVar("scatv"  ,pevt);
01292   nu.jmScatteringUVEvt= jmInterface->GetVar("scatuv" ,pevt);
01293   nu.jmEventknnIDEvt= jmInterface->GetVar("evtid"  ,pevt);
01294   nu.jmEventknn208Evt=jmInterface->GetVar("evt208" ,pevt);
01295   nu.jmEventknn207Evt=jmInterface->GetVar("evt207" ,pevt);
01296   nu.jmEventknn206Evt=jmInterface->GetVar("evt206" ,pevt);
01297   nu.jmEventknn205Evt=jmInterface->GetVar("evt205" ,pevt);
01298   nu.jmEventknn204Evt=jmInterface->GetVar("evt204" ,pevt);
01299 
01300 }

void NuPIDInterface::GetJmIDNthTrk ( int  trkIdx,
const NtpStRecord ntp,
const NtpSREvent evt,
NuEvent nu 
) const [private]

Definition at line 1304 of file NuPIDInterface.cxx.

References NuReco::GetTrackWithIndexX(), Anp::Interface::GetVar(), NuLibrary::Instance(), jmInterface, Msg::kError, MSG, and NuLibrary::reco.

Referenced by GetJmID().

01308 {
01309   if (!jmInterface) {
01310     MSG("NuPIDInterface",Msg::kError)
01311       <<"NuPIDInterface: jmInterface not initialised = "<<jmInterface
01312       <<endl<<"Will assert here..."<<endl;
01313     assert(false);
01314   }
01315   //get an instance of the code library
01316   const NuLibrary& lib = NuLibrary::Instance();
01317 
01318   //get pointer to trk
01319   const NtpSRTrack* ptrk = lib.reco.GetTrackWithIndexX(ntp,evt, trkIdx-1);
01320 
01321   //check if track exists
01322   if (ptrk) {
01323     //have to const cast to pass to GetVar
01324     NtpSRTrack* ptrkb=const_cast<NtpSRTrack*>(ptrk);//nasty!
01325 
01326     get_jmID(nu, trkIdx) = jmInterface->GetVar("shortid", ptrkb);
01327     get_jmTrackPlane(nu, trkIdx) = jmInterface->GetVar("ntrkpl", ptrkb);
01328     get_jmMeanPh(nu, trkIdx) = jmInterface->GetVar("meanph", ptrkb);
01329     get_jmEndPh(nu, trkIdx) = jmInterface->GetVar("endph", ptrkb);
01330     get_jmScatteringU(nu, trkIdx) = jmInterface->GetVar("scatu", ptrkb);
01331     get_jmScatteringV(nu, trkIdx) = jmInterface->GetVar("scatv", ptrkb);
01332   }
01333 }

void NuPIDInterface::GetRoID ( const NtpStRecord ntp,
const NtpSREvent evt,
NuEvent nu 
)

Definition at line 1034 of file NuPIDInterface.cxx.

References NuEvent::entry, Anp::Interface::FillSnarl(), GetRoIDEvt(), GetRoIDNthTrk(), InitialiseRoID(), Msg::kDebug, NuEvent::knn01TrkActivePlanes, NuEvent::knn01TrkActivePlanes1, NuEvent::knn01TrkActivePlanes2, NuEvent::knn01TrkActivePlanes3, NuEvent::knn01TrkActivePlanesEvt, NuEvent::knn10TrkMeanPh, NuEvent::knn10TrkMeanPh1, NuEvent::knn10TrkMeanPh2, NuEvent::knn10TrkMeanPh3, NuEvent::knn10TrkMeanPhEvt, NuEvent::knn20LowHighPh, NuEvent::knn20LowHighPh1, NuEvent::knn20LowHighPh2, NuEvent::knn20LowHighPh3, NuEvent::knn20LowHighPhEvt, NuEvent::knn40TrkPhFrac, NuEvent::knn40TrkPhFrac1, NuEvent::knn40TrkPhFrac2, NuEvent::knn40TrkPhFrac3, NuEvent::knn40TrkPhFracEvt, Msg::kWarning, MAXMSG, MSG, NuEvent::relativeAngle, NuEvent::relativeAngle1, NuEvent::relativeAngle2, NuEvent::relativeAngle3, NuEvent::relativeAngleEvt, NuEvent::roID, NuEvent::roID1, NuEvent::roID2, NuEvent::roID3, NuEvent::roIDEvt, NuEvent::roIDNuMuBar, NuEvent::roIDNuMuBar1, NuEvent::roIDNuMuBar2, NuEvent::roIDNuMuBar3, NuEvent::roIDNuMuBarEvt, and roInterface.

Referenced by NuAnalysis::ExtractPIDsAndWeights().

01036 {
01037   //initialise if required
01038   if (!roInterface) this->InitialiseRoID(nu);
01039 
01040   //variable to turn on all the useful messages if required
01041   Msg::LogLevel_t logLevel=Msg::kDebug;
01042 
01043   //have to protect against PhysicsNtuple altering the global state
01044   TDirectory* tmpd = gDirectory;
01045   MSG("NuPIDInterface",Msg::kDebug)
01046     <<"TDirectory before GetRoID is:"<<endl;
01047   //tmpd->pwd();
01048 
01049   //ro_pass keeps the same value unless it's a new snarl
01050   static Bool_t ro_pass=false;
01051   static Int_t lastSnarl=-999;
01052   MAXMSG("NuPIDInterface",logLevel,100)
01053     <<"lastSnarl="<<lastSnarl<<", nu.entry="<<nu.entry<<endl;
01054   if (nu.entry!=lastSnarl) {
01055     MAXMSG("NuPIDInterface",logLevel,50)
01056       <<"NuPIDInterface::GetRoID FillSnarl..."<<endl;
01057     ro_pass=roInterface->FillSnarl(const_cast<NtpStRecord*>(&ntp));
01058   }
01059   lastSnarl=nu.entry;
01060 
01061   //get the variables
01062   if (ro_pass) {
01063     //get the roid for the evt, trk1, trk2 and trk3
01064     this->GetRoIDEvt(evt,nu);
01065     this->GetRoIDNthTrk(1, ntp, evt, nu);
01066     this->GetRoIDNthTrk(2, ntp, evt, nu);
01067     this->GetRoIDNthTrk(3, ntp, evt, nu);
01068   }
01069   else {
01070     MAXMSG("NuPIDInterface",Msg::kWarning,100)
01071       <<"Event did not pass RO ID FillSnarl"<<endl;
01072   }
01073 
01074   //if the event is not identified as a NuMuBar then
01075   //set the value of roIDNuMuBar to be 0 (rather than just the default)
01076   //check that it isn't -999 because then there was no track
01077   if (nu.roIDNuMuBarEvt<0 &&
01078       nu.roIDNuMuBarEvt!=-999) nu.roIDNuMuBarEvt=0;
01079   if (nu.roIDNuMuBar1<0 && nu.roIDNuMuBar1!=-999) nu.roIDNuMuBar1=0;
01080   if (nu.roIDNuMuBar2<0 && nu.roIDNuMuBar2!=-999) nu.roIDNuMuBar2=0;
01081   if (nu.roIDNuMuBar3<0 && nu.roIDNuMuBar3!=-999) nu.roIDNuMuBar3=0;
01082 
01083   //copy the variables across to the "best" roid variables
01084   //these variables allow a level of indirection and can be
01085   //changed to the "best" value at a later stage
01086   //for now, just use the evt
01087 
01088   nu.roID=nu.roIDEvt;
01089   nu.knn01TrkActivePlanes=nu.knn01TrkActivePlanesEvt;
01090   nu.knn10TrkMeanPh=nu.knn10TrkMeanPhEvt;
01091   nu.knn20LowHighPh=nu.knn20LowHighPhEvt;
01092   nu.knn40TrkPhFrac=nu.knn40TrkPhFracEvt;
01093   nu.roIDNuMuBar=nu.roIDNuMuBarEvt;
01094   nu.relativeAngle=nu.relativeAngleEvt;
01095 
01096   MAXMSG("NuPIDInterface",logLevel,100)
01097     <<"GetRoIDEvt: roID="<<nu.roIDEvt
01098     <<", roIDNuMuBar="<<nu.roIDNuMuBarEvt
01099     <<", relativeAngle="<<nu.relativeAngleEvt
01100     <<endl
01101     <<"   knn: TrkActivePlanes="<<nu.knn01TrkActivePlanesEvt
01102     <<", TrkMeanPh="<<nu.knn10TrkMeanPhEvt
01103     <<", LowHighPh="<<nu.knn20LowHighPhEvt
01104     <<", TrkPhFrac="<<nu.knn40TrkPhFracEvt
01105     <<endl;
01106   MAXMSG("NuPIDInterface",logLevel,100)
01107     <<"GetRoIDTrk1: roID="<<nu.roID1
01108     <<", roIDNuMuBar="<<nu.roIDNuMuBar1
01109     <<", relativeAngle="<<nu.relativeAngle1
01110     <<endl
01111     <<"   knn: TrkActivePlanes="<<nu.knn01TrkActivePlanes1
01112     <<", TrkMeanPh="<<nu.knn10TrkMeanPh1
01113     <<", LowHighPh="<<nu.knn20LowHighPh1
01114     <<", TrkPhFrac="<<nu.knn40TrkPhFrac1
01115     <<endl;
01116   MAXMSG("NuPIDInterface",logLevel,100)
01117     <<"GetRoIDTrk2: roID="<<nu.roID2
01118     <<", roIDNuMuBar="<<nu.roIDNuMuBar2
01119     <<", relativeAngle="<<nu.relativeAngle2
01120     <<endl
01121     <<"   knn: TrkActivePlanes="<<nu.knn01TrkActivePlanes2
01122     <<", TrkMeanPh="<<nu.knn10TrkMeanPh2
01123     <<", LowHighPh="<<nu.knn20LowHighPh2
01124     <<", TrkPhFrac="<<nu.knn40TrkPhFrac2
01125     <<endl;
01126   MAXMSG("NuPIDInterface",logLevel,100)
01127     <<"GetRoIDTrk3: roID="<<nu.roID3
01128     <<", roIDNuMuBar="<<nu.roIDNuMuBar3
01129     <<", relativeAngle="<<nu.relativeAngle3
01130     <<endl
01131     <<"   knn: TrkActivePlanes="<<nu.knn01TrkActivePlanes3
01132     <<", TrkMeanPh="<<nu.knn10TrkMeanPh3
01133     <<", LowHighPh="<<nu.knn20LowHighPh3
01134     <<", TrkPhFrac="<<nu.knn40TrkPhFrac3
01135     <<endl<<endl;
01136 
01137   MSG("NuPIDInterface",Msg::kDebug)
01138     <<endl<<endl<<endl<<"TDirectory after GetRoID is:"<<endl;
01139   //gDirectory->pwd();
01140   MSG("NuPIDInterface",Msg::kDebug)
01141     <<endl<<endl<<endl<<"After reseting gDirectory it is:"<<endl;
01142   gDirectory=tmpd;
01143   //gDirectory->pwd();
01144 }

void NuPIDInterface::GetRoID2007 ( const NtpStRecord ntp,
const NtpSREvent evt,
NuEvent nu 
)

Definition at line 941 of file NuPIDInterface.cxx.

References NuEvent::entry, Anp::Interface::FillSnarl(), Anp::Interface::GetData(), InitialiseRoID(), Msg::kDebug, Msg::kInfo, MAXMSG, NuEvent::relativeAngle, NuEvent::roID, NuEvent::roIDNuMuBar, and roInterface.

00943 {
00944   //initialise if required
00945   if (!roInterface) this->InitialiseRoID(nu);
00946 
00947   //ro_pass keeps the same value unless it's a new snarl
00948   static Bool_t ro_pass=false;
00949   static Int_t lastSnarl=-999;
00950   MAXMSG("NuPIDInterface",Msg::kDebug,200)
00951     <<"lastSnarl="<<lastSnarl<<", nu.entry="<<nu.entry<<endl;
00952   if (nu.entry!=lastSnarl) {
00953     MAXMSG("NuPIDInterface",Msg::kDebug,200)
00954       <<"NuPIDInterface::GetRoID FillSnarl..."<<endl;
00955     ro_pass=roInterface->FillSnarl(const_cast<NtpStRecord*>(&ntp));
00956   }
00957   lastSnarl=nu.entry;
00958 
00959   Float_t roID=-999;
00960   Float_t roIDNuMuBar=0;//if not NuMuBar then no key in map below
00961   Float_t relativeAngle=-999;
00962 
00963   //variables to record when a variable has been found
00964   Bool_t got5240=false;
00965   Bool_t got5524=false;
00966   Bool_t got5533=false;
00967 
00968   if (ro_pass) {
00969     map<short, float> romap=roInterface->GetData
00970       (const_cast<NtpSREvent*>(&evt));
00971 
00972     //Float_t roid_trkplanefrac; // fraction of track planes/total planes
00973     //Float_t roid_lowphhiph;    // fraction of "lower ph"/"higher ph"
00974     //Float_t roid_trkphfracend; // fraction of track ph at end/track ph
00975     //Float_t roid_trkphfracclose; // fraction of track ph/ph of strips
00976     // around track
00977 
00978     for (map<short,float>::const_iterator rit=romap.begin();
00979          rit!=romap.end(); ++rit) {
00980       Int_t key=0;
00981       Float_t val=0;
00982       key=rit->first;
00983       val=rit->second;
00984 
00985       MAXMSG("NuPIDInterface",Msg::kDebug,1000)
00986         <<"key="<<key<<", val="<<val<<endl;
00987 
00988       if (key==5240) {
00989         roID=val;
00990         got5240=true;
00991       }
00992 
00993       if (key==5524) {
00994         roIDNuMuBar=val;
00995         got5524=true;
00996       }
00997 
00998       if (key==5533) {
00999         relativeAngle=val;
01000         got5533=true;
01001       }
01002 
01003       if (got5240 && got5524 && got5533) {
01004         MAXMSG("NuPIDInterface",Msg::kDebug,50)
01005           <<"Jumping out of loop over ROID map..."<<endl;
01006         break;//jump out of loop once all are found
01007       }
01008 
01009       //if (key==7000) roid_trkplanefrac=val;
01010       //if (key==7020) roid_lowphhiph=val;
01011       //if (key==7030) roid_trkphfracend=val;
01012       //if (key==7040) roid_trkphfracclose=val;
01013     }
01014   }
01015   else {
01016     MAXMSG("NuPIDInterface",Msg::kInfo,100)
01017       <<"Event did not pass RO ID FillSnarl"<<endl;
01018   }
01019 
01020   //store the variables
01021   nu.roID=roID;
01022   nu.roIDNuMuBar=roIDNuMuBar;
01023   nu.relativeAngle=relativeAngle;
01024 
01025   MAXMSG("NuPIDInterface",Msg::kDebug,100)
01026     <<"GetRoID: roID="<<nu.roID
01027     <<", roIDNuMuBar"<<nu.roIDNuMuBar
01028     <<", relativeAngle"<<nu.relativeAngle
01029     <<endl;
01030 }

void NuPIDInterface::GetRoIDEvt ( const NtpSREvent evt,
NuEvent nu 
) const [private]

Definition at line 1148 of file NuPIDInterface.cxx.

References Anp::Interface::GetVar(), Msg::kError, NuEvent::knn01TrkActivePlanesEvt, NuEvent::knn10TrkMeanPhEvt, NuEvent::knn20LowHighPhEvt, NuEvent::knn40TrkPhFracEvt, MSG, NuEvent::relativeAngleEvt, NuEvent::roIDEvt, NuEvent::roIDNuMuBarEvt, and roInterface.

Referenced by GetRoID().

01150 {
01151   if (!roInterface) {
01152     MSG("NuPIDInterface",Msg::kError)
01153       <<"NuPIDInterface: roInterface not initialised = "<<roInterface
01154       <<endl<<"Will assert here..."<<endl;
01155     assert(false);
01156   }
01157   //NtpStRecord* st=const_cast<NtpStRecord*>(&ntp);//nasty!
01158   NtpSREvent* pevt=const_cast<NtpSREvent*>(&evt);//nasty!
01159 
01160   //float GetVar(const std::string &, TObject *) const;
01161   nu.roIDEvt=roInterface->GetVar("knn_pid",pevt);
01162   nu.knn01TrkActivePlanesEvt=roInterface->GetVar("knn_01",pevt);
01163   nu.knn10TrkMeanPhEvt=roInterface->GetVar("knn_10",pevt);
01164   nu.knn20LowHighPhEvt=roInterface->GetVar("knn_20",pevt);
01165   nu.knn40TrkPhFracEvt=roInterface->GetVar("knn_40",pevt);
01166   nu.roIDNuMuBarEvt=roInterface->GetVar("numubar",pevt);
01167   nu.relativeAngleEvt=roInterface->GetVar("rel_ang",pevt);
01168 
01169 }

void NuPIDInterface::GetRoIDNthTrk ( int  trkIdx,
const NtpStRecord ntp,
const NtpSREvent evt,
NuEvent nu 
) const [private]

Definition at line 1173 of file NuPIDInterface.cxx.

References NuReco::GetTrackWithIndexX(), Anp::Interface::GetVar(), NuLibrary::Instance(), Msg::kError, MSG, NuLibrary::reco, and roInterface.

Referenced by GetRoID().

01177 {
01178   if (!roInterface) {
01179     MSG("NuPIDInterface",Msg::kError)
01180       <<"NuPIDInterface: roInterface not initialised = "<<roInterface
01181       <<endl<<"Will assert here..."<<endl;
01182     assert(false);
01183   }
01184   //get an instance of the code library
01185   const NuLibrary& lib = NuLibrary::Instance();
01186 
01187   //get pointer to trk
01188   const NtpSRTrack* ptrk = lib.reco.GetTrackWithIndexX(ntp, evt, trkIdx-1);
01189 
01190   //check if track exists
01191   if(ptrk){
01192     //have to const cast to pass to GetVar
01193     NtpSRTrack* ptrkb = const_cast<NtpSRTrack*>(ptrk);//nasty!
01194 
01195     get_roID(nu, trkIdx) = roInterface->GetVar("knn_pid", ptrkb);
01196     get_knn01TrkActivePlanes(nu, trkIdx) = roInterface->GetVar("knn_01",ptrkb);
01197     get_knn10TrkMeanPh(nu, trkIdx) = roInterface->GetVar("knn_10", ptrkb);
01198     get_knn20LowHighPh(nu, trkIdx) = roInterface->GetVar("knn_20", ptrkb);
01199     get_knn40TrkPhFrac(nu, trkIdx) = roInterface->GetVar("knn_40", ptrkb);
01200     get_roIDNuMuBar(nu, trkIdx) = roInterface->GetVar("numubar", ptrkb);
01201     get_relativeAngle(nu, trkIdx) = roInterface->GetVar("rel_ang", ptrkb);
01202   }
01203 }

void NuPIDInterface::GetRoIDNuMuBar ( const NtpStRecord ntp,
const NtpSREvent evt,
NuEvent nu 
)

Definition at line 1362 of file NuPIDInterface.cxx.

References NuEvent::entry, Anp::Interface::FillSnarl(), Anp::Interface::GetData(), InitialiseRoIDNuMuBar(), Msg::kDebug, Msg::kWarning, MAXMSG, NuEvent::relativeAngle, NuEvent::roIDNuMuBar, and roInterface.

Referenced by NuAnalysis::ExtractPIDsAndWeights().

01364 {
01365   //initialise if required
01366   if (!roInterface) this->InitialiseRoIDNuMuBar(nu);
01367 
01368   //ro_pass keeps the same value unless it's a new snarl
01369   static Bool_t ro_pass=false;
01370   static Int_t lastSnarl=-999;
01371   MAXMSG("NuPIDInterface",Msg::kDebug,200)
01372     <<"lastSnarl="<<lastSnarl<<", nu.entry="<<nu.entry<<endl;
01373   if (nu.entry!=lastSnarl) {
01374     MAXMSG("NuPIDInterface",Msg::kDebug,200)
01375       <<"NuPIDInterface::GetRoID FillSnarl..."<<endl;
01376     ro_pass=roInterface->FillSnarl(const_cast<NtpStRecord*>(&ntp));
01377   }
01378   lastSnarl=nu.entry;
01379 
01380   Float_t roIDNuMuBar=0;//if not NuMuBar then no key in map below
01381   Float_t relativeAngle=-999;
01382 
01383   Bool_t got5524=false;
01384   Bool_t got5533=false;
01385 
01386   if (ro_pass) {
01387     map<short, float> romap=roInterface->GetData
01388       (const_cast<NtpSREvent*>(&evt));
01389 
01390     MAXMSG("NuPIDInterface",Msg::kDebug,200)
01391       <<"NuPIDInterface: Looping over key/value pairs..."<<endl;
01392 
01393     //loop over the map of data returned
01394     for (map<short,float>::const_iterator rit=romap.begin();
01395          rit!=romap.end(); ++rit) {
01396       Int_t key=0;
01397       Float_t val=0;
01398       key=rit->first;
01399       val=rit->second;
01400 
01401       MAXMSG("NuPIDInterface",Msg::kDebug,100)
01402         <<"key="<<key<<", val="<<val<<endl;
01403 
01404       if (key==5524) {
01405         roIDNuMuBar=val;
01406         got5524=true;
01407       }
01408 
01409       if (key==5533) {
01410         relativeAngle=val;
01411         got5533=true;
01412       }
01413 
01414       if (got5524 && got5533) {
01415         break;//jump out of loop once all are found
01416       }
01417 
01418     }
01419   }
01420   else {
01421     MAXMSG("NuPIDInterface",Msg::kWarning,100)
01422       <<"Event did not pass RO ID"<<endl;
01423   }
01424 
01425   nu.roIDNuMuBar=roIDNuMuBar;
01426   nu.relativeAngle=relativeAngle;
01427 }

void NuPIDInterface::GetRoIDPlus ( NuEvent nu  ) 

Definition at line 1434 of file NuPIDInterface.cxx.

References NukNNPID::AddPars(), NuEvent::detector, fname, NuLibrary::general, NukNNPID::GetPID(), NuGeneral::GetReleaseDirToUse(), NukNNPID::Initialize(), NukNNPID::initialized, NuLibrary::Instance(), Detector::kFar, SimFlag::kMC, Detector::kNear, NuEvent::knn01TrkActivePlanes, NuEvent::knn10TrkMeanPh, NuEvent::knn20LowHighPh, NuEvent::knn40TrkPhFrac, MAXPID, MMPID, NukNNPID::NN, NukNNPID::pars, NukNNPID::PrintMMatrix(), NukNNPID::PrintWeights(), NuEvent::roID, NuEvent::roIDPlus, NuEvent::simFlag, NukNNPID::testPoint, and NukNNPID::wts.

Referenced by NuAnalysis::ExtractPIDsAndWeights(), NuDSTAna::MakeMicroDst2010(), and NuDSTAna::MakeMicroDst2014().

01434                                            {
01435 
01436   // calculate retrained roID for MINOS+
01437   static NukNNPID kNNPID;
01438   if(!kNNPID.initialized){
01439     cout << "Retraining roID for MINOS+ " << endl;
01440 
01441     kNNPID.AddPars("knn01TrkActivePlanes", -1.);
01442     kNNPID.AddPars("knn10TrkMeanPh",       -1.);
01443     kNNPID.AddPars("knn20LowHighPh",       -1.);
01444     kNNPID.AddPars("knn40TrkPhFrac",       -1.);
01445 
01446     int numNN = 80;
01447     const NuGeneral& gen = NuLibrary::Instance().general;
01448     const TString releaseDir = gen.GetReleaseDirToUse("NuMuBar");
01449     TString fname;
01450     if(Detector::Detector_t(nu.detector) == Detector::kNear)
01451       fname = "MinosPlus_PIDTrain_ND.root";
01452     else if(Detector::Detector_t(nu.detector) == Detector::kFar)
01453       fname = "MinosPlus_PIDTrain_FD.root";
01454     const TString fullPath = releaseDir+"/NuMuBar/data/"+fname;
01455 
01456     kNNPID.Initialize(fullPath, numNN);  
01457     kNNPID.PrintWeights();
01458     cout << "number of neighbors = " << kNNPID.NN << endl;
01459   }
01460 
01461   if(nu.knn01TrkActivePlanes > 0 && nu.knn10TrkMeanPh > 0 && nu.knn20LowHighPh > 0 && nu.knn40TrkPhFrac > 0) {
01462 
01463     vector<double> testPt;
01464     testPt.push_back(nu.knn01TrkActivePlanes);
01465     testPt.push_back(nu.knn10TrkMeanPh);
01466     testPt.push_back(nu.knn20LowHighPh);
01467     testPt.push_back(nu.knn40TrkPhFrac);  
01468 
01469     kNNPID.testPoint.par.clear();
01470     kNNPID.testPoint.signalMC = true;
01471     for(unsigned int i = 0; i < kNNPID.pars.size(); i++)
01472       kNNPID.testPoint.par.push_back(testPt[i] * kNNPID.wts[i]);
01473 
01474     nu.roID = kNNPID.GetPID((nu.simFlag == SimFlag::kMC), "Euclidean");
01475   }
01476   else 
01477     nu.roID = -999.;
01478 
01479   // calculate retrained roID for MINOS+
01480   static NukNNPID kNNPIDPlus;
01481   if(!kNNPIDPlus.initialized){
01482     cout << "calculate roID with Mahalanobis metric" << endl;
01483 
01484     kNNPIDPlus.AddPars("knn01TrkActivePlanes", -1.);
01485     kNNPIDPlus.AddPars("knn10TrkMeanPh",       -1.);
01486     kNNPIDPlus.AddPars("knn20LowHighPh",       -1.);
01487     kNNPIDPlus.AddPars("knn40TrkPhFrac",       -1.);
01488     MAXPID = kNNPIDPlus.pars.size();
01489     MMPID.resize(MAXPID);
01490     for (int i = 0; i < MAXPID; i++)
01491       MMPID[i].resize(MAXPID);
01492 
01493     MMPID[0][0] = 6; MMPID[0][1] = 2.66; MMPID[0][2] = 0; MMPID[0][3] = 0.85; 
01494     MMPID[1][0] = 0; MMPID[1][1] = 1;    MMPID[1][2] = 0; MMPID[1][3] = 0.04; 
01495     MMPID[2][0] = 0; MMPID[2][1] = 0;    MMPID[2][2] = 1; MMPID[2][3] = 2.26; 
01496     MMPID[3][0] = 0; MMPID[3][1] = 0;    MMPID[3][2] = 0; MMPID[3][3] = 1; 
01497     kNNPIDPlus.PrintMMatrix();
01498 
01499     int numNN = 80;
01500     const NuGeneral& gen = NuLibrary::Instance().general;
01501     const TString releaseDir = gen.GetReleaseDirToUse("NuMuBar");
01502     TString fname;
01503     if(Detector::Detector_t(nu.detector) == Detector::kNear)
01504       fname = "MinosPlus_PIDTrain_ND.root";
01505     else if(Detector::Detector_t(nu.detector) == Detector::kFar)
01506       fname = "MinosPlus_PIDTrain_FD.root";
01507     const TString fullPath = releaseDir+"/NuMuBar/data/"+fname;
01508 
01509     kNNPIDPlus.Initialize(fullPath, numNN);  
01510     kNNPIDPlus.PrintWeights();
01511   }
01512 
01513   if(nu.knn01TrkActivePlanes > 0 && nu.knn10TrkMeanPh > 0 && nu.knn20LowHighPh > 0 && nu.knn40TrkPhFrac > 0) {
01514 
01515     vector<double> testPtPlus;
01516     testPtPlus.push_back(nu.knn01TrkActivePlanes);
01517     testPtPlus.push_back(nu.knn10TrkMeanPh);
01518     testPtPlus.push_back(nu.knn20LowHighPh);
01519     testPtPlus.push_back(nu.knn40TrkPhFrac);  
01520 
01521     kNNPIDPlus.testPoint.par.clear();
01522     kNNPIDPlus.testPoint.signalMC = true;
01523     for(unsigned int i = 0; i < kNNPIDPlus.pars.size(); i++)
01524       kNNPIDPlus.testPoint.par.push_back(testPtPlus[i] * kNNPIDPlus.wts[i]);
01525 
01526     nu.roIDPlus = kNNPIDPlus.GetPID((nu.simFlag == SimFlag::kMC), "Mahalanobis");
01527   }
01528   else
01529     nu.roIDPlus = -999.;
01530 }

void NuPIDInterface::InitialiseAbID ( const NuEvent nu  )  [private]

Definition at line 576 of file NuPIDInterface.cxx.

References abID, GetFileNameAbID(), Msg::kDebug, Msg::kInfo, MSG, PrintReleaseTypeEtc(), and MadAbID::ReadPDFs().

Referenced by GetAbID().

00577 {
00578   MSG("NuPIDInterface",Msg::kInfo)
00579     <<"InitialiseAbID..."<<endl;
00580 
00581   TDirectory* tmpd = gDirectory;
00582   MSG("NuPIDInterface",Msg::kDebug)
00583     <<"TDirectory before InitialiseAbID is:"<<endl;
00584   //tmpd->pwd();
00585 
00586   string sFileName=this->GetFileNameAbID(nu);
00587   MSG("NuPIDInterface",Msg::kInfo)
00588     <<"InitialiseAbID with:"<<endl
00589     <<" sFileName="<<sFileName<<endl;
00590   this->PrintReleaseTypeEtc(nu);
00591 
00592   //construct the object
00593   abID=new MadAbID();
00594 
00595   //open the file
00596   abID->ReadPDFs(sFileName.c_str());
00597 
00598   MSG("NuPIDInterface",Msg::kDebug)
00599     <<"TDirectory after InitialiseAbID is:"<<endl;
00600   //gDirectory->pwd();
00601   MSG("NuPIDInterface",Msg::kDebug)
00602     <<"After reseting gDirectory its location is:"<<endl;
00603   gDirectory=tmpd;
00604   //gDirectory->pwd();
00605 }

void NuPIDInterface::InitialiseDpID ( const NuEvent nu  )  [private]

Definition at line 609 of file NuPIDInterface.cxx.

References bfld::AsString(), ReleaseType::AsString(), NuEvent::beamType, MadDpID::ChoosePDFs(), NuEvent::detector, dpID, ReleaseType::GetRecoInfo(), ReleaseType::kCedar, Msg::kDebug, Msg::kInfo, BeamType::kL010z185i, BeamType::kL010z185i_rev, mad, MAXMSG, NuEvent::mcVersion, MSG, PrintReleaseTypeEtc(), and NuEvent::releaseType.

Referenced by GetDpID().

00610 {
00611   MSG("NuPIDInterface",Msg::kInfo)
00612     <<"InitialiseDpID..."<<endl;
00613 
00614   TDirectory* tmpd = gDirectory;
00615   MSG("NuPIDInterface",Msg::kDebug)
00616     <<"TDirectory before InitialiseDpID is:"<<endl;
00617   //tmpd->pwd();
00618 
00619   //construct the interface to mad
00620   //create these on the heap so that they don't destruct
00621   // - on purpose to avoid a segv on destruction... nice coding!
00622   mad=new NuMadAnalysis();
00623 
00624   //construct the object
00625   dpID=new MadDpID();
00626 
00627   BeamType::BeamType_t btype = static_cast<BeamType::BeamType_t>(nu.beamType);
00628   MAXMSG("NuPIDInterface",Msg::kInfo,1) << "Initializing DpID for btype = " << BeamType::AsString(btype)
00629   << " (" << btype << ") and " << endl;
00630   this->PrintReleaseTypeEtc(nu);
00631 
00632   // Check for and change RHC to FHC
00633   if (btype == BeamType::kL010z185i_rev) {
00634     btype = BeamType::kL010z185i;
00635   }
00636   MAXMSG("NuPIDInterface",Msg::kInfo,1) << "Initializing DpID for btype = " << BeamType::AsString(btype)
00637   << " (" << btype << ") and " << endl;
00638     this->PrintReleaseTypeEtc(nu);
00639 
00640   //select the correct pdf
00641   // Force release type to cedar since those are the only training files available.
00642   int rtype = nu.releaseType;
00643   rtype -= ReleaseType::GetRecoInfo(rtype); // remove the current recoversion
00644   rtype += ReleaseType::kCedar;             // make this appear to be cedar
00645 
00646   dpID->ChoosePDFs(static_cast<Detector::Detector_t>(nu.detector),
00647                    btype,
00648                    ReleaseType::AsString(rtype),
00649                    ReleaseType::AsString(nu.mcVersion));
00650 
00651   MSG("NuPIDInterface",Msg::kDebug)
00652     <<"TDirectory after InitialiseDpID is:"<<endl;
00653   //gDirectory->pwd();
00654   MSG("NuPIDInterface",Msg::kDebug)
00655     <<"After reseting gDirectory its location is:"<<endl;
00656   gDirectory=tmpd;
00657   //gDirectory->pwd();
00658 }

void NuPIDInterface::InitialiseJeID ( const NuEvent nu  )  [private]

Definition at line 865 of file NuPIDInterface.cxx.

References GetFileNameJeID(), Msg::kDebug, Msg::kInfo, NuEvent::mcVersion, MSG, and NuEvent::recoVersion.

00866 {
00867   MSG("NuPIDInterface",Msg::kInfo)
00868     <<"InitialiseJeID..."<<endl;
00869 
00870   TDirectory* tmpd = gDirectory;
00871   MSG("NuPIDInterface",Msg::kDebug)
00872     <<"TDirectory before InitialiseJeID is:"<<endl;
00873   //tmpd->pwd();
00874 
00875   string sFileName=this->GetFileNameJeID(nu);
00876   MSG("NuPIDInterface",Msg::kInfo)
00877     <<"InitialiseJeID with:"<<endl
00878     <<" sFileName="<<sFileName<<endl
00879     <<" recoVersion="<<nu.recoVersion
00880     <<", mcVersion="<<nu.mcVersion<<endl;
00881 
00882   //nothing here yet...
00883 
00884   MSG("NuPIDInterface",Msg::kDebug)
00885     <<"TDirectory after InitialiseJeID is:"<<endl;
00886   //gDirectory->pwd();
00887   MSG("NuPIDInterface",Msg::kDebug)
00888     <<"After reseting gDirectory its location is:"<<endl;
00889   gDirectory=tmpd;
00890   //gDirectory->pwd();
00891 }

void NuPIDInterface::InitialiseJmID ( const NuEvent nu  )  [private]

Definition at line 759 of file NuPIDInterface.cxx.

References Anp::Interface::Config(), NuLibrary::general, GetFileNameJmID(), NuGeneral::GetReleaseDirToUse(), NuLibrary::Instance(), jmInterface, jmRegistry, Msg::kInfo, MSG, PrintReleaseTypeEtc(), Registry::Set(), and SubReg_FillkNN().

Referenced by GetJmID().

00760 {
00761   MSG("NuPIDInterface",Msg::kInfo)
00762     <<"InitialiseRoID..."<<endl;
00763 
00764   TDirectory* tmpd = gDirectory;
00765   MSG("NuPIDInterface",Msg::kInfo)
00766     <<"TDirectory before InitialiseJmID is:"<<endl;
00767   tmpd->pwd();
00768 
00769   const string sFileName=this->GetFileNameJmID(nu);
00770   MSG("NuPIDInterface",Msg::kInfo)
00771     <<"InitialiseJmID with:"<<endl
00772     <<" sFileName="<<sFileName<<endl;
00773   this->PrintReleaseTypeEtc(nu);
00774 
00775   //get the interface
00776   jmInterface=new Anp::Interface();
00777 
00778   //get an instance of the code library
00779   const NuLibrary& lib=NuLibrary::Instance();
00780 
00781   //get the path to the config file
00782   const string sBase=lib.general.GetReleaseDirToUse("PhysicsNtuple");
00783   const string sConfigFileName=sBase+ "/PhysicsNtuple/Config/ShortConfig2009.txt";
00784   //  const string sConfigFileName="ShortConfig2009.txt";
00785 
00786   //get the registry
00787   cout<<" inside initialise jmInterface "<<sConfigFileName<<endl;
00788 
00789   jmRegistry=new Registry(false);
00790   string knn_name2;
00791   const string sBaseE=lib.general.GetReleaseDirToUse("NuMuBar");
00792   if(!(sFileName.find("near") ==string::npos))
00793     knn_name2 = "/NuMuBar/data/knn.physics.notrack.near.daikon_04.dogwood1.L010z185i.root";
00794   else if(!(sFileName.find("far") ==string::npos))
00795     knn_name2 = "/NuMuBar/data/knn.physics.notrack.far.daikon_04.dogwood1.L010z185i.root";
00796 
00797   const string knn2 = sBaseE+ knn_name2;
00798 
00799   jmRegistry->Set("EventkNN",*SubReg_FillkNN(99,19400,19000, "19008 19007 19004",knn2,"no"));
00800 
00801   jmRegistry->Set("InterfaceConfigPath",sConfigFileName.c_str());
00802   jmRegistry->Set("FillkNNFilePath",sFileName.c_str());
00803   jmRegistry ->Set("PrintConfig","yes");
00804 
00805   // configure RoID interface with registry values
00806   jmInterface->Config(*jmRegistry);
00807 
00808   MSG("NuPIDInterface",Msg::kInfo)
00809     <<"TDirectory after InitialiseJmID is:"<<endl;
00810   gDirectory->pwd();
00811   MSG("NuPIDInterface",Msg::kInfo)
00812     <<"After reseting gDirectory its location is:"<<endl;
00813   gDirectory=tmpd;
00814   gDirectory->pwd();
00815 }

void NuPIDInterface::InitialiseRoID ( const NuEvent nu  )  [private]

Definition at line 715 of file NuPIDInterface.cxx.

References Anp::Interface::Config(), NuLibrary::general, GetFileNameRoID(), NuGeneral::GetReleaseDirToUse(), NuLibrary::Instance(), Msg::kInfo, MSG, PrintReleaseTypeEtc(), roInterface, roRegistry, and Registry::Set().

Referenced by GetRoID(), and GetRoID2007().

00716 {
00717   MSG("NuPIDInterface",Msg::kInfo)
00718     <<"InitialiseRoID..."<<endl;
00719 
00720   TDirectory* tmpd = gDirectory;
00721   MSG("NuPIDInterface",Msg::kInfo)
00722     <<"TDirectory before InitialiseRoID is:"<<endl;
00723   tmpd->pwd();
00724 
00725   const string sFileName=this->GetFileNameRoID(nu);
00726   MSG("NuPIDInterface",Msg::kInfo)
00727     <<"InitialiseRoID with:"<<endl
00728     <<" sFileName="<<sFileName<<endl;
00729   this->PrintReleaseTypeEtc(nu);
00730 
00731   //get the interface
00732   roInterface=new Anp::Interface();
00733 
00734   //get an instance of the code library
00735   const NuLibrary& lib=NuLibrary::Instance();
00736 
00737   //get the path to the config file
00738   const string sBase=lib.general.GetReleaseDirToUse("PhysicsNtuple");
00739   const string sConfigFileName=sBase+ "/PhysicsNtuple/Config/Config2008Test.txt";
00740 
00741   //get the registry
00742   roRegistry=new Registry(false);
00743   roRegistry->Set("InterfaceConfigPath",sConfigFileName.c_str());
00744   roRegistry->Set("FillkNNFilePath",sFileName.c_str());
00745   roRegistry ->Set("PrintConfig","yes");
00746   cout<<" inside initialise roInterace"<<endl;
00747   // configure RoID interface with registry values
00748   roInterface->Config(*roRegistry);
00749 
00750   MSG("NuPIDInterface",Msg::kInfo)
00751     <<"TDirectory after InitialiseRoID is:"<<endl;
00752   gDirectory->pwd();
00753   MSG("NuPIDInterface",Msg::kInfo)
00754     <<"After reseting gDirectory its location is:"<<endl;
00755   gDirectory=tmpd;
00756   gDirectory->pwd();
00757 }

void NuPIDInterface::InitialiseRoID2007 ( const NuEvent nu  )  [private]

Definition at line 662 of file NuPIDInterface.cxx.

References Anp::Interface::Config(), GetFileNameRoID(), Msg::kDebug, Msg::kInfo, Registry::LockValues(), MSG, PrintReleaseTypeEtc(), roInterface, roRegistry, Registry::Set(), and Registry::UnLockValues().

00663 {
00664   MSG("NuPIDInterface",Msg::kInfo)
00665     <<"InitialiseRoID..."<<endl;
00666 
00667   TDirectory* tmpd = gDirectory;
00668   MSG("NuPIDInterface",Msg::kDebug)
00669     <<"TDirectory before InitialiseRoID is:"<<endl;
00670   //tmpd->pwd();
00671 
00672   string sFileName=this->GetFileNameRoID(nu);
00673   MSG("NuPIDInterface",Msg::kInfo)
00674     <<"InitialiseRoID with:"<<endl
00675     <<" sFileName="<<sFileName<<endl;
00676   this->PrintReleaseTypeEtc(nu);
00677 
00678   //get the interface
00679   roInterface=new Anp::Interface();
00680 
00681   //get the registry
00682   roRegistry=new Registry();
00683 
00684   roRegistry->UnLockValues();
00685   roRegistry->Set("FillkNNKNeighbor", int(41));
00686   roRegistry->Set("FillkNNKeyList", "7001, 7010, 7020, 7040");
00687   roRegistry->Set("FillkNNMinViewNPlane", int(5));
00688   //roRegistry->Set("FillkNNFilePath", "train.root");
00689   roRegistry->Set("FillkNNFilePath", sFileName.c_str());
00690   roRegistry->Set("FillkNNKeyBase", int(5200));
00691   roRegistry->Set("QuietInterface", "yes");
00692   roRegistry->Set("FillMuonIdStudy","no");
00693   roRegistry->Set("RunAlgEventErase","no");
00694 
00695   roRegistry->Set("AlgStoreList", "FillHeader FillShower FillTrack FillStrip FillEvent");
00696   roRegistry->Set("AlgSnarlList", "FillMuonId FillTrackGeom FillkNN RunAlgEvent");
00697   roRegistry->Set("AlgEventList","SelectAntiNeutrino");
00698   roRegistry ->Set("PrintConfig","yes");
00699   roRegistry->LockValues();
00700 
00701   // configure RoID interface with registry values
00702   roInterface->Config(*roRegistry);
00703 
00704   MSG("NuPIDInterface",Msg::kDebug)
00705     <<"TDirectory after InitialiseRoID is:"<<endl;
00706   //gDirectory->pwd();
00707   MSG("NuPIDInterface",Msg::kDebug)
00708     <<"After reseting gDirectory its location is:"<<endl;
00709   gDirectory=tmpd;
00710   //gDirectory->pwd();
00711 }

void NuPIDInterface::InitialiseRoIDNuMuBar ( const NuEvent nu  )  [private]

Definition at line 819 of file NuPIDInterface.cxx.

References Anp::Interface::Config(), Msg::kDebug, Msg::kInfo, Registry::LockValues(), MSG, PrintReleaseTypeEtc(), roInterface, roRegistry, Registry::Set(), and Registry::UnLockValues().

Referenced by GetRoIDNuMuBar().

00820 {
00821   MSG("NuPIDInterface",Msg::kInfo)
00822     <<"InitialiseRoIDNuMuBar..."<<endl;
00823 
00824   TDirectory* tmpd = gDirectory;
00825   MSG("NuPIDInterface",Msg::kDebug)
00826     <<"TDirectory before InitialiseRoIDNuMuBar is:"<<endl;
00827   //tmpd->pwd();
00828 
00829   //string sFileName=this->GetFileNameRoID(nu);
00830   //MSG("NuPIDInterface",Msg::kInfo)
00831   //<<"InitialiseRoIDNuMuBar with:"<<endl
00832   //<<" sFileName="<<sFileName<<endl;
00833   this->PrintReleaseTypeEtc(nu);
00834 
00835   //get the interface
00836   roInterface=new Anp::Interface();
00837 
00838   //get the registry
00839   roRegistry=new Registry();
00840 
00841   roRegistry->UnLockValues();
00842   roRegistry->Set("FillMuonIdStudy","no");
00843   roRegistry->Set("QuietInterface","yes");
00844   roRegistry->Set("RunAlgEventErase","no");
00845   roRegistry->Set("AlgStoreList","FillHeader FillShower FillTrack FillStrip FillEvent");
00846   roRegistry->Set("AlgSnarlList","FillMuonId FillTrackGeom RunAlgEvent");
00847   roRegistry->Set("AlgEventList","SelectAntiNeutrino");
00848   roRegistry ->Set("PrintConfig","yes");
00849   roRegistry->LockValues();
00850 
00851   // configure RoID interface with registry values
00852   roInterface->Config(*roRegistry);
00853 
00854   MSG("NuPIDInterface",Msg::kDebug)
00855     <<"TDirectory after InitialiseRoIDNuMuBar is:"<<endl;
00856   //gDirectory->pwd();
00857   MSG("NuPIDInterface",Msg::kDebug)
00858     <<"After reseting gDirectory its location is:"<<endl;
00859   gDirectory=tmpd;
00860   //gDirectory->pwd();
00861 }

void NuPIDInterface::PrintReleaseTypeEtc ( const NuEvent nu  )  const [private]

Definition at line 1549 of file NuPIDInterface.cxx.

References bfld::AsString(), NuEvent::detector, Msg::kInfo, MSG, NuUtilities::PrintRelease(), and NuEvent::releaseType.

Referenced by GetFileNameAbID(), GetFileNameJeID(), GetFileNamekNNID(), InitialiseAbID(), InitialiseDpID(), InitialiseJmID(), InitialiseRoID(), InitialiseRoID2007(), and InitialiseRoIDNuMuBar().

01550 {
01551   MSG("NuPIDInterface",Msg::kInfo)
01552     <<"ReleaseType="
01553     <<NuUtilities::PrintRelease(nu.releaseType)
01554     <<", detector="<<Detector::AsString
01555     (static_cast<Detector::Detector_t>(nu.detector))<<endl;
01556 }

Registry * NuPIDInterface::SubReg_FillkNN ( int  k,
int  keybase,
int  keytrue,
string  keylist,
string  shortknn,
string  usetrack 
) [private]

Definition at line 1336 of file NuPIDInterface.cxx.

Referenced by InitialiseJmID().

01337 {
01338   Registry *kreg = new Registry(false);
01339 
01340   kreg -> Set("PrintConfig", "yes");
01341   kreg -> Set("AlgSnarlName", "FillkNN");
01342   kreg -> Set("FillkNNKeySignal", int(1));      // for historical reasons muon have type=1
01343   kreg -> Set("FillkNNKNeighbor", k);
01344   kreg -> Set("FillkNNKNeighborMod", int(5));
01345   kreg -> Set("FillkNNAddEvent", "no");
01346   kreg -> Set("FillkNNUseTrack", usetrack.c_str());
01347   kreg -> Set("FillkNNTrim", "yes");
01348   kreg -> Set("FillkNNTrimDelta", int(1000));
01349   kreg -> Set("FillkNNFilePath", shortknn.c_str());
01350   kreg -> Set("FillkNNKeyTruth", keytrue);
01351   kreg -> Set("FillkNNKeyBase", keybase);
01352   kreg -> Set("FillkNNKeyList", keylist.c_str());
01353   kreg -> Set("FillShortEventKeyPass",14001);
01354   kreg -> Set("FillShortEventKeyPass2",14001); // no access to 11001
01355   kreg -> Set("FillkNN", "no");
01356 
01357   return kreg;
01358 }


Member Data Documentation

Definition at line 96 of file NuPIDInterface.h.

Referenced by GetAbID(), InitialiseAbID(), and NuPIDInterface().

Definition at line 99 of file NuPIDInterface.h.

Referenced by GetDpID(), InitialiseDpID(), and NuPIDInterface().

Definition at line 104 of file NuPIDInterface.h.

Referenced by GetJmID(), GetJmIDEvt(), GetJmIDNthTrk(), InitialiseJmID(), and NuPIDInterface().

Definition at line 106 of file NuPIDInterface.h.

Referenced by InitialiseJmID().

Definition at line 100 of file NuPIDInterface.h.

Referenced by GetDpID(), InitialiseDpID(), and NuPIDInterface().

Definition at line 90 of file NuPIDInterface.h.

Referenced by NuPIDInterface().

Definition at line 91 of file NuPIDInterface.h.

Referenced by NuPIDInterface().

Definition at line 92 of file NuPIDInterface.h.

Referenced by NuPIDInterface().

Definition at line 93 of file NuPIDInterface.h.

Referenced by NuPIDInterface().


The documentation for this class was generated from the following files:

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1