Skip to content

Commit b5d0db3

Browse files
committed
Layout changes: Bring the line limit to 120 characters
Layout, namespace, naming and formatting changes to Magnetic Field classes and the rest of the project
1 parent ae0f6ce commit b5d0db3

51 files changed

Lines changed: 5827 additions & 5019 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Base/BaseLinkDef.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,3 @@
1010
#pragma link C++ class AliceO2::Base::TrackReference+;
1111

1212
#endif
13-

Base/Detector.cxx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,22 +72,22 @@ void Detector::Matrix(Int_t& nmat, Float_t theta1, Float_t phi1, Float_t theta2,
7272
gMC->Matrix(nmat, theta1, phi1, theta2, phi2, theta3, phi3);
7373
}
7474

75-
void Detector::DefineWrapperVolume(Int_t id, Double_t rmin, Double_t rmax, Double_t zspan)
75+
void Detector::defineWrapperVolume(Int_t id, Double_t rmin, Double_t rmax, Double_t zspan)
7676
{
7777
}
7878

79-
void Detector::SetNumberOfWrapperVolumes(Int_t n)
79+
void Detector::setNumberOfWrapperVolumes(Int_t n)
8080
{
8181
}
8282

83-
void Detector::DefineLayer(const Int_t nlay, const double phi0, const Double_t r,
83+
void Detector::defineLayer(const Int_t nlay, const double phi0, const Double_t r,
8484
const Double_t zlen, const Int_t nladd, const Int_t nmod,
8585
const Double_t lthick, const Double_t dthick, const UInt_t dettypeID,
8686
const Int_t buildLevel)
8787
{
8888
}
8989

90-
void Detector::DefineLayerTurbo(Int_t nlay, Double_t phi0, Double_t r, Double_t zlen, Int_t nladd,
90+
void Detector::defineLayerTurbo(Int_t nlay, Double_t phi0, Double_t r, Double_t zlen, Int_t nladd,
9191
Int_t nmod, Double_t width, Double_t tilt, Double_t lthick,
9292
Double_t dthick, UInt_t dettypeID, Int_t buildLevel)
9393
{

Base/Detector.h

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ namespace Base {
1414
class Detector : public FairDetector {
1515

1616
public:
17-
enum Model { test123 = 0 };
18-
1917
Detector(const char* name, Bool_t Active, Int_t DetId = 0);
2018

2119
/// Default Constructor
@@ -25,53 +23,52 @@ class Detector : public FairDetector {
2523
virtual ~Detector();
2624

2725
// Module composition
28-
virtual void Material(Int_t imat, const char* name, Float_t a, Float_t z, Float_t dens,
29-
Float_t radl, Float_t absl, Float_t* buf = 0, Int_t nwbuf = 0) const;
26+
virtual void Material(Int_t imat, const char* name, Float_t a, Float_t z, Float_t dens, Float_t radl, Float_t absl,
27+
Float_t* buf = 0, Int_t nwbuf = 0) const;
3028

31-
virtual void Mixture(Int_t imat, const char* name, Float_t* a, Float_t* z, Float_t dens,
32-
Int_t nlmat, Float_t* wmat) const;
29+
virtual void Mixture(Int_t imat, const char* name, Float_t* a, Float_t* z, Float_t dens, Int_t nlmat,
30+
Float_t* wmat) const;
3331

34-
virtual void Medium(Int_t numed, const char* name, Int_t nmat, Int_t isvol, Int_t ifield,
35-
Float_t fieldm, Float_t tmaxfd, Float_t stemax, Float_t deemax, Float_t epsil,
36-
Float_t stmin, Float_t* ubuf = 0, Int_t nbuf = 0) const;
32+
virtual void Medium(Int_t numed, const char* name, Int_t nmat, Int_t isvol, Int_t ifield, Float_t fieldm,
33+
Float_t tmaxfd, Float_t stemax, Float_t deemax, Float_t epsil, Float_t stmin, Float_t* ubuf = 0,
34+
Int_t nbuf = 0) const;
3735

38-
/// Define a rotation matrix. Angles are in degrees.
36+
/// Define a rotation matrix. angles are in degrees.
3937
/// \param nmat on output contains the number assigned to the rotation matrix
4038
/// \param theta1 polar angle for axis I
4139
/// \param theta2 polar angle for axis II
4240
/// \param theta3 polar angle for axis III
4341
/// \param phi1 azimuthal angle for axis I
4442
/// \param phi2 azimuthal angle for axis II
4543
/// \param phi3 azimuthal angle for axis III
46-
virtual void Matrix(Int_t& nmat, Float_t theta1, Float_t phi1, Float_t theta2, Float_t phi2,
47-
Float_t theta3, Float_t phi3) const;
44+
virtual void Matrix(Int_t& nmat, Float_t theta1, Float_t phi1, Float_t theta2, Float_t phi2, Float_t theta3,
45+
Float_t phi3) const;
4846

49-
static void SetDensityFactor(Float_t density)
47+
static void setDensityFactor(Float_t density)
5048
{
5149
mDensityFactor = density;
5250
}
53-
static Float_t GetDensityFactor()
51+
static Float_t getDensityFactor()
5452
{
5553
return mDensityFactor;
5654
}
5755

5856
/// Sets per wrapper volume parameters
59-
virtual void DefineWrapperVolume(Int_t id, Double_t rmin, Double_t rmax, Double_t zspan);
57+
virtual void defineWrapperVolume(Int_t id, Double_t rmin, Double_t rmax, Double_t zspan);
6058

6159
/// Books arrays for wrapper volumes
62-
virtual void SetNumberOfWrapperVolumes(Int_t n);
60+
virtual void setNumberOfWrapperVolumes(Int_t n);
6361

64-
virtual void DefineLayer(Int_t nlay, Double_t phi0, Double_t r, Double_t zlen, Int_t nladd,
65-
Int_t nmod, Double_t lthick = 0., Double_t dthick = 0.,
66-
UInt_t detType = 0, Int_t buildFlag = 0);
62+
virtual void defineLayer(Int_t nlay, Double_t phi0, Double_t r, Double_t zlen, Int_t nladd, Int_t nmod,
63+
Double_t lthick = 0., Double_t dthick = 0., UInt_t detType = 0, Int_t buildFlag = 0);
6764

68-
virtual void DefineLayerTurbo(Int_t nlay, Double_t phi0, Double_t r, Double_t zlen, Int_t nladd,
69-
Int_t nmod, Double_t width, Double_t tilt, Double_t lthick = 0.,
70-
Double_t dthick = 0., UInt_t detType = 0, Int_t buildFlag = 0);
65+
virtual void defineLayerTurbo(Int_t nlay, Double_t phi0, Double_t r, Double_t zlen, Int_t nladd, Int_t nmod,
66+
Double_t width, Double_t tilt, Double_t lthick = 0., Double_t dthick = 0.,
67+
UInt_t detType = 0, Int_t buildFlag = 0);
7168

7269
protected:
7370
static Float_t mDensityFactor; //! factor that is multiplied to all material densities (ONLY for
74-
//systematic studies)
71+
// systematic studies)
7572
private:
7673
Detector(const Detector&);
7774
Detector& operator=(const Detector&);

Base/Module.h

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,33 +23,33 @@ class Module : public FairModule {
2323
virtual ~Module();
2424

2525
// Module composition
26-
virtual void Material(Int_t imat, const char* name, Float_t a, Float_t z, Float_t dens,
27-
Float_t radl, Float_t absl, Float_t* buf = 0, Int_t nwbuf = 0) const;
26+
virtual void Material(Int_t imat, const char* name, Float_t a, Float_t z, Float_t dens, Float_t radl, Float_t absl,
27+
Float_t* buf = 0, Int_t nwbuf = 0) const;
2828

29-
virtual void Mixture(Int_t imat, const char* name, Float_t* a, Float_t* z, Float_t dens,
30-
Int_t nlmat, Float_t* wmat) const;
29+
virtual void Mixture(Int_t imat, const char* name, Float_t* a, Float_t* z, Float_t dens, Int_t nlmat,
30+
Float_t* wmat) const;
3131

32-
virtual void Medium(Int_t numed, const char* name, Int_t nmat, Int_t isvol, Int_t ifield,
33-
Float_t fieldm, Float_t tmaxfd, Float_t stemax, Float_t deemax, Float_t epsil,
34-
Float_t stmin, Float_t* ubuf = 0, Int_t nbuf = 0) const;
32+
virtual void Medium(Int_t numed, const char* name, Int_t nmat, Int_t isvol, Int_t ifield, Float_t fieldm,
33+
Float_t tmaxfd, Float_t stemax, Float_t deemax, Float_t epsil, Float_t stmin, Float_t* ubuf = 0,
34+
Int_t nbuf = 0) const;
3535

36-
/// Define a rotation matrix. Angles are in degrees.
36+
/// Define a rotation matrix. angles are in degrees.
3737
/// \param nmat on output contains the number assigned to the rotation matrix
3838
/// \param theta1 polar angle for axis I
3939
/// \param phi1 azimuthal angle for axis I
4040
/// \param theta2 polar angle for axis II
4141
/// \param phi2 azimuthal angle for axis II
4242
/// \param theta3 polar angle for axis III
4343
/// \param phi3 azimuthal angle for axis III
44-
virtual void Matrix(Int_t& nmat, Float_t theta1, Float_t phi1, Float_t theta2, Float_t phi2,
45-
Float_t theta3, Float_t phi3) const;
44+
virtual void Matrix(Int_t& nmat, Float_t theta1, Float_t phi1, Float_t theta2, Float_t phi2, Float_t theta3,
45+
Float_t phi3) const;
4646

47-
static void SetDensityFactor(Float_t density)
47+
static void setDensityFactor(Float_t density)
4848
{
4949
mDensityFactor = density;
5050
}
5151

52-
static Float_t GetDensityFactor()
52+
static Float_t getDensityFactor()
5353
{
5454
return mDensityFactor;
5555
}

Base/TrackReference.cxx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,9 @@ TrackReference::TrackReference()
3232
// Default constructor
3333
// Creates empty object
3434

35-
for (Int_t i = 0; i < 16; i++)
35+
for (Int_t i = 0; i < 16; i++) {
3636
ResetBit(BIT(i));
37+
}
3738
}
3839

3940
TrackReference::TrackReference(const TrackReference& tr)
@@ -94,8 +95,9 @@ TrackReference::TrackReference(Int_t label, Int_t id)
9495
// Set Up status code
9596
// Copy Bits from virtual MC
9697

97-
for (Int_t i = 14; i < 22; i++)
98+
for (Int_t i = 14; i < 22; i++) {
9899
ResetBit(BIT(i));
100+
}
99101

100102
SetBit(BIT(14), gMC->IsNewTrack());
101103
SetBit(BIT(15), gMC->IsTrackAlive());

Base/TrackReference.h

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,7 @@ class TrackReference : public TObject {
9393

9494
virtual Float_t R() const
9595
{
96-
return TMath::Sqrt(mReferencePositionX * mReferencePositionX +
97-
mReferencePositionY * mReferencePositionY);
96+
return TMath::Sqrt(mReferencePositionX * mReferencePositionX + mReferencePositionY * mReferencePositionY);
9897
}
9998

10099
virtual Float_t Pt() const
@@ -162,7 +161,7 @@ class TrackReference : public TObject {
162161
mDetectorId = id;
163162
}
164163

165-
virtual void SetPosition(Float_t x, Float_t y, Float_t z)
164+
virtual void setPosition(Float_t x, Float_t y, Float_t z)
166165
{
167166
mReferencePositionX = x;
168167
mReferencePositionY = y;
@@ -176,22 +175,22 @@ class TrackReference : public TObject {
176175
mMomentumZ = pz;
177176
}
178177

179-
virtual void SetUserId(Int_t userId)
178+
virtual void setUserId(Int_t userId)
180179
{
181180
mUserId = userId;
182181
}
183182

184183
// Methods to get position of the track reference in
185184
// in the TPC/TRD/TOF Tracking coordinate system
186185

187-
virtual Float_t PhiPos() const
186+
virtual Float_t phiPosition() const
188187
{
189188
return TMath::Pi() + TMath::ATan2(-mReferencePositionY, -mReferencePositionX);
190189
}
191190

192191
virtual Float_t Alpha() const
193192
{
194-
return TMath::Pi() * (20 * ((((Int_t)(PhiPos() * 180 / TMath::Pi())) / 20)) + 10) / 180.;
193+
return TMath::Pi() * (20 * ((((Int_t)(phiPosition() * 180 / TMath::Pi())) / 20)) + 10) / 180.;
195194
}
196195

197196
virtual Float_t LocalX() const
@@ -204,7 +203,7 @@ class TrackReference : public TObject {
204203
return mReferencePositionX * TMath::Sin(-Alpha()) + mReferencePositionY * TMath::Cos(-Alpha());
205204
}
206205

207-
Bool_t IsSortable() const
206+
Bool_t isSortable() const
208207
{
209208
return kTRUE;
210209
}

Data/DataLinkDef.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
#pragma link off all classes;
1313
#pragma link off all functions;
1414

15-
#pragma link C++ class AliceO2::Data::Stack+;
16-
#pragma link C++ class MCTrack+;
15+
#pragma link C++ class AliceO2::Data::Stack + ;
16+
#pragma link C++ class MCTrack + ;
1717

1818
#endif
19-

Data/DetectorList.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
#define ALICEO2_DATA_DETECTORLIST_H_
66

77
// kSTOPHERE is needed for iteration over the enum. All detectors have to be put before.
8-
enum DetectorId {kAliIts, kSTOPHERE};
8+
enum DetectorId { kAliIts, kSTOPHERE };
99

1010
#endif

Data/MCTrack.cxx

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ MCTrack::MCTrack()
2020
mStartVertexCoordinatesY(0.),
2121
mStartVertexCoordinatesZ(0.),
2222
mStartVertexCoordinatesT(0.),
23-
fNPoints(0)
23+
mNumberOfPoints(0)
2424
{
2525
}
2626

27-
MCTrack::MCTrack(Int_t pdgCode, Int_t motherId, Double_t px, Double_t py, Double_t pz, Double_t x,
28-
Double_t y, Double_t z, Double_t t, Int_t nPoints = 0)
27+
MCTrack::MCTrack(Int_t pdgCode, Int_t motherId, Double_t px, Double_t py, Double_t pz, Double_t x, Double_t y,
28+
Double_t z, Double_t t, Int_t nPoints = 0)
2929
: TObject(),
3030
mPdgCode(pdgCode),
3131
mMotherTrackId(motherId),
@@ -36,7 +36,7 @@ MCTrack::MCTrack(Int_t pdgCode, Int_t motherId, Double_t px, Double_t py, Double
3636
mStartVertexCoordinatesY(y),
3737
mStartVertexCoordinatesZ(z),
3838
mStartVertexCoordinatesT(t),
39-
fNPoints(nPoints)
39+
mNumberOfPoints(nPoints)
4040
{
4141
}
4242

@@ -51,7 +51,7 @@ MCTrack::MCTrack(const MCTrack& track)
5151
mStartVertexCoordinatesY(track.mStartVertexCoordinatesY),
5252
mStartVertexCoordinatesZ(track.mStartVertexCoordinatesZ),
5353
mStartVertexCoordinatesT(track.mStartVertexCoordinatesT),
54-
fNPoints(track.fNPoints)
54+
mNumberOfPoints(track.mNumberOfPoints)
5555
{
5656
}
5757

@@ -66,7 +66,7 @@ MCTrack::MCTrack(TParticle* part)
6666
mStartVertexCoordinatesY(part->Vy()),
6767
mStartVertexCoordinatesZ(part->Vz()),
6868
mStartVertexCoordinatesT(part->T() * 1e09),
69-
fNPoints(0)
69+
mNumberOfPoints(0)
7070
{
7171
}
7272

@@ -76,12 +76,12 @@ MCTrack::~MCTrack()
7676

7777
void MCTrack::Print(Int_t trackId) const
7878
{
79-
LOG(DEBUG) << "Track " << trackId << ", mother : " << mMotherTrackId << ", Type " << mPdgCode
80-
<< ", momentum (" << mStartVertexMomentumX << ", " << mStartVertexMomentumY << ", "
81-
<< mStartVertexMomentumZ << ") GeV" << FairLogger::endl;
82-
// LOG(DEBUG2) << " Ref " << GetNumberOfPoints(kREF)
83-
// << ", TutDet " << GetNumberOfPoints(kTutDet)
84-
// << ", Rutherford " << GetNumberOfPoints(kFairRutherford)
79+
LOG(DEBUG) << "Track " << trackId << ", mother : " << mMotherTrackId << ", Type " << mPdgCode << ", momentum ("
80+
<< mStartVertexMomentumX << ", " << mStartVertexMomentumY << ", " << mStartVertexMomentumZ << ") GeV"
81+
<< FairLogger::endl;
82+
// LOG(DEBUG2) << " Ref " << getNumberOfPoints(kREF)
83+
// << ", TutDet " << getNumberOfPoints(kTutDet)
84+
// << ", Rutherford " << getNumberOfPoints(kFairRutherford)
8585
// << FairLogger::endl;
8686
//
8787
}
@@ -106,12 +106,12 @@ Double_t MCTrack::GetRapidity() const
106106
return y;
107107
}
108108

109-
Int_t MCTrack::GetNumberOfPoints(DetectorId detId) const
109+
Int_t MCTrack::getNumberOfPoints(DetectorId detId) const
110110
{
111111
// // TODO: Where does this come from
112-
// if ( detId == kREF ) { return ( fNPoints & 1); }
113-
// else if ( detId == kTutDet ) { return ( (fNPoints & ( 7 << 1) ) >> 1); }
114-
// else if ( detId == kFairRutherford ) { return ( (fNPoints & (31 << 4) ) >> 4); }
112+
// if ( detId == kREF ) { return ( mNumberOfPoints & 1); }
113+
// else if ( detId == kTutDet ) { return ( (mNumberOfPoints & ( 7 << 1) ) >> 1); }
114+
// else if ( detId == kFairRutherford ) { return ( (mNumberOfPoints & (31 << 4) ) >> 4); }
115115
// else {
116116
// LOG(ERROR) << "Unknown detector ID "
117117
// << detId << FairLogger::endl;
@@ -120,29 +120,28 @@ Int_t MCTrack::GetNumberOfPoints(DetectorId detId) const
120120
//
121121
}
122122

123-
void MCTrack::SetNumberOfPoints(Int_t iDet, Int_t nPoints)
123+
void MCTrack::setNumberOfPoints(Int_t iDet, Int_t nPoints)
124124
{
125125
//
126126
// if ( iDet == kREF ) {
127127
// if ( nPoints < 0 ) { nPoints = 0; }
128128
// else if ( nPoints > 1 ) { nPoints = 1; }
129-
// fNPoints = ( fNPoints & ( ~ 1 ) ) | nPoints;
129+
// mNumberOfPoints = ( mNumberOfPoints & ( ~ 1 ) ) | nPoints;
130130
// }
131131

132132
// else if ( iDet == kTutDet ) {
133133
// if ( nPoints < 0 ) { nPoints = 0; }
134134
// else if ( nPoints > 7 ) { nPoints = 7; }
135-
// fNPoints = ( fNPoints & ( ~ ( 7 << 1 ) ) ) | ( nPoints << 1 );
135+
// mNumberOfPoints = ( mNumberOfPoints & ( ~ ( 7 << 1 ) ) ) | ( nPoints << 1 );
136136
// }
137137

138138
// else if ( iDet == kFairRutherford ) {
139139
// if ( nPoints < 0 ) { nPoints = 0; }
140140
// else if ( nPoints > 31 ) { nPoints = 31; }
141-
// fNPoints = ( fNPoints & ( ~ ( 31 << 4 ) ) ) | ( nPoints << 4 );
141+
// mNumberOfPoints = ( mNumberOfPoints & ( ~ ( 31 << 4 ) ) ) | ( nPoints << 4 );
142142
// }
143143

144-
// else LOG(ERROR) << "Unknown detector ID "
145-
// << iDet << FairLogger::endl;
144+
// else { LOG(ERROR) << "Unknown detector ID " << iDet << FairLogger::endl; }
146145
//
147146
}
148147

0 commit comments

Comments
 (0)