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

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

◆ phicorr()

double phicorr ( double  a)
inline

Definition at line 20 of file SiHitCollectionCnv_p2.cxx.

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