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
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,8 @@ add_subdirectory (its)
add_subdirectory (passive)
add_subdirectory (field)
add_subdirectory (devices)
Add_Subdirectory(macro)


WRITE_CONFIG_FILE(config.sh)

Expand Down
2 changes: 1 addition & 1 deletion Data/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ MCTrack.cxx

Set(HEADERS )
Set(LINKDEF DataLinkDef.h)
Set(LIBRARY_NAME AliceO2Data)
Set(LIBRARY_NAME O2Data)
Set(DEPENDENCIES Base EG Physics Cint Core)

GENERATE_LIBRARY()
4 changes: 2 additions & 2 deletions Generators/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ Pythia8Generator.cxx
)

set(LINKDEF GeneratorsLinkDef.h)
set(LIBRARY_NAME AliGen)
set(LIBRARY_NAME O2Gen)

set(DEPENDENCIES Base AliceO2Data pythia8 Pythia6)
set(DEPENDENCIES Base O2Data pythia8 Pythia6)

GENERATE_LIBRARY()
2 changes: 1 addition & 1 deletion field/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Chebyshev3DCalc.cxx

Set(HEADERS)
Set(LINKDEF fieldLinkDef.h)
Set(LIBRARY_NAME AliceO2Field)
Set(LIBRARY_NAME Field)
Set(DEPENDENCIES Base EG Physics Cint Core)

GENERATE_LIBRARY()
Expand Down
4 changes: 3 additions & 1 deletion field/Chebyshev3D.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class TROOT;
class stdio;
class FairLogger;


namespace AliceO2 {
namespace Field {

Expand Down Expand Up @@ -54,6 +55,7 @@ namespace Field {
/// H.Wind, CERN EP Internal Report, 81-12/Rev.
class Chebyshev3D : public TNamed {
public:

Chebyshev3D();
Chebyshev3D(const Chebyshev3D& src);
Chebyshev3D(const char* inpFile);
Expand Down Expand Up @@ -219,7 +221,7 @@ class Chebyshev3D : public TNamed {
TMethodCall* mUserMacro; //! Pointer to MethodCall for function from user macro
FairLogger* mLogger; //!

ClassDef(Chebyshev3D, 1) // Chebyshev parametrization for 3D->N function
ClassDef(AliceO2::Field::Chebyshev3D, 2) // Chebyshev parametrization for 3D->N function
};

/// Checks if the point is inside of the fitted box
Expand Down
6 changes: 4 additions & 2 deletions field/Chebyshev3DCalc.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ class TSystem;

namespace AliceO2 {
namespace Field {

class Chebyshev3DCalc : public TNamed {

public:



/// Default constructor
Chebyshev3DCalc();
/// Copy constructor
Expand Down Expand Up @@ -156,7 +158,7 @@ class Chebyshev3DCalc : public TNamed {
Float_t* mTemporaryCoefficients2D; //[mNumberOfColumns] temp. coeffs for 2d summation
Float_t* mTemporaryCoefficients1D; //[mNumberOfRows] temp. coeffs for 1d summation

ClassDef(Chebyshev3DCalc, 1) // Class for interpolation of 3D->1 function by Chebyshev parametrization
ClassDef(AliceO2::Field::Chebyshev3DCalc, 2) // Class for interpolation of 3D->1 function by Chebyshev parametrization
};

/// Evaluates 1D Chebyshev parameterization. x is the argument mapped to [-1:1] interval
Expand Down
2 changes: 1 addition & 1 deletion field/MagneticField.h
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ class MagneticField : public TVirtualMagField {

FairLogger* mLogger;

ClassDef(MagneticField, 1) // Class for all Alice MagField wrapper for measured data + Tosca parameterization
ClassDef(AliceO2::Field::MagneticField, 2) // Class for all Alice MagField wrapper for measured data + Tosca parameterization
};
}
}
Expand Down
5 changes: 4 additions & 1 deletion field/MagneticWrapperChebyshev.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ namespace Field {
class MagneticWrapperChebyshev : public TNamed {

public:



/// Default constructor
MagneticWrapperChebyshev();

Expand Down Expand Up @@ -396,7 +399,7 @@ class MagneticWrapperChebyshev : public TNamed {
TObjArray* mParameterizationDipole; ///< Parameterization pieces for Dipole field

FairLogger* mLogger;
ClassDef(MagneticWrapperChebyshev, 1) // Wrapper class for the set of Chebishev parameterizations of Alice mag.field
ClassDef(AliceO2::Field::MagneticWrapperChebyshev, 2) // Wrapper class for the set of Chebishev parameterizations of Alice mag.field
};

/// Computes field in Cylindircal coordinates
Expand Down
25 changes: 24 additions & 1 deletion field/fieldLinkDef.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

#ifdef __CINT__

#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;
Expand All @@ -10,4 +9,28 @@
#pragma link C++ class AliceO2::Field::MagneticWrapperChebyshev+;
#pragma link C++ class AliceO2::Field::Chebyshev3DCalc+;

#pragma read sourceClass="AliCheb3D" targetClass="AliceO2::Field::Chebyshev3D" version="[1-]" source="Int_t fDimOut" target="Int_t mOutputArrayDimension" code="{ mOutputArrayDimension = onfile.fDimOut; }"


//Int_t fDimOut; // dimension of the ouput array
//Float_t fPrec; // requested precision
//Float_t fBMin[3]; // min boundaries in each dimension
//Float_t fBMax[3]; // max boundaries in each dimension
//Float_t fBScale[3]; // scale for boundary mapping to [-1:1] interval
//Float_t fBOffset[3]; // offset for boundary mapping to [-1:1] interval
//TObjArray fChebCalc; // Chebyshev parameterization for each output dimension


//Int_t mOutputArrayDimension; ///< dimension of the ouput array
//Float_t mPrecision; ///< requested precision
//Float_t mMinBoundaries[3]; ///< min boundaries in each dimension
//Float_t mMaxBoundaries[3]; ///< max boundaries in each dimension
//Float_t mBoundaryMappingScale[3]; ///< scale for boundary mapping to [-1:1] interval
//Float_t mBoundaryMappingOffset[3]; ///< offset for boundary mapping to [-1:1] interval
//TObjArray mChebyshevParameter; ///< Chebyshev parameterization for each output dimension





#endif
2 changes: 1 addition & 1 deletion its/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Point.cxx
)

Set(LINKDEF itsLinkDef.h)
Set(LIBRARY_NAME AliceO2its)
Set(LIBRARY_NAME its)
Set(DEPENDENCIES
Base
)
Expand Down
12 changes: 9 additions & 3 deletions its/Detector.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -334,9 +334,15 @@ Bool_t Detector::ProcessHits(FairVolume* vol)

void Detector::createMaterials()
{
Int_t ifield = ((AliceO2::Field::MagneticField*)TGeoGlobalMagField::Instance()->GetField())->Integral();
Float_t fieldm = ((AliceO2::Field::MagneticField*)TGeoGlobalMagField::Instance()->GetField())->Max();

// Int_t ifield = ((AliceO2::Field::MagneticField*)TGeoGlobalMagField::Instance()->GetField())->Integral();
// Float_t fieldm = ((AliceO2::Field::MagneticField*)TGeoGlobalMagField::Instance()->GetField())->Max();

// until we solve the problem of reading the field from files with changed class names we
// need to hard code some values here to be able to run the macros M.Al-Turany (Nov.14)
Int_t ifield = 10;
Float_t fieldm = 2.0;
////////////

Float_t tmaxfd = 0.1; // 1.0; // Degree
Float_t stemax = 1.0; // cm
Float_t deemax = 0.1; // 30.0; // Fraction of particle's energy 0<deemax<=1
Expand Down
1 change: 1 addition & 0 deletions its/itsLinkDef.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@
#pragma link C++ class AliceO2::ITS::MisalignmentParameter+;
#pragma link C++ class AliceO2::ITS::Point+;


#endif
13 changes: 13 additions & 0 deletions macro/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
GENERATE_ROOT_TEST_SCRIPT(${CMAKE_SOURCE_DIR}/macro/run_sim.C)

ForEach(_mcEngine IN ITEMS TGeant3 TGeant4)
Add_Test(run_sim_${_mcEngine}
${CMAKE_BINARY_DIR}/macro/run_sim.sh 10 \"${_mcEngine}\")
Set_Tests_Properties(run_sim_${_mcEngine} PROPERTIES TIMEOUT "30")
Set_Tests_Properties(run_sim_${_mcEngine} PROPERTIES PASS_REGULAR_EXPRESSION "Macro finished succesfully")
EndForEach(_mcEngine IN ITEMS TGeant3 TGeant4)

Install(FILES run_sim.C
DESTINATION share/its
)

8 changes: 4 additions & 4 deletions macro/run_sim.C
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ void run_sim(Int_t nEvents = 10, TString mcEngine = "TGeant3")
TStopwatch timer;
timer.Start();

gSystem->Load("libAliceO2Base");
gSystem->Load("libAliceO2its");
// gSystem->Load("libAliceO2Base");
// gSystem->Load("libAliceO2its");

// Create simulation run
FairRunSim* run = new FairRunSim();
Expand All @@ -38,15 +38,15 @@ void run_sim(Int_t nEvents = 10, TString mcEngine = "TGeant3")
run->SetMaterials("media.geo"); // Materials

// Create geometry
FairModule* cave = new AliCave("CAVE");
AliceO2::Passive::Cave* cave = new AliceO2::Passive::Cave("CAVE");
cave->SetGeometryFileName("cave.geo");
run->AddModule(cave);

// FairDetector* tpc = new O2tpc("TPCV2");
// tpc->SetGeometry();
// run->AddModule(tpc);

TGeoGlobalMagField::Instance()->SetField(new AliceO2::Field::MagneticField("Maps","Maps", -1., -1., AliceO2::Field::MagneticField::k5kG));
// TGeoGlobalMagField::Instance()->SetField(new AliceO2::Field::MagneticField("Maps","Maps", -1., -1., AliceO2::Field::MagneticField::k5kG));

AliceO2::Base::Detector* its = new AliceO2::ITS::Detector("ITS", kTRUE, 7);
run->AddModule(its);
Expand Down
10 changes: 5 additions & 5 deletions passive/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ ${FAIRROOT_LIBRARY_DIR}
link_directories( ${LINK_DIRECTORIES})

set(SRCS
AliCave.cxx
AliPipe.cxx
AliGeoCave.cxx
AliMagnet.cxx
AliPassiveContFact.cxx
Cave.cxx
GeoCave.cxx
Pipe.cxx
Magnet.cxx
PassiveContFact.cxx
)

Set(HEADERS )
Expand Down
22 changes: 13 additions & 9 deletions passive/AliCave.cxx → passive/Cave.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
********************************************************************************/

// -------------------------------------------------------------------------
// ----- AliCave file -----
// ----- Cave file -----
// ----- Created 26/03/14 by M. Al-Turany -----
// -------------------------------------------------------------------------
#include "AliCave.h"
#include "AliGeoCave.h" // for AliGeoCave
#include "Cave.h"
#include "GeoCave.h" // for AliGeoCave
#include "FairGeoInterface.h" // for FairGeoInterface
#include "FairGeoLoader.h" // for FairGeoLoader
#include "FairGeoNode.h" // for FairGeoNode
Expand All @@ -27,29 +27,33 @@

#include <stddef.h> // for NULL

ClassImp(AliCave)
using namespace AliceO2::Passive;

void AliCave::ConstructGeometry()
ClassImp(AliceO2::Passive::Cave)



void Cave::ConstructGeometry()
{
FairGeoLoader* loader=FairGeoLoader::Instance();
FairGeoInterface* GeoInterface =loader->getGeoInterface();
AliGeoCave* MGeo=new AliGeoCave();
GeoCave* MGeo=new GeoCave();
MGeo->setGeomFile(GetGeometryFileName());
GeoInterface->addGeoModule(MGeo);
Bool_t rc = GeoInterface->readSet(MGeo);
if ( rc ) { MGeo->create(loader->getGeoBuilder()); }

}
AliCave::AliCave()
Cave::Cave()
:FairModule()
{
}

AliCave::~AliCave()
Cave::~Cave()
{

}
AliCave::AliCave(const char* name, const char* Title)
Cave::Cave(const char* name, const char* Title)
: FairModule(name ,Title)
{
world[0] = 0;
Expand Down
24 changes: 13 additions & 11 deletions passive/AliCave.h → passive/Cave.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,33 @@
********************************************************************************/

// -------------------------------------------------------------------------
// ----- AliCave file -----
// ----- Cave file -----
// ----- Created 26/03/14 by M. Al-Turany -----
// -------------------------------------------------------------------------


#ifndef Cave_H
#define Cave_H
#ifndef ALICEO2_PASSIVE_Cave_H
#define ALICEO2_PASSIVE_Cave_H

#include "FairModule.h" // for FairModule
#include "Rtypes.h" // for ClassDef, etc
namespace AliceO2 {
namespace Passive {

#include "Rtypes.h" // for AliCave::Class, ClassDef, etc

class AliCave : public FairModule
class Cave : public FairModule
{
public:
AliCave(const char* name, const char* Title="Exp Cave");
AliCave();
virtual ~AliCave();
Cave(const char* name, const char* Title="Exp Cave");
Cave();
virtual ~Cave();
virtual void ConstructGeometry();


private:
Double_t world[3];
ClassDef(AliCave,1) //PNDCaveSD
ClassDef(AliceO2::Passive::Cave,1) //
};

}
}
#endif //Cave_H

Loading