AnalysisMasks.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "CAFAna/Core/Cut.h"
4 
6 
7 #include <bitset>
8 
9 namespace ana
10 {
11  std::pair<int, int> calcFirstLastLivePlane(int plane,
12  std::bitset<14> binary,
14 
15  /// Cut to introduce Analysis diblock masking rules at CAFAna stage
16  /// to work around cases where RunHistory did not apply the rules at the
17  /// reco stage. Keep any section of detector larger then 4 diblocks
19 
20  /// A cut to select only events in a very small central region of the detector.
21  extern const Cut kBoxCutIdeal;
22 
23  /// A cut to select only events in the fiducial region of the detector.
24  /// Probably isn't perfect, but keeps about 98% of the fiducial mass.
25  extern const Cut kBoxCut;
26 }
27 
28 
Det_t
Which NOvA detector?
Definition: SREnums.h:7
Far Detector at Ash River.
Definition: SREnums.h:11
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
const Cut kApplySecondAnalysisMask([](const caf::SRProxy *sr){if(sr->hdr.det!=caf::kFARDET) return true; std::bitset< 14 > binary(sr->hdr.dibmask);std::pair< int, int > planesA=calcFirstLastLivePlane(sr->slc.firstplane, binary);std::pair< int, int > planesB=calcFirstLastLivePlane(sr->slc.lastplane, binary);if((planesA.first!=planesB.first)||(planesA.second!=planesB.second)) return false;return((planesA.second-planesA.first+1)/64 >=4);})
Definition: AnalysisMasks.h:18
const Cut kBoxCut([](const caf::SRProxy *sr){if(sr->mc.nnu==0) return false;if(sr->mc.nu[0].vtx.x< -762) return false;if(sr->mc.nu[0].vtx.x > 763) return false;if(sr->mc.nu[0].vtx.y< -762) return false;if(sr->mc.nu[0].vtx.y > 763) return false;std::bitset< 14 > binary(sr->hdr.dibmask);std::pair< int, int > planesA=calcFirstLastLivePlane(sr->slc.firstplane, binary);std::pair< int, int > planesB=calcFirstLastLivePlane(sr->slc.lastplane, binary);if((planesA.first!=planesB.first)||(planesA.second!=planesB.second)) return false;if((planesA.second-planesA.first+1)/64< 4) return false;int first=planesA.first/64;int last=(planesA.second+1)/64;if(sr->mc.nu[0].vtx.z< ((first)*426.0)) return false;if(sr->mc.nu[0].vtx.z >((last)*426.0)) return false;return true;})
Definition: AnalysisMasks.h:25
const Cut kBoxCutIdeal([](const caf::SRProxy *sr){if(sr->mc.nnu==0) return false;std::bitset< 14 > binary(sr->hdr.dibmask);std::pair< int, int > planesA=calcFirstLastLivePlane(sr->slc.firstplane, binary);std::pair< int, int > planesB=calcFirstLastLivePlane(sr->slc.lastplane, binary);if((planesA.first!=planesB.first)||(planesA.second!=planesB.second)) return false;if((planesA.second-planesA.first+1)/64< 14) return false;if(sr->mc.nu[0].vtx.x< -100) return false;if(sr->mc.nu[0].vtx.x > 100) return false;if(sr->mc.nu[0].vtx.y< -100) return false;if(sr->mc.nu[0].vtx.y > 100) return false;if(sr->mc.nu[0].vtx.z< 1000) return false;if(sr->mc.nu[0].vtx.z > 3500) return false;return true;})
A cut to select only events in a very small central region of the detector.
Definition: AnalysisMasks.h:21
std::pair< int, int > calcFirstLastLivePlane(int plane, std::bitset< 14 > binary, caf::Det_t det)