ATLAS Offline Software
Loading...
Searching...
No Matches
SiHitCollectionCnv_p3.cxx File Reference
#include "InDetSimEvent/SiHit.h"
#include "InDetSimEvent/SiHitCollection.h"
#include "InDetSimEventTPCnv/InDetHits/SiHitCollection_p3.h"
#include "InDetSimEventTPCnv/InDetHits/SiHitCollectionCnv_p3.h"
#include "GeneratorObjects/HepMcParticleLink.h"
#include <cmath>
#include "CLHEP/Geometry/Point3D.h"
#include "GaudiKernel/MsgStream.h"
#include "GaudiKernel/ThreadLocalContext.h"
#include "TruthUtils/MagicNumbers.h"
#include "AthenaKernel/ExtendedEventContext.h"
#include "StoreGate/StoreGateSvc.h"

Go to the source code of this file.

Functions

double phicorr (double a)
double cycle (double a, double b)

Function Documentation

◆ cycle()

double cycle ( double a,
double b )
inline

Definition at line 42 of file SiHitCollectionCnv_p3.cxx.

43{
44 double del = b-a;
45 if (del > M_PI)
46 {
47 return a+2.0*M_PI;
48 }
49 else if (del < -M_PI)
50 {
51 return a-2.0*M_PI;
52 }
53 else
54 {
55 return a;
56 }
57}
#define M_PI
static Double_t a

◆ phicorr()

double phicorr ( double a)
inline

Definition at line 25 of file SiHitCollectionCnv_p3.cxx.

26{
27 if (a <= -M_PI)
28 {
29 return a+(2*M_PI*floor(-(a-M_PI)/(2*M_PI)));
30 }
31 else if (a > M_PI)
32 {
33 return a-(2*M_PI*floor((a+M_PI)/(2*M_PI)));
34 }
35 else
36 {
37 return a;
38 }
39}