mirror of
https://github.com/OpenCMT/uLib.git
synced 2025-12-06 07:21:31 +01:00
Compare commits
2 Commits
beam_trace
...
v0.5.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fce2a39393 | ||
|
|
d223a3a308 |
@@ -11,7 +11,7 @@ project(uLib)
|
||||
|
||||
# The version number.
|
||||
set(PROJECT_VERSION_MAJOR 0)
|
||||
set(PROJECT_VERSION_MINOR 4)
|
||||
set(PROJECT_VERSION_MINOR 5)
|
||||
set(PROJECT_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
|
||||
set(PROJECT_SOVERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
|
||||
|
||||
|
||||
@@ -1,12 +1,40 @@
|
||||
set(HEADERS RootMathDense.h
|
||||
RootMuonScatter.h
|
||||
RootHitRaw.h)
|
||||
RootHitRaw.h
|
||||
muCastorMCTrack.h
|
||||
muCastorHit.h
|
||||
muCastorInfo.h
|
||||
muCastorSkinHit.h)
|
||||
|
||||
set(SOURCES ${HEADERS} RootMuonScatter.cpp)
|
||||
set(SOURCES ${HEADERS} RootMuonScatter.cpp
|
||||
muCastorMCTrack.cpp
|
||||
muCastorHit.cpp
|
||||
muCastorInfo.cpp
|
||||
muCastorSkinHit.cpp)
|
||||
|
||||
set(DICTIONARY_HEADERS muCastorMCTrack.h
|
||||
muCastorHit.h
|
||||
muCastorInfo.h
|
||||
muCastorSkinHit.h)
|
||||
|
||||
set(LIBRARIES ${ROOT_LIBRARIES}
|
||||
${PACKAGE_LIBPREFIX}Math)
|
||||
|
||||
set(rDictName ${PACKAGE_LIBPREFIX}RootDict)
|
||||
root_generate_dictionary(${rDictName} ${DICTIONARY_HEADERS}
|
||||
LINKDEF Linkdef.h)
|
||||
set_source_files_properties(${rDictName}.cxx
|
||||
PROPERTIES GENERATED TRUE)
|
||||
set_source_files_properties(${rDictName}.h
|
||||
PROPERTIES GENERATED TRUE)
|
||||
list(APPEND SOURCES ${rDictName}.cxx)
|
||||
|
||||
# TODO use a custom target linked to root_generate_dictionary
|
||||
set(R_ARTIFACTS ${CMAKE_CURRENT_BINARY_DIR}/lib${rDictName}_rdict.pcm
|
||||
${CMAKE_CURRENT_BINARY_DIR}/lib${rDictName}.rootmap)
|
||||
install(FILES ${R_ARTIFACTS}
|
||||
DESTINATION ${PACKAGE_INSTALL_LIB_DIR})
|
||||
|
||||
set(libname ${PACKAGE_LIBPREFIX}Root)
|
||||
set(ULIB_SHARED_LIBRARIES ${ULIB_SHARED_LIBRARIES} ${libname} PARENT_SCOPE)
|
||||
set(ULIB_SELECTED_MODULES ${ULIB_SELECTED_MODULES} Root PARENT_SCOPE)
|
||||
|
||||
@@ -79,6 +79,7 @@ using namespace ROOT::Mutom;
|
||||
#pragma link C++ class muCastorMCTrack+;
|
||||
#pragma link C++ class muCastorHit+;
|
||||
#pragma link C++ class muCastorInfo+;
|
||||
#pragma link C++ class muCastorSkinHit+;
|
||||
|
||||
#endif // __CINT__
|
||||
|
||||
|
||||
43
src/Root/muCastorSkinHit.cpp
Normal file
43
src/Root/muCastorSkinHit.cpp
Normal file
@@ -0,0 +1,43 @@
|
||||
//----------------------------------------------------------
|
||||
// Class : CastorSkinHit
|
||||
// Date: October 2020
|
||||
// Author: Germano Bonomi germano.bonomi@unibs.it
|
||||
//----------------------------------------------------------
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include "muCastorSkinHit.h"
|
||||
|
||||
/// \cond CLASSIMP
|
||||
ClassImp(muCastorSkinHit)
|
||||
/// \endcond
|
||||
|
||||
using namespace std;
|
||||
|
||||
//_____________________________________________________________________________
|
||||
muCastorSkinHit::muCastorSkinHit() :
|
||||
fDetID(-1),
|
||||
fPdgCode(-1),
|
||||
fMotherID(-1),
|
||||
fMomX(0.),
|
||||
fMomY(0.),
|
||||
fMomZ(0.),
|
||||
fPosX(0.),
|
||||
fPosY(0.),
|
||||
fPosZ(0.)
|
||||
{}
|
||||
|
||||
//_____________________________________________________________________________
|
||||
muCastorSkinHit::~muCastorSkinHit()
|
||||
{}
|
||||
//_____________________________________________________________________________
|
||||
void muCastorSkinHit::Print(const Option_t* /*opt*/) const
|
||||
{
|
||||
cout << " detID: " << fDetID
|
||||
<< " position (cm): ("
|
||||
<< fPosX << ", " << fPosY << ", " << fPosZ << ")"
|
||||
<< " momentum (MeV/c): ("
|
||||
<< fMomX << ", " << fMomY << ", " << fMomZ << ")"
|
||||
<< endl;
|
||||
}
|
||||
|
||||
46
src/Root/muCastorSkinHit.h
Normal file
46
src/Root/muCastorSkinHit.h
Normal file
@@ -0,0 +1,46 @@
|
||||
//----------------------------------------------------------
|
||||
// Class : CastorSkinHit
|
||||
// Date: October 2020
|
||||
// Author: Germano Bonomi germano.bonomi@unibs.it
|
||||
//----------------------------------------------------------
|
||||
|
||||
#ifndef muCastor_SKINHIT_H
|
||||
#define muCastor_SKINHIT_H
|
||||
|
||||
|
||||
#include <TObject.h>
|
||||
#include <TVector3.h>
|
||||
|
||||
class muCastorSkinHit : public TObject
|
||||
{
|
||||
public:
|
||||
muCastorSkinHit();
|
||||
virtual ~muCastorSkinHit();
|
||||
|
||||
// methods
|
||||
virtual void Print(const Option_t* option = "") const;
|
||||
|
||||
// set methods
|
||||
void SetDetID(Int_t id) { fDetID = id; };
|
||||
void SetPdgCode(Int_t pdg) { fPdgCode = pdg; };
|
||||
void SetMotherID(Int_t mid) { fMotherID = mid; };
|
||||
void SetMom(TVector3 xyz) { fMomX = xyz.X(); fMomY = xyz.Y(); fMomZ = xyz.Z(); };
|
||||
void SetPos(TVector3 xyz) { fPosX = xyz.X(); fPosY = xyz.Y(); fPosZ = xyz.Z(); };
|
||||
|
||||
private:
|
||||
Int_t fDetID; // Detector module ID
|
||||
Int_t fPdgCode; // Particle PDG Code
|
||||
Int_t fMotherID; // Particle mother ID (-1 = primary, 0 = secondary, etc..)
|
||||
Double_t fMomX; // Track momentum when releasing the hit (X)
|
||||
Double_t fMomY; // Track momentum when releasing the hit (Y)
|
||||
Double_t fMomZ; // Track momentum when releasing the hit (Z)
|
||||
Double_t fPosX; // Hit coordinates (at the entrance of the detector) (X)
|
||||
Double_t fPosY; // Hit coordinates (at the entrance of the detector) (Y)
|
||||
Double_t fPosZ; // Hit coordinates (at the entrance of the detector) (Z)
|
||||
|
||||
ClassDef(muCastorSkinHit,1) //muCastorSkinHit
|
||||
};
|
||||
|
||||
#endif //muCastort_SKINHIT_H
|
||||
|
||||
|
||||
Reference in New Issue
Block a user