NCAnalysisCutsNC Class Reference

Cuts for the neutral current analysis. More...

#include <NCAnalysisCutsNC.h>

Inheritance diagram for NCAnalysisCutsNC:
NCAnalysisCuts NCAnalysisCutsNCCCFid

List of all members.

Public Member Functions

 NCAnalysisCutsNC ()
virtual ~NCAnalysisCutsNC ()
virtual bool IsGoodBeamEvent ()
virtual bool IsStoppingBeamMuon ()
virtual bool InBeamFiducialVolume ()
virtual bool PassesFinalSelection ()
virtual bool PassesFinalSelection (ANtpRecoInfo *recoInfo)

Protected Member Functions

bool InFiducialVolumeTrue ()
bool IsFibreNoiseInSpillOx ()
bool IsCosmicInSpillOx ()
bool IsLIInSpillOx ()

Detailed Description

Cuts for the neutral current analysis.

Definition at line 17 of file NCAnalysisCutsNC.h.


Constructor & Destructor Documentation

NCAnalysisCutsNC::NCAnalysisCutsNC (  ) 

Definition at line 38 of file NCAnalysisCutsNC.cxx.

00038                                    :
00039   NCAnalysisCuts()
00040 {
00041 }

NCAnalysisCutsNC::~NCAnalysisCutsNC (  )  [virtual]

Definition at line 44 of file NCAnalysisCutsNC.cxx.

00045 {
00046 }


Member Function Documentation

bool NCAnalysisCutsNC::InBeamFiducialVolume (  )  [virtual]

Implements NCAnalysisCuts.

Reimplemented in NCAnalysisCutsNCCCFid.

Definition at line 160 of file NCAnalysisCutsNC.cxx.

References ANtpHeaderInfo::detector, NCEventInfo::event, NCAnalysisCuts::fEventInfo, NCEventInfo::header, Detector::kFar, Detector::kNear, NCType::kTrackVtxAdjustment, Munits::m, ANtpShowerInfo::planes, ANtpTrackInfo::planes, NCEventInfo::shower, NCEventInfo::track, ANtpEventInfo::tracks, ANtpEventInfo::vtxMetersToCloseEdge, ANtpTrackInfo::vtxMetersToCloseEdge, ANtpEventInfo::vtxMetersToCoil, ANtpTrackInfo::vtxMetersToCoil, ANtpEventInfo::vtxZ, and ANtpTrackInfo::vtxZ.

Referenced by PassesFinalSelection().

00161 {
00162   // only in FD FidVol if at FD
00163   if (fEventInfo.header->detector  == (int)Detector::kFar){
00164 
00165     // Get distance to edge, distance to center & vertex z.
00166     // Use track if available and longer than the shower
00167     // RPL 16/11/06: Adjust track vertices to be consistent with event
00168     // vertices, see MINOS-doc-2409
00169 
00170     Float_t dist_edge(fEventInfo.event->vtxMetersToCloseEdge);
00171     Float_t dist_coil(fEventInfo.event->vtxMetersToCoil);
00172     Float_t vtxZ(fEventInfo.event->vtxZ);
00173     if ( (fEventInfo.event->tracks > 0)
00174          && ( (fEventInfo.track->planes - fEventInfo.shower->planes)>0)) {
00175       dist_edge = fEventInfo.track->vtxMetersToCloseEdge;
00176       dist_coil = fEventInfo.track->vtxMetersToCoil;
00177       vtxZ = fEventInfo.track->vtxZ - NCType::kTrackVtxAdjustment;
00178     }
00179 
00180     // RPL 16/11/06 Adjust cut values by -3.92 cm to be constent with
00181     // vertex definition.
00182 
00183     // Longitudinal cuts: > 4 Scint planes from SM fronts...
00184     //  \-> vZ > 0.2328m (SM1),  vZ > 16.1408m (SM2)
00185     // ...and >1m from SM ends...
00186     //  \-> vZ < 13.6208m (SM1),  vZ < 28.8608m (SM2)
00187     // ...adjusted (tightened) to be at center of an air gap
00188     //RP Actually moving the cuts into airgaps (and adding 2 planes at the back for dogwood) 
00189     //despite the above claim
00190     
00191     if ( vtxZ < 0.21 * Munits::m || vtxZ > 28.96 * Munits::m ) return false;
00192     if ( vtxZ > 13.72 * Munits::m && vtxZ < 16.12 * Munits::m ) return false;
00193 
00194     // Transverse cuts: 50cm from edge => 7m (edge2edge) octagon
00195     // if ( dist_edge < 0.5 * Munits::m ) return false; //cedar
00196     if ( dist_edge < 0.4 * Munits::m ) return false; // dogwood
00197 
00198     // Coil hole cut: > 0.45m radius around center 
00199     // if ( dist_coil < 0.45 * Munits::m ) return false; //cedar
00200     if ( dist_coil < 0.6 * Munits::m ) return false; //dogwood
00201   } //end if far
00202 
00203   //only in ND FidVol if at ND
00204   else if(fEventInfo.header->detector  == (int)Detector::kNear){
00205 
00206     //Get distance to edge & vertex z.
00207     // Use track if available and longer than the shower
00208     // RPL 08/03/07: Adjust track vertices to be consistent with event
00209     // vertices, as in FD. see MINOS-doc-2409
00210     Float_t dist_edge(fEventInfo.event->vtxMetersToCloseEdge);
00211     Float_t vtxZ(fEventInfo.event->vtxZ);
00212     if ( (fEventInfo.event->tracks > 0)
00213          && ( (fEventInfo.track->planes - fEventInfo.shower->planes)>0) ) {
00214       dist_edge = fEventInfo.track->vtxMetersToCloseEdge;
00215       vtxZ = fEventInfo.track->vtxZ - NCType::kTrackVtxAdjustment;
00216     }
00217 
00218     // Longitudinal cuts: slightly smaller than golden region,
00219     // to reduce # of showers getting into the spectrometer
00220     // Start  1/2 way between reco planes 30 & 31
00221     // Finish 1/2 way between reco planes 80 & 81
00222     if ( vtxZ > 4.7368 * Munits::m || vtxZ < 1.7 * Munits::m ) return false;
00223 
00224     // Transverse cuts:
00225     // Use a Detector-oriented set of cuts, since beam oriented cuts
00226     // are only apropriate for much smaller fiducial regions
00227     if ( dist_edge < 0.5 * Munits::m ) return false;
00228 
00229     //No coil hole cut since transvers cuts are based on partial plane
00230   }// end if near
00231 
00232   // All cuts were passed.
00233   return true;
00234 }

bool NCAnalysisCutsNC::InFiducialVolumeTrue (  )  [protected]

Definition at line 237 of file NCAnalysisCutsNC.cxx.

References det, ANtpHeaderInfo::detector, PlaneOutline::DistanceToOuterEdge(), NCAnalysisCuts::fEventInfo, NCEventInfo::header, PlaneOutline::IsInside(), PlaneCoverage::kComplete, Detector::kFar, Detector::kNear, PlaneCoverage::kNearPartial, PlaneView::kU, PlaneView::kV, Munits::m, Munits::m2, ANtpTruthInfo::nuVtxX, ANtpTruthInfo::nuVtxY, ANtpTruthInfo::nuVtxZ, and NCEventInfo::truth.

00238 {
00239   Detector::Detector_t det = Detector::kFar;
00240   PlaneCoverage::PlaneCoverage_t outline = PlaneCoverage::kComplete;
00241   if(fEventInfo.header->detector == (int)Detector::kNear){
00242     det = Detector::kNear;
00243     outline = PlaneCoverage::kNearPartial;
00244   }
00245 
00246   PlaneOutline po;
00247   float distU = 0.;
00248   float distV = 0.;
00249   float xedge = 0.;
00250   float yedge = 0.;
00251   float x = fEventInfo.truth->nuVtxX;
00252   float y = fEventInfo.truth->nuVtxY;
00253   float z = fEventInfo.truth->nuVtxZ;
00254 
00255   po.DistanceToOuterEdge(x, y, PlaneView::kU, 
00256                          outline, distU, xedge, yedge);
00257   po.DistanceToOuterEdge(x, y, PlaneView::kV, 
00258                          outline, distV, xedge, yedge);
00259 
00260   bool insideU = false;
00261 
00262   if ( outline != PlaneCoverage::kNearPartial ) {
00263     // circle of radius 1/sqrt(2) will enclose the coilHole, 
00264     // but is itself enclosed by the outer edges
00265     insideU = ( (x*x + y*y) < 0.5 * Munits::m2 );
00266     //cout << "X: " << x << ";   Y: " 
00267     //     << y << ";   inside:" << insideU << endl;
00268   }
00269     
00270   bool insideV = insideU;
00271   if ( !insideU ){ 
00272     insideU = po.IsInside(x, y, PlaneView::kU, outline);
00273     insideV = po.IsInside(x, y, PlaneView::kV, outline);
00274   }
00275   distU *= ( insideU ? 1. : -1. );
00276   distV *= ( insideV ? 1. : -1. );
00277 
00278   float vtxMetersToCloseEdge = 0.5*(distU + distV);
00279   float vtxMetersToCoil = TMath::Sqrt(x*x + y*y);
00280 
00281   //based on oxford fiducial volume.
00282   // only in FD FidVol if at FD  
00283   if(det == Detector::kFar){
00284     
00285     // Longitudinal cuts: > 4 Scint planes from SM fronts...
00286     //  \-> vZ > 0.2328m (SM1),  vZ > 16.1408m (SM2)
00287     // ...and >1m from SM ends...
00288     //  \-> vZ < 13.6208m (SM1),  vZ < 28.8608m (SM2)
00289     // ...adjusted (tightened) to be at center of an air gap
00290     // decrease end of SM by ~2 planes
00291     if ( z < 0.2328*Munits::m || z > (28.8608+0.119) * Munits::m ) return false;
00292     if ( z > (13.6208+0.119)*Munits::m && z < 16.1408 * Munits::m ) return false;
00293     
00294     // Transverse cuts: 50cm from edge => 7m (edge2edge) octagon 
00295 //    if ( vtxMetersToCloseEdge < 0.5 * Munits::m ) return false;
00296     if ( vtxMetersToCloseEdge < 0.4 * Munits::m ) return false;
00297     
00298     // Coil hole cut: > 0.45m radius around center
00299 //    if ( vtxMetersToCoil < 0.45 * Munits::m ) return false; 
00300     if ( vtxMetersToCoil < 0.6 * Munits::m ) return false; 
00301   } //end if far
00302   
00303   //only in ND FidVol if at ND  
00304   else if(det == Detector::kNear){
00305       
00306     // Longitudinal cuts: slightly smaller than golden region,
00307     // to reduce # of showers getting into the spectrometer
00308     // Start  1/2 way between reco planes 30 & 31
00309     // Finish 1/2 way between reco planes 80 & 81
00310     if ( z > 4.7368 * Munits::m || z < 1.728 * Munits::m ) return false;
00311     
00312     // Transverse cuts:
00313     // Use a Detector-oriented set of cuts, since beam oriented cuts 
00314     // are only apropriate for much smaller fiducial regions
00315     if ( vtxMetersToCloseEdge < 0.5 * Munits::m ) return false;
00316     
00317     //No coil hole cut since transvers cuts are based on partial plane    
00318   }// end if near
00319   
00320   return true;
00321 }

bool NCAnalysisCutsNC::IsCosmicInSpillOx (  )  [protected]

Definition at line 370 of file NCAnalysisCutsNC.cxx.

References ANtpTrackInfo::dcosYVtx, ANtpTrackInfo::dcosZVtx, ANtpTrackInfoNC::dtdz, ANtpTrackInfo::endMetersToCloseEdge, ANtpTrackInfo::endY, ANtpTrackInfo::endZ, NCEventInfo::event, NCAnalysisCuts::fEventInfo, ANtpEventInfo::planes, NCEventInfo::shower, ANtpEventInfo::showers, SQR, ANtpEventInfo::totalStrips, NCEventInfo::track, ANtpEventInfo::tracks, ANtpShowerInfoNC::transverseRMSU, and ANtpShowerInfoNC::transverseRMSV.

Referenced by IsGoodBeamEvent().

00371 {
00372   //Ultra-steep showers
00373   Float_t strips_f(fEventInfo.event->totalStrips);
00374   Float_t planes_f(fEventInfo.event->planes);
00375   if ( planes_f == 0.0 || strips_f/(planes_f*planes_f) >= 1 ) return true;
00376 
00377 
00378   //Steep showers
00379   if ( fEventInfo.event->showers > 0 ){
00380     Float_t tRMS2 = SQR(fEventInfo.shower->transverseRMSU);
00381     tRMS2          += SQR(fEventInfo.shower->transverseRMSV);
00382     Float_t tRMS = TMath::Sqrt( tRMS2 );
00383     if ( ( 0.3 + 0.1901*TMath::Log10(planes_f) ) < tRMS ) return true;
00384   } //event.showers > 0
00385 
00386 
00387   if ( fEventInfo.event->tracks > 0 ){
00388     //Track angle
00389     if ( fEventInfo.track->dcosZVtx < 0.4 ) return true;
00390 
00391     //Stopping muons
00392     Bool_t upExitTrack(false);
00393     if ( ( fEventInfo.track->endZ > 28.78
00394            || fEventInfo.track->endMetersToCloseEdge < 0.5 )
00395          && fEventInfo.track->endY > -1.657 ) upExitTrack = true;
00396 
00397     if ( upExitTrack
00398          && fEventInfo.track->dtdz < -0.5
00399          && -fEventInfo.track->dcosYVtx < -0.4 ) return true;
00400 
00401   } // event.tracks > 0
00402 
00403   // Got here => is not a cosmic.
00404   return false;
00405 }

bool NCAnalysisCutsNC::IsFibreNoiseInSpillOx (  )  [protected]

Definition at line 338 of file NCAnalysisCutsNC.cxx.

References NCEventInfo::event, NCAnalysisCuts::fEventInfo, NCAnalysisCuts::GetReleaseType(), ReleaseType::IsBirch(), ReleaseType::IsCedar(), ANtpEventInfo::pulseHeight, and ANtpEventInfo::totalStrips.

Referenced by IsGoodBeamEvent().

00339 {
00340   ReleaseType::Release_t softType(GetReleaseType());
00341 
00342   // New cuts based on dogwood data
00343   if(ReleaseType::IsCedar(softType))
00344     {
00345       
00346       if(fEventInfo.event->pulseHeight < 2500 &&
00347          fEventInfo.event->totalStrips <= 8) return true;
00348       
00349       //Expand the cut area in chopped data
00350       //      ReleaseType::Release_t softType(GetReleaseType());
00351       if(!ReleaseType::IsBirch(softType))
00352       {
00353         if(fEventInfo.event->pulseHeight < 5000 &&
00354            fEventInfo.event->totalStrips <= 4) return true;
00355       }
00356     }
00357   else
00358     {
00359       if(fEventInfo.event->pulseHeight < 3750 &&
00360          fEventInfo.event->totalStrips <= 8) return true;
00361       if(fEventInfo.event->pulseHeight < 2000 &&
00362          fEventInfo.event->totalStrips > 8) return true;
00363 
00364     }
00365   return false;
00366 }

bool NCAnalysisCutsNC::IsGoodBeamEvent (  )  [virtual]

Implements NCAnalysisCuts.

Reimplemented in NCAnalysisCutsNCCCFid.

Definition at line 49 of file NCAnalysisCutsNC.cxx.

References NCEventInfo::beam, ANtpHeaderInfo::detector, NCEventInfo::event, ANtpHeaderInfo::events, NCAnalysisCuts::fEventInfo, NCAnalysisCuts::GetReleaseType(), NCEventInfo::header, IsCosmicInSpillOx(), IsFibreNoiseInSpillOx(), IsLIInSpillOx(), ReleaseType::IsMC(), isMC, Detector::kNear, Munits::microsecond, ANtpBeamInfo::nearestNSToSpill, Munits::ns, ANtpEventInfo::pulseHeight, Munits::s, ANtpHeaderInfo::snarlPulseHeight, and ANtpEventInfoNC::stripTime1st.

00050 {
00051   // Note: Fiducial cut is done seperatly, but data will not be 
00052   // clean without it
00053 
00054   // Find out if this is MC or data, and the software versions
00055   ReleaseType::Release_t softType( NCAnalysisCuts::GetReleaseType() );
00056   Bool_t isMC( ReleaseType::IsMC(softType) );
00057 
00058   //near detector cleaning is done in the filling of the uDST
00059   //by a separate call to IsCleanHighMultSnarl
00060   if ( fEventInfo.header->detector == Detector::kNear ) return true;
00061 
00062   /*
00063   if ( ReleaseType::IsBirch(softType) ){  
00064     // R1.18.2 style mainEvt cut done here. 
00065     // Need to tweak MC to fix the lack of noise problem. Not ideal.
00066     // (Note: to be consistent we should technically tweak the snarlPE
00067     // variable as well, to adjust the LI PE cut but the effect on the
00068     // efficiency there is negligble)
00069     UInt_t tweakedEvents(0);
00070     Double_t tweakedPH(0.);
00071     if ( isMC )  NCAnalysisCuts::RollBirchMCSnarlNoise(tweakedEvents, tweakedPH);
00072     
00073     // `overlay' (...after a fashion...)  the event onto the noise.
00074     tweakedEvents += fEventInfo.header->events;
00075     tweakedPH += fEventInfo.header->snarlPulseHeight;
00076     
00077     // now do mainEvt cut. also remove zero (real) event snarls
00078     if (fEventInfo.header->events == 0) return false;
00079     if ( ( tweakedEvents == 2 
00080            && tweakedPH - fEventInfo.event->pulseHeight > 1e4 )
00081          || tweakedEvents > 2 ) return false;  
00082     // [now wash your hands]
00083     
00084   }  // if (birch/R1.18.2)
00085   else*/ {
00086     //Cedar Style mainevt cut  also remove 0 event snarls.
00087     if (fEventInfo.header->events == 0) return false;
00088     //check for div by 0. hould'nt happen with >0 evt snarls, but hey. 
00089     if (fEventInfo.header->snarlPulseHeight==0.)  return false;
00090     Float_t evtPHfrac(fEventInfo.event->pulseHeight
00091                       / fEventInfo.header->snarlPulseHeight);
00092     if ( ( fEventInfo.header->events == 2 && evtPHfrac < 0.75)
00093          || fEventInfo.header->events > 2 ) return false;
00094   }  // if ( !birch )
00095     
00096   // Normal background cuts
00097   if(IsCosmicInSpillOx()) return false;
00098 
00099   if(IsFibreNoiseInSpillOx()) return false;
00100 
00101   if(IsLIInSpillOx()) return false;
00102   
00103   // Timing cut. Data only
00104   if(!isMC){
00105     double dt_spill = fEventInfo.event->stripTime1st * Munits::s;
00106     dt_spill -= fEventInfo.beam->nearestNSToSpill * Munits::ns;
00107     
00108     if ( dt_spill < -2. * Munits::microsecond 
00109          || dt_spill > 12. * Munits::microsecond ){
00110       return false;
00111     } 
00112   }
00113 
00114   // Survived all cuts
00115   return true;
00116 }

bool NCAnalysisCutsNC::IsLIInSpillOx (  )  [protected]

Definition at line 408 of file NCAnalysisCutsNC.cxx.

References NCAnalysisCuts::fEventInfo, NCAnalysisCuts::GetReleaseType(), NCEventInfo::header, ReleaseType::IsCedar(), ANtpHeaderInfo::isLI, ANtpHeaderInfo::isLIold, and ANtpHeaderInfo::triggerPMTTime.

Referenced by IsGoodBeamEvent().

00409 {
00410   //RPL 11/07/07:
00411   // removed snarlPE > 8000 cut as it is not really necessary.
00412   ReleaseType::Release_t softType(GetReleaseType());
00413 
00414   // New cuts based on dogwood data
00415   if(ReleaseType::IsCedar(softType))
00416    {
00417       return fEventInfo.header->isLIold || fEventInfo.header->triggerPMTTime > 0;
00418     }
00419    else // new cuts based on dogwood
00420     {
00421        return fEventInfo.header->isLI || fEventInfo.header->triggerPMTTime > 0;
00422     }
00423 }

bool NCAnalysisCutsNC::IsStoppingBeamMuon (  )  [virtual]

Implements NCAnalysisCuts.

Reimplemented in NCAnalysisCutsNCCCFid.

Definition at line 119 of file NCAnalysisCutsNC.cxx.

References ANtpHeaderInfo::detector, ANtpTrackInfo::endX, ANtpTrackInfo::endY, ANtpTrackInfo::endZ, NCAnalysisCuts::fEventInfo, NCEventInfo::header, Detector::kFar, Detector::kNear, ANtpTrackInfo::traceEndZ, and NCEventInfo::track.

00120 {
00121   bool stoppingMuon = false;
00122 
00123   bool endZOK = false;
00124   bool xyOK = false;
00125 
00126   if(fEventInfo.header->detector==(int)Detector::kFar){
00127     if((fEventInfo.track->endZ > 0.5
00128         && fEventInfo.track->endZ < 12.)
00129        || (fEventInfo.track->endZ > 16.5
00130            && fEventInfo.track->endZ < 28.))
00131       endZOK = true;
00132 
00133     if(TMath::Sqrt(fEventInfo.track->endX*fEventInfo.track->endX
00134                    +fEventInfo.track->endY*fEventInfo.track->endY) < 3.5)
00135       xyOK = true;
00136 
00137     if(TMath::Abs(fEventInfo.track->traceEndZ) > 0.5 && xyOK && endZOK)
00138       stoppingMuon = true;
00139   }
00140   else if(fEventInfo.header->detector==(int)Detector::kNear){
00141 
00142     //see position paper on ND flux by Kordosky and Dorman in DocDB for
00143     //definition of the fiducial volume
00144 
00145     double u = TMath::Sqrt(0.5)*(fEventInfo.track->endX+fEventInfo.track->endY);
00146     double v = TMath::Sqrt(0.5)*(fEventInfo.track->endY-fEventInfo.track->endX);
00147 
00148     if(0.3 < u && u < 1.8
00149        && -1.8 < v && v < -0.3
00150        && fEventInfo.track->endX < 2.4
00151        && TMath::Sqrt(u*u + v*v) > 0.8
00152        && fEventInfo.track->endZ < 15. ) stoppingMuon = true;
00153 
00154   }
00155 
00156   return stoppingMuon;
00157 }

bool NCAnalysisCutsNC::PassesFinalSelection ( ANtpRecoInfo recoInfo  )  [virtual]

Implements NCAnalysisCuts.

Reimplemented in NCAnalysisCutsNCCCFid.

Definition at line 331 of file NCAnalysisCutsNC.cxx.

References ANtpRecoInfo::inFiducialVolume.

00332 {
00333   if(recoInfo->inFiducialVolume < 1)  return false;
00334   return true;
00335 }

bool NCAnalysisCutsNC::PassesFinalSelection (  )  [virtual]

Implements NCAnalysisCuts.

Reimplemented in NCAnalysisCutsNCCCFid.

Definition at line 324 of file NCAnalysisCutsNC.cxx.

References InBeamFiducialVolume().

00325 {
00326   if(!InBeamFiducialVolume()) return false;
00327   return true;
00328 }


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

Generated on 22 Nov 2017 for loon by  doxygen 1.6.1