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

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

Int_t GetRegion (const NuEvent &nu)

Protected Member Functions

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

Constructor & Destructor Documentation

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

Definition at line 713 of file NuCutImps.cxx.

References plots(), and NuCut::SetFidVol().

00713                                              :
00714     NuCut("ChairSound", plots)
00715     // fNuCutsSelection(NuCuts::kNMB0325ChairSound, plots)
00716   {
00717     SetFidVol("cc2008");
00718   }


Member Function Documentation

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

Definition at line 721 of file NuCutImps.cxx.

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

Referenced by Preselection().

00722   {
00723     // An enum for the rock detector region - this probably shouldn't go here,
00724     // but for now it will have to do (would rather use an enum than plain numbers)
00725     enum Rock_DetectorRegion {
00726       kNoTrack   = -1,
00727       kFiducial  = 0,
00728       kFront     = 1,
00729       kBack      = 2,
00730       kGap       = 3,
00731       kEdge      = 4,
00732       kCoilHole  = 5,
00733       kCorner    = 6,
00734       kUnknown   = 7
00735     };
00736   
00737     // Placeholder to avoid nesting if's in this function
00738     Bool_t inFid = false, nearFront = false, nearEdge = false;
00739     Bool_t nearGap = false, nearCoil = false, nearBack = false;
00740     Double_t radius2 = nu.xTrkVtx*nu.xTrkVtx + nu.yTrkVtx*nu.yTrkVtx;
00741     Double_t z = nu.zTrkVtx - FidVol::getTrkVtxZOffset();
00742     // Get the detector
00743     Detector::Detector_t det = (Detector::Detector_t)nu.detector;
00744   
00745     // If we are the near detector, we can't calculate the region - return unknown
00746     if (det == Detector::kNear) return kUnknown;
00747 
00748     // Now - examine each of the regions and determine if the vertex is in there
00749     // 0 = Fiducial
00750     inFid = infid((Detector::Detector_t)nu.detector, (SimFlag::SimFlag_t)nu.simFlag,
00751                   nu.xTrkVtx, nu.yTrkVtx, z);
00752     if (inFid) return kFiducial;
00753   
00754     // 1 = Front, non-edge
00755     nearFront = z < FidVol::getFarZMC(0);
00756     nearEdge = radius2 >= (FidVol::getFarRouter()*FidVol::getFarRouter());
00757     nearCoil = radius2 < FidVol::getFarRinner()*FidVol::getFarRinner();
00758   
00759     if(nearFront && !nearEdge && !nearCoil) return kFront;
00760 
00761     // 2 = Back, anywhere (no corners at back)
00762     nearBack = z > FidVol::getFarZMC(3);
00763     if(nearBack) return kBack;
00764 
00765     // 3 = Supermodule gap, non-edge
00766     nearGap = z > FidVol::getFarZMC(1) && z < FidVol::getFarZMC(2);
00767     if(nearGap && !nearEdge && !nearCoil) return kGap;
00768 
00769     // 4 = edge, non-end
00770     if(nearEdge && !nearBack && !nearFront && !nearGap) return kEdge;
00771 
00772     // 5 = coil hole, non-end
00773     if(nearCoil && !nearBack && !nearFront && !nearGap) return kCoilHole;
00774 
00775     // 6 = corner cases
00776     // No other cases have been matched, it must (?) be a corner case?
00777     return kCorner;
00778   }

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

Implements NuCut.

Definition at line 780 of file NuCutImps.cxx.

References NuEvent::coilIsOk, NuCut::Cut_If(), NuEvent::cutOnBeamInfo, NuEvent::cutOnDataQuality, GetRegion(), NuEvent::goodBeamSntp, NuEvent::isLI, NuCut::Keep_Data_If(), NuCut::Keep_If(), NuEvent::litime, MAXMSG, and NuEvent::ntrk.

00781   {
00782     // can't use CC0325Std::Preselection because it has a fiducial cut and
00783     // an overly tight angle cut.  This is copied from there except for those.
00784 
00785     Keep_If(nu.ntrk >= 1, "GoodNumberofTracks");    // Good tracks
00786     Cut_If(nu.isLI || nu.litime != -1, "LICut");    // Filter out LI events
00787     Keep_Data_If(!nu.cutOnDataQuality || nu.coilIsOk, nu, "IsCoilOkay");
00788     Keep_Data_If(nu.goodBeamSntp && nu.coilIsOk, nu,"GoodBeamDetPOT");
00789     Keep_Data_If(!nu.cutOnBeamInfo || CC0325Std::IsGoodBeam(nu),nu,"GoodBeam");
00790 
00791     // Keep only front face events that are neither near the edge nor coil hole
00792     // Keep_If(nu.regionTrkVtx == 1, "front_face");
00793     Keep_If(GetRegion(nu) == 1, "front_face");
00794 
00795     // Per-detector cuts
00796     if (nu.detector == Detector::kFar){
00797       Keep_If(nu.trkfitpass == 1, "trackfitpass");
00798       Keep_Data_If(nu.isGoodDataQuality||!nu.cutOnDataQuality,nu,"DataQuality");
00799 
00800       // [-2, 12] microseconds
00801       Keep_Data_If(NuCuts::GoodTimeToNearestSpill(nu, -2, +12) 
00802                    || !nu.cutOnSpillTiming, nu, "SpillTime");
00803       // Cosmic cut?
00804       Keep_If(TMath::Abs(nu.trkvtxdcosy) < 0.4, "CosY");
00805     }
00806     else if (nu.detector == Detector::kNear){
00807       MAXMSG("CC0325Std",Msg::kWarning, 1) << "Front face numubar selection "
00808          " called on near detector. I doubt that this works properly.\n";
00809       Keep_If(NuCuts::IsGoodTrackFitPassReclamation(nu), "trackfitreclamation");
00810       Keep_Data_If(nu.coilCurrent<-1000||!nu.cutOnDataQuality,nu,"CoilCurrent");
00811     }
00812   }

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

Implements NuCut.

Definition at line 815 of file NuCutImps.cxx.

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

00816   {
00817     // Other selectors have a Defer_Selection to CC0325Std here, but I 
00818     // don't think it makes sense here since we don't share a preselection.
00819     // However, I honestly have no clear idea what it's even supposed to do, 
00820     // so I could be wrong.
00821 
00822     Keep_If(nu.roID >= 0.25, "RoID"); // Note: >= is not the same as >
00823     Keep_If(1/nu.sigqp_qp > 3.5, "SigmaQP_QP");
00824     Keep_If(TMath::Abs(nu.relativeAngle - TMath::Pi()) > 2.08, "RelativeAngle");
00825   }


The documentation for this class was generated from the following files:
Generated on Mon Feb 15 11:10:39 2010 for loon by  doxygen 1.3.9.1