IB-0.2
Main Page
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
IBAnalyzerEMTrim.h
Go to the documentation of this file.
1
/*////////////////////////////////////////////////////////////////////////////
2
Copyright 2018 Istituto Nazionale di Fisica Nucleare
3
4
Licensed under the EUPL, Version 1.2 or - as soon they will be approved by
5
the European Commission - subsequent versions of the EUPL (the "Licence").
6
You may not use this work except in compliance with the Licence.
7
8
You may obtain a copy of the Licence at:
9
10
https://joinup.ec.europa.eu/software/page/eupl
11
12
Unless required by applicable law or agreed to in writing, software
13
distributed under the Licence is distributed on an "AS IS" basis, WITHOUT
14
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
15
Licence for the specific language governing permissions and limitations under
16
the Licence.
18
19
20
21
#ifndef IBANALYZEREMTRIM_H
22
#define IBANALYZEREMTRIM_H
23
24
#include "IBAnalyzerEM.h"
25
#include "Math/Accumulator.h"
26
27
using namespace uLib;
28
29
namespace IBAnalyzerEMTrimDetail {
30
31
// ASYMMETRICAL TRIM AB //
32
33
struct IBVoxelABTrim {
34
35
void SetABTrim(int a, int b) {
36
SijCap.SetABTrim(a,b);
37
}
38
39
Scalarf Value;
40
unsigned int Count;
41
Accumulator_ABTrim<Scalarf,100> SijCap;
42
};
43
44
// VOX COLLECTION TRIM //
45
46
class IBVoxCollectionATrim : public uLib::VoxImage< IBVoxelABTrim > {
47
typedef uLib::VoxImage< IBVoxelABTrim > BaseClass;
48
public:
49
50
IBVoxCollectionATrim(const uLib::Vector3i size) :
51
BaseClass(size) {}
52
53
// templated update for analyzer specific customizations //
54
template < typename StaticUpdateAlgT >
55
void UpdateDensity(unsigned int threshold);
56
void SetABTrim(int a, int b) ;
57
58
};
59
60
} // namespace: IBAnalyzerEMTrimDetail
61
62
63
64
65
class IBAnalyzerEMTrim : public IBAnalyzerEM {
66
67
typedef IBAnalyzerEM BaseClass;
68
typedef IBAnalyzerEM::Event Event;
69
70
public:
71
72
IBAnalyzerEMTrim(IBVoxCollection &voxels);
73
~IBAnalyzerEMTrim();
74
75
inline virtual const char *type_name() const { return "IBAnalyzerEMTrim"; }
76
77
void Run(unsigned int iterations, float muons_ratio, float a=0, float b=0);
78
79
private:
80
81
void Project(Event *evc);
82
void BackProject(Event *evc);
83
void Evaluate(float muons_ratio);
84
85
IBVoxCollection *m_VoxCollection;
86
IBAnalyzerEMTrimDetail::IBVoxCollectionATrim *m_VoxCollectionMdn;
87
std::vector<IBAnalyzerEM::Event> &m_Events;
88
unsigned int m_MeanMuonVoxOccupancy;
89
90
};
91
92
93
94
#endif // IBANALYZEREMTRIM_H
IBAnalyzerEMTrim.h
Generated by
1.8.5