Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#AccessModifierOffset: -2
AlignEscapedNewlinesLeft: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortFunctionsOnASingleLine: false
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
#AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakTemplateDeclarations: true
BinPackParameters: true
BreakBeforeBinaryOperators: false
BreakBeforeBraces: Stroustrup
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
ColumnLimit: 120
CommentPragmas: '^ IWYU pragma:'
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 2
ContinuationIndentWidth: 2
Cpp11BracedListStyle: false
DerivePointerBinding: false
ExperimentalAutoDetectBinPacking: false
IndentCaseLabels: true
IndentFunctionDeclarationAfterType: true
IndentWidth: 2
# It is broken on windows. Breaks all #include "header.h"
Language: Cpp
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: false
PenaltyBreakBeforeFirstCallParameter: 1
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 200
PointerBindsToType: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
Standard: Cpp11
TabWidth: 2
UseTab: Never
1 change: 0 additions & 1 deletion Base/BaseLinkDef.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@
#pragma link C++ class AliceO2::Base::TrackReference+;

#endif

6 changes: 3 additions & 3 deletions Base/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
set(INCLUDE_DIRECTORIES
${CMAKE_SOURCE_DIR}/Base
${ROOT_INCLUDE_DIR}
${BASE_INCLUDE_DIRECTORIES}
${ROOT_INCLUDE_DIR}
)

include_directories( ${INCLUDE_DIRECTORIES})

set(LINK_DIRECTORIES
${ROOT_LIBRARY_DIR}
${FAIRROOT_LIBRARY_DIR}
${CMAKE_SOURCE_DIR}/Base
${FAIRROOT_LIBRARY_DIR}
${ROOT_LIBRARY_DIR}
)

link_directories( ${LINK_DIRECTORIES})
Expand Down
8 changes: 4 additions & 4 deletions Base/Detector.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -72,22 +72,22 @@ void Detector::Matrix(Int_t& nmat, Float_t theta1, Float_t phi1, Float_t theta2,
gMC->Matrix(nmat, theta1, phi1, theta2, phi2, theta3, phi3);
}

void Detector::DefineWrapperVolume(Int_t id, Double_t rmin, Double_t rmax, Double_t zspan)
void Detector::defineWrapperVolume(Int_t id, Double_t rmin, Double_t rmax, Double_t zspan)
{
}

void Detector::SetNumberOfWrapperVolumes(Int_t n)
void Detector::setNumberOfWrapperVolumes(Int_t n)
{
}

void Detector::DefineLayer(const Int_t nlay, const double phi0, const Double_t r,
void Detector::defineLayer(const Int_t nlay, const double phi0, const Double_t r,
const Double_t zlen, const Int_t nladd, const Int_t nmod,
const Double_t lthick, const Double_t dthick, const UInt_t dettypeID,
const Int_t buildLevel)
{
}

void Detector::DefineLayerTurbo(Int_t nlay, Double_t phi0, Double_t r, Double_t zlen, Int_t nladd,
void Detector::defineLayerTurbo(Int_t nlay, Double_t phi0, Double_t r, Double_t zlen, Int_t nladd,
Int_t nmod, Double_t width, Double_t tilt, Double_t lthick,
Double_t dthick, UInt_t dettypeID, Int_t buildLevel)
{
Expand Down
48 changes: 21 additions & 27 deletions Base/Detector.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@ namespace Base {
class Detector : public FairDetector {

public:
enum Model {
test123 = 0
};


Detector(const char* name, Bool_t Active, Int_t DetId = 0);

/// Default Constructor
Expand All @@ -28,53 +23,52 @@ class Detector : public FairDetector {
virtual ~Detector();

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

virtual void Mixture(Int_t imat, const char* name, Float_t* a, Float_t* z, Float_t dens,
Int_t nlmat, Float_t* wmat) const;
virtual void Mixture(Int_t imat, const char* name, Float_t* a, Float_t* z, Float_t dens, Int_t nlmat,
Float_t* wmat) const;

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

/// Define a rotation matrix. Angles are in degrees.
/// Define a rotation matrix. angles are in degrees.
/// \param nmat on output contains the number assigned to the rotation matrix
/// \param theta1 polar angle for axis I
/// \param theta2 polar angle for axis II
/// \param theta3 polar angle for axis III
/// \param phi1 azimuthal angle for axis I
/// \param phi2 azimuthal angle for axis II
/// \param phi3 azimuthal angle for axis III
virtual void Matrix(Int_t& nmat, Float_t theta1, Float_t phi1, Float_t theta2, Float_t phi2,
Float_t theta3, Float_t phi3) const;
virtual void Matrix(Int_t& nmat, Float_t theta1, Float_t phi1, Float_t theta2, Float_t phi2, Float_t theta3,
Float_t phi3) const;

static void SetDensityFactor(Float_t density)
static void setDensityFactor(Float_t density)
{
mDensityFactor = density;
}
static Float_t GetDensityFactor()
static Float_t getDensityFactor()
{
return mDensityFactor;
}

/// Sets per wrapper volume parameters
virtual void DefineWrapperVolume(Int_t id, Double_t rmin, Double_t rmax, Double_t zspan);
virtual void defineWrapperVolume(Int_t id, Double_t rmin, Double_t rmax, Double_t zspan);

/// Books arrays for wrapper volumes
virtual void SetNumberOfWrapperVolumes(Int_t n);
virtual void setNumberOfWrapperVolumes(Int_t n);

virtual void DefineLayer(Int_t nlay, Double_t phi0, Double_t r, Double_t zlen, Int_t nladd,
Int_t nmod, Double_t lthick = 0., Double_t dthick = 0.,
UInt_t detType = 0, Int_t buildFlag = 0);
virtual void defineLayer(Int_t nlay, Double_t phi0, Double_t r, Double_t zlen, Int_t nladd, Int_t nmod,
Double_t lthick = 0., Double_t dthick = 0., UInt_t detType = 0, Int_t buildFlag = 0);

virtual void DefineLayerTurbo(Int_t nlay, Double_t phi0, Double_t r, Double_t zlen, Int_t nladd,
Int_t nmod, Double_t width, Double_t tilt, Double_t lthick = 0.,
Double_t dthick = 0., UInt_t detType = 0, Int_t buildFlag = 0);
virtual void defineLayerTurbo(Int_t nlay, Double_t phi0, Double_t r, Double_t zlen, Int_t nladd, Int_t nmod,
Double_t width, Double_t tilt, Double_t lthick = 0., Double_t dthick = 0.,
UInt_t detType = 0, Int_t buildFlag = 0);

protected:
static Float_t mDensityFactor; ///< factor that is multiplied to all material densities (ONLY for
///< systematic studies)
static Float_t mDensityFactor; //! factor that is multiplied to all material densities (ONLY for
// systematic studies)
private:
Detector(const Detector&);
Detector& operator=(const Detector&);
Expand Down
24 changes: 12 additions & 12 deletions Base/Module.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,33 +23,33 @@ class Module : public FairModule {
virtual ~Module();

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

virtual void Mixture(Int_t imat, const char* name, Float_t* a, Float_t* z, Float_t dens,
Int_t nlmat, Float_t* wmat) const;
virtual void Mixture(Int_t imat, const char* name, Float_t* a, Float_t* z, Float_t dens, Int_t nlmat,
Float_t* wmat) const;

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

/// Define a rotation matrix. Angles are in degrees.
/// Define a rotation matrix. angles are in degrees.
/// \param nmat on output contains the number assigned to the rotation matrix
/// \param theta1 polar angle for axis I
/// \param phi1 azimuthal angle for axis I
/// \param theta2 polar angle for axis II
/// \param phi2 azimuthal angle for axis II
/// \param theta3 polar angle for axis III
/// \param phi3 azimuthal angle for axis III
virtual void Matrix(Int_t& nmat, Float_t theta1, Float_t phi1, Float_t theta2, Float_t phi2,
Float_t theta3, Float_t phi3) const;
virtual void Matrix(Int_t& nmat, Float_t theta1, Float_t phi1, Float_t theta2, Float_t phi2, Float_t theta3,
Float_t phi3) const;

static void SetDensityFactor(Float_t density)
static void setDensityFactor(Float_t density)
{
mDensityFactor = density;
}

static Float_t GetDensityFactor()
static Float_t getDensityFactor()
{
return mDensityFactor;
}
Expand Down
6 changes: 4 additions & 2 deletions Base/TrackReference.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ TrackReference::TrackReference()
// Default constructor
// Creates empty object

for (Int_t i = 0; i < 16; i++)
for (Int_t i = 0; i < 16; i++) {
ResetBit(BIT(i));
}
}

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

for (Int_t i = 14; i < 22; i++)
for (Int_t i = 14; i < 22; i++) {
ResetBit(BIT(i));
}

SetBit(BIT(14), gMC->IsNewTrack());
SetBit(BIT(15), gMC->IsTrackAlive());
Expand Down
13 changes: 6 additions & 7 deletions Base/TrackReference.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,7 @@ class TrackReference : public TObject {

virtual Float_t R() const
{
return TMath::Sqrt(mReferencePositionX * mReferencePositionX +
mReferencePositionY * mReferencePositionY);
return TMath::Sqrt(mReferencePositionX * mReferencePositionX + mReferencePositionY * mReferencePositionY);
}

virtual Float_t Pt() const
Expand Down Expand Up @@ -162,7 +161,7 @@ class TrackReference : public TObject {
mDetectorId = id;
}

virtual void SetPosition(Float_t x, Float_t y, Float_t z)
virtual void setPosition(Float_t x, Float_t y, Float_t z)
{
mReferencePositionX = x;
mReferencePositionY = y;
Expand All @@ -176,22 +175,22 @@ class TrackReference : public TObject {
mMomentumZ = pz;
}

virtual void SetUserId(Int_t userId)
virtual void setUserId(Int_t userId)
{
mUserId = userId;
}

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

virtual Float_t PhiPos() const
virtual Float_t phiPosition() const
{
return TMath::Pi() + TMath::ATan2(-mReferencePositionY, -mReferencePositionX);
}

virtual Float_t Alpha() const
{
return TMath::Pi() * (20 * ((((Int_t)(PhiPos() * 180 / TMath::Pi())) / 20)) + 10) / 180.;
return TMath::Pi() * (20 * ((((Int_t)(phiPosition() * 180 / TMath::Pi())) / 20)) + 10) / 180.;
}

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

Bool_t IsSortable() const
Bool_t isSortable() const
{
return kTRUE;
}
Expand Down
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ set(EXECUTABLE_OUTPUT_PATH "${CMAKE_BINARY_DIR}/bin")
set(INCLUDE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/include")
Set(VMCWORKDIR ${CMAKE_SOURCE_DIR})
Option(USE_PATH_INFO "Information from PATH and LD_LIBRARY_PATH are
used."OFF)
used." OFF)
If(USE_PATH_INFO)
Set(PATH "$PATH")
If (APPLE)
Expand Down Expand Up @@ -171,3 +171,7 @@ WRITE_CONFIG_FILE(config.sh)
configure_file(${CMAKE_SOURCE_DIR}/CTestCustom.cmake
${CMAKE_BINARY_DIR}/CTestCustom.cmake
)

# Create an automatically generated config header file to pass file paths to the application
configure_file(${PROJECT_SOURCE_DIR}/header/AliceO2Config.h.in
${CMAKE_CURRENT_SOURCE_DIR}/header/AliceO2Config.h)
8 changes: 4 additions & 4 deletions Data/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
set(INCLUDE_DIRECTORIES
${ROOT_INCLUDE_DIR}
${BASE_INCLUDE_DIRECTORIES}
${CMAKE_SOURCE_DIR}/Data
${BASE_INCLUDE_DIRECTORIES}
${ROOT_INCLUDE_DIR}
)

include_directories( ${INCLUDE_DIRECTORIES})

set(LINK_DIRECTORIES
${ROOT_LIBRARY_DIR}
${FAIRROOT_LIBRARY_DIR}
${CMAKE_SOURCE_DIR}/Data
${FAIRROOT_LIBRARY_DIR}
${ROOT_LIBRARY_DIR}
)

link_directories( ${LINK_DIRECTORIES})
Expand Down
1 change: 0 additions & 1 deletion Data/DataLinkDef.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,3 @@
#pragma link C++ class MCTrack+;

#endif

2 changes: 1 addition & 1 deletion Data/DetectorList.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
#define ALICEO2_DATA_DETECTORLIST_H_

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

#endif
Loading