#include <NCAnalysisCuts.h>
Inheritance diagram for NCAnalysisCuts:

Public Member Functions | |
| NCAnalysisCuts () | |
| virtual | ~NCAnalysisCuts () |
| virtual bool | IsGoodBeamEvent ()=0 |
| virtual bool | IsStoppingBeamMuon ()=0 |
| virtual bool | InBeamFiducialVolume ()=0 |
| virtual bool | PassesFinalSelection ()=0 |
| virtual bool | PassesFinalSelection (ANtpRecoInfo *recoInfo)=0 |
| bool | IsGoodSpill () |
| bool | IsGoodBeamSnarl () |
| bool | IsGoodTarget () |
| bool | IsCleanLowMultSnarl () |
| bool | IsMultiCutsClean () |
| bool | IsSimpleCutsClean () |
| bool | IsNewSnarl () |
| bool | IsGoodShower () |
| void | SetInfoObjects (ANtpHeaderInfo *, ANtpBeamInfo *, ANtpEventInfoNC *, ANtpTrackInfoNC *, ANtpShowerInfoNC *, ANtpTruthInfoBeam *=0) |
| void | SetBeamType (BeamType::BeamType_t type) |
| void | SetUseAllBeams (bool useAll) |
| void | SetUseAllL010z (bool useAll) |
| void | SetUseAll185i (bool useAll) |
Protected Member Functions | |
| Int_t | GetReleaseType () |
Protected Attributes | |
| BeamType::BeamType_t | fBeamType |
| int | fCurrentRun |
| int | fCurrentSnarl |
| int | fCurrentSubRun |
| bool | fUseAllBeams |
| bool | fUseAll185i |
| bool | fUseAllL010z |
| NCEventInfo | fEventInfo |
Definition at line 25 of file NCAnalysisCuts.h.
|
|
Definition at line 41 of file NCAnalysisCuts.cxx. 00041 : 00042 fBeamType(BeamType::kUnknown), 00043 fCurrentRun(-1), 00044 fCurrentSnarl(-1), 00045 fCurrentSubRun(-1) 00046 { 00047 }
|
|
|
Definition at line 50 of file NCAnalysisCuts.cxx. 00051 {
00052 }
|
|
|
Definition at line 382 of file NCAnalysisCuts.cxx. References fEventInfo, NCEventInfo::header, ANtpHeaderInfo::softVersion, and ReleaseType::StringToType(). Referenced by NCAnalysisCutsNC::IsFibreNoiseInSpillOx(), and NCAnalysisCutsNC::IsLIInSpillOx(). 00383 {
00384 // Get the ReleaseType from the string.
00385
00386 //const char* asCharArray= (const char*)fEventInfo.header->softVersion;
00387 ReleaseType::Release_t softType =
00388 ReleaseType::StringToType(fEventInfo.header->softVersion);
00389
00390 assert(softType != -1);
00391
00392 return softType;
00393 }
|
|
|
Implemented in NCAnalysisCutsCC, NCAnalysisCutsNC, and NCAnalysisCutsNCCCFid. Referenced by MicroDSTMaker::ExtractNCCC(), NCExtractionCuts::FillAnalysisInfo(), and MicroDSTMaker::FillRecoInfo(). |
|
|
Definition at line 200 of file NCAnalysisCuts.cxx. References NCEventInfo::event, ANtpHeaderInfo::events, fEventInfo, NCEventInfo::header, and ANtpEventInfoNC::minTimeSeparation. Referenced by MicroDSTMaker::FillRecoInfo(). 00201 {
00202 return fEventInfo.header->events == 1 ||
00203 (fEventInfo.header->events == 2 &&
00204 TMath::Abs(fEventInfo.event->minTimeSeparation*1e6) > 0.2);
00205 }
|
|
|
Implemented in NCAnalysisCutsCC, NCAnalysisCutsNC, and NCAnalysisCutsNCCCFid. Referenced by MicroDSTMaker::ExtractNCCC(), and NCExtractionCuts::FillAnalysisInfo(). |
|
|
Definition at line 271 of file NCAnalysisCuts.cxx. References ANtpHeaderInfo::coilCurrent, ANtpHeaderInfo::coilStatus, ANtpHeaderInfo::dataType, ANtpHeaderInfo::detector, fEventInfo, NCEventInfo::header, ANtpHeaderInfo::isGoodData, and IsGoodSpill(). Referenced by MicroDSTMaker::ExtractNCCC(). 00272 {
00273 //MC snarls are always good
00274 if(fEventInfo.header->dataType == int(SimFlag::kMC)) return true;
00275
00276 // check that there were no problems with the detector
00277 // Don't take reversed field data for uDSTs
00278 if(fEventInfo.header->coilStatus < 1 ||
00279 (fEventInfo.header->detector == int(Detector::kFar) &&
00280 fEventInfo.header->isGoodData < 1))
00281 return false;
00282
00283 //the cuts in this method come from MINOS-doc-1342
00284 if(!IsGoodSpill()) return false;
00285
00286 if(fEventInfo.header->detector == int(Detector::kNear) &&
00287 (fEventInfo.header->coilCurrent > -1000 ||
00288 fEventInfo.header->isGoodData < 1))
00289 return false;
00290
00291 return true;
00292 }
|
|
|
Definition at line 298 of file NCAnalysisCuts.cxx. References ANtpTrackInfoNC::aTrkvtx_ns, CorrectShowerEnergy(), ANtpHeaderInfo::dataType, det, ANtpHeaderInfo::detector, NCEventInfo::event, fEventInfo, NCEventInfo::header, ANtpShowerInfo::linearCCGeV, EnergyCorrections::SetCorrectionVersion(), NCEventInfo::shower, ANtpHeaderInfo::softVersion, NCEventInfo::track, ANtpEventInfo::tracks, and ANtpShowerInfo::vtxZ. Referenced by MicroDSTMaker::FillRecoInfo(). 00299 {
00300 //set the version for the energy corrections. mike uses R1_18 and cedar, the
00301 //values in ANtpHeaderInfo are Birch(Cedar) Data(Carrot/Daikon/Etc)
00302 if( fEventInfo.header->softVersion.Contains("Cedar") ){
00303 const EnergyCorrections::CorrectionVersion_t ver = EnergyCorrections::kCedar;
00304 SetCorrectionVersion(ver);
00305 }
00306 else if( fEventInfo.header->softVersion.Contains("Birch") ){
00307 const EnergyCorrections::CorrectionVersion_t ver = EnergyCorrections::kBirch;
00308 SetCorrectionVersion(ver);
00309 }
00310
00311
00312 bool isdata = true;
00313 if(fEventInfo.header->dataType == (int)SimFlag::kMC) isdata = false;
00314
00315 Detector::Detector_t det = Detector::kNear;
00316 if(fEventInfo.header->detector == (int)Detector::kFar)
00317 det = Detector::kFar;
00318
00319 double showerEnergy;
00320 //Protect against events without showers.
00321 if(fEventInfo.shower->linearCCGeV > 0.){
00322 showerEnergy = CorrectShowerEnergy(fEventInfo.shower->linearCCGeV,
00323 det,
00324 CandShowerHandle::kCC,
00325 1, isdata);
00326 }
00327 else showerEnergy = ANtpDefaultValue::kDouble;
00328
00329 if(fEventInfo.event->tracks < 1
00330 || TMath::Abs(fEventInfo.shower->vtxZ - fEventInfo.track->aTrkvtx_ns) < 0.5
00331 || showerEnergy > 2. )
00332 return true;
00333
00334 return false;
00335 }
|
|
|
Definition at line 248 of file NCAnalysisCuts.cxx. References NCEventInfo::beam, ANtpHeaderInfo::dataType, ANtpBeamInfo::deltaSecToSpillGPS, ANtpHeaderInfo::detector, fEventInfo, ANtpBeamInfo::goodSpill, ANtpBeamInfo::gpsError, NCEventInfo::header, IsGoodTarget(), and ANtpHeaderInfo::spillType. Referenced by IsGoodBeamSnarl(). 00249 {
00250 //mc beam is always perfect and only using the
00251 //correct mc files with each beamType, so no need to
00252 //check the target
00253 if(fEventInfo.header->dataType == int(SimFlag::kMC)) return true;
00254
00255 if(!IsGoodTarget()) return false;
00256
00257 //check the beam quality cuts, the spill type and
00258 //error on the gps - error has to be big within 5 minutes of the
00259 //spill - only check the gps for far detector
00260 if(fEventInfo.beam->goodSpill < 1 ||
00261 (fEventInfo.header->detector == int(Detector::kFar) &&
00262 fEventInfo.beam->deltaSecToSpillGPS < 360 &&
00263 fEventInfo.beam->gpsError > 1000) ||
00264 fEventInfo.header->spillType == 3)
00265 return false;
00266
00267 return true;
00268 }
|
|
|
Definition at line 58 of file NCAnalysisCuts.cxx. References BeamType::AsString(), NCEventInfo::beam, ANtpBeamInfo::beamType, fBeamType, fEventInfo, fUseAll185i, fUseAllBeams, fUseAllL010z, and MAXMSG. Referenced by IsGoodSpill(). 00059 {
00060 bool goodTarget = false;
00061
00062 BeamType::BeamType_t bt = (BeamType::BeamType_t)(fEventInfo.beam->beamType);
00063
00064 bool is185i = (bt == BeamType::kL010z185i
00065 || bt == BeamType::kL010z185i_lowintensity);
00066 bool isL010z = (bt == BeamType::kL010z185i
00067 || bt == BeamType::kL010z185i_lowintensity
00068 || bt == BeamType::kL010z000i
00069 || bt == BeamType::kL010z170i
00070 || bt == BeamType::kL010z200i);
00071
00072 //take any thing if the target position is set to all
00073 //beams or pME or pHE
00074 if(fUseAllBeams)
00075 goodTarget = true;
00076 else if(fBeamType == BeamType::kL100z200i && bt == fBeamType)
00077 goodTarget = true;
00078 else if(fBeamType == BeamType::kL250z200i && bt == fBeamType)
00079 goodTarget = true;
00080 else if(fBeamType == BeamType::kL010z185i
00081 && !fUseAll185i && !fUseAllL010z && bt == fBeamType)
00082 goodTarget = true;
00083 else if(fBeamType == BeamType::kL010z170i
00084 && !fUseAllL010z && bt == fBeamType)
00085 goodTarget = true;
00086 else if(fBeamType == BeamType::kL010z200i
00087 && !fUseAllL010z && bt == fBeamType)
00088 goodTarget = true;
00089 else if(fBeamType == BeamType::kL010z185i_lowintensity
00090 && !fUseAll185i && !fUseAllL010z && bt == fBeamType)
00091 goodTarget = true;
00092 else if(fBeamType == BeamType::kL010z000i
00093 && !fUseAllL010z && bt == fBeamType)
00094 goodTarget = true;
00095 else if(fUseAllL010z && isL010z)
00096 goodTarget = true;
00097 else if(fUseAll185i && is185i)
00098 goodTarget = true;
00099
00100
00101 MAXMSG("NCAnalysisCuts", Msg::kDebug, 10) << fEventInfo.beam->beamType << " "
00102 << BeamType::AsString(bt) << " "
00103 << goodTarget << " "
00104 << (int)fUseAllBeams << " "
00105 << is185i << " " << isL010z << endl;
00106
00107
00108 return goodTarget;
00109 }
|
|
|
Definition at line 143 of file NCAnalysisCuts.cxx. References ANtpEventInfoNC::closeTimeDeltaZ, ANtpEventInfoNC::edgeActivityPH, ANtpEventInfoNC::edgeActivityStrips, ANtpEventInfo::energyGeV, NCEventInfo::event, fEventInfo, ANtpEventInfoNC::minTimeSeparation, ANtpEventInfoNC::oppEdgeStrips, ANtpTrackInfo::planes, ANtpShowerInfo::planes, ANtpEventInfo::planes, NCEventInfo::shower, SQR(), ANtpEventInfo::totalStrips, and NCEventInfo::track. Referenced by MicroDSTMaker::FillRecoInfo(). 00144 {
00145 // 35ns timing cut
00146 if(TMath::Abs(fEventInfo.event->minTimeSeparation) < 35e-9) return false;
00147
00148 // tiny events are mostly junk
00149 if(fEventInfo.event->totalStrips < 5) return false;
00150
00151 // this cuts very steep showers, leaking in
00152 if(fEventInfo.event->totalStrips/SQR(fEventInfo.event->planes)>1.15)
00153 return false;
00154
00155 // this cuts leakage which leaves activity in partially instrumented
00156 // region
00157 if(fEventInfo.event->edgeActivityStrips > 2 &&
00158 fEventInfo.event->edgeActivityPH > 1000 &&
00159 fEventInfo.event->energyGeV < 5.0 &&
00160 fEventInfo.shower->planes > fEventInfo.track->planes) // don't cut out CC
00161 return false;
00162
00163 // also cut out events with too much activity in the opposite edge region
00164 if(fEventInfo.event->oppEdgeStrips > 2 &&
00165 fEventInfo.event->energyGeV < 5.0 &&
00166 fEventInfo.shower->planes > fEventInfo.track->planes) // don't cut out CC
00167 return false;
00168
00169 // make additional deltaZ cuts if (|minDeltaT|<175ns)
00170 if(TMath::Abs(fEventInfo.event->closeTimeDeltaZ) < 1.0 &&
00171 TMath::Abs(fEventInfo.event->minTimeSeparation) < 175e-9)
00172 return false;
00173
00174 // Survived all cuts
00175 return true;
00176 }
|
|
|
|
Definition at line 179 of file NCAnalysisCuts.cxx. References NCEventInfo::event, fEventInfo, ANtpEventInfoNC::minTimeSeparation, ANtpTrackInfo::planes, ANtpShowerInfo::planes, ANtpEventInfoNC::sharedStripFraction, NCEventInfo::shower, ANtpEventInfoNC::slicePHFraction, and NCEventInfo::track. Referenced by MicroDSTMaker::FillRecoInfo(). 00180 {
00181 // 155ns timing cut
00182 if(TMath::Abs(fEventInfo.event->minTimeSeparation) < 155e-9)
00183 return false;
00184
00185 //cut on portion of the slice in the event
00186 if(fEventInfo.event->slicePHFraction<0.9) return false;
00187
00188 // also cut events that share a good fraction of physical strips with
00189 // other events
00190 // and don't cut out CC
00191 if(fEventInfo.event->sharedStripFraction>0.3 &&
00192 ((-fEventInfo.shower->planes + fEventInfo.track->planes)<=5.))
00193 return false;
00194
00195 // Survived all cuts
00196 return true;
00197 }
|
|
|
Implemented in NCAnalysisCutsCC, NCAnalysisCutsNC, and NCAnalysisCutsNCCCFid. Referenced by MicroDSTMaker::FillRecoInfo(). |
|
|
Implemented in NCAnalysisCutsCC, NCAnalysisCutsNC, and NCAnalysisCutsNCCCFid. |
|
|
Implemented in NCAnalysisCutsCC, NCAnalysisCutsNC, and NCAnalysisCutsNCCCFid. Referenced by MicroDSTMaker::AddToNtuple(). |
|
|
Definition at line 224 of file NCAnalysisCuts.cxx. References fBeamType. Referenced by MicroDSTMaker::MakeuDST(). 00225 {
00226 fBeamType = type;
00227 }
|
|
||||||||||||||||||||||||||||
|
Definition at line 208 of file NCAnalysisCuts.cxx. References NCEventInfo::beam, NCEventInfo::event, fEventInfo, NCEventInfo::header, NCEventInfo::shower, NCEventInfo::track, and NCEventInfo::truth. Referenced by MicroDSTMaker::ExtractNCCC(), and MicroDSTMaker::MakeuDST(). 00214 {
00215 fEventInfo.header = headerInfo;
00216 fEventInfo.beam = beamInfo;
00217 fEventInfo.event = eventInfo;
00218 fEventInfo.track = trackInfo;
00219 fEventInfo.shower = showerInfo;
00220 fEventInfo.truth = truthInfo;
00221 }
|
|
|
Definition at line 242 of file NCAnalysisCuts.cxx. References fUseAll185i. Referenced by MicroDSTMaker::MakeuDST(). 00243 {
00244 fUseAll185i = useAll;
00245 }
|
|
|
Definition at line 230 of file NCAnalysisCuts.cxx. References fUseAllBeams. Referenced by MicroDSTMaker::MakeuDST(). 00231 {
00232 fUseAllBeams = useAll;
00233 }
|
|
|
Definition at line 236 of file NCAnalysisCuts.cxx. References fUseAllL010z. Referenced by MicroDSTMaker::MakeuDST(). 00237 {
00238 fUseAllL010z = useAll;
00239 }
|
|
|
Definition at line 56 of file NCAnalysisCuts.h. Referenced by IsGoodTarget(), and SetBeamType(). |
|
|
Definition at line 57 of file NCAnalysisCuts.h. Referenced by IsNewSnarl(). |
|
|
Definition at line 58 of file NCAnalysisCuts.h. Referenced by IsNewSnarl(). |
|
|
Definition at line 59 of file NCAnalysisCuts.h. Referenced by IsNewSnarl(). |
|
|
Definition at line 64 of file NCAnalysisCuts.h. Referenced by GetReleaseType(), IsCleanLowMultSnarl(), IsGoodBeamSnarl(), IsGoodShower(), IsGoodSpill(), IsGoodTarget(), IsMultiCutsClean(), IsNewSnarl(), IsSimpleCutsClean(), and SetInfoObjects(). |
|
|
Definition at line 61 of file NCAnalysisCuts.h. Referenced by IsGoodTarget(), and SetUseAll185i(). |
|
|
Definition at line 60 of file NCAnalysisCuts.h. Referenced by IsGoodTarget(), and SetUseAllBeams(). |
|
|
Definition at line 62 of file NCAnalysisCuts.h. Referenced by IsGoodTarget(), and SetUseAllL010z(). |
1.3.9.1