Hall C ROOT/C++ Analyzer (hcana)
Loading...
Searching...
No Matches
THcRawHit.cxx
Go to the documentation of this file.
1
10#include "THcRawHit.h"
11#include <cassert>
12
14{
15 // Comparison function for Sort().
16
17#ifndef NDEBUG
18 const auto* hit = dynamic_cast<const THcRawHit*>(obj);
19 assert(hit);
20#else
21 // dynamic_cast turns out to be quite expensive here
22 const auto* hit = static_cast<const THcRawHit*>(obj);
23#endif
24 Int_t dp = fPlane - hit->fPlane;
25 if( dp == 0 ) {
26 Int_t dc = fCounter - hit->fCounter;
27 if( dc < 0 )
28 return -1;
29 else if( dc > 0 )
30 return 1;
31 else
32 return 0;
33 }
34 else if( dp < 0 )
35 return -1;
36 else
37 return 1;
38}
39
40
42
43//_____________________________________________________________________________
int Int_t
ClassImp(VDC::AnalyticTTDConv) using namespace std
Base class detector specific raw hit that go into hit lists.
Definition THcRawHit.h:11
Int_t fPlane
Definition THcRawHit.h:52
virtual Int_t Compare(const TObject *obj) const
Definition THcRawHit.cxx:13
Int_t fCounter
Definition THcRawHit.h:53