mirror of
https://github.com/OpenCMT/uLib.git
synced 2025-12-06 07:21:31 +01:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fce2a39393 | ||
|
|
d223a3a308 | ||
|
|
843a2d69cf |
@@ -11,7 +11,7 @@ project(uLib)
|
|||||||
|
|
||||||
# The version number.
|
# The version number.
|
||||||
set(PROJECT_VERSION_MAJOR 0)
|
set(PROJECT_VERSION_MAJOR 0)
|
||||||
set(PROJECT_VERSION_MINOR 3)
|
set(PROJECT_VERSION_MINOR 5)
|
||||||
set(PROJECT_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
|
set(PROJECT_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
|
||||||
set(PROJECT_SOVERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
|
set(PROJECT_SOVERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
|
||||||
|
|
||||||
|
|||||||
@@ -1,30 +1,21 @@
|
|||||||
set(HEADERS TestTObject.h
|
set(HEADERS RootMathDense.h
|
||||||
RootMathDense.h
|
|
||||||
RootMuonScatter.h
|
RootMuonScatter.h
|
||||||
RootHitRaw.h
|
RootHitRaw.h
|
||||||
muBlastHit.h
|
|
||||||
muBlastMCTrack.h
|
|
||||||
muCastorMCTrack.h
|
muCastorMCTrack.h
|
||||||
muCastorHit.h
|
muCastorHit.h
|
||||||
muCastorInfo.h)
|
muCastorInfo.h
|
||||||
|
muCastorSkinHit.h)
|
||||||
|
|
||||||
set(DICTIONARY_HEADERS TestTObject.h
|
set(SOURCES ${HEADERS} RootMuonScatter.cpp
|
||||||
RootMathDense.h
|
muCastorMCTrack.cpp
|
||||||
RootMuonScatter.h
|
muCastorHit.cpp
|
||||||
RootHitRaw.h
|
muCastorInfo.cpp
|
||||||
muBlastHit.h
|
muCastorSkinHit.cpp)
|
||||||
muBlastMCTrack.h
|
|
||||||
muCastorMCTrack.h
|
set(DICTIONARY_HEADERS muCastorMCTrack.h
|
||||||
muCastorHit.h
|
muCastorHit.h
|
||||||
muCastorInfo.h)
|
muCastorInfo.h
|
||||||
|
muCastorSkinHit.h)
|
||||||
set(SOURCES TestTObject.cpp
|
|
||||||
RootMuonScatter.cpp
|
|
||||||
muBlastHit.cpp
|
|
||||||
muBlastMCTrack.cpp
|
|
||||||
muCastorMCTrack.cpp
|
|
||||||
muCastorHit.cpp
|
|
||||||
muCastorInfo.cpp)
|
|
||||||
|
|
||||||
set(LIBRARIES ${ROOT_LIBRARIES}
|
set(LIBRARIES ${ROOT_LIBRARIES}
|
||||||
${PACKAGE_LIBPREFIX}Math)
|
${PACKAGE_LIBPREFIX}Math)
|
||||||
@@ -40,7 +31,7 @@ list(APPEND SOURCES ${rDictName}.cxx)
|
|||||||
|
|
||||||
# TODO use a custom target linked to root_generate_dictionary
|
# TODO use a custom target linked to root_generate_dictionary
|
||||||
set(R_ARTIFACTS ${CMAKE_CURRENT_BINARY_DIR}/lib${rDictName}_rdict.pcm
|
set(R_ARTIFACTS ${CMAKE_CURRENT_BINARY_DIR}/lib${rDictName}_rdict.pcm
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/lib${rDictName}.rootmap)
|
${CMAKE_CURRENT_BINARY_DIR}/lib${rDictName}.rootmap)
|
||||||
install(FILES ${R_ARTIFACTS}
|
install(FILES ${R_ARTIFACTS}
|
||||||
DESTINATION ${PACKAGE_INSTALL_LIB_DIR})
|
DESTINATION ${PACKAGE_INSTALL_LIB_DIR})
|
||||||
|
|
||||||
|
|||||||
@@ -79,6 +79,7 @@ using namespace ROOT::Mutom;
|
|||||||
#pragma link C++ class muCastorMCTrack+;
|
#pragma link C++ class muCastorMCTrack+;
|
||||||
#pragma link C++ class muCastorHit+;
|
#pragma link C++ class muCastorHit+;
|
||||||
#pragma link C++ class muCastorInfo+;
|
#pragma link C++ class muCastorInfo+;
|
||||||
|
#pragma link C++ class muCastorSkinHit+;
|
||||||
|
|
||||||
#endif // __CINT__
|
#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