NCAnalysisCutsCC Class Reference

Cuts from the CC analysis. More...

#include <NCAnalysisCutsCC.h>

Inheritance diagram for NCAnalysisCutsCC:
NCAnalysisCuts NCAnalysisCutsNCCCFid

List of all members.

Public Member Functions

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

Private Member Functions

bool IsFarDetectorBeamEvent ()
bool TrackInBeamDirection ()
bool ShowerInBeamDirection ()

Detailed Description

Cuts from the CC analysis.

Definition at line 17 of file NCAnalysisCutsCC.h.


Constructor & Destructor Documentation

NCAnalysisCutsCC::NCAnalysisCutsCC (  ) 

Definition at line 38 of file NCAnalysisCutsCC.cxx.

00038                                    :
00039   NCAnalysisCuts()
00040 {
00041   return;
00042 }

NCAnalysisCutsCC::~NCAnalysisCutsCC (  )  [virtual]

Definition at line 45 of file NCAnalysisCutsCC.cxx.

00046 {
00047   return;
00048 }


Member Function Documentation

bool NCAnalysisCutsCC::InBeamFiducialVolume (  )  [virtual]

Implements NCAnalysisCuts.

Reimplemented in NCAnalysisCutsNCCCFid.

Definition at line 202 of file NCAnalysisCutsCC.cxx.

References ANtpHeaderInfo::detector, NCEventInfo::event, NCAnalysisCuts::fEventInfo, NCEventInfo::header, Msg::kDebug, Detector::kFar, Detector::kNear, MAXMSG, SQR, NCEventInfo::track, ANtpEventInfo::tracks, ANtpEventInfo::vtxX, ANtpTrackInfo::vtxX, ANtpEventInfo::vtxY, ANtpTrackInfo::vtxY, ANtpEventInfo::vtxZ, and ANtpTrackInfo::vtxZ.

00203 {
00204   bool inFiducialVolume = true;
00205 
00206   double vtxX = 0.;
00207   double vtxY = 0.;
00208   double vtxZ = 0.;
00209 
00210  if(fEventInfo.event->tracks > 0){
00211   vtxX = fEventInfo.track->vtxX;
00212   vtxY = fEventInfo.track->vtxY;
00213   vtxZ = fEventInfo.track->vtxZ;
00214  }
00215  else{
00216    vtxX = fEventInfo.event->vtxX;
00217    vtxY = fEventInfo.event->vtxY;
00218    vtxZ = fEventInfo.event->vtxZ;
00219  }
00220 
00221   //cuts made for selecting far detector CC events based on docdb #1466
00222   if(fEventInfo.header->detector == (int)Detector::kFar){
00223     if(SQR(vtxX) + SQR(vtxY) > 14.
00224        || vtxZ < 0.5
00225        || (vtxZ > 14.3 && vtxZ < 16.2)
00226        || vtxZ > 28.)
00227       inFiducialVolume = false;
00228   }
00229   else if(fEventInfo.header->detector == (int)Detector::kNear){
00230 
00231     double x = vtxX;
00232     double y = vtxY;
00233 
00234     double fBeamCenterX = 1.4885;
00235     double fBeamCenterY = 0.1397;
00236     x -= fBeamCenterX;
00237     y -= fBeamCenterY;
00238 
00239     if(vtxZ <= 1.
00240        || vtxZ >= 5.
00241        || x*x + y*y >= 1.)
00242       inFiducialVolume = false;
00243 
00244   }
00245 
00246   MAXMSG("NCAnalysisCutsCC", Msg::kDebug, 20) << vtxX << " " << vtxY
00247                                            << " " << vtxZ << endl;
00248 
00249   return inFiducialVolume;
00250 }

bool NCAnalysisCutsCC::IsFarDetectorBeamEvent (  )  [private]

Definition at line 83 of file NCAnalysisCutsCC.cxx.

References NCEventInfo::beam, ANtpEventInfo::begPlane, ANtpHeaderInfo::dataType, MuELoss::e, ANtpEventInfo::endPlane, NCEventInfo::event, NCAnalysisCuts::fEventInfo, NCEventInfo::header, Msg::kDebug, SimFlag::kMC, ANtpEventInfoNC::largestEventInSnarl, MAXMSG, ANtpBeamInfo::nearestNSToSpill, ANtpEventInfo::pulseHeight, ANtpEventInfo::showers, ANtpEventInfoNC::stripTime1st, ANtpBeamInfo::timeToNearestSpill, ANtpHeaderInfo::triggerPMTTime, and ANtpHeaderInfo::triggerTime.

Referenced by IsGoodBeamEvent().

00084 {
00085   bool goodEvent = true;
00086 
00087   if(fEventInfo.header->dataType == (int)SimFlag::kMC)
00088     fEventInfo.header->triggerPMTTime = -1.;
00089   
00090   bool liEvent = false;
00091   bool onCrateBoundary = false;
00092   double eventTime = 0.;
00093   
00094   //is the event starting or stopping on a crate boundary?
00095   if( (fEventInfo.event->begPlane < 3 && fEventInfo.event->endPlane > 62
00096        && fEventInfo.event->endPlane < 65)
00097       || (fEventInfo.event->begPlane > 64 && fEventInfo.event->begPlane < 67
00098           && fEventInfo.event->endPlane > 126 && fEventInfo.event->endPlane < 129)
00099       || (fEventInfo.event->begPlane > 128 && fEventInfo.event->begPlane < 131
00100           && fEventInfo.event->endPlane > 190 && fEventInfo.event->endPlane < 193)
00101       || (fEventInfo.event->begPlane > 192 && fEventInfo.event->begPlane < 195
00102           && fEventInfo.event->endPlane > 246 && fEventInfo.event->endPlane < 249)
00103       || (fEventInfo.event->begPlane > 248 && fEventInfo.event->begPlane < 252
00104           && fEventInfo.event->endPlane > 311 && fEventInfo.event->endPlane < 314)
00105       || (fEventInfo.event->begPlane > 313 && fEventInfo.event->begPlane < 316
00106           && fEventInfo.event->endPlane > 375 && fEventInfo.event->endPlane < 378)
00107       || (fEventInfo.event->begPlane > 377 && fEventInfo.event->begPlane < 380
00108           && fEventInfo.event->endPlane > 439 && fEventInfo.event->endPlane < 442)
00109       || (fEventInfo.event->begPlane > 441 && fEventInfo.event->begPlane < 444
00110           && fEventInfo.event->endPlane > 483)
00111       ) onCrateBoundary = true;
00112   
00113   //*********Should change this to use the isLI in the ANtpHeaderInfo object
00114 
00115   if(fEventInfo.header->triggerPMTTime > 0.
00116      || (fEventInfo.event->showers > 0 && fEventInfo.event->pulseHeight > 1.e6)
00117      || onCrateBoundary
00118      )
00119     liEvent = true;
00120     
00121   //find the difference between the spill server prediction and the
00122   //time of the event.
00123   
00124   //time of the event is defined to be NtpEvenSummarySR->trigtime
00125   //and is earliest recorded hit in the event
00126   eventTime = fEventInfo.event->stripTime1st;
00127   if(fEventInfo.header->dataType == (int)SimFlag::kMC){
00128     eventTime = 0.;
00129     fEventInfo.beam->nearestNSToSpill = 0;
00130   }
00131   
00132   //beamInfo->nearestNSToSpill is the difference in ns between
00133   //the spill time and the start of the snarl
00134   if(1.e-9*fEventInfo.beam->nearestNSToSpill - eventTime < -20.e-6
00135      || 1.e-9*fEventInfo.beam->nearestNSToSpill - eventTime > 30.e-6
00136      || liEvent
00137      || fEventInfo.event->largestEventInSnarl < 1
00138      )
00139     goodEvent = false;
00140   
00141   MAXMSG("NCAnalysisCutsCC", Msg::kDebug, 20) 
00142     << fEventInfo.event->stripTime1st
00143     << " " << fEventInfo.header->triggerTime
00144     << " " << fEventInfo.beam->timeToNearestSpill
00145     << " " << eventTime
00146     << " " << liEvent
00147     << " " << fEventInfo.event->largestEventInSnarl
00148     << " " << goodEvent
00149     << endl;
00150 
00151 
00152   return goodEvent;
00153 }

bool NCAnalysisCutsCC::IsGoodBeamEvent (  )  [virtual]

Implements NCAnalysisCuts.

Reimplemented in NCAnalysisCutsNCCCFid.

Definition at line 51 of file NCAnalysisCutsCC.cxx.

References ANtpTrackInfo::begPlaneU, ANtpTrackInfo::begPlaneV, ANtpHeaderInfo::detector, ANtpTrackInfo::endPlane, ANtpTrackInfo::endPlaneU, ANtpTrackInfo::endPlaneV, NCEventInfo::event, NCAnalysisCuts::fEventInfo, NCEventInfo::header, IsFarDetectorBeamEvent(), Msg::kDebug, Detector::kFar, Detector::kNear, MSG, ANtpTrackInfo::passedFit, NCEventInfo::track, TrackInBeamDirection(), and ANtpEventInfo::tracks.

00052 {
00053   MSG("NCAnalysisCutsCC", Msg::kDebug) << "IsGoodBeamEventCC" << endl;
00054 
00055   bool goodEvent = true;
00056   bool recovered = false;
00057 
00058   //recover events that fail the passedFit cut
00059   if(fEventInfo.header->detector==(int)Detector::kNear
00060      && fEventInfo.track->passedFit < 1
00061      && TMath::Abs(fEventInfo.track->begPlaneU - fEventInfo.track->begPlaneV) < 6
00062      && TMath::Abs(fEventInfo.track->endPlaneU - fEventInfo.track->endPlaneV) < 41
00063      && fEventInfo.track->endPlane < 270
00064      )
00065     recovered = true;
00066 
00067   if(fEventInfo.event->tracks < 1
00068      || (fEventInfo.track->passedFit < 1 && !recovered)
00069      ) 
00070     goodEvent = false;
00071 
00072   if(goodEvent && fEventInfo.header->detector==(int)Detector::kFar){
00073 
00074     if(!IsFarDetectorBeamEvent() || !TrackInBeamDirection())
00075       goodEvent = false;
00076 
00077   }
00078 
00079   return goodEvent;
00080 }

bool NCAnalysisCutsCC::IsStoppingBeamMuon (  )  [virtual]

Implements NCAnalysisCuts.

Reimplemented in NCAnalysisCutsNCCCFid.

Definition at line 177 of file NCAnalysisCutsCC.cxx.

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

00178 {
00179   bool stoppingMuon = false;
00180 
00181   if(fEventInfo.header->detector == int(Detector::kNear)
00182      && fEventInfo.track->endZ < 16.
00183      && TMath::Sqrt(SQR(fEventInfo.track->endX)
00184                     +SQR(fEventInfo.track->endY)) > 0.4
00185      && fEventInfo.track->endX < 2.7 && fEventInfo.track->endX > -1.65
00186      && fEventInfo.track->endY < 1.65 && fEventInfo.track->endY > -1.65
00187      && fEventInfo.track->endY > -1.*(fEventInfo.track->endX + 1.65)
00188      && fEventInfo.track->endY < fEventInfo.track->endX + 1.65
00189      && fEventInfo.track->endY < 3.55 - fEventInfo.track->endX
00190      && fEventInfo.track->endY > fEventInfo.track->endX - 3.55
00191      )
00192     stoppingMuon = true;
00193   else if(fEventInfo.header->detector == (int)Detector::kFar
00194           && fEventInfo.track->endZ > 0.5 && fEventInfo.track->endZ < 29.5
00195           && fEventInfo.track->endMetersToCloseEdge > 0.5)
00196     stoppingMuon = true;
00197 
00198   return stoppingMuon;
00199 }

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

Implements NCAnalysisCuts.

Reimplemented in NCAnalysisCutsNCCCFid.

Definition at line 253 of file NCAnalysisCutsCC.cxx.

References NCAnalysisCuts::fEventInfo, ANtpTrackInfo::fitMomentum, ANtpRecoInfo::inFiducialVolume, and NCEventInfo::track.

00254 {
00255   //throw out events that are not in the fiducial volume
00256   return recoInfo->inFiducialVolume >= 1 && fEventInfo.track->fitMomentum <= 0;
00257 }

bool NCAnalysisCutsCC::PassesFinalSelection (  )  [virtual]

Implements NCAnalysisCuts.

Reimplemented in NCAnalysisCutsNCCCFid.

Definition at line 260 of file NCAnalysisCutsCC.cxx.

00261 {
00262   return true;
00263 }

bool NCAnalysisCutsCC::ShowerInBeamDirection (  )  [private]
bool NCAnalysisCutsCC::TrackInBeamDirection (  )  [private]

Definition at line 156 of file NCAnalysisCutsCC.cxx.

References ANtpTrackInfo::dcosYVtx, ANtpTrackInfo::dcosZVtx, NCAnalysisCuts::fEventInfo, and NCEventInfo::track.

Referenced by IsGoodBeamEvent().

00157 {
00158   bool goodDirection = true;
00159 
00160   //setup NEAR angle - currently not used for near detector
00161   double beamDCosY = TMath::Cos(0.0575958653+TMath::Pi()*0.5);
00162   double beamDCosZ = TMath::Sqrt(1. - beamDCosY*beamDCosY);
00163 
00164   //setup FAR angle
00165   // use 3 degrees upward in far det since that is what David is using
00166   // the real number is more like 3.27 degrees
00167   beamDCosY = TMath::Cos(-0.052359877+TMath::Pi()*0.5);
00168   beamDCosZ = TMath::Sqrt(1. - beamDCosY*beamDCosY);
00169   
00170   if(fEventInfo.track->dcosYVtx*beamDCosY + fEventInfo.track->dcosZVtx*beamDCosZ < 0.6)
00171     goodDirection = false;
00172 
00173   return goodDirection;
00174 }


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

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1