ATLAS Offline Software
Functions
SiHitCollectionCnv_p2.cxx File Reference
#include "InDetSimEvent/SiHit.h"
#include "InDetSimEvent/SiHitCollection.h"
#include "InDetSimEventTPCnv/InDetHits/SiHitCollection_p2.h"
#include "InDetSimEventTPCnv/InDetHits/SiHitCollectionCnv_p2.h"
#include <cmath>
#include "CLHEP/Geometry/Point3D.h"
#include "GaudiKernel/MsgStream.h"
#include "TruthUtils/MagicNumbers.h"
#include "StoreGate/StoreGateSvc.h"
Include dependency graph for SiHitCollectionCnv_p2.cxx:

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 38 of file SiHitCollectionCnv_p2.cxx.

39 {
40  double del = b-a;
41  if (del > M_PI)
42  {
43  return a+2.0*M_PI;
44  }
45  else if (del < -M_PI)
46  {
47  return a-2.0*M_PI;
48  }
49  else
50  {
51  return a;
52  }
53 }

◆ phicorr()

double phicorr ( double  a)
inline

Definition at line 21 of file SiHitCollectionCnv_p2.cxx.

22 {
23  if (a <= -M_PI)
24  {
25  return a+(2*M_PI*floor(-(a-M_PI)/(2*M_PI)));
26  }
27  else if (a > M_PI)
28  {
29  return a-(2*M_PI*floor((a+M_PI)/(2*M_PI)));
30  }
31  else
32  {
33  return a;
34  }
35 }
M_PI
#define M_PI
Definition: ActiveFraction.h:11
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
a
TList * a
Definition: liststreamerinfos.cxx:10