Skip to content

Commit eef6405

Browse files
committed
Please consider the following formatting changes
1 parent d04a89c commit eef6405

File tree

6 files changed

+75
-77
lines changed

6 files changed

+75
-77
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: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ namespace o2
2020
namespace fvd
2121
{
2222
struct FVDBaseParam : public o2::conf::ConfigurableParamHelper<FVDBaseParam> {
23-
static constexpr int nCellA = 40; //24
24-
static constexpr int nCellC = 48;
25-
static constexpr int nRingsA = 5; //3
23+
static constexpr int nCellA = 40; // 24
24+
static constexpr int nCellC = 48;
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, 14.8, 22.8, 37.3, 48.5, 59.8, 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, 14.8, 22.8, 37.3, 48.5, 59.8, 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: 59 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ Bool_t Detector::ProcessHits(FairVolume* vol)
135135
return kFALSE; // do nothing more
136136
}
137137

138-
return kTRUE;
138+
return kTRUE;
139139
}
140140

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

152-
void Detector::ConstructGeometry()
152+
void Detector::ConstructGeometry()
153153
{
154-
createMaterials();
155-
buildModules();
156-
defineSensitiveVolumes();
154+
createMaterials();
155+
buildModules();
156+
defineSensitiveVolumes();
157157
}
158158

159-
160-
void Detector::EndOfEvent() {
161-
Reset();
159+
void Detector::EndOfEvent()
160+
{
161+
Reset();
162162
}
163163

164164
void Detector::Register()
@@ -195,16 +195,16 @@ void Detector::createMaterials()
195195

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

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

210210
o2::base::Detector::Mixture(++matId, "Scintillator", aScint, zScint, dScint, nScint, wScint);
@@ -218,12 +218,12 @@ void Detector::buildModules()
218218

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

224224
// create modules
225-
TGeoVolumeAssembly *vFVDA = buildModuleA();
226-
TGeoVolumeAssembly *vFVDC = buildModuleC();
225+
TGeoVolumeAssembly* vFVDA = buildModuleA();
226+
TGeoVolumeAssembly* vFVDC = buildModuleC();
227227

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

236-
const TGeoMedium* medium = gGeoManager->GetMedium("FVD_Scintillator");
236+
const TGeoMedium* medium = gGeoManager->GetMedium("FVD_Scintillator");
237237

238238
const float dphiDeg = 45.;
239239

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

259259
return mod;
@@ -263,42 +263,42 @@ TGeoVolumeAssembly* Detector::buildModuleC()
263263
{
264264
TGeoVolumeAssembly* mod = new TGeoVolumeAssembly("FVDC");
265265

266-
const TGeoMedium* medium = gGeoManager->GetMedium("FVD_Scintillator");
266+
const TGeoMedium* medium = gGeoManager->GetMedium("FVD_Scintillator");
267267

268268
const float dphiDeg = 45.;
269269

270270
for (int ir = 0; ir < FVDBaseParam::nRingsC; ir++) {
271-
std::string rName = "fvd_ring" + std::to_string(ir+1+FVDBaseParam::nRingsA);
272-
TGeoVolumeAssembly *ring = new TGeoVolumeAssembly(rName.c_str());
273-
for (int ic = 0; ic < 8; ic ++) {
274-
int cellId = ic + 8*ir + FVDBaseParam::nCellA;
275-
std::string tbsName = "tbs" + std::to_string(cellId);
276-
std::string nodeName = "fvd_node" + std::to_string(cellId);
277-
float rmin = FVDBaseParam::rRingsC[ir];
278-
float rmax = FVDBaseParam::rRingsC[ir+1];
279-
float phimin = dphiDeg * ic;
280-
float phimax = dphiDeg * (ic + 1);
281-
float dz = FVDBaseParam::dzScint;
282-
auto tbs = new TGeoTubeSeg(tbsName.c_str(), rmin, rmax, dz, phimin, phimax);
283-
auto nod = new TGeoVolume(nodeName.c_str(), tbs, medium);
284-
ring->AddNode(nod, cellId);
285-
}
286-
mod->AddNode(ring, ir);
271+
std::string rName = "fvd_ring" + std::to_string(ir + 1 + FVDBaseParam::nRingsA);
272+
TGeoVolumeAssembly* ring = new TGeoVolumeAssembly(rName.c_str());
273+
for (int ic = 0; ic < 8; ic++) {
274+
int cellId = ic + 8 * ir + FVDBaseParam::nCellA;
275+
std::string tbsName = "tbs" + std::to_string(cellId);
276+
std::string nodeName = "fvd_node" + std::to_string(cellId);
277+
float rmin = FVDBaseParam::rRingsC[ir];
278+
float rmax = FVDBaseParam::rRingsC[ir + 1];
279+
float phimin = dphiDeg * ic;
280+
float phimax = dphiDeg * (ic + 1);
281+
float dz = FVDBaseParam::dzScint;
282+
auto tbs = new TGeoTubeSeg(tbsName.c_str(), rmin, rmax, dz, phimin, phimax);
283+
auto nod = new TGeoVolume(nodeName.c_str(), tbs, medium);
284+
ring->AddNode(nod, cellId);
285+
}
286+
mod->AddNode(ring, ir);
287287
}
288288

289289
return mod;
290290
}
291291

292292
void Detector::defineSensitiveVolumes()
293293
{
294-
LOG(info) << "Adding FVD Sentitive Volumes";
295-
TGeoVolume *v;
296-
TString volumeName;
297-
298-
for (int iv = 0; iv < FVDBaseParam::nCellA + FVDBaseParam::nCellC; iv ++) {
299-
volumeName = "fvd_node" + std::to_string(iv);
300-
v = gGeoManager->GetVolume(volumeName);
301-
LOG(info) << "Adding FVD Sensitive Volume => " << v->GetName();
302-
AddSensitiveVolume(v);
303-
}
294+
LOG(info) << "Adding FVD Sentitive Volumes";
295+
TGeoVolume* v;
296+
TString volumeName;
297+
298+
for (int iv = 0; iv < FVDBaseParam::nCellA + FVDBaseParam::nCellC; iv++) {
299+
volumeName = "fvd_node" + std::to_string(iv);
300+
v = gGeoManager->GetVolume(volumeName);
301+
LOG(info) << "Adding FVD Sensitive Volume => " << v->GetName();
302+
AddSensitiveVolume(v);
303+
}
304304
}

0 commit comments

Comments
 (0)