NearAna.h File Reference

#include <string>
#include <vector>
#include "TH1.h"
#include "TH2.h"
#include "MCNNAnalysis/ComparisonResult.h"

Go to the source code of this file.

Typedefs

typedef std::vector< MinosStrip * > StripVec

Functions

void MyInit ()
void BuildEventLibrary ()
void MyAnalysis ()
void MyEnd ()
void UserInit ()
MinosAnalysisResultUserAnalysis (MinosCompactEvent *)
void UserAnalysis ()
void UserEnd ()
bool MCLibraryPreselected (MinosEvent *event)
bool DataPreselected (const NtpStRecord *event, const int eventno)
void FillWorkSpaceA (MinosCompactEvent *event)
void FillWorkSpaceB (MinosCompactEvent *event)
void ClearWorkSpaceA (MinosCompactEvent *event)
void ClearWorkSpaceB (MinosCompactEvent *event)
comparisonResult_h CompareEvents (MinosCompactEvent *eventA, MinosCompactEvent *eventB)
comparisonResult_h CompareEvents (MinosCompactEvent *eventA, MinosCompactEvent *eventB, int ip, int isU, int isV)
void CompareEventsDebug (MinosCompactEvent *eventA, MinosCompactEvent *eventB, int ip, int isU, int isV)
ComparisonResultCompareEventsP (MinosCompactEvent *eventA, MinosCompactEvent *eventB)

Variables

std::string files [1000]
int nEventsOut
std::vector< MinosCompactEvent * > _eventsNC
std::vector< MinosCompactEvent * > _eventsCCNuE
std::vector< MinosCompactEvent * > _eventsCCNuMu
std::vector< MinosCompactEvent * > _eventsCCNuTau
std::vector< MinosCompactEvent * > _eventsAll
std::vector< MinosCompactEvent * > _eventsData
std::vector< MinosCompactEvent * > _eventsRawData
std::vector< MinosEvent_minosEventsData
std::vector< StripVec_eventStrips
std::vector< TH1 * > Histograms1D
std::vector< TH2 * > Histograms2D
TH1 * h_Nstrips
TH1 * h_Nplanes
TH1 * h_Qtot
TH1 * h_Enu
TH1 * h_EnuPre
TH1 * h_EnuNC
TH1 * h_EnuNCPre
TH1 * h_EnuCCNumu
TH1 * h_EnuCCNumuPre
TH1 * h_EnuCCNue
TH1 * h_EnuCCNuePre
TH1 * h_EnuCCNutau
TH1 * h_EnuCCNutauPre
TH1 * h_EnuOsc
TH1 * h_z
TH2 * h_xy
TH1 * h_zPre
TH2 * h_xyPre
TH1 * h_zFid
TH2 * h_xyFid
TH2 * h_CCMatchEE
TH1 * h_CCMatchAQ
TH1 * h_CCOscMatchAQ
TH1 * h_CCMatchAS
TH1 * h_CCOscMatchAS
TH2 * h_CCMatchAP
TH1 * h_DLnL
TH1 * h_DOscLnL
TH2 * h_DOscLnLY
TH1 * h_fracCC
TH1 * h_fracCCOsc
TH2 * h_fracCCOscY
TH2 * h_fracCCOscQ
TH1 * h_fracWCC
TH1 * h_fracWCCOsc
TH1 * h_EVisSel
TH1 * h_EObsSel
MinosEventDisplayeventDisplay
PECalculatorpeCalculator
int _workSpaceA [201][201]
int _workSpaceB [201][201]

Typedef Documentation

typedef std::vector<MinosStrip*> StripVec

Definition at line 16 of file NearAna.h.


Function Documentation

void BuildEventLibrary (  ) 
void ClearWorkSpaceA ( MinosCompactEvent event  ) 
void ClearWorkSpaceB ( MinosCompactEvent event  ) 
comparisonResult_h CompareEvents ( MinosCompactEvent eventA,
MinosCompactEvent eventB,
int  ip,
int  isU,
int  isV 
)
comparisonResult_h CompareEvents ( MinosCompactEvent eventA,
MinosCompactEvent eventB 
)
void CompareEventsDebug ( MinosCompactEvent eventA,
MinosCompactEvent eventB,
int  ip,
int  isU,
int  isV 
)
ComparisonResult* CompareEventsP ( MinosCompactEvent eventA,
MinosCompactEvent eventB 
)
bool DataPreselected ( const NtpStRecord event,
const int  eventno 
)

Definition at line 157 of file MCNNFunctions.h.

References NtpTools::GetEvent().

00157                                                                   {
00158 
00159   bool isPreselected = true;
00160   const NtpSREvent* event = NtpTools::GetEvent(record, eventno); 
00161   if(event->ph.pe<50) isPreselected = 0; 
00162   if(event->ph.pe>10000) isPreselected = 0;
00163   if(event->plane.nu<2) isPreselected = 0;
00164   if(event->plane.nv<2) isPreselected = 0;
00165   if(event->plane.n<5) isPreselected = 0;
00166   if(event->plane.n>30) isPreselected = 0;
00167   if(event->nstrip<8) isPreselected = 0;
00168   if(event->nstrip>80) isPreselected = 0;
00169 
00170   return isPreselected;
00171 }

void FillWorkSpaceA ( MinosCompactEvent event  ) 
void FillWorkSpaceB ( MinosCompactEvent event  ) 
bool MCLibraryPreselected ( MinosEvent event  ) 

Definition at line 332 of file MCNNFunctions.h.

References MinosMC::IDact, nPlanes, MinosStrip::Plane, MinosStrip::QPEcorr, MinosStrip::Strip, MinosEvent::StripList, and MinosStrip::View.

00332                                             {
00333   //================================================================
00334   // applies some preselection to the MC events in the ibrary
00335   // Author: Caius Howcroft (&Mark Thomson?)
00336   //================================================================
00337   
00338   //NOTE: this is OBSOLETE NOW. Has not been duly updated
00339 
00340   bool isPreselected = false;
00341 
00342   bool planes[500];
00343   for(int i=0;i<500;++i)planes[i]=false;
00344 
00345   // loop over the strips to determine number of u and v strips to be stored
00346   const int nstrips = (int)(event->StripList->GetEntries());
00347   const MinosMC& eventMC = event->MCInfo;
00348 
00349   // Don't process NC events in electron/tau neutrino samples
00350   int runType = event->Run;
00351   runType = runType/100000;
00352   if(runType==211&&eventMC.IDact==0)return false;
00353   if(runType==213&&eventMC.IDact==0)return false;
00354 
00355   //  if(DEBUG)cout << " PRESELECTION : " << nstrips << endl;
00356   float sumQ = 0.;
00357   float sumQU = 0.;
00358   float sumQV = 0.;
00359   float sumU = 0.;
00360   float sumV = 0.;
00361   int   nU   = 0;
00362   int   nV   = 0;
00363   for(int istp = 0; istp< nstrips; istp++){
00364     const MinosStrip* strip = dynamic_cast<const MinosStrip*>(event->StripList->At(istp));
00365     //    if(DEBUG)cout << " strip : " << istp << " " << strip << endl;
00366     float qpe = strip->QPEcorr[0]+strip->QPEcorr[1];
00367     sumQ  += qpe;   
00368     if(strip->View==0){
00369       nU++;
00370       sumU  += strip->Strip*qpe;
00371       sumQU += qpe; 
00372    }
00373     if(strip->View==1){
00374       nV++;
00375       sumV  += strip->Strip*qpe;
00376       sumQV += qpe;
00377     }
00378     planes[strip->Plane]=true;
00379   }
00380   
00381   float nPlanes = 0.;
00382   int firstPlane =  999;
00383   int lastPlane  = -999;
00384 
00385   for(int i=0;i<500;++i){
00386     if(planes[i]){
00387       nPlanes++;
00388       if(i<firstPlane)firstPlane=i;
00389       if(i>lastPlane)lastPlane=i;
00390     }
00391   }
00392 
00393   // no selection at the moment so pass everything
00394   isPreselected = true;
00395   float meanU = -96.*0.041666;//<--
00396   float meanV = -96.*0.041666;  
00397   if(nU!=0){
00398     meanU = (sumU/sumQU-96.)*0.041666;
00399   }
00400   if(nV!=0){
00401     meanV = (sumV/sumQV-96.)*0.041666;
00402   }
00403   float meanX = (meanU+meanV)/1.41421;
00404   float meanY = (meanU-meanV)/1.41421;
00405 
00406 
00407   // ------------ Fiducial Cuts ---------------------
00408   // cut out start of SM1
00409   if(firstPlane<5)isPreselected = false;
00410   // cut out end of SM2
00411   if(lastPlane>481)isPreselected = false;
00412   // cut out events cross SMs
00413   if(firstPlane<249&&lastPlane>249)isPreselected = false;
00414   // cut out start of SM2
00415   if(firstPlane>=249&&firstPlane<=251)isPreselected = false;
00416   // cut end of SM1
00417   if(lastPlane>=247&&lastPlane<=249)isPreselected = false;
00418   // cut away 25 cm from detector edges
00419   if(isPreselected){
00420     if(fabs(meanU)>3.75)isPreselected = false;
00421     if(fabs(meanV)>3.75)isPreselected = false;
00422     if(fabs(meanX)>3.75)isPreselected = false;
00423     if(fabs(meanY)>3.75)isPreselected = false;
00424   }
00425   // remove 0.4m radius around coil hole
00426   if(meanU*meanU+meanV*meanV<0.16)isPreselected = false;
00427 
00428   // ---------------- nue cuts -----------------------
00429   if(nU<2)isPreselected = false;
00430   if(nV<2)isPreselected = false;
00431   if(nPlanes<5.5)isPreselected = false;
00432   if(nPlanes>30.5)isPreselected = false;
00433   if(nstrips<7.5)isPreselected = false;
00434   if(nstrips>80.)isPreselected = false;
00435   if(sumQ<50.)isPreselected = false;
00436   if(sumQ>1600.)isPreselected = false;
00437 
00438   return isPreselected;
00439 
00440 }

void MyAnalysis (  ) 
void MyEnd (  ) 
void MyInit (  ) 
void UserAnalysis (  ) 
void UserEnd (  ) 
void UserInit (  ) 

Variable Documentation

Definition at line 54 of file NearAna.h.

Definition at line 51 of file NearAna.h.

Definition at line 52 of file NearAna.h.

Definition at line 53 of file NearAna.h.

Definition at line 57 of file NearAna.h.

Definition at line 50 of file NearAna.h.

Definition at line 58 of file NearAna.h.

std::vector<StripVec> _eventStrips

Definition at line 60 of file NearAna.h.

Definition at line 59 of file NearAna.h.

int _workSpaceA[201][201]

Definition at line 111 of file NearAna.h.

int _workSpaceB[201][201]

Definition at line 112 of file NearAna.h.

Definition at line 107 of file NearAna.h.

std::string files[1000]

Definition at line 46 of file NearAna.h.

Definition at line 94 of file NearAna.h.

Definition at line 90 of file NearAna.h.

Definition at line 92 of file NearAna.h.

Definition at line 89 of file NearAna.h.

Definition at line 91 of file NearAna.h.

Definition at line 93 of file NearAna.h.

TH1* h_DLnL

Definition at line 95 of file NearAna.h.

TH1* h_DOscLnL

Definition at line 96 of file NearAna.h.

TH2* h_DOscLnLY

Definition at line 97 of file NearAna.h.

TH1* h_Enu

Definition at line 72 of file NearAna.h.

TH1* h_EnuCCNue

Definition at line 78 of file NearAna.h.

Definition at line 79 of file NearAna.h.

Definition at line 76 of file NearAna.h.

Definition at line 77 of file NearAna.h.

Definition at line 80 of file NearAna.h.

Definition at line 81 of file NearAna.h.

TH1* h_EnuNC

Definition at line 74 of file NearAna.h.

TH1* h_EnuNCPre

Definition at line 75 of file NearAna.h.

TH1* h_EnuOsc

Definition at line 82 of file NearAna.h.

TH1* h_EnuPre

Definition at line 73 of file NearAna.h.

TH1* h_EObsSel

Definition at line 105 of file NearAna.h.

TH1* h_EVisSel

Definition at line 104 of file NearAna.h.

TH1* h_fracCC

Definition at line 98 of file NearAna.h.

Definition at line 99 of file NearAna.h.

Definition at line 101 of file NearAna.h.

Definition at line 100 of file NearAna.h.

TH1* h_fracWCC

Definition at line 102 of file NearAna.h.

Definition at line 103 of file NearAna.h.

TH1* h_Nplanes

Definition at line 70 of file NearAna.h.

TH1* h_Nstrips

Definition at line 69 of file NearAna.h.

TH1* h_Qtot

Definition at line 71 of file NearAna.h.

TH2* h_xy

Definition at line 84 of file NearAna.h.

TH2* h_xyFid

Definition at line 88 of file NearAna.h.

TH2* h_xyPre

Definition at line 86 of file NearAna.h.

TH1* h_z

Definition at line 83 of file NearAna.h.

TH1* h_zFid

Definition at line 87 of file NearAna.h.

TH1* h_zPre

Definition at line 85 of file NearAna.h.

std::vector<TH1*> Histograms1D

Definition at line 65 of file NearAna.h.

std::vector<TH2*> Histograms2D

Definition at line 66 of file NearAna.h.

Definition at line 47 of file NearAna.h.

Definition at line 108 of file NearAna.h.


Generated on 22 Nov 2017 for loon by  doxygen 1.6.1