CbmRoot
L1HitsSortHelper.h
Go to the documentation of this file.
1
#ifndef _L1HitsL1HitsSortHelper_h_
2
#define _L1HitsL1HitsSortHelper_h_
3
4
#include "
L1Grid.h
"
5
#include "
L1HitPoint.h
"
6
#include "
L1StsHit.h
"
7
#include <algorithm>
8
#include <vector>
9
10
using
std::vector;
11
12
struct
L1HitsSortHelperData
{
13
L1StsHit
*
h
;
14
L1HitPoint
*
p
;
15
unsigned
int
bin
;
16
THitI
i
;
17
18
static
bool
compare
(
const
L1HitsSortHelperData
& a,
19
const
L1HitsSortHelperData
& b) {
20
return
a.
bin
< b.
bin
|| (a.
bin
== b.
bin
&& a.
p
->
V
() < b.
p
->
V
());
21
}
22
};
23
24
class
L1HitsSortHelper
{
25
public
:
26
L1HitsSortHelper
(vector<L1StsHit>&
hits
,
27
vector<L1HitPoint>&
points
,
28
vector<THitI>& indices,
29
const
L1Grid
* grid,
30
THitI
* iStart,
31
THitI
* iStop,
32
int
nStations,
33
int
nDontUsedHits);
34
35
void
Sort
();
36
37
private
:
38
vector<L1HitsSortHelperData>
fD
;
39
vector<L1StsHit>&
fHits
;
40
vector<L1HitPoint>&
fPoints
;
41
vector<THitI>&
fIndices
;
42
const
L1Grid
*
fGrid
;
43
THitI
*
fStsHitsUnusedStartIndex
, *
fStsHitsUnusedStopIndex
;
44
int
fNStations
;
45
int
fnDontUsedHits
;
46
47
L1HitsSortHelper
(
const
L1HitsSortHelper
&);
48
L1HitsSortHelper
&
operator=
(
const
L1HitsSortHelper
&);
49
};
50
51
#endif
L1HitsSortHelperData
Definition:
L1HitsSortHelper.h:12
L1HitPoint
contain strips positions and coordinates of hit
Definition:
L1HitPoint.h:6
L1HitsSortHelper::operator=
L1HitsSortHelper & operator=(const L1HitsSortHelper &)
L1HitPoint::V
fscal V() const
Definition:
L1HitPoint.h:60
L1Grid
Definition:
L1Grid.h:39
L1HitsSortHelper::fNStations
int fNStations
Definition:
L1HitsSortHelper.h:44
L1HitsSortHelper::fPoints
vector< L1HitPoint > & fPoints
Definition:
L1HitsSortHelper.h:40
L1HitsSortHelper::Sort
void Sort()
Definition:
L1HitsSortHelper.cxx:45
L1HitsSortHelper::fStsHitsUnusedStopIndex
THitI * fStsHitsUnusedStopIndex
Definition:
L1HitsSortHelper.h:43
L1StsHit
Definition:
L1StsHit.h:12
L1HitsSortHelper::fD
vector< L1HitsSortHelperData > fD
Definition:
L1HitsSortHelper.h:38
L1HitsSortHelper
Definition:
L1HitsSortHelper.h:24
THitI
unsigned int THitI
Definition:
L1StsHit.h:8
L1HitsSortHelper::fHits
vector< L1StsHit > & fHits
Definition:
L1HitsSortHelper.h:39
L1HitsSortHelperData::compare
static bool compare(const L1HitsSortHelperData &a, const L1HitsSortHelperData &b)
Definition:
L1HitsSortHelper.h:18
L1HitsSortHelper::fStsHitsUnusedStartIndex
THitI * fStsHitsUnusedStartIndex
Definition:
L1HitsSortHelper.h:43
L1HitPoint.h
L1HitsSortHelperData::h
L1StsHit * h
Definition:
L1HitsSortHelper.h:13
L1HitsSortHelper::fnDontUsedHits
int fnDontUsedHits
Definition:
L1HitsSortHelper.h:45
L1HitsSortHelperData::i
THitI i
Definition:
L1HitsSortHelper.h:16
L1HitsSortHelperData::bin
unsigned int bin
Definition:
L1HitsSortHelper.h:15
L1HitsSortHelperData::p
L1HitPoint * p
Definition:
L1HitsSortHelper.h:14
points
TClonesArray * points
Definition:
Analyze_matching.h:18
L1StsHit.h
hits
static vector< vector< QAHit > > hits
Definition:
CbmTofHitFinderTBQA.cxx:114
L1HitsSortHelper::fGrid
const L1Grid * fGrid
Definition:
L1HitsSortHelper.h:42
L1HitsSortHelper::L1HitsSortHelper
L1HitsSortHelper(const L1HitsSortHelper &)
L1HitsSortHelper::fIndices
vector< THitI > & fIndices
Definition:
L1HitsSortHelper.h:41
L1HitsSortHelper::L1HitsSortHelper
L1HitsSortHelper(vector< L1StsHit > &hits, vector< L1HitPoint > &points, vector< THitI > &indices, const L1Grid *grid, THitI *iStart, THitI *iStop, int nStations, int nDontUsedHits)
Definition:
L1HitsSortHelper.cxx:12
L1Grid.h
reco
L1
L1Algo
L1HitsSortHelper.h
Generated on Wed Oct 28 2020 15:11:49 for CbmRoot by
1.8.18