Project
Loading...
Searching...
No Matches
HalfDetector.cxx
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
15
16#include "TGeoMatrix.h"
17
18#include <fairlogger/Logger.h>
19
22#include "MFTBase/HalfDisk.h"
23#include "MFTBase/Geometry.h"
25//#include "MFTBase/PowerSupplyUnit.h"
27
28using namespace o2::mft;
29
31
33
34//_____________________________________________________________________________
35HalfDetector::HalfDetector() : TNamed(), mHalfVolume(nullptr), mSegmentation(nullptr) {}
36
38
39//_____________________________________________________________________________
40HalfDetector::HalfDetector(HalfSegmentation* seg) : TNamed(), mHalfVolume(nullptr), mSegmentation(seg)
41{
42
43 Geometry* mftGeom = Geometry::instance();
44
45 SetUniqueID(mSegmentation->GetUniqueID());
46
47 SetName(Form("MFT_H_%d", mftGeom->getHalfID(GetUniqueID())));
48
49 LOG(debug) << Form("Creating : %s ", GetName());
50
51 mHalfVolume = new TGeoVolumeAssembly(GetName());
52
53 //mPSU = new PowerSupplyUnit();
54
55 createHalfDisks();
56}
57
58//_____________________________________________________________________________
60
62
63//_____________________________________________________________________________
64void HalfDetector::createHalfDisks()
65{
66 LOG(debug) << "MFT: " << Form("Creating %d Half-Disk ", mSegmentation->getNHalfDisks());
67 auto& mftBaseParam = MFTBaseParam::Instance();
68
69 for (Int_t iDisk = 0; iDisk < mSegmentation->getNHalfDisks(); iDisk++) {
70 HalfDiskSegmentation* halfDiskSeg = mSegmentation->getHalfDisk(iDisk);
71 auto* halfDisk = new HalfDisk(halfDiskSeg);
72 Int_t halfDiskId = Geometry::instance()->getDiskID(halfDiskSeg->GetUniqueID());
73 mHalfVolume->AddNode(halfDisk->getVolume(), halfDiskId, halfDiskSeg->getTransformation());
74 delete halfDisk;
75 }
76}
o2::mch::mapping::CathodeSegmentation seg
ClassImp(o2::mft::HalfDetector)
Class describing geometry of one half of the ALICE Muon Forward Tracker.
Class for the description of the structure of a half-disk.
Class building geometry of one half of an MFT disk.
Segmentation class for each half of the ALICE Muon Forward Tracker.
Class handling both virtual segmentation and real volumes.
std::ostringstream debug
Int_t getDiskID(UInt_t uniqueID) const
Returns Half-Disk ID based on Unique ID provided.
Definition Geometry.h:106
Int_t getHalfID(UInt_t uniqueID) const
Returns Half-MFT ID based on Unique ID provided.
Definition Geometry.h:103
static Geometry * instance()
Singleton access.
Definition Geometry.cxx:98
~HalfDetector() override
HalfDetector()
Default constructor.
TGeoVolumeAssembly * mHalfVolume
HalfDiskSegmentation * getHalfDisk(Int_t iDisk) const
TGeoCombiTrans * getTransformation() const
Returns the Transformation Combining a Rotation followed by a Translation.
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"