Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

NueStandard Namespace Reference


Functions

bool PassesDataQuality (NueRecord *nr)
bool PassesNearDataQuality (int gbm, float cc, int st)
bool PassesFarDataQuality (float li, int rc, int dpfddq, float tmin, double spillt)
bool PassesPOTStandards (NueRecord *nr)
bool PassesCosmicCut (NueRecord *nr)
bool PassesCosmicCutFunction (NueRecord *nr)
void FillCosmicCut (NueRecord *nr)
bool IsInFid (NueRecord *nr)
bool PassesTrackPlaneCut (NueRecord *nr)
bool PassesTrackPlaneCut (int trkplane)
bool PassesTrackLikePlaneCut (NueRecord *nr)
bool PassesTrackLikePlaneCut (int tlp)
bool PassesLowEnergyCut (NueRecord *nr)
bool PassesLowEnergyCut (float energy)
bool PassesHighEnergyCut (NueRecord *nr)
bool PassesHighEnergyCut (float energy)
bool IsLargestEvent (NueRecord *nr)
bool PassesPreSelection (NueRecord *nr)
bool PassesPreSelection (int tp, int tlp, float energy)
bool PassesNonHEPreSelection (NueRecord *nr)
bool PassesNonHEPreSelection (int tp, int tlp, float energy)
bool PassesPreSelectionTrackCuts (NueRecord *nr)
bool PassesPreSelectionTrackCuts (int trkplane, int tlp)
bool PassesSysPreSelectionNoHE (NueRecord *nr)
bool PassesSysPreSelectionNoHE (int tp, int tlp, float energy)
bool PassesSysPreSelection (NueRecord *nr)
bool PassesSysPreSelection (int tp, int tlp, float energy)
bool PassesMRCCFiducial (NueRecord *nr)
bool PassesMRCCPreSelection (NueRecord *nr)
bool PassesMRCCPreSelection (float bestComp, int fitp, double pid)
bool PassesMREFiducial (NueRecord *nr)
bool PassesMREPreSelection (NueRecord *nr)
bool PassesMREPreSelection (float bestComp, int fitp, double pid)
bool PassesPIDSelection (NueRecord *nr, Selection::Selection_t sel)
bool PassesSelection (NueRecord *nr, Selection::Selection_t sel)
bool PassesSelection (NueRecord *nr, Selection::Selection_t sel, Selection::Selection_t sel2)
double GetPIDValue (NueRecord *nr, Selection::Selection_t sel)
bool PassesCCSelection (NueRecord *nr)
double GetRPWBeamWeight (NueRecord *nr, bool ismrcc=false)
double GetRPWBeamWeight (std::vector< double > weights, std::vector< double > pots)

Variables

const int NRUNPERIODS = 2
const double pot_fd [NRUNPERIODS] = {0.398,0.602}
const double pot_nd [NRUNPERIODS] = {0.383,0.617}
const double pot_ndmrcc [NRUNPERIODS] = {0.5,0.5}
const double pot_fdmrcc [NRUNPERIODS] = {0.398,0.602}


Function Documentation

void NueStandard::FillCosmicCut NueRecord nr  ) 
 

Definition at line 177 of file NueStandard.cxx.

References BagTree::bt_var1, NueRecord::dtree, and PassesCosmicCutFunction().

Referenced by PassesCosmicCut().

00178 {
00179         int bv = 0;
00180         if (NueStandard::PassesCosmicCutFunction(nr)) bv=1;
00181         nr->dtree.bt_var1=bv;
00182 }

double NueStandard::GetPIDValue NueRecord nr,
Selection::Selection_t  sel
 

Definition at line 360 of file NueStandard.cxx.

References NueRecord::ann, MCNNVars::bestmatches, TreePID::fCutPID, MCNNVars::mcnn_var1, NueRecord::mcnnv, Ann::pid_30inp, Ann::pid_6inp, SubShowerVar::pid_daikon, NueRecord::subshowervars, and NueRecord::treepid.

Referenced by NueSystematic::DoPIDSkew(), NueModule::PassesBlindingCuts(), and PassesPIDSelection().

00361 {
00362   double retval = -9999;
00363 
00364   switch(sel) {
00365   case Selection::kCuts:  retval = nr->treepid.fCutPID;           break;
00366   case Selection::kANN6:  retval = nr->ann.pid_6inp;              break;
00367   case Selection::kANN30:  retval = nr->ann.pid_30inp;            break;
00368   case Selection::kSSPID: retval = nr->subshowervars.pid_daikon;  break;
00369   case Selection::kMCNN:
00370      if (nr->mcnnv.bestmatches < 50)  retval = -0.5;
00371      else        retval = nr->mcnnv.mcnn_var1;                        break;
00372   default:                                                        break;
00373   }
00374 
00375   return retval;
00376 }

double NueStandard::GetRPWBeamWeight std::vector< double >  weights,
std::vector< double >  pots
 

Definition at line 559 of file NueStandard.cxx.

00560 {
00561 
00562   double w=0.;
00563   double p=0.;
00564   for(unsigned int i=0;i<weights.size();i++){
00565     w+=weights[i]*pots[i];
00566     p+=pots[i];
00567   }
00568 
00569   if (p==0){
00570     cout<<"Total pots is set to zero, can not compute a exposure weighted average beam weight.  Returning 1"<<endl;
00571     return 1;
00572   }
00573 
00574   return w/p;
00575 }

double NueStandard::GetRPWBeamWeight NueRecord nr,
bool  ismrcc = false
 

Definition at line 522 of file NueStandard.cxx.

References NueRecord::fluxweights, VldContext::GetDetector(), RecRecordImp< T >::GetHeader(), RecHeader::GetVldContext(), and NueFluxWeights::RPtotbeamweight.

Referenced by NueMiniAna::FillMini().

00523 {
00524 
00525 
00526   std::vector<double> pots;
00527   
00528   Detector::Detector_t det = nr->GetHeader().GetVldContext().GetDetector();
00529 
00530   if (det==Detector::kNear){
00531     if (ismrcc){
00532       for(int i=0;i<NRUNPERIODS;i++){
00533         pots.push_back(pot_ndmrcc[i]);
00534       }
00535     }
00536     else{
00537       for(int i=0;i<NRUNPERIODS;i++){
00538         pots.push_back(pot_nd[i]);
00539       }
00540     }
00541   }
00542   else{
00543     if (ismrcc){
00544       for(int i=0;i<NRUNPERIODS;i++){
00545         pots.push_back(pot_fdmrcc[i]);
00546       }
00547     }
00548     else{
00549       for(int i=0;i<NRUNPERIODS;i++){
00550         pots.push_back(pot_fd[i]);
00551       }
00552     }
00553   }
00554 
00555   double weight = GetRPWBeamWeight(nr->fluxweights.RPtotbeamweight,pots);
00556   return weight;
00557 }

bool NueStandard::IsInFid NueRecord nr  ) 
 

Definition at line 20 of file NueStandard.cxx.

References VldContext::GetDetector(), RecRecordImp< T >::GetHeader(), VldContext::GetSimFlag(), RecHeader::GetVldContext(), NueConvention::IsInsideFarFiducial_Nue_Standard(), NueConvention::IsInsideNearFiducial_Nue_Standard(), NueRecord::srevent, ANtpEventInfo::vtxX, ANtpEventInfo::vtxY, and ANtpEventInfo::vtxZ.

Referenced by Trimmer::EvaluateCuts(), and PassesSelection().

00021 {
00022    float x = nr->srevent.vtxX;
00023    float y = nr->srevent.vtxY;
00024    float z = nr->srevent.vtxZ;
00025                                                                                
00026    Detector::Detector_t fDet;
00027    fDet = nr->GetHeader().GetVldContext().GetDetector();
00028    if (fDet != Detector::kFar && fDet != Detector::kNear) return false;
00029 
00030    SimFlag::SimFlag_t sim = nr->GetHeader().GetVldContext().GetSimFlag();
00031    bool isMC = (sim == SimFlag::kMC);
00032    int retval = 0;
00033 
00034    if (fDet == Detector::kFar)
00035      retval = NueConvention::IsInsideFarFiducial_Nue_Standard(x,y,z, isMC);
00036  
00037    if (fDet == Detector::kNear)
00038      retval = NueConvention::IsInsideNearFiducial_Nue_Standard(x,y,z, isMC);
00039       
00040    return (retval == 1);
00041 }

bool NueStandard::IsLargestEvent NueRecord nr  ) 
 

Definition at line 396 of file NueStandard.cxx.

References VldContext::GetDetector(), RecRecordImp< T >::GetHeader(), RecHeader::GetVldContext(), ANtpEventInfoNue::largestEvent, and NueRecord::srevent.

Referenced by PassesSelection().

00397 {
00398  if(nr->GetHeader().GetVldContext().GetDetector() == Detector::kFar){
00399     if(nr->srevent.largestEvent == 1) return true;
00400     return false;
00401  }
00402  return true;
00403 }

bool NueStandard::PassesCCSelection NueRecord nr  ) 
 

Definition at line 503 of file NueStandard.cxx.

References AnalysisInfoNue::abCCPID, NueRecord::anainfo, ANtpTrackInfoNue::deltaUVVtx, ANtpTrackInfo::endPlaneU, ANtpTrackInfo::endPlaneV, ANtpTrackInfo::passedFit, NueRecord::srevent, NueRecord::srtrack, and ANtpEventInfo::tracks.

Referenced by NueExtrapolationJB::BuildAppTrueHistExact(), NueExtrapolationJB::MakeDataHistograms(), PassesSelection(), and NueExtrapolationJB::PrepareExtrapHistograms().

00504 {
00505    int ntrack  = nr->srevent.tracks;
00506    int pass = nr->srtrack.passedFit;
00507    int endPlaneU = nr->srtrack.endPlaneU;
00508    int endPlaneV = nr->srtrack.endPlaneV;
00509    int deltaUVVtx = nr->srtrack.deltaUVVtx;   
00510 
00511    if (ntrack < 1){ pass = 0; endPlaneU = endPlaneV = deltaUVVtx = 300; }
00512 
00513    bool trackPass =  (pass == 1) || 
00514                 (deltaUVVtx <= 5 && TMath::Abs(endPlaneU - endPlaneV) <= 40
00515                    && endPlaneU < 270 && endPlaneV < 270);
00516 
00517 
00518    return  (ntrack > 0) && trackPass && nr->anainfo.abCCPID > 0.85;
00519 }

bool NueStandard::PassesCosmicCut NueRecord nr  ) 
 

Definition at line 161 of file NueStandard.cxx.

References BagTree::bt_var1, NueRecord::dtree, FillCosmicCut(), VldContext::GetDetector(), RecRecordImp< T >::GetHeader(), and RecHeader::GetVldContext().

Referenced by PassesSelection().

00162 {
00163 
00164         bool ret=true;
00165         if(nr->dtree.bt_var1==0)ret = false;
00166         else if(nr->dtree.bt_var1==1)ret = true;
00167         else{ NueStandard::FillCosmicCut(nr); ret = nr->dtree.bt_var1; }
00168 
00169         Detector::Detector_t fDet;
00170         fDet = nr->GetHeader().GetVldContext().GetDetector();
00171         if (fDet != Detector::kFar) ret = true;
00172 
00173         return ret;
00174 
00175 }

bool NueStandard::PassesCosmicCutFunction NueRecord nr  ) 
 

Definition at line 132 of file NueStandard.cxx.

References ANtpTrackInfo::endX, ANtpTrackInfo::endY, ANtpTrackInfo::endZ, NueRecord::shwfit, NueRecord::srevent, NueRecord::srtrack, ANtpEventInfo::tracks, Shwfit::UVSlope, ANtpTrackInfo::vtxX, ANtpTrackInfo::vtxY, and ANtpTrackInfo::vtxZ.

Referenced by FillCosmicCut().

00133 {
00134         bool result=true;
00135         
00136         //cosmicy shower cut
00137         result = result && !(nr->shwfit.UVSlope > 10);
00138 
00139 
00140         //cosmicy track cut
00141 
00142         if (nr->srevent.tracks<1) return result;  //require a track to apply this cut
00143 
00144         float ex =  nr->srtrack.endX;
00145         float ey =  nr->srtrack.endY;
00146         float ez =  nr->srtrack.endZ;
00147 
00148         float vx =  nr->srtrack.vtxX;
00149         float vy =  nr->srtrack.vtxY;
00150         float vz =  nr->srtrack.vtxZ;
00151 
00152         float cosy = acos(fabs(vy-ey)/sqrt((vx-ex)*(vx-ex)+(vy-ey)*(vy-ey)+(vz-ez)*(vz-ez))); 
00153         float dy=fabs(vy-ey);
00154 
00155         result = result && !(dy>2 && cosy < 0.6);
00156 
00157         return result;
00158 
00159 }

bool NueStandard::PassesDataQuality NueRecord nr  ) 
 

Definition at line 70 of file NueStandard.cxx.

References NueRecord::bmon, ANtpEventInfoNue::daveFDDataQuality, BeamMon::dt_stnd, ANtpEventInfoNue::eventTimeMin, VldContext::GetDetector(), NueHeader::GetEventNo(), RecRecordImp< T >::GetHeader(), VldContext::GetSimFlag(), RecHeader::GetVldContext(), BeamMon::goodBeamMon, CoilTools::IsOK(), CoilTools::IsReverse(), ANtpEventInfoNue::liTime, PassesFarDataQuality(), PassesNearDataQuality(), ANtpEventInfoNue::rcBoundary, ANtpEventInfoNue::spillType, and NueRecord::srevent.

Referenced by PassesSelection(), and MiniMaker::RunMiniMaker().

00071 {                                                 
00072    SimFlag::SimFlag_t sim = nr->GetHeader().GetVldContext().GetSimFlag();
00073    bool isMC = (sim == SimFlag::kMC);
00074    VldContext vld = nr->GetHeader().GetVldContext();
00075 
00076    if (isMC) return true;
00077 
00078    //common to both
00079    if (nr->bmon.goodBeamMon != 1 || nr->srevent.spillType == 3) return false;
00080 
00081    if (nr->GetHeader().GetVldContext().GetDetector() == Detector::kNear ){
00082      bool goodCoil = CoilTools::IsOK(vld) && !CoilTools::IsReverse(vld);
00083 
00084      return PassesNearDataQuality(nr->bmon.goodBeamMon, -4940, nr->srevent.spillType) && goodCoil;
00085    }
00086  
00087    if (nr->GetHeader().GetVldContext().GetDetector() == Detector::kFar){
00088  
00089      int dpDQ = nr->srevent.daveFDDataQuality; 
00090      if (nr->GetHeader().GetEventNo() < 0) return (dpDQ == 1);
00091 
00092      float litime = nr->srevent.liTime;
00093      int rcB = nr->srevent.rcBoundary;
00094      float tmin = nr->srevent.eventTimeMin;
00095      double spillT = nr->bmon.dt_stnd;   
00096      return PassesFarDataQuality(litime, rcB, dpDQ, tmin, spillT);       
00097    }
00098 
00099    return false;
00100 }

bool NueStandard::PassesFarDataQuality float  li,
int  rc,
int  dpfddq,
float  tmin,
double  spillt
 

Definition at line 112 of file NueStandard.cxx.

Referenced by PassesDataQuality().

00114 {
00115   if (li == -1 && rc == 0 && dpfddq == 1
00116     && (tmin - spillt) > -20e-6 && (tmin - spillt) < 30e-6)
00117      return true;
00118                                                                                 
00119   return false;
00120 }

bool NueStandard::PassesHighEnergyCut float  energy  ) 
 

Definition at line 218 of file NueStandard.cxx.

00219 {
00220    return (energy < 8.0);
00221 }

bool NueStandard::PassesHighEnergyCut NueRecord nr  ) 
 

Definition at line 212 of file NueStandard.cxx.

References ANtpEventInfoNue::phNueGeV, and NueRecord::srevent.

Referenced by PassesPreSelection().

00213 {
00214    float energy = nr->srevent.phNueGeV;
00215    return PassesHighEnergyCut(energy);
00216 }

bool NueStandard::PassesLowEnergyCut float  energy  ) 
 

Definition at line 207 of file NueStandard.cxx.

00208 {
00209    return (energy > 1.0);
00210 }

bool NueStandard::PassesLowEnergyCut NueRecord nr  ) 
 

Definition at line 201 of file NueStandard.cxx.

References ANtpEventInfoNue::phNueGeV, and NueRecord::srevent.

Referenced by PassesNonHEPreSelection().

00202 {
00203    float energy = nr->srevent.phNueGeV;
00204    return PassesLowEnergyCut(energy);
00205 }

bool NueStandard::PassesMRCCFiducial NueRecord nr  ) 
 

Definition at line 267 of file NueStandard.cxx.

References VldContext::GetDetector(), RecRecordImp< T >::GetHeader(), VldContext::GetSimFlag(), RecHeader::GetVldContext(), NueConvention::IsInsideNearFiducial_MRE_Standard(), NueRecord::mri, MuonRemovalInfo::vtxx, MuonRemovalInfo::vtxy, and MuonRemovalInfo::vtxz.

Referenced by PassesMREFiducial(), and PassesSelection().

00268 {
00269    float x = nr->mri.vtxx;
00270    float y = nr->mri.vtxy;
00271    float z = nr->mri.vtxz;
00272                                                                                 
00273    Detector::Detector_t fDet;
00274    fDet = nr->GetHeader().GetVldContext().GetDetector();
00275    if (fDet != Detector::kNear) return false;     
00276    SimFlag::SimFlag_t sim = nr->GetHeader().GetVldContext().GetSimFlag();
00277    bool isMC = (sim == SimFlag::kMC);
00278    int retval = 0;
00279                                                                                 
00280    if (fDet == Detector::kFar) retval = 0;
00281        
00282    if (fDet == Detector::kNear)
00283      retval = NueConvention::IsInsideNearFiducial_MRE_Standard(x,y,z, isMC);
00284 
00285    return (retval == 1);
00286 }

bool NueStandard::PassesMRCCPreSelection float  bestComp,
int  fitp,
double  pid
 

Definition at line 297 of file NueStandard.cxx.

00298 {
00299    //currently assumes DP-PID
00300    bool good = true;
00301    good = good && (bestComp > -10);
00302    good = good && (fitp == 1);
00303    good = good && (pid > -0.1);
00304                                                                                 
00305    return good;
00306 }

bool NueStandard::PassesMRCCPreSelection NueRecord nr  ) 
 

Definition at line 288 of file NueStandard.cxx.

References MuonRemovalInfo::best_complete, MuonRemovalInfo::fitp, NueRecord::mri, and MuonRemovalInfo::orig_cc_pid.

Referenced by PassesMREPreSelection(), and PassesSelection().

00289 {
00290     double pid = nr->mri.orig_cc_pid;
00291     int fitp = nr->mri.fitp;
00292     float bestC = nr->mri.best_complete;
00293 
00294     return NueStandard::PassesMRCCPreSelection(bestC, fitp, pid);
00295 }

bool NueStandard::PassesMREFiducial NueRecord nr  ) 
 

Definition at line 308 of file NueStandard.cxx.

References PassesMRCCFiducial().

Referenced by Trimmer::EvaluateCuts(), and MiniMaker::EvaluateCuts().

00309 {
00310     return NueStandard::PassesMRCCFiducial(nr);
00311 }

bool NueStandard::PassesMREPreSelection float  bestComp,
int  fitp,
double  pid
 

Definition at line 318 of file NueStandard.cxx.

References PassesMRCCPreSelection().

00319 {
00320     return NueStandard::PassesMRCCPreSelection(bestC, fitp, pid);
00321 }

bool NueStandard::PassesMREPreSelection NueRecord nr  ) 
 

Definition at line 313 of file NueStandard.cxx.

References PassesMRCCPreSelection().

Referenced by Trimmer::EvaluateCuts(), and MiniMaker::EvaluateCuts().

00314 {
00315     return NueStandard::PassesMRCCPreSelection(nr);
00316 }

bool NueStandard::PassesNearDataQuality int  gbm,
float  cc,
int  st
 

Definition at line 102 of file NueStandard.cxx.

Referenced by PassesDataQuality(), and PassesPOTStandards().

00103 {
00104   //Assumes it is taking:
00105   // nr->bmon.goodBeamMon, nr->srevent.coilCurrent, nr->srevent.spillType
00106   if (gbm == 1 && cc < -1000.0 && st != 3)
00107      return true;
00108                                                                                 
00109   return false;
00110 }

bool NueStandard::PassesNonHEPreSelection int  tp,
int  tlp,
float  energy
 

Definition at line 246 of file NueStandard.cxx.

References PassesLowEnergyCut(), and PassesPreSelectionTrackCuts().

00247 {
00248    bool temp = PassesPreSelectionTrackCuts(trkplane, tlp);
00249    temp = temp && PassesLowEnergyCut(energy);
00250    return temp;
00251 }

bool NueStandard::PassesNonHEPreSelection NueRecord nr  ) 
 

Definition at line 239 of file NueStandard.cxx.

References PassesLowEnergyCut(), and PassesPreSelectionTrackCuts().

Referenced by Trimmer::EvaluateCuts(), MiniMaker::EvaluateCuts(), and PassesPreSelection().

00240 {
00241    bool temp = PassesPreSelectionTrackCuts(nr);
00242    temp = temp && PassesLowEnergyCut(nr);
00243    
00244    return temp;
00245 }                                                                                                       

bool NueStandard::PassesPIDSelection NueRecord nr,
Selection::Selection_t  sel
 

Definition at line 378 of file NueStandard.cxx.

References GetPIDValue().

Referenced by NueExtrapolationJB::MakeDataHistograms(), PassesSelection(), and NueExtrapolationJB::PrepareExtrapHistograms().

00379 {
00380   bool pass = false;
00381   double val = GetPIDValue(nr, sel);
00382                                                                                                   
00383   switch(sel) {
00384   case Selection::kCuts:  pass = (int(val) == 1);       break;
00385   case Selection::kANN6:   pass = val > 0.5;            break;
00386   case Selection::kANN30:  pass = val > 0.5;            break;
00387   case Selection::kSSPID: pass = val > 0.75;             break;
00388   case Selection::kMCNN:  pass = val > 0.83;             break;
00389   default:                                              break;
00390   }
00391                                                                                                   
00392   return pass;
00393 }

bool NueStandard::PassesPOTStandards NueRecord nr  ) 
 

Definition at line 43 of file NueStandard.cxx.

References NueRecord::bmon, ANtpEventInfoNue::daveFDDataQuality, VldContext::GetDetector(), NueHeader::GetEventNo(), RecRecordImp< T >::GetHeader(), VldContext::GetSimFlag(), RecHeader::GetVldContext(), BeamMon::goodBeamMon, CoilTools::IsOK(), CoilTools::IsReverse(), ANtpEventInfoNue::liTime, PassesNearDataQuality(), ANtpEventInfoNue::spillType, and NueRecord::srevent.

Referenced by NueBeamMonModule::Reco(), and Trimmer::RunTrimmer().

00044 {
00045    SimFlag::SimFlag_t sim = nr->GetHeader().GetVldContext().GetSimFlag();
00046    bool isMC = (sim == SimFlag::kMC);
00047    VldContext vld = nr->GetHeader().GetVldContext();
00048 
00049    if (isMC) return true;
00050 
00051    //common to both
00052    if (nr->bmon.goodBeamMon != 1 || nr->srevent.spillType == 3) return false;
00053 
00054    if (nr->GetHeader().GetVldContext().GetDetector() == Detector::kNear ){
00055      bool goodCoil = CoilTools::IsOK(vld) && !CoilTools::IsReverse(vld);
00056 
00057      return PassesNearDataQuality(nr->bmon.goodBeamMon, -4940, nr->srevent.spillType) && goodCoil;
00058    }
00059 
00060    if (nr->GetHeader().GetVldContext().GetDetector() == Detector::kFar){
00061 
00062      int dpDQ = nr->srevent.daveFDDataQuality;
00063      if (nr->GetHeader().GetEventNo() < 0) return (dpDQ == 1);
00064 
00065      return (dpDQ == 1) && (nr->srevent.liTime == -1);
00066    }
00067 
00068    return false;
00069 }                                                                                                          

bool NueStandard::PassesPreSelection int  tp,
int  tlp,
float  energy
 

Definition at line 232 of file NueStandard.cxx.

References PassesHighEnergyCut(), and PassesNonHEPreSelection().

00233 {
00234    bool temp = PassesNonHEPreSelection(trkplane, tlp, energy);
00235    temp = temp && PassesHighEnergyCut(energy);
00236    return temp;
00237 }

bool NueStandard::PassesPreSelection NueRecord nr  ) 
 

Definition at line 224 of file NueStandard.cxx.

References PassesHighEnergyCut(), and PassesNonHEPreSelection().

Referenced by NueExtrapolationJB::MakeDataHistograms(), PassesSelection(), and NueExtrapolationJB::PrepareExtrapHistograms().

00225 {
00226    bool temp = PassesNonHEPreSelection(nr);
00227    temp = temp && PassesHighEnergyCut(nr);
00228   
00229    return temp;
00230 }

bool NueStandard::PassesPreSelectionTrackCuts int  trkplane,
int  tlp
 

Definition at line 260 of file NueStandard.cxx.

References PassesTrackLikePlaneCut(), and PassesTrackPlaneCut().

00261 {
00262    bool temp = PassesTrackPlaneCut(trkplane);
00263    temp = temp && PassesTrackLikePlaneCut(tlp);
00264    return temp;
00265 }

bool NueStandard::PassesPreSelectionTrackCuts NueRecord nr  ) 
 

Definition at line 253 of file NueStandard.cxx.

References PassesTrackLikePlaneCut(), and PassesTrackPlaneCut().

Referenced by PassesNonHEPreSelection().

00254 {
00255    bool temp = PassesTrackPlaneCut(nr);
00256    temp = temp && PassesTrackLikePlaneCut(nr);
00257    return temp;  
00258 }

bool NueStandard::PassesSelection NueRecord nr,
Selection::Selection_t  sel,
Selection::Selection_t  sel2
 

Definition at line 450 of file NueStandard.cxx.

References NueHeader::FoundMR(), RecRecordImp< T >::GetHeader(), infid(), IsInFid(), IsLargestEvent(), PassesCCSelection(), PassesCosmicCut(), PassesDataQuality(), PassesMRCCPreSelection(), PassesPIDSelection(), and PassesPreSelection().

00451 {
00452   bool pass = false;
00453 
00454   bool dq = NueStandard::PassesDataQuality(nr);
00455   bool infid = NueStandard::IsInFid(nr) && dq;
00456   bool presel = NueStandard::PassesPreSelection(nr);
00457   bool pid = NueStandard::PassesPIDSelection(nr,sel);
00458 
00459   bool isLargest =  NueStandard::IsLargestEvent(nr);
00460   bool cosmic = NueStandard::PassesCosmicCut(nr);
00461 
00462   infid = cosmic && isLargest && infid;
00463 
00464   switch(sel2) {
00465   case Selection::kDataQual:  dq = true;                  break;
00466   case Selection::kFid:       infid = true;               break;
00467   case Selection::kPre:       presel = true;              break;
00468   default:                                                break;
00469   }
00470 
00471   bool isMR = nr->GetHeader().FoundMR();
00472 
00473   if(isMR){
00474     bool mrfid = true; //PassesMRCCFiducial(nr);
00475     bool mrps = PassesMRCCPreSelection(nr);
00476 
00477     infid = infid && mrfid && mrps;
00478   }
00479   presel = dq && infid && presel;
00480 
00481   switch(sel) {
00482   case Selection::kNone:  pass = true;                    break;
00483   case Selection::kDataQual:  pass = dq;                  break;
00484   case Selection::kFid:   pass = infid;                   break;
00485   case Selection::kPre:   pass = presel;                  break;
00486   case Selection::kCuts:  pass = presel && pid;           break;
00487   case Selection::kANN6:   pass = presel && pid;          break;
00488   case Selection::kANN30:  pass = presel && pid;          break;
00489   case Selection::kSSPID: pass = presel && pid;           break;
00490   case Selection::kMCNN:  pass = presel && pid;           break;
00491   case Selection::kMDA:   pass = presel && false;         break;
00492   case Selection::kBDT:   pass = presel && false;         break;
00493   case Selection::kKNue:  pass = presel && false;         break;
00494   case Selection::kCC:    pass = infid &&
00495                      NueStandard::PassesCCSelection(nr);  break;
00496   default:                                                break;
00497   }
00498 
00499   return pass;
00500 }

bool NueStandard::PassesSelection NueRecord nr,
Selection::Selection_t  sel
 

Definition at line 405 of file NueStandard.cxx.

References NueHeader::FoundMR(), RecRecordImp< T >::GetHeader(), infid(), IsInFid(), IsLargestEvent(), PassesCCSelection(), PassesCosmicCut(), PassesDataQuality(), PassesMRCCFiducial(), PassesMRCCPreSelection(), PassesPIDSelection(), and PassesPreSelection().

Referenced by Trimmer::EvaluateCuts(), MiniMaker::EvaluateCuts(), NueExtrapHelper::PassCuts(), and MiniMaker::RunMiniMaker().

00406 {
00407   bool pass = false;
00408 
00409   bool dq = NueStandard::PassesDataQuality(nr);
00410   bool infid = NueStandard::IsInFid(nr) && dq;
00411   bool presel = dq && infid && NueStandard::PassesPreSelection(nr);
00412   bool pid = NueStandard::PassesPIDSelection(nr,sel); 
00413 
00414   bool isLargest =  NueStandard::IsLargestEvent(nr);
00415   bool cosmic = NueStandard::PassesCosmicCut(nr);
00416 
00417   infid = cosmic && isLargest && infid;
00418 
00419   bool isMR = nr->GetHeader().FoundMR();
00420 
00421   if (isMR){
00422     bool mrfid = PassesMRCCFiducial(nr);
00423     bool mrps = PassesMRCCPreSelection(nr);
00424 
00425     infid = infid && mrfid && mrps;
00426   } 
00427 
00428   switch(sel) {
00429   case Selection::kNone:     pass = true;                 break;
00430   case Selection::kDataQual: pass = dq;                   break;
00431   case Selection::kCosmic:   pass = cosmic;               break;
00432   case Selection::kFid:   pass = infid;                   break;
00433   case Selection::kPre:   pass = presel;                  break;
00434   case Selection::kCuts:  pass = presel && pid;           break;
00435   case Selection::kANN6:  pass = presel && pid;          break;
00436   case Selection::kANN30: pass = presel && pid;          break;
00437   case Selection::kSSPID: pass = presel && pid;           break;
00438   case Selection::kMCNN:  pass = presel && pid;           break;
00439   case Selection::kMDA:   pass = presel && false;         break;
00440   case Selection::kBDT:   pass = presel && false;         break;
00441   case Selection::kKNue:  pass = presel && false;         break;
00442   case Selection::kCC:    pass = infid && 
00443                      NueStandard::PassesCCSelection(nr);  break;
00444   default:                                                break;
00445   }
00446 
00447   return pass;
00448 }

bool NueStandard::PassesSysPreSelection int  tp,
int  tlp,
float  energy
 

Definition at line 351 of file NueStandard.cxx.

00352 {
00353    bool good = true;
00354    good = good && (trkplane < 28);
00355    good = good && (tlp < 18);
00356    good = good && (energy > 0.5 && energy < 10);
00357    return good;
00358 }

bool NueStandard::PassesSysPreSelection NueRecord nr  ) 
 

Definition at line 342 of file NueStandard.cxx.

References ANtpTrackInfo::begPlane, ANtpTrackInfo::endPlane, ANtpEventInfoNue::phNueGeV, NueRecord::srevent, NueRecord::srtrack, and ANtpTrackInfoNue::trklikePlanes.

Referenced by Trimmer::EvaluateCuts(), and MiniMaker::EvaluateCuts().

00343 {
00344    int tp = TMath::Abs(nr->srtrack.endPlane - nr->srtrack.begPlane);
00345    int tlp = nr->srtrack.trklikePlanes;
00346    float energy = nr->srevent.phNueGeV;
00347                                                                                 
00348    return PassesSysPreSelection(tp, tlp, energy);
00349 }

bool NueStandard::PassesSysPreSelectionNoHE int  tp,
int  tlp,
float  energy
 

Definition at line 332 of file NueStandard.cxx.

00333 {
00334    bool good = true;
00335    good = good && (trkplane < 28);
00336    good = good && (tlp < 18);
00337    good = good && (energy > 0.5);
00338    return good;
00339 }

bool NueStandard::PassesSysPreSelectionNoHE NueRecord nr  ) 
 

Definition at line 323 of file NueStandard.cxx.

References ANtpTrackInfo::begPlane, ANtpTrackInfo::endPlane, ANtpEventInfoNue::phNueGeV, NueRecord::srevent, NueRecord::srtrack, and ANtpTrackInfoNue::trklikePlanes.

Referenced by Trimmer::EvaluateCuts().

00324 {
00325    int tp = TMath::Abs(nr->srtrack.endPlane - nr->srtrack.begPlane);
00326    int tlp = nr->srtrack.trklikePlanes;
00327    float energy = nr->srevent.phNueGeV;
00328                                                                                              
00329    return PassesSysPreSelectionNoHE(tp, tlp, energy);
00330 }

bool NueStandard::PassesTrackLikePlaneCut int  tlp  ) 
 

Definition at line 196 of file NueStandard.cxx.

00197 {       
00198    return (tlp < 16);
00199 }

bool NueStandard::PassesTrackLikePlaneCut NueRecord nr  ) 
 

Definition at line 190 of file NueStandard.cxx.

References NueRecord::srtrack, and ANtpTrackInfoNue::trklikePlanes.

Referenced by PassesPreSelectionTrackCuts().

00191 {
00192    int tlp = nr->srtrack.trklikePlanes;
00193    return PassesTrackLikePlaneCut(tlp);
00194 }

bool NueStandard::PassesTrackPlaneCut int  trkplane  ) 
 

Definition at line 185 of file NueStandard.cxx.

00186 {
00187    return (trkplane < 25);
00188 }

bool NueStandard::PassesTrackPlaneCut NueRecord nr  ) 
 

Definition at line 124 of file NueStandard.cxx.

References ANtpTrackInfo::begPlane, ANtpTrackInfo::endPlane, and NueRecord::srtrack.

Referenced by PassesPreSelectionTrackCuts().

00125 {
00126    int tp = TMath::Abs(nr->srtrack.endPlane - nr->srtrack.begPlane);
00127 
00128    return PassesTrackPlaneCut(tp);
00129 }


Variable Documentation

const int NueStandard::NRUNPERIODS = 2 [static]
 

Definition at line 25 of file NueStandard.h.

const double NueStandard::pot_fd[NRUNPERIODS] = {0.398,0.602} [static]
 

Definition at line 26 of file NueStandard.h.

const double NueStandard::pot_fdmrcc[NRUNPERIODS] = {0.398,0.602} [static]
 

Definition at line 29 of file NueStandard.h.

const double NueStandard::pot_nd[NRUNPERIODS] = {0.383,0.617} [static]
 

Definition at line 27 of file NueStandard.h.

const double NueStandard::pot_ndmrcc[NRUNPERIODS] = {0.5,0.5} [static]
 

Definition at line 28 of file NueStandard.h.


Generated on Mon Jun 16 15:04:20 2008 for loon by  doxygen 1.3.9.1