Skip to content

Commit 8b80788

Browse files
committed
Please consider the following formatting changes
1 parent 605bf80 commit 8b80788

File tree

6 files changed

+58
-61
lines changed

6 files changed

+58
-61
lines changed

DataFormats/Detectors/Upgrades/FVD/include/DataFormatsFVD/Hit.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,17 +61,16 @@ class Hit : public o2::BasicXYZEHit<Float_t, Float_t>
6161

6262
Float_t GetTotalEnergyAtEntrance() const { return GetE(); }
6363

64-
int GetParticlePdg() const {return mParticlePdg;}
64+
int GetParticlePdg() const { return mParticlePdg; }
6565

6666
void Print(const Option_t* opt) const;
6767

6868
private:
6969
int mParticlePdg;
7070
float mEnergyStart;
7171
math_utils::Vector3D<float> mMomentumStart; ///< momentum at entrance
72-
math_utils::Point3D<float> mPositionStart;
72+
math_utils::Point3D<float> mPositionStart;
7373
ClassDefNV(Hit, 1);
74-
7574
};
7675

7776
Hit::Hit(int trackID,

Detectors/Upgrades/ALICE3/FVD/base/include/FVDBase/FVDBaseParam.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ namespace fvd
2222
struct FVDBaseParam : public o2::conf::ConfigurableParamHelper<FVDBaseParam> {
2323
static constexpr int nCellA = 40; // 24
2424
static constexpr int nCellC = 48;
25-
static constexpr int nRingsA = 5; //3
25+
static constexpr int nRingsA = 5; // 3
2626
static constexpr int nRingsC = 6;
27-
28-
static constexpr float dzScint = 4.;
29-
static constexpr float rRingsA[int(nCellA/8)+1] = {3., 14.8, 26.6, 38.4, 50.2, 62.};
30-
static constexpr float rRingsC[int(nCellC/8)+1] = {3.5, 17., 30.5, 44., 57.5, 71.};
27+
28+
static constexpr float dzScint = 4.;
29+
static constexpr float rRingsA[int(nCellA / 8) + 1] = {3., 14.8, 26.6, 38.4, 50.2, 62.};
30+
static constexpr float rRingsC[int(nCellC / 8) + 1] = {3.5, 17., 30.5, 44., 57.5, 71.};
3131

3232
static constexpr float zModA = 1700;
3333
static constexpr float zModC = -1950;

Detectors/Upgrades/ALICE3/FVD/base/include/FVDBase/GeometryTGeo.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ class GeometryTGeo : public o2::detectors::DetMatrixCache
4848
int getCurrentCellId(const TVirtualMC* fMC) const;
4949

5050
private:
51-
5251
static std::unique_ptr<o2::fvd::GeometryTGeo> sInstance;
5352

5453
ClassDefNV(GeometryTGeo, 1);

Detectors/Upgrades/ALICE3/FVD/base/src/GeometryTGeo.cxx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#include <fairlogger/Logger.h>
1818

1919
using namespace o2::fvd;
20-
namespace o2
20+
namespace o2
2121
{
2222
namespace fvd
2323
{
@@ -46,7 +46,7 @@ GeometryTGeo* GeometryTGeo::Instance()
4646

4747
void GeometryTGeo::Build(int loadTrans)
4848
{
49-
if (isBuilt()) {
49+
if (isBuilt()) {
5050
LOGP(warning, "Already built");
5151
return; // already initialized
5252
}
@@ -64,7 +64,7 @@ void GeometryTGeo::fillMatrixCache(int mask)
6464

6565
int GeometryTGeo::getCellId(int nmod, int nring, int nsec) const
6666
{
67-
return nmod * FVDBaseParam::nCellA + 8 * nring + nsec;
67+
return nmod * FVDBaseParam::nCellA + 8 * nring + nsec;
6868
}
6969

7070
int GeometryTGeo::getCurrentCellId(const TVirtualMC* fMC) const
@@ -76,10 +76,10 @@ int GeometryTGeo::getCurrentCellId(const TVirtualMC* fMC) const
7676
fMC->CurrentVolOffID(2, moduleId);
7777
fMC->CurrentVolOffID(1, sectorId);
7878
fMC->CurrentVolOffID(0, ringId);
79-
int cellId = getCellId(moduleId, ringId, sectorId);
79+
int cellId = getCellId(moduleId, ringId, sectorId);
8080

8181
return cellId;
8282
}
8383

8484
} // namespace fvd
85-
} //namespace o2
85+
} // namespace o2

Detectors/Upgrades/ALICE3/FVD/simulation/include/FVDSimulation/Detector.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class Detector : public o2::base::DetImpl<Detector>
7373
Detector& operator=(const Detector&);
7474

7575
std::vector<o2::fvd::Hit>* mHits = nullptr;
76-
GeometryTGeo* mGeometryTGeo = nullptr;
76+
GeometryTGeo* mGeometryTGeo = nullptr;
7777

7878
TGeoVolumeAssembly* buildModuleA();
7979
TGeoVolumeAssembly* buildModuleC();
@@ -83,7 +83,7 @@ class Detector : public o2::base::DetImpl<Detector>
8383
/// Transient data about track passing the sensor, needed by ProcessHits()
8484
struct TrackData { // this is transient
8585
bool mHitStarted; //! hit creation started
86-
TLorentzVector mPositionStart; //! position at entrance
86+
TLorentzVector mPositionStart; //! position at entrance
8787
TLorentzVector mMomentumStart; //! momentum
8888
double mEnergyLoss; //! energy loss
8989
} mTrackData; //!

Detectors/Upgrades/ALICE3/FVD/simulation/src/Detector.cxx

Lines changed: 44 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ Bool_t Detector::ProcessHits(FairVolume* vol)
134134
return kFALSE; // do nothing more
135135
}
136136

137-
return kTRUE;
137+
return kTRUE;
138138
}
139139

140140
o2::fvd::Hit* Detector::addHit(Int_t trackId, Int_t cellId,
@@ -148,16 +148,16 @@ o2::fvd::Hit* Detector::addHit(Int_t trackId, Int_t cellId,
148148
return &(mHits->back());
149149
}
150150

151-
void Detector::ConstructGeometry()
151+
void Detector::ConstructGeometry()
152152
{
153-
createMaterials();
154-
buildModules();
155-
defineSensitiveVolumes();
153+
createMaterials();
154+
buildModules();
155+
defineSensitiveVolumes();
156156
}
157157

158-
159-
void Detector::EndOfEvent() {
160-
Reset();
158+
void Detector::EndOfEvent()
159+
{
160+
Reset();
161161
}
162162

163163
void Detector::Register()
@@ -194,16 +194,16 @@ void Detector::createMaterials()
194194

195195
Int_t matId = 0; // tmp material id number
196196
const Int_t unsens = 0, sens = 1; // sensitive or unsensitive medium
197-
//
198-
Int_t fieldType = 3; // Field type
199-
Float_t maxField = 5.0; // Field max.
197+
//
198+
Int_t fieldType = 3; // Field type
199+
Float_t maxField = 5.0; // Field max.
200200

201201
Float_t tmaxfd = -10.0; // max deflection angle due to magnetic field in one step
202202
Float_t stemax = 0.1; // max step allowed [cm]
203203
Float_t deemax = 1.0; // maximum fractional energy loss in one step 0<deemax<=1
204204
Float_t epsil = 0.03; // tracking precision [cm]
205205
Float_t stmin = -0.001; // minimum step due to continuous processes [cm] (negative value: choose it automatically)
206-
206+
207207
LOG(info) << "FVD: CreateMaterials(): fieldType " << fieldType << ", maxField " << maxField;
208208

209209
o2::base::Detector::Mixture(++matId, "Scintillator", aScint, zScint, dScint, nScint, wScint);
@@ -217,12 +217,12 @@ void Detector::buildModules()
217217

218218
TGeoVolume* vCave = gGeoManager->GetVolume("cave");
219219
if (!vCave) {
220-
LOG(fatal) << "Could not find the top volume!";
220+
LOG(fatal) << "Could not find the top volume!";
221221
}
222222

223223
// create modules
224-
TGeoVolumeAssembly *vFVDA = buildModuleA();
225-
TGeoVolumeAssembly *vFVDC = buildModuleC();
224+
TGeoVolumeAssembly* vFVDA = buildModuleA();
225+
TGeoVolumeAssembly* vFVDC = buildModuleC();
226226

227227
vCave->AddNode(vFVDA, 0, new TGeoTranslation(0., 0., FVDBaseParam::zModA));
228228
vCave->AddNode(vFVDC, 1, new TGeoTranslation(0., 0., FVDBaseParam::zModC));
@@ -232,24 +232,24 @@ TGeoVolumeAssembly* Detector::buildModuleA()
232232
{
233233
TGeoVolumeAssembly* mod = new TGeoVolumeAssembly("FVDA");
234234

235-
const TGeoMedium* medium = gGeoManager->GetMedium("FVD_Scintillator");
235+
const TGeoMedium* medium = gGeoManager->GetMedium("FVD_Scintillator");
236236

237237
const float dphiDeg = 45.;
238238

239239
for (int ir = 0; ir < FVDBaseParam::nRingsA; ir++) {
240-
for (int ic = 0; ic < 8; ic ++) {
241-
int cellId = ic + 8*ir;
242-
std::string tbsName = "tbs" + std::to_string(cellId);
243-
std::string nodeName = "fvd_node" + std::to_string(cellId);
244-
float rmin = FVDBaseParam::rRingsA[ir];
245-
float rmax = FVDBaseParam::rRingsA[ir+1];
246-
float phimin = dphiDeg * ic;
247-
float phimax = dphiDeg * (ic + 1);
248-
float dz = FVDBaseParam::dzScint;
249-
auto tbs = new TGeoTubeSeg(tbsName.c_str(), rmin, rmax, dz, phimin, phimax);
250-
auto nod = new TGeoVolume(nodeName.c_str(), tbs, medium);
251-
mod->AddNode(nod, cellId);
252-
}
240+
for (int ic = 0; ic < 8; ic++) {
241+
int cellId = ic + 8 * ir;
242+
std::string tbsName = "tbs" + std::to_string(cellId);
243+
std::string nodeName = "fvd_node" + std::to_string(cellId);
244+
float rmin = FVDBaseParam::rRingsA[ir];
245+
float rmax = FVDBaseParam::rRingsA[ir + 1];
246+
float phimin = dphiDeg * ic;
247+
float phimax = dphiDeg * (ic + 1);
248+
float dz = FVDBaseParam::dzScint;
249+
auto tbs = new TGeoTubeSeg(tbsName.c_str(), rmin, rmax, dz, phimin, phimax);
250+
auto nod = new TGeoVolume(nodeName.c_str(), tbs, medium);
251+
mod->AddNode(nod, cellId);
252+
}
253253
}
254254

255255
return mod;
@@ -259,31 +259,30 @@ TGeoVolumeAssembly* Detector::buildModuleC()
259259
{
260260
TGeoVolumeAssembly* mod = new TGeoVolumeAssembly("FVDC");
261261

262-
const TGeoMedium* medium = gGeoManager->GetMedium("FVD_Scintillator");
262+
const TGeoMedium* medium = gGeoManager->GetMedium("FVD_Scintillator");
263263

264264
const float dphiDeg = 45.;
265265

266266
for (int ir = 0; ir < FVDBaseParam::nRingsC; ir++) {
267-
for (int ic = 0; ic < 8; ic ++) {
268-
int cellId = ic + 8*ir + FVDBaseParam::nCellA;
269-
std::string tbsName = "tbs" + std::to_string(cellId);
270-
std::string nodeName = "fvd_node" + std::to_string(cellId);
271-
float rmin = FVDBaseParam::rRingsC[ir];
272-
float rmax = FVDBaseParam::rRingsC[ir+1];
273-
float phimin = dphiDeg * ic;
274-
float phimax = dphiDeg * (ic + 1);
275-
float dz = FVDBaseParam::dzScint;
276-
auto tbs = new TGeoTubeSeg(tbsName.c_str(), rmin, rmax, dz, phimin, phimax);
277-
auto nod = new TGeoVolume(nodeName.c_str(), tbs, medium);
278-
mod->AddNode(nod, cellId);
279-
}
267+
for (int ic = 0; ic < 8; ic++) {
268+
int cellId = ic + 8 * ir + FVDBaseParam::nCellA;
269+
std::string tbsName = "tbs" + std::to_string(cellId);
270+
std::string nodeName = "fvd_node" + std::to_string(cellId);
271+
float rmin = FVDBaseParam::rRingsC[ir];
272+
float rmax = FVDBaseParam::rRingsC[ir + 1];
273+
float phimin = dphiDeg * ic;
274+
float phimax = dphiDeg * (ic + 1);
275+
float dz = FVDBaseParam::dzScint;
276+
auto tbs = new TGeoTubeSeg(tbsName.c_str(), rmin, rmax, dz, phimin, phimax);
277+
auto nod = new TGeoVolume(nodeName.c_str(), tbs, medium);
278+
mod->AddNode(nod, cellId);
279+
}
280280
}
281281

282282
return mod;
283283
}
284284

285285
void Detector::defineSensitiveVolumes()
286286
{
287-
LOG(info) << "Adding FVD Sentitive Volumes";
288-
287+
LOG(info) << "Adding FVD Sentitive Volumes";
289288
}

0 commit comments

Comments
 (0)