NuCutImps::RAF0720Std Class Reference

#include <NuCutImps.h>

Inheritance diagram for NuCutImps::RAF0720Std:
NuCut

List of all members.

Public Member Functions

 RAF0720Std (const NuPlots *plots=0)
Bool_t InFidVol (const NuEvent &nu) const
void Preselection (const NuEvent &nu)
void Selection (const NuEvent &nu)

Static Public Member Functions

static Char_t PIDtype (const NuEvent &nu)
static Bool_t IsGoodPID (const NuEvent &nu)
static Bool_t CosmicNonTiming (const NuEvent &nu)

Private Attributes

Preselection2010 fPreselection2010
CC0720Std fCC0720Std
NC0720Std fNC0720Std

Detailed Description

Definition at line 364 of file NuCutImps.h.


Constructor & Destructor Documentation

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

Definition at line 2342 of file NuCutImps.cxx.

References NuCuts::kCC0720Std, NuCut::SetAnaVersion(), and NuCut::SetFidVol().

02342                                              :
02343     NuCut("RAF0720Std", plots)
02344   {
02345     //Match CC fiducial volume for simplicity
02346     SetFidVol("cc2008");
02347 
02348     // Matt says: The definition of best track and track containment used for
02349     // the fiducial analysis are good enough for now.  This is worth
02350     // revisiting as there is ~>0.7% in sensitivity to be gained via
02351     // more aggressive use of range, as well as use of tracks not reconstructed
02352     // as part of any "event".
02353     SetAnaVersion(NuCuts::kCC0720Std);
02354   }


Member Function Documentation

Bool_t NuCutImps::RAF0720Std::CosmicNonTiming ( const NuEvent nu  )  [static]

Definition at line 2370 of file NuCutImps.cxx.

References NuEvent::containedTrk, NuEvent::containmentFlagCC0250Std, NuEvent::dirCosNu, MuELoss::e, NuEvent::edgeRegionTrkVtx, Msg::kWarning, MAXMSG, NuEvent::regionTrkVtx, NuEvent::trkEn, NuEvent::trkEnCurv, and NuEvent::trkEnRange.

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

02371   {
02372     // This function uses the transverse momentum, but
02373     // NuReco::GetTrackTransverseMomentum looks totally broken to me:
02374     // Double_t NuReco::GetTrackTransverseMomentum(const NuEvent& nu) const {
02375     //   Double_t bestmomentum = -1;
02376     //   return bestmomentum*TMath::Sin(TMath::ACos(nu.dirCosNu));
02377     // }
02378     // so I am recalculating it here.
02379 
02380     // Either means there's no track or something horrible is happening
02381     if(nu.dirCosNu < -1 || nu.dirCosNu > 1) return false;
02382 
02383     // Force use of CC0250 criteria for choosing range or curvature
02384     const float trkEn = (nu.containmentFlagCC0250Std == 1) ? nu.trkEnRange : nu.trkEnCurv;
02385     if(TMath::Abs(trkEn-nu.trkEn) > 1e-3){
02386       MAXMSG("NuCutImps", Msg::kWarning, 10)
02387         << "Recalculating trkEn for p_T because it doesn't agree with "
02388         << "containmentFlagCC0250Std. Are you using old DSTs?" << endl;
02389     }
02390 
02391     float pt = trkEn*sin(acos(nu.dirCosNu));
02392 
02393     // If transverse momentum is under 1 GeV, not a cosmic
02394     if(pt < 1)
02395       return false;
02396 
02397     // If the track comes in the bottom and stops, not a cosmic
02398     if(nu.regionTrkVtx == 1 && nu.edgeRegionTrkVtx >= 5 && nu.containedTrk)
02399       return false;
02400 
02401     // Diagonal cut in pt/angle space: accept small angle/low pt,
02402     // but accept larger pt at smaller angles.
02403     if(pt < (nu.dirCosNu - 0.5)*20)
02404       return false;
02405 
02406     // If none of those were satisfied, it's a cosmic
02407     return true;
02408   }

Bool_t NuCutImps::RAF0720Std::InFidVol ( const NuEvent nu  )  const [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 2357 of file NuCutImps.cxx.

References fCC0720Std, and NuCutImps::CC0720Std::InFidVol().

Referenced by Preselection().

02358   {
02359     //the function kind of has the wrong name for the RAFs
02360     //since you actually want the anti-fiducial events
02361     //anyway, it returns true if the events are in the CC fidvol
02362     //so when you use it you want to make sure it's NOT InFidVol
02363     //NOTE: when actually doing the analysis you have to check that each
02364     //event is !CC and !NC before actually accepting it as a RAF event
02365     return fCC0720Std.InFidVol(nu);
02366   }

Bool_t NuCutImps::RAF0720Std::IsGoodPID ( const NuEvent nu  )  [static]

Definition at line 2487 of file NuCutImps.cxx.

References NuEvent::jmID, PIDtype(), and NuEvent::roID.

Referenced by Selection(), and NuCutImps::RetroToFRAF::Selection().

02488   {
02489     // All numbers are safely away from the quantization boundaries of each
02490     // PID: multiples of 0.025
02491 
02492     Char_t whichpid = PIDtype(nu);
02493 
02494     if(whichpid == 0){ // back events
02495       return nu.jmID > 0.01 || nu.roID > 0.14;
02496     }else if(whichpid == 1){ // rock-like non-back
02497       return nu.jmID > 0.02 || nu.roID > 0.09;
02498     }else{ // detector-like
02499       return nu.jmID > 0.5 + 1/160. || nu.roID > 0.25 + 1/160.;
02500     }
02501   }

Char_t NuCutImps::RAF0720Std::PIDtype ( const NuEvent nu  )  [static]

Definition at line 2461 of file NuCutImps.cxx.

References NuCutImps::EdgeMID(), NuEvent::edgeRegionTrkVtx, NuEvent::parallelStripTrkVtx, reg, NuEvent::regionTrkVtx, and ShiftHoveStripAnswer().

Referenced by IsGoodPID().

02462   {
02463     Int_t reg = nu.regionTrkVtx; // easier to read
02464 
02465     if(reg == 16 || reg == 17 || reg == 18) // back: "fiducial", edge, coil
02466       return 0;
02467 
02468     if(reg == 4 || reg == 5 || reg == 6) // front: "fiducial", edge, coil
02469       return 1;
02470 
02471     // Use of ShiftHoveStrip here is a fairly horrible hack.  We aren't
02472     // applying shifts at this point, but we need to know the result of the
02473     // shift to know what PID cuts to use.  Is there any reasonable way
02474     // to handle the alignment systematic correctly in light of this?
02475     // It's not just a movement of events between histograms, but rather
02476     // needs the PID cut to be rerun.
02477     if(reg == 1 && EdgeMID(nu.edgeRegionTrkVtx,
02478                            ShiftHoveStripAnswer(nu),
02479                            nu.parallelStripTrkVtx) == 0) // rock-like edge
02480       return 1;
02481 
02482     return 2; // everything else is detector-like
02483   }

void NuCutImps::RAF0720Std::Preselection ( const NuEvent nu  )  [virtual]

Implements NuCut.

Definition at line 2411 of file NuCutImps.cxx.

References CosmicNonTiming(), NuCut::Cut_If(), NuCut::Defer_Preselection(), fPreselection2010, InFidVol(), NuCut::Keep_If(), NuEvent::ntrk, and NuEvent::regionTrkVtx.

02412   {
02413     //this preselection doesn't make any fiducial cuts in the FD
02414     //so it's ok to call it for the RAF events
02415     Defer_Preselection(fPreselection2010, nu);
02416 
02417     //cut the event if it's in the fiducial volume
02418     Cut_If(InFidVol(nu),"notInFidVol");
02419 
02420     // cut the event if it is in the antifiducial coil region
02421     Cut_If(nu.regionTrkVtx%4 == 2, "nearCoil");
02422 
02423     //require a track
02424     Keep_If(nu.ntrk >= 1, "GoodNumberofTracks");
02425 
02426     // Do not cut on nu.trkfitpass.  Sensitivity is better if these events are
02427     // used.  They have poor energy resolution, but so do all the rest!
02428 
02429     // Cut cosmic-like events within the spill
02430     Cut_If(RAF0720Std::CosmicNonTiming(nu), "notCosmicNonTiming");
02431   }

void NuCutImps::RAF0720Std::Selection ( const NuEvent nu  )  [virtual]

Implements NuCut.

Definition at line 2504 of file NuCutImps.cxx.

References NuCut::Cut_If(), fCC0720Std, fNC0720Std, NuCuts::IsGoodBeamTypeCC2008(), NuCuts::IsGoodCoilCurrentDirectionCC2008(), IsGoodPID(), NuCut::Keep_If(), NuCut::MakeCuts(), and NuCut::Passed().

02505   {
02506     //sanity check that we're picking up the correct beam types
02507     //also sanity checks the hornCurrent
02508     Keep_If(NuCuts::IsGoodBeamTypeCC2008(nu),
02509             "goodBeamType");
02510 
02511     //sanity check that we're picking up the correct coil current
02512     Keep_If(NuCuts::IsGoodCoilCurrentDirectionCC2008(nu),
02513             "goodCoilCurrentDirection");
02514 
02515     //make the pid cut
02516     Keep_If(IsGoodPID(nu), "pid");
02517 
02518     //to be extra sure that we're not including events twice in
02519     //the different event samples, make sure that the RAF events
02520     //are not CC or NC events
02521     fCC0720Std.MakeCuts(nu);
02522     Cut_If(fCC0720Std.Passed(),"notCC");
02523     fNC0720Std.MakeCuts(nu);
02524     Cut_If(fNC0720Std.Passed(),"notNC");
02525   }


Member Data Documentation

Definition at line 379 of file NuCutImps.h.

Referenced by InFidVol(), and Selection().

Definition at line 380 of file NuCutImps.h.

Referenced by Selection().

Definition at line 378 of file NuCutImps.h.

Referenced by Preselection().


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

Generated on 3 Dec 2018 for loon by  doxygen 1.6.1