CbmRoot
Loading...
Searching...
No Matches
CbmLitComparators.h
Go to the documentation of this file.
1/* Copyright (C) 2008-2013 GSI/JINR-LIT, Darmstadt/Dubna
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Andrey Lebedev [committer], Semen Lebedev */
4
5#ifndef CBMLITCOMPARATORS_H_
6#define CBMLITCOMPARATORS_H_
7
8#include "data/CbmLitHit.h"
10#include "data/CbmLitStripHit.h"
13
14#include <functional>
15#include <iostream>
16
17
18//class CompareMaterialInfoZLess:
19// public std::binary_function<
20// const CbmLitMaterialInfo&,
21// const CbmLitMaterialInfo&,
22// bool>
23//{
24//public:
25// bool operator()(const CbmLitMaterialInfo& mat1, const CbmLitMaterialInfo& mat2) const {
26// return mat1.GetZpos() < mat2.GetZpos();
27// }
28//};
29//
30//
31//
32//class CompareTrackParamZLess:
33// public std::binary_function<
34// const CbmLitTrackParam&,
35// const CbmLitTrackParam&,
36// bool>
37//{
38//public:
39// bool operator()(const CbmLitTrackParam& par1, const CbmLitTrackParam& par2) const {
40// return par1.GetZ() < par2.GetZ();
41// }
42//};
43
44
45//class ComparePixelHitPtrYLess :
46// public std::binary_function<
47// const CbmLitPixelHit*,
48// const CbmLitPixelHit*,
49// bool>
50//{
51//public:
52// bool operator()(const CbmLitPixelHit* hit1, const CbmLitPixelHit* hit2) const {
53// return hit1->GetY() < hit2->GetY();
54// }
55//};
56//
57//
58//
59//class ComparePixelHitPtrXLess :
60// public std::binary_function<
61// const CbmLitPixelHit*,
62// const CbmLitPixelHit*,
63// bool>
64//{
65//public:
66// bool operator()(const CbmLitPixelHit* hit1, const CbmLitPixelHit* hit2) const {
67// return hit1->GetX() < hit2->GetX();
68// }
69//};
70//
71//
72//
73//class CompareHitPtrXULess :
74// public std::binary_function<
75// const CbmLitHit*,
76// const CbmLitHit*,
77// bool>
78//{
79//public:
80// bool operator()(const CbmLitHit* hit1, const CbmLitHit* hit2) const {
81// if (hit1 == NULL || hit2 == NULL) return false; // Bug fix from 10.12.2012. Protection against NULL hit pointer.
82// if (hit1->GetType() == kLITPIXELHIT) {
83// const CbmLitPixelHit* phit1 = static_cast<const CbmLitPixelHit*>(hit1);
84// const CbmLitPixelHit* phit2 = static_cast<const CbmLitPixelHit*>(hit2);
85// return phit1->GetX() < phit2->GetX();
86// } else if (hit1->GetType() == kLITSTRIPHIT) {
87// const CbmLitStripHit* shit1 = static_cast<const CbmLitStripHit*>(hit1);
88// const CbmLitStripHit* shit2 = static_cast<const CbmLitStripHit*>(hit2);
89// return shit1->GetU() < shit2->GetU();
90// } else {
91// std::cout << "CompareHitPtrXULess: HIT TYPE NOT SUPPORTED" << std::endl;
92// return false;
93// }
94// }
95//};
96//
97//
98//
99//class CompareStripHitPtrULess :
100// public std::binary_function<
101// const CbmLitStripHit*,
102// const CbmLitStripHit*,
103// bool>
104//{
105//public:
106// bool operator()(const CbmLitStripHit* hit1, const CbmLitStripHit* hit2) const {
107// return hit1->GetU() < hit2->GetU();
108// }
109//};
110
111#endif /*CBMLITCOMPARATORS_H_*/
Base data class for hits.
Base data class for pixel hits.
Base data class for strip hits.
Data class for track parameters.