From 185f57229b45bad0ebb2b3ed174e84ed2340ebc7 Mon Sep 17 00:00:00 2001 From: chkouzin Date: Wed, 5 Nov 2014 14:55:27 +0100 Subject: [PATCH 1/2] Renamed directories: AliBase -> Base AliData -> Data AliGenerators -> Generators Namespace changes for classes: O2Detector -> Detector O2Module -> Module O2TrackReference -> TrackReference AliDetectorList -> DetectorList AliStack -> Stack AliMCTrack -> MCTrack Correctly set ClassImp to namespaces Removed namespace prefixes from the UpgradeV1Layer class Renamed LinkDefs and library names to conform to the coding guidelines --- AliBase/CMakeLists.txt | 34 - AliBase/O2BaseLinkDef.h | 13 - AliBase/O2Detector.cxx | 121 -- AliBase/O2Detector.h | 62 - AliBase/O2Module.cxx | 91 -- AliBase/O2Module.h | 53 - AliBase/O2TrackReference.cxx | 168 --- AliBase/O2TrackReference.h | 103 -- AliData/AliDetectorList.h | 23 - AliData/AliMCTrack.cxx | 200 --- AliData/AliMCTrack.h | 164 --- AliData/AliStack.cxx | 489 ------- AliData/AliStack.h | 268 ---- Base/BaseLinkDef.h | 13 + Base/CMakeLists.txt | 28 + Base/Detector.cxx | 94 ++ Base/Detector.h | 87 ++ Base/Module.cxx | 72 + Base/Module.h | 70 + Base/TrackReference.cxx | 144 ++ Base/TrackReference.h | 243 ++++ CMakeLists.txt | 43 +- {AliData => Data}/CMakeLists.txt | 20 +- .../MCStackLinkDef.h => Data/DataLinkDef.h | 4 +- Data/DetectorList.h | 10 + Data/MCTrack.cxx | 149 +++ Data/MCTrack.h | 168 +++ Data/Stack.cxx | 411 ++++++ Data/Stack.h | 228 ++++ {AliGenerators => Generators}/CMakeLists.txt | 14 +- .../GeneratorsLinkDef.h | 0 .../Pythia6Generator.cxx | 0 .../Pythia6Generator.h | 0 .../Pythia8Generator.cxx | 0 .../Pythia8Generator.h | 0 {AliGenerators => Generators}/rename.sh | 0 gconfig/g3Config.C | 8 +- gconfig/g4Config.C | 12 +- its/CMakeLists.txt | 12 +- its/ContainerFactory.cxx | 26 +- its/ContainerFactory.h | 2 +- its/Detector.cxx | 522 +++++--- its/Detector.h | 58 +- its/GeometryHandler.cxx | 36 +- its/GeometryManager.cxx | 18 +- its/MisalignmentParameter.cxx | 18 +- its/MisalignmentParameter.h | 7 +- its/O2itsLinkDef.h | 19 - its/Point.cxx | 7 +- its/Segmentation.cxx | 17 +- its/UpgradeGeometryTGeo.cxx | 86 +- its/UpgradeGeometryTGeo.h | 51 +- its/UpgradeSegmentationPixel.cxx | 115 +- its/UpgradeSegmentationPixel.h | 13 +- its/UpgradeV1Layer.cxx | 1182 ++++++++--------- its/UpgradeV1Layer.h | 34 +- its/V11Geometry.cxx | 64 +- its/V11Geometry.h | 7 +- its/itsLinkDef.h | 19 + macro/run_sim.C | 171 ++- 60 files changed, 3000 insertions(+), 3091 deletions(-) delete mode 100644 AliBase/CMakeLists.txt delete mode 100644 AliBase/O2BaseLinkDef.h delete mode 100644 AliBase/O2Detector.cxx delete mode 100644 AliBase/O2Detector.h delete mode 100644 AliBase/O2Module.cxx delete mode 100644 AliBase/O2Module.h delete mode 100644 AliBase/O2TrackReference.cxx delete mode 100644 AliBase/O2TrackReference.h delete mode 100644 AliData/AliDetectorList.h delete mode 100644 AliData/AliMCTrack.cxx delete mode 100644 AliData/AliMCTrack.h delete mode 100644 AliData/AliStack.cxx delete mode 100644 AliData/AliStack.h create mode 100644 Base/BaseLinkDef.h create mode 100644 Base/CMakeLists.txt create mode 100644 Base/Detector.cxx create mode 100644 Base/Detector.h create mode 100644 Base/Module.cxx create mode 100644 Base/Module.h create mode 100644 Base/TrackReference.cxx create mode 100644 Base/TrackReference.h rename {AliData => Data}/CMakeLists.txt (59%) rename AliData/MCStackLinkDef.h => Data/DataLinkDef.h (89%) create mode 100644 Data/DetectorList.h create mode 100644 Data/MCTrack.cxx create mode 100644 Data/MCTrack.h create mode 100644 Data/Stack.cxx create mode 100644 Data/Stack.h rename {AliGenerators => Generators}/CMakeLists.txt (72%) rename AliGenerators/GenLinkDef.h => Generators/GeneratorsLinkDef.h (100%) rename {AliGenerators => Generators}/Pythia6Generator.cxx (100%) rename {AliGenerators => Generators}/Pythia6Generator.h (100%) rename {AliGenerators => Generators}/Pythia8Generator.cxx (100%) rename {AliGenerators => Generators}/Pythia8Generator.h (100%) rename {AliGenerators => Generators}/rename.sh (100%) mode change 100755 => 100644 delete mode 100644 its/O2itsLinkDef.h create mode 100644 its/itsLinkDef.h diff --git a/AliBase/CMakeLists.txt b/AliBase/CMakeLists.txt deleted file mode 100644 index d2e131d90e9d3..0000000000000 --- a/AliBase/CMakeLists.txt +++ /dev/null @@ -1,34 +0,0 @@ -# Create a library called "O2MCStack" which includes the source files given in -# the array . -# The extension is already found. Any number of sources could be listed here. - -set(INCLUDE_DIRECTORIES -${ROOT_INCLUDE_DIR} -${BASE_INCLUDE_DIRECTORIES} -${CMAKE_SOURCE_DIR}/AliBase -) - -include_directories( ${INCLUDE_DIRECTORIES}) - -set(LINK_DIRECTORIES -${ROOT_LIBRARY_DIR} -${FAIRROOT_LIBRARY_DIR} -${CMAKE_SOURCE_DIR}/AliBase - -) - -link_directories( ${LINK_DIRECTORIES}) - -set(SRCS -O2Module.cxx -O2Detector.cxx -O2TrackReference.cxx -) - -Set(HEADERS) -Set(LINKDEF O2BaseLinkDef.h) -Set(LIBRARY_NAME O2Base) -Set(DEPENDENCIES Base EG Physics Cint Core) - -GENERATE_LIBRARY() - diff --git a/AliBase/O2BaseLinkDef.h b/AliBase/O2BaseLinkDef.h deleted file mode 100644 index 24f953be23574..0000000000000 --- a/AliBase/O2BaseLinkDef.h +++ /dev/null @@ -1,13 +0,0 @@ - -#ifdef __CINT__ - -#pragma link off all globals; -#pragma link off all classes; -#pragma link off all functions; - -#pragma link C++ class O2Module+; -#pragma link C++ class O2Detector+; -#pragma link C++ class O2TrackReference+; - -#endif - diff --git a/AliBase/O2Detector.cxx b/AliBase/O2Detector.cxx deleted file mode 100644 index 2586fdb68fac1..0000000000000 --- a/AliBase/O2Detector.cxx +++ /dev/null @@ -1,121 +0,0 @@ -#include "O2Detector.h" - -#include -#include - - -using std::endl; -using std::cout; -using std::fstream; -using std::ios; -using std::ostream; - -ClassImp(O2Detector) - -Float_t O2Detector::fgDensityFactor = 1.0; - -//_______________________________________________________________________ -O2Detector::O2Detector(): -FairDetector() -{ - // - // Default constructor for the O2Detector class - // -} - -//_______________________________________________________________________ -O2Detector::O2Detector(const char* name,Bool_t Active, Int_t DetId): - FairDetector(name,Active,DetId) -{ -} - -//_______________________________________________________________________ -O2Detector::~O2Detector() -{ - -} - -//_______________________________________________________________________ -void O2Detector::AliMaterial(Int_t imat, const char* name, Float_t a, - Float_t z, Float_t dens, Float_t radl, - Float_t absl, Float_t *buf, Int_t nwbuf) const -{ - TString uniquename = GetName(); - uniquename.Append("_"); - uniquename.Append(name); - - //Check this!!! - gMC->Material(imat, uniquename.Data(), a, z, dens * fgDensityFactor, radl, absl, buf, nwbuf); -} - - -//_______________________________________________________________________ -void O2Detector::AliMixture(Int_t imat, const char *name, Float_t *a, - Float_t *z, Float_t dens, Int_t nlmat, - Float_t *wmat) const -{ - TString uniquename = GetName(); - uniquename.Append("_"); - uniquename.Append(name); - - //Check this!!! - gMC->Mixture(imat, uniquename.Data(), a, z, dens * fgDensityFactor, nlmat, wmat); -} - -//_______________________________________________________________________ -void O2Detector::AliMedium(Int_t numed, const char *name, Int_t nmat, - Int_t isvol, Int_t ifield, Float_t fieldm, - Float_t tmaxfd, Float_t stemax, Float_t deemax, - Float_t epsil, Float_t stmin, Float_t *ubuf, - Int_t nbuf) const -{ - TString uniquename = GetName(); - uniquename.Append("_"); - uniquename.Append(name); - - //Check this!!! - gMC->Medium(numed, uniquename.Data(), nmat, isvol, ifield, - fieldm, tmaxfd, stemax, deemax, epsil, stmin, ubuf, nbuf); -} - -//_______________________________________________________________________ -void O2Detector::AliMatrix(Int_t &nmat, Float_t theta1, Float_t phi1, - Float_t theta2, Float_t phi2, Float_t theta3, - Float_t phi3) const -{ - // - // Define a rotation matrix. Angles are in degrees. - // - // nmat on output contains the number assigned to the rotation matrix - // theta1 polar angle for axis I - // phi1 azimuthal angle for axis I - // theta2 polar angle for axis II - // phi2 azimuthal angle for axis II - // theta3 polar angle for axis III - // phi3 azimuthal angle for axis III - // - gMC->Matrix(nmat, theta1, phi1, theta2, phi2, theta3, phi3); -} - -void O2Detector::DefineWrapVolume(Int_t id, Double_t rmin,Double_t rmax, Double_t zspan) -{ -} - -void O2Detector::SetNWrapVolumes(Int_t n) -{ -} - -void O2Detector::DefineLayer(const Int_t nlay, const double phi0, const Double_t r, - const Double_t zlen, const Int_t nladd, - const Int_t nmod, const Double_t lthick, - const Double_t dthick, const UInt_t dettypeID, - const Int_t buildLevel) -{ -} - -void O2Detector::DefineLayerTurbo(Int_t nlay, Double_t phi0, Double_t r, Double_t zlen, Int_t nladd, - Int_t nmod, Double_t width, Double_t tilt, - Double_t lthick,Double_t dthick, - UInt_t dettypeID, Int_t buildLevel) -{ -} diff --git a/AliBase/O2Detector.h b/AliBase/O2Detector.h deleted file mode 100644 index 632a800825fa2..0000000000000 --- a/AliBase/O2Detector.h +++ /dev/null @@ -1,62 +0,0 @@ -#ifndef O2DETECTOR_H -#define O2DETECTOR_H - -// -// This is the basic class for any -// ALICE detector module, whether it is -// sensitive or not. Detector classes depend -// on this. -// - -#include "FairDetector.h" - -class O2Detector : public FairDetector { -public: - - // Creators - distructors - O2Detector(const char* name, Bool_t Active, Int_t DetId=0); - O2Detector(); - virtual ~O2Detector(); - - // Module composition - virtual void AliMaterial(Int_t imat, const char* name, Float_t a, - Float_t z, Float_t dens, Float_t radl, - Float_t absl, Float_t *buf=0, Int_t nwbuf=0) const; - virtual void AliMixture(Int_t imat, const char *name, Float_t *a, - Float_t *z, Float_t dens, Int_t nlmat, - Float_t *wmat) const; - virtual void AliMedium(Int_t numed, const char *name, Int_t nmat, - Int_t isvol, Int_t ifield, Float_t fieldm, - Float_t tmaxfd, Float_t stemax, Float_t deemax, - Float_t epsil, Float_t stmin, Float_t *ubuf=0, - Int_t nbuf=0) const; - virtual void AliMatrix(Int_t &nmat, Float_t theta1, Float_t phi1, - Float_t theta2, Float_t phi2, Float_t theta3, - Float_t phi3) const; - - static void SetDensityFactor(Float_t density) { fgDensityFactor = density; } - static Float_t GetDensityFactor() { return fgDensityFactor; } - - /** Set per wrapper volume parameters */ - virtual void DefineWrapVolume(Int_t id, Double_t rmin,Double_t rmax, Double_t zspan); - - /** Book arrays for wrapper volumes */ - virtual void SetNWrapVolumes(Int_t n); - - virtual void DefineLayer(Int_t nlay,Double_t phi0,Double_t r,Double_t zlen,Int_t nladd, - Int_t nmod, Double_t lthick=0.,Double_t dthick=0.,UInt_t detType=0, Int_t buildFlag=0); - - virtual void DefineLayerTurbo(Int_t nlay,Double_t phi0,Double_t r,Double_t zlen,Int_t nladd, - Int_t nmod,Double_t width,Double_t tilt, - Double_t lthick = 0.,Double_t dthick = 0.,UInt_t detType=0, Int_t buildFlag=0); - -protected: - - static Float_t fgDensityFactor; //! factor that is multiplied to all material densities (ONLY for systematic studies) -private: - O2Detector(const O2Detector&); - O2Detector& operator=(const O2Detector&); - -ClassDef(O2Detector, 1) //Base class for ALICE Modules -}; -#endif diff --git a/AliBase/O2Module.cxx b/AliBase/O2Module.cxx deleted file mode 100644 index 5d6095bcce89b..0000000000000 --- a/AliBase/O2Module.cxx +++ /dev/null @@ -1,91 +0,0 @@ -#include "O2Module.h" -#include -#include - -using std::endl; -using std::cout; -using std::fstream; -using std::ios; -using std::ostream; - -ClassImp(O2Module) - -Float_t O2Module::fgDensityFactor = 1.0; - -//_______________________________________________________________________ -O2Module::O2Module(): -FairModule() -{ - // - // Default constructor for the O2Module class - // -} - -//_______________________________________________________________________ -O2Module::O2Module(const char* name,const char *title, Bool_t Active): - FairModule(name,title, Active) -{ -} - -//_______________________________________________________________________ -O2Module::~O2Module() -{ - -} - -void O2Module::AliMaterial(Int_t imat, const char* name, Float_t a, - Float_t z, Float_t dens, Float_t radl, - Float_t absl, Float_t *buf, Int_t nwbuf) const -{ - TString uniquename = GetName(); - uniquename.Append("_"); - uniquename.Append(name); - - //Check this!!! - gMC->Material(imat, uniquename.Data(), a, z, dens * fgDensityFactor, radl, absl, buf, nwbuf); -} - -void O2Module::AliMixture(Int_t imat, const char *name, Float_t *a, - Float_t *z, Float_t dens, Int_t nlmat, - Float_t *wmat) const -{ - TString uniquename = GetName(); - uniquename.Append("_"); - uniquename.Append(name); - - //Check this!!! - gMC->Mixture(imat, uniquename.Data(), a, z, dens * fgDensityFactor, nlmat, wmat); -} - -void O2Module::AliMedium(Int_t numed, const char *name, Int_t nmat, - Int_t isvol, Int_t ifield, Float_t fieldm, - Float_t tmaxfd, Float_t stemax, Float_t deemax, - Float_t epsil, Float_t stmin, Float_t *ubuf, - Int_t nbuf) const -{ - TString uniquename = GetName(); - uniquename.Append("_"); - uniquename.Append(name); - - //Check this!!! - gMC->Medium(numed, uniquename.Data(), nmat, isvol, ifield, - fieldm, tmaxfd, stemax, deemax, epsil, stmin, ubuf, nbuf); -} - -void O2Module::AliMatrix(Int_t &nmat, Float_t theta1, Float_t phi1, - Float_t theta2, Float_t phi2, Float_t theta3, - Float_t phi3) const -{ - // - // Define a rotation matrix. Angles are in degrees. - // - // nmat on output contains the number assigned to the rotation matrix - // theta1 polar angle for axis I - // phi1 azimuthal angle for axis I - // theta2 polar angle for axis II - // phi2 azimuthal angle for axis II - // theta3 polar angle for axis III - // phi3 azimuthal angle for axis III - // - gMC->Matrix(nmat, theta1, phi1, theta2, phi2, theta3, phi3); -} diff --git a/AliBase/O2Module.h b/AliBase/O2Module.h deleted file mode 100644 index 750882d2e7267..0000000000000 --- a/AliBase/O2Module.h +++ /dev/null @@ -1,53 +0,0 @@ -#ifndef O2MODULE_H -#define O2MODULE_H - -// -// This is the basic class for any -// ALICE detector module, whether it is -// sensitive or not. Detector classes depend -// on this. -// - -#include "FairModule.h" - - -class O2Module : public FairModule { - -public: - - // Creators - distructors - O2Module(const char* name, const char *title, Bool_t Active=kFALSE); - O2Module(); - virtual ~O2Module(); - - // Module composition - virtual void AliMaterial(Int_t imat, const char* name, Float_t a, - Float_t z, Float_t dens, Float_t radl, - Float_t absl, Float_t *buf=0, Int_t nwbuf=0) const; - virtual void AliMixture(Int_t imat, const char *name, Float_t *a, - Float_t *z, Float_t dens, Int_t nlmat, - Float_t *wmat) const; - virtual void AliMedium(Int_t numed, const char *name, Int_t nmat, - Int_t isvol, Int_t ifield, Float_t fieldm, - Float_t tmaxfd, Float_t stemax, Float_t deemax, - Float_t epsil, Float_t stmin, Float_t *ubuf=0, - Int_t nbuf=0) const; - virtual void AliMatrix(Int_t &nmat, Float_t theta1, Float_t phi1, - Float_t theta2, Float_t phi2, Float_t theta3, - Float_t phi3) const; - - static void SetDensityFactor(Float_t density) { fgDensityFactor = density; } - static Float_t GetDensityFactor() { return fgDensityFactor; } - -protected: - - static Float_t fgDensityFactor; //! factor that is multiplied to all material densities (ONLY for systematic studies) - - private: - - O2Module(const O2Module&); - O2Module& operator=(const O2Module&); - - ClassDef(O2Module, 1) //Base class for ALICE Modules -}; -#endif diff --git a/AliBase/O2TrackReference.cxx b/AliBase/O2TrackReference.cxx deleted file mode 100644 index d45e4cb375347..0000000000000 --- a/AliBase/O2TrackReference.cxx +++ /dev/null @@ -1,168 +0,0 @@ -/************************************************************************** - * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * - * * - * Author: The ALICE Off-line Project. * - * Contributors are mentioned in the code where appropriate. * - * * - * Permission to use, copy, modify and distribute this software and its * - * documentation strictly for non-commercial purposes is hereby granted * - * without fee, provided that the above copyright notice appears in all * - * copies and that both the copyright notice and this permission notice * - * appear in the supporting documentation. The authors make no claims * - * about the suitability of this software for any purpose. It is * - * provided "as is" without express or implied warranty. * - **************************************************************************/ - -/* $Id$ */ - -#include "TVirtualMC.h" -#include "TParticle.h" - -#include "O2TrackReference.h" -#include - -// -// Track Reference object is created every time particle is -// crossing detector bounds. The object is created by Step Manager -// -// The class stores the following informations: -// track label, -// track position: X,Y,X -// track momentum px, py, pz -// track length and time of fligth: both in cm -// status bits from Monte Carlo -// - -using std::endl; -using std::cout; -ClassImp(O2TrackReference) - -O2TrackReference::O2TrackReference(): - TObject(), - fTrack(0), - fX(0), - fY(0), - fZ(0), - fPx(0), - fPy(0), - fPz(0), - fLength(0), - fTime(0), - fUserId(0), - fDetectorId(-999) -{ - // - // Default constructor - // Creates empty object - - for(Int_t i=0; i<16; i++) ResetBit(BIT(i)); -} - -O2TrackReference::O2TrackReference(const O2TrackReference &tr) : - TObject(tr), - fTrack(tr.fTrack), - fX(tr.fX), - fY(tr.fY), - fZ(tr.fZ), - fPx(tr.fPx), - fPy(tr.fPy), - fPz(tr.fPz), - fLength(tr.fLength), - fTime(tr.fTime), - fUserId(tr.fUserId), - fDetectorId(tr.fDetectorId) -{ - // Copy Constructor -} - -O2TrackReference::O2TrackReference(Int_t label, Int_t id) : - TObject(), - fTrack(label), - fX(0), - fY(0), - fZ(0), - fPx(0), - fPy(0), - fPz(0), - fLength(gMC->TrackLength()), - fTime(gMC->TrackTime()), - fUserId(0), - fDetectorId(id) -{ - // - // Create Reference object out of label and - // data in TVirtualMC object - // - // Creates an object and fill all parameters - // from data in VirtualMC - // - // Sylwester Radomski, (S.Radomski@gsi.de) - // GSI, Jan 31, 2003 - // - - Double_t vec[4]; - - gMC->TrackPosition(vec[0],vec[1],vec[2]); - - fX = vec[0]; - fY = vec[1]; - fZ = vec[2]; - - gMC->TrackMomentum(vec[0],vec[1],vec[2],vec[3]); - - fPx = vec[0]; - fPy = vec[1]; - fPz = vec[2]; - - // Set Up status code - // Copy Bits from virtual MC - - for(Int_t i=14; i<22; i++) ResetBit(BIT(i)); - - SetBit(BIT(14), gMC->IsNewTrack()); - SetBit(BIT(15), gMC->IsTrackAlive()); - SetBit(BIT(16), gMC->IsTrackDisappeared()); - SetBit(BIT(17), gMC->IsTrackEntering()); - SetBit(BIT(18), gMC->IsTrackExiting()); - SetBit(BIT(19), gMC->IsTrackInside()); - SetBit(BIT(20), gMC->IsTrackOut()); - SetBit(BIT(21), gMC->IsTrackStop()); - // - // This particle has to be kept -} - -/* -AliExternalTrackParam * O2TrackReference::MakeTrack(const O2TrackReference *ref, Double_t mass) -{ - // - // Make dummy track from the track reference - // negative mass means opposite charge - // - Double_t xx[5]; - Double_t cc[15]; - for (Int_t i=0;i<15;i++) cc[i]=0; - Double_t x = ref->X(), y = ref->Y(), z = ref->Z(); - Double_t alpha = TMath::ATan2(y,x); - Double_t xr = TMath::Sqrt(x*x+y*y); - xx[0] = ref->LocalY(); - xx[1] = z; - xx[3] = ref->Pz()/ref->Pt(); - xx[4] = 1./ref->Pt(); - if (mass<0) xx[4]*=-1.; // negative mass - negative direction - Double_t alphap = TMath::ATan2(ref->Py(),ref->Px())-alpha; - if (alphap> TMath::Pi()) alphap-=TMath::Pi(); - if (alphap<-TMath::Pi()) alphap+=TMath::Pi(); - xx[2] = TMath::Sin(alphap); - - AliExternalTrackParam * track = new AliExternalTrackParam(xr,alpha,xx,cc); - return track; -} -*/ - -void O2TrackReference::Print(Option_t* /*opt*/) const -{ - cout << Form("Label %d P=%7.2f (PX,PY,PZ)=(%7.2f,%7.2f,%7.2f) (X,Y,Z)=(%7.2f,%7.2f,%7.2f)" - " Length=%7.2f Time=%7.2f UserId=%d", - Label(),P(),Px(),Py(),Pz(),X(),Y(),Z(),GetLength(),GetTime(),UserId()) << endl; -} - diff --git a/AliBase/O2TrackReference.h b/AliBase/O2TrackReference.h deleted file mode 100644 index 46fd5853f3aa0..0000000000000 --- a/AliBase/O2TrackReference.h +++ /dev/null @@ -1,103 +0,0 @@ -#ifndef O2TRACKREFERENCE_H -#define O2TRACKREFERENCE_H -/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * - * See cxx source for full Copyright notice */ - -/* $Id$ */ - -// -// Track Reference object is created every time particle is -// crossing detector bounds. -// The object is created by Step Manager -// - -#include "TObject.h" -#include "TMath.h" - -class O2TrackReference : public TObject { - - public: - - enum constants {kDisappeared = -1, - kITS = 0, - kTPC = 1, - kFRAME = 2, - kTRD = 3, - kTOF = 4, - kMUON = 5, - kHMPID = 6, - kT0 = 7, - kEMCAL = 8, - kPMD = 10, - kFMD = 12, - kVZERO = 14, - kMFT = 16, - kHALL = 17 - }; - - O2TrackReference(); - O2TrackReference(Int_t label, Int_t id = -999); - O2TrackReference(const O2TrackReference &tr); - virtual ~O2TrackReference() {} - - // static AliExternalTrackParam * MakeTrack(const O2TrackReference *ref, Double_t mass); - virtual Int_t GetTrack() const {return fTrack;} - virtual void SetTrack(Int_t track) {fTrack=track;} - virtual void SetLength(Float_t length){fLength=length;} - virtual void SetTime(Float_t time) {fTime = time;} - virtual Float_t GetLength() const {return fLength;} - virtual Float_t GetTime() const {return fTime;} - virtual Int_t Label() const {return fTrack;} - virtual void SetLabel(Int_t track) {fTrack=track;} - virtual Float_t R() const {return TMath::Sqrt(fX*fX+fY*fY);} - virtual Float_t Pt() const {return TMath::Sqrt(fPx*fPx+fPy*fPy);} - virtual Float_t Phi() const {return TMath::Pi()+TMath::ATan2(-fPy,-fPx);} - virtual Float_t Theta() const {return (fPz==0)?TMath::Pi()/2:TMath::ACos(fPz/P());} - virtual Float_t X() const {return fX;} - virtual Float_t Y() const {return fY;} - virtual Float_t Z() const {return fZ;} - virtual Float_t Px() const {return fPx;} - virtual Float_t Py() const {return fPy;} - virtual Float_t Pz() const {return fPz;} - virtual Float_t P() const {return TMath::Sqrt(fPx*fPx+fPy*fPy+fPz*fPz);} - virtual Int_t UserId() const {return fUserId;} - virtual Int_t DetectorId() const {return fDetectorId;} - virtual void SetDetectorId(Int_t id){fDetectorId = id;} - virtual void SetPosition(Float_t x, Float_t y, Float_t z){fX=x; fY=y; fZ=z;} - virtual void SetMomentum(Float_t px, Float_t py, Float_t pz){fPx=px; fPy=py; fPz=pz;} - virtual void SetUserId(Int_t userId){fUserId=userId;} - - // Methods to get position of the track reference in - // in the TPC/TRD/TOF Tracking coordinate system - - virtual Float_t PhiPos() const {return TMath::Pi()+TMath::ATan2(-fY, -fX);} - virtual Float_t Alpha() const - {return TMath::Pi()*(20*((((Int_t)(PhiPos()*180/TMath::Pi()))/20))+10)/180.;} - virtual Float_t LocalX() const {return fX*TMath::Cos(-Alpha()) - fY*TMath::Sin(-Alpha());} - virtual Float_t LocalY() const {return fX*TMath::Sin(-Alpha()) + fY*TMath::Cos(-Alpha());} - - Bool_t IsSortable() const {return kTRUE;} - Int_t Compare(const TObject *obj) const { - Int_t ll = ((O2TrackReference*)obj)->GetTrack(); - if (ll < fTrack) return 1; - if (ll > fTrack) return -1; - return 0; - } - - virtual void Print(Option_t* opt="") const; - - protected: - Int_t fTrack; // Track number - Float_t fX; // X reference position of the track - Float_t fY; // Y reference position of the track - Float_t fZ; // Z reference position of the track - Float_t fPx; // momentum - Float_t fPy; // momentum - Float_t fPz; // momentum - Float_t fLength; // track lenght from its origin in cm - Float_t fTime; // time of flight in cm - Int_t fUserId; // optional Id defined by user - Int_t fDetectorId; // Detector Id - ClassDef(O2TrackReference,6) //Base class for all Alice track references -}; -#endif diff --git a/AliData/AliDetectorList.h b/AliData/AliDetectorList.h deleted file mode 100644 index cf755708c8c6b..0000000000000 --- a/AliData/AliDetectorList.h +++ /dev/null @@ -1,23 +0,0 @@ -/******************************************************************************** - * Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH * - * * - * This software is distributed under the terms of the * - * GNU Lesser General Public Licence version 3 (LGPL) version 3, * - * copied verbatim in the file "LICENSE" * - ********************************************************************************/ - -// ------------------------------------------------------------------------- -// ----- AliDetectorList header file ----- -// ----- M. Al-Turany June 2014 ----- -// ------------------------------------------------------------------------- - - -/** Defines unique identifier for all Ali detectors system **/ -/** THis is needed for stack filtring **/ - -#ifndef AliDetectorList_H -#define AliDetectorList_H 1 -// kSTOPHERE is needed for iteration over the enum. All detectors have to be put before. -enum DetectorId {kAliIts, kSTOPHERE}; - -#endif diff --git a/AliData/AliMCTrack.cxx b/AliData/AliMCTrack.cxx deleted file mode 100644 index d38903b61b0cb..0000000000000 --- a/AliData/AliMCTrack.cxx +++ /dev/null @@ -1,200 +0,0 @@ -/******************************************************************************** - * Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH * - * * - * This software is distributed under the terms of the * - * GNU Lesser General Public Licence version 3 (LGPL) version 3, * - * copied verbatim in the file "LICENSE" * - ********************************************************************************/ - -// ------------------------------------------------------------------------- -// ----- AliMCTrack source file ----- -// ----- M. Al-Turany June 2014 ----- -// ----- This is a light weight particle class that is saved to disk -// ----- instead of saveing the TParticle class -// ----- IT is also used for filtring the stack -// ------------------------------------------------------------------------- - -#include "AliMCTrack.h" - -#include "FairLogger.h" // for FairLogger, etc -#include "TDatabasePDG.h" // for TDatabasePDG -#include "TParticle.h" // for TParticle -#include "TParticlePDG.h" // for TParticlePDG - -// ----- Default constructor ------------------------------------------- -AliMCTrack::AliMCTrack() - : TObject(), - fPdgCode(0), - fMotherId(-1), - fPx(0.), - fPy(0.), - fPz(0.), - fStartX(0.), - fStartY(0.), - fStartZ(0.), - fStartT(0.), - fNPoints(0) -{ -} -// ------------------------------------------------------------------------- - - - -// ----- Standard constructor ------------------------------------------ -AliMCTrack::AliMCTrack(Int_t pdgCode, Int_t motherId, Double_t px, - Double_t py, Double_t pz, Double_t x, Double_t y, - Double_t z, Double_t t, Int_t nPoints = 0) - : TObject(), - fPdgCode(pdgCode), - fMotherId(motherId), - fPx(px), - fPy(py), - fPz(pz), - fStartX(x), - fStartY(y), - fStartZ(z), - fStartT(t), - fNPoints(nPoints) -{ -} -// ------------------------------------------------------------------------- - - - -// ----- Copy constructor ---------------------------------------------- -AliMCTrack::AliMCTrack(const AliMCTrack& track) - : TObject(track), - fPdgCode(track.fPdgCode), - fMotherId(track.fMotherId), - fPx(track.fPx), - fPy(track.fPy), - fPz(track.fPz), - fStartX(track.fStartX), - fStartY(track.fStartY), - fStartZ(track.fStartZ), - fStartT(track.fStartT), - fNPoints(track.fNPoints) -{ -} -// ------------------------------------------------------------------------- - - - -// ----- Constructor from TParticle ------------------------------------ -AliMCTrack::AliMCTrack(TParticle* part) - : TObject(), - fPdgCode(part->GetPdgCode()), - fMotherId(part->GetMother(0)), - fPx(part->Px()), - fPy(part->Py()), - fPz(part->Pz()), - fStartX(part->Vx()), - fStartY(part->Vy()), - fStartZ(part->Vz()), - fStartT(part->T()*1e09), - fNPoints(0) -{ -} -// ------------------------------------------------------------------------- - - - -// ----- Destructor ---------------------------------------------------- -AliMCTrack::~AliMCTrack() { } -// ------------------------------------------------------------------------- - - - -// ----- Public method Print ------------------------------------------- -void AliMCTrack::Print(Int_t trackId) const -{ - LOG(DEBUG) << "Track " << trackId << ", mother : " << fMotherId << ", Type " - << fPdgCode << ", momentum (" << fPx << ", " << fPy << ", " - << fPz << ") GeV" << FairLogger::endl; - /* LOG(DEBUG2) << " Ref " << GetNPoints(kREF) - << ", TutDet " << GetNPoints(kTutDet) - << ", Rutherford " << GetNPoints(kFairRutherford) - << FairLogger::endl; -*/ -} -// ------------------------------------------------------------------------- - - - -// ----- Public method GetMass ----------------------------------------- -Double_t AliMCTrack::GetMass() const -{ - if ( TDatabasePDG::Instance() ) { - TParticlePDG* particle = TDatabasePDG::Instance()->GetParticle(fPdgCode); - if ( particle ) { return particle->Mass(); } - else { return 0.; } - } - return 0.; -} -// ------------------------------------------------------------------------- - - - - -// ----- Public method GetRapidity ------------------------------------- -Double_t AliMCTrack::GetRapidity() const -{ - Double_t e = GetEnergy(); - Double_t y = 0.5 * TMath::Log( (e+fPz) / (e-fPz) ); - return y; -} -// ------------------------------------------------------------------------- - - - - -// ----- Public method GetNPoints -------------------------------------- -Int_t AliMCTrack::GetNPoints(DetectorId detId) const -{ -/* // TODO: Where does this come from - if ( detId == kREF ) { return ( fNPoints & 1); } - else if ( detId == kTutDet ) { return ( (fNPoints & ( 7 << 1) ) >> 1); } - else if ( detId == kFairRutherford ) { return ( (fNPoints & (31 << 4) ) >> 4); } - else { - LOG(ERROR) << "Unknown detector ID " - << detId << FairLogger::endl; - return 0; - } -*/ -} -// ------------------------------------------------------------------------- - - - -// ----- Public method SetNPoints -------------------------------------- -void AliMCTrack::SetNPoints(Int_t iDet, Int_t nPoints) -{ -/* - if ( iDet == kREF ) { - if ( nPoints < 0 ) { nPoints = 0; } - else if ( nPoints > 1 ) { nPoints = 1; } - fNPoints = ( fNPoints & ( ~ 1 ) ) | nPoints; - } - - else if ( iDet == kTutDet ) { - if ( nPoints < 0 ) { nPoints = 0; } - else if ( nPoints > 7 ) { nPoints = 7; } - fNPoints = ( fNPoints & ( ~ ( 7 << 1 ) ) ) | ( nPoints << 1 ); - } - - else if ( iDet == kFairRutherford ) { - if ( nPoints < 0 ) { nPoints = 0; } - else if ( nPoints > 31 ) { nPoints = 31; } - fNPoints = ( fNPoints & ( ~ ( 31 << 4 ) ) ) | ( nPoints << 4 ); - } - - else LOG(ERROR) << "Unknown detector ID " - << iDet << FairLogger::endl; -*/ -} -// ------------------------------------------------------------------------- - - - - -ClassImp(AliMCTrack) diff --git a/AliData/AliMCTrack.h b/AliData/AliMCTrack.h deleted file mode 100644 index 7c075e7aab5fa..0000000000000 --- a/AliData/AliMCTrack.h +++ /dev/null @@ -1,164 +0,0 @@ -/******************************************************************************** - * Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH * - * * - * This software is distributed under the terms of the * - * GNU Lesser General Public Licence version 3 (LGPL) version 3, * - * copied verbatim in the file "LICENSE" * - ********************************************************************************/ - -// ------------------------------------------------------------------------- -// ----- AliMCTrack header file ----- -// ----- M. Al-Turany June 2014 ----- -// ------------------------------------------------------------------------- - - - -/** AliMCTrack.h - ** Data class for storing Monte Carlo tracks processed by the AliStack. - ** A AliMCTrack can be a primary track put into the simulation or a - ** secondary one produced by the transport through decay or interaction. - **/ - - -#ifndef AliMCTrack_H -#define AliMCTrack_H 1 - -#include "TObject.h" // for TObject -#include "AliDetectorList.h" // for DetectorId -#include "Rtypes.h" // for Double_t, Int_t, Double32_t, etc -#include "TLorentzVector.h" // for TLorentzVector -#include "TMath.h" // for Sqrt -#include "TVector3.h" // for TVector3 - -class TParticle; - -class AliMCTrack : public TObject -{ - - public: - - - /** Default constructor **/ - AliMCTrack(); - - - /** Standard constructor **/ - AliMCTrack(Int_t pdgCode, Int_t motherID, Double_t px, Double_t py, - Double_t pz, Double_t x, Double_t y, Double_t z, - Double_t t, Int_t nPoints); - - /** Copy constructor **/ - AliMCTrack(const AliMCTrack& track); - - - /** Constructor from TParticle **/ - AliMCTrack(TParticle* particle); - - - /** Destructor **/ - virtual ~AliMCTrack(); - - - /** Output to screen **/ - void Print(Int_t iTrack=0) const; - - - /** Accessors **/ - Int_t GetPdgCode() const { return fPdgCode; } - Int_t GetMotherId() const { return fMotherId; } - Double_t GetPx() const { return fPx; } - Double_t GetPy() const { return fPy; } - Double_t GetPz() const { return fPz; } - Double_t GetStartX() const { return fStartX; } - Double_t GetStartY() const { return fStartY; } - Double_t GetStartZ() const { return fStartZ; } - Double_t GetStartT() const { return fStartT; } - Double_t GetMass() const; - Double_t GetEnergy() const; - Double_t GetPt() const { return TMath::Sqrt(fPx*fPx+fPy*fPy); } - Double_t GetP() const { return TMath::Sqrt(fPx*fPx+fPy*fPy+fPz*fPz); } - Double_t GetRapidity() const; - void GetMomentum(TVector3& momentum); - void Get4Momentum(TLorentzVector& momentum); - void GetStartVertex(TVector3& vertex); - - - /** Accessors to the number of MCPoints in the detectors **/ - Int_t GetNPoints(DetectorId detId) const; - - - /** Modifiers **/ - void SetMotherId(Int_t id) { fMotherId = id; } - void SetNPoints(Int_t iDet, Int_t np); - - - - private: - - /** PDG particle code **/ - Int_t fPdgCode; - - /** Index of mother track. -1 for primary particles. **/ - Int_t fMotherId; - - /** Momentum components at start vertex [GeV] **/ - Double32_t fPx, fPy, fPz; - - /** Coordinates of start vertex [cm, ns] **/ - Double32_t fStartX, fStartY, fStartZ, fStartT; - - /** Bitvector representing the number of MCPoints for this track in - ** each subdetector. The detectors can be represented by (example from CBM) - ** REF: Bit 0 (1 bit, max. value 1) - ** MVD: Bit 1 - 3 (3 bits, max. value 7) - ** STS: Bit 4 - 8 (5 bits, max. value 31) - ** RICH: Bit 9 (1 bit, max. value 1) - ** MUCH: Bit 10 - 14 (5 bits, max. value 31) - ** TRD: Bit 15 - 19 (5 bits, max. value 31) - ** TOF: Bit 20 - 23 (4 bits, max. value 15) - ** ECAL: Bit 24 (1 bit, max. value 1) - ** ZDC: Bit 25 (1 bit, max. value 1) - ** The respective point numbers can be accessed and modified - ** with the inline functions. - ** Bits 26-31 are spare for potential additional detectors. - **/ - Int_t fNPoints; - - - ClassDef(AliMCTrack,1); - -}; - - - -// ========== Inline functions ======================================== - -inline Double_t AliMCTrack::GetEnergy() const -{ - Double_t mass = GetMass(); - return TMath::Sqrt(mass*mass + fPx*fPx + fPy*fPy + fPz*fPz ); -} - - -inline void AliMCTrack::GetMomentum(TVector3& momentum) -{ - momentum.SetXYZ(fPx,fPy,fPz); -} - - -inline void AliMCTrack::Get4Momentum(TLorentzVector& momentum) -{ - momentum.SetXYZT(fPx,fPy,fPz,GetEnergy()); -} - - -inline void AliMCTrack::GetStartVertex(TVector3& vertex) -{ - vertex.SetXYZ(fStartX,fStartY,fStartZ); -} - - - - - -#endif diff --git a/AliData/AliStack.cxx b/AliData/AliStack.cxx deleted file mode 100644 index e5908fdcf12c9..0000000000000 --- a/AliData/AliStack.cxx +++ /dev/null @@ -1,489 +0,0 @@ -/******************************************************************************** - * Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH * - * * - * This software is distributed under the terms of the * - * GNU Lesser General Public Licence version 3 (LGPL) version 3, * - * copied verbatim in the file "LICENSE" * - ********************************************************************************/ - -// ------------------------------------------------------------------------- -// ----- AliStack source file ----- -// ----- M. Al-Turany June 2014 ----- -// ------------------------------------------------------------------------- - -#include "AliStack.h" - -#include "FairDetector.h" // for FairDetector -#include "FairLink.h" // for FairLink -#include "FairMCPoint.h" // for FairMCPoint -#include "AliMCTrack.h" // for AliMCTrack -#include "FairRootManager.h" // for FairRootManager -#include "FairLogger.h" // for FairLogger, MESSAGE_ORIGIN - -#include "Riosfwd.h" // for ostream -#include "TClonesArray.h" // for TClonesArray -#include "TIterator.h" // for TIterator -#include "TLorentzVector.h" // for TLorentzVector -#include "TParticle.h" // for TParticle -#include "TRefArray.h" // for TRefArray - -#include // for NULL -#include // for operator<<, etc - -using std::cout; -using std::endl; -using std::pair; - - -// ----- Default constructor ------------------------------------------- -AliStack::AliStack(Int_t size) - : FairGenericStack(), - fStack(), - fParticles(new TClonesArray("TParticle", size)), - fTracks(new TClonesArray("AliMCTrack", size)), - fStoreMap(), - fStoreIter(), - fIndexMap(), - fIndexIter(), - fPointsMap(), - fCurrentTrack(-1), - fNPrimaries(0), - fNParticles(0), - fNTracks(0), - fIndex(0), - fStoreSecondaries(kTRUE), - fMinPoints(1), - fEnergyCut(0.), - fStoreMothers(kTRUE), - fLogger(FairLogger::GetLogger()) -{ -} - -// ------------------------------------------------------------------------- - - - -// ----- Destructor ---------------------------------------------------- -AliStack::~AliStack() -{ - if (fParticles) { - fParticles->Delete(); - delete fParticles; - } - if (fTracks) { - fTracks->Delete(); - delete fTracks; - } -} -// ------------------------------------------------------------------------- - -void AliStack::PushTrack(Int_t toBeDone, Int_t parentId, Int_t pdgCode, - Double_t px, Double_t py, Double_t pz, - Double_t e, Double_t vx, Double_t vy, Double_t vz, - Double_t time, Double_t polx, Double_t poly, - Double_t polz, TMCProcess proc, Int_t& ntr, - Double_t weight, Int_t is) -{ - - PushTrack( toBeDone, parentId, pdgCode, - px, py, pz, - e, vx, vy, vz, - time, polx, poly, - polz, proc, ntr, - weight, is, -1); -} - - - -// ----- Virtual public method PushTrack ------------------------------- -void AliStack::PushTrack(Int_t toBeDone, Int_t parentId, Int_t pdgCode, - Double_t px, Double_t py, Double_t pz, - Double_t e, Double_t vx, Double_t vy, Double_t vz, - Double_t time, Double_t polx, Double_t poly, - Double_t polz, TMCProcess proc, Int_t& ntr, - Double_t weight, Int_t is, Int_t secondparentID) -{ - - // --> Get TParticle array - TClonesArray& partArray = *fParticles; - - // --> Create new TParticle and add it to the TParticle array - Int_t trackId = fNParticles; - Int_t nPoints = 0; - Int_t daughter1Id = -1; - Int_t daughter2Id = -1; - TParticle* particle = - new(partArray[fNParticles++]) TParticle(pdgCode, trackId, parentId, - nPoints, daughter1Id, - daughter2Id, px, py, pz, e, - vx, vy, vz, time); - particle->SetPolarisation(polx, poly, polz); - particle->SetWeight(weight); - particle->SetUniqueID(proc); - - // --> Increment counter - if (parentId < 0) { fNPrimaries++; } - - // --> Set argument variable - ntr = trackId; - - // --> Push particle on the stack if toBeDone is set - if (toBeDone == 1) { fStack.push(particle); } - -} -// ------------------------------------------------------------------------- - - - -// ----- Virtual method PopNextTrack ----------------------------------- -TParticle* AliStack::PopNextTrack(Int_t& iTrack) -{ - - // If end of stack: Return empty pointer - if (fStack.empty()) { - iTrack = -1; - return NULL; - } - - // If not, get next particle from stack - TParticle* thisParticle = fStack.top(); - fStack.pop(); - - if ( !thisParticle) { - iTrack = 0; - return NULL; - } - - fCurrentTrack = thisParticle->GetStatusCode(); - iTrack = fCurrentTrack; - - return thisParticle; - -} -// ------------------------------------------------------------------------- - - - -// ----- Virtual method PopPrimaryForTracking -------------------------- -TParticle* AliStack::PopPrimaryForTracking(Int_t iPrim) -{ - - // Get the iPrimth particle from the fStack TClonesArray. This - // should be a primary (if the index is correct). - - // Test for index - if (iPrim < 0 || iPrim >= fNPrimaries) { - fLogger->Fatal(MESSAGE_ORIGIN, "AliStack: Primary index out of range! %i ", iPrim ); - Fatal("AliStack::PopPrimaryForTracking", "Index out of range"); - } - - // Return the iPrim-th TParticle from the fParticle array. This should be - // a primary. - TParticle* part = (TParticle*)fParticles->At(iPrim); - if ( ! (part->GetMother(0) < 0) ) { - fLogger->Fatal(MESSAGE_ORIGIN, "AliStack:: Not a primary track! %i ",iPrim); - Fatal("AliStack::PopPrimaryForTracking", "Not a primary track"); - } - - return part; - -} -// ------------------------------------------------------------------------- - - - -// ----- Virtual public method GetCurrentTrack ------------------------- -TParticle* AliStack::GetCurrentTrack() const -{ - TParticle* currentPart = GetParticle(fCurrentTrack); - if ( ! currentPart) { - fLogger->Warning(MESSAGE_ORIGIN,"AliStack: Current track not found in stack!"); - Warning("AliStack::GetCurrentTrack", "Track not found in stack"); - } - return currentPart; -} -// ------------------------------------------------------------------------- - - - -// ----- Public method AddParticle ------------------------------------- -void AliStack::AddParticle(TParticle* oldPart) -{ - TClonesArray& array = *fParticles; - TParticle* newPart = new(array[fIndex]) TParticle(*oldPart); - newPart->SetWeight(oldPart->GetWeight()); - newPart->SetUniqueID(oldPart->GetUniqueID()); - fIndex++; -} -// ------------------------------------------------------------------------- - - - -// ----- Public method FillTrackArray ---------------------------------- -void AliStack::FillTrackArray() -{ - - fLogger->Debug(MESSAGE_ORIGIN, "AliStack: Filling MCTrack array..."); - - // --> Reset index map and number of output tracks - fIndexMap.clear(); - fNTracks = 0; - - // --> Check tracks for selection criteria - SelectTracks(); - - // --> Loop over fParticles array and copy selected tracks - for (Int_t iPart=0; iPartFatal(MESSAGE_ORIGIN, "AliStack: Particle %i not found in storage map! ", iPart); - Fatal("AliStack::FillTrackArray", - "Particle not found in storage map."); - } - Bool_t store = (*fStoreIter).second; - - if (store) { - AliMCTrack* track = - new( (*fTracks)[fNTracks]) AliMCTrack(GetParticle(iPart)); - fIndexMap[iPart] = fNTracks; - // --> Set the number of points in the detectors for this track - for (Int_t iDet=kAliIts; iDet a(iPart, iDet); - track->SetNPoints(iDet, fPointsMap[a]); - } - fNTracks++; - } else { fIndexMap[iPart] = -2; } - - } - - // --> Map index for primary mothers - fIndexMap[-1] = -1; - - // --> Screen output - //Print(1); - -} -// ------------------------------------------------------------------------- - - - -// ----- Public method UpdateTrackIndex -------------------------------- -void AliStack::UpdateTrackIndex(TRefArray* detList) -{ - - fLogger->Debug(MESSAGE_ORIGIN, "AliStack: Updating track indizes..."); - Int_t nColl = 0; - - // First update mother ID in MCTracks - for (Int_t i=0; iAt(i); - Int_t iMotherOld = track->GetMotherId(); - fIndexIter = fIndexMap.find(iMotherOld); - if (fIndexIter == fIndexMap.end()) { - fLogger->Fatal(MESSAGE_ORIGIN, "AliStack: Particle index %i not found in dex map! ", iMotherOld); - Fatal("AliStack::UpdateTrackIndex", "Particle index not found in map"); - } - track->SetMotherId( (*fIndexIter).second ); - } - - - if(fDetList==0) { - // Now iterate through all active detectors - fDetIter = detList->MakeIterator(); - fDetIter->Reset(); - } else { - fDetIter->Reset(); - } - - FairDetector* det = NULL; - while( (det = (FairDetector*)fDetIter->Next() ) ) { - - - // --> Get hit collections from detector - Int_t iColl = 0; - TClonesArray* hitArray; - while ( (hitArray = det->GetCollection(iColl++)) ) { - nColl++; - Int_t nPoints = hitArray->GetEntriesFast(); - - // --> Update track index for all MCPoints in the collection - for (Int_t iPoint=0; iPointAt(iPoint); - Int_t iTrack = point->GetTrackID(); - - fIndexIter = fIndexMap.find(iTrack); - if (fIndexIter == fIndexMap.end()) { - fLogger->Fatal(MESSAGE_ORIGIN, "AliStack: Particle index %i not found in index map! ", iTrack); - Fatal("AliStack::UpdateTrackIndex", "Particle index not found in map"); - } - point->SetTrackID((*fIndexIter).second); - point->SetLink(FairLink("MCTrack", (*fIndexIter).second)); - } - - } // Collections of this detector - } // List of active detectors - fLogger->Debug(MESSAGE_ORIGIN, "...stack and %i collections updated.", nColl); -} -// ------------------------------------------------------------------------- - - - -// ----- Public method Reset ------------------------------------------- -void AliStack::Reset() -{ - fIndex = 0; - fCurrentTrack = -1; - fNPrimaries = fNParticles = fNTracks = 0; - while (! fStack.empty() ) { fStack.pop(); } - fParticles->Clear(); - fTracks->Clear(); - fPointsMap.clear(); -} -// ------------------------------------------------------------------------- - - - -// ----- Public method Register ---------------------------------------- -void AliStack::Register() -{ - FairRootManager::Instance()->Register("MCTrack", "Stack", fTracks,kTRUE); -} -// ------------------------------------------------------------------------- - - - -// ----- Public method Print -------------------------------------------- -void AliStack::Print(Int_t iVerbose) const -{ - cout << "-I- AliStack: Number of primaries = " - << fNPrimaries << endl; - cout << " Total number of particles = " - << fNParticles << endl; - cout << " Number of tracks in output = " - << fNTracks << endl; - if (iVerbose) { - for (Int_t iTrack=0; iTrackAt(iTrack))->Print(iTrack); - } - } -} -// ------------------------------------------------------------------------- - - - -// ----- Public method AddPoint (for current track) -------------------- -void AliStack::AddPoint(DetectorId detId) -{ - Int_t iDet = detId; -// cout << "Add point for Detektor" << iDet << endl; - pair a(fCurrentTrack, iDet); - if ( fPointsMap.find(a) == fPointsMap.end() ) { fPointsMap[a] = 1; } - else { fPointsMap[a]++; } -} -// ------------------------------------------------------------------------- - - - -// ----- Public method AddPoint (for arbitrary track) ------------------- -void AliStack::AddPoint(DetectorId detId, Int_t iTrack) -{ - if ( iTrack < 0 ) { return; } - Int_t iDet = detId; - pair a(iTrack, iDet); - if ( fPointsMap.find(a) == fPointsMap.end() ) { fPointsMap[a] = 1; } - else { fPointsMap[a]++; } -} -// ------------------------------------------------------------------------- - - - - -// ----- Virtual method GetCurrentParentTrackNumber -------------------- -Int_t AliStack::GetCurrentParentTrackNumber() const -{ - TParticle* currentPart = GetCurrentTrack(); - if ( currentPart ) { return currentPart->GetFirstMother(); } - else { return -1; } -} -// ------------------------------------------------------------------------- - - - -// ----- Public method GetParticle ------------------------------------- -TParticle* AliStack::GetParticle(Int_t trackID) const -{ - if (trackID < 0 || trackID >= fNParticles) { - fLogger->Debug(MESSAGE_ORIGIN, "AliStack: Particle index %i out of range.",trackID); - Fatal("AliStack::GetParticle", "Index out of range"); - } - return (TParticle*)fParticles->At(trackID); -} -// ------------------------------------------------------------------------- - - - -// ----- Private method SelectTracks ----------------------------------- -void AliStack::SelectTracks() -{ - - // --> Clear storage map - fStoreMap.clear(); - - // --> Check particles in the fParticle array - for (Int_t i=0; i Get track parameters - Int_t iMother = thisPart->GetMother(0); - TLorentzVector p; - thisPart->Momentum(p); - Double_t energy = p.E(); - Double_t mass = p.M(); -// Double_t mass = thisPart->GetMass(); - Double_t eKin = energy - mass; - - // --> Calculate number of points - Int_t nPoints = 0; - for (Int_t iDet=kAliIts; iDet a(i, iDet); - if ( fPointsMap.find(a) != fPointsMap.end() ) { - nPoints += fPointsMap[a]; - } - } - - // --> Check for cuts (store primaries in any case) - if (iMother < 0) { store = kTRUE; } - else { - if (!fStoreSecondaries) { store = kFALSE; } - if (nPoints < fMinPoints) { store = kFALSE; } - if (eKin < fEnergyCut) { store = kFALSE; } - } - - // --> Set storage flag - fStoreMap[i] = store; - - - } - - // --> If flag is set, flag recursively mothers of selected tracks - if (fStoreMothers) { - for (Int_t i=0; iGetMother(0); - while(iMother >= 0) { - fStoreMap[iMother] = kTRUE; - iMother = GetParticle(iMother)->GetMother(0); - } - } - } - } - -} -// ------------------------------------------------------------------------- - - - -ClassImp(AliStack) diff --git a/AliData/AliStack.h b/AliData/AliStack.h deleted file mode 100644 index 578f13a7831f0..0000000000000 --- a/AliData/AliStack.h +++ /dev/null @@ -1,268 +0,0 @@ -/******************************************************************************** - * Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH * - * * - * This software is distributed under the terms of the * - * GNU Lesser General Public Licence version 3 (LGPL) version 3, * - * copied verbatim in the file "LICENSE" * - ********************************************************************************/ - -// ------------------------------------------------------------------------- -// ----- AliStack header file ----- -// ----- M. Al-Turany June 2014 ----- -// ------------------------------------------------------------------------- - - -/** AliStack.h - ** - ** This class handles the particle stack for the transport simulation. - ** For the stack FILO functunality, it uses the STL stack. To store - ** the tracks during transport, a TParticle array is used. - ** At the end of the event, tracks satisfying the filter criteria - ** are copied to a AliMCTrack array, which is stored in the output. - ** - ** The filtering criteria for the output tracks are: - ** - primary tracks are stored in any case. - ** - secondary tracks are stored if they have a minimal number of - ** points (sum of all detectors) and a minimal energy, or are the - ** - ** The storage of secondaries can be switched off. - ** The storage of all mothers can be switched off. - ** By default, the minimal number of points is 1 and the energy cut is 0. - **/ - - -#ifndef AliStack_H -#define AliStack_H - -#include "FairGenericStack.h" // for FairGenericStack - -#include "AliDetectorList.h" // for DetectorId - -#include "Rtypes.h" // for Int_t, Double_t, Bool_t, etc -#include "TMCProcess.h" // for TMCProcess - -#include // for map, map<>::iterator -#include // for stack -#include // for pair - -class TClonesArray; -class TParticle; -class TRefArray; -class FairLogger; - -class AliStack : public FairGenericStack -{ - - public: - - /** Default constructor - *param size Estimated track number - **/ - AliStack(Int_t size = 100); - - - /** Destructor **/ - virtual ~AliStack(); - - - /** Add a TParticle to the stack. - ** Declared in TVirtualMCStack - *@param toBeDone Flag for tracking - *@param parentID Index of mother particle - *@param pdgCode Particle type (PDG encoding) - *@param px,py,pz Momentum components at start vertex [GeV] - *@param e Total energy at start vertex [GeV] - *@param vx,vy,vz Coordinates of start vertex [cm] - *@param time Start time of track [s] - *@param polx,poly,polz Polarisation vector - *@param proc Production mechanism (VMC encoding) - *@param ntr Track number (filled by the stack) - *@param weight Particle weight - *@param is Generation status code (whatever that means) - **/ - virtual void PushTrack(Int_t toBeDone, Int_t parentID, Int_t pdgCode, - Double_t px, Double_t py, Double_t pz, - Double_t e, Double_t vx, Double_t vy, - Double_t vz, Double_t time, Double_t polx, - Double_t poly, Double_t polz, TMCProcess proc, - Int_t& ntr, Double_t weight, Int_t is); - - virtual void PushTrack(Int_t toBeDone, Int_t parentID, Int_t pdgCode, - Double_t px, Double_t py, Double_t pz, - Double_t e, Double_t vx, Double_t vy, - Double_t vz, Double_t time, Double_t polx, - Double_t poly, Double_t polz, TMCProcess proc, - Int_t& ntr, Double_t weight, Int_t is,Int_t secondParentId); - - - - - /** Get next particle for tracking from the stack. - ** Declared in TVirtualMCStack - *@param iTrack index of popped track (return) - *@return Pointer to the TParticle of the track - **/ - virtual TParticle* PopNextTrack(Int_t& iTrack); - - - /** Get primary particle by index for tracking from stack - ** Declared in TVirtualMCStack - *@param iPrim index of primary particle - *@return Pointer to the TParticle of the track - **/ - virtual TParticle* PopPrimaryForTracking(Int_t iPrim); - - - /** Set the current track number - ** Declared in TVirtualMCStack - *@param iTrack track number - **/ - virtual void SetCurrentTrack(Int_t iTrack) { fCurrentTrack = iTrack; } - - - /** Get total number of tracks - ** Declared in TVirtualMCStack - **/ - virtual Int_t GetNtrack() const { return fNParticles; } - - - /** Get number of primary tracks - ** Declared in TVirtualMCStack - **/ - virtual Int_t GetNprimary() const { return fNPrimaries; } - - - /** Get the current track's particle - ** Declared in TVirtualMCStack - **/ - virtual TParticle* GetCurrentTrack() const; - - - /** Get the number of the current track - ** Declared in TVirtualMCStack - **/ - virtual Int_t GetCurrentTrackNumber() const { return fCurrentTrack; } - - - /** Get the track number of the parent of the current track - ** Declared in TVirtualMCStack - **/ - virtual Int_t GetCurrentParentTrackNumber() const; - - - /** Add a TParticle to the fParticles array **/ - virtual void AddParticle(TParticle* part); - - - /** Fill the MCTrack output array, applying filter criteria **/ - virtual void FillTrackArray(); - - - /** Update the track index in the MCTracks and MCPoints **/ - virtual void UpdateTrackIndex(TRefArray* detArray=0); - - - /** Resets arrays and stack and deletes particles and tracks **/ - virtual void Reset(); - - - /** Register the MCTrack array to the Root Manager **/ - virtual void Register(); - - - /** Output to screen - **@param iVerbose: 0=events summary, 1=track info - **/ - virtual void Print(Int_t iVerbose=0) const; - - - /** Modifiers **/ - void StoreSecondaries(Bool_t choice = kTRUE) { fStoreSecondaries = choice; } - void SetMinPoints(Int_t min) { fMinPoints = min; } - void SetEnergyCut(Double_t eMin) { fEnergyCut = eMin; } - void StoreMothers(Bool_t choice = kTRUE) { fStoreMothers = choice; } - - - /** Increment number of points for the current track in a given detector - *@param iDet Detector unique identifier - **/ - void AddPoint(DetectorId iDet); - - - /** Increment number of points for an arbitrary track in a given detector - *@param iDet Detector unique identifier - *@param iTrack Track number - **/ - void AddPoint(DetectorId iDet, Int_t iTrack); - - - /** Accessors **/ - TParticle* GetParticle(Int_t trackId) const; - TClonesArray* GetListOfParticles() { return fParticles; } - - - - private: - /** FairLogger for debugging and info */ - FairLogger* fLogger; - - /** STL stack (FILO) used to handle the TParticles for tracking **/ - std::stack fStack; //! - - - /** Array of TParticles (contains all TParticles put into or created - ** by the transport - **/ - TClonesArray* fParticles; //! - - - /** Array of FairMCTracks containg the tracks written to the output **/ - TClonesArray* fTracks; - - - /** STL map from particle index to storage flag **/ - std::map fStoreMap; //! - std::map::iterator fStoreIter; //! - - - /** STL map from particle index to track index **/ - std::map fIndexMap; //! - std::map::iterator fIndexIter; //! - - - /** STL map from track index and detector ID to number of MCPoints **/ - std::map, Int_t> fPointsMap; //! - - - /** Some indizes and counters **/ - Int_t fCurrentTrack; //! Index of current track - Int_t fNPrimaries; //! Number of primary particles - Int_t fNParticles; //! Number of entries in fParticles - Int_t fNTracks; //! Number of entries in fTracks - Int_t fIndex; //! Used for merging - - - /** Variables defining the criteria for output selection **/ - Bool_t fStoreSecondaries; - Int_t fMinPoints; - Double32_t fEnergyCut; - Bool_t fStoreMothers; - - - /** Mark tracks for output using selection criteria **/ - void SelectTracks(); - - AliStack(const AliStack&); - AliStack& operator=(const AliStack&); - - ClassDef(AliStack,1) - - -}; - - - - - - -#endif diff --git a/Base/BaseLinkDef.h b/Base/BaseLinkDef.h new file mode 100644 index 0000000000000..36dd873eb8c1a --- /dev/null +++ b/Base/BaseLinkDef.h @@ -0,0 +1,13 @@ + +#ifdef __CINT__ + +#pragma link off all globals; +#pragma link off all classes; +#pragma link off all functions; + +#pragma link C++ class AliceO2::Base::Module+; +#pragma link C++ class AliceO2::Base::Detector+; +#pragma link C++ class AliceO2::Base::TrackReference+; + +#endif + diff --git a/Base/CMakeLists.txt b/Base/CMakeLists.txt new file mode 100644 index 0000000000000..8aa88dbe73621 --- /dev/null +++ b/Base/CMakeLists.txt @@ -0,0 +1,28 @@ +set(INCLUDE_DIRECTORIES +${ROOT_INCLUDE_DIR} +${BASE_INCLUDE_DIRECTORIES} +${CMAKE_SOURCE_DIR}/Base +) + +include_directories( ${INCLUDE_DIRECTORIES}) + +set(LINK_DIRECTORIES +${ROOT_LIBRARY_DIR} +${FAIRROOT_LIBRARY_DIR} +${CMAKE_SOURCE_DIR}/Base +) + +link_directories( ${LINK_DIRECTORIES}) + +set(SRCS +Module.cxx +Detector.cxx +TrackReference.cxx +) + +Set(HEADERS) +Set(LINKDEF BaseLinkDef.h) +Set(LIBRARY_NAME AliceO2Base) +Set(DEPENDENCIES Base EG Physics Cint Core) + +GENERATE_LIBRARY() diff --git a/Base/Detector.cxx b/Base/Detector.cxx new file mode 100644 index 0000000000000..e09f249feee6f --- /dev/null +++ b/Base/Detector.cxx @@ -0,0 +1,94 @@ +/// \file Detector.cxx +/// \brief Implementation of the Detector class + +#include "Detector.h" + +#include +#include + +using std::endl; +using std::cout; +using std::fstream; +using std::ios; +using std::ostream; +using namespace AliceO2::Base; + +ClassImp(AliceO2::Base::Detector) + +Float_t Detector::mDensityFactor = 1.0; + +Detector::Detector() + : FairDetector() +{ +} + +Detector::Detector(const char* name, Bool_t Active, Int_t DetId) + : FairDetector(name, Active, DetId) +{ +} + +Detector::~Detector() +{ +} + +void Detector::Material(Int_t imat, const char* name, Float_t a, Float_t z, Float_t dens, + Float_t radl, Float_t absl, Float_t* buf, Int_t nwbuf) const +{ + TString uniquename = GetName(); + uniquename.Append("_"); + uniquename.Append(name); + + // Check this!!! + gMC->Material(imat, uniquename.Data(), a, z, dens * mDensityFactor, radl, absl, buf, nwbuf); +} + +void Detector::Mixture(Int_t imat, const char* name, Float_t* a, Float_t* z, Float_t dens, + Int_t nlmat, Float_t* wmat) const +{ + TString uniquename = GetName(); + uniquename.Append("_"); + uniquename.Append(name); + + // Check this!!! + gMC->Mixture(imat, uniquename.Data(), a, z, dens * mDensityFactor, nlmat, wmat); +} + +void Detector::Medium(Int_t numed, const char* name, Int_t nmat, Int_t isvol, Int_t ifield, + Float_t fieldm, Float_t tmaxfd, Float_t stemax, Float_t deemax, Float_t epsil, + Float_t stmin, Float_t* ubuf, Int_t nbuf) const +{ + TString uniquename = GetName(); + uniquename.Append("_"); + uniquename.Append(name); + + // Check this!!! + gMC->Medium(numed, uniquename.Data(), nmat, isvol, ifield, fieldm, tmaxfd, stemax, deemax, epsil, + stmin, ubuf, nbuf); +} + +void Detector::Matrix(Int_t& nmat, Float_t theta1, Float_t phi1, Float_t theta2, Float_t phi2, + Float_t theta3, Float_t phi3) const +{ + gMC->Matrix(nmat, theta1, phi1, theta2, phi2, theta3, phi3); +} + +void Detector::DefineWrapperVolume(Int_t id, Double_t rmin, Double_t rmax, Double_t zspan) +{ +} + +void Detector::SetNumberOfWrapperVolumes(Int_t n) +{ +} + +void Detector::DefineLayer(const Int_t nlay, const double phi0, const Double_t r, + const Double_t zlen, const Int_t nladd, const Int_t nmod, + const Double_t lthick, const Double_t dthick, const UInt_t dettypeID, + const Int_t buildLevel) +{ +} + +void Detector::DefineLayerTurbo(Int_t nlay, Double_t phi0, Double_t r, Double_t zlen, Int_t nladd, + Int_t nmod, Double_t width, Double_t tilt, Double_t lthick, + Double_t dthick, UInt_t dettypeID, Int_t buildLevel) +{ +} diff --git a/Base/Detector.h b/Base/Detector.h new file mode 100644 index 0000000000000..5efe5f160b3f9 --- /dev/null +++ b/Base/Detector.h @@ -0,0 +1,87 @@ +/// \file UpgradeSegmentationPixel.h +/// \brief Definition of the UpgradeSegmentationPixel class + +#ifndef ALICEO2_BASE_DETECTOR_H_ +#define ALICEO2_BASE_DETECTOR_H_ + +#include "FairDetector.h" + +namespace AliceO2 { +namespace Base { + +/// This is the basic class for any AliceO2 detector module, whether it is +/// sensitive or not. Detector classes depend on this. +class Detector : public FairDetector { + +public: + enum Model { + test123 = 0 + }; + + + Detector(const char* name, Bool_t Active, Int_t DetId = 0); + + /// Default Constructor + Detector(); + + /// Default Destructor + virtual ~Detector(); + + // Module composition + virtual void Material(Int_t imat, const char* name, Float_t a, Float_t z, Float_t dens, + Float_t radl, Float_t absl, Float_t* buf = 0, Int_t nwbuf = 0) const; + + virtual void Mixture(Int_t imat, const char* name, Float_t* a, Float_t* z, Float_t dens, + Int_t nlmat, Float_t* wmat) const; + + virtual void Medium(Int_t numed, const char* name, Int_t nmat, Int_t isvol, Int_t ifield, + Float_t fieldm, Float_t tmaxfd, Float_t stemax, Float_t deemax, Float_t epsil, + Float_t stmin, Float_t* ubuf = 0, Int_t nbuf = 0) const; + + /// Define a rotation matrix. Angles are in degrees. + /// \param nmat on output contains the number assigned to the rotation matrix + /// \param theta1 polar angle for axis I + /// \param phi1 azimuthal angle for axis I + /// \param theta2 polar angle for axis II + /// \param phi2 azimuthal angle for axis II + /// \param theta3 polar angle for axis III + /// \param phi3 azimuthal angle for axis III + virtual void Matrix(Int_t& nmat, Float_t theta1, Float_t phi1, Float_t theta2, Float_t phi2, + Float_t theta3, Float_t phi3) const; + + static void SetDensityFactor(Float_t density) + { + mDensityFactor = density; + } + static Float_t GetDensityFactor() + { + return mDensityFactor; + } + + /// Sets per wrapper volume parameters + virtual void DefineWrapperVolume(Int_t id, Double_t rmin, Double_t rmax, Double_t zspan); + + /// Books arrays for wrapper volumes + virtual void SetNumberOfWrapperVolumes(Int_t n); + + virtual void DefineLayer(Int_t nlay, Double_t phi0, Double_t r, Double_t zlen, Int_t nladd, + Int_t nmod, Double_t lthick = 0., Double_t dthick = 0., + UInt_t detType = 0, Int_t buildFlag = 0); + + virtual void DefineLayerTurbo(Int_t nlay, Double_t phi0, Double_t r, Double_t zlen, Int_t nladd, + Int_t nmod, Double_t width, Double_t tilt, Double_t lthick = 0., + Double_t dthick = 0., UInt_t detType = 0, Int_t buildFlag = 0); + +protected: + static Float_t mDensityFactor; ///< factor that is multiplied to all material densities (ONLY for + ///< systematic studies) +private: + Detector(const Detector&); + Detector& operator=(const Detector&); + + ClassDef(Detector, 1) // Base class for ALICE Modules +}; +} +} + +#endif diff --git a/Base/Module.cxx b/Base/Module.cxx new file mode 100644 index 0000000000000..4627e44aacd3e --- /dev/null +++ b/Base/Module.cxx @@ -0,0 +1,72 @@ +/// \file Module.cxx +/// \brief Implementation of the Module class + +#include "Module.h" +#include +#include + +using std::endl; +using std::cout; +using std::fstream; +using std::ios; +using std::ostream; +using namespace AliceO2::Base; + +ClassImp(AliceO2::Base::Module) + +Float_t Module::mDensityFactor = 1.0; + +Module::Module() + : FairModule() +{ +} + +Module::Module(const char* name, const char* title, Bool_t Active) + : FairModule(name, title, Active) +{ +} + +Module::~Module() +{ +} + +void Module::Material(Int_t imat, const char* name, Float_t a, Float_t z, Float_t dens, + Float_t radl, Float_t absl, Float_t* buf, Int_t nwbuf) const +{ + TString uniquename = GetName(); + uniquename.Append("_"); + uniquename.Append(name); + + // Check this!!! + gMC->Material(imat, uniquename.Data(), a, z, dens * mDensityFactor, radl, absl, buf, nwbuf); +} + +void Module::Mixture(Int_t imat, const char* name, Float_t* a, Float_t* z, Float_t dens, + Int_t nlmat, Float_t* wmat) const +{ + TString uniquename = GetName(); + uniquename.Append("_"); + uniquename.Append(name); + + // Check this!!! + gMC->Mixture(imat, uniquename.Data(), a, z, dens * mDensityFactor, nlmat, wmat); +} + +void Module::Medium(Int_t numed, const char* name, Int_t nmat, Int_t isvol, Int_t ifield, + Float_t fieldm, Float_t tmaxfd, Float_t stemax, Float_t deemax, Float_t epsil, + Float_t stmin, Float_t* ubuf, Int_t nbuf) const +{ + TString uniquename = GetName(); + uniquename.Append("_"); + uniquename.Append(name); + + // Check this!!! + gMC->Medium(numed, uniquename.Data(), nmat, isvol, ifield, fieldm, tmaxfd, stemax, deemax, epsil, + stmin, ubuf, nbuf); +} + +void Module::Matrix(Int_t& nmat, Float_t theta1, Float_t phi1, Float_t theta2, Float_t phi2, + Float_t theta3, Float_t phi3) const +{ + gMC->Matrix(nmat, theta1, phi1, theta2, phi2, theta3, phi3); +} diff --git a/Base/Module.h b/Base/Module.h new file mode 100644 index 0000000000000..d72f3d58741d7 --- /dev/null +++ b/Base/Module.h @@ -0,0 +1,70 @@ +/// \file Module.h +/// \brief Definition of the Module class + +#ifndef ALICEO2_BASE_MODULE_H_ +#define ALICEO2_BASE_MODULE_H_ + +#include "FairModule.h" + +namespace AliceO2 { +namespace Base { + +/// This is the basic class for any AliceO2 detector module, whether it is +/// sensitive or not. Detector classes depend on this. +class Module : public FairModule { + +public: + Module(const char* name, const char* title, Bool_t Active = kFALSE); + + /// Default Constructor + Module(); + + /// Default Destructor + virtual ~Module(); + + // Module composition + virtual void Material(Int_t imat, const char* name, Float_t a, Float_t z, Float_t dens, + Float_t radl, Float_t absl, Float_t* buf = 0, Int_t nwbuf = 0) const; + + virtual void Mixture(Int_t imat, const char* name, Float_t* a, Float_t* z, Float_t dens, + Int_t nlmat, Float_t* wmat) const; + + virtual void Medium(Int_t numed, const char* name, Int_t nmat, Int_t isvol, Int_t ifield, + Float_t fieldm, Float_t tmaxfd, Float_t stemax, Float_t deemax, Float_t epsil, + Float_t stmin, Float_t* ubuf = 0, Int_t nbuf = 0) const; + + /// Define a rotation matrix. Angles are in degrees. + /// \param nmat on output contains the number assigned to the rotation matrix + /// \param theta1 polar angle for axis I + /// \param phi1 azimuthal angle for axis I + /// \param theta2 polar angle for axis II + /// \param phi2 azimuthal angle for axis II + /// \param theta3 polar angle for axis III + /// \param phi3 azimuthal angle for axis III + virtual void Matrix(Int_t& nmat, Float_t theta1, Float_t phi1, Float_t theta2, Float_t phi2, + Float_t theta3, Float_t phi3) const; + + static void SetDensityFactor(Float_t density) + { + mDensityFactor = density; + } + + static Float_t GetDensityFactor() + { + return mDensityFactor; + } + +protected: + static Float_t mDensityFactor; ///< factor that is multiplied to all material densities (ONLY for + ///< systematic studies) + +private: + Module(const Module&); + Module& operator=(const Module&); + + ClassDef(Module, 1) // Base class for ALICE Modules +}; +} +} + +#endif diff --git a/Base/TrackReference.cxx b/Base/TrackReference.cxx new file mode 100644 index 0000000000000..5421aab865363 --- /dev/null +++ b/Base/TrackReference.cxx @@ -0,0 +1,144 @@ +/// \file TrackReference.cxx +/// \brief Implementation of the TrackReference class +/// \author Sylwester Radomski (S.Radomski@gsi.de) GSI, Jan 31, 2003 + +#include "TVirtualMC.h" +#include "TParticle.h" + +#include "TrackReference.h" +#include + +using std::endl; +using std::cout; +using namespace AliceO2::Base; + +ClassImp(AliceO2::Base::TrackReference) + +TrackReference::TrackReference() + : TObject() + , mTrackNumber(0) + , mReferencePositionX(0) + , mReferencePositionY(0) + , mReferencePositionZ(0) + , mMomentumX(0) + , mMomentumY(0) + , mMomentumZ(0) + , mTrackLength(0) + , mTof(0) + , mUserId(0) + , mDetectorId(-999) +{ + // + // Default constructor + // Creates empty object + + for (Int_t i = 0; i < 16; i++) + ResetBit(BIT(i)); +} + +TrackReference::TrackReference(const TrackReference& tr) + : TObject(tr) + , mTrackNumber(tr.mTrackNumber) + , mReferencePositionX(tr.mReferencePositionX) + , mReferencePositionY(tr.mReferencePositionY) + , mReferencePositionZ(tr.mReferencePositionZ) + , mMomentumX(tr.mMomentumX) + , mMomentumY(tr.mMomentumY) + , mMomentumZ(tr.mMomentumZ) + , mTrackLength(tr.mTrackLength) + , mTof(tr.mTof) + , mUserId(tr.mUserId) + , mDetectorId(tr.mDetectorId) +{ + // Copy Constructor +} + +TrackReference::TrackReference(Int_t label, Int_t id) + : TObject() + , mTrackNumber(label) + , mReferencePositionX(0) + , mReferencePositionY(0) + , mReferencePositionZ(0) + , mMomentumX(0) + , mMomentumY(0) + , mMomentumZ(0) + , mTrackLength(gMC->TrackLength()) + , mTof(gMC->TrackTime()) + , mUserId(0) + , mDetectorId(id) +{ + // + // Create Reference object out of label and + // data in TVirtualMC object + // + // Creates an object and fill all parameters + // from data in VirtualMC + // + + // + + Double_t vec[4]; + + gMC->TrackPosition(vec[0], vec[1], vec[2]); + + mReferencePositionX = vec[0]; + mReferencePositionY = vec[1]; + mReferencePositionZ = vec[2]; + + gMC->TrackMomentum(vec[0], vec[1], vec[2], vec[3]); + + mMomentumX = vec[0]; + mMomentumY = vec[1]; + mMomentumZ = vec[2]; + + // Set Up status code + // Copy Bits from virtual MC + + for (Int_t i = 14; i < 22; i++) + ResetBit(BIT(i)); + + SetBit(BIT(14), gMC->IsNewTrack()); + SetBit(BIT(15), gMC->IsTrackAlive()); + SetBit(BIT(16), gMC->IsTrackDisappeared()); + SetBit(BIT(17), gMC->IsTrackEntering()); + SetBit(BIT(18), gMC->IsTrackExiting()); + SetBit(BIT(19), gMC->IsTrackInside()); + SetBit(BIT(20), gMC->IsTrackOut()); + SetBit(BIT(21), gMC->IsTrackStop()); + + // This particle has to be kept +} + +// AliExternalTrackParam * TrackReference::MakeTrack(const TrackReference *ref, Double_t mass) +// { +// // +// // Make dummy track from the track reference +// // negative mass means opposite charge +// // +// Double_t xx[5]; +// Double_t cc[15]; +// for (Int_t i=0;i<15;i++) cc[i]=0; +// Double_t x = ref->X(), y = ref->Y(), z = ref->Z(); +// Double_t alpha = TMath::ATan2(y,x); +// Double_t xr = TMath::Sqrt(x*x+y*y); +// xx[0] = ref->LocalY(); +// xx[1] = z; +// xx[3] = ref->Pz()/ref->Pt(); +// xx[4] = 1./ref->Pt(); +// if (mass<0) xx[4]*=-1.; // negative mass - negative direction +// Double_t alphap = TMath::ATan2(ref->Py(),ref->Px())-alpha; +// if (alphap> TMath::Pi()) alphap-=TMath::Pi(); +// if (alphap<-TMath::Pi()) alphap+=TMath::Pi(); +// xx[2] = TMath::Sin(alphap); +// +// AliExternalTrackParam * track = new AliExternalTrackParam(xr,alpha,xx,cc); +// return track; +// } + +void TrackReference::Print(Option_t* /*opt*/) const +{ + cout << Form("Label %d P=%7.2f (PX,PY,PZ)=(%7.2f,%7.2f,%7.2f) (X,Y,Z)=(%7.2f,%7.2f,%7.2f)" + " Length=%7.2f Time=%7.2f UserId=%d", + Label(), P(), Px(), Py(), Pz(), X(), Y(), Z(), GetLength(), GetTime(), UserId()) + << endl; +} diff --git a/Base/TrackReference.h b/Base/TrackReference.h new file mode 100644 index 0000000000000..4e7fbfbe9c852 --- /dev/null +++ b/Base/TrackReference.h @@ -0,0 +1,243 @@ +/// \file TrackReference.h +/// \brief Definition of the TrackReference class +/// \author Sylwester Radomski (S.Radomski@gsi.de) GSI, Jan 31, 2003 + +#ifndef ALICEO2_BASE_TRACKREFERENCE_H_ +#define ALICEO2_BASE_TRACKREFERENCE_H_ + +#include "TObject.h" +#include "TMath.h" + +namespace AliceO2 { +namespace Base { + +/// Track Reference object is created every time particle is +/// crossing detector bounds. The object is created by Step Manager +/// The class stores the following informations: +/// track label, +/// track position: X,Y,X +/// track momentum px, py, pz +/// track length and time of fligth: both in cm +/// status bits from Monte Carlo +class TrackReference : public TObject { + +public: + enum constants { + kDisappeared = -1, + kITS = 0, + kTPC = 1, + kFRAME = 2, + kTRD = 3, + kTOF = 4, + kMUON = 5, + kHMPID = 6, + kT0 = 7, + kEMCAL = 8, + kPMD = 10, + kFMD = 12, + kVZERO = 14, + kMFT = 16, + kHALL = 17 + }; + + /// Default Constructor + TrackReference(); + TrackReference(Int_t label, Int_t id = -999); + TrackReference(const TrackReference& tr); + + /// Default Destructor + virtual ~TrackReference() + { + } + + // static AliExternalTrackParam * MakeTrack(const TrackReference *ref, Double_t mass); + virtual Int_t GetTrack() const + { + return mTrackNumber; + } + + virtual void SetTrack(Int_t track) + { + mTrackNumber = track; + } + + virtual void SetLength(Float_t length) + { + mTrackLength = length; + } + + virtual void SetTime(Float_t time) + { + mTof = time; + } + + virtual Float_t GetLength() const + { + return mTrackLength; + } + + virtual Float_t GetTime() const + { + return mTof; + } + + virtual Int_t Label() const + { + return mTrackNumber; + } + + virtual void SetLabel(Int_t track) + { + mTrackNumber = track; + } + + virtual Float_t R() const + { + return TMath::Sqrt(mReferencePositionX * mReferencePositionX + + mReferencePositionY * mReferencePositionY); + } + + virtual Float_t Pt() const + { + return TMath::Sqrt(mMomentumX * mMomentumX + mMomentumY * mMomentumY); + } + + virtual Float_t Phi() const + { + return TMath::Pi() + TMath::ATan2(-mMomentumY, -mMomentumX); + } + + virtual Float_t Theta() const + { + return (mMomentumZ == 0) ? TMath::Pi() / 2 : TMath::ACos(mMomentumZ / P()); + } + + virtual Float_t X() const + { + return mReferencePositionX; + } + + virtual Float_t Y() const + { + return mReferencePositionY; + } + + virtual Float_t Z() const + { + return mReferencePositionZ; + } + + virtual Float_t Px() const + { + return mMomentumX; + } + + virtual Float_t Py() const + { + return mMomentumY; + } + + virtual Float_t Pz() const + { + return mMomentumZ; + } + + virtual Float_t P() const + { + return TMath::Sqrt(mMomentumX * mMomentumX + mMomentumY * mMomentumY + mMomentumZ * mMomentumZ); + } + + virtual Int_t UserId() const + { + return mUserId; + } + + virtual Int_t DetectorId() const + { + return mDetectorId; + } + + virtual void SetDetectorId(Int_t id) + { + mDetectorId = id; + } + + virtual void SetPosition(Float_t x, Float_t y, Float_t z) + { + mReferencePositionX = x; + mReferencePositionY = y; + mReferencePositionZ = z; + } + + virtual void SetMomentum(Float_t px, Float_t py, Float_t pz) + { + mMomentumX = px; + mMomentumY = py; + mMomentumZ = pz; + } + + virtual void SetUserId(Int_t userId) + { + mUserId = userId; + } + + // Methods to get position of the track reference in + // in the TPC/TRD/TOF Tracking coordinate system + + virtual Float_t PhiPos() const + { + return TMath::Pi() + TMath::ATan2(-mReferencePositionY, -mReferencePositionX); + } + + virtual Float_t Alpha() const + { + return TMath::Pi() * (20 * ((((Int_t)(PhiPos() * 180 / TMath::Pi())) / 20)) + 10) / 180.; + } + + virtual Float_t LocalX() const + { + return mReferencePositionX * TMath::Cos(-Alpha()) - mReferencePositionY * TMath::Sin(-Alpha()); + } + + virtual Float_t LocalY() const + { + return mReferencePositionX * TMath::Sin(-Alpha()) + mReferencePositionY * TMath::Cos(-Alpha()); + } + + Bool_t IsSortable() const + { + return kTRUE; + } + + Int_t Compare(const TObject* obj) const + { + Int_t ll = ((TrackReference*)obj)->GetTrack(); + if (ll < mTrackNumber) { + return 1; + } + if (ll > mTrackNumber) { + return -1; + } + return 0; + } + + virtual void Print(Option_t* opt = "") const; + +protected: + Int_t mTrackNumber; ///< Track number + Float_t mReferencePositionX; ///< X reference position of the track + Float_t mReferencePositionY; ///< Y reference position of the track + Float_t mReferencePositionZ; ///< Z reference position of the track + Float_t mMomentumX; ///< momentum + Float_t mMomentumY; ///< momentum + Float_t mMomentumZ; ///< momentum + Float_t mTrackLength; ///< track length from its origin in cm + Float_t mTof; ///< time of flight in cm + Int_t mUserId; ///< optional Id defined by user + Int_t mDetectorId; ///< Detector Id + ClassDef(TrackReference, 1) // Base class for all Alice track references +}; +} +} + +#endif diff --git a/CMakeLists.txt b/CMakeLists.txt index 6e5017ec5f7fb..ee6f290f2c5eb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,18 +1,18 @@ # The name of our project is "ALICEO2". CMakeLists files in this project can -# refer to the root source directory of the project as ${ALICEO2_SOURCE_DIR} -# or as ${CMAKE_SOURCE_DIR} and to the root binary directory of the project as +# refer to the root source directory of the project as ${ALICEO2_SOURCE_DIR} +# or as ${CMAKE_SOURCE_DIR} and to the root binary directory of the project as # ${ALICEO2_BINARY_DIR} or ${CMAKE_BINARY_DIR}. -# This difference is important for the base classes which are in FAIRROOT +# This difference is important for the base classes which are in FAIRROOT # and the experiment part. # Check if cmake has the required version CMAKE_MINIMUM_REQUIRED(VERSION 2.8.11 FATAL_ERROR) # Set name of our project to "ALICEO2". Has to be done -# after check of cmake version since this is a new feature +# after check of cmake version since this is a new feature project(ALICEO2) -#In case you need Fortran +#In case you need Fortran #ENABLE_LANGUAGE(Fortran) # Check for needed environment variables @@ -21,13 +21,13 @@ IF(NOT DEFINED ENV{FAIRROOTPATH}) ENDIF(NOT DEFINED ENV{FAIRROOTPATH}) IF(NOT DEFINED ENV{SIMPATH}) - MESSAGE(FATAL_ERROR "You did not define the environment variable SIMPATH which is nedded to find the external packages. Please set this variable and execute cmake again.") + MESSAGE(FATAL_ERROR "You did not define the environment variable SIMPATH which is nedded to find the external packages. Please set this variable and execute cmake again.") ENDIF(NOT DEFINED ENV{SIMPATH}) SET(SIMPATH $ENV{SIMPATH}) SET(FAIRROOTPATH $ENV{FAIRROOTPATH}) -# where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ +# where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ # is checked set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules") set(CMAKE_MODULE_PATH "${FAIRROOTPATH}/share/fairbase/cmake/modules" ${CMAKE_MODULE_PATH}) @@ -50,7 +50,6 @@ If(NOT CMAKE_BUILD_TYPE) EndIf(NOT CMAKE_BUILD_TYPE) Check_Compiler() - set(LIBRARY_OUTPUT_PATH "${CMAKE_BINARY_DIR}/lib") set(EXECUTABLE_OUTPUT_PATH "${CMAKE_BINARY_DIR}/bin") set(INCLUDE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/include") @@ -68,7 +67,6 @@ Else(USE_PATH_INFO) STRING(REGEX MATCHALL "[^:]+" PATH $ENV{PATH}) EndIf(USE_PATH_INFO) - # Check if the user wants to build the project in the source # directory CHECK_OUT_OF_SOURCE_BUILD() @@ -77,7 +75,7 @@ CHECK_OUT_OF_SOURCE_BUILD() # message IF(NOT UNIX) MESSAGE(FATAL_ERROR "You're not on an UNIX system. The project was up to now only tested on UNIX systems, so we break here. If you want to go on please edit the CMakeLists.txt in the source directory.") -ENDIF(NOT UNIX) +ENDIF(NOT UNIX) # Check if the external packages are installed into a separate install # directory @@ -110,8 +108,8 @@ Else(${ROOT_LIBRARY_DIR} MATCHES /lib/root) EndIf(${ROOT_LIBRARY_DIR} MATCHES /lib/root) Message("-- Looking for Boost ...") # If an older version of boost is found both of the variables below are -# cached and in a second cmake run, a good boost version is found even -# if the version is to old. +# cached and in a second cmake run, a good boost version is found even +# if the version is to old. # To overcome this problem both variables are cleared before checking # for boost. Unset(Boost_INCLUDE_DIR CACHE) @@ -143,10 +141,9 @@ Generate_Version_Info() SET(_LIBDIR ${CMAKE_BINARY_DIR}/lib) SET(LD_LIBRARY_PATH ${_LIBDIR} ${LD_LIBRARY_PATH}) -#install(DIRECTORY geometry DESTINATION pnd_install +#install(DIRECTORY geometry DESTINATION pnd_install # ) - # Check if the compiler support specific C++11 features # Up to now this is only a check since the code does not use # any of the features of the new standard @@ -161,20 +158,16 @@ EndIF(NOT CMAKE_CXX_FLAGS) # cause another cmake executable to run. The same process will walk through # the project's entire directory structure. -add_subdirectory (AliBase) -add_subdirectory (AliData) -add_subdirectory (AliGenerators) +add_subdirectory (Base) +add_subdirectory (Data) +add_subdirectory (Generators) add_subdirectory (its) add_subdirectory (passive) -add_subdirectory (field) -add_subdirectory (devices) - - +add_subdirectory (field) +add_subdirectory (devices) WRITE_CONFIG_FILE(config.sh) - -configure_file(${CMAKE_SOURCE_DIR}/CTestCustom.cmake + +configure_file(${CMAKE_SOURCE_DIR}/CTestCustom.cmake ${CMAKE_BINARY_DIR}/CTestCustom.cmake ) - - diff --git a/AliData/CMakeLists.txt b/Data/CMakeLists.txt similarity index 59% rename from AliData/CMakeLists.txt rename to Data/CMakeLists.txt index ca500cd5a393c..633a6ba1099b2 100644 --- a/AliData/CMakeLists.txt +++ b/Data/CMakeLists.txt @@ -1,9 +1,7 @@ - # Create a library called "libAliData" - set(INCLUDE_DIRECTORIES -${ROOT_INCLUDE_DIR} +${ROOT_INCLUDE_DIR} ${BASE_INCLUDE_DIRECTORIES} -${CMAKE_SOURCE_DIR}/AliData +${CMAKE_SOURCE_DIR}/Data ) include_directories( ${INCLUDE_DIRECTORIES}) @@ -11,21 +9,19 @@ include_directories( ${INCLUDE_DIRECTORIES}) set(LINK_DIRECTORIES ${ROOT_LIBRARY_DIR} ${FAIRROOT_LIBRARY_DIR} -${CMAKE_SOURCE_DIR}/AliData - +${CMAKE_SOURCE_DIR}/Data ) - + link_directories( ${LINK_DIRECTORIES}) set(SRCS -AliStack.cxx -AliMCTrack.cxx +Stack.cxx +MCTrack.cxx ) Set(HEADERS ) -Set(LINKDEF MCStackLinkDef.h) -Set(LIBRARY_NAME AliData) +Set(LINKDEF DataLinkDef.h) +Set(LIBRARY_NAME AliceO2Data) Set(DEPENDENCIES Base EG Physics Cint Core) GENERATE_LIBRARY() - diff --git a/AliData/MCStackLinkDef.h b/Data/DataLinkDef.h similarity index 89% rename from AliData/MCStackLinkDef.h rename to Data/DataLinkDef.h index 64d6cb789f4bb..0f71885599f53 100644 --- a/AliData/MCStackLinkDef.h +++ b/Data/DataLinkDef.h @@ -12,8 +12,8 @@ #pragma link off all classes; #pragma link off all functions; -#pragma link C++ class AliStack+; -#pragma link C++ class AliMCTrack+; +#pragma link C++ class AliceO2::Data::Stack+; +#pragma link C++ class MCTrack+; #endif diff --git a/Data/DetectorList.h b/Data/DetectorList.h new file mode 100644 index 0000000000000..bd8e9a878f331 --- /dev/null +++ b/Data/DetectorList.h @@ -0,0 +1,10 @@ +/// \file Detector.h +/// \brief Defines unique identifier for all AliceO2 detector systems, needed for stack filtring + +#ifndef ALICEO2_DATA_DETECTORLIST_H_ +#define ALICEO2_DATA_DETECTORLIST_H_ + +// kSTOPHERE is needed for iteration over the enum. All detectors have to be put before. +enum DetectorId {kAliIts, kSTOPHERE}; + +#endif diff --git a/Data/MCTrack.cxx b/Data/MCTrack.cxx new file mode 100644 index 0000000000000..d06d325d8e6f7 --- /dev/null +++ b/Data/MCTrack.cxx @@ -0,0 +1,149 @@ +/// \file MCTrack.cxx +/// \brief Implementation of the MCTrack class +/// \author M. Al-Turany - June 2014 + +#include "MCTrack.h" + +#include "FairLogger.h" +#include "TDatabasePDG.h" +#include "TParticle.h" +#include "TParticlePDG.h" + +MCTrack::MCTrack() + : TObject(), + mPdgCode(0), + mMotherTrackId(-1), + mStartVertexMomentumX(0.), + mStartVertexMomentumY(0.), + mStartVertexMomentumZ(0.), + mStartVertexCoordinatesX(0.), + mStartVertexCoordinatesY(0.), + mStartVertexCoordinatesZ(0.), + mStartVertexCoordinatesT(0.), + fNPoints(0) +{ +} + +MCTrack::MCTrack(Int_t pdgCode, Int_t motherId, Double_t px, Double_t py, Double_t pz, Double_t x, + Double_t y, Double_t z, Double_t t, Int_t nPoints = 0) + : TObject(), + mPdgCode(pdgCode), + mMotherTrackId(motherId), + mStartVertexMomentumX(px), + mStartVertexMomentumY(py), + mStartVertexMomentumZ(pz), + mStartVertexCoordinatesX(x), + mStartVertexCoordinatesY(y), + mStartVertexCoordinatesZ(z), + mStartVertexCoordinatesT(t), + fNPoints(nPoints) +{ +} + +MCTrack::MCTrack(const MCTrack& track) + : TObject(track), + mPdgCode(track.mPdgCode), + mMotherTrackId(track.mMotherTrackId), + mStartVertexMomentumX(track.mStartVertexMomentumX), + mStartVertexMomentumY(track.mStartVertexMomentumY), + mStartVertexMomentumZ(track.mStartVertexMomentumZ), + mStartVertexCoordinatesX(track.mStartVertexCoordinatesX), + mStartVertexCoordinatesY(track.mStartVertexCoordinatesY), + mStartVertexCoordinatesZ(track.mStartVertexCoordinatesZ), + mStartVertexCoordinatesT(track.mStartVertexCoordinatesT), + fNPoints(track.fNPoints) +{ +} + +MCTrack::MCTrack(TParticle* part) + : TObject(), + mPdgCode(part->GetPdgCode()), + mMotherTrackId(part->GetMother(0)), + mStartVertexMomentumX(part->Px()), + mStartVertexMomentumY(part->Py()), + mStartVertexMomentumZ(part->Pz()), + mStartVertexCoordinatesX(part->Vx()), + mStartVertexCoordinatesY(part->Vy()), + mStartVertexCoordinatesZ(part->Vz()), + mStartVertexCoordinatesT(part->T() * 1e09), + fNPoints(0) +{ +} + +MCTrack::~MCTrack() +{ +} + +void MCTrack::Print(Int_t trackId) const +{ + LOG(DEBUG) << "Track " << trackId << ", mother : " << mMotherTrackId << ", Type " << mPdgCode + << ", momentum (" << mStartVertexMomentumX << ", " << mStartVertexMomentumY << ", " + << mStartVertexMomentumZ << ") GeV" << FairLogger::endl; + // LOG(DEBUG2) << " Ref " << GetNumberOfPoints(kREF) + // << ", TutDet " << GetNumberOfPoints(kTutDet) + // << ", Rutherford " << GetNumberOfPoints(kFairRutherford) + // << FairLogger::endl; + // +} + +Double_t MCTrack::GetMass() const +{ + if (TDatabasePDG::Instance()) { + TParticlePDG* particle = TDatabasePDG::Instance()->GetParticle(mPdgCode); + if (particle) { + return particle->Mass(); + } else { + return 0.; + } + } + return 0.; +} + +Double_t MCTrack::GetRapidity() const +{ + Double_t e = GetEnergy(); + Double_t y = 0.5 * TMath::Log((e + mStartVertexMomentumZ) / (e - mStartVertexMomentumZ)); + return y; +} + +Int_t MCTrack::GetNumberOfPoints(DetectorId detId) const +{ + // // TODO: Where does this come from + // if ( detId == kREF ) { return ( fNPoints & 1); } + // else if ( detId == kTutDet ) { return ( (fNPoints & ( 7 << 1) ) >> 1); } + // else if ( detId == kFairRutherford ) { return ( (fNPoints & (31 << 4) ) >> 4); } + // else { + // LOG(ERROR) << "Unknown detector ID " + // << detId << FairLogger::endl; + // return 0; + // } + // +} + +void MCTrack::SetNumberOfPoints(Int_t iDet, Int_t nPoints) +{ + // + // if ( iDet == kREF ) { + // if ( nPoints < 0 ) { nPoints = 0; } + // else if ( nPoints > 1 ) { nPoints = 1; } + // fNPoints = ( fNPoints & ( ~ 1 ) ) | nPoints; + // } + + // else if ( iDet == kTutDet ) { + // if ( nPoints < 0 ) { nPoints = 0; } + // else if ( nPoints > 7 ) { nPoints = 7; } + // fNPoints = ( fNPoints & ( ~ ( 7 << 1 ) ) ) | ( nPoints << 1 ); + // } + + // else if ( iDet == kFairRutherford ) { + // if ( nPoints < 0 ) { nPoints = 0; } + // else if ( nPoints > 31 ) { nPoints = 31; } + // fNPoints = ( fNPoints & ( ~ ( 31 << 4 ) ) ) | ( nPoints << 4 ); + // } + + // else LOG(ERROR) << "Unknown detector ID " + // << iDet << FairLogger::endl; + // +} + +ClassImp(MCTrack) diff --git a/Data/MCTrack.h b/Data/MCTrack.h new file mode 100644 index 0000000000000..623d543e8a891 --- /dev/null +++ b/Data/MCTrack.h @@ -0,0 +1,168 @@ +/// \file MCTrack.h +/// \brief Definition of the MCTrack class +/// \author M. Al-Turany - June 2014 + +#ifndef ALICEO2_DATA_MCTRACK_H_ +#define ALICEO2_DATA_MCTRACK_H_ + +#include "TObject.h" +#include "Rtypes.h" +#include "TLorentzVector.h" +#include "TMath.h" +#include "TVector3.h" + +#include "DetectorList.h" + +class TParticle; + +/// Data class for storing Monte Carlo tracks processed by the Stack. +/// An MCTrack can be a primary track put into the simulation or a +/// secondary one produced by the transport through decay or interaction. +/// This is a light weight particle class that is saved to disk +/// instead of saving the TParticle class. It is also used for filtering the stack +class MCTrack : public TObject { + +public: + /// Default constructor + MCTrack(); + + /// Standard constructor + MCTrack(Int_t pdgCode, Int_t motherID, Double_t px, Double_t py, Double_t pz, Double_t x, + Double_t y, Double_t z, Double_t t, Int_t nPoints); + + /// Copy constructor + MCTrack(const MCTrack& track); + + /// Constructor from TParticle + MCTrack(TParticle* particle); + + /// Destructor + virtual ~MCTrack(); + + /// Output to screen + void Print(Int_t iTrack = 0) const; + + /// Accessors + Int_t GetPdgCode() const + { + return mPdgCode; + } + Int_t GetMotherTrackId() const + { + return mMotherTrackId; + } + Double_t GetStartVertexMomentumX() const + { + return mStartVertexMomentumX; + } + Double_t GetStartVertexMomentumY() const + { + return mStartVertexMomentumY; + } + Double_t GetStartVertexMomentumZ() const + { + return mStartVertexMomentumZ; + } + Double_t GetStartVertexCoordinatesX() const + { + return mStartVertexCoordinatesX; + } + Double_t GetStartVertexCoordinatesY() const + { + return mStartVertexCoordinatesY; + } + Double_t GetStartVertexCoordinatesZ() const + { + return mStartVertexCoordinatesZ; + } + Double_t GetStartVertexCoordinatesT() const + { + return mStartVertexCoordinatesT; + } + Double_t GetMass() const; + Double_t GetEnergy() const; + Double_t GetPt() const + { + return TMath::Sqrt(mStartVertexMomentumX * mStartVertexMomentumX + + mStartVertexMomentumY * mStartVertexMomentumY); + } + Double_t GetP() const + { + return TMath::Sqrt(mStartVertexMomentumX * mStartVertexMomentumX + + mStartVertexMomentumY * mStartVertexMomentumY + + mStartVertexMomentumZ * mStartVertexMomentumZ); + } + Double_t GetRapidity() const; + void GetMomentum(TVector3& momentum); + void Get4Momentum(TLorentzVector& momentum); + void GetStartVertex(TVector3& vertex); + + /// Accessors to the number of MCPoints in the detectors + Int_t GetNumberOfPoints(DetectorId detId) const; + + /// Modifiers + void SetMotherTrackId(Int_t id) + { + mMotherTrackId = id; + } + void SetNumberOfPoints(Int_t iDet, Int_t np); + +private: + /// PDG particle code + Int_t mPdgCode; + + /// Index of mother track. -1 for primary particles. + Int_t mMotherTrackId; + + /// Momentum components at start vertex [GeV] + Double32_t mStartVertexMomentumX, mStartVertexMomentumY, mStartVertexMomentumZ; + + /// Coordinates of start vertex [cm, ns] + Double32_t mStartVertexCoordinatesX, mStartVertexCoordinatesY, mStartVertexCoordinatesZ, + mStartVertexCoordinatesT; + + /// Bitvector representing the number of MCPoints for this track in + /// each subdetector. The detectors can be represented by (example from CBM) + /// REF: Bit 0 (1 bit, max. value 1) + /// MVD: Bit 1 - 3 (3 bits, max. value 7) + /// STS: Bit 4 - 8 (5 bits, max. value 31) + /// RICH: Bit 9 (1 bit, max. value 1) + /// MUCH: Bit 10 - 14 (5 bits, max. value 31) + /// TRD: Bit 15 - 19 (5 bits, max. value 31) + /// TOF: Bit 20 - 23 (4 bits, max. value 15) + /// ECAL: Bit 24 (1 bit, max. value 1) + /// ZDC: Bit 25 (1 bit, max. value 1) + /// The respective point numbers can be accessed and modified + /// with the inline functions. + /// Bits 26-31 are spare for potential additional detectors. + + Int_t fNPoints; + + ClassDef(MCTrack, 1); +}; + +inline Double_t MCTrack::GetEnergy() const +{ + Double_t mass = GetMass(); + return TMath::Sqrt(mass * mass + mStartVertexMomentumX * mStartVertexMomentumX + + mStartVertexMomentumY * mStartVertexMomentumY + + mStartVertexMomentumZ * mStartVertexMomentumZ); +} + +inline void MCTrack::GetMomentum(TVector3& momentum) +{ + momentum.SetXYZ(mStartVertexMomentumX, mStartVertexMomentumY, mStartVertexMomentumZ); +} + +inline void MCTrack::Get4Momentum(TLorentzVector& momentum) +{ + momentum.SetXYZT(mStartVertexMomentumX, mStartVertexMomentumY, mStartVertexMomentumZ, + GetEnergy()); +} + +inline void MCTrack::GetStartVertex(TVector3& vertex) +{ + vertex.SetXYZ(mStartVertexCoordinatesX, mStartVertexCoordinatesY, mStartVertexCoordinatesZ); +} + +#endif diff --git a/Data/Stack.cxx b/Data/Stack.cxx new file mode 100644 index 0000000000000..caa31bb3561ba --- /dev/null +++ b/Data/Stack.cxx @@ -0,0 +1,411 @@ +/// \file Stack.cxx +/// \brief Implementation of the Stack class +/// \author M. Al-Turany - June 2014 + +#include "Stack.h" + +#include "FairDetector.h" +#include "FairLink.h" +#include "FairMCPoint.h" +#include "MCTrack.h" +#include "FairRootManager.h" +#include "FairLogger.h" + +#include "Riosfwd.h" +#include "TClonesArray.h" +#include "TIterator.h" +#include "TLorentzVector.h" +#include "TParticle.h" +#include "TRefArray.h" + +#include +#include + +using std::cout; +using std::endl; +using std::pair; +using namespace AliceO2::Data; + +Stack::Stack(Int_t size) + : FairGenericStack(), + mStack(), + mParticles(new TClonesArray("TParticle", size)), + mTracks(new TClonesArray("MCTrack", size)), + mStoreMap(), + mStoreIterator(), + mIndexMap(), + mIndexIterator(), + mPointsMap(), + mIndexOfCurrentTrack(-1), + mNumberOfPrimaryParticles(0), + mNumberOfEntriesInParticles(0), + mNumberOfEntriesInTracks(0), + mIndex(0), + mStoreSecondaries(kTRUE), + mMinPoints(1), + mEnergyCut(0.), + mStoreMothers(kTRUE), + mLogger(FairLogger::GetLogger()) +{ +} + +Stack::~Stack() +{ + if (mParticles) { + mParticles->Delete(); + delete mParticles; + } + if (mTracks) { + mTracks->Delete(); + delete mTracks; + } +} + +void Stack::PushTrack(Int_t toBeDone, Int_t parentId, Int_t pdgCode, Double_t px, Double_t py, + Double_t pz, Double_t e, Double_t vx, Double_t vy, Double_t vz, Double_t time, + Double_t polx, Double_t poly, Double_t polz, TMCProcess proc, Int_t& ntr, + Double_t weight, Int_t is) +{ + + PushTrack(toBeDone, parentId, pdgCode, px, py, pz, e, vx, vy, vz, time, polx, poly, polz, proc, + ntr, weight, is, -1); +} + +void Stack::PushTrack(Int_t toBeDone, Int_t parentId, Int_t pdgCode, Double_t px, Double_t py, + Double_t pz, Double_t e, Double_t vx, Double_t vy, Double_t vz, Double_t time, + Double_t polx, Double_t poly, Double_t polz, TMCProcess proc, Int_t& ntr, + Double_t weight, Int_t is, Int_t secondparentID) +{ + + // Get TParticle array + TClonesArray& partArray = *mParticles; + + // Create new TParticle and add it to the TParticle array + Int_t trackId = mNumberOfEntriesInParticles; + Int_t nPoints = 0; + Int_t daughter1Id = -1; + Int_t daughter2Id = -1; + TParticle* particle = new (partArray[mNumberOfEntriesInParticles++]) TParticle( + pdgCode, trackId, parentId, nPoints, daughter1Id, daughter2Id, px, py, pz, e, vx, vy, vz, time); + particle->SetPolarisation(polx, poly, polz); + particle->SetWeight(weight); + particle->SetUniqueID(proc); + + // Increment counter + if (parentId < 0) { + mNumberOfPrimaryParticles++; + } + + // Set argument variable + ntr = trackId; + + // Push particle on the stack if toBeDone is set + if (toBeDone == 1) { + mStack.push(particle); + } +} + +TParticle* Stack::PopNextTrack(Int_t& iTrack) +{ + + // If end of stack: Return empty pointer + if (mStack.empty()) { + iTrack = -1; + return NULL; + } + + // If not, get next particle from stack + TParticle* thisParticle = mStack.top(); + mStack.pop(); + + if (!thisParticle) { + iTrack = 0; + return NULL; + } + + mIndexOfCurrentTrack = thisParticle->GetStatusCode(); + iTrack = mIndexOfCurrentTrack; + + return thisParticle; +} + +TParticle* Stack::PopPrimaryForTracking(Int_t iPrim) +{ + + // Get the iPrimth particle from the mStack TClonesArray. This + // should be a primary (if the index is correct). + + // Test for index + if (iPrim < 0 || iPrim >= mNumberOfPrimaryParticles) { + mLogger->Fatal(MESSAGE_ORIGIN, "Stack: Primary index out of range! %i ", iPrim); + Fatal("Stack::PopPrimaryForTracking", "Index out of range"); + } + + // Return the iPrim-th TParticle from the fParticle array. This should be + // a primary. + TParticle* part = (TParticle*)mParticles->At(iPrim); + if (!(part->GetMother(0) < 0)) { + mLogger->Fatal(MESSAGE_ORIGIN, "Stack:: Not a primary track! %i ", iPrim); + Fatal("Stack::PopPrimaryForTracking", "Not a primary track"); + } + + return part; +} + +TParticle* Stack::GetCurrentTrack() const +{ + TParticle* currentPart = GetParticle(mIndexOfCurrentTrack); + if (!currentPart) { + mLogger->Warning(MESSAGE_ORIGIN, "Stack: Current track not found in stack!"); + Warning("Stack::GetCurrentTrack", "Track not found in stack"); + } + return currentPart; +} + +void Stack::AddParticle(TParticle* oldPart) +{ + TClonesArray& array = *mParticles; + TParticle* newPart = new (array[mIndex]) TParticle(*oldPart); + newPart->SetWeight(oldPart->GetWeight()); + newPart->SetUniqueID(oldPart->GetUniqueID()); + mIndex++; +} + +void Stack::FillTrackArray() +{ + + mLogger->Debug(MESSAGE_ORIGIN, "Stack: Filling MCTrack array..."); + + // Reset index map and number of output tracks + mIndexMap.clear(); + mNumberOfEntriesInTracks = 0; + + // Check tracks for selection criteria + SelectTracks(); + + // Loop over mParticles array and copy selected tracks + for (Int_t iPart = 0; iPart < mNumberOfEntriesInParticles; iPart++) { + + mStoreIterator = mStoreMap.find(iPart); + if (mStoreIterator == mStoreMap.end()) { + mLogger->Fatal(MESSAGE_ORIGIN, "Stack: Particle %i not found in storage map! ", iPart); + Fatal("Stack::FillTrackArray", "Particle not found in storage map."); + } + Bool_t store = (*mStoreIterator).second; + + if (store) { + MCTrack* track = new ((*mTracks)[mNumberOfEntriesInTracks]) MCTrack(GetParticle(iPart)); + mIndexMap[iPart] = mNumberOfEntriesInTracks; + // Set the number of points in the detectors for this track + for (Int_t iDet = kAliIts; iDet < kSTOPHERE; iDet++) { + pair a(iPart, iDet); + track->SetNumberOfPoints(iDet, mPointsMap[a]); + } + mNumberOfEntriesInTracks++; + } else { + mIndexMap[iPart] = -2; + } + } + + // Map index for primary mothers + mIndexMap[-1] = -1; + + // Screen output + // Print(1); +} + +void Stack::UpdateTrackIndex(TRefArray* detList) +{ + + mLogger->Debug(MESSAGE_ORIGIN, "Stack: Updating track indizes..."); + Int_t nColl = 0; + + // First update mother ID in MCTracks + for (Int_t i = 0; i < mNumberOfEntriesInTracks; i++) { + MCTrack* track = (MCTrack*)mTracks->At(i); + Int_t iMotherOld = track->GetMotherTrackId(); + mIndexIterator = mIndexMap.find(iMotherOld); + if (mIndexIterator == mIndexMap.end()) { + mLogger->Fatal(MESSAGE_ORIGIN, "Stack: Particle index %i not found in dex map! ", iMotherOld); + Fatal("Stack::UpdateTrackIndex", "Particle index not found in map"); + } + track->SetMotherTrackId((*mIndexIterator).second); + } + + if (fDetList == 0) { + // Now iterate through all active detectors + fDetIter = detList->MakeIterator(); + fDetIter->Reset(); + } else { + fDetIter->Reset(); + } + + FairDetector* det = NULL; + while ((det = (FairDetector*)fDetIter->Next())) { + + // Get hit collections from detector + Int_t iColl = 0; + TClonesArray* hitArray; + while ((hitArray = det->GetCollection(iColl++))) { + nColl++; + Int_t nPoints = hitArray->GetEntriesFast(); + + // Update track index for all MCPoints in the collection + for (Int_t iPoint = 0; iPoint < nPoints; iPoint++) { + FairMCPoint* point = (FairMCPoint*)hitArray->At(iPoint); + Int_t iTrack = point->GetTrackID(); + + mIndexIterator = mIndexMap.find(iTrack); + if (mIndexIterator == mIndexMap.end()) { + mLogger->Fatal(MESSAGE_ORIGIN, "Stack: Particle index %i not found in index map! ", + iTrack); + Fatal("Stack::UpdateTrackIndex", "Particle index not found in map"); + } + point->SetTrackID((*mIndexIterator).second); + point->SetLink(FairLink("MCTrack", (*mIndexIterator).second)); + } + + } // Collections of this detector + } // List of active detectors + mLogger->Debug(MESSAGE_ORIGIN, "...stack and %i collections updated.", nColl); +} + +void Stack::Reset() +{ + mIndex = 0; + mIndexOfCurrentTrack = -1; + mNumberOfPrimaryParticles = mNumberOfEntriesInParticles = mNumberOfEntriesInTracks = 0; + while (!mStack.empty()) { + mStack.pop(); + } + mParticles->Clear(); + mTracks->Clear(); + mPointsMap.clear(); +} + +void Stack::Register() +{ + FairRootManager::Instance()->Register("MCTrack", "Stack", mTracks, kTRUE); +} + +void Stack::Print(Int_t iVerbose) const +{ + cout << "-I- Stack: Number of primaries = " << mNumberOfPrimaryParticles << endl; + cout << " Total number of particles = " << mNumberOfEntriesInParticles << endl; + cout << " Number of tracks in output = " << mNumberOfEntriesInTracks << endl; + if (iVerbose) { + for (Int_t iTrack = 0; iTrack < mNumberOfEntriesInTracks; iTrack++) { + ((MCTrack*)mTracks->At(iTrack))->Print(iTrack); + } + } +} + +void Stack::AddPoint(DetectorId detId) +{ + Int_t iDet = detId; + // cout << "Add point for Detektor" << iDet << endl; + pair a(mIndexOfCurrentTrack, iDet); + if (mPointsMap.find(a) == mPointsMap.end()) { + mPointsMap[a] = 1; + } else { + mPointsMap[a]++; + } +} + +void Stack::AddPoint(DetectorId detId, Int_t iTrack) +{ + if (iTrack < 0) { + return; + } + Int_t iDet = detId; + pair a(iTrack, iDet); + if (mPointsMap.find(a) == mPointsMap.end()) { + mPointsMap[a] = 1; + } else { + mPointsMap[a]++; + } +} + +Int_t Stack::GetCurrentParentTrackNumber() const +{ + TParticle* currentPart = GetCurrentTrack(); + if (currentPart) { + return currentPart->GetFirstMother(); + } else { + return -1; + } +} + +TParticle* Stack::GetParticle(Int_t trackID) const +{ + if (trackID < 0 || trackID >= mNumberOfEntriesInParticles) { + mLogger->Debug(MESSAGE_ORIGIN, "Stack: Particle index %i out of range.", trackID); + Fatal("Stack::GetParticle", "Index out of range"); + } + return (TParticle*)mParticles->At(trackID); +} + +void Stack::SelectTracks() +{ + + // Clear storage map + mStoreMap.clear(); + + // Check particles in the fParticle array + for (Int_t i = 0; i < mNumberOfEntriesInParticles; i++) { + + TParticle* thisPart = GetParticle(i); + Bool_t store = kTRUE; + + // Get track parameters + Int_t iMother = thisPart->GetMother(0); + TLorentzVector p; + thisPart->Momentum(p); + Double_t energy = p.E(); + Double_t mass = p.M(); + // Double_t mass = thisPart->GetMass(); + Double_t eKin = energy - mass; + + // Calculate number of points + Int_t nPoints = 0; + for (Int_t iDet = kAliIts; iDet < kSTOPHERE; iDet++) { + pair a(i, iDet); + if (mPointsMap.find(a) != mPointsMap.end()) { + nPoints += mPointsMap[a]; + } + } + + // Check for cuts (store primaries in any case) + if (iMother < 0) { + store = kTRUE; + } else { + if (!mStoreSecondaries) { + store = kFALSE; + } + if (nPoints < mMinPoints) { + store = kFALSE; + } + if (eKin < mEnergyCut) { + store = kFALSE; + } + } + + // Set storage flag + mStoreMap[i] = store; + } + + // If flag is set, flag recursively mothers of selected tracks + if (mStoreMothers) { + for (Int_t i = 0; i < mNumberOfEntriesInParticles; i++) { + if (mStoreMap[i]) { + Int_t iMother = GetParticle(i)->GetMother(0); + while (iMother >= 0) { + mStoreMap[iMother] = kTRUE; + iMother = GetParticle(iMother)->GetMother(0); + } + } + } + } +} + +ClassImp(AliceO2::Data::Stack) diff --git a/Data/Stack.h b/Data/Stack.h new file mode 100644 index 0000000000000..984f57d8e7e96 --- /dev/null +++ b/Data/Stack.h @@ -0,0 +1,228 @@ +/// \file Stack.h +/// \brief Definition of the Stack class +/// \author M. Al-Turany - June 2014 + +#ifndef ALICEO2_DATA_STACK_H_ +#define ALICEO2_DATA_STACK_H_ + +#include "FairGenericStack.h" + +#include "DetectorList.h" + +#include "Rtypes.h" +#include "TMCProcess.h" + +#include +#include +#include + +class TClonesArray; +class TParticle; +class TRefArray; +class FairLogger; + +namespace AliceO2 { +namespace Data { + +/// This class handles the particle stack for the transport simulation. +/// For the stack FILO functunality, it uses the STL stack. To store +/// the tracks during transport, a TParticle array is used. +/// At the end of the event, tracks satisfying the filter criteria +/// are copied to a MCTrack array, which is stored in the output. +/// +/// The filtering criteria for the output tracks are: +/// - primary tracks are stored in any case. +/// - secondary tracks are stored if they have a minimal number of +/// points (sum of all detectors) and a minimal energy, or are the +/// +/// The storage of secondaries can be switched off. +/// The storage of all mothers can be switched off. +/// By default, the minimal number of points is 1 and the energy cut is 0. +class Stack : public FairGenericStack { + +public: + /// Default constructor + /// \param size Estimated track number + Stack(Int_t size = 100); + + /// Default destructor + virtual ~Stack(); + + /// Add a TParticle to the stack. + /// Declared in TVirtualMCStack + /// \param toBeDone Flag for tracking + /// \param parentID Index of mother particle + /// \param pdgCode Particle type (PDG encoding) + /// \param px,py,pz Momentum components at start vertex [GeV] + /// \param e Total energy at start vertex [GeV] + /// \param vx,vy,vz Coordinates of start vertex [cm] + /// \param time Start time of track [s] + /// \param polx,poly,polz Polarisation vector + /// \param proc Production mechanism (VMC encoding) + /// \param ntr Track number (filled by the stack) + /// \param weight Particle weight + /// \param is Generation status code (whatever that means) + virtual void PushTrack(Int_t toBeDone, Int_t parentID, Int_t pdgCode, Double_t px, Double_t py, + Double_t pz, Double_t e, Double_t vx, Double_t vy, Double_t vz, + Double_t time, Double_t polx, Double_t poly, Double_t polz, + TMCProcess proc, Int_t& ntr, Double_t weight, Int_t is); + + virtual void PushTrack(Int_t toBeDone, Int_t parentID, Int_t pdgCode, Double_t px, Double_t py, + Double_t pz, Double_t e, Double_t vx, Double_t vy, Double_t vz, + Double_t time, Double_t polx, Double_t poly, Double_t polz, + TMCProcess proc, Int_t& ntr, Double_t weight, Int_t is, + Int_t secondParentId); + + /// Get next particle for tracking from the stack. + /// Declared in TVirtualMCStack + /// Returns a pointer to the TParticle of the track + /// \param iTrack index of popped track (return) + virtual TParticle* PopNextTrack(Int_t& iTrack); + + /// Get primary particle by index for tracking from stack + /// Declared in TVirtualMCStack + /// Returns a pointer to the TParticle of the track + /// \param iPrim index of primary particle + virtual TParticle* PopPrimaryForTracking(Int_t iPrim); + + /// Set the current track number + /// Declared in TVirtualMCStack + /// \param iTrack track number + virtual void SetCurrentTrack(Int_t iTrack) + { + mIndexOfCurrentTrack = iTrack; + } + + /// Get total number of tracks + /// Declared in TVirtualMCStack + virtual Int_t GetNtrack() const + { + return mNumberOfEntriesInParticles; + } + + /// Get number of primary tracks + /// Declared in TVirtualMCStack + virtual Int_t GetNprimary() const + { + return mNumberOfPrimaryParticles; + } + + /// Get the current track's particle + /// Declared in TVirtualMCStack + virtual TParticle* GetCurrentTrack() const; + + /// Get the number of the current track + /// Declared in TVirtualMCStack + virtual Int_t GetCurrentTrackNumber() const + { + return mIndexOfCurrentTrack; + } + + /// Get the track number of the parent of the current track + /// Declared in TVirtualMCStack + virtual Int_t GetCurrentParentTrackNumber() const; + + /// Add a TParticle to the mParticles array + virtual void AddParticle(TParticle* part); + + /// Fill the MCTrack output array, applying filter criteria + virtual void FillTrackArray(); + + /// Update the track index in the MCTracks and MCPoints + virtual void UpdateTrackIndex(TRefArray* detArray = 0); + + /// Resets arrays and stack and deletes particles and tracks + virtual void Reset(); + + /// Register the MCTrack array to the Root Manager + virtual void Register(); + + /// Output to screen + /// \param iVerbose: 0=events summary, 1=track info + + virtual void Print(Int_t iVerbose = 0) const; + + /// Modifiers + void StoreSecondaries(Bool_t choice = kTRUE) + { + mStoreSecondaries = choice; + } + void SetMinPoints(Int_t min) + { + mMinPoints = min; + } + void SetEnergyCut(Double_t eMin) + { + mEnergyCut = eMin; + } + void StoreMothers(Bool_t choice = kTRUE) + { + mStoreMothers = choice; + } + + /// Increment number of points for the current track in a given detector + /// \param iDet Detector unique identifier + + void AddPoint(DetectorId iDet); + + /// Increment number of points for an arbitrary track in a given detector + /// \param iDet Detector unique identifier + /// \param iTrack Track number + void AddPoint(DetectorId iDet, Int_t iTrack); + + /// Accessors + TParticle* GetParticle(Int_t trackId) const; + TClonesArray* GetListOmParticles() + { + return mParticles; + } + +private: + FairLogger* mLogger; + + /// STL stack (FILO) used to handle the TParticles for tracking + std::stack mStack; + + /// Array of TParticles (contains all TParticles put into or created + /// by the transport + TClonesArray* mParticles; + + /// Array of FairMCTracks containg the tracks written to the output + TClonesArray* mTracks; + + /// STL map from particle index to storage flag + std::map mStoreMap; + std::map::iterator mStoreIterator; + + /// STL map from particle index to track index + std::map mIndexMap; + std::map::iterator mIndexIterator; + + /// STL map from track index and detector ID to number of MCPoints + std::map, Int_t> mPointsMap; + + /// Some indices and counters + Int_t mIndexOfCurrentTrack; ///< Index of current track + Int_t mNumberOfPrimaryParticles; ///< Number of primary particles + Int_t mNumberOfEntriesInParticles; ///< Number of entries in mParticles + Int_t mNumberOfEntriesInTracks; ///< Number of entries in mTracks + Int_t mIndex; ///< Used for merging + + /// Variables defining the criteria for output selection + Bool_t mStoreMothers; + Bool_t mStoreSecondaries; + Int_t mMinPoints; + Double32_t mEnergyCut; + + /// Mark tracks for output using selection criteria + void SelectTracks(); + + Stack(const Stack&); + Stack& operator=(const Stack&); + + ClassDef(Stack, 1) +}; +} +} + +#endif diff --git a/AliGenerators/CMakeLists.txt b/Generators/CMakeLists.txt similarity index 72% rename from AliGenerators/CMakeLists.txt rename to Generators/CMakeLists.txt index 75845e1b06e28..806ac16804ed6 100644 --- a/AliGenerators/CMakeLists.txt +++ b/Generators/CMakeLists.txt @@ -3,13 +3,11 @@ # The extension is already found. Any number of sources could be listed here. set(INCLUDE_DIRECTORIES -${ROOT_INCLUDE_DIR} +${ROOT_INCLUDE_DIR} ${PYTHIA8_INCLUDE_DIR} ${SIMPATH}/include -${BASE_INCLUDE_DIRECTORIES} -${CMAKE_SOURCE_DIR}/AliGenerators -${CMAKE_SOURCE_DIR}/generators - +${BASE_INCLUDE_DIRECTORIES} +${CMAKE_SOURCE_DIR}/Generators ) include_directories( ${INCLUDE_DIRECTORIES}) @@ -19,7 +17,7 @@ ${ROOT_LIBRARY_DIR} ${FAIRROOT_LIBRARY_DIR} ${SIMPATH}/lib ) - + link_directories( ${LINK_DIRECTORIES}) set(SRCS @@ -27,9 +25,9 @@ Pythia6Generator.cxx Pythia8Generator.cxx ) -set(LINKDEF GenLinkDef.h) +set(LINKDEF GeneratorsLinkDef.h) set(LIBRARY_NAME AliGen) -set(DEPENDENCIES Base AliData pythia8 Pythia6) +set(DEPENDENCIES Base AliceO2Data pythia8 Pythia6) GENERATE_LIBRARY() diff --git a/AliGenerators/GenLinkDef.h b/Generators/GeneratorsLinkDef.h similarity index 100% rename from AliGenerators/GenLinkDef.h rename to Generators/GeneratorsLinkDef.h diff --git a/AliGenerators/Pythia6Generator.cxx b/Generators/Pythia6Generator.cxx similarity index 100% rename from AliGenerators/Pythia6Generator.cxx rename to Generators/Pythia6Generator.cxx diff --git a/AliGenerators/Pythia6Generator.h b/Generators/Pythia6Generator.h similarity index 100% rename from AliGenerators/Pythia6Generator.h rename to Generators/Pythia6Generator.h diff --git a/AliGenerators/Pythia8Generator.cxx b/Generators/Pythia8Generator.cxx similarity index 100% rename from AliGenerators/Pythia8Generator.cxx rename to Generators/Pythia8Generator.cxx diff --git a/AliGenerators/Pythia8Generator.h b/Generators/Pythia8Generator.h similarity index 100% rename from AliGenerators/Pythia8Generator.h rename to Generators/Pythia8Generator.h diff --git a/AliGenerators/rename.sh b/Generators/rename.sh old mode 100755 new mode 100644 similarity index 100% rename from AliGenerators/rename.sh rename to Generators/rename.sh diff --git a/gconfig/g3Config.C b/gconfig/g3Config.C index e3ebf681e86f4..c8e96e0b714e6 100755 --- a/gconfig/g3Config.C +++ b/gconfig/g3Config.C @@ -8,7 +8,7 @@ // $Id: g3Config.C,v 1.1.1.1 2005/06/23 07:14:09 dbertini Exp $ // -// Configuration macro for Geant3 VirtualMC +// Configuration macro for Geant3 VirtualMC void Config() { @@ -27,7 +27,7 @@ void Config() << endl; } // create Fair Specific Stack - AliStack *st = new AliStack(); + AliceO2::Data::Stack *st = new AliceO2::Data::Stack(); st->SetMinPoints(0); st->StoreSecondaries(kTRUE); geant3->SetStack( st ) ; @@ -36,7 +36,7 @@ void Config() geant3->SetTRIG(1); //Number of events to be processed geant3->SetSWIT(4, 100); geant3->SetDEBU(0, 0, 1); - + geant3->SetRAYL(1); geant3->SetSTRA(1); geant3->SetAUTO(0); //Select automatic STMIN etc... calc. (AUTO 1) or manual (AUTO 0) @@ -44,7 +44,7 @@ void Config() geant3->SetOPTI(2); //Select optimisation level for GEANT geometry searches (0,1,2) geant3->SetERAN(5.e-7); geant3->SetCKOV(1); // cerenkov photons - + } diff --git a/gconfig/g4Config.C b/gconfig/g4Config.C index 9f2ca8c44fe4e..fb76be0eeefd7 100755 --- a/gconfig/g4Config.C +++ b/gconfig/g4Config.C @@ -26,25 +26,25 @@ void Config() /// EM = _EMV _EMX _EMY _EMZ _LIV _PEN /// Extra = extra optical radDecay /// The Extra selections are cumulative, while Hadron selections are exlusive. - + /// The third argument activates the special processes in the TG4SpecialPhysicsList, /// which implement VMC features: -/// - stepLimiter - step limiter (default) +/// - stepLimiter - step limiter (default) /// - specialCuts - VMC cuts /// - specialControls - VMC controls for activation/inactivation selected processes /// - stackPopper - stackPopper process /// When more than one options are selected, they should be separated with '+' /// character: eg. stepLimit+specialCuts. - TG4RunConfiguration* runConfiguration + TG4RunConfiguration* runConfiguration = new TG4RunConfiguration("geomRoot", "QGSP_FTFP_BERT", "stepLimiter+specialCuts+specialControls+stackPopper"); -/// Create the G4 VMC +/// Create the G4 VMC TGeant4* geant4 = new TGeant4("TGeant4", "The Geant4 Monte Carlo", runConfiguration); cout << "Geant4 has been created." << endl; /// create the Specific stack - AliStack *stack = new AliStack(1000); + AliceO2::Data::Stack *stack = new AliceO2::Data::Stack(1000); stack->StoreSecondaries(kTRUE); stack->SetMinPoints(0); geant4->SetStack(stack); @@ -53,7 +53,7 @@ void Config() TVirtualMCDecayer* decayer = TPythia6Decayer::Instance(); geant4->SetExternalDecayer(decayer); } - + /// Customise Geant4 setting /// (verbose level, global range cut, ..) diff --git a/its/CMakeLists.txt b/its/CMakeLists.txt index 0beca0800a3d3..3e45ced6a2a00 100644 --- a/its/CMakeLists.txt +++ b/its/CMakeLists.txt @@ -1,13 +1,7 @@ -# Create a library called "libO2its" which includes the source files given in -# the array . -# The extension is already found. Any number of sources could be listed here. - set(INCLUDE_DIRECTORIES ${ROOT_INCLUDE_DIR} ${BASE_INCLUDE_DIRECTORIES} - -${CMAKE_SOURCE_DIR}/AliData -${CMAKE_SOURCE_DIR}/AliBase +${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/its ) @@ -34,8 +28,8 @@ MisalignmentParameter.cxx Point.cxx ) -Set(LINKDEF O2itsLinkDef.h) -Set(LIBRARY_NAME its) +Set(LINKDEF itsLinkDef.h) +Set(LIBRARY_NAME AliceO2its) Set(DEPENDENCIES Base ) diff --git a/its/ContainerFactory.cxx b/its/ContainerFactory.cxx index b82a54e215696..f5f117c6a6809 100644 --- a/its/ContainerFactory.cxx +++ b/its/ContainerFactory.cxx @@ -8,12 +8,11 @@ using namespace AliceO2::ITS; -ClassImp(ContainerFactory) +ClassImp(AliceO2::ITS::ContainerFactory) static ContainerFactory gO2itsContFact; -ContainerFactory::ContainerFactory() - : FairContFact() +ContainerFactory::ContainerFactory() : FairContFact() { fName = "ContainerFactory"; fTitle = "Factory for parameter containers in libO2its"; @@ -23,22 +22,21 @@ ContainerFactory::ContainerFactory() void ContainerFactory::mSetAllContainers() { - //FairContainer* p= new FairContainer("O2itsGeoPar", + // FairContainer* p= new FairContainer("O2itsGeoPar", // "O2its Geometry Parameters", // "TestDefaultContext"); - //p->addContext("TestNonDefaultContext"); + // p->addContext("TestNonDefaultContext"); // - //containers->Add(p); - + // containers->Add(p); } FairParSet* ContainerFactory::createContainer(FairContainer* c) { - //const char* name=c->GetName(); - //FairParSet* p=NULL; - //if (strcmp(name,"O2itsGeoPar")==0) { - // p=new O2itsGeoPar(c->getConcatName().Data(), - // c->GetTitle(),c->getContext()); - //} - //return p; + // const char* name=c->GetName(); + // FairParSet* p=NULL; + // if (strcmp(name,"O2itsGeoPar")==0) { + // p=new O2itsGeoPar(c->getConcatName().Data(), + // c->GetTitle(),c->getContext()); + //} + // return p; } diff --git a/its/ContainerFactory.h b/its/ContainerFactory.h index 6b4f4d64b7702..7dc11bbf73b9c 100644 --- a/its/ContainerFactory.h +++ b/its/ContainerFactory.h @@ -1,4 +1,4 @@ -/// \file GeometryHandler.h +/// \file ContainerFactory.h /// \brief Definition of the ContainerFactory class #ifndef ALICEO2_ITS_CONTAINERFACTORY_H_ diff --git a/its/Detector.cxx b/its/Detector.cxx index da9bedd716a39..908648794d957 100644 --- a/its/Detector.cxx +++ b/its/Detector.cxx @@ -3,8 +3,12 @@ #include "Detector.h" -#include "AliDetectorList.h" -#include "AliStack.h" +#include "Point.h" +#include "UpgradeV1Layer.h" +#include "UpgradeGeometryTGeo.h" + +#include "Data/DetectorList.h" +#include "Data/Stack.h" #include "FairVolume.h" #include "FairGeoVolume.h" @@ -15,10 +19,6 @@ #include "FairRun.h" #include "FairRuntimeDb.h" -#include "Point.h" -#include "UpgradeV1Layer.h" -#include "UpgradeGeometryTGeo.h" - #include "TClonesArray.h" #include "TGeoManager.h" #include "TGeoTube.h" @@ -34,103 +34,102 @@ using std::endl; using namespace AliceO2::ITS; AliceO2::ITS::Detector::Detector() - : O2Detector("ITS", kTRUE, kAliIts) - , mLayerID(0) - , mTrackNumberID(-1) - , mVolumeID(-1) - , mEntrancePosition() - , mPosition() - , mMomentum() - , mEntranceTime(-1.) - , mTime(-1.) - , mLength(-1.) - , mEnergyLoss(-1) - , mShunt() - , mPointCollection(new TClonesArray("AliceO2::ITS::Point")) - , mGeometryHandler(new GeometryHandler()) - , mMisalignmentParameter(NULL) - , mNumberOfDetectors(-1) - , mShiftX() - , mShiftY() - , mShiftZ() - , mRotX() - , mRotY() - , mRotZ() - , mModifyGeometry(kFALSE) - , mNumberOfWrapperVolumes(0) - , mWrapperMinRadius(0) - , mWrapperMaxRadius(0) - , mWrapperZSpan(0) - , mWrapperLayerId(0) - , mTurboLayer(0) - , mLayerPhi0(0) - , mLayerRadii(0) - , mLayerZLength(0) - , mStavePerLayer(0) - , mUnitPerStave(0) - , mStaveThickness(0) - , mStaveWidth(0) - , mStaveTilt(0) - , mDetectorThickness(0) - , mChipTypeID(0) - , mBuildLevel(0) - , mUpgradeGeometry(0) - , mStaveModelInnerBarrel(kIBModel0) - , mStaveModelOuterBarrel(kOBModel0) + : AliceO2::Base::Detector("ITS", kTRUE, kAliIts), + mLayerID(0), + mTrackNumberID(-1), + mVolumeID(-1), + mEntrancePosition(), + mPosition(), + mMomentum(), + mEntranceTime(-1.), + mTime(-1.), + mLength(-1.), + mEnergyLoss(-1), + mShunt(), + mPointCollection(new TClonesArray("AliceO2::ITS::Point")), + mGeometryHandler(new GeometryHandler()), + mMisalignmentParameter(NULL), + mNumberOfDetectors(-1), + mShiftX(), + mShiftY(), + mShiftZ(), + mRotX(), + mRotY(), + mRotZ(), + mModifyGeometry(kFALSE), + mNumberOfWrapperVolumes(0), + mWrapperMinRadius(0), + mWrapperMaxRadius(0), + mWrapperZSpan(0), + mWrapperLayerId(0), + mTurboLayer(0), + mLayerPhi0(0), + mLayerRadii(0), + mLayerZLength(0), + mStavePerLayer(0), + mUnitPerStave(0), + mStaveThickness(0), + mStaveWidth(0), + mStaveTilt(0), + mDetectorThickness(0), + mChipTypeID(0), + mBuildLevel(0), + mUpgradeGeometry(0), + mStaveModelInnerBarrel(kIBModel0), + mStaveModelOuterBarrel(kOBModel0) { } -AliceO2::ITS::Detector::Detector(const char* name, Bool_t active, const Int_t layerNumber) - : O2Detector(name, active, kAliIts) - , mLayerID(0) - , mTrackNumberID(-1) - , mVolumeID(-1) - , mEntrancePosition() - , mPosition() - , mMomentum() - , mEntranceTime(-1.) - , mTime(-1.) - , mLength(-1.) - , mEnergyLoss(-1) - , mShunt() - , mPointCollection(new TClonesArray("AliceO2::ITS::Point")) - , mGeometryHandler(new GeometryHandler()) - , mMisalignmentParameter(NULL) - , mNumberOfDetectors(-1) - , mShiftX() - , mShiftY() - , mShiftZ() - , mRotX() - , mRotY() - , mRotZ() - , mModifyGeometry(kFALSE) - , mNumberOfWrapperVolumes(0) - , mWrapperMinRadius(0) - , mWrapperMaxRadius(0) - , mWrapperZSpan(0) - , mWrapperLayerId(0) - , mTurboLayer(0) - , mLayerPhi0(0) - , mLayerRadii(0) - , mLayerZLength(0) - , mStavePerLayer(0) - , mUnitPerStave(0) - , mStaveThickness(0) - , mStaveWidth(0) - , mStaveTilt(0) - , mDetectorThickness(0) - , mChipTypeID(0) - , mBuildLevel(0) - , mUpgradeGeometry(0) - , mNumberLayers(layerNumber) - , mStaveModelInnerBarrel(kIBModel0) - , mStaveModelOuterBarrel(kOBModel0) +AliceO2::ITS::Detector::Detector(const char* name, Bool_t active, const Int_t nlay) + : AliceO2::Base::Detector(name, active, kAliIts), + mLayerID(0), + mTrackNumberID(-1), + mVolumeID(-1), + mEntrancePosition(), + mPosition(), + mMomentum(), + mEntranceTime(-1.), + mTime(-1.), + mLength(-1.), + mEnergyLoss(-1), + mShunt(), + mPointCollection(new TClonesArray("AliceO2::ITS::Point")), + mGeometryHandler(new GeometryHandler()), + mMisalignmentParameter(NULL), + mNumberOfDetectors(-1), + mShiftX(), + mShiftY(), + mShiftZ(), + mRotX(), + mRotY(), + mRotZ(), + mModifyGeometry(kFALSE), + mNumberOfWrapperVolumes(0), + mWrapperMinRadius(0), + mWrapperMaxRadius(0), + mWrapperZSpan(0), + mWrapperLayerId(0), + mTurboLayer(0), + mLayerPhi0(0), + mLayerRadii(0), + mLayerZLength(0), + mStavePerLayer(0), + mUnitPerStave(0), + mStaveThickness(0), + mStaveWidth(0), + mStaveTilt(0), + mDetectorThickness(0), + mChipTypeID(0), + mBuildLevel(0), + mUpgradeGeometry(0), + mNumberLayers(nlay), + mStaveModelInnerBarrel(kIBModel0), + mStaveModelOuterBarrel(kOBModel0) { mLayerName = new TString[mNumberLayers]; - for (Int_t j = 0; j < mNumberLayers; j++) { + for (Int_t j = 0; j < mNumberLayers; j++) mLayerName[j].Form("%s%d", UpgradeGeometryTGeo::GetITSSensorPattern(), j); // See UpgradeV1Layer - } mTurboLayer = new Bool_t[mNumberLayers]; mLayerPhi0 = new Double_t[mNumberLayers]; @@ -239,7 +238,7 @@ void AliceO2::ITS::Detector::Initialize() void AliceO2::ITS::Detector::InitParameterContainers() { - LOG(INFO) << "Initialize ITS misalignment parameters" << FairLogger::endl; + LOG(INFO) << "Initialize aliitsdet misallign parameters" << FairLogger::endl; mNumberOfDetectors = mMisalignmentParameter->GetNumberOfDetectors(); mShiftX = mMisalignmentParameter->GetShiftX(); mShiftY = mMisalignmentParameter->GetShiftY(); @@ -251,15 +250,14 @@ void AliceO2::ITS::Detector::InitParameterContainers() void AliceO2::ITS::Detector::SetParameterContainers() { - LOG(INFO) << "Set ITS misalignment parameters" << FairLogger::endl; - + LOG(INFO) << "Set tutdet misallign parameters" << FairLogger::endl; // Get Base Container FairRun* sim = FairRun::Instance(); LOG_IF(FATAL, !sim) << "No run object" << FairLogger::endl; FairRuntimeDb* rtdb = sim->GetRuntimeDb(); LOG_IF(FATAL, !rtdb) << "No runtime database" << FairLogger::endl; - mMisalignmentParameter = (MisalignmentParameter*)(rtdb->getContainer("MisalignmentParameter")); + mMisalignmentParameter = (MisalignmentParameter*)(rtdb->getContainer("MisallignmentParameter")); } Bool_t AliceO2::ITS::Detector::ProcessHits(FairVolume* vol) @@ -283,7 +281,7 @@ Bool_t AliceO2::ITS::Detector::ProcessHits(FairVolume* vol) // FIXME: Is it needed to keep a track reference when the outer ITS volume is encountered? // if(gMC->IsTrackExiting()) { // AddTrackReference(gAlice->GetMCApp()->GetCurrentTrackNumber(), AliTrackReference::kITS); - // } + // } // if Outer ITS mother Volume // Retrieve the indices with the volume path copy = 1; @@ -320,7 +318,7 @@ Bool_t AliceO2::ITS::Detector::ProcessHits(FairVolume* vol) mEnergyLoss, mShunt); // Increment number of Detector det points in TParticle - AliStack* stack = (AliStack*)gMC->GetStack(); + AliceO2::Data::Stack* stack = (AliceO2::Data::Stack*)gMC->GetStack(); stack->AddPoint(kAliIts); // Save old position for the next hit. @@ -375,52 +373,66 @@ void AliceO2::ITS::Detector::CreateMaterials() Float_t wKapton[4] = { 0.026362, 0.69113, 0.07327, 0.209235 }; Float_t dKapton = 1.42; - AliMixture(1, "AIR$", aAir, zAir, dAir, 4, wAir); - AliMedium(1, "AIR$", 1, 0, ifield, fieldm, tmaxfdAir, stemaxAir, deemaxAir, epsilAir, stminAir); + AliceO2::Base::Detector::Mixture(1, "AIR$", aAir, zAir, dAir, 4, wAir); + AliceO2::Base::Detector::Medium(1, "AIR$", 1, 0, ifield, fieldm, tmaxfdAir, stemaxAir, deemaxAir, + epsilAir, stminAir); - AliMixture(2, "WATER$", aWater, zWater, dWater, 2, wWater); - AliMedium(2, "WATER$", 2, 0, ifield, fieldm, tmaxfd, stemax, deemax, epsil, stmin); + AliceO2::Base::Detector::Mixture(2, "WATER$", aWater, zWater, dWater, 2, wWater); + AliceO2::Base::Detector::Medium(2, "WATER$", 2, 0, ifield, fieldm, tmaxfd, stemax, deemax, epsil, + stmin); - AliMaterial(3, "SI$", 0.28086E+02, 0.14000E+02, 0.23300E+01, 0.93600E+01, 0.99900E+03); - AliMedium(3, "SI$", 3, 0, ifield, fieldm, tmaxfdSi, stemaxSi, deemaxSi, epsilSi, stminSi); + AliceO2::Base::Detector::Material(3, "SI$", 0.28086E+02, 0.14000E+02, 0.23300E+01, 0.93600E+01, + 0.99900E+03); + AliceO2::Base::Detector::Medium(3, "SI$", 3, 0, ifield, fieldm, tmaxfdSi, stemaxSi, deemaxSi, + epsilSi, stminSi); - AliMaterial(4, "BERILLIUM$", 9.01, 4., 1.848, 35.3, 36.7); // From AliPIPEv3 - AliMedium(4, "BERILLIUM$", 4, 0, ifield, fieldm, tmaxfd, stemax, deemax, epsil, stmin); + AliceO2::Base::Detector::Material(4, "BERILLIUM$", 9.01, 4., 1.848, 35.3, 36.7); // From AliPIPEv3 + AliceO2::Base::Detector::Medium(4, "BERILLIUM$", 4, 0, ifield, fieldm, tmaxfd, stemax, deemax, + epsil, stmin); - AliMaterial(5, "COPPER$", 0.63546E+02, 0.29000E+02, 0.89600E+01, 0.14300E+01, 0.99900E+03); - AliMedium(5, "COPPER$", 5, 0, ifield, fieldm, tmaxfd, stemax, deemax, epsil, stmin); + AliceO2::Base::Detector::Material(5, "COPPER$", 0.63546E+02, 0.29000E+02, 0.89600E+01, + 0.14300E+01, 0.99900E+03); + AliceO2::Base::Detector::Medium(5, "COPPER$", 5, 0, ifield, fieldm, tmaxfd, stemax, deemax, epsil, + stmin); // needed for STAVE , Carbon, kapton, Epoxy, flexcable - // AliMaterial(6,"CARBON$",12.0107,6,2.210,999,999); - AliMaterial(6, "CARBON$", 12.0107, 6, 2.210 / 1.3, 999, 999); - AliMedium(6, "CARBON$", 6, 0, ifield, fieldm, tmaxfdSi, stemaxSi, deemaxSi, epsilSi, stminSi); + // AliceO2::Base::Detector::Material(6,"CARBON$",12.0107,6,2.210,999,999); + AliceO2::Base::Detector::Material(6, "CARBON$", 12.0107, 6, 2.210 / 1.3, 999, 999); + AliceO2::Base::Detector::Medium(6, "CARBON$", 6, 0, ifield, fieldm, tmaxfdSi, stemaxSi, deemaxSi, + epsilSi, stminSi); - AliMixture(7, "KAPTON(POLYCH2)$", aKapton, zKapton, dKapton, 4, wKapton); - AliMedium(7, "KAPTON(POLYCH2)$", 7, 0, ifield, fieldm, tmaxfd, stemax, deemax, epsil, stmin); + AliceO2::Base::Detector::Mixture(7, "KAPTON(POLYCH2)$", aKapton, zKapton, dKapton, 4, wKapton); + AliceO2::Base::Detector::Medium(7, "KAPTON(POLYCH2)$", 7, 0, ifield, fieldm, tmaxfd, stemax, + deemax, epsil, stmin); // values below modified as compared to source AliITSv11 ! // All types of carbon // Unidirectional prepreg - AliMaterial(8, "K13D2U2k$", 12.0107, 6, 1.643, 999, 999); - AliMedium(8, "K13D2U2k$", 8, 0, ifield, fieldm, tmaxfdSi, stemaxSi, deemaxSi, epsilSi, stminSi); + AliceO2::Base::Detector::Material(8, "K13D2U2k$", 12.0107, 6, 1.643, 999, 999); + AliceO2::Base::Detector::Medium(8, "K13D2U2k$", 8, 0, ifield, fieldm, tmaxfdSi, stemaxSi, + deemaxSi, epsilSi, stminSi); // Impregnated thread - AliMaterial(9, "M60J3K$", 12.0107, 6, 2.21, 999, 999); - AliMedium(9, "M60J3K$", 9, 0, ifield, fieldm, tmaxfdSi, stemaxSi, deemaxSi, epsilSi, stminSi); + AliceO2::Base::Detector::Material(9, "M60J3K$", 12.0107, 6, 2.21, 999, 999); + AliceO2::Base::Detector::Medium(9, "M60J3K$", 9, 0, ifield, fieldm, tmaxfdSi, stemaxSi, deemaxSi, + epsilSi, stminSi); // Impregnated thread - AliMaterial(10, "M55J6K$", 12.0107, 6, 1.63, 999, 999); - AliMedium(10, "M55J6K$", 10, 0, ifield, fieldm, tmaxfdSi, stemaxSi, deemaxSi, epsilSi, stminSi); + AliceO2::Base::Detector::Material(10, "M55J6K$", 12.0107, 6, 1.63, 999, 999); + AliceO2::Base::Detector::Medium(10, "M55J6K$", 10, 0, ifield, fieldm, tmaxfdSi, stemaxSi, + deemaxSi, epsilSi, stminSi); // Fabric(0/90) - AliMaterial(11, "T300$", 12.0107, 6, 1.725, 999, 999); - AliMedium(11, "T300$", 11, 0, ifield, fieldm, tmaxfdSi, stemaxSi, deemaxSi, epsilSi, stminSi); + AliceO2::Base::Detector::Material(11, "T300$", 12.0107, 6, 1.725, 999, 999); + AliceO2::Base::Detector::Medium(11, "T300$", 11, 0, ifield, fieldm, tmaxfdSi, stemaxSi, deemaxSi, + epsilSi, stminSi); // AMEC Thermasol - AliMaterial(12, "FGS003$", 12.0107, 6, 1.6, 999, 999); - AliMedium(12, "FGS003$", 12, 0, ifield, fieldm, tmaxfdSi, stemaxSi, deemaxSi, epsilSi, stminSi); + AliceO2::Base::Detector::Material(12, "FGS003$", 12.0107, 6, 1.6, 999, 999); + AliceO2::Base::Detector::Medium(12, "FGS003$", 12, 0, ifield, fieldm, tmaxfdSi, stemaxSi, + deemaxSi, epsilSi, stminSi); // Carbon fleece - AliMaterial(13, "CarbonFleece$", 12.0107, 6, 0.4, 999, 999); - AliMedium(13, "CarbonFleece$", 13, 0, ifield, fieldm, tmaxfdSi, stemaxSi, deemaxSi, epsilSi, - stminSi); + AliceO2::Base::Detector::Material(13, "CarbonFleece$", 12.0107, 6, 0.4, 999, 999); + AliceO2::Base::Detector::Medium(13, "CarbonFleece$", 13, 0, ifield, fieldm, tmaxfdSi, stemaxSi, + deemaxSi, epsilSi, stminSi); // Flex cable Float_t aFCm[5] = { 12.0107, 1.00794, 14.0067, 15.9994, 26.981538 }; @@ -430,16 +442,21 @@ void AliceO2::ITS::Detector::CreateMaterials() // Float_t dFCm = 2.55; // conform with STAR Float_t dFCm = 2.595; // conform with Corrado - AliMixture(14, "FLEXCABLE$", aFCm, zFCm, dFCm, 5, wFCm); - AliMedium(14, "FLEXCABLE$", 14, 0, ifield, fieldm, tmaxfd, stemax, deemax, epsil, stmin); - - // AliMaterial(7,"GLUE$",0.12011E+02,0.60000E+01,0.1930E+01/2.015,999,999); // original - AliMaterial(15, "GLUE$", 12.011, 6, 1.93 / 2.015, 999, - 999); // conform with ATLAS, Corrado, Stefan - AliMedium(15, "GLUE$", 15, 0, ifield, fieldm, tmaxfd, stemax, deemax, epsil, stmin); - - AliMaterial(16, "ALUMINUM$", 0.26982E+02, 0.13000E+02, 0.26989E+01, 0.89000E+01, 0.99900E+03); - AliMedium(16, "ALUMINUM$", 16, 0, ifield, fieldm, tmaxfd, stemax, deemax, epsil, stmin); + AliceO2::Base::Detector::Mixture(14, "FLEXCABLE$", aFCm, zFCm, dFCm, 5, wFCm); + AliceO2::Base::Detector::Medium(14, "FLEXCABLE$", 14, 0, ifield, fieldm, tmaxfd, stemax, deemax, + epsil, stmin); + + // AliceO2::Base::Detector::Material(7,"GLUE$",0.12011E+02,0.60000E+01,0.1930E+01/2.015,999,999); + // // original + AliceO2::Base::Detector::Material(15, "GLUE$", 12.011, 6, 1.93 / 2.015, 999, + 999); // conform with ATLAS, Corrado, Stefan + AliceO2::Base::Detector::Medium(15, "GLUE$", 15, 0, ifield, fieldm, tmaxfd, stemax, deemax, epsil, + stmin); + + AliceO2::Base::Detector::Material(16, "ALUMINUM$", 0.26982E+02, 0.13000E+02, 0.26989E+01, + 0.89000E+01, 0.99900E+03); + AliceO2::Base::Detector::Medium(16, "ALUMINUM$", 16, 0, ifield, fieldm, tmaxfd, stemax, deemax, + epsil, stmin); } void AliceO2::ITS::Detector::EndOfEvent() @@ -447,10 +464,12 @@ void AliceO2::ITS::Detector::EndOfEvent() mPointCollection->Clear(); } -/// Creates a branch in the output tree called Point. Setting the last parameter to kFALSE means -/// that this collection will not be written to the file, it will exist only during the simulation void AliceO2::ITS::Detector::Register() { + // This will create a branch in the output tree called Point, setting the last + // parameter to kFALSE means that this collection will not be written to the file, + // it will exist only during the simulation + FairRootManager::Instance()->Register("AliceO2::ITS::Point", "ITS", mPointCollection, kTRUE); } @@ -458,8 +477,7 @@ TClonesArray* AliceO2::ITS::Detector::GetCollection(Int_t iColl) const { if (iColl == 0) { return mPointCollection; - } - else { + } else { return NULL; } } @@ -490,8 +508,8 @@ void AliceO2::ITS::Detector::SetNumberOfWrapperVolumes(Int_t n) } } -void AliceO2::ITS::Detector::DefineWrapVolume(Int_t id, Double_t rmin, Double_t rmax, - Double_t zspan) +void AliceO2::ITS::Detector::DefineWrapperVolume(Int_t id, Double_t rmin, Double_t rmax, + Double_t zspan) { // set parameters of id-th wrapper volume if (id >= mNumberOfWrapperVolumes || id < 0) { @@ -504,91 +522,150 @@ void AliceO2::ITS::Detector::DefineWrapVolume(Int_t id, Double_t rmin, Double_t mWrapperZSpan[id] = zspan; } -void AliceO2::ITS::Detector::DefineLayer(Int_t layerNumber, double phi0, Double_t r, Double_t zlen, +void AliceO2::ITS::Detector::DefineLayer(Int_t nlay, double phi0, Double_t r, Double_t zlen, Int_t nstav, Int_t nunit, Double_t lthick, Double_t dthick, UInt_t dettypeID, Int_t buildLevel) { - LOG(INFO) << "L# " << layerNumber << " Phi:" << phi0 << " R:" << r << " DZ:" << zlen << " Nst:" << nstav + // Sets the layer parameters + // Inputs: + // nlay layer number + // phi0 layer phi0 + // r layer radius + // zlen layer length + // nstav number of staves + // nunit IB: number of chips per stave + // OB: number of modules per half stave + // lthick stave thickness (if omitted, defaults to 0) + // dthick detector thickness (if omitted, defaults to 0) + // dettypeID ?? + // buildLevel (if 0, all geometry is build, used for material budget studies) + // Outputs: + // none. + // Return: + // none. + + LOG(INFO) << "L# " << nlay << " Phi:" << phi0 << " R:" << r << " DZ:" << zlen << " Nst:" << nstav << " Nunit:" << nunit << " Lthick:" << lthick << " Dthick:" << dthick << " DetID:" << dettypeID << " B:" << buildLevel << FairLogger::endl; - if (layerNumber >= mNumberLayers || layerNumber < 0) { - LOG(ERROR) << "Wrong layer number " << layerNumber << FairLogger::endl; + if (nlay >= mNumberLayers || nlay < 0) { + LOG(ERROR) << "Wrong layer number " << nlay << FairLogger::endl; return; } - mTurboLayer[layerNumber] = kFALSE; - mLayerPhi0[layerNumber] = phi0; - mLayerRadii[layerNumber] = r; - mLayerZLength[layerNumber] = zlen; - mStavePerLayer[layerNumber] = nstav; - mUnitPerStave[layerNumber] = nunit; - mStaveThickness[layerNumber] = lthick; - mDetectorThickness[layerNumber] = dthick; - mChipTypeID[layerNumber] = dettypeID; - mBuildLevel[layerNumber] = buildLevel; + mTurboLayer[nlay] = kFALSE; + mLayerPhi0[nlay] = phi0; + mLayerRadii[nlay] = r; + mLayerZLength[nlay] = zlen; + mStavePerLayer[nlay] = nstav; + mUnitPerStave[nlay] = nunit; + mStaveThickness[nlay] = lthick; + mDetectorThickness[nlay] = dthick; + mChipTypeID[nlay] = dettypeID; + mBuildLevel[nlay] = buildLevel; } -void AliceO2::ITS::Detector::DefineLayerTurbo(Int_t layerNumber, Double_t phi0, Double_t r, Double_t zlen, +void AliceO2::ITS::Detector::DefineLayerTurbo(Int_t nlay, Double_t phi0, Double_t r, Double_t zlen, Int_t nstav, Int_t nunit, Double_t width, Double_t tilt, Double_t lthick, Double_t dthick, UInt_t dettypeID, Int_t buildLevel) { - LOG(INFO) << "L# " << layerNumber << " Phi:" << phi0 << " R:" << r << " DZ:" << zlen << " Nst:" << nstav + // Sets the layer parameters for a "turbo" layer + // (i.e. a layer whose staves overlap in phi) + // Inputs: + // nlay layer number + // phi0 phi of 1st stave + // r layer radius + // zlen layer length + // nstav number of staves + // nunit IB: number of chips per stave + // OB: number of modules per half stave + // width stave width + // tilt layer tilt angle (degrees) + // lthick stave thickness (if omitted, defaults to 0) + // dthick detector thickness (if omitted, defaults to 0) + // dettypeID ?? + // buildLevel (if 0, all geometry is build, used for material budget studies) + // Outputs: + // none. + // Return: + // none. + + LOG(INFO) << "L# " << nlay << " Phi:" << phi0 << " R:" << r << " DZ:" << zlen << " Nst:" << nstav << " Nunit:" << nunit << " W:" << width << " Tilt:" << tilt << " Lthick:" << lthick << " Dthick:" << dthick << " DetID:" << dettypeID << " B:" << buildLevel << FairLogger::endl; - if (layerNumber >= mNumberLayers || layerNumber < 0) { - LOG(ERROR) << "Wrong layer number " << layerNumber << FairLogger::endl; + if (nlay >= mNumberLayers || nlay < 0) { + LOG(ERROR) << "Wrong layer number " << nlay << FairLogger::endl; return; } - mTurboLayer[layerNumber] = kTRUE; - mLayerPhi0[layerNumber] = phi0; - mLayerRadii[layerNumber] = r; - mLayerZLength[layerNumber] = zlen; - mStavePerLayer[layerNumber] = nstav; - mUnitPerStave[layerNumber] = nunit; - mStaveThickness[layerNumber] = lthick; - mStaveWidth[layerNumber] = width; - mStaveTilt[layerNumber] = tilt; - mDetectorThickness[layerNumber] = dthick; - mChipTypeID[layerNumber] = dettypeID; - mBuildLevel[layerNumber] = buildLevel; + mTurboLayer[nlay] = kTRUE; + mLayerPhi0[nlay] = phi0; + mLayerRadii[nlay] = r; + mLayerZLength[nlay] = zlen; + mStavePerLayer[nlay] = nstav; + mUnitPerStave[nlay] = nunit; + mStaveThickness[nlay] = lthick; + mStaveWidth[nlay] = width; + mStaveTilt[nlay] = tilt; + mDetectorThickness[nlay] = dthick; + mChipTypeID[nlay] = dettypeID; + mBuildLevel[nlay] = buildLevel; } -void AliceO2::ITS::Detector::GetLayerParameters(Int_t layerNumber, Double_t& phi0, Double_t& r, +void AliceO2::ITS::Detector::GetLayerParameters(Int_t nlay, Double_t& phi0, Double_t& r, Double_t& zlen, Int_t& nstav, Int_t& nmod, Double_t& width, Double_t& tilt, Double_t& lthick, Double_t& dthick, UInt_t& dettype) const { - if (layerNumber >= mNumberLayers || layerNumber < 0) { - LOG(ERROR) << "Wrong layer number " << layerNumber << FairLogger::endl; + // Gets the layer parameters + // Inputs: + // nlay layer number + // Outputs: + // phi0 phi of 1st stave + // r layer radius + // zlen layer length + // nstav number of staves + // nmod IB: number of chips per stave + // OB: number of modules per half stave + // width stave width + // tilt stave tilt angle + // lthick stave thickness + // dthick detector thickness + // dettype detector type + // Return: + // none. + + if (nlay >= mNumberLayers || nlay < 0) { + LOG(ERROR) << "Wrong layer number " << nlay << FairLogger::endl; return; } - phi0 = mLayerPhi0[layerNumber]; - r = mLayerRadii[layerNumber]; - zlen = mLayerZLength[layerNumber]; - nstav = mStavePerLayer[layerNumber]; - nmod = mUnitPerStave[layerNumber]; - width = mStaveWidth[layerNumber]; - tilt = mStaveTilt[layerNumber]; - lthick = mStaveThickness[layerNumber]; - dthick = mDetectorThickness[layerNumber]; - dettype = mChipTypeID[layerNumber]; + phi0 = mLayerPhi0[nlay]; + r = mLayerRadii[nlay]; + zlen = mLayerZLength[nlay]; + nstav = mStavePerLayer[nlay]; + nmod = mUnitPerStave[nlay]; + width = mStaveWidth[nlay]; + tilt = mStaveTilt[nlay]; + lthick = mStaveThickness[nlay]; + dthick = mDetectorThickness[nlay]; + dettype = mChipTypeID[nlay]; } TGeoVolume* AliceO2::ITS::Detector::CreateWrapperVolume(Int_t id) { + // Creates an air-filled wrapper cylindrical volume + if (mWrapperMinRadius[id] < 0 || mWrapperMaxRadius[id] < 0 || mWrapperZSpan[id] < 0) { LOG(FATAL) << "Wrapper volume " << id << " was requested but not defined" << FairLogger::endl; } // Now create the actual shape and volume TGeoTube* tube = - new TGeoTube(mWrapperMinRadius[id], mWrapperMaxRadius[id], mWrapperZSpan[id] / 2.); + new TGeoTube(mWrapperMinRadius[id], mWrapperMaxRadius[id], mWrapperZSpan[id] / 2.); TGeoMedium* medAir = gGeoManager->GetMedium("ITS_AIR$"); @@ -614,7 +691,7 @@ void AliceO2::ITS::Detector::ConstructGeometry() void AliceO2::ITS::Detector::ConstructDetectorGeometry() { - // Create the geometry and insert it in the mother volume "cave" + // Create the geometry and insert it in the mother volume ITSV TGeoManager* geoManager = gGeoManager; TGeoVolume* vALIC = geoManager->GetVolume("cave"); @@ -639,31 +716,31 @@ void AliceO2::ITS::Detector::ConstructDetectorGeometry() for (Int_t j = 0; j < mNumberLayers; j++) { if (mLayerRadii[j] <= 0) { - LOG(FATAL) << "Wrong layer radius for layer " << j << " (" << mLayerRadii[j] << ")" + LOG(FATAL) << "Wrong layer radius for layer " << j << "(" << mLayerRadii[j] << ")" << FairLogger::endl; } if (mLayerZLength[j] <= 0) { - LOG(FATAL) << "Wrong layer length for layer " << j << " (" << mLayerZLength[j] << ")" + LOG(FATAL) << "Wrong layer length for layer " << j << "(" << mLayerZLength[j] << ")" << FairLogger::endl; } if (mStavePerLayer[j] <= 0) { - LOG(FATAL) << "Wrong number of staves for layer " << j << " (" << mStavePerLayer[j] << ")" + LOG(FATAL) << "Wrong number of staves for layer " << j << "(" << mStavePerLayer[j] << ")" << FairLogger::endl; } if (mUnitPerStave[j] <= 0) { - LOG(FATAL) << "Wrong number of chips for layer " << j << " (" << mUnitPerStave[j] << ")" + LOG(FATAL) << "Wrong number of chips for layer " << j << "(" << mUnitPerStave[j] << ")" << FairLogger::endl; } if (mStaveThickness[j] < 0) { - LOG(FATAL) << "Wrong stave thickness for layer " << j << " (" << mStaveThickness[j] << ")" + LOG(FATAL) << "Wrong stave thickness for layer " << j << "(" << mStaveThickness[j] << ")" << FairLogger::endl; } if (mTurboLayer[j] && mStaveWidth[j] <= 0) { - LOG(FATAL) << "Wrong stave width for layer " << j << " (" << mStaveWidth[j] << ")" + LOG(FATAL) << "Wrong stave width for layer " << j << "(" << mStaveWidth[j] << ")" << FairLogger::endl; } if (mDetectorThickness[j] < 0) { - LOG(FATAL) << "Wrong chip thickness for layer " << j << " (" << mDetectorThickness[j] << ")" + LOG(FATAL) << "Wrong chip thickness for layer " << j << "(" << mDetectorThickness[j] << ")" << FairLogger::endl; } @@ -673,6 +750,7 @@ void AliceO2::ITS::Detector::ConstructDetectorGeometry() << j - 1 << " radius (" << mLayerRadii[j - 1] << ")" << FairLogger::endl; } } + if (mStaveThickness[j] == 0) { LOG(INFO) << "Stave thickness for layer " << j << " not set, using default" << FairLogger::endl; @@ -705,8 +783,7 @@ void AliceO2::ITS::Detector::ConstructDetectorGeometry() mUpgradeGeometry[j] = new UpgradeV1Layer(j, kTRUE, kFALSE); mUpgradeGeometry[j]->SetStaveWidth(mStaveWidth[j]); mUpgradeGeometry[j]->SetStaveTilt(mStaveTilt[j]); - } - else { + } else { mUpgradeGeometry[j] = new UpgradeV1Layer(j, kFALSE); } @@ -720,8 +797,7 @@ void AliceO2::ITS::Detector::ConstructDetectorGeometry() if (j < 3) { mUpgradeGeometry[j]->SetStaveModel(mStaveModelInnerBarrel); - } - else { + } else { mUpgradeGeometry[j]->SetStaveModel(mStaveModelOuterBarrel); } @@ -761,6 +837,13 @@ void AliceO2::ITS::Detector::ConstructDetectorGeometry() void AliceO2::ITS::Detector::CreateServiceBarrel(const Bool_t innerBarrel, TGeoVolume* dest, const TGeoManager* mgr) { + // Creates the Service Barrel (as a simple cylinder) for IB and OB + // Inputs: + // innerBarrel : if true, build IB service barrel, otherwise for OB + // dest : the mother volume holding the service barrel + // mgr : the gGeoManager pointer (used to get the material) + // + Double_t rminIB = 4.7; Double_t rminOB = 43.4; Double_t zLenOB; @@ -777,8 +860,7 @@ void AliceO2::ITS::Detector::CreateServiceBarrel(const Bool_t innerBarrel, TGeoV TGeoTube* ibSuppSh = new TGeoTube(rminIB, rminIB + cInt, zLenOB); TGeoVolume* ibSupp = new TGeoVolume("ibSuppCyl", ibSuppSh, medCarbonFleece); dest->AddNode(ibSupp, 1); - } - else { + } else { zLenOB = ((TGeoTube*)(dest->GetShape()))->GetDz(); TGeoTube* obSuppSh = new TGeoTube(rminOB, rminOB + cExt, zLenOB); TGeoVolume* obSupp = new TGeoVolume("obSuppCyl", obSuppSh, medCarbonFleece); @@ -810,16 +892,34 @@ Point* AliceO2::ITS::Detector::AddHit(Int_t trackID, Int_t detID, TVector3 start TClonesArray& clref = *mPointCollection; Int_t size = clref.GetEntriesFast(); return new (clref[size]) - Point(trackID, detID, startPos, pos, mom, startTime, time, length, eLoss, shunt); + Point(trackID, detID, startPos, pos, mom, startTime, time, length, eLoss, shunt); } TParticle* AliceO2::ITS::Detector::GetParticle() const { - return ((AliStack*)gMC->GetStack())->GetParticle(GetTrack()); + // Returns the pointer to the TParticle for the particle that created + // this hit. From the TParticle all kinds of information about this + // particle can be found. See the TParticle class. + // Inputs: + // none. + // Outputs: + // none. + // Return: + // The TParticle of the track that created this hit. + + return ((AliceO2::Data::Stack*)gMC->GetStack())->GetParticle(GetTrack()); } void AliceO2::ITS::Detector::Print(ostream* os) const { +// Standard output format for this class. +// Inputs: +// ostream *os The output stream +// Outputs: +// none. +// Return: +// none. + #if defined __GNUC__ #if __GNUC__ > 2 ios::fmtflags fmt; @@ -850,9 +950,17 @@ void AliceO2::ITS::Detector::Print(ostream* os) const void AliceO2::ITS::Detector::Read(istream* is) { + // Standard input format for this class. + // Inputs: + // istream *is the input stream + // Outputs: + // none. + // Return: + // none. + *is >> mTrackNumber >> mPositionX >> mPositionY >> mPositionZ; *is >> mStatus >> mModule >> mParticlePx >> mParticlePy >> mParticlePz >> mEnergyDepositionStep >> - mTof; + mTof; *is >> mStartingStepX >> mStartingStepY >> mStartingStepZ; return; } diff --git a/its/Detector.h b/its/Detector.h index bb6e3f1c16532..ab29b538747ac 100644 --- a/its/Detector.h +++ b/its/Detector.h @@ -8,7 +8,7 @@ #include "TVector3.h" #include "TLorentzVector.h" -#include "O2Detector.h" +#include "Base/Detector.h" #include "GeometryHandler.h" #include "MisalignmentParameter.h" #include "UpgradeGeometryTGeo.h" @@ -22,10 +22,10 @@ namespace ITS { class Point; class UpgradeV1Layer; -class Detector : public O2Detector { +class Detector : public AliceO2::Base::Detector { public: - enum Model { + enum UpgradeModel { kIBModelDummy = 0, kIBModel0 = 1, kIBModel1 = 2, @@ -54,7 +54,7 @@ class Detector : public O2Detector { /// This method is called for each step during simulation (see FairMCApplication::Stepping()) virtual Bool_t ProcessHits(FairVolume* v = 0); - /// Registers the produced collections in FAIRRootManager. + /// Registers the produced collections in FAIRRootManager virtual void Register(); /// Gets the produced collections @@ -94,7 +94,6 @@ class Detector : public O2Detector { Int_t nmod, Double_t lthick = 0., Double_t dthick = 0., UInt_t detType = 0, Int_t buildFlag = 0); - /// Sets the layer parameters for a "turbo" layer /// (i.e. a layer whose staves overlap in phi) /// \param nlay layer number @@ -139,47 +138,40 @@ class Detector : public O2Detector { virtual void SetNumberOfWrapperVolumes(Int_t n); /// Set per wrapper volume parameters - virtual void DefineWrapVolume(Int_t id, Double_t rmin, Double_t rmax, Double_t zspan); + virtual void DefineWrapperVolume(Int_t id, Double_t rmin, Double_t rmax, Double_t zspan); + + // The following methods can be implemented if you need to make + // any optional action in your detector during the transport - /// The following methods can be implemented if you need to make - /// any optional action in your detector during the transport. virtual void CopyClones(TClonesArray* cl1, TClonesArray* cl2, Int_t offset) { ; } - virtual void SetSpecialPhysicsCuts() { ; } - virtual void EndOfEvent(); - virtual void FinishPrimary() { ; } - virtual void FinishRun() { ; } - virtual void BeginPrimary() { ; } - virtual void PostTrack() { ; } - virtual void PreTrack() { ; } - virtual void BeginEvent() { ; @@ -190,12 +182,12 @@ class Detector : public O2Detector { /// particle can be found. See the TParticle class. virtual TParticle* GetParticle() const; - /// SetTrack and GetTrack methods from AliHit.h + // SetTrack and GetTrack methods from AliHit.h + virtual void SetTrack(Int_t track) { mTrackNumber = track; } - virtual Int_t GetTrack() const { return mTrackNumber; @@ -215,22 +207,19 @@ class Detector : public O2Detector { return mNumberLayers; } - virtual void SetStaveModelIB(Model model) + virtual void SetStaveModelIB(UpgradeModel model) { mStaveModelInnerBarrel = model; } - - virtual void SetStaveModelOB(Model model) + virtual void SetStaveModelOB(UpgradeModel model) { mStaveModelOuterBarrel = model; } - - virtual Model GetStaveModelIB() const + virtual UpgradeModel GetStaveModelIB() const { return mStaveModelInnerBarrel; } - - virtual Model GetStaveModelOB() const + virtual UpgradeModel GetStaveModelOB() const { return mStaveModelOuterBarrel; } @@ -252,18 +241,15 @@ class Detector : public O2Detector { Float_t mStartingStepY; ///< Starting point of this step Float_t mStartingStepZ; ///< Starting point of this step Float_t mStartingStepT; ///< Starting point of this step - - Int_t mTrackNumber; ///< Track number - Float_t mPositionX; ///< X position of the hit - Float_t mPositionY; ///< Y position of the hit - Float_t mPositionZ; ///< Z position of the hit - - TString* mLayerName; ///<[mNumberLayers] layer identifier + Int_t mTrackNumber; ///< Track number + Float_t mPositionX; ///< X position of the hit + Float_t mPositionY; ///< Y position of the hit + Float_t mPositionZ; ///< Z position of the hit + TString* mLayerName; ///<[mNumberLayers] layer identifier private: /// Track information to be stored until the track leaves the /// active volume. - Int_t mTrackNumberID; ///< track index Int_t mVolumeID; ///< volume id Int_t mShunt; ///< shunt @@ -324,9 +310,9 @@ class Detector : public O2Detector { GeometryHandler* mGeometryHandler; MisalignmentParameter* mMisalignmentParameter; - UpgradeV1Layer** mUpgradeGeometry; ///< Geometry - Model mStaveModelInnerBarrel; ///< The stave model for the Inner Barrel - Model mStaveModelOuterBarrel; ///< The stave model for the Outer Barrel + UpgradeV1Layer** mUpgradeGeometry; //! Geometry + UpgradeModel mStaveModelInnerBarrel; //! The stave model for the Inner Barrel + UpgradeModel mStaveModelOuterBarrel; //! The stave model for the Outer Barrel ClassDef(Detector, 1) }; diff --git a/its/GeometryHandler.cxx b/its/GeometryHandler.cxx index 5fb3b98e1cbaa..a793465f7e8f8 100644 --- a/its/GeometryHandler.cxx +++ b/its/GeometryHandler.cxx @@ -26,14 +26,14 @@ using std::endl; using namespace AliceO2::ITS; GeometryHandler::GeometryHandler() - : TObject() - , mIsSimulation(kFALSE) - , mLastUsedDetectorId(0) - , mGeometryPathHash(0) - , mCurrentVolume(NULL) - , mVolumeShape(NULL) - , mGlobalCentre() - , mGlobalMatrix(NULL) + : TObject(), + mIsSimulation(kFALSE), + mLastUsedDetectorId(0), + mGeometryPathHash(0), + mCurrentVolume(NULL), + mVolumeShape(NULL), + mGlobalCentre(), + mGlobalMatrix(NULL) { } @@ -92,8 +92,7 @@ Int_t GeometryHandler::VolumeId(const Text_t* name) const { if (mIsSimulation) { return gMC->VolId(name); - } - else { + } else { char sname[20]; Int_t length = strlen(name) - 1; @@ -111,8 +110,7 @@ Int_t GeometryHandler::CurrentVolumeId(Int_t& copy) const { if (mIsSimulation) { return gMC->CurrentVolID(copy); - } - else { + } else { if (gGeoManager->IsOutside()) { return 0; } @@ -128,8 +126,7 @@ Int_t GeometryHandler::CurrentVolumeOffId(Int_t off, Int_t& copy) const { if (mIsSimulation) { return gMC->CurrentVolOffID(off, copy); - } - else { + } else { if (off < 0 || off > gGeoManager->GetLevel()) { return 0; } @@ -153,8 +150,7 @@ const char* GeometryHandler::CurrentVolumeName() const { if (mIsSimulation) { return gMC->CurrentVolName(); - } - else { + } else { if (gGeoManager->IsOutside()) { return gGeoManager->GetTopVolume()->GetName(); } @@ -167,8 +163,7 @@ const char* GeometryHandler::CurrentVolumeOffName(Int_t off) const { if (mIsSimulation) { return gMC->CurrentVolOffName(off); - } - else { + } else { if (off < 0 || off > gGeoManager->GetLevel()) { return 0; } @@ -191,8 +186,7 @@ void GeometryHandler::NavigateTo(TString volumeName) { if (mIsSimulation) { LOG(FATAL) << "This method is not supported in simulation mode" << FairLogger::endl; - } - else { + } else { gGeoManager->cd(volumeName.Data()); mGeometryPathHash = volumeName.Hash(); mCurrentVolume = gGeoManager->GetCurrentVolume(); @@ -205,4 +199,4 @@ void GeometryHandler::NavigateTo(TString volumeName) } } -ClassImp(GeometryHandler) +ClassImp(AliceO2::ITS::GeometryHandler) diff --git a/its/GeometryManager.cxx b/its/GeometryManager.cxx index 6a6e2ea561b97..78587bcfe6025 100644 --- a/its/GeometryManager.cxx +++ b/its/GeometryManager.cxx @@ -21,15 +21,14 @@ using namespace AliceO2::ITS; -ClassImp(GeometryManager) +ClassImp(AliceO2::ITS::GeometryManager) TGeoManager* GeometryManager::mGeometry = 0x0; /// Implementation of GeometryManager, the geometry manager class which interfaces to TGeo and /// the look-up table mapping unique volume indices to symbolic volume names. For that, it /// collects several static methods -GeometryManager::GeometryManager() - : TObject() +GeometryManager::GeometryManager() : TObject() { } @@ -52,8 +51,7 @@ Bool_t GeometryManager::GetOriginalGlobalMatrix(const char* symname, TGeoHMatrix if (!mGeometry->cd(symname)) { LOG(ERROR) << "Volume path " << symname << " not valid!" << FairLogger::endl; return kFALSE; - } - else { + } else { m = *mGeometry->GetCurrentMatrix(); return kTRUE; } @@ -65,8 +63,7 @@ Bool_t GeometryManager::GetOriginalGlobalMatrix(const char* symname, TGeoHMatrix if (pne) { m = *pne->GetGlobalOrig(); return kTRUE; - } - else { + } else { LOG(WARNING) << "The symbolic volume name " << symname << "does not correspond to a physical entry. Using it as a volume path!" << FairLogger::endl; @@ -82,8 +79,8 @@ Bool_t GeometryManager::GetOriginalGlobalMatrixFromPath(const char* path, TGeoHM if (!mGeometry || !mGeometry->IsClosed()) { LOG(ERROR) - << "Can't get the original global matrix! gGeoManager doesn't exist or it is still opened!" - << FairLogger::endl; + << "Can't get the original global matrix! gGeoManager doesn't exist or it is still opened!" + << FairLogger::endl; return kFALSE; } @@ -112,8 +109,7 @@ Bool_t GeometryManager::GetOriginalGlobalMatrixFromPath(const char* path, TGeoHM if (!lm) { lm = node->GetMatrix(); } - } - else { + } else { lm = node->GetMatrix(); } diff --git a/its/MisalignmentParameter.cxx b/its/MisalignmentParameter.cxx index 1c5903d288d42..8e9004fd0d48e 100644 --- a/its/MisalignmentParameter.cxx +++ b/its/MisalignmentParameter.cxx @@ -7,18 +7,18 @@ using namespace AliceO2::ITS; -ClassImp(MisalignmentParameter) +ClassImp(AliceO2::ITS::MisalignmentParameter) MisalignmentParameter::MisalignmentParameter(const char* name, const char* title, const char* context) - : FairParGenericSet(name, title, context) - , mShiftX() - , mShiftY() - , mShiftZ() - , mRotX() - , mRotY() - , mRotZ() - , mNumberOfDetectors(0) + : FairParGenericSet(name, title, context), + mShiftX(), + mShiftY(), + mShiftZ(), + mRotX(), + mRotY(), + mRotZ(), + mNumberOfDetectors(0) { } diff --git a/its/MisalignmentParameter.h b/its/MisalignmentParameter.h index c824d02ea0f19..64eb0cb67caee 100644 --- a/its/MisalignmentParameter.h +++ b/its/MisalignmentParameter.h @@ -19,10 +19,9 @@ class MisalignmentParameter : public FairParGenericSet { public: MisalignmentParameter( - const char* name = "MisalignmentParameter", - const char* title = - "Misalignment parameter for AliceO2ITSHitProducerIdealMisallign Parameters", - const char* context = "TestDefaultContext"); + const char* name = "MisalignmentParameter", + const char* title = "Misalignment parameter for AliceO2ITSHitProducerIdealMisallign Parameters", + const char* context = "TestDefaultContext"); ~MisalignmentParameter(void); void Clear(void); diff --git a/its/O2itsLinkDef.h b/its/O2itsLinkDef.h deleted file mode 100644 index 2585fd1632848..0000000000000 --- a/its/O2itsLinkDef.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifdef __CINT__ - -#pragma link off all globals; -#pragma link off all classes; -#pragma link off all functions; - -#pragma link C++ class AliceO2::ITS::UpgradeGeometryTGeo+; -#pragma link C++ class AliceO2::ITS::V11Geometry+; -#pragma link C++ class AliceO2::ITS::UpgradeV1Layer+; -#pragma link C++ class AliceO2::ITS::Segmentation+; -#pragma link C++ class AliceO2::ITS::UpgradeSegmentationPixel+; -#pragma link C++ class AliceO2::ITS::GeometryManager+; -#pragma link C++ class AliceO2::ITS::Detector+; -#pragma link C++ class AliceO2::ITS::ContainerFactory; -#pragma link C++ class AliceO2::ITS::GeometryHandler+; -#pragma link C++ class AliceO2::ITS::MisalignmentParameter+; -#pragma link C++ class AliceO2::ITS::Point+; - -#endif diff --git a/its/Point.cxx b/its/Point.cxx index 0846e0b7eac4c..c9dacae9e51a9 100644 --- a/its/Point.cxx +++ b/its/Point.cxx @@ -9,14 +9,13 @@ using std::cout; using std::endl; using namespace AliceO2::ITS; -Point::Point() - : FairMCPoint() +Point::Point() : FairMCPoint() { } Point::Point(Int_t trackID, Int_t detID, TVector3 startPos, TVector3 pos, TVector3 mom, Double_t startTime, Double_t time, Double_t length, Double_t eLoss, Int_t shunt) - : FairMCPoint(trackID, detID, pos, mom, time, length, eLoss) + : FairMCPoint(trackID, detID, pos, mom, time, length, eLoss) { } @@ -33,4 +32,4 @@ void Point::Print(const Option_t* opt) const << fELoss * 1.0e06 << " keV" << endl; } -ClassImp(Point) +ClassImp(AliceO2::ITS::Point) diff --git a/its/Segmentation.cxx b/its/Segmentation.cxx index d0e41ca4a061c..abce2884c5d71 100644 --- a/its/Segmentation.cxx +++ b/its/Segmentation.cxx @@ -6,13 +6,9 @@ using namespace AliceO2::ITS; -ClassImp(Segmentation) +ClassImp(AliceO2::ITS::Segmentation) -Segmentation::Segmentation() - : mDx(0) - , mDz(0) - , mDy(0) - , mCorrection(0) +Segmentation::Segmentation() : mDx(0), mDz(0), mDy(0), mCorrection(0) { } @@ -32,8 +28,7 @@ void Segmentation::Copy(TObject& obj) const if (mCorrection) { ((Segmentation&)obj).mCorrection = new TF1(*mCorrection); // make a proper copy - } - else { + } else { ((Segmentation&)obj).mCorrection = 0; } } @@ -48,11 +43,7 @@ Segmentation& Segmentation::operator=(const Segmentation& source) } Segmentation::Segmentation(const Segmentation& source) - : TObject(source) - , mDx(0) - , mDz(0) - , mDy(0) - , mCorrection(0) + : TObject(source), mDx(0), mDz(0), mDy(0), mCorrection(0) { // copy constructor source.Copy(*this); diff --git a/its/UpgradeGeometryTGeo.cxx b/its/UpgradeGeometryTGeo.cxx index 25ae141c74581..b9420e035eb8b 100644 --- a/its/UpgradeGeometryTGeo.cxx +++ b/its/UpgradeGeometryTGeo.cxx @@ -25,7 +25,7 @@ using namespace TMath; using namespace AliceO2::ITS; -ClassImp(UpgradeGeometryTGeo) +ClassImp(AliceO2::ITS::UpgradeGeometryTGeo) UInt_t UpgradeGeometryTGeo::mUIDShift = 16; // bit shift to go from mod.id to modUUID for TGeo TString UpgradeGeometryTGeo::mVolumeName = "ITSV"; @@ -41,22 +41,22 @@ TString UpgradeGeometryTGeo::mChipTypeName[UpgradeGeometryTGeo::kNChipTypes] = { TString UpgradeGeometryTGeo::mSegmentationFileName = "itsSegmentations.root"; UpgradeGeometryTGeo::UpgradeGeometryTGeo(Bool_t build, Bool_t loadSegmentations) - : mVersion(kITSVNA) - , mNumberOfLayers(0) - , mNumberOfChips(0) - , mNumberOfStaves(0) - , mNumberOfHalfStaves(0) - , mNumberOfModules(0) - , mNumberOfChipsPerModule(0) - , mNumberOfChipRowsPerModule(0) - , mNumberOfChipsPerHalfStave(0) - , mNumberOfChipsPerStave(0) - , mNumberOfChipsPerLayer(0) - , mLayerChipType(0) - , mLastChipIndex(0) - , mSensorMatrices(0) - , mTrackingToLocalMatrices(0) - , mSegmentations(0) + : mVersion(kITSVNA), + mNumberOfLayers(0), + mNumberOfChips(0), + mNumberOfStaves(0), + mNumberOfHalfStaves(0), + mNumberOfModules(0), + mNumberOfChipsPerModule(0), + mNumberOfChipRowsPerModule(0), + mNumberOfChipsPerHalfStave(0), + mNumberOfChipsPerStave(0), + mNumberOfChipsPerLayer(0), + mLayerChipType(0), + mLastChipIndex(0), + mSensorMatrices(0), + mTrackingToLocalMatrices(0), + mSegmentations(0) { // default c-tor for (int i = gMaxLayers; i--;) { @@ -68,23 +68,23 @@ UpgradeGeometryTGeo::UpgradeGeometryTGeo(Bool_t build, Bool_t loadSegmentations) } UpgradeGeometryTGeo::UpgradeGeometryTGeo(const UpgradeGeometryTGeo& src) - : TObject(src) - , mVersion(src.mVersion) - , mNumberOfLayers(src.mNumberOfLayers) - , mNumberOfChips(src.mNumberOfChips) - , mNumberOfStaves(0) - , mNumberOfHalfStaves(0) - , mNumberOfModules(0) - , mNumberOfChipsPerModule(0) - , mNumberOfChipRowsPerModule(0) - , mNumberOfChipsPerHalfStave(0) - , mNumberOfChipsPerStave(0) - , mNumberOfChipsPerLayer(0) - , mLayerChipType(0) - , mLastChipIndex(0) - , mSensorMatrices(0) - , mTrackingToLocalMatrices(0) - , mSegmentations(0) + : TObject(src), + mVersion(src.mVersion), + mNumberOfLayers(src.mNumberOfLayers), + mNumberOfChips(src.mNumberOfChips), + mNumberOfStaves(0), + mNumberOfHalfStaves(0), + mNumberOfModules(0), + mNumberOfChipsPerModule(0), + mNumberOfChipRowsPerModule(0), + mNumberOfChipsPerHalfStave(0), + mNumberOfChipsPerStave(0), + mNumberOfChipsPerLayer(0), + mLayerChipType(0), + mLastChipIndex(0), + mSensorMatrices(0), + mTrackingToLocalMatrices(0), + mSegmentations(0) { // copy c-tor if (mNumberOfLayers) { @@ -176,7 +176,7 @@ UpgradeGeometryTGeo& UpgradeGeometryTGeo::operator=(const UpgradeGeometryTGeo& s delete[] mNumberOfChipsPerLayer; delete[] mLastChipIndex; mNumberOfStaves = mNumberOfHalfStaves = mNumberOfModules = mLayerChipType = - mNumberOfChipsPerModule = mLastChipIndex = 0; + mNumberOfChipsPerModule = mLastChipIndex = 0; mVersion = src.mVersion; mNumberOfLayers = src.mNumberOfLayers; mNumberOfChips = src.mNumberOfChips; @@ -245,7 +245,7 @@ Int_t UpgradeGeometryTGeo::GetChipIndex(Int_t lay, Int_t sta, Int_t chipInStave) } Int_t UpgradeGeometryTGeo::GetChipIndex(Int_t lay, Int_t sta, Int_t substa, Int_t chipInSStave) - const + const { int n = GetFirstChipIndex(lay) + mNumberOfChipsPerStave[lay] * sta + chipInSStave; if (mNumberOfHalfStaves[lay] && substa > 0) { @@ -418,8 +418,8 @@ const char* UpgradeGeometryTGeo::ComposeSymNameStave(Int_t lr, Int_t stave) const char* UpgradeGeometryTGeo::ComposeSymNameHalfStave(Int_t lr, Int_t stave, Int_t substave) { return substave >= 0 - ? Form("%s/%s%d", ComposeSymNameStave(lr, stave), GetITSHalfStavePattern(), substave) - : ComposeSymNameStave(lr, stave); + ? Form("%s/%s%d", ComposeSymNameStave(lr, stave), GetITSHalfStavePattern(), substave) + : ComposeSymNameStave(lr, stave); } const char* UpgradeGeometryTGeo::ComposeSymNameModule(Int_t lr, Int_t stave, Int_t substave, @@ -712,8 +712,7 @@ Int_t UpgradeGeometryTGeo::ExtractNumberOfLayers() } mLayerToWrapper[lrID] = -1; // not wrapped - } - else if (strstr(name, + } else if (strstr(name, GetITSWrapVolPattern())) { // this is a wrapper volume, may cointain layers int wrID = -1; if ((wrID = ExtractVolumeCopy(name, UpgradeGeometryTGeo::GetITSWrapVolPattern())) < 0) { @@ -881,8 +880,7 @@ Int_t UpgradeGeometryTGeo::ExtractNumberOfChipsPerModule(Int_t lay, int& nrow) c if (!bbox) { LOG(FATAL) << "Chip " << node->GetName() << " volume is of unprocessed shape " << chShape->IsA()->GetName() << FairLogger::endl; - } - else { + } else { dx = 2 * bbox->GetDX(); dz = 2 * bbox->GetDZ(); } @@ -934,8 +932,8 @@ void UpgradeGeometryTGeo::Print(Option_t*) const "(%dx%-2d)\tNMod:%d\tNSubSt:%d\tNSt:%3d\tChipType:%3d\tChip#:%5d:%-5d\tWrapVol:%d\n", i, mNumberOfStaves[i], mNumberOfChipsPerModule[i], mNumberOfChipRowsPerModule[i], mNumberOfChipRowsPerModule[i] - ? mNumberOfChipsPerModule[i] / mNumberOfChipRowsPerModule[i] - : 0, + ? mNumberOfChipsPerModule[i] / mNumberOfChipRowsPerModule[i] + : 0, mNumberOfModules[i], mNumberOfHalfStaves[i], mNumberOfStaves[i], mLayerChipType[i], GetFirstChipIndex(i), GetLastChipIndex(i), mLayerToWrapper[i]); } diff --git a/its/UpgradeGeometryTGeo.h b/its/UpgradeGeometryTGeo.h index ab79bca1aec45..8f44d1c54d767 100644 --- a/its/UpgradeGeometryTGeo.h +++ b/its/UpgradeGeometryTGeo.h @@ -42,10 +42,7 @@ class Segmentation; class UpgradeGeometryTGeo : public TObject { public: - enum { - kITSVNA, - kITSVUpg - }; // ITS version + enum { kITSVNA, kITSVUpg }; // ITS version enum { kChipTypePix = 0, @@ -73,8 +70,8 @@ class UpgradeGeometryTGeo : public TObject { Int_t GetNumberOfChipColsPerModule(Int_t lay) const { return mNumberOfChipRowsPerModule[lay] - ? mNumberOfChipsPerModule[lay] / mNumberOfChipRowsPerModule[lay] - : -1; + ? mNumberOfChipsPerModule[lay] / mNumberOfChipRowsPerModule[lay] + : -1; } Int_t GetNumberOfChipsPerModule(Int_t lay) const { @@ -433,11 +430,11 @@ class UpgradeGeometryTGeo : public TObject { ///< (group of chips on the substaves) Int_t* mNumberOfChipRowsPerModule; ///< [mNumberOfLayers] Array of the number of chips rows per ///< module (relevant for OB modules) - Int_t* mNumberOfChipsPerHalfStave; ///< [mNumberOfLayers] Array of number of chips per substave - Int_t* mNumberOfChipsPerStave; ///< [mNumberOfLayers] Array of the number of chips per stave - Int_t* mNumberOfChipsPerLayer; ///< [mNumberOfLayers] Array of the number of chips per stave - Int_t* mLayerChipType; ///< [mNumberOfLayers] Array of layer chip types - Int_t* mLastChipIndex; ///< [mNumberOfLayers] max ID of the detctor in the layer + Int_t* mNumberOfChipsPerHalfStave; ///< [mNumberOfLayers] Array of number of chips per substave + Int_t* mNumberOfChipsPerStave; ///< [mNumberOfLayers] Array of the number of chips per stave + Int_t* mNumberOfChipsPerLayer; ///< [mNumberOfLayers] Array of the number of chips per stave + Int_t* mLayerChipType; ///< [mNumberOfLayers] Array of layer chip types + Int_t* mLastChipIndex; ///< [mNumberOfLayers] max ID of the detctor in the layer Char_t mLayerToWrapper[gMaxLayers]; ///< Layer to wrapper correspondence TObjArray* mSensorMatrices; ///< Sensor's matrices pointers in the geometry TObjArray* mTrackingToLocalMatrices; ///< Tracking to Local matrices pointers in the geometry @@ -459,48 +456,48 @@ class UpgradeGeometryTGeo : public TObject { ClassDef(UpgradeGeometryTGeo, 1) // ITS geometry based on TGeo }; -/// Symbolic name +/// Returns ymbolic name inline const char* UpgradeGeometryTGeo::GetSymbolicName(Int_t lay, Int_t sta, Int_t det) const { return GetSymbolicName(GetChipIndex(lay, sta, det)); } -/// Chip current matrix +/// Returns chip current matrix inline TGeoHMatrix* UpgradeGeometryTGeo::GetMatrix(Int_t lay, Int_t sta, Int_t det) const { return GetMatrix(GetChipIndex(lay, sta, det)); } -/// Translation +/// Returns translation inline Bool_t UpgradeGeometryTGeo::GetTranslation(Int_t lay, Int_t sta, Int_t det, Double_t t[3]) - const + const { return GetTranslation(GetChipIndex(lay, sta, det), t); } -/// Rotation +/// Returns rotation inline Bool_t UpgradeGeometryTGeo::GetRotation(Int_t lay, Int_t sta, Int_t det, Double_t r[9]) const { return GetRotation(GetChipIndex(lay, sta, det), r); } -/// Original matrix -inline Bool_t UpgradeGeometryTGeo::GetOriginalMatrix(Int_t lay, Int_t sta, Int_t det, TGeoHMatrix& m) - const +/// Returns original matrix +inline Bool_t UpgradeGeometryTGeo::GetOriginalMatrix(Int_t lay, Int_t sta, Int_t det, + TGeoHMatrix& m) const { return GetOriginalMatrix(GetChipIndex(lay, sta, det), m); } -/// Original translation +/// Returns original translation inline Bool_t UpgradeGeometryTGeo::GetOriginalTranslation(Int_t lay, Int_t sta, Int_t det, - Double_t t[3]) const + Double_t t[3]) const { return GetOriginalTranslation(GetChipIndex(lay, sta, det), t); } /// Original rotation -inline Bool_t UpgradeGeometryTGeo::GetOriginalRotation(Int_t lay, Int_t sta, Int_t det, Double_t r[9]) - const +inline Bool_t UpgradeGeometryTGeo::GetOriginalRotation(Int_t lay, Int_t sta, Int_t det, + Double_t r[9]) const { return GetOriginalRotation(GetChipIndex(lay, sta, det), r); } @@ -555,13 +552,15 @@ inline void UpgradeGeometryTGeo::GlobalToLocal(Int_t index, const Double_t* glob } /// Sensor local to global -inline void UpgradeGeometryTGeo::LocalToGlobalVector(Int_t index, const Double_t* loc, Double_t* glob) +inline void UpgradeGeometryTGeo::LocalToGlobalVector(Int_t index, const Double_t* loc, + Double_t* glob) { GetMatrixSensor(index)->LocalToMasterVect(loc, glob); } /// Global to sensor local -inline void UpgradeGeometryTGeo::GlobalToLocalVector(Int_t index, const Double_t* glob, Double_t* loc) +inline void UpgradeGeometryTGeo::GlobalToLocalVector(Int_t index, const Double_t* glob, + Double_t* loc) { GetMatrixSensor(index)->MasterToLocalVect(glob, loc); } @@ -602,7 +601,7 @@ inline const Segmentation* UpgradeGeometryTGeo::GetSegmentationById(Int_t id) co return mSegmentations ? (Segmentation*)mSegmentations->At(id) : 0; } -// Get segmentation of layer +/// Get segmentation of layer inline const Segmentation* UpgradeGeometryTGeo::GetSegmentation(Int_t lr) const { return mSegmentations ? (Segmentation*)mSegmentations->At(GetLayerChipTypeId(lr)) : 0; diff --git a/its/UpgradeSegmentationPixel.cxx b/its/UpgradeSegmentationPixel.cxx index defe4f16fcf8f..0c5b60e7a540b 100644 --- a/its/UpgradeSegmentationPixel.cxx +++ b/its/UpgradeSegmentationPixel.cxx @@ -15,7 +15,7 @@ using namespace TMath; using namespace AliceO2::ITS; -ClassImp(UpgradeSegmentationPixel) +ClassImp(AliceO2::ITS::UpgradeSegmentationPixel) const char* UpgradeSegmentationPixel::sSegmentationsListName = "UpgradeSegmentations"; @@ -23,29 +23,29 @@ UpgradeSegmentationPixel::UpgradeSegmentationPixel(UInt_t id, int nchips, int nc float pitchX, float pitchZ, float thickness, float pitchLftC, float pitchRgtC, float edgL, float edgR, float edgT, float edgB) - : Segmentation() - , mGuardLeft(edgL) - , mGuardRight(edgR) - , mGuardTop(edgT) - , mGuardBottom(edgB) - , mShiftLocalX(0.5 * (edgT - edgB)) - , mShiftLocalZ(0.5 * (edgR - edgL)) - , mDxActive(0) - , mDzActive(0) - , mPitchX(pitchX) - , mPitchZ(pitchZ) - , mPitchZLeftColumn(pitchLftC < 0 ? pitchZ : pitchLftC) - , mPitchZRightColumn(pitchRgtC < 0 ? pitchZ : pitchRgtC) - , mChipSizeDZ(0) - , mNumberOfChips(nchips) - , mNumberOfColumnsPerChip(nchips > 0 ? ncol / nchips : 0) - , mNumberOfRows(nrow) - , mNumberOfColumns(ncol) - , mDiodShiftMatNColumn(0) - , mDiodShiftMatNRow(0) - , mDiodShiftMatDimension(0) - , mDiodShiftMatX(0) - , mDiodShiftMatZ(0) + : Segmentation(), + mGuardLeft(edgL), + mGuardRight(edgR), + mGuardTop(edgT), + mGuardBottom(edgB), + mShiftLocalX(0.5 * (edgT - edgB)), + mShiftLocalZ(0.5 * (edgR - edgL)), + mDxActive(0), + mDzActive(0), + mPitchX(pitchX), + mPitchZ(pitchZ), + mPitchZLeftColumn(pitchLftC < 0 ? pitchZ : pitchLftC), + mPitchZRightColumn(pitchRgtC < 0 ? pitchZ : pitchRgtC), + mChipSizeDZ(0), + mNumberOfChips(nchips), + mNumberOfColumnsPerChip(nchips > 0 ? ncol / nchips : 0), + mNumberOfRows(nrow), + mNumberOfColumns(ncol), + mDiodShiftMatNColumn(0), + mDiodShiftMatNRow(0), + mDiodShiftMatDimension(0), + mDiodShiftMatX(0), + mDiodShiftMatZ(0) { // Default constructor, sizes in cm if (nchips) { @@ -73,8 +73,7 @@ void UpgradeSegmentationPixel::GetPadIxz(Float_t x, Float_t z, Int_t& ix, Int_t& LOG(WARNING) << "Z=" << z << " gives col=" << iz << " outside [0:" << mNumberOfColumns << ")" << FairLogger::endl; iz = 0; - } - else if (iz >= mNumberOfColumns) { + } else if (iz >= mNumberOfColumns) { LOG(WARNING) << "Z=" << z << " gives col=" << iz << " outside [0:" << mNumberOfColumns << ")" << FairLogger::endl; iz = mNumberOfColumns - 1; @@ -83,8 +82,7 @@ void UpgradeSegmentationPixel::GetPadIxz(Float_t x, Float_t z, Int_t& ix, Int_t& LOG(WARNING) << "X=" << x << " gives row=" << ix << " outside [0:" << mNumberOfRows << ")" << FairLogger::endl; ix = 0; - } - else if (ix >= mNumberOfRows) { + } else if (ix >= mNumberOfRows) { LOG(WARNING) << "X=" << x << " gives row=" << ix << " outside [0:" << mNumberOfRows << ")" << FairLogger::endl; ix = mNumberOfRows - 1; @@ -122,12 +120,10 @@ Float_t UpgradeSegmentationPixel::ColumnToZ(Int_t col) const if (col > 0) { if (col < mNumberOfColumnsPerChip - 1) { z += mPitchZLeftColumn + (col - 0.5) * mPitchZ; - } - else { + } else { z += mChipSizeDZ - mPitchZRightColumn / 2; } - } - else { + } else { z += mPitchZLeftColumn / 2; } return z; @@ -177,29 +173,29 @@ UpgradeSegmentationPixel& UpgradeSegmentationPixel::operator=(const UpgradeSegme } UpgradeSegmentationPixel::UpgradeSegmentationPixel(const UpgradeSegmentationPixel& src) - : Segmentation(src) - , mGuardLeft(src.mGuardLeft) - , mGuardRight(src.mGuardRight) - , mGuardTop(src.mGuardTop) - , mGuardBottom(src.mGuardBottom) - , mShiftLocalX(src.mShiftLocalX) - , mShiftLocalZ(src.mShiftLocalZ) - , mDxActive(src.mDxActive) - , mDzActive(src.mDzActive) - , mPitchX(src.mPitchX) - , mPitchZ(src.mPitchZ) - , mPitchZLeftColumn(src.mPitchZLeftColumn) - , mPitchZRightColumn(src.mPitchZRightColumn) - , mChipSizeDZ(src.mChipSizeDZ) - , mNumberOfChips(src.mNumberOfChips) - , mNumberOfColumnsPerChip(src.mNumberOfColumnsPerChip) - , mNumberOfRows(src.mNumberOfRows) - , mNumberOfColumns(src.mNumberOfColumns) - , mDiodShiftMatNColumn(src.mDiodShiftMatNColumn) - , mDiodShiftMatNRow(src.mDiodShiftMatNRow) - , mDiodShiftMatDimension(src.mDiodShiftMatDimension) - , mDiodShiftMatX(0) - , mDiodShiftMatZ(0) + : Segmentation(src), + mGuardLeft(src.mGuardLeft), + mGuardRight(src.mGuardRight), + mGuardTop(src.mGuardTop), + mGuardBottom(src.mGuardBottom), + mShiftLocalX(src.mShiftLocalX), + mShiftLocalZ(src.mShiftLocalZ), + mDxActive(src.mDxActive), + mDzActive(src.mDzActive), + mPitchX(src.mPitchX), + mPitchZ(src.mPitchZ), + mPitchZLeftColumn(src.mPitchZLeftColumn), + mPitchZRightColumn(src.mPitchZRightColumn), + mChipSizeDZ(src.mChipSizeDZ), + mNumberOfChips(src.mNumberOfChips), + mNumberOfColumnsPerChip(src.mNumberOfColumnsPerChip), + mNumberOfRows(src.mNumberOfRows), + mNumberOfColumns(src.mNumberOfColumns), + mDiodShiftMatNColumn(src.mDiodShiftMatNColumn), + mDiodShiftMatNRow(src.mDiodShiftMatNRow), + mDiodShiftMatDimension(src.mDiodShiftMatDimension), + mDiodShiftMatX(0), + mDiodShiftMatZ(0) { // copy constructor if (mDiodShiftMatDimension) { @@ -284,9 +280,9 @@ void UpgradeSegmentationPixel::DetectorToLocal(Int_t ix, Int_t iz, Float_t& x, F << FairLogger::endl; return; } // outside of detector - x += (ix + 0.5) * mPitchX - - mShiftLocalX; // RS: we go to the center of the pad, i.e. + pitch/2, not - // to the boundary as in SPD + x += + (ix + 0.5) * mPitchX - mShiftLocalX; // RS: we go to the center of the pad, i.e. + pitch/2, not + // to the boundary as in SPD z += ColumnToZ(iz) - mShiftLocalZ; return; // Found x and z, return. } @@ -397,8 +393,7 @@ Bool_t UpgradeSegmentationPixel::Store(const char* outf) if (!arr) { arr = new TObjArray(); - } - else if (arr->At(id)) { + } else if (arr->At(id)) { LOG(FATAL) << "Segmenation " << id << " already exists in file " << outf << FairLogger::endl; return kFALSE; } diff --git a/its/UpgradeSegmentationPixel.h b/its/UpgradeSegmentationPixel.h index 068ff9179fb30..d4b5a30b31bc9 100644 --- a/its/UpgradeSegmentationPixel.h +++ b/its/UpgradeSegmentationPixel.h @@ -247,14 +247,11 @@ class UpgradeSegmentationPixel : public AliceO2::ITS::Segmentation { Int_t mNumberOfColumnsPerChip; ///< number of columns per chip Int_t mNumberOfRows; ///< number of rows Int_t mNumberOfColumns; ///< number of columns (total) - - Int_t mDiodShiftMatNColumn; ///< periodicity of diod shift in columns - Int_t mDiodShiftMatNRow; ///< periodicity of diod shift in rows - Int_t mDiodShiftMatDimension; ///< dimension of diod shift matrix - Float_t* mDiodShiftMatX; ///< [mDiodShiftMatDimension] diod shift in X (along column), in fraction of - ///< X pitch - Float_t* - mDiodShiftMatZ; ///< [mDiodShiftMatDimension] diod shift in Z (along row), in fraction of Z pitch + Int_t mDiodShiftMatNColumn; ///< periodicity of diod shift in columns + Int_t mDiodShiftMatNRow; ///< periodicity of diod shift in rows + Int_t mDiodShiftMatDimension; ///< dimension of diod shift matrix + Float_t* mDiodShiftMatX; ///< diod shift in X (along column), in fraction of X pitch + Float_t* mDiodShiftMatZ; ///< diod shift in Z (along row), in fraction of Z pitch static const char* sSegmentationsListName; ///< pattern for segmentations list name diff --git a/its/UpgradeV1Layer.cxx b/its/UpgradeV1Layer.cxx index 7331cdff1e446..6b0c4a1c691ad 100644 --- a/its/UpgradeV1Layer.cxx +++ b/its/UpgradeV1Layer.cxx @@ -26,171 +26,170 @@ using namespace TMath; using namespace AliceO2::ITS; // General Parameters -const Int_t AliceO2::ITS::UpgradeV1Layer::sNumberOmInnerLayers = 3; +const Int_t UpgradeV1Layer::sNumberOmInnerLayers = 3; -const Double_t AliceO2::ITS::UpgradeV1Layer::sDefaultSensorThick = 300 * sMicron; -const Double_t AliceO2::ITS::UpgradeV1Layer::sDefaultStaveThick = 1 * sCm; +const Double_t UpgradeV1Layer::sDefaultSensorThick = 300 * sMicron; +const Double_t UpgradeV1Layer::sDefaultStaveThick = 1 * sCm; // Inner Barrel Parameters -const Int_t AliceO2::ITS::UpgradeV1Layer::sIBChipsPerRow = 9; -const Int_t AliceO2::ITS::UpgradeV1Layer::sIBNChipRows = 1; +const Int_t UpgradeV1Layer::sIBChipsPerRow = 9; +const Int_t UpgradeV1Layer::sIBNChipRows = 1; // Outer Barrel Parameters -const Int_t AliceO2::ITS::UpgradeV1Layer::sOBChipsPerRow = 7; -const Int_t AliceO2::ITS::UpgradeV1Layer::sOBNChipRows = 2; - -const Double_t AliceO2::ITS::UpgradeV1Layer::sOBHalfStaveWidth = 3.01 * sCm; -const Double_t AliceO2::ITS::UpgradeV1Layer::sOBModuleWidth = sOBHalfStaveWidth; -const Double_t AliceO2::ITS::UpgradeV1Layer::sOBModuleGap = 0.01 * sCm; -const Double_t AliceO2::ITS::UpgradeV1Layer::sOBChipXGap = 0.01 * sCm; -const Double_t AliceO2::ITS::UpgradeV1Layer::sOBChipZGap = 0.01 * sCm; -const Double_t AliceO2::ITS::UpgradeV1Layer::sOBFlexCableAlThick = 0.005 * sCm; -const Double_t AliceO2::ITS::UpgradeV1Layer::sOBFlexCableKapThick = 0.01 * sCm; -const Double_t AliceO2::ITS::UpgradeV1Layer::sOBBusCableAlThick = 0.02 * sCm; -const Double_t AliceO2::ITS::UpgradeV1Layer::sOBBusCableKapThick = 0.02 * sCm; -const Double_t AliceO2::ITS::UpgradeV1Layer::sOBColdPlateThick = 0.012 * sCm; -const Double_t AliceO2::ITS::UpgradeV1Layer::sOBCarbonPlateThick = 0.012 * sCm; -const Double_t AliceO2::ITS::UpgradeV1Layer::sOBGlueThick = 0.03 * sCm; -const Double_t AliceO2::ITS::UpgradeV1Layer::sOBModuleZLength = 21.06 * sCm; -const Double_t AliceO2::ITS::UpgradeV1Layer::sOBHalfStaveYTrans = 1.76 * sMm; -const Double_t AliceO2::ITS::UpgradeV1Layer::sOBHalfStaveXOverlap = 4.3 * sMm; -const Double_t AliceO2::ITS::UpgradeV1Layer::sOBGraphiteFoilThick = 30.0 * sMicron; -const Double_t AliceO2::ITS::UpgradeV1Layer::sOBCoolTubeInnerD = 2.052 * sMm; -const Double_t AliceO2::ITS::UpgradeV1Layer::sOBCoolTubeThick = 32.0 * sMicron; -const Double_t AliceO2::ITS::UpgradeV1Layer::sOBCoolTubeXDist = 11.1 * sMm; - -const Double_t AliceO2::ITS::UpgradeV1Layer::sOBSpaceFrameWidth = 42.0 * sMm; -const Double_t AliceO2::ITS::UpgradeV1Layer::sOBSpaceFrameTotHigh = 43.1 * sMm; -const Double_t AliceO2::ITS::UpgradeV1Layer::sOBSFrameBeamRadius = 0.6 * sMm; -const Double_t AliceO2::ITS::UpgradeV1Layer::sOBSpaceFrameLa = 3.0 * sMm; -const Double_t AliceO2::ITS::UpgradeV1Layer::sOBSpaceFrameHa = 0.721979 * sMm; -const Double_t AliceO2::ITS::UpgradeV1Layer::sOBSpaceFrameLb = 3.7 * sMm; -const Double_t AliceO2::ITS::UpgradeV1Layer::sOBSpaceFrameHb = 0.890428 * sMm; -const Double_t AliceO2::ITS::UpgradeV1Layer::sOBSpaceFrameL = 0.25 * sMm; -const Double_t AliceO2::ITS::UpgradeV1Layer::sOBSFBotBeamAngle = 56.5; -const Double_t AliceO2::ITS::UpgradeV1Layer::sOBSFrameBeamSidePhi = 65.0; - -ClassImp(AliceO2::ITS::UpgradeV1Layer) +const Int_t UpgradeV1Layer::sOBChipsPerRow = 7; +const Int_t UpgradeV1Layer::sOBNChipRows = 2; + +const Double_t UpgradeV1Layer::sOBHalfStaveWidth = 3.01 * sCm; +const Double_t UpgradeV1Layer::sOBModuleWidth = sOBHalfStaveWidth; +const Double_t UpgradeV1Layer::sOBModuleGap = 0.01 * sCm; +const Double_t UpgradeV1Layer::sOBChipXGap = 0.01 * sCm; +const Double_t UpgradeV1Layer::sOBChipZGap = 0.01 * sCm; +const Double_t UpgradeV1Layer::sOBFlexCableAlThick = 0.005 * sCm; +const Double_t UpgradeV1Layer::sOBFlexCableKapThick = 0.01 * sCm; +const Double_t UpgradeV1Layer::sOBBusCableAlThick = 0.02 * sCm; +const Double_t UpgradeV1Layer::sOBBusCableKapThick = 0.02 * sCm; +const Double_t UpgradeV1Layer::sOBColdPlateThick = 0.012 * sCm; +const Double_t UpgradeV1Layer::sOBCarbonPlateThick = 0.012 * sCm; +const Double_t UpgradeV1Layer::sOBGlueThick = 0.03 * sCm; +const Double_t UpgradeV1Layer::sOBModuleZLength = 21.06 * sCm; +const Double_t UpgradeV1Layer::sOBHalfStaveYTrans = 1.76 * sMm; +const Double_t UpgradeV1Layer::sOBHalfStaveXOverlap = 4.3 * sMm; +const Double_t UpgradeV1Layer::sOBGraphiteFoilThick = 30.0 * sMicron; +const Double_t UpgradeV1Layer::sOBCoolTubeInnerD = 2.052 * sMm; +const Double_t UpgradeV1Layer::sOBCoolTubeThick = 32.0 * sMicron; +const Double_t UpgradeV1Layer::sOBCoolTubeXDist = 11.1 * sMm; + +const Double_t UpgradeV1Layer::sOBSpaceFrameWidth = 42.0 * sMm; +const Double_t UpgradeV1Layer::sOBSpaceFrameTotHigh = 43.1 * sMm; +const Double_t UpgradeV1Layer::sOBSFrameBeamRadius = 0.6 * sMm; +const Double_t UpgradeV1Layer::sOBSpaceFrameLa = 3.0 * sMm; +const Double_t UpgradeV1Layer::sOBSpaceFrameHa = 0.721979 * sMm; +const Double_t UpgradeV1Layer::sOBSpaceFrameLb = 3.7 * sMm; +const Double_t UpgradeV1Layer::sOBSpaceFrameHb = 0.890428 * sMm; +const Double_t UpgradeV1Layer::sOBSpaceFrameL = 0.25 * sMm; +const Double_t UpgradeV1Layer::sOBSFBotBeamAngle = 56.5; +const Double_t UpgradeV1Layer::sOBSFrameBeamSidePhi = 65.0; + +ClassImp(UpgradeV1Layer) #define SQ(A) (A) * (A) -AliceO2::ITS::UpgradeV1Layer::UpgradeV1Layer() - : V11Geometry() - , mLayerNumber(0) - , mPhi0(0) - , mLayerRadius(0) - , mZLength(0) - , mSensorThickness(0) - , mStaveThickness(0) - , mStaveWidth(0) - , mStaveTilt(0) - , mNumberOfStaves(0) - , mNumberOfModules(0) - , mNumberOfChips(0) - , mChipTypeID(0) - , mIsTurbo(0) - , mBuildLevel(0) - , mStaveModel(AliceO2::ITS::Detector::kIBModelDummy) +UpgradeV1Layer::UpgradeV1Layer() + : V11Geometry(), + mLayerNumber(0), + mPhi0(0), + mLayerRadius(0), + mZLength(0), + mSensorThickness(0), + mStaveThickness(0), + mStaveWidth(0), + mStaveTilt(0), + mNumberOfStaves(0), + mNumberOfModules(0), + mNumberOfChips(0), + mChipTypeID(0), + mIsTurbo(0), + mBuildLevel(0), + mStaveModel(Detector::kIBModelDummy) { for (int i = kNHLevels; i--;) { mHierarchy[i] = 0; } } -AliceO2::ITS::UpgradeV1Layer::UpgradeV1Layer(Int_t debug) - : V11Geometry(debug) - , mLayerNumber(0) - , mPhi0(0) - , mLayerRadius(0) - , mZLength(0) - , mSensorThickness(0) - , mStaveThickness(0) - , mStaveWidth(0) - , mStaveTilt(0) - , mNumberOfStaves(0) - , mNumberOfModules(0) - , mNumberOfChips(0) - , mChipTypeID(0) - , mIsTurbo(0) - , mBuildLevel(0) - , mStaveModel(AliceO2::ITS::Detector::kIBModelDummy) +UpgradeV1Layer::UpgradeV1Layer(Int_t debug) + : V11Geometry(debug), + mLayerNumber(0), + mPhi0(0), + mLayerRadius(0), + mZLength(0), + mSensorThickness(0), + mStaveThickness(0), + mStaveWidth(0), + mStaveTilt(0), + mNumberOfStaves(0), + mNumberOfModules(0), + mNumberOfChips(0), + mChipTypeID(0), + mIsTurbo(0), + mBuildLevel(0), + mStaveModel(Detector::kIBModelDummy) { for (int i = kNHLevels; i--;) { mHierarchy[i] = 0; } } -AliceO2::ITS::UpgradeV1Layer::UpgradeV1Layer(Int_t lay, Int_t debug) - : V11Geometry(debug) - , mLayerNumber(lay) - , mPhi0(0) - , mLayerRadius(0) - , mZLength(0) - , mSensorThickness(0) - , mStaveThickness(0) - , mStaveWidth(0) - , mStaveTilt(0) - , mNumberOfStaves(0) - , mNumberOfModules(0) - , mNumberOfChips(0) - , mChipTypeID(0) - , mIsTurbo(0) - , mBuildLevel(0) - , mStaveModel(AliceO2::ITS::Detector::kIBModelDummy) +UpgradeV1Layer::UpgradeV1Layer(Int_t lay, Int_t debug) + : V11Geometry(debug), + mLayerNumber(lay), + mPhi0(0), + mLayerRadius(0), + mZLength(0), + mSensorThickness(0), + mStaveThickness(0), + mStaveWidth(0), + mStaveTilt(0), + mNumberOfStaves(0), + mNumberOfModules(0), + mNumberOfChips(0), + mChipTypeID(0), + mIsTurbo(0), + mBuildLevel(0), + mStaveModel(Detector::kIBModelDummy) { for (int i = kNHLevels; i--;) { mHierarchy[i] = 0; } } -AliceO2::ITS::UpgradeV1Layer::UpgradeV1Layer(Int_t lay, Bool_t turbo, Int_t debug) - : V11Geometry(debug) - , mLayerNumber(lay) - , mPhi0(0) - , mLayerRadius(0) - , mZLength(0) - , mSensorThickness(0) - , mStaveThickness(0) - , mStaveWidth(0) - , mStaveTilt(0) - , mNumberOfStaves(0) - , mNumberOfModules(0) - , mNumberOfChips(0) - , mChipTypeID(0) - , mIsTurbo(turbo) - , mBuildLevel(0) - , mStaveModel(AliceO2::ITS::Detector::kIBModelDummy) +UpgradeV1Layer::UpgradeV1Layer(Int_t lay, Bool_t turbo, Int_t debug) + : V11Geometry(debug), + mLayerNumber(lay), + mPhi0(0), + mLayerRadius(0), + mZLength(0), + mSensorThickness(0), + mStaveThickness(0), + mStaveWidth(0), + mStaveTilt(0), + mNumberOfStaves(0), + mNumberOfModules(0), + mNumberOfChips(0), + mChipTypeID(0), + mIsTurbo(turbo), + mBuildLevel(0), + mStaveModel(Detector::kIBModelDummy) { for (int i = kNHLevels; i--;) { mHierarchy[i] = 0; } } -AliceO2::ITS::UpgradeV1Layer::UpgradeV1Layer(const AliceO2::ITS::UpgradeV1Layer& s) - : V11Geometry(s.GetDebug()) - , mLayerNumber(s.mLayerNumber) - , mPhi0(s.mPhi0) - , mLayerRadius(s.mLayerRadius) - , mZLength(s.mZLength) - , mSensorThickness(s.mSensorThickness) - , mStaveThickness(s.mStaveThickness) - , mStaveWidth(s.mStaveWidth) - , mStaveTilt(s.mStaveTilt) - , mNumberOfStaves(s.mNumberOfStaves) - , mNumberOfModules(s.mNumberOfModules) - , mNumberOfChips(s.mNumberOfChips) - , mChipTypeID(s.mChipTypeID) - , mIsTurbo(s.mIsTurbo) - , mBuildLevel(s.mBuildLevel) - , mStaveModel(s.mStaveModel) +UpgradeV1Layer::UpgradeV1Layer(const UpgradeV1Layer& s) + : V11Geometry(s.GetDebug()), + mLayerNumber(s.mLayerNumber), + mPhi0(s.mPhi0), + mLayerRadius(s.mLayerRadius), + mZLength(s.mZLength), + mSensorThickness(s.mSensorThickness), + mStaveThickness(s.mStaveThickness), + mStaveWidth(s.mStaveWidth), + mStaveTilt(s.mStaveTilt), + mNumberOfStaves(s.mNumberOfStaves), + mNumberOfModules(s.mNumberOfModules), + mNumberOfChips(s.mNumberOfChips), + mChipTypeID(s.mChipTypeID), + mIsTurbo(s.mIsTurbo), + mBuildLevel(s.mBuildLevel), + mStaveModel(s.mStaveModel) { for (int i = kNHLevels; i--;) { mHierarchy[i] = s.mHierarchy[i]; } } -AliceO2::ITS::UpgradeV1Layer& AliceO2::ITS::UpgradeV1Layer::operator=( - const AliceO2::ITS::UpgradeV1Layer& s) +UpgradeV1Layer& UpgradeV1Layer::operator=(const UpgradeV1Layer& s) { if (&s == this) { return *this; @@ -218,11 +217,11 @@ AliceO2::ITS::UpgradeV1Layer& AliceO2::ITS::UpgradeV1Layer::operator=( return *this; } -AliceO2::ITS::UpgradeV1Layer::~UpgradeV1Layer() +UpgradeV1Layer::~UpgradeV1Layer() { } -void AliceO2::ITS::UpgradeV1Layer::CreateLayer(TGeoVolume* motherVolume) +void UpgradeV1Layer::CreateLayer(TGeoVolume* motherVolume) { char volumeName[30]; Double_t xpos, ypos, zpos; @@ -298,7 +297,7 @@ void AliceO2::ITS::UpgradeV1Layer::CreateLayer(TGeoVolume* motherVolume) zpos = 0.; phi += 90; layerVolume->AddNode(stavVol, j, - new TGeoCombiTrans(xpos, ypos, zpos, new TGeoRotation("", phi, 0, 0))); + new TGeoCombiTrans(xpos, ypos, zpos, new TGeoRotation("", phi, 0, 0))); } // Finally put everything in the mother volume @@ -308,7 +307,7 @@ void AliceO2::ITS::UpgradeV1Layer::CreateLayer(TGeoVolume* motherVolume) return; } -void AliceO2::ITS::UpgradeV1Layer::CreateLayerTurbo(TGeoVolume* motherVolume) +void UpgradeV1Layer::CreateLayerTurbo(TGeoVolume* motherVolume) { char volumeName[30]; Double_t xpos, ypos, zpos; @@ -340,8 +339,9 @@ void AliceO2::ITS::UpgradeV1Layer::CreateLayerTurbo(TGeoVolume* motherVolume) ypos = r * SinD(phi); // r*CosD(-phi); zpos = 0.; phi += 90; - layerVolume->AddNode(stavVol, j, new TGeoCombiTrans(xpos, ypos, zpos, - new TGeoRotation("", phi - mStaveTilt, 0, 0))); + layerVolume->AddNode( + stavVol, j, + new TGeoCombiTrans(xpos, ypos, zpos, new TGeoRotation("", phi - mStaveTilt, 0, 0))); } // Finally put everything in the mother volume @@ -350,7 +350,7 @@ void AliceO2::ITS::UpgradeV1Layer::CreateLayerTurbo(TGeoVolume* motherVolume) return; } -TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStave(const TGeoManager* /*mgr*/) +TGeoVolume* UpgradeV1Layer::CreateStave(const TGeoManager* /*mgr*/) { char volumeName[30]; @@ -402,15 +402,12 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStave(const TGeoManager* /*mgr*/ staveVol->AddNode(mechStaveVol, 1, new TGeoCombiTrans(0, -ypos, 0, new TGeoRotation("", 0, 0, 180))); } - } - else { + } else { TGeoVolume* hstaveVol = CreateStaveOuterB(); - if (mStaveModel == - AliceO2::ITS::Detector::kOBModel0) { // Create simplified stave struct as in v0 + if (mStaveModel == Detector::kOBModel0) { // Create simplified stave struct as in v0 staveVol->AddNode(hstaveVol, 0); mHierarchy[kHalfStave] = 1; - } - else { // (if mStaveModel) Create new stave struct as in TDR + } else { // (if mStaveModel) Create new stave struct as in TDR xpos = ((TGeoBBox*)(hstaveVol->GetShape()))->GetDX() - sOBHalfStaveXOverlap / 2; // ypos is CF height as computed in CreateSpaceFrameOuterB1 ypos = (sOBSpaceFrameTotHigh - sOBHalfStaveYTrans) / 2; @@ -429,10 +426,8 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStave(const TGeoManager* /*mgr*/ return staveVol; } -TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveInnerB(const Double_t xsta, - const Double_t ysta, - const Double_t zsta, - const TGeoManager* mgr) +TGeoVolume* UpgradeV1Layer::CreateStaveInnerB(const Double_t xsta, const Double_t ysta, + const Double_t zsta, const TGeoManager* mgr) { Double_t xmod, ymod, zmod; char volumeName[30]; @@ -460,8 +455,8 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveInnerB(const Double_t xsta, return hstaveVol; } -TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateModuleInnerB(Double_t xmod, Double_t ymod, - Double_t zmod, const TGeoManager* mgr) +TGeoVolume* UpgradeV1Layer::CreateModuleInnerB(Double_t xmod, Double_t ymod, Double_t zmod, + const TGeoManager* mgr) { Double_t zchip; Double_t zpos; @@ -489,29 +484,28 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateModuleInnerB(Double_t xmod, Doub return modVol; } -TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveStructInnerB(const Double_t xsta, - const Double_t zsta, - const TGeoManager* mgr) +TGeoVolume* UpgradeV1Layer::CreateStaveStructInnerB(const Double_t xsta, const Double_t zsta, + const TGeoManager* mgr) { TGeoVolume* mechStavVol = 0; switch (mStaveModel) { - case AliceO2::ITS::Detector::kIBModelDummy: + case Detector::kIBModelDummy: mechStavVol = CreateStaveModelInnerBDummy(xsta, zsta, mgr); break; - case AliceO2::ITS::Detector::kIBModel0: + case Detector::kIBModel0: mechStavVol = CreateStaveModelInnerB0(xsta, zsta, mgr); break; - case AliceO2::ITS::Detector::kIBModel1: + case Detector::kIBModel1: mechStavVol = CreateStaveModelInnerB1(xsta, zsta, mgr); break; - case AliceO2::ITS::Detector::kIBModel21: + case Detector::kIBModel21: mechStavVol = CreateStaveModelInnerB21(xsta, zsta, mgr); break; - case AliceO2::ITS::Detector::kIBModel22: + case Detector::kIBModel22: mechStavVol = CreateStaveModelInnerB22(xsta, zsta, mgr); break; - case AliceO2::ITS::Detector::kIBModel3: + case Detector::kIBModel3: mechStavVol = CreateStaveModelInnerB3(xsta, zsta, mgr); break; default: @@ -521,17 +515,15 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveStructInnerB(const Double_t return mechStavVol; } -TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelInnerBDummy(const Double_t, - const Double_t, - const TGeoManager*) const +TGeoVolume* UpgradeV1Layer::CreateStaveModelInnerBDummy(const Double_t, const Double_t, + const TGeoManager*) const { // Done, return the stave structur return 0; } -TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelInnerB0(const Double_t xsta, - const Double_t zsta, - const TGeoManager* mgr) +TGeoVolume* UpgradeV1Layer::CreateStaveModelInnerB0(const Double_t xsta, const Double_t zsta, + const TGeoManager* mgr) { // Materials defined in Detector TGeoMedium* medAir = mgr->GetMedium("ITS_AIR$"); @@ -624,29 +616,29 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelInnerB0(const Double_t for (int i = 1; i < loop; i++) { // i<60;i++){ mechStavVol->AddNode( - volT2, 4 * i + 0, - new TGeoCombiTrans( - x + kWidth, y + (2 * kConeOutRadius), - z - kStaveLength / 2 + (i * (4 / n) * kL1) + kS1 / 2, // z-14.25+(i*2*kL1), - new TGeoRotation("volT2", 90, 90 - kAlpha, 90 - kBeta))); + volT2, 4 * i + 0, + new TGeoCombiTrans( + x + kWidth, y + (2 * kConeOutRadius), + z - kStaveLength / 2 + (i * (4 / n) * kL1) + kS1 / 2, // z-14.25+(i*2*kL1), + new TGeoRotation("volT2", 90, 90 - kAlpha, 90 - kBeta))); mechStavVol->AddNode( - volT2, 4 * i + 1, - new TGeoCombiTrans( - x - kWidth, y + (2 * kConeOutRadius), - z - kStaveLength / 2 + (i * (4 / n) * kL1) + kS1 / 2, // z-14.25+(i*2*kL1), - new TGeoRotation("volT2", 90, -90 + kAlpha, -90 + kBeta))); + volT2, 4 * i + 1, + new TGeoCombiTrans( + x - kWidth, y + (2 * kConeOutRadius), + z - kStaveLength / 2 + (i * (4 / n) * kL1) + kS1 / 2, // z-14.25+(i*2*kL1), + new TGeoRotation("volT2", 90, -90 + kAlpha, -90 + kBeta))); mechStavVol->AddNode( - volT2, 4 * i + 2, - new TGeoCombiTrans( - x + kWidth, y + (2 * kConeOutRadius), - z - kStaveLength / 2 + (i * (4 / n) * kL1) + kS1 / 2, // z-14.25+(i*2*kL1), - new TGeoRotation("volT2", 90, -90 + kAlpha, 90 - kBeta))); + volT2, 4 * i + 2, + new TGeoCombiTrans( + x + kWidth, y + (2 * kConeOutRadius), + z - kStaveLength / 2 + (i * (4 / n) * kL1) + kS1 / 2, // z-14.25+(i*2*kL1), + new TGeoRotation("volT2", 90, -90 + kAlpha, 90 - kBeta))); mechStavVol->AddNode( - volT2, 4 * i + 3, - new TGeoCombiTrans( - x - kWidth, y + (2 * kConeOutRadius), - z - kStaveLength / 2 + (i * (4 / n) * kL1) + kS1 / 2, // z-14.25+(i*2*kL1), - new TGeoRotation("volT2", 90, 90 - kAlpha, -90 + kBeta))); + volT2, 4 * i + 3, + new TGeoCombiTrans( + x - kWidth, y + (2 * kConeOutRadius), + z - kStaveLength / 2 + (i * (4 / n) * kL1) + kS1 / 2, // z-14.25+(i*2*kL1), + new TGeoRotation("volT2", 90, 90 - kAlpha, -90 + kBeta))); } // Bottom CFRP Filament black-12 Carbon structure TGeoBBox (thickness,width,length) @@ -657,25 +649,25 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelInnerB0(const Double_t for (int i = 1; i < loop; i++) { mechStavVol->AddNode( - volT1, 4 * i + 0, - new TGeoCombiTrans(x + kWidth, y - kHeight, z - kStaveLength / 2 + ((4 / n) * kL1 * i) + - kS1 / 2, // z-14.25+(i*2*kL1), - new TGeoRotation("volT1", -90, kAlpha, 0))); + volT1, 4 * i + 0, + new TGeoCombiTrans(x + kWidth, y - kHeight, z - kStaveLength / 2 + ((4 / n) * kL1 * i) + + kS1 / 2, // z-14.25+(i*2*kL1), + new TGeoRotation("volT1", -90, kAlpha, 0))); mechStavVol->AddNode( - volT1, 4 * i + 1, - new TGeoCombiTrans(x - kWidth, y - kHeight, z - kStaveLength / 2 + ((4 / n) * kL1 * i) + - kS1 / 2, // z-14.25+(i*2*kL1), - new TGeoRotation("volT1", 90, kAlpha, 0))); + volT1, 4 * i + 1, + new TGeoCombiTrans(x - kWidth, y - kHeight, z - kStaveLength / 2 + ((4 / n) * kL1 * i) + + kS1 / 2, // z-14.25+(i*2*kL1), + new TGeoRotation("volT1", 90, kAlpha, 0))); mechStavVol->AddNode( - volT1, 4 * i + 2, - new TGeoCombiTrans(x + kWidth, y - kHeight, z - kStaveLength / 2 + (i * (4 / n) * kL1) + - kS1 / 2, // z-14.25+(i*2*kL1), - new TGeoRotation("volT1", -90, -kAlpha, 0))); + volT1, 4 * i + 2, + new TGeoCombiTrans(x + kWidth, y - kHeight, z - kStaveLength / 2 + (i * (4 / n) * kL1) + + kS1 / 2, // z-14.25+(i*2*kL1), + new TGeoRotation("volT1", -90, -kAlpha, 0))); mechStavVol->AddNode( - volT1, 4 * i + 3, - new TGeoCombiTrans(x - kWidth, y - kHeight, z - kStaveLength / 2 + (i * (4 / n) * kL1) + - kS1 / 2, // z-14.25+(i*2*kL1), - new TGeoRotation("volT1", -90, +kAlpha, 0))); + volT1, 4 * i + 3, + new TGeoCombiTrans(x - kWidth, y - kHeight, z - kStaveLength / 2 + (i * (4 / n) * kL1) + + kS1 / 2, // z-14.25+(i*2*kL1), + new TGeoRotation("volT1", -90, +kAlpha, 0))); } } @@ -688,25 +680,25 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelInnerB0(const Double_t for (int i = 1; i < loop; i++) { // i<60;i++){ mechStavVol->AddNode( - volTG, 4 * i + 0, - new TGeoCombiTrans(x + kWidth, y - 0.16, z - kStaveLength / 2 + ((4 / n) * kL1 * i) + - kS1 / 2, // z-14.25+(2*kL1*i), - new TGeoRotation("volTG", -90, kAlpha, 0))); + volTG, 4 * i + 0, + new TGeoCombiTrans(x + kWidth, y - 0.16, z - kStaveLength / 2 + ((4 / n) * kL1 * i) + + kS1 / 2, // z-14.25+(2*kL1*i), + new TGeoRotation("volTG", -90, kAlpha, 0))); mechStavVol->AddNode( - volTG, 4 * i + 1, - new TGeoCombiTrans(x - kWidth, y - 0.16, z - kStaveLength / 2 + ((4 / n) * kL1 * i) + - kS1 / 2, // z-14.25+(2*kL1*i), - new TGeoRotation("volTG", 90, kAlpha, 0))); + volTG, 4 * i + 1, + new TGeoCombiTrans(x - kWidth, y - 0.16, z - kStaveLength / 2 + ((4 / n) * kL1 * i) + + kS1 / 2, // z-14.25+(2*kL1*i), + new TGeoRotation("volTG", 90, kAlpha, 0))); mechStavVol->AddNode( - volTG, 4 * i + 2, - new TGeoCombiTrans(x + kWidth, y - 0.16, z - kStaveLength / 2 + ((4 / n) * i * kL1) + - kS1 / 2, // z-14.25+(i*2*kL1), - new TGeoRotation("volTG", -90, -kAlpha, 0))); + volTG, 4 * i + 2, + new TGeoCombiTrans(x + kWidth, y - 0.16, z - kStaveLength / 2 + ((4 / n) * i * kL1) + + kS1 / 2, // z-14.25+(i*2*kL1), + new TGeoRotation("volTG", -90, -kAlpha, 0))); mechStavVol->AddNode( - volTG, 4 * i + 3, - new TGeoCombiTrans(x - kWidth, y - 0.16, z - kStaveLength / 2 + (i * (4 / n) * kL1) + - kS1 / 2, // z-14.25+(i*2*kL1), - new TGeoRotation("volTG", -90, +kAlpha, 0))); + volTG, 4 * i + 3, + new TGeoCombiTrans(x - kWidth, y - 0.16, z - kStaveLength / 2 + (i * (4 / n) * kL1) + + kS1 / 2, // z-14.25+(i*2*kL1), + new TGeoRotation("volTG", -90, +kAlpha, 0))); } TGeoBBox* glue = new TGeoBBox(xsta, 0.005 / 2, zsta); @@ -725,16 +717,16 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelInnerB0(const Double_t TGeoVolume* volCable = new TGeoVolume("FlexCable", kapCable, medFlexCable); volCable->SetLineColor(28); volCable->SetFillColor(28); - mechStavVol->AddNode(volCable, 0, new TGeoCombiTrans(x, y - 0.165 - mSensorThickness - 0.005 - 0.01, - z, new TGeoRotation("", 0, 0, 0))); + mechStavVol->AddNode(volCable, 0, + new TGeoCombiTrans(x, y - 0.165 - mSensorThickness - 0.005 - 0.01, z, + new TGeoRotation("", 0, 0, 0))); } // Done, return the stave structur return mechStavVol; } -TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelInnerB1(const Double_t xsta, - const Double_t zsta, - const TGeoManager* mgr) +TGeoVolume* UpgradeV1Layer::CreateStaveModelInnerB1(const Double_t xsta, const Double_t zsta, + const TGeoManager* mgr) { // Materials defined in Detector TGeoMedium* medAir = mgr->GetMedium("ITS_AIR$"); @@ -842,15 +834,15 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelInnerB1(const Double_t z - kStaveLength / 2 + (4 * kL1 * i) + kS1 / 2, new TGeoRotation("volT1", 90, kAlpha, 0))); mechStavVol->AddNode( - volT1, 4 * i + 2, - new TGeoCombiTrans(x + kWidth, y - kHeight + 0.04 + filHeight / 2, - z - kStaveLength / 2 + 2 * kL1 + (i * 4 * kL1) + kS1 / 2, - new TGeoRotation("volT1", -90, -kAlpha, 0))); + volT1, 4 * i + 2, + new TGeoCombiTrans(x + kWidth, y - kHeight + 0.04 + filHeight / 2, + z - kStaveLength / 2 + 2 * kL1 + (i * 4 * kL1) + kS1 / 2, + new TGeoRotation("volT1", -90, -kAlpha, 0))); mechStavVol->AddNode( - volT1, 4 * i + 3, - new TGeoCombiTrans(x - kWidth, y - kHeight + 0.04 + filHeight / 2, - z - kStaveLength / 2 + 2 * kL1 + (i * 4 * kL1) + kS1 / 2, - new TGeoRotation("volT1", -90, +kAlpha, 0))); + volT1, 4 * i + 3, + new TGeoCombiTrans(x - kWidth, y - kHeight + 0.04 + filHeight / 2, + z - kStaveLength / 2 + 2 * kL1 + (i * 4 * kL1) + kS1 / 2, + new TGeoRotation("volT1", -90, +kAlpha, 0))); } // Top filament CFRP black-12 Carbon structure TGeoBBox (length,thickness,width) @@ -860,25 +852,25 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelInnerB1(const Double_t volT2->SetFillColor(12); for (int i = 0; i < loop; i++) { // i<30;i++){ mechStavVol->AddNode( - volT2, 4 * i + 0, - new TGeoCombiTrans(x + kWidth, y + 0.04 + filHeight / 2, - z - kStaveLength / 2 + (i * 4 * kL1) + kS1 / 2, - new TGeoRotation("volT2", 90, 90 - kAlpha, 90 - kBeta))); + volT2, 4 * i + 0, + new TGeoCombiTrans(x + kWidth, y + 0.04 + filHeight / 2, + z - kStaveLength / 2 + (i * 4 * kL1) + kS1 / 2, + new TGeoRotation("volT2", 90, 90 - kAlpha, 90 - kBeta))); mechStavVol->AddNode( - volT2, 4 * i + 1, - new TGeoCombiTrans(x - kWidth, y + 0.04 + filHeight / 2, - z - kStaveLength / 2 + (i * 4 * kL1) + kS1 / 2, - new TGeoRotation("volT2", 90, -90 + kAlpha, -90 + kBeta))); + volT2, 4 * i + 1, + new TGeoCombiTrans(x - kWidth, y + 0.04 + filHeight / 2, + z - kStaveLength / 2 + (i * 4 * kL1) + kS1 / 2, + new TGeoRotation("volT2", 90, -90 + kAlpha, -90 + kBeta))); mechStavVol->AddNode( - volT2, 4 * i + 2, - new TGeoCombiTrans(x + kWidth, y + 0.04 + filHeight / 2, - z - kStaveLength / 2 + 2 * kL1 + (i * 4 * kL1) + kS1 / 2, - new TGeoRotation("volT2", 90, -90 + kAlpha, 90 - kBeta))); + volT2, 4 * i + 2, + new TGeoCombiTrans(x + kWidth, y + 0.04 + filHeight / 2, + z - kStaveLength / 2 + 2 * kL1 + (i * 4 * kL1) + kS1 / 2, + new TGeoRotation("volT2", 90, -90 + kAlpha, 90 - kBeta))); mechStavVol->AddNode( - volT2, 4 * i + 3, - new TGeoCombiTrans(x - kWidth, y + 0.04 + filHeight / 2, - z - kStaveLength / 2 + 2 * kL1 + (i * 4 * kL1) + kS1 / 2, - new TGeoRotation("volT2", 90, 90 - kAlpha, -90 + kBeta))); + volT2, 4 * i + 3, + new TGeoCombiTrans(x - kWidth, y + 0.04 + filHeight / 2, + z - kStaveLength / 2 + 2 * kL1 + (i * 4 * kL1) + kS1 / 2, + new TGeoRotation("volT2", 90, 90 - kAlpha, -90 + kBeta))); } } @@ -898,15 +890,15 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelInnerB1(const Double_t z - kStaveLength / 2 + (4 * kL1 * i) + kS1 / 2, new TGeoRotation("volT1", 90, kAlpha, 0))); mechStavVol->AddNode( - volT3, 4 * i + 2, - new TGeoCombiTrans(x + kWidth, y - kHeight + 0.0325, - z - kStaveLength / 2 + 2 * kL1 + (i * 4 * kL1) + kS1 / 2, - new TGeoRotation("volT1", -90, -kAlpha, 0))); + volT3, 4 * i + 2, + new TGeoCombiTrans(x + kWidth, y - kHeight + 0.0325, + z - kStaveLength / 2 + 2 * kL1 + (i * 4 * kL1) + kS1 / 2, + new TGeoRotation("volT1", -90, -kAlpha, 0))); mechStavVol->AddNode( - volT3, 4 * i + 3, - new TGeoCombiTrans(x - kWidth, y - kHeight + 0.0325, - z - kStaveLength / 2 + 2 * kL1 + (i * 4 * kL1) + kS1 / 2, - new TGeoRotation("volT1", -90, +kAlpha, 0))); + volT3, 4 * i + 3, + new TGeoCombiTrans(x - kWidth, y - kHeight + 0.0325, + z - kStaveLength / 2 + 2 * kL1 + (i * 4 * kL1) + kS1 / 2, + new TGeoRotation("volT1", -90, +kAlpha, 0))); } // Glue microchannel and sensor @@ -931,16 +923,16 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelInnerB1(const Double_t TGeoVolume* volCable = new TGeoVolume("FlexCable", kapCable, medFlexCable); volCable->SetLineColor(28); volCable->SetFillColor(28); - mechStavVol->AddNode(volCable, 0, new TGeoCombiTrans(x, y - 0.165 - mSensorThickness - 0.005 - 0.01, - z, new TGeoRotation("", 0, 0, 0))); + mechStavVol->AddNode(volCable, 0, + new TGeoCombiTrans(x, y - 0.165 - mSensorThickness - 0.005 - 0.01, z, + new TGeoRotation("", 0, 0, 0))); } // Done, return the stave structur return mechStavVol; } -TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelInnerB21(const Double_t xsta, - const Double_t zsta, - const TGeoManager* mgr) +TGeoVolume* UpgradeV1Layer::CreateStaveModelInnerB21(const Double_t xsta, const Double_t zsta, + const TGeoManager* mgr) { // Materials defined in Detector TGeoMedium* medAir = mgr->GetMedium("ITS_AIR$"); @@ -1001,7 +993,7 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelInnerB21(const Double_ // Pipe Kapton grey-35 TGeoCone* cone1 = - new TGeoCone(kStaveLength, kConeInRadius, kConeOutRadius, kConeInRadius, kConeOutRadius); + new TGeoCone(kStaveLength, kConeInRadius, kConeOutRadius, kConeInRadius, kConeOutRadius); TGeoVolume* volCone1 = new TGeoVolume("PolyimidePipe", cone1, medKapton); volCone1->SetFillColor(35); volCone1->SetLineColor(35); @@ -1022,32 +1014,32 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelInnerB21(const Double_ // top fillament // Top filament M60J black-12 Carbon structure TGeoBBox (length,thickness,width) TGeoBBox* t2 = - new TGeoBBox(kS2, 0.02 / 2, 0.04 / 2); // TGeoBBox *t2=new TGeoBBox(kS2,0.01,0.02); + new TGeoBBox(kS2, 0.02 / 2, 0.04 / 2); // TGeoBBox *t2=new TGeoBBox(kS2,0.01,0.02); TGeoVolume* volT2 = new TGeoVolume("TopFilament", t2, medM60J3K); volT2->SetLineColor(12); volT2->SetFillColor(12); for (int i = 0; i < loop; i++) { // i<28;i++){ mechStavVol->AddNode( - volT2, i * 4 + 1, - new TGeoCombiTrans(x + kWidth, y + kHeight + (0.12 / 2) - 0.014 + 0.007, - z - kStaveLength + (i * 4 * kL1) + kS1 / 2, - new TGeoRotation("volT2", 90, 90 - kAlpha, 90 - kBeta))); + volT2, i * 4 + 1, + new TGeoCombiTrans(x + kWidth, y + kHeight + (0.12 / 2) - 0.014 + 0.007, + z - kStaveLength + (i * 4 * kL1) + kS1 / 2, + new TGeoRotation("volT2", 90, 90 - kAlpha, 90 - kBeta))); mechStavVol->AddNode( - volT2, i * 4 + 2, - new TGeoCombiTrans(x - kWidth, y + kHeight + (0.12 / 2) - 0.014 + 0.007, - z - kStaveLength + (i * 4 * kL1) + kS1 / 2, - new TGeoRotation("volT2", 90, -90 + kAlpha, -90 + kBeta))); + volT2, i * 4 + 2, + new TGeoCombiTrans(x - kWidth, y + kHeight + (0.12 / 2) - 0.014 + 0.007, + z - kStaveLength + (i * 4 * kL1) + kS1 / 2, + new TGeoRotation("volT2", 90, -90 + kAlpha, -90 + kBeta))); mechStavVol->AddNode( - volT2, i * 4 + 3, - new TGeoCombiTrans(x + kWidth, y + kHeight + (0.12 / 2) - 0.014 + 0.007, - z - kStaveLength + 2 * kL1 + (i * 4 * kL1) + kS1 / 2, - new TGeoRotation("volT2", 90, -90 + kAlpha, 90 - kBeta))); + volT2, i * 4 + 3, + new TGeoCombiTrans(x + kWidth, y + kHeight + (0.12 / 2) - 0.014 + 0.007, + z - kStaveLength + 2 * kL1 + (i * 4 * kL1) + kS1 / 2, + new TGeoRotation("volT2", 90, -90 + kAlpha, 90 - kBeta))); mechStavVol->AddNode( - volT2, i * 4 + 4, - new TGeoCombiTrans(x - kWidth, y + kHeight + (0.12 / 2) - 0.014 + 0.007, - z - kStaveLength + 2 * kL1 + (i * 4 * kL1) + kS1 / 2, - new TGeoRotation("volT2", 90, 90 - kAlpha, -90 + kBeta))); + volT2, i * 4 + 4, + new TGeoCombiTrans(x - kWidth, y + kHeight + (0.12 / 2) - 0.014 + 0.007, + z - kStaveLength + 2 * kL1 + (i * 4 * kL1) + kS1 / 2, + new TGeoRotation("volT2", 90, 90 - kAlpha, -90 + kBeta))); // mechStavVol->AddNode(volT2,i*4+1,new // TGeoCombiTrans(x+kWidth+0.0036,y+kHeight-(0.12/2)+0.072,z+kStaveLength+(i*4*kL1)+kS1/2, new // TGeoRotation("volT2",90,90-kAlpha,90-kBeta))); @@ -1082,8 +1074,8 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelInnerB21(const Double_ // Amec Thermasol red-2 cover tube FGS300 TGeoConeSeg* cons1 = - new TGeoConeSeg(kStaveLength - 0.50, kConeOutRadius, kConeOutRadius + kLay1, kConeOutRadius, - kConeOutRadius + kLay1, 0, 180); + new TGeoConeSeg(kStaveLength - 0.50, kConeOutRadius, kConeOutRadius + kLay1, kConeOutRadius, + kConeOutRadius + kLay1, 0, 180); TGeoVolume* cone11 = new TGeoVolume("ThermasolPipeCover", cons1, medFGS003); cone11->SetFillColor(2); cone11->SetLineColor(2); @@ -1093,7 +1085,7 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelInnerB21(const Double_ new TGeoCombiTrans(x - 0.25, y, z, new TGeoRotation("Cone11", 0, 0, 0))); TGeoBBox* box2 = - new TGeoBBox((0.50 - (2 * kConeOutRadius)) / 2, kLay1 / 2, kStaveLength - 0.50); + new TGeoBBox((0.50 - (2 * kConeOutRadius)) / 2, kLay1 / 2, kStaveLength - 0.50); TGeoVolume* plate2 = new TGeoVolume("ThermasolMiddle", box2, medFGS003); plate2->SetFillColor(2); plate2->SetLineColor(2); @@ -1101,20 +1093,18 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelInnerB21(const Double_ new TGeoRotation("plate2", 0, 0, 0))); TGeoBBox* box21 = - new TGeoBBox((0.75 - 0.25 - kConeOutRadius - kLay1) / 2, kLay1 / 2, kStaveLength - 0.50); + new TGeoBBox((0.75 - 0.25 - kConeOutRadius - kLay1) / 2, kLay1 / 2, kStaveLength - 0.50); TGeoVolume* plate21 = new TGeoVolume("ThermasolLeftRight", box21, medFGS003); plate21->SetFillColor(2); plate21->SetLineColor(2); mechStavVol->AddNode( - plate21, 1, - new TGeoCombiTrans( - x + 0.25 + kConeOutRadius + (0.75 - 0.25 - kConeOutRadius) / 2 - (kLay1 / 2), - y - kConeOutRadius + (kLay1 / 2), z, new TGeoRotation("plate21", 0, 0, 0))); + plate21, 1, new TGeoCombiTrans( + x + 0.25 + kConeOutRadius + (0.75 - 0.25 - kConeOutRadius) / 2 - (kLay1 / 2), + y - kConeOutRadius + (kLay1 / 2), z, new TGeoRotation("plate21", 0, 0, 0))); mechStavVol->AddNode( - plate21, 2, - new TGeoCombiTrans( - x - 0.25 - kConeOutRadius - (0.75 - 0.25 - kConeOutRadius) / 2 + (kLay1 / 2), - y - kConeOutRadius + (kLay1 / 2), z, new TGeoRotation("plate21", 0, 0, 0))); + plate21, 2, new TGeoCombiTrans( + x - 0.25 - kConeOutRadius - (0.75 - 0.25 - kConeOutRadius) / 2 + (kLay1 / 2), + y - kConeOutRadius + (kLay1 / 2), z, new TGeoRotation("plate21", 0, 0, 0))); TGeoBBox* box22 = new TGeoBBox((kLay1 / 2), kConeOutRadius / 2, kStaveLength - 0.50); TGeoVolume* plate22 = new TGeoVolume("ThermasolVertical", box22, medFGS003); @@ -1135,8 +1125,8 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelInnerB21(const Double_ // C Fleece TGeoConeSeg* cons2 = - new TGeoConeSeg(kStaveLength - 0.50, kConeOutRadius + kLay1, kConeOutRadius + kLay1 + kLay2, - kConeOutRadius + kLay1, kConeOutRadius + kLay1 + kLay2, 0, 180); + new TGeoConeSeg(kStaveLength - 0.50, kConeOutRadius + kLay1, kConeOutRadius + kLay1 + kLay2, + kConeOutRadius + kLay1, kConeOutRadius + kLay1 + kLay2, 0, 180); TGeoVolume* cone12 = new TGeoVolume("CFleecePipeCover", cons2, medCarbonFleece); cone12->SetFillColor(28); cone12->SetLineColor(28); @@ -1146,7 +1136,7 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelInnerB21(const Double_ new TGeoCombiTrans(x - 0.25, y, z, new TGeoRotation("Cone12", 0, 0, 0))); TGeoBBox* box3 = - new TGeoBBox((0.50 - (2 * (kConeOutRadius + kLay1))) / 2, kLay2 / 2, kStaveLength - 0.50); + new TGeoBBox((0.50 - (2 * (kConeOutRadius + kLay1))) / 2, kLay2 / 2, kStaveLength - 0.50); TGeoVolume* plate3 = new TGeoVolume("CFleeceMiddle", box3, medCarbonFleece); plate3->SetFillColor(28); plate3->SetLineColor(28); @@ -1154,20 +1144,20 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelInnerB21(const Double_ z, new TGeoRotation("plate3", 0, 0, 0))); TGeoBBox* box31 = - new TGeoBBox((0.75 - 0.25 - kConeOutRadius - kLay1) / 2, kLay2 / 2, kStaveLength - 0.50); + new TGeoBBox((0.75 - 0.25 - kConeOutRadius - kLay1) / 2, kLay2 / 2, kStaveLength - 0.50); TGeoVolume* plate31 = new TGeoVolume("CFleeceLeftRight", box31, medCarbonFleece); plate31->SetFillColor(28); plate31->SetLineColor(28); mechStavVol->AddNode( - plate31, 1, - new TGeoCombiTrans( - x + 0.25 + kConeOutRadius + kLay1 + (0.75 - 0.25 - kConeOutRadius - kLay1) / 2, - y - kConeOutRadius + kLay1 + (kLay2 / 2), z, new TGeoRotation("plate31", 0, 0, 0))); + plate31, 1, + new TGeoCombiTrans( + x + 0.25 + kConeOutRadius + kLay1 + (0.75 - 0.25 - kConeOutRadius - kLay1) / 2, + y - kConeOutRadius + kLay1 + (kLay2 / 2), z, new TGeoRotation("plate31", 0, 0, 0))); mechStavVol->AddNode( - plate31, 2, - new TGeoCombiTrans( - x - 0.25 - kConeOutRadius - kLay1 - (0.75 - 0.25 - kConeOutRadius - kLay1) / 2, - y - kConeOutRadius + kLay1 + (kLay2 / 2), z, new TGeoRotation("plate31", 0, 0, 0))); + plate31, 2, + new TGeoCombiTrans( + x - 0.25 - kConeOutRadius - kLay1 - (0.75 - 0.25 - kConeOutRadius - kLay1) / 2, + y - kConeOutRadius + kLay1 + (kLay2 / 2), z, new TGeoRotation("plate31", 0, 0, 0))); TGeoBBox* box32 = new TGeoBBox((kLay2 / 2), (kConeOutRadius - kLay1) / 2, kStaveLength - 0.50); TGeoVolume* plate32 = new TGeoVolume("CFleeceVertical", box32, medCarbonFleece); @@ -1215,8 +1205,8 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelInnerB21(const Double_ volGlue->SetLineColor(5); volGlue->SetFillColor(5); mechStavVol->AddNode( - volGlue, 0, new TGeoCombiTrans(x, y - (kConeOutRadius + kLay3 + (kLay2 / 2) + (0.01 / 2)), - z, new TGeoRotation("", 0, 0, 0))); + volGlue, 0, new TGeoCombiTrans(x, y - (kConeOutRadius + kLay3 + (kLay2 / 2) + (0.01 / 2)), z, + new TGeoRotation("", 0, 0, 0))); mechStavVol->AddNode(volGlue, 1, new TGeoCombiTrans(x, y - (kConeOutRadius + kLay3 + (kLay2 / 2) + 0.01 + mSensorThickness + (0.01 / 2)), @@ -1237,9 +1227,8 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelInnerB21(const Double_ return mechStavVol; } // new model22 -TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelInnerB22(const Double_t xsta, - const Double_t zsta, - const TGeoManager* mgr) +TGeoVolume* UpgradeV1Layer::CreateStaveModelInnerB22(const Double_t xsta, const Double_t zsta, + const TGeoManager* mgr) { // Materials defined in Detector TGeoMedium* medAir = mgr->GetMedium("ITS_AIR$"); @@ -1255,7 +1244,7 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelInnerB22(const Double_ // Local parameters Double_t kConeOutRadius = (0.1024 + 0.0025) / 2; // 0.107/2; - Double_t kConeInRadius = 0.1024 / 2; // 0.10105/2 + Double_t kConeInRadius = 0.1024 / 2; // 0.10105/2 Double_t kStaveLength = zsta; Double_t kStaveWidth = xsta * 2; Double_t kWidth = (kStaveWidth) / 4; @@ -1272,7 +1261,7 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelInnerB22(const Double_ Double_t klay2 = 0.002; // C Fleece carbon Double_t klay3 = 0.007; // CFplate K13D2U carbon Double_t klay4 = 0.007; // GluekStaveLength/2 - Double_t klay5 = 0.01; // Flex cable + Double_t klay5 = 0.01; // Flex cable Double_t kTopVertexMaxWidth = 0.072; Double_t kTopVertexHeight = 0.04; Double_t kSideVertexMWidth = 0.052; @@ -1293,10 +1282,10 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelInnerB22(const Double_ TGeoXtru* mechStruct = new TGeoXtru(2); // z sections Double_t xv[6] = { kStaveWidth / 2, kStaveWidth / 2, 0.012, -0.012, -kStaveWidth / 2, -kStaveWidth / 2 }; - //Double_t yv[6] = {-2*(kConeOutRadius+klay1+1.5*klay2+klay3+klay4+mSensorThickness+klay5), - // 0-0.02,kStaveHeight+0.01,kStaveHeight+0.01,0-0.02, - // -2*(kConeOutRadius+klay1+1.5*klay2+klay3+klay4+mSensorThickness+klay5)}; - // (kConeOutRadius*2)-0.0635 + // Double_t yv[6] = {-2*(kConeOutRadius+klay1+1.5*klay2+klay3+klay4+mSensorThickness+klay5), + // 0-0.02,kStaveHeight+0.01,kStaveHeight+0.01,0-0.02, + // -2*(kConeOutRadius+klay1+1.5*klay2+klay3+klay4+mSensorThickness+klay5)}; + // (kConeOutRadius*2)-0.0635 Double_t yv[6] = { -(kConeOutRadius * 2) - 0.06395, 0 - 0.02, kStaveHeight + 0.01, kStaveHeight + 0.01, 0 - 0.02, -(kConeOutRadius * 2) - 0.06395 @@ -1333,36 +1322,36 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelInnerB22(const Double_ // top fillament // Top filament M60J black-12 Carbon structure TGeoBBox (length,thickness,width) TGeoBBox* t2 = new TGeoBBox( - kS2 - 0.028, 0.02 / 2, - 0.02 / 2); // 0.04/2//TGeoBBox *t2=new TGeoBBox(kS2,0.01,0.02);//kS2-0.03 old Config.C + kS2 - 0.028, 0.02 / 2, + 0.02 / 2); // 0.04/2//TGeoBBox *t2=new TGeoBBox(kS2,0.01,0.02);//kS2-0.03 old Config.C TGeoVolume* volT2 = new TGeoVolume("TopFilament", t2, medM60J3K); volT2->SetLineColor(12); volT2->SetFillColor(12); for (int i = 0; i < loop; i++) { // i<28;i++){ - // 1) Front Left Top Filament + // 1) Front Left Top Filament mechStavVol->AddNode( - volT2, i * 4 + 1, - new TGeoCombiTrans(x + kWidth + 0.0036, y + kHeight + 0.01, - z - kStaveLength + 0.1 + (i * 4 * kL1) + kS1 / 2, - new TGeoRotation("volT2", 90, 90 - kAlpha, 90 - kBeta))); + volT2, i * 4 + 1, + new TGeoCombiTrans(x + kWidth + 0.0036, y + kHeight + 0.01, + z - kStaveLength + 0.1 + (i * 4 * kL1) + kS1 / 2, + new TGeoRotation("volT2", 90, 90 - kAlpha, 90 - kBeta))); // 2) Front Right Top Filament mechStavVol->AddNode( - volT2, i * 4 + 2, - new TGeoCombiTrans(x - kWidth - 0.0036, y + kHeight + 0.01, - z - kStaveLength + 0.1 + (i * 4 * kL1) + kS1 / 2, - new TGeoRotation("volT2", 90, -90 + kAlpha, -90 + kBeta))); + volT2, i * 4 + 2, + new TGeoCombiTrans(x - kWidth - 0.0036, y + kHeight + 0.01, + z - kStaveLength + 0.1 + (i * 4 * kL1) + kS1 / 2, + new TGeoRotation("volT2", 90, -90 + kAlpha, -90 + kBeta))); // 3) Back Left Top Filament mechStavVol->AddNode( - volT2, i * 4 + 3, - new TGeoCombiTrans(x + kWidth + 0.0036, y + kHeight + 0.01, - z - kStaveLength + 0.1 + 2 * kL1 + (i * 4 * kL1) + kS1 / 2, - new TGeoRotation("volT2", 90, -90 + kAlpha, 90 - kBeta))); + volT2, i * 4 + 3, + new TGeoCombiTrans(x + kWidth + 0.0036, y + kHeight + 0.01, + z - kStaveLength + 0.1 + 2 * kL1 + (i * 4 * kL1) + kS1 / 2, + new TGeoRotation("volT2", 90, -90 + kAlpha, 90 - kBeta))); // 4) Back Right Top Filament mechStavVol->AddNode( - volT2, i * 4 + 4, - new TGeoCombiTrans(x - kWidth - 0.0036, y + kHeight + 0.01, - z - kStaveLength + 0.1 + 2 * kL1 + (i * 4 * kL1) + kS1 / 2, - new TGeoRotation("volT2", 90, 90 - kAlpha, -90 + kBeta))); + volT2, i * 4 + 4, + new TGeoCombiTrans(x - kWidth - 0.0036, y + kHeight + 0.01, + z - kStaveLength + 0.1 + 2 * kL1 + (i * 4 * kL1) + kS1 / 2, + new TGeoRotation("volT2", 90, 90 - kAlpha, -90 + kBeta))); } // Vertex structure @@ -1372,8 +1361,8 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelInnerB22(const Double_ ibdv->SetFillColor(12); ibdv->SetLineColor(12); mechStavVol->AddNode( - ibdv, 1, new TGeoCombiTrans(x, y + kStaveHeight + 0.03, z, - new TGeoRotation("ibdv", 0., -90, 0))); // y+kStaveHeight+0.056 + ibdv, 1, new TGeoCombiTrans(x, y + kStaveHeight + 0.03, z, + new TGeoRotation("ibdv", 0., -90, 0))); // y+kStaveHeight+0.056 // left trd2 TGeoTrd1* trd2 = new TGeoTrd1(0, kSideVertexMWidth / 2, kStaveLength, kSideVertexHeight / 2); @@ -1381,10 +1370,10 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelInnerB22(const Double_ ibdv2->SetFillColor(12); ibdv2->SetLineColor(12); mechStavVol->AddNode( - ibdv2, 1, - new TGeoCombiTrans(x + kStaveWidth / 2 - 0.06, y - 0.0355, z, - new TGeoRotation("ibdv2", -103.3, 90, - 0))); // x-kStaveWidth/2-0.09 old Config.C y-0.0355, + ibdv2, 1, + new TGeoCombiTrans( + x + kStaveWidth / 2 - 0.06, y - 0.0355, z, + new TGeoRotation("ibdv2", -103.3, 90, 0))); // x-kStaveWidth/2-0.09 old Config.C y-0.0355, // right trd3 TGeoTrd1* trd3 = new TGeoTrd1(0, kSideVertexMWidth / 2, kStaveLength, kSideVertexHeight / 2); @@ -1392,14 +1381,14 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelInnerB22(const Double_ ibdv3->SetFillColor(12); ibdv3->SetLineColor(12); mechStavVol->AddNode( - ibdv3, 1, new TGeoCombiTrans(x - kStaveWidth / 2 + 0.06, y - 0.0355, z, - new TGeoRotation("ibdv3", 103.3, 90, - 0))); // x-kStaveWidth/2+0.09 old Config.C + ibdv3, 1, new TGeoCombiTrans( + x - kStaveWidth / 2 + 0.06, y - 0.0355, z, + new TGeoRotation("ibdv3", 103.3, 90, 0))); // x-kStaveWidth/2+0.09 old Config.C // Carbon Fleece TGeoConeSeg* cons2 = - new TGeoConeSeg(zsta, kConeOutRadius + klay1, kConeOutRadius + klay1 + klay2, - kConeOutRadius + klay1, kConeOutRadius + klay1 + klay2, 0, 180); + new TGeoConeSeg(zsta, kConeOutRadius + klay1, kConeOutRadius + klay1 + klay2, + kConeOutRadius + klay1, kConeOutRadius + klay1 + klay2, 0, 180); TGeoVolume* cone12 = new TGeoVolume("CarbonFleecePipeCover", cons2, medCarbonFleece); cone12->SetFillColor(28); cone12->SetLineColor(28); @@ -1417,20 +1406,20 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelInnerB22(const Double_ z, new TGeoRotation("plate3", 0, 0, 0))); TGeoBBox* box31 = - new TGeoBBox((0.75 - 0.25 - kConeOutRadius - klay1) / 2 + 0.0025, klay2 / 2, zsta); + new TGeoBBox((0.75 - 0.25 - kConeOutRadius - klay1) / 2 + 0.0025, klay2 / 2, zsta); TGeoVolume* plate31 = new TGeoVolume("CarbonFleeceLeftRight", box31, medCarbonFleece); plate31->SetFillColor(28); plate31->SetLineColor(28); mechStavVol->AddNode( - plate31, 1, - new TGeoCombiTrans( - x + 0.25 + kConeOutRadius + klay1 + (0.75 - 0.25 - kConeOutRadius - klay1) / 2, - y - kConeOutRadius + klay1 + (klay2 / 2), z, new TGeoRotation("plate31", 0, 0, 0))); + plate31, 1, + new TGeoCombiTrans( + x + 0.25 + kConeOutRadius + klay1 + (0.75 - 0.25 - kConeOutRadius - klay1) / 2, + y - kConeOutRadius + klay1 + (klay2 / 2), z, new TGeoRotation("plate31", 0, 0, 0))); mechStavVol->AddNode( - plate31, 2, - new TGeoCombiTrans( - x - 0.25 - kConeOutRadius - klay1 - (0.75 - 0.25 - kConeOutRadius - klay1) / 2, - y - kConeOutRadius + klay1 + (klay2 / 2), z, new TGeoRotation("plate31", 0, 0, 0))); + plate31, 2, + new TGeoCombiTrans( + x - 0.25 - kConeOutRadius - klay1 - (0.75 - 0.25 - kConeOutRadius - klay1) / 2, + y - kConeOutRadius + klay1 + (klay2 / 2), z, new TGeoRotation("plate31", 0, 0, 0))); TGeoBBox* box32 = new TGeoBBox((klay2 / 2), (kConeOutRadius - klay1) / 2, zsta); TGeoVolume* plate32 = new TGeoVolume("CarbonFleeceVertical", box32, medCarbonFleece); @@ -1455,8 +1444,8 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelInnerB22(const Double_ // Amec Thermasol red-2 cover tube FGS300 or Carbon Paper TGeoConeSeg* cons1 = - new TGeoConeSeg(zsta, kConeOutRadius, kConeOutRadius + klay1 - 0.0001, kConeOutRadius, - kConeOutRadius + klay1 - 0.0001, 0, 180); // kConeOutRadius+klay1-0.0001 + new TGeoConeSeg(zsta, kConeOutRadius, kConeOutRadius + klay1 - 0.0001, kConeOutRadius, + kConeOutRadius + klay1 - 0.0001, 0, 180); // kConeOutRadius+klay1-0.0001 TGeoVolume* cone11 = new TGeoVolume("ThermasolPipeCover", cons1, medFGS003); cone11->SetFillColor(2); cone11->SetLineColor(2); @@ -1466,7 +1455,7 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelInnerB22(const Double_ new TGeoCombiTrans(x - 0.25, y, z, new TGeoRotation("cone11", 0, 0, 0))); TGeoBBox* box2 = - new TGeoBBox((0.50 - (2 * kConeOutRadius)) / 2, (klay1 / 2), zsta); // kStaveLength-0.50); + new TGeoBBox((0.50 - (2 * kConeOutRadius)) / 2, (klay1 / 2), zsta); // kStaveLength-0.50); TGeoVolume* plate2 = new TGeoVolume("ThermasolMiddle", box2, medFGS003); plate2->SetFillColor(2); plate2->SetLineColor(2); @@ -1474,20 +1463,20 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelInnerB22(const Double_ new TGeoRotation("plate2", 0, 0, 0))); TGeoBBox* box21 = - new TGeoBBox((0.75 - 0.25 - kConeOutRadius - klay1) / 2 + 0.0025, (klay1 / 2), zsta); + new TGeoBBox((0.75 - 0.25 - kConeOutRadius - klay1) / 2 + 0.0025, (klay1 / 2), zsta); TGeoVolume* plate21 = new TGeoVolume("ThermasolLeftRight", box21, medFGS003); plate21->SetFillColor(2); plate21->SetLineColor(2); mechStavVol->AddNode( - plate21, 1, - new TGeoCombiTrans( - x + 0.25 + kConeOutRadius + (0.75 - 0.25 - kConeOutRadius) / 2 - (klay1 / 2) + 0.0025, - y - kConeOutRadius + (klay1 / 2), z, new TGeoRotation("plate21", 0, 0, 0))); + plate21, 1, + new TGeoCombiTrans( + x + 0.25 + kConeOutRadius + (0.75 - 0.25 - kConeOutRadius) / 2 - (klay1 / 2) + 0.0025, + y - kConeOutRadius + (klay1 / 2), z, new TGeoRotation("plate21", 0, 0, 0))); mechStavVol->AddNode( - plate21, 2, - new TGeoCombiTrans( - x - 0.25 - kConeOutRadius - (0.75 - 0.25 - kConeOutRadius) / 2 + (klay1 / 2) - 0.0025, - y - kConeOutRadius + (klay1 / 2), z, new TGeoRotation("plate21", 0, 0, 0))); + plate21, 2, + new TGeoCombiTrans( + x - 0.25 - kConeOutRadius - (0.75 - 0.25 - kConeOutRadius) / 2 + (klay1 / 2) - 0.0025, + y - kConeOutRadius + (klay1 / 2), z, new TGeoRotation("plate21", 0, 0, 0))); TGeoBBox* box22 = new TGeoBBox((klay1 / 2), kConeOutRadius / 2, zsta); TGeoVolume* plate22 = new TGeoVolume("ThermasolVertical", box22, medFGS003); @@ -1532,9 +1521,9 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelInnerB22(const Double_ // mechStavVol->AddNode(volGlue, 0, new // TGeoCombiTrans(x,y-(kConeOutRadius+klay3+klay2+(klay4/2)), z, new TGeoRotation("",0, 0, 0))); mechStavVol->AddNode( - volGlue, 0, - new TGeoCombiTrans(x, y - (kConeOutRadius + klay3 + klay2 + (klay4) / 2) + 0.00005, z, - new TGeoRotation("", 0, 0, 0))); + volGlue, 0, + new TGeoCombiTrans(x, y - (kConeOutRadius + klay3 + klay2 + (klay4) / 2) + 0.00005, z, + new TGeoRotation("", 0, 0, 0))); } if (mBuildLevel < 1) { @@ -1544,22 +1533,22 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelInnerB22(const Double_ volCable->SetLineColor(28); volCable->SetFillColor(28); // mechStavVol->AddNode(volCable, 0, new TGeoCombiTrans(x, - // y-(kConeOutRadius+klay3+klay2+klay4+mSensorThickness+(klay5)/2)+0.0002, z, new TGeoRotation("",0, + // y-(kConeOutRadius+klay3+klay2+klay4+mSensorThickness+(klay5)/2)+0.0002, z, new + // TGeoRotation("",0, // 0, 0))); mechStavVol->AddNode( - volCable, 0, - new TGeoCombiTrans( - x, y - (kConeOutRadius + klay3 + klay2 + klay4 + mSensorThickness + (klay5) / 2) + 0.01185, - z, new TGeoRotation("", 0, 0, 0))); + volCable, 0, + new TGeoCombiTrans( + x, y - (kConeOutRadius + klay3 + klay2 + klay4 + mSensorThickness + (klay5) / 2) + 0.01185, + z, new TGeoRotation("", 0, 0, 0))); } // Done, return the stave structe return mechStavVol; } // model3 -TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelInnerB3(const Double_t xsta, - const Double_t zsta, - const TGeoManager* mgr) +TGeoVolume* UpgradeV1Layer::CreateStaveModelInnerB3(const Double_t xsta, const Double_t zsta, + const TGeoManager* mgr) { // Materials defined in Detector TGeoMedium* medAir = mgr->GetMedium("ITS_AIR$"); @@ -1588,7 +1577,7 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelInnerB3(const Double_t Double_t the2 = TMath::ATan(h / s1); Double_t beta = the2 * TMath::RadToDeg(); Double_t klay4 = 0.007; // Glue - Double_t klay5 = 0.01; // Flexcable + Double_t klay5 = 0.01; // Flexcable Int_t loop = (Int_t)((kStaveLength / (2 * l)) / 2); Double_t hh = 0.01; Double_t ang1 = 0 * TMath::DegToRad(); @@ -1643,15 +1632,15 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelInnerB3(const Double_t for (Int_t mo = 1; mo <= chips; mo++) { mechStavVol->AddNode( - volTM0a, 0, - new TGeoCombiTrans(x, yMC + 0.03, z + (mo - 3) * kStaveLength / 4 + smcLength / 2 + - headWidth + smcLength / 2 + (headWidth / 2), - new TGeoRotation("", ang1, ang2, ang3))); + volTM0a, 0, + new TGeoCombiTrans(x, yMC + 0.03, z + (mo - 3) * kStaveLength / 4 + smcLength / 2 + + headWidth + smcLength / 2 + (headWidth / 2), + new TGeoRotation("", ang1, ang2, ang3))); mechStavVol->AddNode( - volTM0a, 1, - new TGeoCombiTrans(x, yMC + 0.03, z + (mo - 3) * kStaveLength / 4 + smcLength / 2 + - headWidth - smcLength / 2 - (headWidth / 2), - new TGeoRotation("", ang1, ang2, ang3))); + volTM0a, 1, + new TGeoCombiTrans(x, yMC + 0.03, z + (mo - 3) * kStaveLength / 4 + smcLength / 2 + + headWidth - smcLength / 2 - (headWidth / 2), + new TGeoRotation("", ang1, ang2, ang3))); } TGeoBBox* tM0c = new TGeoBBox(0.3 / 2, 0.003 / 2, smcLength / 2); TGeoVolume* volTM0c = new TGeoVolume("microChanTop2", tM0c, medKapton); @@ -1659,15 +1648,13 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelInnerB3(const Double_t volTM0c->SetFillColor(35); for (Int_t mo = 1; mo <= chips; mo++) { mechStavVol->AddNode( - volTM0c, 0, - new TGeoCombiTrans(x + (smcWidth / 2) - (0.3 / 2), yMC + 0.03, - z + (mo - 3) * kStaveLength / 4 + smcLength / 2 + headWidth, - new TGeoRotation("", ang1, ang2, ang3))); + volTM0c, 0, new TGeoCombiTrans(x + (smcWidth / 2) - (0.3 / 2), yMC + 0.03, + z + (mo - 3) * kStaveLength / 4 + smcLength / 2 + headWidth, + new TGeoRotation("", ang1, ang2, ang3))); mechStavVol->AddNode( - volTM0c, 1, - new TGeoCombiTrans(x - (smcWidth / 2) + (0.3 / 2), yMC + 0.03, - z + (mo - 3) * kStaveLength / 4 + smcLength / 2 + headWidth, - new TGeoRotation("", ang1, ang2, ang3))); //("",0, 0, 0))); + volTM0c, 1, new TGeoCombiTrans(x - (smcWidth / 2) + (0.3 / 2), yMC + 0.03, + z + (mo - 3) * kStaveLength / 4 + smcLength / 2 + headWidth, + new TGeoRotation("", ang1, ang2, ang3))); //("",0, 0, 0))); } TGeoBBox* tM0c1 = new TGeoBBox(0.2225 / 2, 0.003 / 2, smcLength / 2); TGeoVolume* volTM0c1 = new TGeoVolume("microChanBot1", tM0c1, medKapton); @@ -1675,19 +1662,17 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelInnerB3(const Double_t volTM0c1->SetFillColor(6); for (Int_t mo = 1; mo <= chips; mo++) { mechStavVol->AddNode( - volTM0c1, 0, - new TGeoCombiTrans(x + smcWidth / 2 - (smcSide1Thick) - (vaporThick) - (smcSide2Thick) - - (smcSide3Thick) - (0.2225 / 2), - yMC + 0.03 - hh - (0.003), - z + (mo - 3) * kStaveLength / 4 + smcLength / 2 + headWidth, - new TGeoRotation("", ang1, ang2, ang3))); //("",0, 0, 0))); + volTM0c1, 0, new TGeoCombiTrans(x + smcWidth / 2 - (smcSide1Thick) - (vaporThick) - + (smcSide2Thick) - (smcSide3Thick) - (0.2225 / 2), + yMC + 0.03 - hh - (0.003), + z + (mo - 3) * kStaveLength / 4 + smcLength / 2 + headWidth, + new TGeoRotation("", ang1, ang2, ang3))); //("",0, 0, 0))); mechStavVol->AddNode( - volTM0c1, 1, - new TGeoCombiTrans(x - smcWidth / 2 + (smcSide1Thick) + (liquidThick) + (smcSide2Thick) + - (smcSide4Thick) + (0.2225 / 2), - yMC + 0.03 - hh - (0.003), - z + (mo - 3) * kStaveLength / 4 + smcLength / 2 + headWidth, - new TGeoRotation("", ang1, ang2, ang3))); //("",0, 0, 0))); + volTM0c1, 1, new TGeoCombiTrans(x - smcWidth / 2 + (smcSide1Thick) + (liquidThick) + + (smcSide2Thick) + (smcSide4Thick) + (0.2225 / 2), + yMC + 0.03 - hh - (0.003), + z + (mo - 3) * kStaveLength / 4 + smcLength / 2 + headWidth, + new TGeoRotation("", ang1, ang2, ang3))); //("",0, 0, 0))); } TGeoBBox* tM0c2 = new TGeoBBox(0.072 / 2, 0.003 / 2, smcLength / 2); TGeoVolume* volTM0c2 = new TGeoVolume("microChanBot2", tM0c2, medKapton); @@ -1695,11 +1680,10 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelInnerB3(const Double_t volTM0c2->SetFillColor(35); for (Int_t mo = 1; mo <= chips; mo++) { mechStavVol->AddNode( - volTM0c2, 0, - new TGeoCombiTrans(x + smcWidth / 2 - (0.072 / 2), - yMC + 0.03 - (0.035 + 0.0015) - (0.003) / 2, - z + (mo - 3) * kStaveLength / 4 + smcLength / 2 + headWidth, - new TGeoRotation("", ang1, ang2, ang3))); //("",0, 0, 0))); + volTM0c2, 0, new TGeoCombiTrans(x + smcWidth / 2 - (0.072 / 2), + yMC + 0.03 - (0.035 + 0.0015) - (0.003) / 2, + z + (mo - 3) * kStaveLength / 4 + smcLength / 2 + headWidth, + new TGeoRotation("", ang1, ang2, ang3))); //("",0, 0, 0))); } TGeoBBox* tM0c2r = new TGeoBBox(0.068 / 2, 0.003 / 2, smcLength / 2); TGeoVolume* volTM0c2r = new TGeoVolume("microChanBot3", tM0c2r, medKapton); @@ -1707,11 +1691,10 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelInnerB3(const Double_t volTM0c2r->SetFillColor(35); for (Int_t mo = 1; mo <= chips; mo++) { mechStavVol->AddNode( - volTM0c2r, 0, - new TGeoCombiTrans(x - smcWidth / 2 + (0.068 / 2), - yMC + 0.03 - (0.035 + 0.0015) - (0.003) / 2, - z + (mo - 3) * kStaveLength / 4 + smcLength / 2 + headWidth, - new TGeoRotation("", ang1, ang2, ang3))); //("",0, 0, 0))); + volTM0c2r, 0, new TGeoCombiTrans( + x - smcWidth / 2 + (0.068 / 2), yMC + 0.03 - (0.035 + 0.0015) - (0.003) / 2, + z + (mo - 3) * kStaveLength / 4 + smcLength / 2 + headWidth, + new TGeoRotation("", ang1, ang2, ang3))); //("",0, 0, 0))); } TGeoBBox* tM0d = new TGeoBBox(smcSide1Thick / 2, 0.035 / 2, smcLength / 2); TGeoVolume* volTM0d = new TGeoVolume("microChanSide1", tM0d, medKapton); @@ -1719,15 +1702,15 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelInnerB3(const Double_t volTM0d->SetFillColor(12); for (Int_t mo = 1; mo <= chips; mo++) { mechStavVol->AddNode( - volTM0d, 0, new TGeoCombiTrans( - x + smcWidth / 2 - (smcSide1Thick / 2), yMC + 0.03 - 0.0015 - (0.035) / 2, - z + (mo - 3) * kStaveLength / 4 + smcLength / 2 + headWidth, - new TGeoRotation("", ang1, ang2, ang3))); //("",0, 0, 0))); + volTM0d, 0, new TGeoCombiTrans(x + smcWidth / 2 - (smcSide1Thick / 2), + yMC + 0.03 - 0.0015 - (0.035) / 2, + z + (mo - 3) * kStaveLength / 4 + smcLength / 2 + headWidth, + new TGeoRotation("", ang1, ang2, ang3))); //("",0, 0, 0))); mechStavVol->AddNode( - volTM0d, 1, new TGeoCombiTrans( - x - smcWidth / 2 + (smcSide1Thick / 2), yMC + 0.03 - 0.0015 - (0.035) / 2, - z + (mo - 3) * kStaveLength / 4 + smcLength / 2 + headWidth, - new TGeoRotation("", ang1, ang2, ang3))); //("",0, 0, 0))); + volTM0d, 1, new TGeoCombiTrans(x - smcWidth / 2 + (smcSide1Thick / 2), + yMC + 0.03 - 0.0015 - (0.035) / 2, + z + (mo - 3) * kStaveLength / 4 + smcLength / 2 + headWidth, + new TGeoRotation("", ang1, ang2, ang3))); //("",0, 0, 0))); } TGeoBBox* tM0d1 = new TGeoBBox(smcSide2Thick / 2, 0.035 / 2, smcLength / 2); @@ -1736,14 +1719,14 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelInnerB3(const Double_t volTM0d1->SetFillColor(12); for (Int_t mo = 1; mo <= chips; mo++) { mechStavVol->AddNode( - volTM0d1, 0, new TGeoCombiTrans( - x + smcWidth / 2 - (smcSide1Thick) - (vaporThick) - (smcSide2Thick / 2), + volTM0d1, 0, + new TGeoCombiTrans(x + smcWidth / 2 - (smcSide1Thick) - (vaporThick) - (smcSide2Thick / 2), yMC + 0.03 - (0.003 + 0.035) / 2, z + (mo - 3) * kStaveLength / 4 + smcLength / 2 + headWidth, new TGeoRotation("", ang1, ang2, ang3))); //("",0, 0, 0))); mechStavVol->AddNode( - volTM0d1, 1, new TGeoCombiTrans( - x - smcWidth / 2 + (smcSide1Thick) + (liquidThick) + (smcSide2Thick / 2), + volTM0d1, 1, + new TGeoCombiTrans(x - smcWidth / 2 + (smcSide1Thick) + (liquidThick) + (smcSide2Thick / 2), yMC + 0.03 - (0.003 + 0.035) / 2, z + (mo - 3) * kStaveLength / 4 + smcLength / 2 + headWidth, new TGeoRotation("", ang1, ang2, ang3))); //("",0, 0, 0))); @@ -1754,12 +1737,11 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelInnerB3(const Double_t volTM0d2->SetFillColor(12); for (Int_t mo = 1; mo <= chips; mo++) { mechStavVol->AddNode( - volTM0d2, 0, - new TGeoCombiTrans(x + smcWidth / 2 - (smcSide1Thick) - (vaporThick) - (smcSide2Thick) - - (smcSide3Thick / 2), - yMC + 0.03 - (0.003 + hh + 0.003) / 2, - z + (mo - 3) * kStaveLength / 4 + smcLength / 2 + headWidth, - new TGeoRotation("", ang1, ang2, ang3))); //("",0, 0, 0))); + volTM0d2, 0, new TGeoCombiTrans(x + smcWidth / 2 - (smcSide1Thick) - (vaporThick) - + (smcSide2Thick) - (smcSide3Thick / 2), + yMC + 0.03 - (0.003 + hh + 0.003) / 2, + z + (mo - 3) * kStaveLength / 4 + smcLength / 2 + headWidth, + new TGeoRotation("", ang1, ang2, ang3))); //("",0, 0, 0))); } TGeoBBox* tM0d2r = new TGeoBBox(smcSide4Thick / 2, (hh + 0.003) / 2, smcLength / 2); TGeoVolume* volTM0d2r = new TGeoVolume("microChanSide4", tM0d2r, medKapton); @@ -1767,12 +1749,12 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelInnerB3(const Double_t volTM0d2r->SetFillColor(12); for (Int_t mo = 1; mo <= chips; mo++) { mechStavVol->AddNode( - volTM0d2r, 0, - new TGeoCombiTrans(x - smcWidth / 2 + (smcSide1Thick) + (liquidThick) + (smcSide2Thick) + - (smcSide4Thick / 2), - yMC + 0.03 - (0.003 + hh + 0.003) / 2, - z + (mo - 3) * kStaveLength / 4 + smcLength / 2 + headWidth, - new TGeoRotation("", ang1, ang2, ang3))); //("",0, 0, 0))); + volTM0d2r, 0, + new TGeoCombiTrans(x - smcWidth / 2 + (smcSide1Thick) + (liquidThick) + (smcSide2Thick) + + (smcSide4Thick / 2), + yMC + 0.03 - (0.003 + hh + 0.003) / 2, + z + (mo - 3) * kStaveLength / 4 + smcLength / 2 + headWidth, + new TGeoRotation("", ang1, ang2, ang3))); //("",0, 0, 0))); } TGeoBBox* tM0e = new TGeoBBox(smcSide5Thick / 2, hh / 2, smcLength / 2); TGeoVolume* volTM0e = new TGeoVolume("microChanSide5", tM0e, medKapton); @@ -1781,21 +1763,21 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelInnerB3(const Double_t for (Int_t mo = 1; mo <= chips; mo++) { for (Int_t ie = 0; ie < 11; ie++) { mechStavVol->AddNode( - volTM0e, 0, - new TGeoCombiTrans(x - (ie * (smcSpace + smcSide5Thick)) + smcWidth / 2 - - (smcSide1Thick) - (vaporThick) - (smcSide2Thick) - - (smcSide3Thick) - smcSpace - (smcSide5Thick / 2), - yMC + 0.03 - (0.003 + hh) / 2, - z + (mo - 3) * kStaveLength / 4 + smcLength / 2 + headWidth, - new TGeoRotation("", ang1, ang2, ang3))); //("",0, 0, 0))); + volTM0e, 0, + new TGeoCombiTrans(x - (ie * (smcSpace + smcSide5Thick)) + smcWidth / 2 - + (smcSide1Thick) - (vaporThick) - (smcSide2Thick) - (smcSide3Thick) - + smcSpace - (smcSide5Thick / 2), + yMC + 0.03 - (0.003 + hh) / 2, + z + (mo - 3) * kStaveLength / 4 + smcLength / 2 + headWidth, + new TGeoRotation("", ang1, ang2, ang3))); //("",0, 0, 0))); mechStavVol->AddNode( - volTM0e, 1, - new TGeoCombiTrans(x + (ie * (smcSpace + smcSide5Thick)) - smcWidth / 2 + - (smcSide1Thick) + (liquidThick) + (smcSide2Thick) + - (smcSide4Thick) + smcSpace + (smcSide5Thick / 2), - yMC + 0.03 - (0.003 + hh) / 2, - z + (mo - 3) * kStaveLength / 4 + smcLength / 2 + headWidth, - new TGeoRotation("", ang1, ang2, ang3))); //("",0, 0, 0))); + volTM0e, 1, + new TGeoCombiTrans(x + (ie * (smcSpace + smcSide5Thick)) - smcWidth / 2 + + (smcSide1Thick) + (liquidThick) + (smcSide2Thick) + (smcSide4Thick) + + smcSpace + (smcSide5Thick / 2), + yMC + 0.03 - (0.003 + hh) / 2, + z + (mo - 3) * kStaveLength / 4 + smcLength / 2 + headWidth, + new TGeoRotation("", ang1, ang2, ang3))); //("",0, 0, 0))); } } @@ -1810,15 +1792,15 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelInnerB3(const Double_t volTM0f->SetFillColor(12); for (Int_t mo = 1; mo <= chips; mo++) { mechStavVol->AddNode( - volTM0f, 0, - new TGeoCombiTrans(x + smcCloseWallvapor - (0.02) / 2, yMC + 0.03 - (0.003 + hh) / 2, - z + (mo - 3) * kStaveLength / 4 + smcLength / 2 + headWidth, - new TGeoRotation("", ang1, ang2, ang3))); //("",0, 0, 0))); + volTM0f, 0, + new TGeoCombiTrans(x + smcCloseWallvapor - (0.02) / 2, yMC + 0.03 - (0.003 + hh) / 2, + z + (mo - 3) * kStaveLength / 4 + smcLength / 2 + headWidth, + new TGeoRotation("", ang1, ang2, ang3))); //("",0, 0, 0))); mechStavVol->AddNode( - volTM0f, 1, - new TGeoCombiTrans(x - smcCloseWallliquid + (0.02) / 2, yMC + 0.03 - (0.003 + hh) / 2, - z + (mo - 3) * kStaveLength / 4 + smcLength / 2 + headWidth, - new TGeoRotation("", ang1, ang2, ang3))); //("",0, 0, 0))); + volTM0f, 1, + new TGeoCombiTrans(x - smcCloseWallliquid + (0.02) / 2, yMC + 0.03 - (0.003 + hh) / 2, + z + (mo - 3) * kStaveLength / 4 + smcLength / 2 + headWidth, + new TGeoRotation("", ang1, ang2, ang3))); //("",0, 0, 0))); } // Head(back) microchannel @@ -1828,17 +1810,15 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelInnerB3(const Double_t volTM0hb->SetFillColor(4); for (Int_t mo = 1; mo <= chips; mo++) { mechStavVol->AddNode( - volTM0hb, 0, - new TGeoCombiTrans(x, yMC + 0.03 - 0.0145 - (0.025 / 2), - z + (mo - 3) * kStaveLength / 4 + smcLength / 2 + headWidth + - smcLength / 2 + (headWidth / 2), - new TGeoRotation("", ang1, ang2, ang3))); //("",0, 0, 0))); + volTM0hb, 0, new TGeoCombiTrans(x, yMC + 0.03 - 0.0145 - (0.025 / 2), + z + (mo - 3) * kStaveLength / 4 + smcLength / 2 + + headWidth + smcLength / 2 + (headWidth / 2), + new TGeoRotation("", ang1, ang2, ang3))); //("",0, 0, 0))); mechStavVol->AddNode( - volTM0hb, 1, - new TGeoCombiTrans(x, yMC + 0.03 - 0.0145 - (0.025) / 2, - z + (mo - 3) * kStaveLength / 4 + smcLength / 2 + headWidth - - smcLength / 2 - (headWidth / 2), - new TGeoRotation("", ang1, ang2, ang3))); //("",0, 0, 0))); + volTM0hb, 1, new TGeoCombiTrans(x, yMC + 0.03 - 0.0145 - (0.025) / 2, + z + (mo - 3) * kStaveLength / 4 + smcLength / 2 + + headWidth - smcLength / 2 - (headWidth / 2), + new TGeoRotation("", ang1, ang2, ang3))); //("",0, 0, 0))); } TGeoBBox* tM0h1 = new TGeoBBox(smcWidth / 2, 0.013 / 2, 0.05 / 2); TGeoVolume* volTM0h1 = new TGeoVolume("microChanHeadBackBottom2", tM0h1, medKapton); @@ -1846,11 +1826,10 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelInnerB3(const Double_t volTM0h1->SetFillColor(5); for (Int_t mo = 1; mo <= chips; mo++) { mechStavVol->AddNode( - volTM0h1, 0, - new TGeoCombiTrans(x, yMC + 0.03 - 0.0015 - (0.013 / 2), - z + (mo - 3) * kStaveLength / 4 + smcLength / 2 + headWidth - - smcLength / 2 - headWidth + (0.05 / 2), - new TGeoRotation("", ang1, ang2, ang3))); //("",0, 0, 0))); + volTM0h1, 0, new TGeoCombiTrans(x, yMC + 0.03 - 0.0015 - (0.013 / 2), + z + (mo - 3) * kStaveLength / 4 + smcLength / 2 + + headWidth - smcLength / 2 - headWidth + (0.05 / 2), + new TGeoRotation("", ang1, ang2, ang3))); //("",0, 0, 0))); } TGeoBBox* tM0h2 = new TGeoBBox(smcWidth / 2, 0.003 / 2, 0.18 / 2); TGeoVolume* volTM0h2 = new TGeoVolume("microChanHeadBackBottom7", tM0h2, medKapton); @@ -1858,11 +1837,10 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelInnerB3(const Double_t volTM0h2->SetFillColor(6); for (Int_t mo = 1; mo <= chips; mo++) { mechStavVol->AddNode( - volTM0h2, 0, - new TGeoCombiTrans(x, yMC + 0.03 - 0.0015 - 0.01 - (0.003 / 2), - z + (mo - 3) * kStaveLength / 4 + smcLength / 2 + headWidth - - smcLength / 2 - 0.02 - (0.18 / 2), - new TGeoRotation("", ang1, ang2, ang3))); //("",0, 0, 0))); + volTM0h2, 0, new TGeoCombiTrans(x, yMC + 0.03 - 0.0015 - 0.01 - (0.003 / 2), + z + (mo - 3) * kStaveLength / 4 + smcLength / 2 + + headWidth - smcLength / 2 - 0.02 - (0.18 / 2), + new TGeoRotation("", ang1, ang2, ang3))); //("",0, 0, 0))); } TGeoBBox* tM0h3 = new TGeoBBox(smcWidth / 2, 0.013 / 2, 0.02 / 2); TGeoVolume* volTM0h3 = new TGeoVolume("microChanHeadBackBottom3", tM0h3, medKapton); @@ -1870,11 +1848,10 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelInnerB3(const Double_t volTM0h3->SetFillColor(5); for (Int_t mo = 1; mo <= chips; mo++) { mechStavVol->AddNode( - volTM0h3, 0, - new TGeoCombiTrans(x, yMC + 0.03 - 0.0015 - (0.013 / 2), - z + (mo - 3) * kStaveLength / 4 + smcLength / 2 + headWidth - - smcLength / 2 - (0.02 / 2), - new TGeoRotation("", ang1, ang2, ang3))); //("",0, 0, 0))); + volTM0h3, 0, new TGeoCombiTrans(x, yMC + 0.03 - 0.0015 - (0.013 / 2), + z + (mo - 3) * kStaveLength / 4 + smcLength / 2 + + headWidth - smcLength / 2 - (0.02 / 2), + new TGeoRotation("", ang1, ang2, ang3))); //("",0, 0, 0))); } TGeoBBox* tM0b1 = new TGeoBBox(smcWidth / 2, 0.013 / 2, 0.03 / 2); TGeoVolume* volTM0b1 = new TGeoVolume("microChanHeadBackBottom4", tM0b1, medKapton); @@ -1882,11 +1859,10 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelInnerB3(const Double_t volTM0b1->SetFillColor(5); for (Int_t mo = 1; mo <= chips; mo++) { mechStavVol->AddNode( - volTM0b1, 0, - new TGeoCombiTrans(x, yMC + 0.03 - 0.0015 - (0.013 / 2), - z + (mo - 3) * kStaveLength / 4 + smcLength / 2 + headWidth + - smcLength / 2 + headWidth - (0.03 / 2), - new TGeoRotation("", ang1, ang2, ang3))); //("",0, 0, 0))); + volTM0b1, 0, new TGeoCombiTrans(x, yMC + 0.03 - 0.0015 - (0.013 / 2), + z + (mo - 3) * kStaveLength / 4 + smcLength / 2 + + headWidth + smcLength / 2 + headWidth - (0.03 / 2), + new TGeoRotation("", ang1, ang2, ang3))); //("",0, 0, 0))); } TGeoBBox* tM0b2 = new TGeoBBox(smcWidth / 2, 0.003 / 2, 0.2 / 2); TGeoVolume* volTM0b2 = new TGeoVolume("microChanHeadBackBottom5", tM0b2, medKapton); @@ -1894,11 +1870,10 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelInnerB3(const Double_t volTM0b2->SetFillColor(6); for (Int_t mo = 1; mo <= chips; mo++) { mechStavVol->AddNode( - volTM0b2, 0, - new TGeoCombiTrans(x, yMC + 0.03 - 0.0015 - 0.01 - (0.003 / 2), - z + (mo - 3) * kStaveLength / 4 + smcLength / 2 + headWidth + - smcLength / 2 + 0.02 + (0.2 / 2), - new TGeoRotation("", ang1, ang2, ang3))); //("",0, 0, 0))); + volTM0b2, 0, new TGeoCombiTrans(x, yMC + 0.03 - 0.0015 - 0.01 - (0.003 / 2), + z + (mo - 3) * kStaveLength / 4 + smcLength / 2 + + headWidth + smcLength / 2 + 0.02 + (0.2 / 2), + new TGeoRotation("", ang1, ang2, ang3))); //("",0, 0, 0))); } TGeoBBox* tM0b3 = new TGeoBBox(smcWidth / 2, 0.013 / 2, 0.02 / 2); TGeoVolume* volTM0b3 = new TGeoVolume("microChanHeadBackBottom6", tM0b3, medKapton); @@ -1906,11 +1881,10 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelInnerB3(const Double_t volTM0b3->SetFillColor(5); for (Int_t mo = 1; mo <= chips; mo++) { mechStavVol->AddNode( - volTM0b3, 0, - new TGeoCombiTrans(x, yMC + 0.03 - 0.0015 - (0.013 / 2), - z + (mo - 3) * kStaveLength / 4 + smcLength / 2 + headWidth + - smcLength / 2 + (0.02 / 2), - new TGeoRotation("", ang1, ang2, ang3))); //("",0, 0, 0))); + volTM0b3, 0, new TGeoCombiTrans(x, yMC + 0.03 - 0.0015 - (0.013 / 2), + z + (mo - 3) * kStaveLength / 4 + smcLength / 2 + + headWidth + smcLength / 2 + (0.02 / 2), + new TGeoRotation("", ang1, ang2, ang3))); //("",0, 0, 0))); } TGeoBBox* tM0b = new TGeoBBox(0.02 / 2, 0.02 / 2, zsta); @@ -1924,18 +1898,17 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelInnerB3(const Double_t } if (mBuildLevel < 4) { - //cooling inlet outlet + // cooling inlet outlet TGeoBBox* tM0dv = new TGeoBBox(vaporThick / 2, 0.035 / 2, smcLength / 2); TGeoVolume* volTM0dv = new TGeoVolume("microChanVapor", tM0dv, medWater); volTM0dv->SetLineColor(2); volTM0dv->SetFillColor(2); for (Int_t mo = 1; mo <= chips; mo++) { mechStavVol->AddNode( - volTM0dv, 0, - new TGeoCombiTrans(x + smcWidth / 2 - (smcSide1Thick) - (vaporThick / 2), - yMC + 0.03 - 0.0015 - (0.035) / 2, - z + (mo - 3) * kStaveLength / 4 + smcLength / 2 + headWidth, - new TGeoRotation("", ang1, ang2, ang3))); //("",0, 0, 0))); + volTM0dv, 0, new TGeoCombiTrans(x + smcWidth / 2 - (smcSide1Thick) - (vaporThick / 2), + yMC + 0.03 - 0.0015 - (0.035) / 2, + z + (mo - 3) * kStaveLength / 4 + smcLength / 2 + headWidth, + new TGeoRotation("", ang1, ang2, ang3))); //("",0, 0, 0))); } TGeoBBox* tM0dl = new TGeoBBox(liquidThick / 2, 0.035 / 2, smcLength / 2); TGeoVolume* volTM0dl = new TGeoVolume("microChanLiquid", tM0dl, medWater); @@ -1943,11 +1916,10 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelInnerB3(const Double_t volTM0dl->SetFillColor(3); for (Int_t mo = 1; mo <= chips; mo++) { mechStavVol->AddNode( - volTM0dl, 0, - new TGeoCombiTrans(x - smcWidth / 2 + (smcSide1Thick) + (liquidThick / 2), - yMC + 0.03 - 0.0015 - (0.035) / 2, - z + (mo - 3) * kStaveLength / 4 + smcLength / 2 + headWidth, - new TGeoRotation("", ang1, ang2, ang3))); //("",0, 0, 0))); + volTM0dl, 0, new TGeoCombiTrans(x - smcWidth / 2 + (smcSide1Thick) + (liquidThick / 2), + yMC + 0.03 - 0.0015 - (0.035) / 2, + z + (mo - 3) * kStaveLength / 4 + smcLength / 2 + headWidth, + new TGeoRotation("", ang1, ang2, ang3))); //("",0, 0, 0))); } // small cooling fluid now using water wait for freeon value TGeoBBox* tM0dlq = new TGeoBBox(smcSpace / 2, hh / 2, smcLength / 2); @@ -1961,21 +1933,19 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelInnerB3(const Double_t for (Int_t mo = 1; mo <= chips; mo++) { for (Int_t is = 0; is < 12; is++) { mechStavVol->AddNode( - volTM0dlq, 0, - new TGeoCombiTrans(x + (is * (smcSpace + smcSide5Thick)) - smcWidth / 2 + - (smcSide1Thick) + (vaporThick) + (smcSide2Thick) + - (smcSide3Thick) + smcSpace / 2, - yMC + 0.03 - (0.003 + hh) / 2, - z + (mo - 3) * kStaveLength / 4 + smcLength / 2 + headWidth, - new TGeoRotation("", ang1, ang2, ang3))); //("",0, 0, 0))); + volTM0dlq, 0, new TGeoCombiTrans( + x + (is * (smcSpace + smcSide5Thick)) - smcWidth / 2 + (smcSide1Thick) + + (vaporThick) + (smcSide2Thick) + (smcSide3Thick) + smcSpace / 2, + yMC + 0.03 - (0.003 + hh) / 2, + z + (mo - 3) * kStaveLength / 4 + smcLength / 2 + headWidth, + new TGeoRotation("", ang1, ang2, ang3))); //("",0, 0, 0))); mechStavVol->AddNode( - volTM0dvp, 1, - new TGeoCombiTrans(x - (is * (smcSpace + smcSide5Thick)) + smcWidth / 2 - - (smcSide1Thick) - (vaporThick) - (smcSide2Thick) - - (smcSide3Thick) - smcSpace / 2, - yMC + 0.03 - (0.003 + hh) / 2, - z + (mo - 3) * kStaveLength / 4 + smcLength / 2 + headWidth, - new TGeoRotation("", ang1, ang2, ang3))); //("",0, 0, 0))); + volTM0dvp, 1, new TGeoCombiTrans( + x - (is * (smcSpace + smcSide5Thick)) + smcWidth / 2 - (smcSide1Thick) - + (vaporThick) - (smcSide2Thick) - (smcSide3Thick) - smcSpace / 2, + yMC + 0.03 - (0.003 + hh) / 2, + z + (mo - 3) * kStaveLength / 4 + smcLength / 2 + headWidth, + new TGeoRotation("", ang1, ang2, ang3))); //("",0, 0, 0))); } } } @@ -2014,25 +1984,24 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelInnerB3(const Double_t volT2->SetFillColor(12); for (int i = 0; i < loop; i++) { // i<30;i++){ mechStavVol->AddNode( - volT2, 4 * i + 0, - new TGeoCombiTrans(x + w, y + 0.04 + filHeight / 2, - z - kStaveLength / 2 + (i * 4 * l) + s1 / 2, - new TGeoRotation("volT2", 90, 90 - alpha, 90 - beta))); + volT2, 4 * i + 0, new TGeoCombiTrans(x + w, y + 0.04 + filHeight / 2, + z - kStaveLength / 2 + (i * 4 * l) + s1 / 2, + new TGeoRotation("volT2", 90, 90 - alpha, 90 - beta))); mechStavVol->AddNode( - volT2, 4 * i + 1, - new TGeoCombiTrans(x - w, y + 0.04 + filHeight / 2, - z - kStaveLength / 2 + (i * 4 * l) + s1 / 2, - new TGeoRotation("volT2", 90, -90 + alpha, -90 + beta))); + volT2, 4 * i + 1, + new TGeoCombiTrans(x - w, y + 0.04 + filHeight / 2, + z - kStaveLength / 2 + (i * 4 * l) + s1 / 2, + new TGeoRotation("volT2", 90, -90 + alpha, -90 + beta))); mechStavVol->AddNode( - volT2, 4 * i + 2, - new TGeoCombiTrans(x + w, y + 0.04 + filHeight / 2, - z - kStaveLength / 2 + 2 * l + (i * 4 * l) + s1 / 2, - new TGeoRotation("volT2", 90, -90 + alpha, 90 - beta))); + volT2, 4 * i + 2, + new TGeoCombiTrans(x + w, y + 0.04 + filHeight / 2, + z - kStaveLength / 2 + 2 * l + (i * 4 * l) + s1 / 2, + new TGeoRotation("volT2", 90, -90 + alpha, 90 - beta))); mechStavVol->AddNode( - volT2, 4 * i + 3, - new TGeoCombiTrans(x - w, y + 0.04 + filHeight / 2, - z - kStaveLength / 2 + 2 * l + (i * 4 * l) + s1 / 2, - new TGeoRotation("volT2", 90, 90 - alpha, -90 + beta))); + volT2, 4 * i + 3, + new TGeoCombiTrans(x - w, y + 0.04 + filHeight / 2, + z - kStaveLength / 2 + 2 * l + (i * 4 * l) + s1 / 2, + new TGeoRotation("volT2", 90, 90 - alpha, -90 + beta))); } } @@ -2062,8 +2031,8 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelInnerB3(const Double_t TGeoVolume* volGlue = new TGeoVolume("glueSensorBus", glue, medGlue); volGlue->SetLineColor(5); volGlue->SetFillColor(5); - mechStavVol->AddNode(volGlue, 1, new TGeoCombiTrans(x, y - 0.154 - mSensorThickness - klay4 / 2, z, - new TGeoRotation("", 0, 0, 0))); + mechStavVol->AddNode(volGlue, 1, new TGeoCombiTrans(x, y - 0.154 - mSensorThickness - klay4 / 2, + z, new TGeoRotation("", 0, 0, 0))); } if (mBuildLevel < 1) { @@ -2079,18 +2048,18 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelInnerB3(const Double_t return mechStavVol; } -TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveOuterB(const TGeoManager* mgr) +TGeoVolume* UpgradeV1Layer::CreateStaveOuterB(const TGeoManager* mgr) { TGeoVolume* mechStavVol = 0; switch (mStaveModel) { - case AliceO2::ITS::Detector::kOBModelDummy: + case Detector::kOBModelDummy: mechStavVol = CreateStaveModelOuterBDummy(mgr); break; - case AliceO2::ITS::Detector::kOBModel0: + case Detector::kOBModel0: mechStavVol = CreateStaveModelOuterB0(mgr); break; - case AliceO2::ITS::Detector::kOBModel1: + case Detector::kOBModel1: mechStavVol = CreateStaveModelOuterB1(mgr); break; default: @@ -2100,13 +2069,13 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveOuterB(const TGeoManager* m return mechStavVol; } -TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelOuterBDummy(const TGeoManager*) const +TGeoVolume* UpgradeV1Layer::CreateStaveModelOuterBDummy(const TGeoManager*) const { // Done, return the stave structure return 0; } -TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelOuterB0(const TGeoManager* mgr) +TGeoVolume* UpgradeV1Layer::CreateStaveModelOuterB0(const TGeoManager* mgr) { Double_t xmod, ymod, zmod; Double_t xlen, ylen, zlen; @@ -2154,7 +2123,7 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelOuterB0(const TGeoMana return hstaveVol; } -TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelOuterB1(const TGeoManager* mgr) +TGeoVolume* UpgradeV1Layer::CreateStaveModelOuterB1(const TGeoManager* mgr) { Double_t yFlex1 = sOBFlexCableAlThick; Double_t yFlex2 = sOBFlexCableKapThick; @@ -2184,7 +2153,7 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelOuterB1(const TGeoMana TGeoBBox* busKap = new TGeoBBox("BusKap", xHalmSt, sOBBusCableKapThick / 2, zlen); TGeoBBox* coldPlate = - new TGeoBBox("ColdPlate", sOBHalfStaveWidth / 2, sOBColdPlateThick / 2, zlen); + new TGeoBBox("ColdPlate", sOBHalfStaveWidth / 2, sOBColdPlateThick / 2, zlen); TGeoTube* coolTube = new TGeoTube("CoolingTube", rCoolMin, rCoolMax, zlen); TGeoTube* coolWater = new TGeoTube("CoolingWater", 0., rCoolMin, zlen); @@ -2199,7 +2168,7 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelOuterB1(const TGeoMana TGeoBBox* graphvert = new TGeoBBox("GraphVertical", kLay2 / 2, ylen / 2, zlen); TGeoTubeSeg* graphtub = - new TGeoTubeSeg("GraphTube", rCoolMax, rCoolMax + kLay2, zlen, 180., 360.); + new TGeoTubeSeg("GraphTube", rCoolMax, rCoolMax + kLay2, zlen, 180., 360.); xlen = xHalmSt - sOBCoolTubeXDist / 2 - coolTube->GetRmax() - kLay2; TGeoBBox* fleeclat = new TGeoBBox("FleecLateral", xlen / 2, kLay1 / 2, zlen); @@ -2211,7 +2180,7 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelOuterB1(const TGeoMana TGeoBBox* fleecvert = new TGeoBBox("FleecVertical", kLay1 / 2, ylen / 2, zlen); TGeoTubeSeg* fleectub = - new TGeoTubeSeg("FleecTube", rCoolMax + kLay2, rCoolMax + kLay1 + kLay2, zlen, 180., 360.); + new TGeoTubeSeg("FleecTube", rCoolMax + kLay2, rCoolMax + kLay1 + kLay2, zlen, 180., 360.); TGeoBBox* flex1_5cm = new TGeoBBox("Flex1MV_5cm", xHalmSt, yFlex1 / 2, flexOverlap / 2); TGeoBBox* flex2_5cm = new TGeoBBox("Flex2MV_5cm", xHalmSt, yFlex2 / 2, flexOverlap / 2); @@ -2396,28 +2365,33 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelOuterB1(const TGeoMana // halmStaveVol->AddNode(moduleVol, j, new TGeoTranslation(xPos, -ylen + yPos + 2*rCoolMax + // yCPlate + yGlue + yModPlate + ymod, zpos)); - // halmStaveVol->AddNode(moduleVol, mNumberOfChips+j, new TGeoTranslation(-xPos, -ylen + yPos + + // halmStaveVol->AddNode(moduleVol, mNumberOfChips+j, new TGeoTranslation(-xPos, -ylen + yPos + // + // 2*rCoolMax + yCPlate + yGlue + yModPlate + ymod +deltaY, zpos)); // if((j+1)!=mNumberOfChips){ // halmStaveVol->AddNode(flex1_5cmVol,j,new TGeoTranslation(xPos,-ylen + yPos + 2*rCoolMax + // yCPlate + yGlue + yModPlate + 2*ymod + yFlex1 + yFlex2 + yFlex1/2,zpos5cm)); - // halmStaveVol->AddNode(flex1_5cmVol,mNumberOfChips+j,new TGeoTranslation(-xPos,-ylen + yPos + + // halmStaveVol->AddNode(flex1_5cmVol,mNumberOfChips+j,new TGeoTranslation(-xPos,-ylen + + // yPos + // 2*rCoolMax + yCPlate + yGlue + yModPlate + 2*ymod + yFlex1 + yFlex2 + yFlex1/2 // +deltaY,zpos5cm)); // halmStaveVol->AddNode(flex2_5cmVol,j,new TGeoTranslation(xPos,-ylen + yPos + 2*rCoolMax + // yCPlate + yGlue + yModPlate + 2*ymod + 2*yFlex1 + 3*yFlex2/2,zpos5cm)); - // halmStaveVol->AddNode(flex2_5cmVol,mNumberOfChips+j,new TGeoTranslation(-xPos,-ylen + yPos + + // halmStaveVol->AddNode(flex2_5cmVol,mNumberOfChips+j,new TGeoTranslation(-xPos,-ylen + + // yPos + // 2*rCoolMax + yCPlate + yGlue + yModPlate + 2*ymod + 2*yFlex1 + 3*yFlex2/2 +deltaY,zpos5cm)); // } // else { // halmStaveVol->AddNode(flex1_5cmVol,j,new TGeoTranslation(xPos,-ylen + yPos + 2*rCoolMax + // yCPlate + yGlue + yModPlate + 2*ymod + yFlex1/2,zpos5cm-modGap)); - // halmStaveVol->AddNode(flex1_5cmVol,mNumberOfChips+j,new TGeoTranslation(-xPos,-ylen + yPos + + // halmStaveVol->AddNode(flex1_5cmVol,mNumberOfChips+j,new TGeoTranslation(-xPos,-ylen + + // yPos + // 2*rCoolMax + yCPlate + yGlue + yModPlate + 2*ymod + yFlex1/2 +deltaY,zpos5cm-modGap)); // halmStaveVol->AddNode(flex2_5cmVol,j,new TGeoTranslation(xPos,-ylen + yPos + 2*rCoolMax + // yCPlate + yGlue + yModPlate +2*ymod + yFlex1 + yFlex2/2,zpos5cm-modGap)); - // halmStaveVol->AddNode(flex2_5cmVol,mNumberOfChips+j,new TGeoTranslation(-xPos,-ylen + yPos + + // halmStaveVol->AddNode(flex2_5cmVol,mNumberOfChips+j,new TGeoTranslation(-xPos,-ylen + + // yPos + // 2*rCoolMax + yCPlate + yGlue + yModPlate + 2*ymod + yFlex1 + yFlex2/2 +deltaY,zpos5cm-modGap)); // } @@ -2426,16 +2400,16 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateStaveModelOuterB1(const TGeoMana return halmStaveVol; } -TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateSpaceFrameOuterB(const TGeoManager* mgr) +TGeoVolume* UpgradeV1Layer::CreateSpaceFrameOuterB(const TGeoManager* mgr) { TGeoVolume* mechStavVol = 0; switch (mStaveModel) { - case AliceO2::ITS::Detector::kOBModelDummy: - case AliceO2::ITS::Detector::kOBModel0: + case Detector::kOBModelDummy: + case Detector::kOBModel0: mechStavVol = CreateSpaceFrameOuterBDummy(mgr); break; - case AliceO2::ITS::Detector::kOBModel1: + case Detector::kOBModel1: mechStavVol = CreateSpaceFrameOuterB1(mgr); break; default: @@ -2446,13 +2420,13 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateSpaceFrameOuterB(const TGeoManag return mechStavVol; } -TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateSpaceFrameOuterBDummy(const TGeoManager*) const +TGeoVolume* UpgradeV1Layer::CreateSpaceFrameOuterBDummy(const TGeoManager*) const { // Done, return the stave structur return 0; } -TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateSpaceFrameOuterB1(const TGeoManager* mgr) +TGeoVolume* UpgradeV1Layer::CreateSpaceFrameOuterB1(const TGeoManager* mgr) { // Materials defined in Detector TGeoMedium* medCarbon = mgr->GetMedium("ITS_CARBON$"); @@ -2514,21 +2488,21 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateSpaceFrameOuterB1(const TGeoMana //--- the 2 side V TGeoArb8* cmStavSide1 = - CreateStaveSide("CFstavSideCornerVol1shape", seglen / 2., beta, -1, staveLb, staveHb, stavel); + CreateStaveSide("CFstavSideCornerVol1shape", seglen / 2., beta, -1, staveLb, staveHb, stavel); TGeoVolume* cmStavSideVol1 = new TGeoVolume("CFstavSideCornerVol1", cmStavSide1, medCarbon); cmStavSideVol1->SetLineColor(35); TGeoArb8* cmStavSide2 = - CreateStaveSide("CFstavSideCornerVol2shape", seglen / 2., beta, 1, staveLb, staveHb, stavel); + CreateStaveSide("CFstavSideCornerVol2shape", seglen / 2., beta, 1, staveLb, staveHb, stavel); TGeoVolume* cmStavSideVol2 = new TGeoVolume("CFstavSideCornerVol2", cmStavSide2, medCarbon); cmStavSideVol2->SetLineColor(35); xpos = -sframeWidth / 2; ypos = -sframeHeight / 2 + staveBeamRadius + staveHb * TMath::Sin(beta); TGeoCombiTrans* ctSideR = new TGeoCombiTrans( - xpos, ypos, 0, new TGeoRotation("", 180 - 2 * beta * TMath::RadToDeg(), 0, 0)); + xpos, ypos, 0, new TGeoRotation("", 180 - 2 * beta * TMath::RadToDeg(), 0, 0)); TGeoCombiTrans* ctSideL = new TGeoCombiTrans( - -xpos, ypos, 0, new TGeoRotation("", -180 + 2 * beta * TMath::RadToDeg(), 0, 0)); + -xpos, ypos, 0, new TGeoRotation("", -180 + 2 * beta * TMath::RadToDeg(), 0, 0)); segmentVol->AddNode(cmStavTopVol1, 1, trTop1); segmentVol->AddNode(cmStavTopVol2, 1, trTop1); @@ -2540,10 +2514,10 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateSpaceFrameOuterB1(const TGeoMana //--- The beams // Beams on the sides Double_t beamPhiPrime = TMath::ASin( - 1. / TMath::Sqrt((1 + TMath::Sin(2 * beta) * TMath::Sin(2 * beta) / - (TanD(sOBSFrameBeamSidePhi) * TanD(sOBSFrameBeamSidePhi))))); + 1. / TMath::Sqrt((1 + TMath::Sin(2 * beta) * TMath::Sin(2 * beta) / + (TanD(sOBSFrameBeamSidePhi) * TanD(sOBSFrameBeamSidePhi))))); Double_t beamLength = TMath::Sqrt(sframeHeight * sframeHeight / - (TMath::Sin(beamPhiPrime) * TMath::Sin(beamPhiPrime)) + + (TMath::Sin(beamPhiPrime) * TMath::Sin(beamPhiPrime)) + sframeWidth * sframeWidth / 4.) - staveLa / 2 - staveLb / 2; TGeoTubeSeg* sideBeam = new TGeoTubeSeg(0, staveBeamRadius, beamLength / 2, 0, 180); @@ -2552,10 +2526,10 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateSpaceFrameOuterB1(const TGeoMana TGeoRotation* beamRot1 = new TGeoRotation("", /*90-2*beta*/ halmTheta * TMath::RadToDeg(), -beamPhiPrime * TMath::RadToDeg(), -90); - TGeoRotation* beamRot2 = new TGeoRotation("", 90 - 2. * beta * TMath::RadToDeg(), - beamPhiPrime * TMath::RadToDeg(), -90); - TGeoRotation* beamRot3 = new TGeoRotation("", 90 + 2. * beta * TMath::RadToDeg(), - beamPhiPrime * TMath::RadToDeg(), -90); + TGeoRotation* beamRot2 = + new TGeoRotation("", 90 - 2. * beta * TMath::RadToDeg(), beamPhiPrime * TMath::RadToDeg(), -90); + TGeoRotation* beamRot3 = + new TGeoRotation("", 90 + 2. * beta * TMath::RadToDeg(), beamPhiPrime * TMath::RadToDeg(), -90); TGeoRotation* beamRot4 = new TGeoRotation("", 90 + 2. * beta * TMath::RadToDeg(), -beamPhiPrime * TMath::RadToDeg(), -90); @@ -2583,17 +2557,17 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateSpaceFrameOuterB1(const TGeoMana //--- Beams of the bottom TGeoTubeSeg* bottomBeam1 = - new TGeoTubeSeg(0, staveBeamRadius, sframeWidth / 2. - staveLb / 3, 0, 180); + new TGeoTubeSeg(0, staveBeamRadius, sframeWidth / 2. - staveLb / 3, 0, 180); TGeoVolume* bottomBeam1Vol = new TGeoVolume("CFstavBottomBeam1Vol", bottomBeam1, medCarbon); bottomBeam1Vol->SetLineColor(35); TGeoTubeSeg* bottomBeam2 = - new TGeoTubeSeg(0, staveBeamRadius, sframeWidth / 2. - staveLb / 3, 0, 90); + new TGeoTubeSeg(0, staveBeamRadius, sframeWidth / 2. - staveLb / 3, 0, 90); TGeoVolume* bottomBeam2Vol = new TGeoVolume("CFstavBottomBeam2Vol", bottomBeam2, medCarbon); bottomBeam2Vol->SetLineColor(35); TGeoTubeSeg* bottomBeam3 = new TGeoTubeSeg( - 0, staveBeamRadius, 0.5 * sframeWidth / SinD(bottomBeamAngle) - staveLb / 3, 0, 180); + 0, staveBeamRadius, 0.5 * sframeWidth / SinD(bottomBeamAngle) - staveLb / 3, 0, 180); TGeoVolume* bottomBeam3Vol = new TGeoVolume("CFstavBottomBeam3Vol", bottomBeam3, medCarbon); bottomBeam3Vol->SetLineColor(35); @@ -2601,20 +2575,20 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateSpaceFrameOuterB1(const TGeoMana TGeoRotation* bottomBeamRot2 = new TGeoRotation("", -90, 90, -90); TGeoCombiTrans* bottomBeamTransf1 = - new TGeoCombiTrans("", 0, -(sframeHeight / 2 - staveBeamRadius), 0, bottomBeamRot1); + new TGeoCombiTrans("", 0, -(sframeHeight / 2 - staveBeamRadius), 0, bottomBeamRot1); TGeoCombiTrans* bottomBeamTransf2 = - new TGeoCombiTrans(0, -(sframeHeight / 2 - staveBeamRadius), -seglen / 2, bottomBeamRot1); + new TGeoCombiTrans(0, -(sframeHeight / 2 - staveBeamRadius), -seglen / 2, bottomBeamRot1); TGeoCombiTrans* bottomBeamTransf3 = - new TGeoCombiTrans(0, -(sframeHeight / 2 - staveBeamRadius), seglen / 2, bottomBeamRot2); + new TGeoCombiTrans(0, -(sframeHeight / 2 - staveBeamRadius), seglen / 2, bottomBeamRot2); // be careful for beams #3: when "reading" from -z to +z and // from the bottom of the stave, it should draw a Lambda, and not a V TGeoRotation* bottomBeamRot4 = new TGeoRotation("", -90, bottomBeamAngle, -90); TGeoRotation* bottomBeamRot5 = new TGeoRotation("", -90, -bottomBeamAngle, -90); TGeoCombiTrans* bottomBeamTransf4 = - new TGeoCombiTrans(0, -(sframeHeight / 2 - staveBeamRadius), -seglen / 4, bottomBeamRot4); + new TGeoCombiTrans(0, -(sframeHeight / 2 - staveBeamRadius), -seglen / 4, bottomBeamRot4); TGeoCombiTrans* bottomBeamTransf5 = - new TGeoCombiTrans(0, -(sframeHeight / 2 - staveBeamRadius), seglen / 4, bottomBeamRot5); + new TGeoCombiTrans(0, -(sframeHeight / 2 - staveBeamRadius), seglen / 4, bottomBeamRot5); segmentVol->AddNode(sideBeamVol, 1, beamTransf[0]); segmentVol->AddNode(sideBeamVol, 2, beamTransf[1]); @@ -2640,10 +2614,8 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateSpaceFrameOuterB1(const TGeoMana return spaceFrameVol; } -TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateChipInnerB(const Double_t xchip, - const Double_t ychip, - const Double_t zchip, - const TGeoManager* mgr) +TGeoVolume* UpgradeV1Layer::CreateChipInnerB(const Double_t xchip, const Double_t ychip, + const Double_t zchip, const TGeoManager* mgr) { char volumeName[30]; Double_t xlen, ylen, zlen; @@ -2687,7 +2659,7 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateChipInnerB(const Double_t xchip, return chipVol; } -TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateModuleOuterB(const TGeoManager* mgr) +TGeoVolume* UpgradeV1Layer::CreateModuleOuterB(const TGeoManager* mgr) { char volumeName[30]; @@ -2775,7 +2747,7 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateModuleOuterB(const TGeoManager* xpos = -module->GetDX() + xchip; ypos += (glue->GetDY() + ychip); - for (Int_t k = 0; k < sOBChipsPerRow; k++) {// put 7x2 chip into one module + for (Int_t k = 0; k < sOBChipsPerRow; k++) { // put 7x2 chip into one module zpos = -module->GetDZ() + zchip + k * (2 * zchip + zGap); modVol->AddNode(chipVol, 2 * k, new TGeoTranslation(xpos, ypos, zpos)); modVol->AddNode(chipVol, 2 * k + 1, @@ -2793,12 +2765,12 @@ TGeoVolume* AliceO2::ITS::UpgradeV1Layer::CreateModuleOuterB(const TGeoManager* return modVol; } -Double_t AliceO2::ITS::UpgradeV1Layer::RadiusOmTurboContainer() +Double_t UpgradeV1Layer::RadiusOmTurboContainer() { Double_t rr, delta, z, lstav, rstav; if (mStaveThickness > 89.) { // Very big angle: avoid overflows since surely - return -1; // the radius from lower vertex is the right value + return -1; // the radius from lower vertex is the right value } rstav = mLayerRadius + 0.5 * mStaveThickness; @@ -2810,46 +2782,41 @@ Double_t AliceO2::ITS::UpgradeV1Layer::RadiusOmTurboContainer() if ((rr * SinD(mStaveTilt) < lstav)) { return (rr * CosD(mStaveTilt)); - } - else { + } else { return -1; } } -void AliceO2::ITS::UpgradeV1Layer::SetNumberOfUnits(Int_t u) +void UpgradeV1Layer::SetNumberOfUnits(Int_t u) { if (mLayerNumber < sNumberOmInnerLayers) { mNumberOfChips = u; - } - else { + } else { mNumberOfModules = u; mNumberOfChips = sOBChipsPerRow; } } -void AliceO2::ITS::UpgradeV1Layer::SetStaveTilt(const Double_t t) +void UpgradeV1Layer::SetStaveTilt(const Double_t t) { if (mIsTurbo) { mStaveTilt = t; - } - else { + } else { LOG(ERROR) << "Not a Turbo layer" << FairLogger::endl; } } -void AliceO2::ITS::UpgradeV1Layer::SetStaveWidth(const Double_t w) +void UpgradeV1Layer::SetStaveWidth(const Double_t w) { if (mIsTurbo) { mStaveWidth = w; - } - else { + } else { LOG(ERROR) << "Not a Turbo layer" << FairLogger::endl; } } -TGeoArb8* AliceO2::ITS::UpgradeV1Layer::CreateStaveSide(const char* name, Double_t dz, - Double_t angle, Double_t xSign, Double_t L, - Double_t H, Double_t l) +TGeoArb8* UpgradeV1Layer::CreateStaveSide(const char* name, Double_t dz, Double_t angle, + Double_t xSign, Double_t L, Double_t H, Double_t l) { // Create one half of the V shape corner of CF stave @@ -2868,8 +2835,7 @@ TGeoArb8* AliceO2::ITS::UpgradeV1Layer::CreateStaveSide(const char* name, Double cmStavSide->SetVertex(3, xSign * L * TMath::Sin(angle), -L * TMath::Cos(angle)); cmStavSide->SetVertex(5, 0, -H); cmStavSide->SetVertex(7, xSign * L * TMath::Sin(angle), -L * TMath::Cos(angle)); - } - else { + } else { cmStavSide->SetVertex(1, xSign * L * TMath::Sin(angle), -L * TMath::Cos(angle)); cmStavSide->SetVertex(3, 0, -H); cmStavSide->SetVertex(5, xSign * L * TMath::Sin(angle), -L * TMath::Cos(angle)); @@ -2878,9 +2844,8 @@ TGeoArb8* AliceO2::ITS::UpgradeV1Layer::CreateStaveSide(const char* name, Double return cmStavSide; } -TGeoCombiTrans* AliceO2::ITS::UpgradeV1Layer::CreateCombiTrans(const char* name, Double_t dy, - Double_t dz, Double_t dphi, - Bool_t planeSym) +TGeoCombiTrans* UpgradeV1Layer::CreateCombiTrans(const char* name, Double_t dy, Double_t dz, + Double_t dphi, Bool_t planeSym) { TGeoTranslation t1(dy * CosD(90. + dphi), dy * SinD(90. + dphi), dz); TGeoRotation r1("", 0., 0., dphi); @@ -2890,15 +2855,14 @@ TGeoCombiTrans* AliceO2::ITS::UpgradeV1Layer::CreateCombiTrans(const char* name, combiTrans1->SetTranslation(t1); if (planeSym) { combiTrans1->SetRotation(r1); - } - else { + } else { combiTrans1->SetRotation(r2); } return combiTrans1; } -void AliceO2::ITS::UpgradeV1Layer::AddTranslationToCombiTrans(TGeoCombiTrans* ct, Double_t dx, - Double_t dy, Double_t dz) const +void UpgradeV1Layer::AddTranslationToCombiTrans(TGeoCombiTrans* ct, Double_t dx, Double_t dy, + Double_t dz) const { // Add a dx,dy,dz translation to the initial TGeoCombiTrans const Double_t* vect = ct->GetTranslation(); diff --git a/its/UpgradeV1Layer.h b/its/UpgradeV1Layer.h index 9c186c90f8f20..951f4a303ec9f 100644 --- a/its/UpgradeV1Layer.h +++ b/its/UpgradeV1Layer.h @@ -37,10 +37,10 @@ class UpgradeV1Layer : public V11Geometry { /// for a "turbo" layer (i.e. where staves overlap in phi) UpgradeV1Layer(Int_t lay, Bool_t turbo, Int_t debug); - ///Copy constructor + /// Copy constructor UpgradeV1Layer(const UpgradeV1Layer& source); - ///Assignment operator + /// Assignment operator UpgradeV1Layer& operator=(const UpgradeV1Layer& source); /// Default destructor @@ -109,7 +109,7 @@ class UpgradeV1Layer : public V11Geometry { return mHierarchy[kChip]; } - AliceO2::ITS::Detector::Model GetStaveModel() const + AliceO2::ITS::Detector::UpgradeModel GetStaveModel() const { return mStaveModel; } @@ -161,7 +161,7 @@ class UpgradeV1Layer : public V11Geometry { { mBuildLevel = buildLevel; } - void SetStaveModel(AliceO2::ITS::Detector::Model model) + void SetStaveModel(AliceO2::ITS::Detector::UpgradeModel model) { mStaveModel = model; } @@ -310,26 +310,28 @@ class UpgradeV1Layer : public V11Geometry { void AddTranslationToCombiTrans(TGeoCombiTrans* ct, Double_t dx = 0, Double_t dy = 0, Double_t dz = 0) const; - Int_t mLayerNumber; ///< Current layer number - Double_t mPhi0; ///< lab phi of 1st stave, in degrees!!! - Double_t mLayerRadius; ///< Inner radius of this layer - Double_t mZLength; ///< Z length of this layer + Int_t mLayerNumber; ///< Current layer number + Double_t mPhi0; ///< lab phi of 1st stave, in degrees!!! + Double_t mLayerRadius; ///< Inner radius of this layer + Double_t mZLength; ///< Z length of this layer Double_t mSensorThickness; ///< Sensor thickness Double_t mStaveThickness; ///< Stave thickness - Double_t mStaveWidth; ///< Stave width (for turbo layers only) - Double_t mStaveTilt; ///< Stave tilt angle (for turbo layers only) in degrees - Int_t mNumberOfStaves; ///< Number of staves in this layer - Int_t mNumberOfModules; ///< Number of modules per container if defined (HalfStave, Stave, whatever is - ///< container) - Int_t mNumberOfChips; ///< Number chips per container (module, HalfStave, Stave, whatever is container) + Double_t mStaveWidth; ///< Stave width (for turbo layers only) + Double_t mStaveTilt; ///< Stave tilt angle (for turbo layers only) in degrees + Int_t mNumberOfStaves; ///< Number of staves in this layer + Int_t + mNumberOfModules; ///< Number of modules per container if defined (HalfStave, Stave, whatever is + ///< container) + Int_t mNumberOfChips; ///< Number chips per container (module, HalfStave, Stave, whatever is + /// container) Int_t mHierarchy - [kNHLevels]; ///< array to query number of staves, hstaves, modules, chips per its parent volume + [kNHLevels]; ///< array to query number of staves, hstaves, modules, chips per its parent volume UInt_t mChipTypeID; ///< detector type id Bool_t mIsTurbo; ///< True if this layer is a "turbo" layer Int_t mBuildLevel; ///< Used for material studies - AliceO2::ITS::Detector::Model mStaveModel; ///< The stave model + AliceO2::ITS::Detector::UpgradeModel mStaveModel; ///< The stave model // Parameters for the Upgrade geometry diff --git a/its/V11Geometry.cxx b/its/V11Geometry.cxx index 414768dd810e6..b8010cf62ead5 100644 --- a/its/V11Geometry.cxx +++ b/its/V11Geometry.cxx @@ -25,7 +25,7 @@ using std::cin; using namespace AliceO2::ITS; -ClassImp(V11Geometry) +ClassImp(AliceO2::ITS::V11Geometry) const Double_t V11Geometry::sMicron = 1.0E-4; const Double_t V11Geometry::sMm = 0.10; @@ -70,8 +70,7 @@ Bool_t V11Geometry::IntersectCircle(Double_t m, Double_t x0, Double_t y0, Double if (delta < 0) { return kFALSE; - } - else { + } else { Double_t root = TMath::Sqrt(delta); xi1 = (m * p + root) / q + xc; xi2 = (m * p - root) / q + xc; @@ -82,7 +81,7 @@ Bool_t V11Geometry::IntersectCircle(Double_t m, Double_t x0, Double_t y0, Double } Double_t V11Geometry::Yfrom2Points(Double_t x0, Double_t y0, Double_t x1, Double_t y1, Double_t x) - const + const { if (x0 == x1 && y0 == y1) { printf("Error: V11Geometry::Yfrom2Ponts The two points are " @@ -102,7 +101,7 @@ Double_t V11Geometry::Yfrom2Points(Double_t x0, Double_t y0, Double_t x1, Double } Double_t V11Geometry::Xfrom2Points(Double_t x0, Double_t y0, Double_t x1, Double_t y1, Double_t y) - const + const { if (x0 == x1 && y0 == y1) { printf("Error: V11Geometry::Yfrom2Ponts The two points are " @@ -234,32 +233,30 @@ void V11Geometry::InsidePoint(const TGeoPcon* p, Int_t i1, Int_t i2, Int_t i3, D if (i1 == i2) { y0 = p->GetRmin(i1); // cout <<"L396 y0="<GetRmax(i2); // cout <<"L397 y1="<GetRmax(i3); // cout <<"L398 y2="<GetRmax(i2); // cout <<"L397 y1="<GetRmax(i3); // cout <<"L398 y2="<GetRmin(i3); // cout <<"L399 y2="<GetRmin(i1); // cout <<"L401 y0="<GetRmin(i2); // cout <<"L402 y1="<GetRmin(i1); // cout <<"L401 y0="<GetRmin(i2); // cout <<"L402 y1="<GetRmin(i3); if (i2 == i3) { y2 = p->GetRmax(i3); // cout <<"L404 y2="<GetZ(i1); // cout <<"L406 x0="<GetZ(i2); // cout <<"L407 x1="<GetZ(i3); // cout <<"L408 x2="<GetZ(i1); // cout <<"L406 x0="<GetZ(i2); // cout <<"L407 x1="<GetZ(i3); // cout <<"L408 x2="<Z(j1) = x; if (max) { q->Rmax(j1) = y; - } - else { + } else { q->Rmin(j1) = y; } return; @@ -285,14 +282,12 @@ void V11Geometry::InsidePoint(Double_t x0, Double_t y0, Double_t x1, Double_t y1 y = y1; // cout <<"L420 y="<AddElement(itsH, w); // Hydrogen, atomic w = 4.0E-7; - itsAir->AddElement(itsXe, w); // Xenon, atomic + itsAir->AddElement(itsXe, w); // Xenon, atomic itsAir->SetDensity(351.0 * sKgm3); itsAir->SetPressure(101325 * sPascal); itsAir->SetTemperature(15.0 * sCelsius); @@ -1058,7 +1053,7 @@ Double_t V11Geometry::AngleForRoundedCorners1(Double_t dx, Double_t dy, Double_t void V11Geometry::AnglesForRoundedCorners(Double_t x0, Double_t y0, Double_t r0, Double_t x1, Double_t y1, Double_t r1, Double_t& t0, Double_t& t1) - const + const { Double_t t; @@ -1066,8 +1061,7 @@ void V11Geometry::AnglesForRoundedCorners(Double_t x0, Double_t y0, Double_t r0, t = AngleForRoundedCorners1(x1 - x0, y1 - y0, r1 - r0); t0 = t1 = t; return; - } - else if (r0 >= 0.0 && r1 <= 0.0) { // Inside to Outside +- + } else if (r0 >= 0.0 && r1 <= 0.0) { // Inside to Outside +- r1 = -r1; // make positive t = AngleForRoundedCorners0(x1 - x0, y1 - y0, r1 + r0); t0 = 180.0 + t; @@ -1079,8 +1073,7 @@ void V11Geometry::AnglesForRoundedCorners(Double_t x0, Double_t y0, Double_t r0, } t1 = t; return; - } - else if (r0 <= 0.0 && r1 >= 0.0) { // Outside to Inside -+ + } else if (r0 <= 0.0 && r1 >= 0.0) { // Outside to Inside -+ r0 = -r0; // make positive t = AngleForRoundedCorners1(x1 - x0, y1 - y0, r1 + r0); t0 = 180.0 + t; @@ -1092,8 +1085,7 @@ void V11Geometry::AnglesForRoundedCorners(Double_t x0, Double_t y0, Double_t r0, } t1 = t; return; - } - else if (r0 <= 0.0 && r1 <= 0.0) { // Outside to outside -- + } else if (r0 <= 0.0 && r1 <= 0.0) { // Outside to outside -- r0 = -r0; // make positive r1 = -r1; // make positive t = AngleForRoundedCorners0(x1 - x0, y1 - y0, r1 - r0); @@ -1149,31 +1141,27 @@ void V11Geometry::MakeFigure1(Double_t x0, Double_t y0, Double_t r0, Double_t x1 } if (xmin < 0.0) { xmin *= 1.1; - } - else { + } else { xmin *= 0.9; } if (ymin < 0.0) { ymin *= 1.1; - } - else { + } else { ymin *= 0.9; } if (xmax < 0.0) { xmax *= 0.9; - } - else { + } else { xmax *= 1.1; } if (ymax < 0.0) { ymax *= 0.9; - } - else { + } else { ymax *= 1.1; } j = (Int_t)(500.0 * (ymax - ymin) / (xmax - xmin)); TCanvas* can = - new TCanvas("V11Geometry_AnglesForRoundedCorners", "Figure for V11Geometry", 500, j); + new TCanvas("V11Geometry_AnglesForRoundedCorners", "Figure for V11Geometry", 500, j); h = ymax - ymin; if (h < 0) { h = -h; diff --git a/its/V11Geometry.h b/its/V11Geometry.h index b00466d76b0e3..f8358921664e8 100644 --- a/its/V11Geometry.h +++ b/its/V11Geometry.h @@ -27,10 +27,8 @@ namespace ITS { class V11Geometry : public TObject { public: - V11Geometry() - : mDebug() {}; - V11Geometry(Int_t debug) - : mDebug(debug) {}; + V11Geometry() : mDebug() {}; + V11Geometry(Int_t debug) : mDebug(debug) {}; virtual ~V11Geometry() {}; /// Sets the debug flag for debugging output @@ -370,7 +368,6 @@ class V11Geometry : public TObject { Double_t xc, Double_t yc, Double_t rc, Double_t& t0, Double_t& t1) const; - /// Function to compute the ending angle, for arc 0, and starting angle, /// for arc 1, such that a straight line will connect them with no discontinuities. /// Begin_Html diff --git a/its/itsLinkDef.h b/its/itsLinkDef.h new file mode 100644 index 0000000000000..47e99cac4a9ce --- /dev/null +++ b/its/itsLinkDef.h @@ -0,0 +1,19 @@ +#ifdef __CINT__ + +#pragma link off all globals; +#pragma link off all classes; +#pragma link off all functions; + +#pragma link C++ class AliceO2::ITS::UpgradeGeometryTGeo + ; +#pragma link C++ class AliceO2::ITS::V11Geometry + ; +#pragma link C++ class AliceO2::ITS::UpgradeV1Layer + ; +#pragma link C++ class AliceO2::ITS::Segmentation + ; +#pragma link C++ class AliceO2::ITS::UpgradeSegmentationPixel + ; +#pragma link C++ class AliceO2::ITS::GeometryManager + ; +#pragma link C++ class AliceO2::ITS::Detector + ; +#pragma link C++ class AliceO2::ITS::ContainerFactory; +#pragma link C++ class AliceO2::ITS::GeometryHandler + ; +#pragma link C++ class AliceO2::ITS::MisalignmentParameter + ; +#pragma link C++ class AliceO2::ITS::Point + ; + +#endif diff --git a/macro/run_sim.C b/macro/run_sim.C index 5cd9107134d29..879104316d531 100644 --- a/macro/run_sim.C +++ b/macro/run_sim.C @@ -1,7 +1,7 @@ -double radii2Turbo(double rMin,double rMid,double rMax, double sensW) +double radii2Turbo(double rMin, double rMid, double rMax, double sensW) { // compute turbo angle from radii and sensor width - return TMath::ASin((rMax*rMax-rMin*rMin)/(2*rMid*sensW))*TMath::RadToDeg(); + return TMath::ASin((rMax * rMax - rMin * rMin) / (2 * rMid * sensW)) * TMath::RadToDeg(); } void run_sim(Int_t nEvents = 10, TString mcEngine = "TGeant3") @@ -17,72 +17,67 @@ void run_sim(Int_t nEvents = 10, TString mcEngine = "TGeant3") TString parFile = filepar; // In general, the following parts need not be touched - // ======================================================================== - // ---- Debug option ------------------------------------------------- + // Debug option gDebug = 0; - // ------------------------------------------------------------------------ - // ----- Timer -------------------------------------------------------- + // Timer TStopwatch timer; timer.Start(); - // ------------------------------------------------------------------------ - gSystem->Load("libO2Base"); - gSystem->Load("libits"); + gSystem->Load("libAliceO2Base"); + gSystem->Load("libAliceO2its"); - // ----- Create simulation run ---------------------------------------- + // Create simulation run FairRunSim* run = new FairRunSim(); - run->SetName(mcEngine); // Transport engine - run->SetOutputFile(outFile); // Output file + run->SetName(mcEngine); // Transport engine + run->SetOutputFile(outFile); // Output file FairRuntimeDb* rtdb = run->GetRuntimeDb(); - // ------------------------------------------------------------------------ - // ----- Create media ------------------------------------------------- - run->SetMaterials("media.geo"); // Materials - // ------------------------------------------------------------------------ + // Create media + run->SetMaterials("media.geo"); // Materials - // ----- Create geometry ---------------------------------------------- - - FairModule* cave= new AliCave("CAVE"); + // Create geometry + FairModule* cave = new AliCave("CAVE"); cave->SetGeometryFileName("cave.geo"); run->AddModule(cave); -/* - FairDetector* tpc = new O2tpc("TPCV2"); - tpc->SetGeometry(); - run->AddModule(tpc); -*/ - O2Detector* its = new AliceO2::ITS::Detector("ITS", kTRUE, 7); + // FairDetector* tpc = new O2tpc("TPCV2"); + // tpc->SetGeometry(); + // run->AddModule(tpc); + + AliceO2::Base::Detector* its = new AliceO2::ITS::Detector("ITS", kTRUE, 7); run->AddModule(its); - + // build ITS upgrade detector - // sensitive area 13x15mm (X,Z) with 20x20 micron pitch, 2mm dead zone on readout side and 50 micron guardring + // sensitive area 13x15mm (X,Z) with 20x20 micron pitch, 2mm dead zone on readout side and 50 + // micron guardring const double kSensThick = 18e-4; const double kPitchX = 20e-4; const double kPitchZ = 20e-4; - const int kNRow = 650; - const int kNCol = 1500; + const int kNRow = 650; + const int kNCol = 1500; const double kSiThickIB = 150e-4; const double kSiThickOB = 150e-4; // const double kSensThick = 120e-4; // -> sensor Si thickness - const double kReadOutEdge = 0.2; // width of the readout edge (passive bottom) - const double kGuardRing = 50e-4; // width of passive area on left/right/top of the sensor + const double kReadOutEdge = 0.2; // width of the readout edge (passive bottom) + const double kGuardRing = 50e-4; // width of passive area on left/right/top of the sensor const int kNLr = 7; const int kNLrInner = 3; const int kBuildLevel = 0; - enum {kRmn,kRmd,kRmx,kNModPerStave,kPhi0,kNStave,kNPar}; + enum { kRmn, kRmd, kRmx, kNModPerStave, kPhi0, kNStave, kNPar }; // Radii are from last TDR (ALICE-TDR-017.pdf Tab. 1.1, rMid is mean value) - const double tdr5dat[kNLr][kNPar] = { - {2.24, 2.34, 2.67, 9., 16.37, 12}, // for each inner layer: rMin,rMid,rMax,NChip/Stave, phi0, nStaves - {3.01, 3.15, 3.46, 9., 12.03, 16}, - {3.78, 3.93, 4.21, 9., 10.02, 20}, - {-1, 19.6 , -1, 4., 0. , 24}, // for others: -, rMid, -, NMod/HStave, phi0, nStaves // 24 was 49 - {-1, 24.55, -1, 4., 0. , 30}, // 30 was 61 - {-1, 34.39, -1, 7., 0. , 42}, // 42 was 88 - {-1, 39.34, -1, 7., 0. , 48} // 48 was 100 + const double tdr5dat[kNLr][kNPar] = { + { 2.24, 2.34, 2.67, 9., 16.37, + 12 }, // for each inner layer: rMin,rMid,rMax,NChip/Stave, phi0, nStaves + { 3.01, 3.15, 3.46, 9., 12.03, 16 }, + { 3.78, 3.93, 4.21, 9., 10.02, 20 }, + { -1, 19.6, -1, 4., 0., 24 }, // for others: -, rMid, -, NMod/HStave, phi0, nStaves // 24 was 49 + { -1, 24.55, -1, 4., 0., 30 }, // 30 was 61 + { -1, 34.39, -1, 7., 0., 42 }, // 42 was 88 + { -1, 39.34, -1, 7., 0., 48 } // 48 was 100 }; const int nChipsPerModule = 7; // For OB: how many chips in a row @@ -90,105 +85,99 @@ void run_sim(Int_t nEvents = 10, TString mcEngine = "TGeant3") gSystem->Exec(" rm itsSegmentations.root "); // create segmentations: - AliceO2::ITS::UpgradeSegmentationPixel* seg0 = new AliceO2::ITS::UpgradeSegmentationPixel(0, // segID (0:9) - 1, // chips per module - kNCol, // ncols (total for module) - kNRow, // nrows - kPitchX, // default row pitch in cm - kPitchZ, // default col pitch in cm - kSensThick, // sensor thickness in cm - -1, // no special left col between chips - -1, // no special right col between chips - kGuardRing, // left - kGuardRing, // right - kGuardRing, // top - kReadOutEdge // bottom - ); // see UpgradeSegmentationPixel.h for extra options + AliceO2::ITS::UpgradeSegmentationPixel* seg0 = new AliceO2::ITS::UpgradeSegmentationPixel( + 0, // segID (0:9) + 1, // chips per module + kNCol, // ncols (total for module) + kNRow, // nrows + kPitchX, // default row pitch in cm + kPitchZ, // default col pitch in cm + kSensThick, // sensor thickness in cm + -1, // no special left col between chips + -1, // no special right col between chips + kGuardRing, // left + kGuardRing, // right + kGuardRing, // top + kReadOutEdge // bottom + ); // see UpgradeSegmentationPixel.h for extra options seg0->Store(AliceO2::ITS::UpgradeGeometryTGeo::GetITSsegmentationFileName()); seg0->Print(); - double dzLr,rLr,phi0,turbo; - int nStaveLr,nModPerStaveLr,idLr; + double dzLr, rLr, phi0, turbo; + int nStaveLr, nModPerStaveLr, idLr; its->SetStaveModelIB(AliceO2::ITS::Detector::kIBModel22); its->SetStaveModelOB(AliceO2::ITS::Detector::kOBModel1); const int kNWrapVol = 3; - const double wrpRMin[kNWrapVol] = { 2.1, 15.0, 32.0}; - const double wrpRMax[kNWrapVol] = { 7.0, 27.0+2.5, 43.0+1.5}; - const double wrpZSpan[kNWrapVol] = {28.0, 86.0, 150.0}; + const double wrpRMin[kNWrapVol] = { 2.1, 15.0, 32.0 }; + const double wrpRMax[kNWrapVol] = { 7.0, 27.0 + 2.5, 43.0 + 1.5 }; + const double wrpZSpan[kNWrapVol] = { 28.0, 86.0, 150.0 }; - its->SetNWrapVolumes(kNWrapVol); // define wrapper volumes for layers + its->SetNumberOfWrapperVolumes(kNWrapVol); // define wrapper volumes for layers - for (int iw=0;iwDefineWrapVolume(iw, wrpRMin[iw], wrpRMax[iw], wrpZSpan[iw]); + for (int iw = 0; iw < kNWrapVol; iw++) { + its->DefineWrapperVolume(iw, wrpRMin[iw], wrpRMax[iw], wrpZSpan[iw]); } - for (int idLr=0;idLr=kNLrInner) { + if (idLr >= kNLrInner) { nChipsPerStaveLr *= nChipsPerModule; - its->DefineLayer(idLr, phi0, rLr, nChipsPerStaveLr*seg0->Dz(), nStaveLr, nModPerStaveLr, - kSiThickOB, seg0->Dy(), seg0->GetChipTypeID(),kBuildLevel); + its->DefineLayer(idLr, phi0, rLr, nChipsPerStaveLr * seg0->Dz(), nStaveLr, nModPerStaveLr, + kSiThickOB, seg0->Dy(), seg0->GetChipTypeID(), kBuildLevel); // printf("Add Lr%d: R=%6.2f DZ:%6.2f Staves:%3d NMod/Stave:%3d\n", // idLr,rLr,nChipsPerStaveLr*seg0->Dz(),nStaveLr,nModPerStaveLr); } else { - turbo = -radii2Turbo(tdr5dat[idLr][kRmn],rLr,tdr5dat[idLr][kRmx],seg0->Dx()); - its->DefineLayerTurbo(idLr, phi0, rLr, nChipsPerStaveLr*seg0->Dz(), nStaveLr, nChipsPerStaveLr, - seg0->Dx(), turbo, kSiThickIB, seg0->Dy(), seg0->GetChipTypeID(),kBuildLevel); + turbo = -radii2Turbo(tdr5dat[idLr][kRmn], rLr, tdr5dat[idLr][kRmx], seg0->Dx()); + its->DefineLayerTurbo(idLr, phi0, rLr, nChipsPerStaveLr * seg0->Dz(), nStaveLr, + nChipsPerStaveLr, seg0->Dx(), turbo, kSiThickIB, seg0->Dy(), + seg0->GetChipTypeID(), kBuildLevel); // printf("Add Lr%d: R=%6.2f DZ:%6.2f Turbo:%+6.2f Staves:%3d NMod/Stave:%3d\n", // idLr,rLr,nChipsPerStaveLr*seg0->Dz(),turbo,nStaveLr,nModPerStaveLr); } } - // ----- Create PrimaryGenerator -------------------------------------- + // Create PrimaryGenerator FairPrimaryGenerator* primGen = new FairPrimaryGenerator(); - FairBoxGenerator* boxGen = new FairBoxGenerator(2212, 1); /*protons*/ + FairBoxGenerator* boxGen = new FairBoxGenerator(2212, 1); /*protons*/ - boxGen->SetThetaRange (0.0, 90.0); - boxGen->SetPRange (100,100.01); - boxGen->SetPhiRange (0.,360.); + boxGen->SetThetaRange(0.0, 90.0); + boxGen->SetPRange(100, 100.01); + boxGen->SetPhiRange(0., 360.); boxGen->SetDebug(kTRUE); primGen->AddGenerator(boxGen); run->SetGenerator(primGen); - // ------------------------------------------------------------------------ - // ----- Initialize simulation run ------------------------------------ + // Initialize simulation run run->Init(); - // ------------------------------------------------------------------------ - - // ----- Runtime database --------------------------------------------- + // Runtime database Bool_t kParameterMerged = kTRUE; FairParRootFileIo* parOut = new FairParRootFileIo(kParameterMerged); parOut->open(parFile.Data()); rtdb->setOutput(parOut); rtdb->saveOutput(); rtdb->print(); - // ------------------------------------------------------------------------ - // ----- Start run ---------------------------------------------------- + // Start run run->Run(nEvents); run->CreateGeometryFile("geofile_full.root"); - // ------------------------------------------------------------------------ - // ----- Finish ------------------------------------------------------- + // Finish timer.Stop(); Double_t rtime = timer.RealTime(); Double_t ctime = timer.CpuTime(); cout << endl << endl; cout << "Macro finished succesfully." << endl; - cout << "Output file is " << outFile << endl; + cout << "Output file is " << outFile << endl; cout << "Parameter file is " << parFile << endl; - cout << "Real time " << rtime << " s, CPU time " << ctime - << "s" << endl << endl; - // ------------------------------------------------------------------------ - + cout << "Real time " << rtime << " s, CPU time " << ctime << "s" << endl << endl; } From 433c9ef9f8d9ff76efba2b7c9835ea69ae5e8fd2 Mon Sep 17 00:00:00 2001 From: chkouzin Date: Thu, 6 Nov 2014 11:20:59 +0100 Subject: [PATCH 2/2] Created a Doxygen configuration file, to create the documentation execute doxygen AliceO2Doxygen.conf Edited the markdown file to also conform with the doxygen markdown format --- AliceO2Doxygen.conf | 2307 +++++++++++++++++++++++++++++++++++++++++++ Base/Detector.h | 4 +- README.md | 62 +- 3 files changed, 2334 insertions(+), 39 deletions(-) create mode 100644 AliceO2Doxygen.conf diff --git a/AliceO2Doxygen.conf b/AliceO2Doxygen.conf new file mode 100644 index 0000000000000..cd1a29ab14c45 --- /dev/null +++ b/AliceO2Doxygen.conf @@ -0,0 +1,2307 @@ +# Doxyfile 1.8.6 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project. +# +# All text after a double hash (##) is considered a comment and is placed in +# front of the TAG it is preceding. +# +# All text after a single hash (#) is considered a comment and will be ignored. +# The format is: +# TAG = value [value, ...] +# For lists, items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (\" \"). + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all text +# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv +# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv +# for the list of possible encodings. +# The default value is: UTF-8. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by +# double-quotes, unless you are using Doxywizard) that should identify the +# project for which the documentation is generated. This name is used in the +# title of most generated pages and in a few other places. +# The default value is: My Project. + +PROJECT_NAME = "AliceO2" + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. This +# could be handy for archiving the generated documentation or if some version +# control system is used. + +PROJECT_NUMBER = + +# Using the PROJECT_BRIEF tag one can provide an optional one line description +# for a project that appears at the top of each page and should give viewer a +# quick idea about the purpose of the project. Keep the description short. + +PROJECT_BRIEF = + +# With the PROJECT_LOGO tag one can specify an logo or icon that is included in +# the documentation. The maximum height of the logo should not exceed 55 pixels +# and the maximum width should not exceed 200 pixels. Doxygen will copy the logo +# to the output directory. + +PROJECT_LOGO = + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path +# into which the generated documentation will be written. If a relative path is +# entered, it will be relative to the location where doxygen was started. If +# left blank the current directory will be used. + +OUTPUT_DIRECTORY = html-doc + +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub- +# directories (in 2 levels) under the output directory of each output format and +# will distribute the generated files over these directories. Enabling this +# option can be useful when feeding doxygen a huge amount of source files, where +# putting all generated files in the same directory would otherwise causes +# performance problems for the file system. +# The default value is: NO. + +CREATE_SUBDIRS = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, +# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), +# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, +# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), +# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, +# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, +# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, +# Ukrainian and Vietnamese. +# The default value is: English. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member +# descriptions after the members that are listed in the file and class +# documentation (similar to Javadoc). Set to NO to disable this. +# The default value is: YES. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief +# description of a member or function before the detailed description +# +# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. +# The default value is: YES. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator that is +# used to form the text in various listings. Each string in this list, if found +# as the leading text of the brief description, will be stripped from the text +# and the result, after processing the whole list, is used as the annotated +# text. Otherwise, the brief description is used as-is. If left blank, the +# following values are used ($name is automatically replaced with the name of +# the entity):The $name class, The $name widget, The $name file, is, provides, +# specifies, contains, represents, a, an and the. + +ABBREVIATE_BRIEF = + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# doxygen will generate a detailed section even if there is only a brief +# description. +# The default value is: NO. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. +# The default value is: NO. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path +# before files name in the file list and in the header files. If set to NO the +# shortest path that makes the file name unique will be used +# The default value is: YES. + +FULL_PATH_NAMES = YES + +# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. +# Stripping is only done if one of the specified strings matches the left-hand +# part of the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the path to +# strip. +# +# Note that you can specify absolute paths here, but also relative paths, which +# will be relative from the directory where doxygen is started. +# This tag requires that the tag FULL_PATH_NAMES is set to YES. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the +# path mentioned in the documentation of a class, which tells the reader which +# header file to include in order to use a class. If left blank only the name of +# the header file containing the class definition is used. Otherwise one should +# specify the list of include paths that are normally passed to the compiler +# using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but +# less readable) file names. This can be useful is your file systems doesn't +# support long names like on DOS, Mac, or CD-ROM. +# The default value is: NO. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the +# first line (until the first dot) of a Javadoc-style comment as the brief +# description. If set to NO, the Javadoc-style will behave just like regular Qt- +# style comments (thus requiring an explicit @brief command for a brief +# description.) +# The default value is: NO. + +JAVADOC_AUTOBRIEF = NO + +# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first +# line (until the first dot) of a Qt-style comment as the brief description. If +# set to NO, the Qt-style will behave just like regular Qt-style comments (thus +# requiring an explicit \brief command for a brief description.) +# The default value is: NO. + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a +# multi-line C++ special comment block (i.e. a block of //! or /// comments) as +# a brief description. This used to be the default behavior. The new default is +# to treat a multi-line C++ comment block as a detailed description. Set this +# tag to YES if you prefer the old behavior instead. +# +# Note that setting this tag to YES also means that rational rose comments are +# not recognized any more. +# The default value is: NO. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the +# documentation from any documented member that it re-implements. +# The default value is: YES. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a +# new page for each member. If set to NO, the documentation of a member will be +# part of the file/class/namespace that contains it. +# The default value is: NO. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen +# uses this value to replace tabs by spaces in code fragments. +# Minimum value: 1, maximum value: 16, default value: 4. + +TAB_SIZE = 2 + +# This tag can be used to specify a number of aliases that act as commands in +# the documentation. An alias has the form: +# name=value +# For example adding +# "sideeffect=@par Side Effects:\n" +# will allow you to put the command \sideeffect (or @sideeffect) in the +# documentation, which will result in a user-defined paragraph with heading +# "Side Effects:". You can put \n's in the value part of an alias to insert +# newlines. + +ALIASES = + +# This tag can be used to specify a number of word-keyword mappings (TCL only). +# A mapping has the form "name=value". For example adding "class=itcl::class" +# will allow you to use the command class in the itcl::class meaning. + +TCL_SUBST = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources +# only. Doxygen will then generate output that is more tailored for C. For +# instance, some of the names that are used will be different. The list of all +# members will be omitted, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_FOR_C = NO + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or +# Python sources only. Doxygen will then generate output that is more tailored +# for that language. For instance, namespaces will be presented as packages, +# qualified scopes will look different, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources. Doxygen will then generate output that is tailored for Fortran. +# The default value is: NO. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for VHDL. +# The default value is: NO. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it +# parses. With this tag you can assign which parser to use for a given +# extension. Doxygen has a built-in mapping, but you can override or extend it +# using this tag. The format is ext=language, where ext is a file extension, and +# language is one of the parsers supported by doxygen: IDL, Java, Javascript, +# C#, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL. For instance to make +# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C +# (default is Fortran), use: inc=Fortran f=C. +# +# Note For files without extension you can use no_extension as a placeholder. +# +# Note that for custom extensions you also need to set FILE_PATTERNS otherwise +# the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments +# according to the Markdown format, which allows for more readable +# documentation. See http://daringfireball.net/projects/markdown/ for details. +# The output of markdown processing is further processed by doxygen, so you can +# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in +# case of backward compatibilities issues. +# The default value is: YES. + +MARKDOWN_SUPPORT = YES + +# When enabled doxygen tries to link words that correspond to documented +# classes, or namespaces to their corresponding documentation. Such a link can +# be prevented in individual cases by by putting a % sign in front of the word +# or globally by setting AUTOLINK_SUPPORT to NO. +# The default value is: YES. + +AUTOLINK_SUPPORT = YES + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should set this +# tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); +# versus func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. +# The default value is: NO. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. +# The default value is: NO. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: +# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen +# will parse them like normal C++ but will assume all classes use public instead +# of private inheritance when no explicit protection keyword is present. +# The default value is: NO. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate +# getter and setter methods for a property. Setting this option to YES will make +# doxygen to replace the get and set methods by a property in the documentation. +# This will only work if the methods are indeed getting or setting a simple +# type. If this is not the case, or you want to show the methods anyway, you +# should set this option to NO. +# The default value is: YES. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. +# The default value is: NO. + +DISTRIBUTE_GROUP_DOC = NO + +# Set the SUBGROUPING tag to YES to allow class member groups of the same type +# (for instance a group of public functions) to be put as a subgroup of that +# type (e.g. under the Public Functions section). Set it to NO to prevent +# subgrouping. Alternatively, this can be done per class using the +# \nosubgrouping command. +# The default value is: YES. + +SUBGROUPING = YES + +# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions +# are shown inside the group in which they are included (e.g. using \ingroup) +# instead of on a separate page (for HTML and Man pages) or section (for LaTeX +# and RTF). +# +# Note that this feature does not work in combination with +# SEPARATE_MEMBER_PAGES. +# The default value is: NO. + +INLINE_GROUPED_CLASSES = NO + +# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions +# with only public data fields or simple typedef fields will be shown inline in +# the documentation of the scope in which they are defined (i.e. file, +# namespace, or group documentation), provided this scope is documented. If set +# to NO, structs, classes, and unions are shown on a separate page (for HTML and +# Man pages) or section (for LaTeX and RTF). +# The default value is: NO. + +INLINE_SIMPLE_STRUCTS = NO + +# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or +# enum is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically be +# useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. +# The default value is: NO. + +TYPEDEF_HIDES_STRUCT = NO + +# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This +# cache is used to resolve symbols given their name and scope. Since this can be +# an expensive process and often the same symbol appears multiple times in the +# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small +# doxygen will become slower. If the cache is too large, memory is wasted. The +# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range +# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 +# symbols. At the end of a run doxygen will report the cache usage and suggest +# the optimal cache size from a speed point of view. +# Minimum value: 0, maximum value: 9, default value: 0. + +LOOKUP_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. Private +# class members and static file members will be hidden unless the +# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. +# Note: This will also disable the warnings about undocumented members that are +# normally produced when WARNINGS is set to YES. +# The default value is: NO. + +EXTRACT_ALL = NO + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class will +# be included in the documentation. +# The default value is: NO. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal +# scope will be included in the documentation. +# The default value is: NO. + +EXTRACT_PACKAGE = NO + +# If the EXTRACT_STATIC tag is set to YES all static members of a file will be +# included in the documentation. +# The default value is: NO. + +EXTRACT_STATIC = NO + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined +# locally in source files will be included in the documentation. If set to NO +# only classes defined in header files are included. Does not have any effect +# for Java sources. +# The default value is: YES. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. When set to YES local methods, +# which are defined in the implementation section but not in the interface are +# included in the documentation. If set to NO only methods in the interface are +# included. +# The default value is: NO. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base name of +# the file that contains the anonymous namespace. By default anonymous namespace +# are hidden. +# The default value is: NO. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all +# undocumented members inside documented classes or files. If set to NO these +# members will be included in the various overviews, but no documentation +# section is generated. This option has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. If set +# to NO these classes will be included in the various overviews. This option has +# no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend +# (class|struct|union) declarations. If set to NO these declarations will be +# included in the documentation. +# The default value is: NO. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any +# documentation blocks found inside the body of a function. If set to NO these +# blocks will be appended to the function's detailed documentation block. +# The default value is: NO. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation that is typed after a +# \internal command is included. If the tag is set to NO then the documentation +# will be excluded. Set it to YES to include the internal documentation. +# The default value is: NO. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file +# names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. +# The default value is: system dependent. + +CASE_SENSE_NAMES = YES + +# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with +# their full class and namespace scopes in the documentation. If set to YES the +# scope will be hidden. +# The default value is: NO. + +HIDE_SCOPE_NAMES = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of +# the files that are included by a file in the documentation of that file. +# The default value is: YES. + +SHOW_INCLUDE_FILES = YES + +# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each +# grouped member an include statement to the documentation, telling the reader +# which file to include in order to use the member. +# The default value is: NO. + +SHOW_GROUPED_MEMB_INC = NO + +# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include +# files with double quotes in the documentation rather than with sharp brackets. +# The default value is: NO. + +FORCE_LOCAL_INCLUDES = NO + +# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the +# documentation for inline members. +# The default value is: YES. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the +# (detailed) documentation of file and class members alphabetically by member +# name. If set to NO the members will appear in declaration order. +# The default value is: YES. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief +# descriptions of file, namespace and class members alphabetically by member +# name. If set to NO the members will appear in declaration order. Note that +# this will also influence the order of the classes in the class list. +# The default value is: NO. + +SORT_BRIEF_DOCS = NO + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the +# (brief and detailed) documentation of class members so that constructors and +# destructors are listed first. If set to NO the constructors will appear in the +# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. +# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief +# member documentation. +# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting +# detailed member documentation. +# The default value is: NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy +# of group names into alphabetical order. If set to NO the group names will +# appear in their defined order. +# The default value is: NO. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by +# fully-qualified names, including namespaces. If set to NO, the class list will +# be sorted only by class name, not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the alphabetical +# list. +# The default value is: NO. + +SORT_BY_SCOPE_NAME = NO + +# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper +# type resolution of all parameters of a function it will reject a match between +# the prototype and the implementation of a member function even if there is +# only one candidate or it is obvious which candidate to choose by doing a +# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still +# accept a match between prototype and implementation in such cases. +# The default value is: NO. + +STRICT_PROTO_MATCHING = NO + +# The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the +# todo list. This list is created by putting \todo commands in the +# documentation. +# The default value is: YES. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the +# test list. This list is created by putting \test commands in the +# documentation. +# The default value is: YES. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable ( YES) or disable ( NO) the bug +# list. This list is created by putting \bug commands in the documentation. +# The default value is: YES. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable ( YES) or disable ( NO) +# the deprecated list. This list is created by putting \deprecated commands in +# the documentation. +# The default value is: YES. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional documentation +# sections, marked by \if ... \endif and \cond +# ... \endcond blocks. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the +# initial value of a variable or macro / define can have for it to appear in the +# documentation. If the initializer consists of more lines than specified here +# it will be hidden. Use a value of 0 to hide initializers completely. The +# appearance of the value of individual variables and macros / defines can be +# controlled using \showinitializer or \hideinitializer command in the +# documentation regardless of this setting. +# Minimum value: 0, maximum value: 10000, default value: 30. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at +# the bottom of the documentation of classes and structs. If set to YES the list +# will mention the files that were used to generate the documentation. +# The default value is: YES. + +SHOW_USED_FILES = YES + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This +# will remove the Files entry from the Quick Index and from the Folder Tree View +# (if specified). +# The default value is: YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces +# page. This will remove the Namespaces entry from the Quick Index and from the +# Folder Tree View (if specified). +# The default value is: YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command command input-file, where command is the value of the +# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided +# by doxygen. Whatever the program writes to standard output is used as the file +# version. For an example see the documentation. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed +# by doxygen. The layout file controls the global structure of the generated +# output files in an output format independent way. To create the layout file +# that represents doxygen's defaults, run doxygen with the -l option. You can +# optionally specify a file name after the option, if omitted DoxygenLayout.xml +# will be used as the name of the layout file. +# +# Note that if you run doxygen from a directory containing a file called +# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE +# tag is left empty. + +LAYOUT_FILE = + +# The CITE_BIB_FILES tag can be used to specify one or more bib files containing +# the reference definitions. This must be a list of .bib files. The .bib +# extension is automatically appended if omitted. This requires the bibtex tool +# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. +# For LaTeX the style of the bibliography can be controlled using +# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the +# search path. Do not use file names with spaces, bibtex cannot handle them. See +# also \cite for info how to create references. + +CITE_BIB_FILES = + +#--------------------------------------------------------------------------- +# Configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated to +# standard output by doxygen. If QUIET is set to YES this implies that the +# messages are off. +# The default value is: NO. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES +# this implies that the warnings are on. +# +# Tip: Turn warnings on while writing the documentation. +# The default value is: YES. + +WARNINGS = YES + +# If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate +# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag +# will automatically be disabled. +# The default value is: YES. + +WARN_IF_UNDOCUMENTED = YES + +# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some parameters +# in a documented function, or documenting parameters that don't exist or using +# markup commands wrongly. +# The default value is: YES. + +WARN_IF_DOC_ERROR = YES + +# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that +# are documented, but have no documentation for their parameters or return +# value. If set to NO doxygen will only warn about wrong or incomplete parameter +# documentation, but not about the absence of documentation. +# The default value is: NO. + +WARN_NO_PARAMDOC = NO + +# The WARN_FORMAT tag determines the format of the warning messages that doxygen +# can produce. The string should contain the $file, $line, and $text tags, which +# will be replaced by the file and line number from which the warning originated +# and the warning text. Optionally the format may contain $version, which will +# be replaced by the version of the file (if it could be obtained via +# FILE_VERSION_FILTER) +# The default value is: $file:$line: $text. + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning and error +# messages should be written. If left blank the output is written to standard +# error (stderr). + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# Configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag is used to specify the files and/or directories that contain +# documented source files. You may enter file names like myfile.cpp or +# directories like /usr/src/myproject. Separate the files or directories with +# spaces. +# Note: If this tag is empty the current directory is searched. + +INPUT = + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses +# libiconv (or the iconv built into libc) for the transcoding. See the libiconv +# documentation (see: http://www.gnu.org/software/libiconv) for the list of +# possible encodings. +# The default value is: UTF-8. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and +# *.h) to filter out the source-files in the directories. If left blank the +# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii, +# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp, +# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown, +# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf, +# *.qsf, *.as and *.js. + +FILE_PATTERNS = + +# The RECURSIVE tag can be used to specify whether or not subdirectories should +# be searched for input files as well. +# The default value is: NO. + +RECURSIVE = YES + +# The EXCLUDE tag can be used to specify files and/or directories that should be +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. +# +# Note that relative paths are relative to the directory from which doxygen is +# run. + +EXCLUDE = .git/ +EXCLUDE += build/ +EXCLUDE += build-dir/ +EXCLUDE += html-docs/ + + +# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or +# directories that are symbolic links (a Unix file system feature) are excluded +# from the input. +# The default value is: NO. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories use the pattern */test/* + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or directories +# that contain example code fragments that are included (see the \include +# command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and +# *.h) to filter out the source-files in the directories. If left blank all +# files are included. + +EXAMPLE_PATTERNS = + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude commands +# irrespective of the value of the RECURSIVE tag. +# The default value is: NO. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or directories +# that contain images that are to be included in the documentation (see the +# \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command: +# +# +# +# where is the value of the INPUT_FILTER tag, and is the +# name of an input file. Doxygen will then use the output that the filter +# program writes to standard output. If FILTER_PATTERNS is specified, this tag +# will be ignored. +# +# Note that the filter must not add or remove lines; it is applied before the +# code is scanned, but not when the output code is generated. If lines are added +# or removed, the anchors will not be placed correctly. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: pattern=filter +# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how +# filters are used. If the FILTER_PATTERNS tag is empty or if none of the +# patterns match the file name, INPUT_FILTER is applied. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER ) will also be used to filter the input files that are used for +# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). +# The default value is: NO. + +FILTER_SOURCE_FILES = NO + +# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file +# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and +# it is also possible to disable source filtering for a specific pattern using +# *.ext= (so without naming a filter). +# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. + +FILTER_SOURCE_PATTERNS = + +# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that +# is part of the input, its contents will be placed on the main page +# (index.html). This can be useful if you have a project on for instance GitHub +# and want to reuse the introduction page also for the doxygen output. + +USE_MDFILE_AS_MAINPAGE = README.md + +#--------------------------------------------------------------------------- +# Configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will be +# generated. Documented entities will be cross-referenced with these sources. +# +# Note: To get rid of all source code in the generated output, make sure that +# also VERBATIM_HEADERS is set to NO. +# The default value is: NO. + +SOURCE_BROWSER = NO + +# Setting the INLINE_SOURCES tag to YES will include the body of functions, +# classes and enums directly into the documentation. +# The default value is: NO. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any +# special comment blocks from generated source code fragments. Normal C, C++ and +# Fortran comments will always remain visible. +# The default value is: YES. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES then for each documented +# function all documented functions referencing it will be listed. +# The default value is: NO. + +REFERENCED_BY_RELATION = NO + +# If the REFERENCES_RELATION tag is set to YES then for each documented function +# all documented entities called/used by that function will be listed. +# The default value is: NO. + +REFERENCES_RELATION = NO + +# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set +# to YES, then the hyperlinks from functions in REFERENCES_RELATION and +# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will +# link to the documentation. +# The default value is: YES. + +REFERENCES_LINK_SOURCE = YES + +# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the +# source code will show a tooltip with additional information such as prototype, +# brief description and links to the definition and documentation. Since this +# will make the HTML file larger and loading of large files a bit slower, you +# can opt to disable this feature. +# The default value is: YES. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +SOURCE_TOOLTIPS = YES + +# If the USE_HTAGS tag is set to YES then the references to source code will +# point to the HTML generated by the htags(1) tool instead of doxygen built-in +# source browser. The htags tool is part of GNU's global source tagging system +# (see http://www.gnu.org/software/global/global.html). You will need version +# 4.8.6 or higher. +# +# To use it do the following: +# - Install the latest version of global +# - Enable SOURCE_BROWSER and USE_HTAGS in the config file +# - Make sure the INPUT points to the root of the source tree +# - Run doxygen as normal +# +# Doxygen will invoke htags (and that will in turn invoke gtags), so these +# tools must be available from the command line (i.e. in the search path). +# +# The result: instead of the source browser generated by doxygen, the links to +# source code will now point to the output of htags. +# The default value is: NO. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a +# verbatim copy of the header file for each class for which an include is +# specified. Set to NO to disable this. +# See also: Section \class. +# The default value is: YES. + +VERBATIM_HEADERS = YES + +#--------------------------------------------------------------------------- +# Configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all +# compounds will be generated. Enable this if the project contains a lot of +# classes, structs, unions or interfaces. +# The default value is: YES. + +ALPHABETICAL_INDEX = YES + +# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in +# which the alphabetical index list will be split. +# Minimum value: 1, maximum value: 20, default value: 5. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all classes will +# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag +# can be used to specify a prefix (or a list of prefixes) that should be ignored +# while generating the index headers. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES doxygen will generate HTML output +# The default value is: YES. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a +# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of +# it. +# The default directory is: html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each +# generated HTML page (for example: .htm, .php, .asp). +# The default value is: .html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a user-defined HTML header file for +# each generated HTML page. If the tag is left blank doxygen will generate a +# standard header. +# +# To get valid HTML the header file that includes any scripts and style sheets +# that doxygen needs, which is dependent on the configuration options used (e.g. +# the setting GENERATE_TREEVIEW). It is highly recommended to start with a +# default header using +# doxygen -w html new_header.html new_footer.html new_stylesheet.css +# YourConfigFile +# and then modify the file new_header.html. See also section "Doxygen usage" +# for information on how to generate the default header that doxygen normally +# uses. +# Note: The header is subject to change so you typically have to regenerate the +# default header when upgrading to a newer version of doxygen. For a description +# of the possible markers and block names see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each +# generated HTML page. If the tag is left blank doxygen will generate a standard +# footer. See HTML_HEADER for more information on how to generate a default +# footer and what special commands can be used inside the footer. See also +# section "Doxygen usage" for information on how to generate the default footer +# that doxygen normally uses. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style +# sheet that is used by each HTML page. It can be used to fine-tune the look of +# the HTML output. If left blank doxygen will generate a default style sheet. +# See also section "Doxygen usage" for information on how to generate the style +# sheet that doxygen normally uses. +# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as +# it is more robust and this tag (HTML_STYLESHEET) will in the future become +# obsolete. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_STYLESHEET = + +# The HTML_EXTRA_STYLESHEET tag can be used to specify an additional user- +# defined cascading style sheet that is included after the standard style sheets +# created by doxygen. Using this option one can overrule certain style aspects. +# This is preferred over using HTML_STYLESHEET since it does not replace the +# standard style sheet and is therefor more robust against future updates. +# Doxygen will copy the style sheet file to the output directory. For an example +# see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_STYLESHEET = + +# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or +# other source files which should be copied to the HTML output directory. Note +# that these files will be copied to the base HTML output directory. Use the +# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these +# files. In the HTML_STYLESHEET file, use the file name only. Also note that the +# files will be copied as-is; there are no commands or markers available. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_FILES = + +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen +# will adjust the colors in the stylesheet and background images according to +# this color. Hue is specified as an angle on a colorwheel, see +# http://en.wikipedia.org/wiki/Hue for more information. For instance the value +# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 +# purple, and 360 is red again. +# Minimum value: 0, maximum value: 359, default value: 220. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_HUE = 220 + +# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors +# in the HTML output. For a value of 0 the output will use grayscales only. A +# value of 255 will produce the most vivid colors. +# Minimum value: 0, maximum value: 255, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_SAT = 100 + +# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the +# luminance component of the colors in the HTML output. Values below 100 +# gradually make the output lighter, whereas values above 100 make the output +# darker. The value divided by 100 is the actual gamma applied, so 80 represents +# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not +# change the gamma. +# Minimum value: 40, maximum value: 240, default value: 80. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_GAMMA = 80 + +# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML +# page will contain the date and time when the page was generated. Setting this +# to NO can help when comparing the output of multiple runs. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_TIMESTAMP = YES + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_DYNAMIC_SECTIONS = NO + +# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries +# shown in the various tree structured indices initially; the user can expand +# and collapse entries dynamically later on. Doxygen will expand the tree to +# such a level that at most the specified number of entries are visible (unless +# a fully collapsed tree already exceeds this amount). So setting the number of +# entries 1 will produce a full collapsed tree by default. 0 is a special value +# representing an infinite number of entries and will result in a full expanded +# tree by default. +# Minimum value: 0, maximum value: 9999, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_INDEX_NUM_ENTRIES = 100 + +# If the GENERATE_DOCSET tag is set to YES, additional index files will be +# generated that can be used as input for Apple's Xcode 3 integrated development +# environment (see: http://developer.apple.com/tools/xcode/), introduced with +# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a +# Makefile in the HTML output directory. Running make will produce the docset in +# that directory and running make install will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at +# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html +# for more information. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_DOCSET = NO + +# This tag determines the name of the docset feed. A documentation feed provides +# an umbrella under which multiple documentation sets from a single provider +# (such as a company or product suite) can be grouped. +# The default value is: Doxygen generated docs. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# This tag specifies a string that should uniquely identify the documentation +# set bundle. This should be a reverse domain-name style string, e.g. +# com.mycompany.MyDocSet. Doxygen will append .docset to the name. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify +# the documentation publisher. This should be a reverse domain-name style +# string, e.g. com.mycompany.MyDocSet.documentation. +# The default value is: org.doxygen.Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_ID = org.doxygen.Publisher + +# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. +# The default value is: Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_NAME = Publisher + +# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three +# additional HTML index files: index.hhp, index.hhc, and index.hhk. The +# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop +# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on +# Windows. +# +# The HTML Help Workshop contains a compiler that can convert all HTML output +# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML +# files are now used as the Windows 98 help format, and will replace the old +# Windows help format (.hlp) on all Windows platforms in the future. Compressed +# HTML files also contain an index, a table of contents, and you can search for +# words in the documentation. The HTML workshop also contains a viewer for +# compressed HTML files. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_HTMLHELP = NO + +# The CHM_FILE tag can be used to specify the file name of the resulting .chm +# file. You can add a path in front of the file if the result should not be +# written to the html output directory. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_FILE = + +# The HHC_LOCATION tag can be used to specify the location (absolute path +# including file name) of the HTML help compiler ( hhc.exe). If non-empty +# doxygen will try to run the HTML help compiler on the generated index.hhp. +# The file has to be specified with full path. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +HHC_LOCATION = + +# The GENERATE_CHI flag controls if a separate .chi index file is generated ( +# YES) or that it should be included in the master .chm file ( NO). +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +GENERATE_CHI = NO + +# The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc) +# and project file content. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_INDEX_ENCODING = + +# The BINARY_TOC flag controls whether a binary table of contents is generated ( +# YES) or a normal table of contents ( NO) in the .chm file. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members to +# the table of contents of the HTML help documentation and to the tree view. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +TOC_EXPAND = NO + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and +# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that +# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help +# (.qch) of the generated HTML documentation. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify +# the file name of the resulting .qch file. The path specified is relative to +# the HTML output folder. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help +# Project output. For more information please see Qt Help Project / Namespace +# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_NAMESPACE = org.doxygen.Project + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt +# Help Project output. For more information please see Qt Help Project / Virtual +# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- +# folders). +# The default value is: doc. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_VIRTUAL_FOLDER = doc + +# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom +# filter to add. For more information please see Qt Help Project / Custom +# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the +# custom filter to add. For more information please see Qt Help Project / Custom +# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this +# project's filter section matches. Qt Help Project / Filter Attributes (see: +# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_SECT_FILTER_ATTRS = + +# The QHG_LOCATION tag can be used to specify the location of Qt's +# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the +# generated .qhp file. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHG_LOCATION = + +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be +# generated, together with the HTML files, they form an Eclipse help plugin. To +# install this plugin and make it available under the help contents menu in +# Eclipse, the contents of the directory containing the HTML and XML files needs +# to be copied into the plugins directory of eclipse. The name of the directory +# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. +# After copying Eclipse needs to be restarted before the help appears. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_ECLIPSEHELP = NO + +# A unique identifier for the Eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have this +# name. Each documentation set should have its own identifier. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. + +ECLIPSE_DOC_ID = org.doxygen.Project + +# If you want full control over the layout of the generated HTML pages it might +# be necessary to disable the index and replace it with your own. The +# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top +# of each HTML page. A value of NO enables the index and the value YES disables +# it. Since the tabs in the index contain the same information as the navigation +# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +DISABLE_INDEX = NO + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. If the tag +# value is set to YES, a side panel will be generated containing a tree-like +# index structure (just like the one that is generated for HTML Help). For this +# to work a browser that supports JavaScript, DHTML, CSS and frames is required +# (i.e. any modern browser). Windows users are probably better off using the +# HTML help feature. Via custom stylesheets (see HTML_EXTRA_STYLESHEET) one can +# further fine-tune the look of the index. As an example, the default style +# sheet generated by doxygen has an example that shows how to put an image at +# the root of the tree instead of the PROJECT_NAME. Since the tree basically has +# the same information as the tab index, you could consider setting +# DISABLE_INDEX to YES when enabling this option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_TREEVIEW = NO + +# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that +# doxygen will group on one line in the generated HTML documentation. +# +# Note that a value of 0 will completely suppress the enum values from appearing +# in the overview section. +# Minimum value: 0, maximum value: 20, default value: 4. +# This tag requires that the tag GENERATE_HTML is set to YES. + +ENUM_VALUES_PER_LINE = 4 + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used +# to set the initial width (in pixels) of the frame in which the tree is shown. +# Minimum value: 0, maximum value: 1500, default value: 250. +# This tag requires that the tag GENERATE_HTML is set to YES. + +TREEVIEW_WIDTH = 250 + +# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to +# external symbols imported via tag files in a separate window. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +EXT_LINKS_IN_WINDOW = NO + +# Use this tag to change the font size of LaTeX formulas included as images in +# the HTML documentation. When you change the font size after a successful +# doxygen run you need to manually remove any form_*.png images from the HTML +# output directory to force them to be regenerated. +# Minimum value: 8, maximum value: 50, default value: 10. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_FONTSIZE = 10 + +# Use the FORMULA_TRANPARENT tag to determine whether or not the images +# generated for formulas are transparent PNGs. Transparent PNGs are not +# supported properly for IE 6.0, but are supported on all modern browsers. +# +# Note that when changing this option you need to delete any form_*.png files in +# the HTML output directory before the changes have effect. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_TRANSPARENT = YES + +# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see +# http://www.mathjax.org) which uses client side Javascript for the rendering +# instead of using prerendered bitmaps. Use this if you do not have LaTeX +# installed or if you want to formulas look prettier in the HTML output. When +# enabled you may also need to install MathJax separately and configure the path +# to it using the MATHJAX_RELPATH option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +USE_MATHJAX = NO + +# When MathJax is enabled you can set the default output format to be used for +# the MathJax output. See the MathJax site (see: +# http://docs.mathjax.org/en/latest/output.html) for more details. +# Possible values are: HTML-CSS (which is slower, but has the best +# compatibility), NativeMML (i.e. MathML) and SVG. +# The default value is: HTML-CSS. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_FORMAT = HTML-CSS + +# When MathJax is enabled you need to specify the location relative to the HTML +# output directory using the MATHJAX_RELPATH option. The destination directory +# should contain the MathJax.js script. For instance, if the mathjax directory +# is located at the same level as the HTML output directory, then +# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax +# Content Delivery Network so you can quickly see the result without installing +# MathJax. However, it is strongly recommended to install a local copy of +# MathJax from http://www.mathjax.org before deployment. +# The default value is: http://cdn.mathjax.org/mathjax/latest. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest + +# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax +# extension names that should be enabled during MathJax rendering. For example +# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_EXTENSIONS = + +# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces +# of code that will be used on startup of the MathJax code. See the MathJax site +# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an +# example see the documentation. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_CODEFILE = + +# When the SEARCHENGINE tag is enabled doxygen will generate a search box for +# the HTML output. The underlying search engine uses javascript and DHTML and +# should work on any modern browser. Note that when using HTML help +# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) +# there is already a search function so this one should typically be disabled. +# For large projects the javascript based search engine can be slow, then +# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to +# search using the keyboard; to jump to the search box use + S +# (what the is depends on the OS and browser, but it is typically +# , /