Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
195f1c2
first separation T0 V0
AllaMaevskaya Jan 18, 2019
4b6daad
T0 simulation works with this
AllaMaevskaya Jan 22, 2019
2e5709a
move Hit to common
AllaMaevskaya Jan 23, 2019
9abcec9
T0 digitzation as a part of FIT
AllaMaevskaya Jan 26, 2019
15dc66a
add run_reco_t0
AllaMaevskaya Feb 6, 2019
cb8dc52
Added V0: Detector and Geometry classes; no proper hits yet
mslupeck Mar 19, 2019
0acd64a
first separation T0 V0
AllaMaevskaya Jan 18, 2019
83f3b13
T0 simulation works with this
AllaMaevskaya Jan 22, 2019
f1b2bfa
move Hit to common
AllaMaevskaya Jan 23, 2019
a8f333c
T0 digitzation as a part of FIT
AllaMaevskaya Jan 26, 2019
8553ebd
add run_reco_t0
AllaMaevskaya Feb 6, 2019
8100ae2
first separation T0 V0
AllaMaevskaya Jan 18, 2019
d748e72
T0 simulation works with this
AllaMaevskaya Jan 22, 2019
9d0e919
move Hit to common
AllaMaevskaya Jan 23, 2019
a75c6e1
T0 digitzation as a part of FIT
AllaMaevskaya Jan 26, 2019
419cfdc
add run_reco_t0
AllaMaevskaya Feb 6, 2019
297b9f7
remove <<<< after mergeing
AllaMaevskaya Mar 28, 2019
314bd43
fix conflict
AllaMaevskaya Mar 29, 2019
a04fde0
merge with V0
AllaMaevskaya Mar 29, 2019
dcb3915
Fixed material definition in FIT-V0+
mslupeck Mar 30, 2019
ffa30ca
Merge pull request #6 from mslupeck/dev
AllaMaevskaya Mar 30, 2019
a705103
clang fixed
AllaMaevskaya Mar 30, 2019
0290ee5
explicit added
AllaMaevskaya Mar 31, 2019
ab36798
remove empty line in HitMerger.h: clang complains
AllaMaevskaya Mar 31, 2019
1ead442
remove unused macros
AllaMaevskaya Mar 31, 2019
939e2a2
fix T0 part
AllaMaevskaya Mar 31, 2019
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
Prev Previous commit
Next Next commit
Added V0: Detector and Geometry classes; no proper hits yet
  • Loading branch information
mslupeck authored and AllaMaevskaya committed Mar 29, 2019
commit cb8dc52ac34b6b184a62834ddf97aaf7cf68ffa5
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,9 @@ class DetID
static constexpr ID ZDC = 11;
static constexpr ID T0 = 12;
static constexpr ID ACO = 13;
static constexpr ID V0 = 14;
static constexpr ID First = ITS;
static constexpr ID Last = ACO; ///< if extra detectors added, update this !!!
static constexpr ID Last = V0; ///< if extra detectors added, update this !!!

static constexpr int nDetectors = Last + 1; ///< number of defined detectors

Expand Down Expand Up @@ -105,13 +106,13 @@ class DetID
ID mID = First; ///< detector ID

static constexpr const char* sDetNames[nDetectors + 1] = ///< defined detector names
{ "ITS", "TPC", "TRD", "TOF", "PHS", "CPV", "EMC", "HMP", "MFT", "MCH", "MID", "ZDC", "T0", "ACO", nullptr };
{ "ITS", "TPC", "TRD", "TOF", "PHS", "CPV", "EMC", "HMP", "MFT", "MCH", "MID", "ZDC", "T0", "ACO", "V0", nullptr };

// detector names, will be defined in DataSources
static constexpr std::array<mask_t, nDetectors> sMasks = ///< detectot masks
{ utils::bit2Mask(ITS), utils::bit2Mask(TPC), utils::bit2Mask(TRD), utils::bit2Mask(TOF), utils::bit2Mask(PHS),
utils::bit2Mask(CPV), utils::bit2Mask(EMC), utils::bit2Mask(HMP), utils::bit2Mask(MFT), utils::bit2Mask(MCH),
utils::bit2Mask(MID), utils::bit2Mask(ZDC), utils::bit2Mask(T0), utils::bit2Mask(ACO) };
utils::bit2Mask(MID), utils::bit2Mask(ZDC), utils::bit2Mask(T0), utils::bit2Mask(ACO), utils::bit2Mask(V0) };

ClassDefNV(DetID, 1);
};
Expand Down
2 changes: 1 addition & 1 deletion DataFormats/Detectors/Common/src/DetID.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ constexpr std::array<DetID::mask_t, DetID::nDetectors> DetID::sMasks;

// redundant declarations
constexpr DetID::ID DetID::ITS, DetID::TPC, DetID::TRD, DetID::TOF, DetID::PHS, DetID::CPV, DetID::EMC,
DetID::HMP, DetID::MFT, DetID::MCH, DetID::MID, DetID::ZDC, DetID::T0, DetID::ACO, DetID::First, DetID::Last;
DetID::HMP, DetID::MFT, DetID::MCH, DetID::MID, DetID::ZDC, DetID::T0, DetID::ACO, DetID::V0, DetID::First, DetID::Last;

constexpr int DetID::nDetectors;

Expand Down
1 change: 1 addition & 0 deletions DataFormats/Headers/include/Headers/DataHeader.h
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,7 @@ constexpr o2::header::DataOrigin gDataOriginCPV{ "CPV" };
constexpr o2::header::DataOrigin gDataOriginCTP{ "CTP" };
constexpr o2::header::DataOrigin gDataOriginEMC{ "EMC" };
constexpr o2::header::DataOrigin gDataOriginT0{ "T0" };
constexpr o2::header::DataOrigin gDataOriginV0{ "V0" };
constexpr o2::header::DataOrigin gDataOriginHMP{ "HMP" };
constexpr o2::header::DataOrigin gDataOriginITS{ "ITS" };
constexpr o2::header::DataOrigin gDataOriginMCH{ "MCH" };
Expand Down
2 changes: 1 addition & 1 deletion Detectors/FIT/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Libraries
add_subdirectory(common)
add_subdirectory(T0)
#add_subdirectory(V0)
add_subdirectory(V0)
4 changes: 4 additions & 0 deletions Detectors/FIT/V0/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Libraries
add_subdirectory(base)
add_subdirectory(simulation)
#add_subdirectory(reconstruction)
22 changes: 22 additions & 0 deletions Detectors/FIT/V0/base/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
set(MODULE_NAME "V0Base")

O2_SETUP(NAME ${MODULE_NAME})

set(SRCS
src/Geometry.cxx
)

set(HEADERS
include/${MODULE_NAME}/Geometry.h
)

Set(LINKDEF src/V0BaseLinkDef.h)
Set(LIBRARY_NAME ${MODULE_NAME})
set(BUCKET_NAME fit_base_bucket)

O2_GENERATE_LIBRARY()

install(
DIRECTORY files
DESTINATION share/Detectors/V0/
)
884 changes: 884 additions & 0 deletions Detectors/FIT/V0/base/files/quartzOptProperties.txt

Large diffs are not rendered by default.

85 changes: 85 additions & 0 deletions Detectors/FIT/V0/base/include/V0Base/Geometry.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
// Copyright CERN and copyright holders of ALICE O2. This software is
// distributed under the terms of the GNU General Public License v3 (GPL
// Version 3), copied verbatim in the file "COPYING".
//
// See http://alice-o2.web.cern.ch/license for full licensing information.
//
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.

/// \file Geometry.h
/// \brief Base definition of FIT-V0+ geometry.
///
/// \author Maciej Slupecki, University of Jyvaskyla, Finland

#ifndef ALICEO2_FITV0_GEOMETRY_H_
#define ALICEO2_FITV0_GEOMETRY_H_

#include <vector>
#include <TGeoMatrix.h>
#include <TGeoVolume.h>

namespace o2
{
namespace v0
{
/// FIT-V0+ Geometry
class Geometry
{
public:
enum EGeoType {
eUninitilized,
eDummy,
eOnlySensitive,
eFull
}; // Geometry type options possible to be initialized

///
/// Default constructor.
/// It must be kept public for root persistency purposes,
/// but should never be called by the outside world
Geometry(){mGeometryType = eUninitilized;};
/// Standard constructor
/// \param initType[in] The type of geometry, that will be initialized
/// -> initType == 0 => only sensitive detector parts
/// -> initType == 1 => sensitive parts and rough structural elements
/// -> initType == 2 => complete, detailed geometry (including screws, etc.)
/// \return -
Geometry(EGeoType initType);
/// Copy constructor.
Geometry(const Geometry& geom);

static constexpr float sEpsilon = 0.01; // variable used to make sure one spatial dimension is infinitesimaly larger than the other
static constexpr float sDrSeparationScint = 0.03 + 0.04; // paint thickness + separation gap
static constexpr float sDzScint = 2;
static constexpr float sPhiMinScint = 0;
static constexpr float sDphiScint = 45;
static constexpr float sGlobalPhiRotation = 90;
static constexpr float sDySeparationScint = sDrSeparationScint;
static constexpr int sBaseNumberOfSectors = 8; // number of sectors
// TODO: Adjust the sZposition once the simulation geometry is implemented, T0 starts at 328
// at sZposition==320, there is a gap (to be filled with fibers and support) of 8 cm between the plastic of V0+ and aluminum covers of T0+
static constexpr float sZposition = 320-sDzScint; // z-position of the geometrical center of the detectors sensitive part

private:
void initializeVectors();
void initializeLuts();

void buildGeometry();
void assembleSectors(TGeoVolumeAssembly *volV0);
TGeoVolumeAssembly* buildSector(uint16_t iSector);

std::vector<float> mvrAvgScint; // average ring radii (index 0 -> ring 1 min, index 1 -> ring 1 max and ring 2 min, ... index 5 -> ring 5 max)
// The following radii include separation between rings
std::vector<float> mvrMinScint; // lower radii of a ring (.at(0) -> ring 1, .at(4) -> ring 5)
std::vector<float> mvrMaxScint; // upper radii of a ring (.at(0) -> ring 1, .at(4) -> ring 5)
std::vector<TGeoRotation*> mvPhiRot;

int mGeometryType; // same meaning as initType in constructor

ClassDefNV(Geometry, 1);
};
} // namespace v0
} // namespace o2
#endif
122 changes: 122 additions & 0 deletions Detectors/FIT/V0/base/src/Geometry.cxx
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
// Copyright CERN and copyright holders of ALICE O2. This software is
// distributed under the terms of the GNU General Public License v3 (GPL
// Version 3), copied verbatim in the file "COPYING".
//
// See http://alice-o2.web.cern.ch/license for full licensing information.
//
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.
#include <iomanip>
//#include <TVector3.h>
#include "V0Base/Geometry.h"

#include <TGeoManager.h>
#include <TGeoBBox.h>
#include <TGeoTube.h>
#include <TGeoCompositeShape.h>
#include <TGeoMedium.h>
#include <TGeoVolume.h>
#include <TGeoMatrix.h>
#include <FairLogger.h>
#include <sstream>

ClassImp(o2::v0::Geometry);

using namespace o2::v0;

Geometry::Geometry(EGeoType initType){
mGeometryType = initType;
initializeVectors();
initializeLuts();
buildGeometry();
}

Geometry::Geometry(const Geometry& geom){
this->mGeometryType = geom.mGeometryType;
}

void Geometry::initializeVectors(){
// RADII
// Index of rAvgScint is NOT linked directly to any ring number
mvrAvgScint.push_back(4.01); // ring 1 lower radius
mvrAvgScint.push_back(7.25); // ring 1 upper radius and ring 2 lower radius
mvrAvgScint.push_back(12.83);
mvrAvgScint.push_back(21.22);
mvrAvgScint.push_back(38.664);
mvrAvgScint.push_back(72.09);

// Set real plastic radi (reduced by painting of 0.06 and separation gap of 0.08)
for(uint16_t ir=1; ir<mvrAvgScint.size(); ir++) { // shift of indices to match index with ring number (starting from 0)
mvrMaxScint.push_back(mvrAvgScint.at(ir) - sDrSeparationScint);
}
for(uint16_t ir=0; ir<mvrAvgScint.size()-1; ir++) {
mvrMinScint.push_back(mvrAvgScint.at(ir) + sDrSeparationScint);
}
// Now indices of rMinScint and rMaxScint correspond to the same ring

// AZIMUTH
for(uint16_t isector=0; isector<sBaseNumberOfSectors; isector++){
float phiMin = sPhiMinScint + isector*sDphiScint + sGlobalPhiRotation;
std::stringstream ssNameRot;
ssNameRot << "rotPhiSector" << isector;
mvPhiRot.push_back(new TGeoRotation(ssNameRot.str().c_str(), phiMin, 0.0, 0.0));
mvPhiRot.at(mvPhiRot.size()-1)->RegisterYourself();
}
}

void Geometry::buildGeometry(){
TGeoVolume* vALIC = gGeoManager->GetVolume("cave");
if (!vALIC) {
LOG(FATAL) << "Could not find the top volume";
}

// Top volume of FIT V0 detector
TGeoVolumeAssembly* volV0 = new TGeoVolumeAssembly("FITV0");
LOG(INFO) << "Geometry::buildGeometry()::Volume name = " << volV0->GetName();
assembleSectors(volV0);

TGeoTranslation* trGlobalZshift = new TGeoTranslation(0,0,sZposition);

vALIC->AddNode(volV0, 0, trGlobalZshift);
}

TGeoVolumeAssembly* Geometry::buildSector(uint16_t iSector){
TGeoBBox *geoBoxClockwise = new TGeoBBox("boolBoxScintSeparator", mvrMaxScint.at(mvrMaxScint.size()-1), sDySeparationScint*2, sDzScint+sEpsilon);

std::stringstream ssName;
ssName << "sector" << iSector+1;
TGeoVolumeAssembly *sector = new TGeoVolumeAssembly(ssName.str().c_str());
for(uint16_t ir=0; ir<mvrMinScint.size(); ir++){ // loop over rings
int iCell = iSector*mvrMinScint.size() + ir;
std::stringstream ssNameGeoTube, ssNameGeoComposite;
ssNameGeoTube << "cellGeoTube" << iCell+1;
ssNameGeoComposite << "cellGeoComposite" << iCell+1;

// Generate separation between sectors by subtracting two cuboids from each tube segment
TGeoTubeSeg *geoCellTube = new TGeoTubeSeg(ssNameGeoTube.str().c_str(), mvrMinScint.at(ir), mvrMaxScint.at(ir), sDzScint, sPhiMinScint, sDphiScint);
std::string booleanFormula = "(";
booleanFormula += ssNameGeoTube.str() + "-boolBoxScintSeparator)"; // subtract counter-clockwise box
booleanFormula += (std::string)"-boolBoxScintSeparator" + ":rotPhiSector1"; // subtract clockwise box (same but rotated by 45 degrees)
TGeoCompositeShape* geoCell = new TGeoCompositeShape(ssNameGeoComposite.str().c_str(), booleanFormula.c_str());

TGeoMedium* kMed = gGeoManager->GetMedium("V0_Scintillator");
TGeoVolume *volCell = new TGeoVolume("cell", geoCell, kMed);

volCell->SetLineColor(kYellow);
sector->AddNode(volCell, iCell+1);
}
return sector;
}

void Geometry::assembleSectors(TGeoVolumeAssembly *volV0){
// for(uint16_t isector=0; isector<1; isector++){
for(uint16_t isector=0; isector<mvPhiRot.size(); isector++){
TGeoVolumeAssembly *sector = buildSector(isector);
volV0->AddNode(sector, isector+1, mvPhiRot.at(isector));
}
}

void Geometry::initializeLuts(){
// TODO: initialize sth
}
19 changes: 19 additions & 0 deletions Detectors/FIT/V0/base/src/V0BaseLinkDef.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Copyright CERN and copyright holders of ALICE O2. This software is
// distributed under the terms of the GNU General Public License v3 (GPL
// Version 3), copied verbatim in the file "COPYING".
//
// See http://alice-o2.web.cern.ch/license for full licensing information.
//
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.

#ifdef __CLING__

#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;

#pragma link C++ class o2::v0::Geometry + ;

#endif
19 changes: 19 additions & 0 deletions Detectors/FIT/V0/simulation/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
set(MODULE_NAME "V0Simulation")

O2_SETUP(NAME ${MODULE_NAME})

set(SRCS
src/Detector.cxx
#src/DigitizerTask.cxx
)

set(HEADERS
include/${MODULE_NAME}/Detector.h
#include/${MODULE_NAME}/DigitizerTask.h
)

Set(LINKDEF src/V0SimulationLinkDef.h)
Set(LIBRARY_NAME ${MODULE_NAME})
set(BUCKET_NAME fit_simulation_bucket)

O2_GENERATE_LIBRARY()
Loading