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

NuCutImps::CCA Class Reference

#include <NuCutImps.h>

Inheritance diagram for NuCutImps::CCA:

NuCut List of all members.

Public Member Functions

 CCA (const NuPlots *plots=0, TString ana="CCA")
virtual Bool_t InFidVol (const NuEvent &nu) const
void Preselection (const NuEvent &nu)
void Selection (const NuEvent &nu)
void Resolution (const NuEvent &nu)
void SetCutFile (const char *filename)

Private Attributes

CCAPresel fCCAPresel
TTree * rescuts
TString cutstring

Constructor & Destructor Documentation

NuCutImps::CCA::CCA const NuPlots plots = 0,
TString  ana = "CCA"
 

Definition at line 443 of file NuCutImps.cxx.

References cutstring, MSG, plots(), SetCutFile(), and NuCut::SetFidVol().

00443                                             : 
00444     NuCut("CCA", plots), rescuts(0), cutstring("")
00445   {
00446     SetFidVol("cc2008");
00447     cutstring=ana;
00448     SetCutFile("/minos/data/users/sjc/kNN_MicroDST/cuts_numu_D07d3.root");
00449     MSG("NuCutImps",Msg::kInfo)
00450       <<"Initializing resolution binning for "<<cutstring<<endl;
00451   }


Member Function Documentation

Bool_t NuCutImps::CCA::InFidVol const NuEvent nu  )  const [virtual]
 

Fiducial volume calculation function. This is the basic 'infid' derived version, and should be overridden/passed to for any more complicated evaluations.

Reimplemented from NuCut.

Definition at line 469 of file NuCutImps.cxx.

References NuCut::InFidVol(), and NuEvent::zTrkVtx.

Referenced by Preselection().

00470   {
00471     // Move trk vtx upstream by 3.92cm from scintillator to steel
00472     // for this analysis version
00473     NuEvent nuc = nu;
00474     nuc.zTrkVtx = nu.zTrkVtx - (0.0392*Munits::m);
00475     
00476     return NuCut::InFidVol(nuc);
00477   }

void NuCutImps::CCA::Preselection const NuEvent nu  )  [virtual]
 

Implements NuCut.

Definition at line 480 of file NuCutImps.cxx.

References NuCut::Defer_Preselection(), NuEvent::detector, NuEvent::dirCosNu, fCCAPresel, InFidVol(), NuCut::Keep_If(), NuEvent::ntrk, and NuEvent::trkfitpass.

00481   {
00482     // Do the base preselection (shared between CC and NC)
00483     Defer_Preselection(fCCAPresel, nu);
00484     
00485     // Now do the rest of the preselection
00486     
00487     // Good tracks
00488     Keep_If(nu.ntrk >= 1, "GoodNumberofTracks");
00489     
00490     // Is it in the fiducial volume?
00491     // ntrk cut to suppress warnings
00492     Keep_If(nu.ntrk > 0 && InFidVol(nu), "FidVol");
00493 
00494     // Per-detector cuts
00495     if (nu.detector == Detector::kFar)
00496     {
00497       // TrackFitPass
00498       Keep_If(nu.trkfitpass == 1, "trackfitpass");
00499       
00500       // Cut on track direction angle
00501       Keep_If(nu.dirCosNu > 0.6);
00502       
00503     }  
00504     else if (nu.detector == Detector::kNear)
00505     {
00506       // Need to implement ND Trackfitpass (uses reclamation)
00507       // See Zeynep talk DocDB-6382 - mentions 'Nikis Reclamation'
00508       Keep_If(NuCuts::IsGoodTrackFitPassReclamation(nu), "trackfitreclamation");
00509     }
00510   }

void NuCutImps::CCA::Resolution const NuEvent nu  ) 
 

Definition at line 530 of file NuCutImps.cxx.

References cutstring, NuEvent::energy, NuCut::Keep_If(), MAXMSG, rescuts, and NuEvent::resolution.

00531   {
00532     Double_t low_en_edge=0.0;
00533     Double_t high_en_edge=0.0;
00534     Double_t low_res_edge=0.0;
00535     Double_t high_res_edge=0.0;
00536     Double_t quantiles[6];
00537     
00538     rescuts->SetBranchAddress("quantiles",quantiles);
00539     rescuts->SetBranchAddress("lowedge",&low_en_edge);
00540     rescuts->SetBranchAddress("highedge",&high_en_edge);
00541     
00542     rescuts->GetEntry(rescuts->GetEntries());
00543     
00544 
00545     for(Int_t i=0;i<rescuts->GetEntries();i++){
00546       rescuts->GetEntry(i);
00547       
00548       if(cutstring=="CCA_0"){
00549         low_res_edge=0.0;
00550         high_res_edge=quantiles[1];
00551       }
00552       if(cutstring=="CCA_1"){
00553         low_res_edge=quantiles[1];
00554         high_res_edge=quantiles[2];
00555       }
00556       if(cutstring=="CCA_2"){
00557         low_res_edge=quantiles[2];
00558         high_res_edge=quantiles[3];
00559       }
00560       if(cutstring=="CCA_3"){
00561         low_res_edge=quantiles[3];
00562         high_res_edge=quantiles[4];
00563       }
00564       if(cutstring=="CCA_4"){
00565         low_res_edge=quantiles[4];
00566         high_res_edge=9999999;
00567       }
00568       
00569       if(nu.energy>low_en_edge && nu.energy<high_en_edge){
00570         MAXMSG("NuCutImps",Msg::kInfo,20)
00571           <<"Entry:"<<i<<" Energy:"<<nu.energy<<" sigma/E:"<<(nu.resolution/nu.energy)<<endl
00572           <<"Keep if between "<<low_res_edge<<" and "<<high_res_edge<<endl;
00573         Keep_If((nu.resolution/nu.energy)>low_res_edge && (nu.resolution/nu.energy)<high_res_edge,"resolution");
00574         return;
00575       }
00576     }
00577   }

void NuCutImps::CCA::Selection const NuEvent nu  )  [virtual]
 

Implements NuCut.

Definition at line 513 of file NuCutImps.cxx.

References NuEvent::charge, cutstring, NuCut::Keep_If(), and NuEvent::roID.

00514   {
00515     Keep_If(nu.roID>0.3);
00516     
00517     if(cutstring=="CCA") return;
00518     
00519     if(cutstring=="CCA_NUBAR"){
00520       Keep_If(nu.charge>0);
00521     }
00522     
00523     else{
00524       if(nu.detector == Detector::kFar/* && nu.charge<0*/){
00525         Resolution(nu);
00526       }
00527     }
00528   }

void NuCutImps::CCA::SetCutFile const char *  filename  ) 
 

Definition at line 453 of file NuCutImps.cxx.

References MSG, and rescuts.

Referenced by CCA().

00454   {
00455     TDirectory *tmpd = gDirectory; //get the right path
00456     TFile *cutfile = new TFile(filename,"READ");
00457     gDirectory = tmpd;
00458     if(cutfile->IsZombie()){
00459       MSG("NuCutImps",Msg::kWarning)<<"cutfile does not exist" << endl;
00460       return;
00461     }
00462     rescuts = (TTree *)cutfile->Get("cuts");
00463     MSG("NuCutImps",Msg::kWarning)<<"cutfile exists: "
00464                                   <<rescuts->GetEntries()<<" entries"<<endl;
00465   }


Member Data Documentation

TString NuCutImps::CCA::cutstring [private]
 

Definition at line 132 of file NuCutImps.h.

Referenced by CCA(), Resolution(), and Selection().

CCAPresel NuCutImps::CCA::fCCAPresel [private]
 

Definition at line 119 of file NuCutImps.h.

Referenced by Preselection().

TTree* NuCutImps::CCA::rescuts [private]
 

Definition at line 131 of file NuCutImps.h.

Referenced by Resolution(), and SetCutFile().


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