From 6b1e4b22b6a330340a8b3df3d7594bf4becbe67d Mon Sep 17 00:00:00 2001 From: martinez Date: Thu, 27 Jan 2005 13:20:51 +0000 Subject: [PATCH] - New virtual function in AliMUONVGeometryDESegmentation and in the daughters GetDirection(). This returns an enum defined in AliMUONGeometryDirection kDirX, KDirY and kDirUndefined This method gives the direction where the pad size of the chamber is constant. In other words this corresponds with the coordinate where the spatial resolution is the best. Normally kDirY will correspond with cathode segmentation for the bending plane and kDirX with cathode segmentation for the non bending plane - README Info for running a test script of the MUON code --- MUON/AliMUONGeometrySegmentation.cxx | 11 +++++++++++ MUON/AliMUONGeometrySegmentation.h | 4 ++++ MUON/AliMUONSt12QuadrantSegmentation.cxx | 12 ++++++++++++ MUON/AliMUONSt12QuadrantSegmentation.h | 5 +++++ MUON/AliMUONSt345SlatSegmentation.h | 1 + MUON/AliMUONTest.cxx | 2 ++ MUON/AliMUONVGeometryDESegmentation.h | 9 +++++++++ MUON/Config.C | 2 +- MUON/MUONLinkDefGeometry.h | 2 ++ MUON/README | 15 +++++++++++++++ 10 files changed, 62 insertions(+), 1 deletion(-) diff --git a/MUON/AliMUONGeometrySegmentation.cxx b/MUON/AliMUONGeometrySegmentation.cxx index a3210879a2b..e728618e878 100644 --- a/MUON/AliMUONGeometrySegmentation.cxx +++ b/MUON/AliMUONGeometrySegmentation.cxx @@ -149,6 +149,17 @@ void AliMUONGeometrySegmentation::Add(Int_t detElemId, fDESegmentations->Add(detElemId, segmentation); } +//______________________________________________________________________________ +AliMUONGeometryDirection +AliMUONGeometrySegmentation::GetDirection(Int_t detElemId) const +{ +// Return direction with a constant pad size (Direction or coordinate where the resolution is the best) + + if (!Notify(detElemId)) return kDirUndefined; + + return fCurrentSegmentation->GetDirection(); +} + //______________________________________________________________________________ void AliMUONGeometrySegmentation::SetPadSize(Float_t p1, Float_t p2) { diff --git a/MUON/AliMUONGeometrySegmentation.h b/MUON/AliMUONGeometrySegmentation.h index 94f83298865..80dc6542429 100644 --- a/MUON/AliMUONGeometrySegmentation.h +++ b/MUON/AliMUONGeometrySegmentation.h @@ -17,6 +17,8 @@ #include +#include "AliMUONGeometryDirection.h" + class TObjArray; class TF1; @@ -38,6 +40,8 @@ class AliMUONGeometrySegmentation : public TObject // get methods AliMUONGeometryModule* GetGeometry() const; + virtual AliMUONGeometryDirection GetDirection(Int_t detElemId) const; + // Direction with a constant pad size (Direction or coordinate where the resolution is the best) // // redefined methods from AliSegmentation interface diff --git a/MUON/AliMUONSt12QuadrantSegmentation.cxx b/MUON/AliMUONSt12QuadrantSegmentation.cxx index 3979b9ea1df..e3bacdf6cd0 100644 --- a/MUON/AliMUONSt12QuadrantSegmentation.cxx +++ b/MUON/AliMUONSt12QuadrantSegmentation.cxx @@ -210,6 +210,18 @@ Bool_t AliMUONSt12QuadrantSegmentation::HasPad(Int_t ix, Int_t iy) } +//______________________________________________________________________________ +AliMUONGeometryDirection AliMUONSt12QuadrantSegmentation::GetDirection() +{ +// Returns the direction with a constant pad size (Direction or coordinate where the resolution is the best) + + switch ( fSector->GetDirection() ) { + case kX: return kDirX; + case kY: return kDirY; + default: return kDirUndefined; + } +} + //______________________________________________________________________________ Float_t AliMUONSt12QuadrantSegmentation::GetAnod(Float_t xhit) const { diff --git a/MUON/AliMUONSt12QuadrantSegmentation.h b/MUON/AliMUONSt12QuadrantSegmentation.h index fe8b2e6d9aa..7dd8a77b5d4 100644 --- a/MUON/AliMUONSt12QuadrantSegmentation.h +++ b/MUON/AliMUONSt12QuadrantSegmentation.h @@ -55,6 +55,11 @@ class AliMUONSt12QuadrantSegmentation : public AliMUONVGeometryDESegmentation virtual Bool_t HasPad(Int_t ix, Int_t iy); // Returns true if a pad with given indices exists + // Quadrant type + // + virtual AliMUONGeometryDirection GetDirection(); + // Returns the direction with a constant pad size + // Transform from pad (wire) to real coordinates and vice versa // virtual Float_t GetAnod(Float_t xhit) const; diff --git a/MUON/AliMUONSt345SlatSegmentation.h b/MUON/AliMUONSt345SlatSegmentation.h index d687ef2051e..bd671227bdc 100644 --- a/MUON/AliMUONSt345SlatSegmentation.h +++ b/MUON/AliMUONSt345SlatSegmentation.h @@ -35,6 +35,7 @@ class AliMUONSt345SlatSegmentation : public AliMUONVGeometryDESegmentation virtual Bool_t HasPad(Float_t /*x*/, Float_t /*y*/, Float_t /*z*/) { return true; } virtual Bool_t HasPad(Int_t /*ix*/, Int_t /*iy*/) { return true; } + virtual AliMUONGeometryDirection GetDirection() { return kDirUndefined; } virtual Float_t GetAnod(Float_t xhit) const; // Anod wire coordinate closest to xhit virtual void GetPadI(Float_t x ,Float_t y ,Int_t &ix,Int_t &iy); // Transform from pad to real coordinates diff --git a/MUON/AliMUONTest.cxx b/MUON/AliMUONTest.cxx index f34bb8b9a1b..d3cdc4e94de 100644 --- a/MUON/AliMUONTest.cxx +++ b/MUON/AliMUONTest.cxx @@ -876,6 +876,8 @@ void AliMUONTest::DrawPad(Int_t& counter, //printf(" ***** Pad position is ix: %d iy: %d x: %f y: %f sector: %d dpx: %f dpy: %f \n", // ix, iy, x, y, sector, dpx, dpy); + if (!fCanvas) Before(kDrawPads); + fCanvas->cd(); TPave* pave = new TPave(x-dpx/2., y-dpy/2., x+dpx/2., y+dpy/2., 1); pave->Draw(); diff --git a/MUON/AliMUONVGeometryDESegmentation.h b/MUON/AliMUONVGeometryDESegmentation.h index a13e9096c3a..6fa7c4e90d5 100644 --- a/MUON/AliMUONVGeometryDESegmentation.h +++ b/MUON/AliMUONVGeometryDESegmentation.h @@ -17,6 +17,7 @@ #define ALI_MUON_V_GEOMETRY_DE_SEGMENTATION_H #include "AliSegmentation.h" +#include "AliMUONGeometryDirection.h" class AliMUONVGeometryDESegmentation : public AliSegmentation { @@ -30,6 +31,14 @@ class AliMUONVGeometryDESegmentation : public AliSegmentation virtual Bool_t HasPad(Int_t ix, Int_t iy) = 0; // Returns true if a pad with given indices exists + virtual AliMUONGeometryDirection GetDirection() = 0; + // Returns the direction with a constant pad size (Direction or coordinate where the resolution is the best) + // This returns an enum defined in AliMUONGeometryDirection kDirX, KDirY and kDirUndefined + // This method gives the direction where the pad size of the chamber is constant. + // In other words this corresponds with the coordinate where the spatial resolution is the best. + // Normally kDirY will correspond with cathode segmentation for the bending plane and + // kDirX with cathode segmentation for the non bending plane + protected: AliMUONVGeometryDESegmentation(const AliMUONVGeometryDESegmentation& rhs); diff --git a/MUON/Config.C b/MUON/Config.C index c9bf673d253..f0fa3ca259e 100644 --- a/MUON/Config.C +++ b/MUON/Config.C @@ -2,7 +2,7 @@ // Remember to define the directory and option // gAlice->SetConfigFunction("Config('$HOME','box');"); -void Config(char directory[100]="", char option[6]="box") +void Config(char directory[100]="", char option[6]="param") { // // Config file for MUON test diff --git a/MUON/MUONLinkDefGeometry.h b/MUON/MUONLinkDefGeometry.h index 9c96ae8cce5..f61f914b962 100644 --- a/MUON/MUONLinkDefGeometry.h +++ b/MUON/MUONLinkDefGeometry.h @@ -17,5 +17,7 @@ #pragma link C++ class AliMUONGeometryStore+; #pragma link C++ class AliMUONVGeometryDESegmentation+; #pragma link C++ class AliMUONGeometrySegmentation+; + +#pragma link C++ enum AliMUONGeometryDirection; #endif diff --git a/MUON/README b/MUON/README index 487e4df7040..b8a2fddee27 100644 --- a/MUON/README +++ b/MUON/README @@ -20,6 +20,21 @@ Please add to this README file all information concerning config files, simulation, digitalization, clusterization, reconstruction and macro analysis +========================================================== + How to check that your aliroot is working well +========================================================== +There is a script file AlirootRun_MUONtest.script which +allows for simulating, reconstructing and making the +invariant analysis of the generated Upsilon (1S). +The used configuration file is Config.C in MUON +directory. +There you have to type : + +source $ALICE_ROOT/MUON/AlirootRun_MUONtest.script + +If you do not recover a few Upsilons in their mass region +in the file MUONmassPlot.root + ========================================================== How to run a MUON generation ========================================================== -- 2.43.0