NueAnalysisCuts Class Reference

#include <NueAnalysisCuts.h>

List of all members.

Public Member Functions

 NueAnalysisCuts ()
virtual ~NueAnalysisCuts ()
void Reset ()
const RegistryDefaultConfig () const
void Config (const Registry &r)
void SetInfoObject (NueRecord *nr)
void SetInfoObject (int evtn, NtpStRecord *st)
void SetInfoObject (int evtn, NtpSRRecord *st, NtpMCRecord *mcobj=0, NtpTHRecord *thobj=0)
void SetNtpInfoObjects (int evtn, int run, VldContext &vc)
void Report ()
bool PassesTrackPlaneCut ()
bool PassesTrackLikePlaneCut ()
bool PassesHighShowerEnergyCut ()
bool PassesLowShowerEnergyCut ()
bool PassesHighEnergyCut ()
bool PassesLowEnergyCut ()
bool PassesEventPlaneCut ()
bool PassesHotChannel ()
bool PassesFiducialVolume ()
bool PassesFullContainment ()
bool PassesPhProngCut ()
bool PassesCutOnClasses ()
bool IsGoodBeam ()
bool PassesBeamCut ()
bool PassesHornCurrent ()
bool PassesDataQuality ()
bool PassesLowPhNPlaneCut ()
bool PassesLowPhNStripCut ()
bool PassesEMFraction ()
bool PassesResonanceCode ()
bool PassesFileCut ()
bool PassesAllCuts ()

Private Member Functions

bool IsValid ()
bool IsMC ()
void FillVertexPosition (float &x, float &y, float &z)
bool IsInsideFarFiducial (float x, float y, float z)
bool IsInsideNearFiducial (float x, float y, float z)
bool PassesLowEMFraction ()
bool PassesHighEMFraction ()
bool IsSignal ()
bool IsBackground ()
void ReportOnRecord (NueRecord *nr, string ID)
bool NeedsSpecialAttention (TString name)

Private Attributes

NueRecord LowCuts
NueRecord HighCuts
float kMEUPerGeV
float kSigCorrPerMEU
Detector::Detector_t fDetectorType
SimFlag::SimFlag_t fSimFlag
int fFiducialCut
int fFidVolumeChoice
int fFidVtxChoice
int fContainmentCut
int fBeamCut
int fCheckHotChannel
float fTargetCurrent
float fPhProngCut
int fFileTrim
std::string fFileCutName
std::string kOutputFile
int fCutClasses
vector< int > signalClasses
vector< int > bgClasses
int fCutResCode
vector< int > sigResonanceCodes
vector< int > bgResonanceCodes
ANtpTruthInfoBeam HighSigCuts
ANtpTruthInfoBeam LowSigCuts
ANtpTruthInfoBeam HighBgCuts
ANtpTruthInfoBeam LowBgCuts
NueRecordnrInfo
NtpStRecordstInfo
NtpSRRecordsrInfo
ANtpRecoNtpManipulator ntpManipulator
NtpSREventeventInfo
NtpSRTracktrackInfo
NtpSRShowershowerInfo
NtpMCTruthmcInfo
NtpTHEventthEventInfo
int fEventNum

Detailed Description

Definition at line 27 of file NueAnalysisCuts.h.


Constructor & Destructor Documentation

NueAnalysisCuts::NueAnalysisCuts (  ) 

Definition at line 26 of file NueAnalysisCuts.cxx.

References kMEUPerGeV, kSigCorrPerMEU, and Reset().

00027 {
00028    kMEUPerGeV =25.66;
00029    kSigCorrPerMEU = 1.0;
00030    Reset();
00031 }

virtual NueAnalysisCuts::~NueAnalysisCuts (  )  [inline, virtual]

Definition at line 31 of file NueAnalysisCuts.h.

00031 {};


Member Function Documentation

void NueAnalysisCuts::Config ( const Registry r  ) 

Definition at line 202 of file NueAnalysisCuts.cxx.

References bgClasses, bgResonanceCodes, ANtpTruthInfoBeam::emShowerFraction, fBeamCut, fCheckHotChannel, fContainmentCut, fCutClasses, fCutResCode, fFiducialCut, fFidVolumeChoice, fFidVtxChoice, fFileCutName, fFileTrim, fPhProngCut, fTargetCurrent, Registry::Get(), HighBgCuts, HighCuts, HighSigCuts, Shwfit::hiPhPlaneCountM2, Shwfit::hiPhStripCount, kOutputFile, LowBgCuts, LowCuts, LowSigCuts, ANtpEventInfoNue::phNueGeV, ANtpShowerInfoNue::phNueGeV, ANtpTrackInfo::planes, ANtpEventInfo::planes, NueRecord::shwfit, signalClasses, sigResonanceCodes, NueRecord::srevent, NueRecord::srshower, NueRecord::srtrack, and ANtpTrackInfoNue::trklikePlanes.

Referenced by ParticleDisplay::Config(), NueModule::Config(), TrimModule::Config(), Trimmer::Config(), NtpStTrimmer::Config(), MiniMakerPID::Config(), SpillTypeFilter::Config(), MiniMaker::Config(), and NueDisplayModule::Config().

00203 {
00204   int imps;
00205   if(r.Get("HiPlaneTrackCut",imps)) { HighCuts.srtrack.planes=imps;}
00206   if(r.Get("HiTrackLikeCut",imps))  { HighCuts.srtrack.trklikePlanes=imps;}
00207   if(r.Get("LoPlaneEventCut",imps)) { LowCuts.srevent.planes=imps;}
00208   if(r.Get("HiPlaneEventCut",imps)) { HighCuts.srevent.planes=imps;}
00209   if(r.Get("CheckHotChannel",imps)) { fCheckHotChannel=imps;}
00210   if(r.Get("FiducialCut", imps))       { fFiducialCut = imps;}
00211   if(r.Get("FiducialVtx", imps))       { fFidVtxChoice = imps;}
00212   if(r.Get("FiducialVolumeAlg", imps)) { fFidVolumeChoice = imps;}
00213   if(r.Get("ContainmentCut", imps)) {fContainmentCut = imps;}
00214 
00215   if(r.Get("CutOnClasses", imps)) { fCutClasses = imps; }
00216   if(r.Get("SetSignal", imps)) {   
00217        signalClasses.clear(); signalClasses.push_back(imps);
00218   }
00219   if(r.Get("AddSignal", imps)) { signalClasses.push_back(imps);  }
00220   if(r.Get("SetBackground", imps)) {
00221        bgClasses.clear(); bgClasses.push_back(imps);
00222   }
00223   if(r.Get("AddBackground", imps)) { bgClasses.push_back(imps); }
00224 
00225   if(r.Get("SetSignalResCode",imps)) {
00226      sigResonanceCodes.clear(); sigResonanceCodes.push_back(imps); }
00227   if(r.Get("SetBackgroundResCode",imps)) {
00228      bgResonanceCodes.clear(); bgResonanceCodes.push_back(imps); }
00229                                                                              
00230   if(r.Get("AddSignalResCode",imps)) {sigResonanceCodes.push_back(imps); }
00231   if(r.Get("AddBackgroundResCode",imps)) {bgResonanceCodes.push_back(imps); }
00232   if(r.Get("CutonResCode", imps)) {fCutResCode = imps;}
00233 
00234   if(r.Get("BeamQualityCut", imps)) {fBeamCut = imps;}
00235   if(r.Get("LoPhNStripCut",imps)) { LowCuts.shwfit.hiPhStripCount=imps;}
00236   if(r.Get("LoPhNPlaneCut",imps)) { LowCuts.shwfit.hiPhPlaneCountM2=imps;}
00237 
00238   // new contPlaneCount - Minerba
00239   //if(r.Get("LoContNPlaneCut",imps)) { LowCuts.shwfit.contPlaneCount=imps;}
00240 
00241   if(r.Get("FileCut", imps)) {fFileTrim = imps;}  
00242 //  if(r.Get("LoNuTarZ", imps)) {kLoNuTarZ = imps;}
00243 //  if(r.Get("HiNuTarZ", imps)) {kHiNuTarZ = imps;}
00244                    
00245   double fmps;
00246   if(r.Get("HiShowerEnergyCut",fmps)) { HighCuts.srshower.phNueGeV =fmps;}
00247   if(r.Get("LoShowerEnergyCut",fmps)) { LowCuts.srshower.phNueGeV =fmps;}
00248   if(r.Get("HiEnergyCut",fmps)) { HighCuts.srevent.phNueGeV =fmps;}
00249   if(r.Get("LoEnergyCut",fmps)) { LowCuts.srevent.phNueGeV  =fmps;}
00250   if(r.Get("PhProngCut",fmps))  { fPhProngCut=fmps; }
00251   if(r.Get("HiSigEmFracCut", fmps)) {
00252                       HighSigCuts.emShowerFraction = fmps;}
00253   if(r.Get("LoSigEmFracCut", fmps)) {
00254                       LowSigCuts.emShowerFraction = fmps;}
00255   if(r.Get("HiBgEmFracCut", fmps)) {
00256                       HighBgCuts.emShowerFraction = fmps;}
00257   if(r.Get("LoBgEmFracCut", fmps)) {
00258                       LowBgCuts.emShowerFraction = fmps; }
00259   
00260   if(r.Get("TargetHornCurrent", fmps)) {fTargetCurrent = fmps;}
00261 
00262   // ?? new contPlaneCount - Minerba
00263   //  if(r.Get("LoContPhPlaneCut",fmps)) { contPlaneCount=fmps;}
00264 
00265   const char* tmps;
00266 
00267   if(r.Get("SetBackground", tmps)) {
00268     if( std::string(tmps) == "All"){
00269        bgClasses.clear(); 
00270        for(int i = 0; i < 5; i++) bgClasses.push_back(i);
00271     }
00272   }
00273 
00274   if(r.Get("SetSignal", tmps)) {
00275     if( std::string(tmps) == "All"){
00276        signalClasses.clear();
00277        for(int i = 0; i < 5; i++) signalClasses.push_back(i);
00278     }
00279   }
00280 
00281   if(r.Get("TrimFile", tmps)) {fFileCutName = tmps;}  
00282   if(r.Get("OutputFile", tmps)) {kOutputFile = tmps;} 
00283 
00284 }

const Registry & NueAnalysisCuts::DefaultConfig ( void   )  const

Definition at line 137 of file NueAnalysisCuts.cxx.

References Registry::LockValues(), Registry::Set(), and Registry::UnLockValues().

Referenced by SpillTypeFilter::DefaultConfig(), NueDisplayModule::DefaultConfig(), NtpStTrimmer::DefaultConfig(), TrimModule::DefaultConfig(), ParticleDisplay::DefaultConfig(), and NueModule::DefaultConfig().

00138 {
00139   static Registry r;
00140 
00141   r.UnLockValues();
00142 
00143   r.Set("HiPlaneTrackCut",-1);
00144   r.Set("LoPlaneEventCut",-1);
00145   r.Set("HiPlaneEventCut",-1);
00146   r.Set("HiTrackLikeCut",-1);
00147   r.Set("CheckHotChannel", 0);
00148   r.Set("FiducialCut", 0); 
00149   r.Set("FiducialVtx", 1); 
00150   r.Set("FiducialVolumeAlg", 2);
00151   r.Set("HiEnergyCut",-1);
00152   r.Set("LoEnergyCut",-1);
00153   r.Set("HiShowerEnergyCut",-1);
00154   r.Set("LoShowerEnergyCut",-1);
00155 
00156   // new contPlaneCount - Minerba
00157   //  r.Set("LoContNPlaneCut",-1);
00158 
00159   r.Set("CutOnClasses", 0);
00160   r.Set("BeamQualityCut", 0);
00161   r.Set("LoPhNStripCut",-1);
00162   r.Set("LoPhNPlaneCut",-1);
00163   r.Set("HiEnergyCut",-1);
00164   r.Set("LoEnergyCut",-1);
00165   r.Set("HiEnergyShowerCut",-1);
00166   r.Set("LoEnergyShowerCut",-1);
00167 
00168   // ?? new contPlaneCount - Minerba
00169   //  r.Set("LoContPhPlaneCut",-1.);
00170 
00171   r.Set("LoCurrentCut", 0.1);
00172   r.Set("LoHorBeamWidth", 0.0);
00173   r.Set("HiHorBeamWidth", 2.9);
00174   r.Set("LoVertBeamWidth", 0.0);
00175   r.Set("HiVertBeamWidth", 2.9);
00176   r.Set("LoNuTarZ", -1);
00177   r.Set("HiNuTarZ", 1000);
00178   r.Set("Oscillate", 0);
00179   r.Set("OutputFile", "HistManInfo.root");
00180 
00181   r.Set("FileCut", 0); 
00182   r.Set("TrimFile", "Default.txt");
00183 
00184 //  r.Set("SetBackground", 0);
00185 //  r.Set("AddBackground", 0);
00186   r.Set("AddSignal", 2);
00187 //  r.Set("SetSignal", 2);
00188 //  r.Set("PhProngCut",0);
00189 //  r.Set("HiSigEmFracCut", -1);
00190 //  r.Set("LoSigEmFracCut", -1); 
00191 //  r.Set("HiBgEmFracCut", -1);
00192 //  r.Set("LoBgEmFracCut", -1);
00193   r.Set("TargetHornCurrent", -185); 
00194   r.Set("CutonResCode", 0);
00195 
00196 
00197   r.LockValues();
00198 
00199   return r;                                                                                
00200 }

void NueAnalysisCuts::FillVertexPosition ( float &  x,
float &  y,
float &  z 
) [private]
bool NueAnalysisCuts::IsBackground (  )  [private]

Definition at line 716 of file NueAnalysisCuts.cxx.

References bgClasses, NueConvention::DetermineClassType(), fCutClasses, ANtpTruthInfoBeamNue::fNueClass, NtpMCTruth::iaction, NtpMCTruth::inu, NtpMCTruth::inunoosc, IsMC(), IsValid(), mcInfo, NueRecord::mctrue, and nrInfo.

Referenced by PassesCutOnClasses(), PassesHighEMFraction(), PassesLowEMFraction(), and PassesResonanceCode().

00717 {
00718    if(!IsValid()) return false;
00719    if(!IsMC()) return true;
00720    if(fCutClasses == 0) return true;
00721                                                                                 
00722    bool goodEvent = false;
00723    Int_t cType = -10;
00724                                                                                 
00725    if(nrInfo) cType = nrInfo->mctrue.fNueClass;
00726    if(mcInfo){
00727      int inu = mcInfo->inu;
00728      int inunoosc = mcInfo->inunoosc;
00729      int iaction = mcInfo->iaction;
00730      cType = ClassType::DetermineClassType(inu, inunoosc, iaction);
00731    }
00732                                                                                 
00733    for(unsigned int i = 0; i < bgClasses.size(); i++){
00734       if(bgClasses[i] == cType)
00735           goodEvent = true;  
00736    }
00737                                                                                 
00738    return goodEvent;
00739 }

bool NueAnalysisCuts::IsGoodBeam (  ) 

Definition at line 943 of file NueAnalysisCuts.cxx.

References NueRecord::bmon, eventInfo, fBeamCut, BeamMon::goodBeamMon, IsMC(), IsValid(), Msg::kWarning, MSG, and nrInfo.

Referenced by PassesBeamCut().

00944 {
00945    if(!IsValid()) return false;
00946    if(IsMC()) return true;
00947    if(fBeamCut != 1) return true;
00948 
00949    if(nrInfo) 
00950      return (nrInfo->bmon.goodBeamMon == 1);
00951 
00952    if(eventInfo)
00953      MSG("NueAnalysisCuts", Msg::kWarning)<<"Beam Cut cannot be used on NtpSt data"<<endl;
00954 
00955    return false;
00956 }

bool NueAnalysisCuts::IsInsideFarFiducial ( float  x,
float  y,
float  z 
) [private]
bool NueAnalysisCuts::IsInsideNearFiducial ( float  x,
float  y,
float  z 
) [private]
bool NueAnalysisCuts::IsMC (  )  [private]
bool NueAnalysisCuts::IsSignal (  )  [private]

Definition at line 691 of file NueAnalysisCuts.cxx.

References NueConvention::DetermineClassType(), fCutClasses, ANtpTruthInfoBeamNue::fNueClass, NtpMCTruth::iaction, NtpMCTruth::inu, NtpMCTruth::inunoosc, IsMC(), IsValid(), mcInfo, NueRecord::mctrue, nrInfo, and signalClasses.

Referenced by PassesCutOnClasses(), PassesHighEMFraction(), PassesLowEMFraction(), and PassesResonanceCode().

00692 {
00693    if(!IsValid()) return false;
00694    if(!IsMC()) return true;
00695    if(fCutClasses == 0) return true;
00696                                                                                 
00697    bool goodEvent = false;
00698    Int_t cType = -10;
00699                                                                                 
00700    if(nrInfo) cType = nrInfo->mctrue.fNueClass;
00701    if(mcInfo){
00702      int inu = mcInfo->inu;
00703      int inunoosc = mcInfo->inunoosc;
00704      int iaction = mcInfo->iaction;
00705      cType = ClassType::DetermineClassType(inu, inunoosc, iaction);
00706    }
00707                                                                                 
00708    for(unsigned int i = 0; i < signalClasses.size(); i++){
00709       if(signalClasses[i] == cType)
00710           goodEvent = true;
00711    }
00712                                                                                 
00713    return goodEvent;
00714 }

bool NueAnalysisCuts::IsValid (  )  [private]
bool NueAnalysisCuts::NeedsSpecialAttention ( TString  name  )  [private]

Definition at line 1049 of file NueAnalysisCuts.cxx.

Referenced by ReportOnRecord().

01050 {                                                                   
01051    //All the fHeaders and four of hte MST vars require special effort
01052      if(name == "fHeader.fSnarl"
01053         ||  name == "fHeader.fRun"
01054         || name == "fHeader.fSubRun"
01055         || name == "fHeader.fEvtNo"
01056         || name == "fHeader.fEvents"
01057         || name == "fHeader.fTrackLength"
01058         || name == "mstvars.eallw1"
01059         || name == "mstvars.oallw1"
01060         || name == "mstvars.eallm1"
01061         || name == "mstvars.oallm1")
01062           return true;
01063 
01064     return false;
01065 }

bool NueAnalysisCuts::PassesAllCuts (  ) 

Definition at line 308 of file NueAnalysisCuts.cxx.

References PassesCutOnClasses(), PassesEMFraction(), PassesEventPlaneCut(), PassesFiducialVolume(), PassesFileCut(), PassesFullContainment(), PassesHighEnergyCut(), PassesHighShowerEnergyCut(), PassesHotChannel(), PassesLowEnergyCut(), PassesLowPhNPlaneCut(), PassesLowPhNStripCut(), PassesLowShowerEnergyCut(), PassesPhProngCut(), PassesResonanceCode(), PassesTrackLikePlaneCut(), and PassesTrackPlaneCut().

Referenced by NueModule::Analyze(), SpillTypeFilter::PassesCuts(), NtpStTrimmer::PassesCuts(), and TrimModule::PassesCuts().

00309 {
00310      bool goodEvent = true;
00311      goodEvent = goodEvent && PassesTrackPlaneCut();
00312      goodEvent = goodEvent && PassesTrackLikePlaneCut();
00313      goodEvent = goodEvent && PassesHighShowerEnergyCut();
00314      goodEvent = goodEvent && PassesLowShowerEnergyCut();
00315      goodEvent = goodEvent && PassesHighEnergyCut();
00316      goodEvent = goodEvent && PassesLowEnergyCut();
00317      goodEvent = goodEvent && PassesEventPlaneCut();
00318      goodEvent = goodEvent && PassesHotChannel();
00319      goodEvent = goodEvent && PassesFiducialVolume();
00320      goodEvent = goodEvent && PassesFullContainment();
00321      goodEvent = goodEvent && PassesPhProngCut();
00322      goodEvent = goodEvent && PassesCutOnClasses();
00323                                                                                 
00324      goodEvent = goodEvent && PassesLowPhNPlaneCut();
00325      goodEvent = goodEvent && PassesLowPhNStripCut();
00326      goodEvent = goodEvent && PassesEMFraction();
00327      goodEvent = goodEvent && PassesResonanceCode();
00328      goodEvent = goodEvent && PassesFileCut();
00329                                                                                 
00330      return goodEvent;
00331 }

bool NueAnalysisCuts::PassesBeamCut (  )  [inline]

Definition at line 60 of file NueAnalysisCuts.h.

References IsGoodBeam().

Referenced by TrimModule::PassesBeamCuts().

00060 {return IsGoodBeam();};

bool NueAnalysisCuts::PassesCutOnClasses (  ) 

Definition at line 741 of file NueAnalysisCuts.cxx.

References fCutClasses, IsBackground(), IsMC(), IsSignal(), and IsValid().

Referenced by PassesAllCuts().

00742 {
00743    if(!IsValid()) return false;
00744    if(!IsMC()) return true;
00745    if(fCutClasses == 0) return true;
00746                                                                                 
00747    bool goodEvent = false;
00748    if(IsSignal() || IsBackground())
00749       goodEvent = true;
00750                                                                                 
00751   return goodEvent;
00752 }

bool NueAnalysisCuts::PassesDataQuality (  ) 

Definition at line 976 of file NueAnalysisCuts.cxx.

References ANtpEventInfoNue::coilCurrent, ANtpEventInfoNue::daveFDDataQuality, fDetectorType, IsMC(), IsValid(), Detector::kFar, Detector::kNear, Msg::kWarning, ANtpEventInfoNue::liTime, MSG, nrInfo, ANtpEventInfoNue::rcBoundary, and NueRecord::srevent.

00977 {
00978   if(!IsValid()) return false;
00979   if(IsMC()) return true;
00980 
00981   if(nrInfo == 0)
00982      MSG("NueAnalysisCuts", Msg::kWarning)
00983         <<"Data Quality Cut cannot be used on NtpSt data"<<endl;
00984  
00985   bool goodEvent = true; 
00986   if(fDetectorType ==  Detector::kFar)
00987   {
00988      goodEvent = (nrInfo->srevent.liTime == -1);
00989      goodEvent = goodEvent && (nrInfo->srevent.rcBoundary == 0);
00990      goodEvent = goodEvent && (nrInfo->srevent.daveFDDataQuality == 1);
00991   }
00992   if(fDetectorType ==  Detector::kNear)
00993   {
00994      goodEvent = (nrInfo->srevent.coilCurrent < -1000);
00995   }
00996 
00997   return goodEvent;
00998 }

bool NueAnalysisCuts::PassesEMFraction (  ) 

Definition at line 787 of file NueAnalysisCuts.cxx.

References IsMC(), IsValid(), PassesHighEMFraction(), and PassesLowEMFraction().

Referenced by PassesAllCuts().

00788 {
00789   if(!IsValid()) return false;
00790   if(!IsMC()) return true;
00791   bool goodEvent = true;
00792 
00793   goodEvent = PassesHighEMFraction();
00794   goodEvent = goodEvent && PassesLowEMFraction();
00795 
00796   return goodEvent;
00797 }

bool NueAnalysisCuts::PassesEventPlaneCut (  ) 

Definition at line 351 of file NueAnalysisCuts.cxx.

References eventInfo, HighCuts, IsValid(), LowCuts, NtpSRPlane::n, nrInfo, NtpSREvent::plane, ANtpEventInfo::planes, and NueRecord::srevent.

Referenced by NueDisplayModule::PassCuts(), and PassesAllCuts().

00352 {
00353    if(!IsValid()) return false;
00354    
00355    int planes = 0;
00356    if(nrInfo) planes = nrInfo->srevent.planes; 
00357    if(eventInfo) planes = eventInfo->plane.n;
00358                                                                              
00359    bool goodEvent = true;
00360    if(HighCuts.srevent.planes > 0){
00361      goodEvent = !(planes > HighCuts.srevent.planes);
00362    }
00363    if(LowCuts.srevent.planes > 0){
00364      goodEvent = goodEvent && (planes >= LowCuts.srevent.planes);
00365    }
00366 
00367    return goodEvent;
00368 }

bool NueAnalysisCuts::PassesFiducialVolume (  ) 

Definition at line 513 of file NueAnalysisCuts.cxx.

References fDetectorType, fFiducialCut, FillVertexPosition(), IsInsideFarFiducial(), IsInsideNearFiducial(), IsValid(), Detector::kFar, and Detector::kNear.

Referenced by PassesAllCuts(), SpillTypeFilter::PassesCuts(), NtpStTrimmer::PassesCuts(), and TrimModule::PassesCuts().

00514 {
00515     if(!IsValid()) return false;
00516     if(fFiducialCut == 0) return true;
00517 
00518     bool goodEvent = false;
00519  
00520     float x = -9999; float y = -9999; float z = -9999;
00521     FillVertexPosition(x,y,z);
00522 
00523     if(x + y + z < -1000) return false;
00524 
00525     if(fDetectorType == Detector::kFar)
00526         goodEvent = IsInsideFarFiducial(x,y,z);
00527     if(fDetectorType == Detector::kNear)
00528         goodEvent = IsInsideNearFiducial(x,y,z);
00529 
00530    return goodEvent;
00531 }

bool NueAnalysisCuts::PassesFileCut (  ) 

Definition at line 855 of file NueAnalysisCuts.cxx.

References FilePosition::Event, fEventNum, fFileCutName, fFileTrim, NueHeader::GetEventNo(), RecRecordImp< T >::GetHeader(), NueHeader::GetRun(), RecDataHeader::GetRun(), NueHeader::GetSnarl(), RecPhysicsHeader::GetSnarl(), NueHeader::GetSubRun(), RecDataHeader::GetSubRun(), IsMC(), IsValid(), Msg::kError, Msg::kWarning, MSG, nrInfo, FilePosition::Run, FilePosition::Snarl, stInfo, and FilePosition::SubRun.

Referenced by PassesAllCuts().

00856 {
00857    if(!IsValid()) return false;
00858    if(fFileTrim == 0) return true;
00859 
00860    static vector<FilePosition> eventList;
00861    static unsigned int pos = 0;
00862 
00863    // If this is the first call fill the file list
00864    if(eventList.size() == 0) {
00865     std::ifstream ins;
00866     ins.open(fFileCutName.c_str());
00867     if(!ins.is_open())
00868       MSG("NueAnalysisCuts", Msg::kError)<<"Unable to open cut file "
00869                             <<fFileCutName<<endl;
00870 
00871     while(!ins.eof()){
00872       int Snarl, Run, SubRun, Event;
00873       ins>>Run>>SubRun>>Snarl>>Event;
00874       FilePosition temp;
00875       if(!ins.eof()){
00876           temp.Run = Run; temp.SubRun = SubRun; 
00877           temp.Snarl = Snarl; temp.Event = Event;
00878           eventList.push_back(temp);
00879       }
00880     }
00881     if(eventList.size() == 0)  return false;
00882    }
00883   
00884    
00885    FilePosition current;
00886 
00887    if(nrInfo){
00888      current.Snarl = nrInfo->GetHeader().GetSnarl();
00889      current.Event = nrInfo->GetHeader().GetEventNo();
00890      current.Run = nrInfo->GetHeader().GetRun();
00891      current.SubRun = nrInfo->GetHeader().GetSubRun();
00892      if(IsMC()) current.SubRun = 0;
00893    }
00894   
00895    if(stInfo){
00896      current.Snarl = stInfo->GetHeader().GetSnarl();
00897      current.Event = fEventNum;
00898      current.Run = stInfo->GetHeader().GetRun();
00899      current.SubRun = stInfo->GetHeader().GetSubRun();
00900      if(IsMC()) current.SubRun = 0;
00901    }
00902 
00903    if(current < eventList[0]) return false;
00904 
00905    if(current > eventList[eventList.size() - 1]) return false;
00906 
00907    if(pos >= eventList.size())
00908    {
00909       if(current < eventList[eventList.size() - 1]){
00910         MSG("NueAnalysisCuts", Msg::kWarning)<<"Problem with file list "
00911             <<"the file list should always be >= to the position of "
00912             <<"the files being scanned\n"<<endl;
00913         return false;
00914       }
00915    }
00916 
00917    if(current > eventList[pos] )
00918    {
00919       while(current > eventList[pos] && pos < eventList.size())
00920           pos++;
00921    }
00922 
00923    if(current == eventList[pos])
00924    {
00925        pos++;
00926        return true;
00927    }
00928                                                                                 
00929    if(pos > 0 && current < eventList[pos-1])
00930    {
00931       MSG("NueAnalysisCuts", Msg::kWarning)<<"Problem with file list "
00932             <<" appears to be out of order at position "<<pos<<endl;
00933         return false;
00934    }
00935                                                     
00936    return false;
00937 }

bool NueAnalysisCuts::PassesFullContainment (  ) 

Definition at line 488 of file NueAnalysisCuts.cxx.

References NueRecord::anainfo, fContainmentCut, fDetectorType, AnalysisInfoNue::isFullyContained, IsValid(), Msg::kError, Detector::kFar, Detector::kNear, MAXMSG, and nrInfo.

Referenced by PassesAllCuts(), SpillTypeFilter::PassesCuts(), NtpStTrimmer::PassesCuts(), and TrimModule::PassesCuts().

00489 {
00490     if(!IsValid()) return false;
00491                                                                                 
00492     if(fContainmentCut == 0) return true;
00493                                                                                 
00494     if(nrInfo == 0){
00495       MAXMSG("NueAnalysisCuts",Msg::kError,10)
00496         <<"FullContainment may only be called on ana_nue files"
00497         <<" the cut will not be applied"<<endl;
00498       return true;
00499     }
00500                                                                                 
00501    bool goodEvent = false;
00502                                                                                 
00503    if(fDetectorType == Detector::kFar)
00504       goodEvent = (nrInfo->anainfo.isFullyContained == 1);
00505                                                                                 
00506    if(fDetectorType == Detector::kNear)
00507       goodEvent = (nrInfo->anainfo.isFullyContained == 1 ||
00508                     nrInfo->anainfo.isFullyContained == -2);
00509                                                                                 
00510    return goodEvent;
00511 }

bool NueAnalysisCuts::PassesHighEMFraction (  )  [private]

Definition at line 799 of file NueAnalysisCuts.cxx.

References NtpMCTruth::emfrac, ANtpTruthInfoBeam::emShowerFraction, HighBgCuts, HighSigCuts, IsBackground(), IsMC(), IsSignal(), IsValid(), mcInfo, NueRecord::mctrue, and nrInfo.

Referenced by PassesEMFraction().

00800 {
00801   if(!IsValid()) return false;
00802   if(!IsMC()) return true;
00803  
00804   float emfrac = 0.0;
00805   if(nrInfo) emfrac = nrInfo->mctrue.emShowerFraction;
00806   if(mcInfo) emfrac = mcInfo->emfrac;
00807 
00808   bool goodEvent = true;
00809   if(IsSignal())
00810   {
00811      if(HighSigCuts.emShowerFraction < 0) return true;
00812      if(emfrac > HighSigCuts.emShowerFraction)
00813         goodEvent = false; 
00814   }
00815   if(IsBackground())
00816   {
00817      if(HighBgCuts.emShowerFraction < 0) return true;
00818      if(emfrac > HighBgCuts.emShowerFraction)
00819         goodEvent = false;
00820   }
00821 
00822   return goodEvent;
00823 }

bool NueAnalysisCuts::PassesHighEnergyCut (  ) 

Definition at line 441 of file NueAnalysisCuts.cxx.

References eventInfo, HighCuts, IsValid(), kMEUPerGeV, NtpSRStripPulseHeight::mip, nrInfo, NtpSREvent::ph, ANtpEventInfoNue::phNueGeV, NueRecord::srevent, and stInfo.

Referenced by NueDisplayModule::PassCuts(), and PassesAllCuts().

00442 {
00443    if(!IsValid()) return false;
00444    
00445    bool goodEvent = true;
00446    if(HighCuts.srevent.phNueGeV < 0) return goodEvent;
00447    
00448    if(nrInfo){
00449       if(nrInfo->srevent.phNueGeV > HighCuts.srevent.phNueGeV)
00450         goodEvent = false;
00451    }else
00452    if(stInfo && eventInfo){
00453       float EnergyInNueGeV = eventInfo->ph.mip;
00454       EnergyInNueGeV = EnergyInNueGeV/kMEUPerGeV;
00455                                         
00456       if(EnergyInNueGeV > HighCuts.srevent.phNueGeV)
00457         goodEvent = false;
00458    }
00459    
00460    return goodEvent;
00461 }

bool NueAnalysisCuts::PassesHighShowerEnergyCut (  ) 

Definition at line 388 of file NueAnalysisCuts.cxx.

References HighCuts, IsValid(), kMEUPerGeV, NtpSRStripPulseHeight::mip, nrInfo, NtpSRShower::ph, ANtpShowerInfoNue::phNueGeV, showerInfo, NueRecord::srshower, and stInfo.

Referenced by NueDisplayModule::PassCuts(), and PassesAllCuts().

00389 {
00390    if(!IsValid()) return false;
00391                                                                                 
00392    bool goodEvent = true;
00393    if(HighCuts.srshower.phNueGeV < 0) return goodEvent;
00394                                                                                 
00395    if(nrInfo){
00396       if(nrInfo->srshower.phNueGeV > HighCuts.srshower.phNueGeV)
00397         goodEvent = false;
00398    }else
00399    if(stInfo && showerInfo){
00400       float shwEnergyInNueGeV = showerInfo->ph.mip;
00401       shwEnergyInNueGeV = shwEnergyInNueGeV/kMEUPerGeV;
00402 
00403       if(shwEnergyInNueGeV > HighCuts.srshower.phNueGeV)
00404         goodEvent = false;
00405    }
00406                                                                                 
00407    return goodEvent;
00408 }

bool NueAnalysisCuts::PassesHornCurrent (  ) 

Definition at line 958 of file NueAnalysisCuts.cxx.

References NueRecord::bmon, eventInfo, fTargetCurrent, BeamMon::hornI, IsMC(), IsValid(), Msg::kWarning, MSG, and nrInfo.

00959 {
00960    if(!IsValid()) return false;
00961    if(IsMC()) return true;
00962    if(fTargetCurrent < 0) return true;
00963                                                                                 
00964    if(nrInfo){
00965      Float_t diffCurrent = TMath::Abs(nrInfo->bmon.hornI) - fTargetCurrent;
00966      bool goodEvent = TMath::Abs(diffCurrent) < 5;
00967      return goodEvent;
00968    }
00969                                                                                 
00970    if(eventInfo)
00971      MSG("NueAnalysisCuts", Msg::kWarning)<<"Beam Cut cannot be used on NtpSt data"<<endl;
00972                                                                                 
00973    return false;
00974 }

bool NueAnalysisCuts::PassesHotChannel (  ) 

Definition at line 588 of file NueAnalysisCuts.cxx.

References eventInfo, fCheckHotChannel, fDetectorType, ANtpRecoNtpManipulator::GetStripArray(), ANtpEventInfoNue::hotch, IsValid(), Msg::kError, Detector::kFar, MSG, nrInfo, NtpSREvent::nstrip, ntpManipulator, NtpSRStrip::ph0, NtpSRStrip::ph1, NtpSRPulseHeight::raw, NueRecord::srevent, stInfo, and NtpSREvent::stp.

Referenced by PassesAllCuts().

00589 {
00590    if(!IsValid()) return false;
00591 
00592    bool goodEvent = true;
00593    if(fCheckHotChannel == 0) return goodEvent;
00594                        
00595    if(nrInfo){
00596       if(nrInfo->srevent.hotch == 1) goodEvent = false;
00597    }else
00598    if(stInfo){
00599       if(fDetectorType == Detector::kFar) return true;
00600       TClonesArray* Strips = ntpManipulator.GetStripArray();
00601                                                                                 
00602       for(int i=0;i<eventInfo->nstrip;i++){
00603         NtpSRStrip *strip =
00604           dynamic_cast<NtpSRStrip *>(Strips->At(eventInfo->stp[i]));               
00605         if(!strip){
00606           MSG("NueAnalysisCuts",Msg::kError)<<"Couldn't get strip "
00607               <<endl;
00608           return true;
00609         }
00610         if(strip->ph0.raw+strip->ph1.raw>60000) goodEvent = false;
00611       }
00612    }
00613                                               
00614    return goodEvent;
00615 }

bool NueAnalysisCuts::PassesLowEMFraction (  )  [private]

Definition at line 825 of file NueAnalysisCuts.cxx.

References NtpMCTruth::emfrac, ANtpTruthInfoBeam::emShowerFraction, IsBackground(), IsMC(), IsSignal(), IsValid(), LowBgCuts, LowSigCuts, mcInfo, NueRecord::mctrue, and nrInfo.

Referenced by PassesEMFraction().

00826 {
00827   if(!IsValid()) return false;
00828   if(!IsMC()) return true;
00829 
00830   float emfrac = 2.0;
00831   if(nrInfo) emfrac = nrInfo->mctrue.emShowerFraction;
00832   if(mcInfo) emfrac = mcInfo->emfrac;
00833                                                                         
00834   bool goodEvent = true;
00835   if(IsSignal())
00836   {
00837      if(LowSigCuts.emShowerFraction < 0) return true;
00838      if(emfrac < LowSigCuts.emShowerFraction)
00839         goodEvent = false;
00840   }
00841   if(IsBackground())
00842   {
00843      if(LowBgCuts.emShowerFraction < 0) return true;
00844      if(emfrac < LowBgCuts.emShowerFraction)
00845         goodEvent = false;
00846   }
00847                                                                              
00848   return goodEvent;
00849 }

bool NueAnalysisCuts::PassesLowEnergyCut (  ) 

Definition at line 463 of file NueAnalysisCuts.cxx.

References eventInfo, HighCuts, IsValid(), kMEUPerGeV, LowCuts, NtpSRStripPulseHeight::mip, nrInfo, NtpSREvent::ph, ANtpEventInfoNue::phNueGeV, NueRecord::srevent, and stInfo.

Referenced by NueDisplayModule::PassCuts(), and PassesAllCuts().

00464 {
00465    if(!IsValid()) return false;
00466    bool goodEvent = true;
00467    if(LowCuts.srevent.phNueGeV < 0) return goodEvent;
00468                                  
00469    if(nrInfo){
00470       if(nrInfo->srevent.phNueGeV < HighCuts.srevent.phNueGeV)
00471         goodEvent = false;
00472    }else
00473    if(stInfo && eventInfo){
00474       float EnergyInNueGeV = eventInfo->ph.mip;
00475       EnergyInNueGeV = EnergyInNueGeV/kMEUPerGeV;
00476                                            
00477       if(EnergyInNueGeV < HighCuts.srevent.phNueGeV)
00478         goodEvent = false;
00479    }
00480    
00481    return goodEvent;
00482 }

bool NueAnalysisCuts::PassesLowPhNPlaneCut (  ) 

Definition at line 637 of file NueAnalysisCuts.cxx.

References Shwfit::hiPhPlaneCountM2, IsValid(), Msg::kError, LowCuts, MAXMSG, nrInfo, NueRecord::shwfit, and stInfo.

Referenced by PassesAllCuts().

00638 {
00639    if(!IsValid()) return false;
00640                                                                              
00641    bool goodEvent = true;
00642    if(LowCuts.shwfit.hiPhPlaneCountM2 < 0) return goodEvent;
00643                                                                              
00644    if(nrInfo){
00645       if(nrInfo->shwfit.hiPhPlaneCountM2 < LowCuts.shwfit.hiPhPlaneCountM2)
00646         goodEvent = false;
00647    }else
00648    if(stInfo){
00649       MAXMSG("NueAnalysisCuts",Msg::kError,10)
00650         <<"PhNPlaneCutM2 may only be called on ana_nue files"
00651         <<" the cut will not be applied"<<endl;
00652    }
00653                                                                              
00654    return goodEvent;
00655 }

bool NueAnalysisCuts::PassesLowPhNStripCut (  ) 

Definition at line 617 of file NueAnalysisCuts.cxx.

References Shwfit::hiPhStripCount, IsValid(), Msg::kError, LowCuts, MAXMSG, nrInfo, NueRecord::shwfit, and stInfo.

Referenced by PassesAllCuts().

00618 {
00619    if(!IsValid()) return false;
00620                                                                              
00621    bool goodEvent = true;
00622    if(LowCuts.shwfit.hiPhStripCount < 0) return goodEvent;
00623                                                                              
00624    if(nrInfo){
00625       if(nrInfo->shwfit.hiPhStripCount < LowCuts.shwfit.hiPhStripCount)
00626         goodEvent = false;
00627    }else
00628    if(stInfo){
00629       MAXMSG("NueAnalysisCuts",Msg::kError,10)
00630         <<"PhNStripCut may only be called on ana_nue files"
00631         <<" the cut will not be applied"<<endl;
00632    }
00633                                                                              
00634    return goodEvent;
00635 }

bool NueAnalysisCuts::PassesLowShowerEnergyCut (  ) 

Definition at line 410 of file NueAnalysisCuts.cxx.

References eventInfo, IsValid(), kMEUPerGeV, LowCuts, NtpSRStripPulseHeight::mip, nrInfo, NtpSREvent::nshower, NtpSRShower::ph, ANtpShowerInfoNue::phNueGeV, showerInfo, ANtpEventInfo::showers, NueRecord::srevent, NueRecord::srshower, and stInfo.

Referenced by NueDisplayModule::PassCuts(), and PassesAllCuts().

00411 {
00412    if(!IsValid()) return false;
00413    
00414    bool goodEvent = true;
00415    if(LowCuts.srshower.phNueGeV < 0) return goodEvent;
00416    
00417    if(nrInfo){
00418       int nShw = nrInfo->srevent.showers;                                                                                
00419       if(nShw == 0) goodEvent = false;
00420       if(nShw == 1 && nrInfo->srshower.phNueGeV < LowCuts.srshower.phNueGeV)
00421         goodEvent = false;
00422       if(nShw > 1 && nrInfo->srshower.phNueGeV < LowCuts.srshower.phNueGeV/2)
00423         goodEvent = false;
00424 
00425    }else
00426    if(stInfo && showerInfo){
00427       float EnergyInNueGeV = showerInfo->ph.mip;
00428       EnergyInNueGeV = EnergyInNueGeV/kMEUPerGeV;
00429       int nShw = eventInfo->nshower;
00430 
00431       if(nShw == 0) goodEvent = false;
00432       if(nShw == 1 && EnergyInNueGeV < LowCuts.srshower.phNueGeV)
00433         goodEvent = false;
00434       if(nShw > 1 && EnergyInNueGeV < LowCuts.srshower.phNueGeV/2)
00435         goodEvent = false;
00436    }
00437           
00438    return goodEvent;
00439 }

bool NueAnalysisCuts::PassesPhProngCut (  ) 

Definition at line 657 of file NueAnalysisCuts.cxx.

References fPhProngCut, IsValid(), NtpSRStripPulseHeight::mip, nrInfo, NtpSRShower::ph, NtpSRTrack::ph, ANtpTrackInfo::pulseHeight, ANtpShowerInfo::pulseHeight, showerInfo, NueRecord::srshower, NueRecord::srtrack, stInfo, and trackInfo.

Referenced by PassesAllCuts().

00658 {
00659    if(!IsValid()) return false;
00660                                                                              
00661    bool goodEvent = true;
00662    if(fPhProngCut < 0) return goodEvent;
00663                                                                              
00664    if(nrInfo){
00665       float prongPh = TMath::Max(nrInfo->srtrack.pulseHeight,
00666                           nrInfo->srshower.pulseHeight);
00667       if(prongPh< fPhProngCut) 
00668           goodEvent=false;
00669    }else
00670    if(stInfo){
00671      if(showerInfo || trackInfo){
00672         float shwEnergy = 0;
00673         float trkEnergy = 0;
00674         if(showerInfo) shwEnergy = showerInfo->ph.mip;
00675         if(trackInfo)  trkEnergy = trackInfo->ph.mip;        
00676         float prongPh = TMath::Max(shwEnergy, trkEnergy);
00677 
00678         if(prongPh< fPhProngCut)  goodEvent=false;
00679      }else{
00680         goodEvent = false;
00681      }                                          
00682    }
00683   
00684   return goodEvent;
00685 }

bool NueAnalysisCuts::PassesResonanceCode (  ) 

Definition at line 755 of file NueAnalysisCuts.cxx.

References bgResonanceCodes, fCutResCode, NtpMCTruth::iresonance, IsBackground(), IsMC(), IsSignal(), IsValid(), mcInfo, NueRecord::mctrue, nrInfo, ANtpTruthInfoBeam::resonanceCode, and sigResonanceCodes.

Referenced by PassesAllCuts().

00756 {
00757   if(!IsValid()) return false;
00758   if(!IsMC()) return true;
00759   if(fCutResCode != 1) return true;
00760 
00761   bool goodEvent = true;
00762 
00763   int code = 0;
00764   if(nrInfo) code = nrInfo->mctrue.resonanceCode;
00765   if(mcInfo) code = mcInfo->iresonance;
00766 
00767   if(IsSignal() && sigResonanceCodes.size() > 0)
00768   {
00769      goodEvent = false;
00770      for(unsigned int i = 0; i < sigResonanceCodes.size(); i++) 
00771      {
00772         if(code == sigResonanceCodes[i])  goodEvent = true;
00773      }
00774   }                                                  
00775   if(IsBackground() && bgResonanceCodes.size() > 0)
00776   {
00777      goodEvent = false;
00778      for(unsigned int i = 0; i < bgResonanceCodes.size(); i++)
00779      {
00780         if(code == bgResonanceCodes[i])  goodEvent = true;
00781      }
00782   }
00783 
00784   return goodEvent;
00785 }

bool NueAnalysisCuts::PassesTrackLikePlaneCut (  ) 

Definition at line 370 of file NueAnalysisCuts.cxx.

References HighCuts, IsValid(), nrInfo, NtpSRTrackPlane::ntrklike, NtpSRTrack::plane, NueRecord::srtrack, stInfo, trackInfo, and ANtpTrackInfoNue::trklikePlanes.

Referenced by NueDisplayModule::PassCuts(), and PassesAllCuts().

00371 {
00372    if(!IsValid()) return false;
00373    if(HighCuts.srtrack.trklikePlanes < 0) return true;
00374                                                                                 
00375    int planes = 0;
00376    if(nrInfo) planes = nrInfo->srtrack.trklikePlanes;
00377    if(stInfo && trackInfo) planes = trackInfo->plane.ntrklike;
00378                                                                                 
00379    bool goodEvent = planes <= HighCuts.srtrack.trklikePlanes;
00380                                                                                 
00381    return goodEvent;
00382 }

bool NueAnalysisCuts::PassesTrackPlaneCut (  ) 

Definition at line 337 of file NueAnalysisCuts.cxx.

References HighCuts, IsValid(), NtpSRPlane::n, nrInfo, NtpSRTrack::plane, ANtpTrackInfo::planes, NueRecord::srtrack, stInfo, and trackInfo.

Referenced by NueDisplayModule::PassCuts(), and PassesAllCuts().

00338 {
00339    if(!IsValid()) return false;
00340    if(HighCuts.srtrack.planes < 0) return true;
00341 
00342    int planes = 0;
00343    if(nrInfo) planes = nrInfo->srtrack.planes;
00344    if(stInfo && trackInfo) planes = trackInfo->plane.n;
00345 
00346    bool goodEvent = !(planes > HighCuts.srtrack.planes);
00347    
00348    return goodEvent;
00349 }

void NueAnalysisCuts::Report (  ) 

Definition at line 1034 of file NueAnalysisCuts.cxx.

References HighCuts, Msg::kInfo, LowCuts, MSG, and ReportOnRecord().

01035 {
01036    MSG("NueCutReport",Msg::kInfo)
01037        <<"-------------------------- Summary of Cuts ------------------------\n";
01038    ReportOnRecord(&HighCuts, "High End");
01039    ReportOnRecord(&LowCuts, "Low End");
01040 
01041    //Then go and take care of the special casses
01042    MSG("NueCutReport",Msg::kInfo)
01043        <<"-------------------------- End of Summary -------------------------\n";
01044 
01045 
01046 }

void NueAnalysisCuts::ReportOnRecord ( NueRecord nr,
string  ID 
) [private]

Definition at line 1003 of file NueAnalysisCuts.cxx.

References ANtpDefaultValue::IsDefault(), Msg::kInfo, MSG, and NeedsSpecialAttention().

Referenced by Report().

01004 {
01005     TClass *cl;
01006     TRealData *rd;
01007     TDataMember *member;
01008     TDataType *membertype;
01009     Float_t value = 0.0;
01010     string vName;
01011                                                                            
01012     cl=nr->IsA();
01013     TIter  next(cl->GetListOfRealData());
01014      
01015     while ((rd =dynamic_cast<TRealData*>(next()))) {
01016       member = rd->GetDataMember();
01017       membertype = member->GetDataType();
01018       vName=rd->GetName();
01019       
01020       Int_t offset = rd->GetThisOffset();
01021       char *pointer = (char*)nr  + offset;
01022       value = -9999;
01023       if(!NeedsSpecialAttention(vName)){
01024            value=atof(membertype->AsString(pointer));
01025            if(!ANtpDefVal::IsDefault(value) &&
01026                 !ANtpDefVal::IsDefault(static_cast<Double_t> (value)) &&
01027                 !ANtpDefVal::IsDefault(static_cast<Int_t> (value))){
01028                      MSG("NueCutReport",Msg::kInfo)<<ID<<"Cut applied on variable "<<vName<<" with value "<<value<<endl;
01029            } 
01030       }
01031    }
01032 }

void NueAnalysisCuts::Reset (  ) 
void NueAnalysisCuts::SetInfoObject ( int  evtn,
NtpSRRecord st,
NtpMCRecord mcobj = 0,
NtpTHRecord thobj = 0 
)

Definition at line 85 of file NueAnalysisCuts.cxx.

References RecRecordImp< T >::GetHeader(), RecDataHeader::GetRun(), RecHeader::GetVldContext(), nrInfo, ntpManipulator, run(), SetNtpInfoObjects(), ANtpRecoNtpManipulator::SetRecord(), and srInfo.

00086 {
00087     if(!st) return;                                                                                                       
00088     srInfo = st;                                                                   
00089     VldContext vc;
00090     vc=st->GetHeader().GetVldContext();
00091 
00092     int run = st->GetHeader().GetRun();
00093     ntpManipulator.SetRecord(st, mcobj, thobj);
00094     SetNtpInfoObjects(evtn,run,vc);                                                                                       
00095     nrInfo = NULL;
00096 }

void NueAnalysisCuts::SetInfoObject ( int  evtn,
NtpStRecord st 
)

Definition at line 69 of file NueAnalysisCuts.cxx.

References RecRecordImp< T >::GetHeader(), RecDataHeader::GetRun(), RecHeader::GetVldContext(), nrInfo, ntpManipulator, run(), SetNtpInfoObjects(), ANtpRecoNtpManipulator::SetRecord(), and stInfo.

00070 {
00071     if(!st) return;
00072 
00073     stInfo = st;
00074 
00075     VldContext vc;
00076     vc=st->GetHeader().GetVldContext();
00077  
00078     int run = st->GetHeader().GetRun();
00079     ntpManipulator.SetRecord(st);
00080     SetNtpInfoObjects(evtn,run, vc);
00081     
00082     nrInfo = NULL;
00083 }

void NueAnalysisCuts::SetInfoObject ( NueRecord nr  ) 
void NueAnalysisCuts::SetNtpInfoObjects ( int  evtn,
int  run,
VldContext vc 
)

Definition at line 98 of file NueAnalysisCuts.cxx.

References eventInfo, fDetectorType, fEventNum, fSimFlag, VldContext::GetDetector(), ANtpEventManipulator::GetEvent(), ANtpRecoNtpManipulator::GetEventManipulator(), ANtpRecoNtpManipulator::GetMCManipulator(), CalMIPCalibration::GetMIP(), ANtpMCManipulator::GetNtpMCTruth(), ANtpMCManipulator::GetNtpTHEvent(), DbiResultPtr< T >::GetNumRows(), ANtpEventManipulator::GetPrimaryShower(), AtNuAnaUtil::GetPrimaryTrack(), DbiResultPtr< T >::GetRow(), VldContext::GetSimFlag(), kSigCorrPerMEU, Munits::m, mcInfo, NtpTHEvent::neumc, ntpManipulator, ANtpEventManipulator::SetEventInSnarl(), ANtpRecoNtpManipulator::SetPrimaryShowerCriteria(), ANtpRecoNtpManipulator::SetPrimaryTrackCriteria(), showerInfo, stInfo, thEventInfo, and trackInfo.

Referenced by SetInfoObject().

00099 {
00100     fDetectorType = vc.GetDetector();
00101     fSimFlag = vc.GetSimFlag();
00102 
00103     fEventNum = evtn;
00104     ntpManipulator.SetPrimaryShowerCriteria(0,1); // nplanes, ph
00105     ntpManipulator.SetPrimaryTrackCriteria(0,1,0); //nplanes, length, ph
00106 
00107     ANtpEventManipulator * ntpEventManipulator =
00108                               ntpManipulator.GetEventManipulator();
00109     ntpEventManipulator->SetEventInSnarl(evtn);
00110  
00111     eventInfo=ntpEventManipulator->GetEvent();
00112     showerInfo = ntpEventManipulator->GetPrimaryShower();
00113     trackInfo = SntpHelpers::GetPrimaryTrack(evtn, stInfo);
00114     thEventInfo = ntpManipulator.GetMCManipulator()->GetNtpTHEvent(evtn);
00115 
00116     if(thEventInfo){
00117       mcInfo = ntpManipulator.GetMCManipulator()->GetNtpMCTruth(thEventInfo->neumc);
00118 //      mcstdhep = ntpManipulator.GetMCManipulator()->GetNtpMCStdHep(thevent->neustdhep);
00119     }
00120                
00121     static int currentRun = 0;
00122     if(run != currentRun)
00123     {
00124         DbiResultPtr<CalMIPCalibration> dbp(vc);
00125         if(dbp.GetNumRows()>0){
00126            const CalMIPCalibration *m = dbp.GetRow(0);
00127            float mip=m->GetMIP(1.);
00128            if(mip>0){
00129              kSigCorrPerMEU=1./mip;
00130            }
00131         }
00132         currentRun = run;
00133     }
00134 }


Member Data Documentation

Definition at line 116 of file NueAnalysisCuts.h.

Referenced by Config(), and IsBackground().

Definition at line 120 of file NueAnalysisCuts.h.

Referenced by Config(), and PassesResonanceCode().

Definition at line 104 of file NueAnalysisCuts.h.

Referenced by Config(), IsGoodBeam(), and Reset().

Definition at line 105 of file NueAnalysisCuts.h.

Referenced by Config(), PassesHotChannel(), and Reset().

Definition at line 102 of file NueAnalysisCuts.h.

Referenced by Config(), PassesFullContainment(), and Reset().

Definition at line 114 of file NueAnalysisCuts.h.

Referenced by Config(), IsBackground(), IsSignal(), and PassesCutOnClasses().

Definition at line 118 of file NueAnalysisCuts.h.

Referenced by Config(), and PassesResonanceCode().

Definition at line 141 of file NueAnalysisCuts.h.

Referenced by PassesFileCut(), Reset(), and SetNtpInfoObjects().

Definition at line 99 of file NueAnalysisCuts.h.

Referenced by Config(), PassesFiducialVolume(), and Reset().

Definition at line 100 of file NueAnalysisCuts.h.

Referenced by Config(), IsInsideFarFiducial(), IsInsideNearFiducial(), and Reset().

Definition at line 101 of file NueAnalysisCuts.h.

Referenced by Config(), FillVertexPosition(), and Reset().

std::string NueAnalysisCuts::fFileCutName [private]

Definition at line 110 of file NueAnalysisCuts.h.

Referenced by Config(), and PassesFileCut().

Definition at line 109 of file NueAnalysisCuts.h.

Referenced by Config(), PassesFileCut(), and Reset().

Definition at line 107 of file NueAnalysisCuts.h.

Referenced by Config(), PassesPhProngCut(), and Reset().

Definition at line 106 of file NueAnalysisCuts.h.

Referenced by Config(), PassesHornCurrent(), and Reset().

Definition at line 123 of file NueAnalysisCuts.h.

Referenced by Config(), and PassesHighEMFraction().

Definition at line 121 of file NueAnalysisCuts.h.

Referenced by Config(), and PassesHighEMFraction().

float NueAnalysisCuts::kMEUPerGeV [private]
std::string NueAnalysisCuts::kOutputFile [private]

Definition at line 112 of file NueAnalysisCuts.h.

Referenced by Config().

Definition at line 95 of file NueAnalysisCuts.h.

Referenced by NueAnalysisCuts(), and SetNtpInfoObjects().

Definition at line 124 of file NueAnalysisCuts.h.

Referenced by Config(), and PassesLowEMFraction().

Definition at line 122 of file NueAnalysisCuts.h.

Referenced by Config(), and PassesLowEMFraction().

Definition at line 133 of file NueAnalysisCuts.h.

Referenced by PassesHotChannel(), SetInfoObject(), and SetNtpInfoObjects().

Definition at line 115 of file NueAnalysisCuts.h.

Referenced by Config(), and IsSignal().

Definition at line 119 of file NueAnalysisCuts.h.

Referenced by Config(), and PassesResonanceCode().

Definition at line 131 of file NueAnalysisCuts.h.

Referenced by IsValid(), and SetInfoObject().

Definition at line 139 of file NueAnalysisCuts.h.

Referenced by SetNtpInfoObjects().


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

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1