NuCutImps::PreselectionNC2012 Class Reference

#include <NuSterileCutImps.h>

Inheritance diagram for NuCutImps::PreselectionNC2012:
NuCut

List of all members.

Public Member Functions

 PreselectionNC2012 (const NuPlots *plots=0)

Protected Member Functions

void Preselection (const NuEvent &nu)
void Selection (const NuEvent &nu)
Bool_t InFidVol (const NuEvent &nu) const
void SetFidVol (TString &fidvol)

Detailed Description

Definition at line 23 of file NuSterileCutImps.h.


Constructor & Destructor Documentation

NuCutImps::PreselectionNC2012::PreselectionNC2012 ( const NuPlots plots = 0  ) 

Definition at line 32 of file NuSterileCutImps.cxx.

References NuCuts::kPreselectionNC2012, and NuCut::SetAnaVersion().

00032                                                              :
00033     NuCut("PreselectionNC2012", plots)
00034   {
00035     SetAnaVersion(NuCuts::kPreselectionNC2012);
00036   }
  


Member Function Documentation

Bool_t NuCutImps::PreselectionNC2012::InFidVol ( const NuEvent nu  )  const [protected, virtual]

Fiducial volume calculation function. This is the basic 'infid' derived version, and should be overridden/passed to for any more complicated evaluations.

Reimplemented from NuCut.

Definition at line 39 of file NuSterileCutImps.cxx.

References NuEvent::detector, Detector::kFar, Msg::kInfo, Detector::kNear, Munits::m, MSG, NuEvent::nplaneShw, NuEvent::ntrk, NuEvent::trknplane, NuEvent::vtxMetersToCloseEdgeEvt, NuEvent::vtxMetersToCloseEdgeTrk, NuEvent::vtxMetersToCoilEvt, NuEvent::vtxMetersToCoilTrk, NuEvent::zEvtVtx, and NuEvent::zTrkVtx.

Referenced by Preselection().

00039                                                              {
00040     Bool_t result = false;
00041 
00042     double distToEdge = 0.0;
00043     double distToCoil = 0.0;
00044     double vtxZ = nu.zEvtVtx;
00045     const int trackExtension = nu.nplaneShw - nu.trknplane;
00046 
00047     if (nu.ntrk > 0 && trackExtension < 0) {
00048       distToEdge = nu.vtxMetersToCloseEdgeTrk;
00049       distToCoil = nu.vtxMetersToCoilTrk;
00050       vtxZ = nu.zTrkVtx - 0.0392 * Munits::m;
00051     } else {
00052       distToEdge = nu.vtxMetersToCloseEdgeEvt;
00053       distToCoil = nu.vtxMetersToCoilEvt;
00054     }
00055 
00056     if (nu.detector == Detector::kNear) {
00057       if (distToEdge >= 0.5 && vtxZ <= 4.7368 && vtxZ >= 1.7) {
00058         result = true;
00059       } 
00060     } else if (nu.detector == Detector::kFar) {
00061 
00062       if (distToEdge >= 0.4 && distToCoil >= 0.6) {
00063         if (vtxZ >= 0.21 && vtxZ <= 28.96) { // front / back of detector
00064           if (vtxZ <= 13.72 || vtxZ >= 16.12) { // SM gap
00065             result = true;
00066           }
00067         }
00068       }
00069 
00070     } else {
00071       MSG("NuSterileCutImps", Msg::kInfo) << "Detector is not ND or FD, it is " << nu.detector 
00072                                           << ". No fiducial cuts applied." << endl;
00073     }
00074 
00075     return result;
00076   }

void NuCutImps::PreselectionNC2012::Preselection ( const NuEvent nu  )  [protected, virtual]

Implements NuCut.

Definition at line 84 of file NuSterileCutImps.cxx.

References NuEvent::beamTypeDB, NuEvent::coilCurrent, NuEvent::coilIsOk, NuCut::Cut_Data_If(), NuCut::Cut_If(), NuEvent::cutOnSpillTiming, NuEvent::deltaSecToSpillGPS, NuEvent::detector, NuEvent::dtdz, MuELoss::e, NuEvent::endMetersToCloseEdge, NuEvent::evtphsigcor, NuEvent::goodBeam, NuEvent::goodBeamSntp, NuCuts::GoodTimeToNearestSpill(), NuEvent::gpsError, NuEvent::hornCur, InFidVol(), NuEvent::isGoodDataQuality, NuEvent::isLI, SimFlag::kData, NuCut::Keep_Data_If(), NuCut::Keep_If(), Detector::kFar, Msg::kInfo, BeamType::kL010z185i, BeamType::kM000z200i_nova, Detector::kNear, NuEvent::litime, max, NuEvent::maxConsecutivePlanes, MSG, NuEvent::nevt, NuEvent::nshw, NuEvent::nstripEvt, NuEvent::ntrk, NuEvent::planeEvtN, NuEvent::remoteSpillType, NuEvent::simFlag, NuEvent::slicePHFraction, NuEvent::snarlPulseHeight, NuEvent::transverseRMSU, NuEvent::transverseRMSV, NuEvent::trkvtxdcosy, NuEvent::trkvtxdcosz, NuEvent::yTrkEnd, and NuEvent::zTrkEnd.

00084                                                          {
00085   
00086     Bool_t goodBeamToUse = nu.goodBeamSntp;
00087     if (Detector::kFar == nu.detector &&
00088         SimFlag::kData == nu.simFlag){
00089       goodBeamToUse = nu.goodBeam;
00090     }
00091     
00092     // Make sure beam type is L010z185i and horn is on; only for data
00093     // We are also in the Nova beam era, so lets add the new beam.
00094     Keep_Data_If((nu.beamTypeDB == BeamType::kL010z185i || nu.beamTypeDB == BeamType::kM000z200i_nova)
00095                  && nu.hornCur < -155 
00096                  && nu.hornCur != -999999, nu, "beamType");
00097     
00098     // Is the coil okay
00099     Keep_Data_If(nu.coilIsOk, nu, "CoilIsOkay");
00100     
00101     // Check data quality
00102     Keep_Data_If(nu.isGoodDataQuality, nu, "DataQuality");
00103     
00104     // Check beam spill
00105     Cut_Data_If((nu.detector == Detector::kFar && nu.gpsError > 1000 && nu.deltaSecToSpillGPS < 360)
00106                 || !nu.goodBeam || nu.remoteSpillType == 3, nu, "gpsSpill");
00107 
00108     Keep_Data_If(nu.detector == Detector::kFar || nu.coilCurrent <= -1000, nu, "coilCurrent");
00109 
00110     if (nu.detector == Detector::kFar) {
00111 
00112       // Check main event
00113       Keep_If(nu.nevt > 0, "nEvents");
00114       Keep_If(nu.snarlPulseHeight > 0, "snarlPH");
00115 
00116       const double phFrac = nu.evtphsigcor / max(nu.snarlPulseHeight, 1e-10);
00117       Cut_If(nu.nevt > 2 || (nu.nevt == 2 && phFrac < 0.75), "phFrac");
00118 
00119       // Ultra-steep cosmic showers
00120       const double nplanes = nu.planeEvtN;
00121       const double nstrips = nu.nstripEvt;
00122       Cut_If(nu.planeEvtN == 0 || (nstrips / (nplanes * nplanes)) >= 1, "ultraSteep");
00123 
00124       // Steep showers
00125       if (nu.nshw > 0) {
00126         double tRMS2 = (nu.transverseRMSU * nu.transverseRMSU) + (nu.transverseRMSV * nu.transverseRMSV);
00127         double tRMS = TMath::Sqrt(tRMS2);
00128         Cut_If((0.3 + 0.1901 * TMath::Log10(nplanes)) < tRMS, "steepShower");
00129       } // if nshw > 0
00130 
00131       // Stopping muons
00132       if (nu.ntrk > 0) {
00133         Cut_If(nu.trkvtxdcosz < 0.4, "dCosZ");
00134         bool upExit = (nu.zTrkEnd > 28.78 || nu.endMetersToCloseEdge < 0.5)
00135           && nu.yTrkEnd > -1.657;
00136 
00137         Cut_If(upExit && nu.dtdz < -0.5 && nu.trkvtxdcosy > 0.4, "stopMuon");
00138 
00139       } // if ntrk > 0
00140 
00141       // Check fiber noise
00142       Cut_If(nu.evtphsigcor < 3750 && nu.nstripEvt <= 8, "fiberNoise1");
00143       Cut_If(nu.evtphsigcor < 2000 && nu.nstripEvt > 8, "fiberNoise2");
00144 
00145       // Filter out LI events at FD
00146       Cut_Data_If(nu.isLI || nu.litime != -1, nu, "IsLI");
00147       
00148       // Check spill times at FD
00149       Keep_Data_If(NuCuts::GoodTimeToNearestSpill(nu, -2, +12) ||
00150                    !nu.cutOnSpillTiming, nu, "SpillTime");
00151     } // if FD
00152 
00153     Keep_If(InFidVol(nu), "fidVol");
00154 
00155     // Add ND Cleaning to Preselection    
00156     if (nu.detector == Detector::kNear) {
00157       Keep_If(nu.slicePHFraction > 0.5, "slicePH");
00158       Keep_If(nu.maxConsecutivePlanes >= 3, "maxPlanes");
00159     } else if (nu.detector == Detector::kFar) {
00160 
00161     } else {
00162       MSG("NuSterileCutImps", Msg::kInfo) << "Detector is not ND or FD, it is " << nu.detector
00163                                           << ". No preselection cuts applied." << endl;
00164     }
00165 
00166   } // End of preselection function

void NuCutImps::PreselectionNC2012::Selection ( const NuEvent nu  )  [protected, virtual]

Implements NuCut.

Definition at line 169 of file NuSterileCutImps.cxx.

00169                                                    {
00170     // Deliberately left blank, as this is just a preselection class
00171   }

void NuCutImps::PreselectionNC2012::SetFidVol ( TString &  fidvol  )  [protected]

Definition at line 79 of file NuSterileCutImps.cxx.

00079                                              {
00080     // Empty to avoid setting defaults in the base class
00081   }


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

Generated on 16 Apr 2018 for loon by  doxygen 1.6.1