GRSISort "v4.0.0.5"
An extension of the ROOT analysis Framework
Loading...
Searching...
No Matches
TCSM.h
Go to the documentation of this file.
1#ifndef TCSM_H
2#define TCSM_H
3
4/** \addtogroup Detectors
5 * @{
6 */
7
8/////////////////////////////////////////////////////////////
9///
10/// \class TCSM
11///
12/////////////////////////////////////////////////////////////
13
14#include <vector>
15#include <cstdio>
16#include <map>
17#include <iostream>
18#if !defined(__CINT__) && !defined(__CLING__)
19#include <tuple>
20#include <iterator>
21#include <algorithm>
22#endif
23#include <utility>
24#include <set>
25
26#include "TMath.h"
27#include "TVector3.h"
28
29#include "Globals.h"
30#include "TFragment.h"
31#include "TChannel.h"
32#include "TDetector.h"
33#include "TCSMHit.h"
34#include "TGRSIMnemonic.h"
35
36class TCSM : public TDetector {
37public:
38 TCSM();
39 TCSM(const TCSM&) = default;
40 TCSM(TCSM&&) noexcept = default;
41 TCSM& operator=(const TCSM&) = default;
42 TCSM& operator=(TCSM&&) noexcept = default;
43 ~TCSM() override = default;
44
45 TCSMHit* GetCSMHit(const int& i) const { return static_cast<TCSMHit*>(GetHit(i)); }
46
47 static TVector3 GetPosition(int detector, char pos, int horizontalstrip, int verticalstrip, double X = 0.00,
48 double Y = 0.00, double Z = 0.00);
49
50#ifndef __CINT__
51 void AddFragment(const std::shared_ptr<const TFragment>&, TChannel*) override; //!<!
52#endif
53 void BuildHits() override;
54
55private:
56 std::map<int16_t, std::vector<std::vector<std::vector<std::pair<TFragment, TGRSIMnemonic>>>>> fFragments; //!<!
58
59 static int fCfdBuildDiff; //!<! largest acceptable time difference between events (clock ticks) (50 ns)
60
61 void BuildVH(std::vector<std::vector<std::pair<TFragment, TGRSIMnemonic>>>&, std::vector<TDetectorHit*>&);
62 void BuilddEE(std::vector<std::vector<TDetectorHit*>>&, std::vector<TDetectorHit*>&);
63 void OldBuilddEE(std::vector<TDetectorHit*>&, std::vector<TDetectorHit*>&, std::vector<TDetectorHit*>&);
64 void MakedEE(std::vector<TDetectorHit*>& DHitVec, std::vector<TDetectorHit*>& EHitVec, std::vector<TDetectorHit*>& BuiltHits);
65 TCSMHit* MakeHit(std::pair<TFragment, TGRSIMnemonic>&, std::pair<TFragment, TGRSIMnemonic>&);
66 TCSMHit* MakeHit(std::vector<std::pair<TFragment, TGRSIMnemonic>>&, std::vector<std::pair<TFragment, TGRSIMnemonic>>&);
68 void RecoverHit(char, std::pair<TFragment, TGRSIMnemonic>&, std::vector<TDetectorHit*>&);
69 bool AlmostEqual(int, int) const;
70 bool AlmostEqual(double, double) const;
71
72 /// \cond CLASSIMP
73 ClassDefOverride(TCSM, 5) // NOLINT(readability-else-after-return)
74 /// \endcond
75};
76/*! @} */
77#endif
Definition TCSM.h:36
bool AlmostEqual(int, int) const
Definition TCSM.cxx:620
void BuilddEE(std::vector< std::vector< TDetectorHit * > > &, std::vector< TDetectorHit * > &)
Definition TCSM.cxx:335
void OldBuilddEE(std::vector< TDetectorHit * > &, std::vector< TDetectorHit * > &, std::vector< TDetectorHit * > &)
Definition TCSM.cxx:442
void BuildVH(std::vector< std::vector< std::pair< TFragment, TGRSIMnemonic > > > &, std::vector< TDetectorHit * > &)
Definition TCSM.cxx:124
static TVector3 GetPosition(int detector, char pos, int horizontalstrip, int verticalstrip, double X=0.00, double Y=0.00, double Z=0.00)
Definition TCSM.cxx:69
TCSM()
Definition TCSM.cxx:9
TCSMHit * GetCSMHit(const int &i) const
Definition TCSM.h:45
std::map< int16_t, std::vector< std::vector< std::vector< std::pair< TFragment, TGRSIMnemonic > > > > > fFragments
!
Definition TCSM.h:56
TCSM(const TCSM &)=default
double fAlmostEqualWindow
Definition TCSM.h:57
void MakedEE(std::vector< TDetectorHit * > &DHitVec, std::vector< TDetectorHit * > &EHitVec, std::vector< TDetectorHit * > &BuiltHits)
Definition TCSM.cxx:371
TCSMHit * MakeHit(std::pair< TFragment, TGRSIMnemonic > &, std::pair< TFragment, TGRSIMnemonic > &)
Definition TCSM.cxx:190
TCSMHit * CombineHits(TDetectorHit *, TDetectorHit *)
Definition TCSM.cxx:592
void BuildHits() override
!
Definition TCSM.cxx:52
void RecoverHit(char, std::pair< TFragment, TGRSIMnemonic > &, std::vector< TDetectorHit * > &)
Definition TCSM.cxx:514
static int fCfdBuildDiff
! largest acceptable time difference between events (clock ticks) (50 ns)
Definition TCSM.h:59
void AddFragment(const std::shared_ptr< const TFragment > &, TChannel *) override
!
Definition TCSM.cxx:14
TCSM(TCSM &&) noexcept=default
virtual TDetectorHit * GetHit(const int &index) const
Definition TDetector.cxx:61