NuCutImps::RAF0720Ext Class Reference

#include <NuCutImps.h>

Inheritance diagram for NuCutImps::RAF0720Ext:
NuCut

List of all members.

Public Member Functions

 RAF0720Ext (const NuPlots *plots=0)
Char_t PIDtype (const NuEvent &nu) const
Bool_t IsGoodPID (const NuEvent &nu) const
Bool_t InFidVol (const NuEvent &nu) const
Bool_t CosmicNonTiming (const NuEvent &nu) const
void Preselection (const NuEvent &nu)
void Selection (const NuEvent &nu)

Private Attributes

Preselection2010 fPreselection2010
CC0720Std fCC0720Std
NC0720Std fNC0720Std

Detailed Description

Definition at line 385 of file NuCutImps.h.


Constructor & Destructor Documentation

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

Definition at line 2535 of file NuCutImps.cxx.

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

02535                                              :
02536     NuCut("RAF0720Ext", plots)
02537   {
02538     //Match CC fiducial volume for simplicity
02539     SetFidVol("cc2008");
02540 
02541     // Matt says: The definition of best track and track containment used for
02542     // the fiducial analysis are good enough for now.  This is worth
02543     // revisiting as there is ~>0.7% in sensitivity to be gained via
02544     // more aggressive use of range, as well as use of tracks not reconstructed
02545     // as part of any "event".
02546     SetAnaVersion(NuCuts::kCC0720Std);
02547   }


Member Function Documentation

Bool_t NuCutImps::RAF0720Ext::CosmicNonTiming ( const NuEvent nu  )  const

Definition at line 2563 of file NuCutImps.cxx.

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

Referenced by Preselection().

02564   {
02565     // This function uses the transverse momentum, but
02566     // NuReco::GetTrackTransverseMomentum looks totally broken to me:
02567     // Double_t NuReco::GetTrackTransverseMomentum(const NuEvent& nu) const {
02568     //   Double_t bestmomentum = -1;
02569     //   return bestmomentum*TMath::Sin(TMath::ACos(nu.dirCosNu));
02570     // }
02571     // so I am recalculating it here.
02572 
02573     // Either means there's no track or something horrible is happening
02574     if(nu.dirCosNu < -1 || nu.dirCosNu > 1) return false;
02575 
02576     const float trkEn = (nu.containmentFlagCC0250Std == 1) ? nu.trkEnRange : nu.trkEnCurv;
02577     if(TMath::Abs(trkEn-nu.trkEn) > 1e-3){
02578       MAXMSG("NuCutImps", Msg::kWarning, 10)
02579         << "Recalculating trkEn for p_T because it doesn't agree with "
02580         << "containmentFlagCC0250Std. Are you using old DSTs?" << endl;
02581     }
02582     float pt = trkEn*sin(acos(nu.dirCosNu));
02583 
02584     // If transverse momentum is under 1 GeV, not a cosmic
02585     if(pt < 1)
02586       return false;
02587 
02588     // If the track comes in the bottom and stops, not a cosmic
02589     if(nu.regionTrkVtx == 1 && nu.edgeRegionTrkVtx >= 5 && 
02590       nu.containmentFlagCC0250Std == 1 && nu.planeTrkEnd != 248)
02591       return false;
02592 
02593     // Diagonal cut in pt/angle space: accept small angle/low pt,
02594     // but accept larger pt at smaller angles.
02595     if(pt < (nu.dirCosNu - 0.5)*20)
02596       return false;
02597 
02598     // If none of those were satisfied, it's a cosmic
02599     return true;
02600   }

Bool_t NuCutImps::RAF0720Ext::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 2550 of file NuCutImps.cxx.

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

Referenced by Preselection().

02551   {
02552     //the function kind of has the wrong name for the RAFs
02553     //since you actually want the anti-fiducial events
02554     //anyway, it returns true if the events are in the CC fidvol
02555     //so when you use it you want to make sure it's NOT InFidVol
02556     //NOTE: when actually doing the analysis you have to check that each
02557     //event is !CC and !NC before actually accepting it as a RAF event
02558     return fCC0720Std.InFidVol(nu);
02559   }

Bool_t NuCutImps::RAF0720Ext::IsGoodPID ( const NuEvent nu  )  const

Definition at line 2653 of file NuCutImps.cxx.

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

Referenced by Selection().

02654   {
02655     // All numbers are safely away from the quantization boundaries of each
02656     // PID: multiples of 0.025
02657 
02658     Char_t whichpid = PIDtype(nu);
02659 
02660     if(whichpid == 0){ // back events
02661       return nu.jmID > 0.01 || nu.roID > 0.14;
02662     }else if(whichpid == 1){ // rock-like non-back
02663       return nu.jmID > 0.02 || nu.roID > 0.09;
02664     }else{ // detector-like
02665       return nu.jmID > 0.5 + 1/160. || nu.roID > 0.25 + 1/160.;
02666     }
02667   }

Char_t NuCutImps::RAF0720Ext::PIDtype ( const NuEvent nu  )  const

Definition at line 2627 of file NuCutImps.cxx.

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

Referenced by IsGoodPID().

02628   {
02629     Int_t reg = nu.regionTrkVtx; // easier to read
02630 
02631     if(reg == 16 || reg == 17 || reg == 18) // back: "fiducial", edge, coil
02632       return 0;
02633 
02634     if(reg == 4 || reg == 5 || reg == 6) // front: "fiducial", edge, coil
02635       return 1;
02636 
02637     // Use of ShiftHoveStrip here is a fairly horrible hack.  We aren't
02638     // applying shifts at this point, but we need to know the result of the
02639     // shift to know what PID cuts to use.  Is there any reasonable way
02640     // to handle the alignment systematic correctly in light of this?
02641     // It's not just a movement of events between histograms, but rather
02642     // needs the PID cut to be rerun.
02643     if(reg == 1 && EdgeMID(nu.edgeRegionTrkVtx,
02644                            ShiftHoveStripAnswer(nu),
02645                            nu.parallelStripTrkVtx) == 0) // rock-like edge
02646       return 1;
02647 
02648     return 2; // everything else is detector-like
02649   }

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

Implements NuCut.

Definition at line 2603 of file NuCutImps.cxx.

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

02604   {
02605     //this preselection doesn't make any fiducial cuts in the FD
02606     //so it's ok to call it for the RAF events
02607     Defer_Preselection(fPreselection2010, nu);
02608 
02609     //cut the event if it's in the fiducial volume
02610     Cut_If(InFidVol(nu),"notInFidVol");
02611 
02612     //require a track
02613     Keep_If(nu.ntrk >= 1, "GoodNumberofTracks");
02614 
02615     // Do not cut on nu.trkfitpass.  Sensitivity is better if these events are
02616     // used.  They have poor energy resolution, but so do all the rest!
02617 
02618     // Cut cosmic-like events within the spill
02619     Cut_If(RAF0720Ext::CosmicNonTiming(nu), "notCosmicNonTiming");
02620   }

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

Implements NuCut.

Definition at line 2670 of file NuCutImps.cxx.

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

02671   {
02672     //sanity check that we're picking up the correct beam types
02673     //also sanity checks the hornCurrent
02674     Keep_If(NuCuts::IsGoodBeamTypeCC2008(nu),
02675             "goodBeamType");
02676 
02677     //sanity check that we're picking up the correct coil current
02678     Keep_If(NuCuts::IsGoodCoilCurrentDirectionCC2008(nu),
02679             "goodCoilCurrentDirection");
02680 
02681     //make the pid cut
02682     Keep_If(IsGoodPID(nu), "pid");
02683 
02684     // to be extra sure that we're not including events twice in the different
02685     // event samples, make sure that the RAF events are not fiducial CC
02686     // events.  Unlike in RAF0720Std, do not require that they are not NC
02687     // events.  I have relaxed this requirement since we ended up not
02688     // using NC events in the CC analysis.  There may be overlap with the main
02689     // NC analysis still, but that is also true for RAF0720Std, since the main
02690     // NC analysis uses a rather different fiducial volume.
02691     fCC0720Std.MakeCuts(nu);
02692     Cut_If(fCC0720Std.Passed(),"notCC");
02693   }


Member Data Documentation

Definition at line 400 of file NuCutImps.h.

Referenced by InFidVol(), and Selection().

Definition at line 401 of file NuCutImps.h.

Definition at line 399 of file NuCutImps.h.

Referenced by Preselection().


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

Generated on 24 Jul 2018 for loon by  doxygen 1.6.1