NuCutImps::ChairSound Class Reference

#include <NuCutImps.h>

Inheritance diagram for NuCutImps::ChairSound:
NuCut

List of all members.

Public Member Functions

 ChairSound (const NuPlots *plots=0)

Static Public Member Functions

static Int_t GetRegion (const NuEvent &nu)

Protected Member Functions

void Preselection (const NuEvent &nu)
void Selection (const NuEvent &nu)

Detailed Description

Definition at line 406 of file NuCutImps.h.


Constructor & Destructor Documentation

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

Definition at line 2703 of file NuCutImps.cxx.

References NuCut::SetFidVol().

02703                                              :
02704     NuCut("ChairSound", plots)
02705     // fNuCutsSelection(NuCuts::kNMB0325ChairSound, plots)
02706   {
02707     SetFidVol("cc2008");
02708   }


Member Function Documentation

Int_t NuCutImps::ChairSound::GetRegion ( const NuEvent nu  )  [static]

Definition at line 2711 of file NuCutImps.cxx.

References det, NuEvent::detector, FidVol::getFarRinner(), FidVol::getFarRouter(), FidVol::getFarZMC(), FidVol::getTrkVtxZOffset(), infid(), Detector::kNear, kUnknown, NuEvent::simFlag, NuEvent::xTrkVtx, NuEvent::yTrkVtx, and NuEvent::zTrkVtx.

Referenced by Preselection(), and NuCutImps::MSRock_Nov09::Preselection().

02712   {
02713     // An enum for the rock detector region - this probably shouldn't go here,
02714     // but for now it will have to do (would rather use an enum than plain numbers)
02715     enum Rock_DetectorRegion {
02716       kNoTrack   = -1,
02717       kFiducial  = 0,
02718       kFront     = 1,
02719       kBack      = 2,
02720       kGap       = 3,
02721       kEdge      = 4,
02722       kCoilHole  = 5,
02723       kCorner    = 6,
02724       kUnknown   = 7
02725     };
02726 
02727     // Placeholder to avoid nesting if's in this function
02728     Bool_t inFid = false, nearFront = false, nearEdge = false;
02729     Bool_t nearGap = false, nearCoil = false, nearBack = false;
02730     Double_t radius2 = nu.xTrkVtx*nu.xTrkVtx + nu.yTrkVtx*nu.yTrkVtx;
02731     Double_t z = nu.zTrkVtx - FidVol::getTrkVtxZOffset();
02732     // Get the detector
02733     Detector::Detector_t det = (Detector::Detector_t)nu.detector;
02734 
02735     // If we are the near detector, we can't calculate the region - return unknown
02736     if (det == Detector::kNear) return kUnknown;
02737 
02738     // Now - examine each of the regions and determine if the vertex is in there
02739     // 0 = Fiducial
02740     inFid = infid((Detector::Detector_t)nu.detector, (SimFlag::SimFlag_t)nu.simFlag,
02741                   nu.xTrkVtx, nu.yTrkVtx, z);
02742     if (inFid) return kFiducial;
02743 
02744     // 1 = Front, non-edge
02745     nearFront = z < FidVol::getFarZMC(0);
02746     nearEdge = radius2 >= (FidVol::getFarRouter()*FidVol::getFarRouter());
02747     nearCoil = radius2 < FidVol::getFarRinner()*FidVol::getFarRinner();
02748 
02749     if(nearFront && !nearEdge && !nearCoil) return kFront;
02750 
02751     // 2 = Back, anywhere (no corners at back)
02752     nearBack = z > FidVol::getFarZMC(3);
02753     if(nearBack) return kBack;
02754 
02755     // 3 = Supermodule gap, non-edge
02756     nearGap = z > FidVol::getFarZMC(1) && z < FidVol::getFarZMC(2);
02757     if(nearGap && !nearEdge && !nearCoil) return kGap;
02758 
02759     // 4 = edge, non-end
02760     if(nearEdge && !nearBack && !nearFront && !nearGap) return kEdge;
02761 
02762     // 5 = coil hole, non-end
02763     if(nearCoil && !nearBack && !nearFront && !nearGap) return kCoilHole;
02764 
02765     // 6 = corner cases
02766     // No other cases have been matched, it must (?) be a corner case?
02767     return kCorner;
02768   }

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

Implements NuCut.

Definition at line 2770 of file NuCutImps.cxx.

References NuEvent::coilCurrent, NuEvent::coilIsOk, NuCut::Cut_If(), NuEvent::cutOnBeamInfo, NuEvent::cutOnDataQuality, NuEvent::cutOnSpillTiming, NuEvent::detector, GetRegion(), NuEvent::goodBeamSntp, NuCuts::GoodTimeToNearestSpill(), NuCutImps::CC0325Std::IsGoodBeam(), NuEvent::isGoodDataQuality, NuCuts::IsGoodTrackFitPassReclamation(), NuEvent::isLI, NuCut::Keep_Data_If(), NuCut::Keep_If(), Detector::kFar, Detector::kNear, Msg::kWarning, NuEvent::litime, MAXMSG, NuEvent::ntrk, NuEvent::trkfitpass, and NuEvent::trkvtxdcosy.

02771   {
02772     // can't use CC0325Std::Preselection because it has a fiducial cut and
02773     // an overly tight angle cut.  This is copied from there except for those.
02774 
02775     Keep_If(nu.ntrk >= 1, "GoodNumberofTracks");    // Good tracks
02776     Cut_If(nu.isLI || nu.litime != -1, "LICut");    // Filter out LI events
02777     Keep_Data_If(!nu.cutOnDataQuality || nu.coilIsOk, nu, "IsCoilOkay");
02778     Keep_Data_If(nu.goodBeamSntp && nu.coilIsOk, nu,"GoodBeamDetPOT");
02779     Keep_Data_If(!nu.cutOnBeamInfo || CC0325Std::IsGoodBeam(nu),nu,"GoodBeam");
02780 
02781     // Keep only front face events that are neither near the edge nor coil hole
02782     // Keep_If(nu.regionTrkVtx == 1, "front_face");
02783     Keep_If(GetRegion(nu) == 1, "front_face");
02784 
02785     // Per-detector cuts
02786     if (nu.detector == Detector::kFar){
02787       Keep_If(nu.trkfitpass == 1, "trackfitpass");
02788       Keep_Data_If(nu.isGoodDataQuality||!nu.cutOnDataQuality,nu,"DataQuality");
02789 
02790       // [-2, 12] microseconds
02791       Keep_Data_If(NuCuts::GoodTimeToNearestSpill(nu, -2, +12)
02792                    || !nu.cutOnSpillTiming, nu, "SpillTime");
02793       // Cosmic cut?
02794       Keep_If(TMath::Abs(nu.trkvtxdcosy) < 0.4, "CosY");
02795     }
02796     else if (nu.detector == Detector::kNear){
02797       MAXMSG("CC0325Std",Msg::kWarning, 1) << "Front face numubar selection "
02798         " called on near detector. I doubt that this works properly.\n";
02799       Keep_If(NuCuts::IsGoodTrackFitPassReclamation(nu), "trackfitreclamation");
02800       Keep_Data_If(nu.coilCurrent<-1000||!nu.cutOnDataQuality,nu,"CoilCurrent");
02801     }
02802   }

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

Implements NuCut.

Definition at line 2805 of file NuCutImps.cxx.

References NuCut::Keep_If(), NuEvent::relativeAngle, NuEvent::roID, and NuEvent::sigqp_qp.

02806   {
02807     // Other selectors have a Defer_Selection to CC0325Std here, but I
02808     // don't think it makes sense here since we don't share a preselection.
02809     // However, I honestly have no clear idea what it's even supposed to do,
02810     // so I could be wrong.
02811 
02812     // Half of one bin in the kNN (which uses 80 bins).
02813     // This removes potential ambiguity from floating point arithmetic
02814     const double eps = 1/160.;
02815 
02816     Keep_If(nu.roID > 0.25-eps, "RoID");
02817     Keep_If(1/nu.sigqp_qp > 3.5, "SigmaQP_QP");
02818     Keep_If(TMath::Abs(nu.relativeAngle - TMath::Pi()) > 2.08, "RelativeAngle");
02819   }


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

Generated on 16 Apr 2018 for loon by  doxygen 1.6.1