SND@LHC Software
Loading...
Searching...
No Matches
sndDSVetoCut.cxx
Go to the documentation of this file.
1#include "sndDSVetoCut.h"
2
3#include "TClonesArray.h"
4#include "TChain.h"
5#include "MuFilterHit.h"
6
7#include <vector>
8#include <numeric>
9
10namespace snd::analysis_cuts {
11
13 cutName = "Remove events with hits in the last (hor) and two last (ver) DS planes";
14
15 shortName = "DSVetoCut";
16 nbins = std::vector<int>{180};
17 range_start = std::vector<double>{0};
18 range_end = std::vector<double>{180};
19 plot_var = std::vector<double>{-1};
20
21 }
22
24 MuFilterHit * hit;
25 TIter hitIterator(muFilterDigiHitCollection);
26
27 // bool ds = false;
28 // std::vector<bool> us = std::vector<bool>(5, false);
29
30 double n_hits = 0;
31
32 bool ret = true;
33
34 while ( (hit = (MuFilterHit*) hitIterator.Next()) ){
35 if (hit->GetSystem() == 3) { // DS
36 if (hit->GetPlane() >= 3) {
37 ret = false;
38 n_hits+=1;
39 }
40 }
41 }
42
43 plot_var[0] = n_hits;
44 return ret;
45 }
46}
int GetPlane()
Definition MuFilterHit.h:42
int GetSystem()
Definition MuFilterHit.h:41
static TClonesArray * muFilterDigiHitCollection
std::vector< double > plot_var
Definition sndBaseCut.h:14
std::vector< double > range_end
Definition sndBaseCut.h:13
std::vector< double > range_start
Definition sndBaseCut.h:12
std::vector< int > nbins
Definition sndBaseCut.h:11