From d81db581ca09e91b548fd91b2a3043f6771285f8 Mon Sep 17 00:00:00 2001 From: morsch Date: Thu, 29 Jun 2000 12:34:09 +0000 Subject: [PATCH] AliMUONSegmentation class has been made independent of AliMUONChamber. This makes it usable with any other geometry class. The link to the object to which it belongs is established via an index. This assumes that there exists a global geometry manager from which the pointer to the parent object can be obtained (in our case gAlice). --- MUON/AliMUON.cxx | 11 +++++++++-- MUON/AliMUONChamber.cxx | 28 +++++++++++++++++++++++++--- MUON/AliMUONChamber.h | 3 ++- MUON/AliMUONChamberTrigger.cxx | 14 ++++++++++++-- MUON/AliMUONChamberTrigger.h | 1 + MUON/AliMUONSegmentation.h | 4 +--- MUON/AliMUONSegmentationTrigger.cxx | 12 ++++++++++-- MUON/AliMUONSegmentationTrigger.h | 2 +- MUON/AliMUONSegmentationTriggerX.cxx | 7 +++++-- MUON/AliMUONSegmentationTriggerX.h | 2 +- MUON/AliMUONSegmentationTriggerY.cxx | 7 +++++-- MUON/AliMUONSegmentationTriggerY.h | 2 +- MUON/AliMUONSegmentationV0.cxx | 18 +++++++++++++----- MUON/AliMUONSegmentationV0.h | 3 +-- MUON/AliMUONSegmentationV01.cxx | 5 ++++- MUON/AliMUONSegmentationV01.h | 2 +- MUON/AliMUONSegmentationV04.cxx | 5 ++++- MUON/AliMUONSegmentationV04.h | 2 +- MUON/AliMUONSegmentationV05.cxx | 5 ++++- MUON/AliMUONSegmentationV05.h | 2 +- MUON/AliMUONSegmentationV1.cxx | 18 +++++++++++++----- MUON/AliMUONSegmentationV1.h | 2 +- 22 files changed, 116 insertions(+), 39 deletions(-) diff --git a/MUON/AliMUON.cxx b/MUON/AliMUON.cxx index fdcefc7cf4c..6db0605330d 100644 --- a/MUON/AliMUON.cxx +++ b/MUON/AliMUON.cxx @@ -14,6 +14,13 @@ **************************************************************************/ /* $Log$ +Revision 1.24 2000/06/28 15:16:35 morsch +(1) Client code adapted to new method signatures in AliMUONSegmentation (see comments there) +to allow development of slat-muon chamber simulation and reconstruction code in the MUON +framework. The changes should have no side effects (mostly dummy arguments). +(2) Hit disintegration uses 3-dim hit coordinates to allow simulation +of chambers with overlapping modules (MakePadHits, Disintegration). + Revision 1.23 2000/06/28 12:19:17 morsch More consequent seperation of global input data services (AliMUONClusterInput singleton) and the cluster and hit reconstruction algorithms in AliMUONClusterFinderVS. @@ -247,9 +254,9 @@ AliMUON::AliMUON(const char *name, const char *title) ch = 2 * st + stCH; // if (ch < AliMUONConstants::NTrackingCh()) { - (*fChambers)[ch] = new AliMUONChamber(); + (*fChambers)[ch] = new AliMUONChamber(ch); } else { - (*fChambers)[ch] = new AliMUONChamberTrigger(); + (*fChambers)[ch] = new AliMUONChamberTrigger(ch); } AliMUONChamber* chamber = (AliMUONChamber*) (*fChambers)[ch]; diff --git a/MUON/AliMUONChamber.cxx b/MUON/AliMUONChamber.cxx index 45a4027e3de..9a18dfed970 100644 --- a/MUON/AliMUONChamber.cxx +++ b/MUON/AliMUONChamber.cxx @@ -14,6 +14,13 @@ **************************************************************************/ /* $Log$ +Revision 1.3 2000/06/28 15:16:35 morsch +(1) Client code adapted to new method signatures in AliMUONSegmentation (see comments there) +to allow development of slat-muon chamber simulation and reconstruction code in the MUON +framework. The changes should have no side effects (mostly dummy arguments). +(2) Hit disintegration uses 3-dim hit coordinates to allow simulation +of chambers with overlapping modules (MakePadHits, Disintegration). + Revision 1.2 2000/06/15 07:58:48 morsch Code from MUON-dev joined @@ -34,18 +41,33 @@ Log messages included #include "TMath.h" ClassImp(AliMUONChamber) - AliMUONChamber::AliMUONChamber() + AliMUONChamber::AliMUONChamber() +{ +// Default constructor + fSegmentation = new TObjArray(2); + (*fSegmentation)[0] = 0; + (*fSegmentation)[1] = 0; + fResponse=0; + fnsec=1; + fReconstruction=0; + fId=0; +} + + AliMUONChamber::AliMUONChamber(Int_t id) { +// Construtor with chamber id fSegmentation = new TObjArray(2); (*fSegmentation)[0] = 0; (*fSegmentation)[1] = 0; fResponse=0; fnsec=1; fReconstruction=0; + fId=id; } AliMUONChamber::~AliMUONChamber() { +// Destructor if (fSegmentation) delete fSegmentation; } @@ -62,11 +84,11 @@ void AliMUONChamber::Init() // // ... for chamber segmentation if ((*fSegmentation)[0]) - ((AliMUONSegmentation *) (*fSegmentation)[0])->Init(this); + ((AliMUONSegmentation *) (*fSegmentation)[0])->Init(fId); if (fnsec==2) { if ((*fSegmentation)[1]) - ((AliMUONSegmentation *) (*fSegmentation)[1])->Init(this); + ((AliMUONSegmentation *) (*fSegmentation)[1])->Init(fId); } } diff --git a/MUON/AliMUONChamber.h b/MUON/AliMUONChamber.h index d8af746abe2..745d73ac3a6 100644 --- a/MUON/AliMUONChamber.h +++ b/MUON/AliMUONChamber.h @@ -18,6 +18,7 @@ public TObject { public: AliMUONChamber(); + AliMUONChamber(Int_t id); AliMUONChamber(const AliMUONChamber & rChamber); virtual ~AliMUONChamber(); @@ -110,7 +111,7 @@ public TObject virtual AliMUONChamber& operator =(const AliMUONChamber& rhs); protected: - + Int_t fId; // chamber number Float_t fdGas; // half gaz gap Float_t fdAlu; // half Alu width Int_t fGid; // GEANT volume if for sensitive volume of this chamber diff --git a/MUON/AliMUONChamberTrigger.cxx b/MUON/AliMUONChamberTrigger.cxx index c68ba35d0a7..4643c030a40 100644 --- a/MUON/AliMUONChamberTrigger.cxx +++ b/MUON/AliMUONChamberTrigger.cxx @@ -15,6 +15,9 @@ /* $Log$ +Revision 1.4 2000/06/29 06:52:02 pcrochet +pow changed to TMath::Power + Revision 1.3 2000/06/28 15:16:35 morsch (1) Client code adapted to new method signatures in AliMUONSegmentation (see comments there) to allow development of slat-muon chamber simulation and reconstruction code in the MUON @@ -47,9 +50,16 @@ Draft version ClassImp(AliMUONChamberTrigger) //------------------------------------------- -AliMUONChamberTrigger::AliMUONChamberTrigger() : AliMUONChamber() + + AliMUONChamberTrigger::AliMUONChamberTrigger() +{ +// Default constructor +} + + +AliMUONChamberTrigger::AliMUONChamberTrigger(Int_t id) : AliMUONChamber(id) { -// Default Constructor +// Constructor using chamber id } //------------------------------------------- diff --git a/MUON/AliMUONChamberTrigger.h b/MUON/AliMUONChamberTrigger.h index c5be7202509..8391deb6dc1 100644 --- a/MUON/AliMUONChamberTrigger.h +++ b/MUON/AliMUONChamberTrigger.h @@ -17,6 +17,7 @@ class AliMUONChamberTrigger: public AliMUONChamber { public: AliMUONChamberTrigger(); + AliMUONChamberTrigger(Int_t id); virtual ~AliMUONChamberTrigger(){} // Cluster formation method (charge disintegration) diff --git a/MUON/AliMUONSegmentation.h b/MUON/AliMUONSegmentation.h index cf193878b0e..0b254d32818 100644 --- a/MUON/AliMUONSegmentation.h +++ b/MUON/AliMUONSegmentation.h @@ -8,8 +8,6 @@ #include "TObject.h" class TF1; -class AliMUONChamber; -class AliMUONRecCluster; //---------------------------------------------- // @@ -34,7 +32,7 @@ public TObject { virtual void GetPadCxy(Int_t ix, Int_t iy, Float_t &x, Float_t &y, Float_t &z) =0; // // Initialisation - virtual void Init(AliMUONChamber*) =0; + virtual void Init(Int_t chamber) =0; // // Get member data // diff --git a/MUON/AliMUONSegmentationTrigger.cxx b/MUON/AliMUONSegmentationTrigger.cxx index 60a10b9c42b..6d02a9e85ad 100644 --- a/MUON/AliMUONSegmentationTrigger.cxx +++ b/MUON/AliMUONSegmentationTrigger.cxx @@ -15,6 +15,9 @@ /* $Log$ +Revision 1.3 2000/06/26 10:00:14 pcrochet +global variables removed, problem with HP compiler solved (PH) + Revision 1.2 2000/06/15 07:58:48 morsch Code from MUON-dev joined @@ -41,6 +44,8 @@ Draft version from P. Crochet #include "AliMUONSegmentationTrigger.h" #include "AliMUONTriggerConstants.h" +#include "AliRun.h" +#include "AliMUON.h" #include #include #include @@ -50,12 +55,15 @@ Draft version from P. Crochet ClassImp(AliMUONSegmentationTrigger) //------------------------------------------------------------------ -void AliMUONSegmentationTrigger::Init(AliMUONChamber* Chamber) +void AliMUONSegmentationTrigger::Init(Int_t chamber) { // initialize Module geometry cout << "Initialize Trigger Chamber Module Geometry " << "\n"; - Float_t zPos=Chamber->Z(); + AliMUON *pMUON = (AliMUON *) gAlice->GetModule("MUON"); + AliMUONChamber* iChamber=&(pMUON->Chamber(chamber)); + + Float_t zPos=iChamber->Z(); Float_t z1Pos=1603.5; fZscale = zPos/z1Pos; diff --git a/MUON/AliMUONSegmentationTrigger.h b/MUON/AliMUONSegmentationTrigger.h index 83013569258..318310c85c2 100644 --- a/MUON/AliMUONSegmentationTrigger.h +++ b/MUON/AliMUONSegmentationTrigger.h @@ -17,7 +17,7 @@ public AliMUONSegmentationV0 { public: AliMUONSegmentationTrigger(){}; virtual ~AliMUONSegmentationTrigger(){} - virtual void Init(AliMUONChamber* chamber); // Initialization + virtual void Init(Int_t chamber); // Initialization Int_t ModuleNumber(Int_t imodule); // returns module number of ModuleId // Set pad position -> in SegRes X & Y // virtual void SetPad(Int_t, Int_t); diff --git a/MUON/AliMUONSegmentationTriggerX.cxx b/MUON/AliMUONSegmentationTriggerX.cxx index 7daba873354..3cd4a483316 100644 --- a/MUON/AliMUONSegmentationTriggerX.cxx +++ b/MUON/AliMUONSegmentationTriggerX.cxx @@ -15,6 +15,9 @@ /* $Log$ +Revision 1.3 2000/06/26 10:01:26 pcrochet +global variables removed + Revision 1.2 2000/06/15 07:58:48 morsch Code from MUON-dev joined @@ -51,11 +54,11 @@ Draft version from P. Crochet ClassImp(AliMUONSegmentationTriggerX) //------------------------------------------------------------------ -void AliMUONSegmentationTriggerX::Init(AliMUONChamber* Chamber) +void AliMUONSegmentationTriggerX::Init(Int_t chamber) { // intialize X segmentation cout << "Initialize Trigger Chamber Geometry X " << "\n"; - AliMUONSegmentationTrigger::Init(Chamber); + AliMUONSegmentationTrigger::Init(chamber); // calculate x & y position of X strips Int_t nModule=AliMUONTriggerConstants::Nmodule(); diff --git a/MUON/AliMUONSegmentationTriggerX.h b/MUON/AliMUONSegmentationTriggerX.h index 23af173daac..5158668623a 100644 --- a/MUON/AliMUONSegmentationTriggerX.h +++ b/MUON/AliMUONSegmentationTriggerX.h @@ -54,7 +54,7 @@ public AliMUONSegmentationTrigger { // // Initialisation - virtual void Init(AliMUONChamber* chamber); + virtual void Init(Int_t chamber); ClassDef(AliMUONSegmentationTriggerX,1) //Segmentation class for trigger X diff --git a/MUON/AliMUONSegmentationTriggerY.cxx b/MUON/AliMUONSegmentationTriggerY.cxx index b8ad1db17bc..e046e01542f 100644 --- a/MUON/AliMUONSegmentationTriggerY.cxx +++ b/MUON/AliMUONSegmentationTriggerY.cxx @@ -15,6 +15,9 @@ /* $Log$ +Revision 1.3 2000/06/26 10:01:26 pcrochet +global variables removed + Revision 1.2 2000/06/15 07:58:48 morsch Code from MUON-dev joined @@ -50,11 +53,11 @@ Draft version from P. Crochet ClassImp(AliMUONSegmentationTriggerY) //------------------------------------------------------------------ -void AliMUONSegmentationTriggerY::Init(AliMUONChamber* Chamber) +void AliMUONSegmentationTriggerY::Init(Int_t chamber) { // intialize Y segmentation cout << "Initialize Trigger Chamber Geometry Y " << "\n"; - AliMUONSegmentationTrigger::Init(Chamber); + AliMUONSegmentationTrigger::Init(chamber); // calculate x & y position of Y strips Int_t nModule=AliMUONTriggerConstants::Nmodule(); diff --git a/MUON/AliMUONSegmentationTriggerY.h b/MUON/AliMUONSegmentationTriggerY.h index 1fbfae1ae1f..c87cbb9fe46 100644 --- a/MUON/AliMUONSegmentationTriggerY.h +++ b/MUON/AliMUONSegmentationTriggerY.h @@ -55,7 +55,7 @@ public AliMUONSegmentationTrigger { (Int_t iX, Int_t iY, Int_t* Nlist, Int_t Xlist[2], Int_t Ylist[2]); // // Initialisation - virtual void Init(AliMUONChamber* chamber); + virtual void Init(Int_t chamber); ClassDef(AliMUONSegmentationTriggerY,1) //Segmentation class for trigger X protected: diff --git a/MUON/AliMUONSegmentationV0.cxx b/MUON/AliMUONSegmentationV0.cxx index 38924ee6c8f..fa9ae4b216c 100644 --- a/MUON/AliMUONSegmentationV0.cxx +++ b/MUON/AliMUONSegmentationV0.cxx @@ -14,6 +14,9 @@ **************************************************************************/ /* $Log$ +Revision 1.2 2000/06/15 07:58:48 morsch +Code from MUON-dev joined + Revision 1.1.2.2 2000/06/12 07:57:23 morsch include TMath.h @@ -26,6 +29,8 @@ AliMUONSegmentationV0 code from AliMUONSegResV0.cxx #include "TArc.h" #include "TMath.h" #include "AliMUONChamber.h" +#include "AliRun.h" +#include "AliMUON.h" ClassImp(AliMUONSegmentationV0) AliMUONSegmentationV0::AliMUONSegmentationV0(const AliMUONSegmentationV0& segmentation) @@ -33,17 +38,20 @@ ClassImp(AliMUONSegmentationV0) // Dummy copy constructor } - void AliMUONSegmentationV0::Init(AliMUONChamber* Chamber) + void AliMUONSegmentationV0::Init(Int_t chamber) { // Initialises member data of the segmentation from geometry data // owned by Chamber // + AliMUON *pMUON = (AliMUON *) gAlice->GetModule("MUON"); + AliMUONChamber* iChamber=&(pMUON->Chamber(chamber)); + // Initialise maximum number of pads in x ans y - fNpx=(Int_t) (Chamber->ROuter()/fDpx+1); - fNpy=(Int_t) (Chamber->ROuter()/fDpy+1); + fNpx=(Int_t) (iChamber->ROuter()/fDpx+1); + fNpy=(Int_t) (iChamber->ROuter()/fDpy+1); // Initialize inner and outer radius of the sensitive region - fRmin=Chamber->RInner(); - fRmax=Chamber->ROuter(); + fRmin=iChamber->RInner(); + fRmax=iChamber->ROuter(); fCorr=0; } diff --git a/MUON/AliMUONSegmentationV0.h b/MUON/AliMUONSegmentationV0.h index 86c40e7cad6..fd4800ce4b4 100644 --- a/MUON/AliMUONSegmentationV0.h +++ b/MUON/AliMUONSegmentationV0.h @@ -7,7 +7,6 @@ #include "AliMUONSegmentation.h" -class AliMUONChamber; //---------------------------------------------- // // Chamber segmentation for homogeneously segmented circular chamber @@ -39,7 +38,7 @@ public AliMUONSegmentation { {z=0; GetPadCxy(ix, iy, x , y);} // // Initialisation - virtual void Init(AliMUONChamber* chamber); + virtual void Init(Int_t chamber); // // Get member data // diff --git a/MUON/AliMUONSegmentationV01.cxx b/MUON/AliMUONSegmentationV01.cxx index 4df8c6d4129..7bbb39a2229 100644 --- a/MUON/AliMUONSegmentationV01.cxx +++ b/MUON/AliMUONSegmentationV01.cxx @@ -15,6 +15,9 @@ /* $Log$ +Revision 1.2 2000/06/15 07:58:48 morsch +Code from MUON-dev joined + Revision 1.1.2.1 2000/06/09 21:37:30 morsch AliMUONSegmentationV01 code from AliMUONSegResV01.cxx @@ -99,7 +102,7 @@ void AliMUONSegmentationV01::SetPadDivision(Int_t ndiv[4]) } -void AliMUONSegmentationV01::Init(AliMUONChamber* Chamber) +void AliMUONSegmentationV01::Init(Int_t chamber) { // // Fill the arrays fCx (x-contour) and fNpxS (ix-contour) for each sector diff --git a/MUON/AliMUONSegmentationV01.h b/MUON/AliMUONSegmentationV01.h index 1825c85223d..486ed81c1c7 100644 --- a/MUON/AliMUONSegmentationV01.h +++ b/MUON/AliMUONSegmentationV01.h @@ -46,7 +46,7 @@ public AliMUONSegmentationV0 { {z=0; GetPadCxy(ix, iy, x , y);} // // Initialisation - virtual void Init(AliMUONChamber* chamber); + virtual void Init(Int_t chamber); // // Get member data // diff --git a/MUON/AliMUONSegmentationV04.cxx b/MUON/AliMUONSegmentationV04.cxx index 77431526f1b..e05ae7a7243 100644 --- a/MUON/AliMUONSegmentationV04.cxx +++ b/MUON/AliMUONSegmentationV04.cxx @@ -15,6 +15,9 @@ /* $Log$ +Revision 1.2 2000/06/15 07:58:48 morsch +Code from MUON-dev joined + Revision 1.1.2.1 2000/06/09 21:38:15 morsch AliMUONSegmentationV04 code from AliMUONSegResV04.cxx @@ -32,7 +35,7 @@ AliMUONSegmentationV04 code from AliMUONSegResV04.cxx ClassImp(AliMUONSegmentationV04) -void AliMUONSegmentationV04::Init(AliMUONChamber* Chamber) +void AliMUONSegmentationV04::Init(Int_t chamber) { printf("\n Initialise segmentation v04 \n"); // diff --git a/MUON/AliMUONSegmentationV04.h b/MUON/AliMUONSegmentationV04.h index a2379b742fd..bd026a8d1a9 100644 --- a/MUON/AliMUONSegmentationV04.h +++ b/MUON/AliMUONSegmentationV04.h @@ -17,7 +17,7 @@ public AliMUONSegmentationV01 { AliMUONSegmentationV04(){} virtual ~AliMUONSegmentationV04(){} // Initialisation - virtual void Init(AliMUONChamber* chamber); + virtual void Init(Int_t chamber); // Test points for auto calibration void GiveTestPoints(Int_t &n, Float_t *x, Float_t *y); ClassDef(AliMUONSegmentationV04,1) // Segmentation zones are rectangular modules diff --git a/MUON/AliMUONSegmentationV05.cxx b/MUON/AliMUONSegmentationV05.cxx index fedb24408a8..387d078296c 100644 --- a/MUON/AliMUONSegmentationV05.cxx +++ b/MUON/AliMUONSegmentationV05.cxx @@ -15,6 +15,9 @@ /* $Log$ +Revision 1.2 2000/06/15 07:58:48 morsch +Code from MUON-dev joined + Revision 1.1.2.1 2000/06/09 21:38:46 morsch AliMUONSegmentationV05 code from AliMUONSegResV05.cxx @@ -31,7 +34,7 @@ AliMUONSegmentationV05 code from AliMUONSegResV05.cxx ClassImp(AliMUONSegmentationV05) -void AliMUONSegmentationV05::Init(AliMUONChamber* Chamber) +void AliMUONSegmentationV05::Init(Int_t chamber) { printf("\n Initialise segmentation v05 \n"); // diff --git a/MUON/AliMUONSegmentationV05.h b/MUON/AliMUONSegmentationV05.h index 6623f30b595..a737c5a47f6 100644 --- a/MUON/AliMUONSegmentationV05.h +++ b/MUON/AliMUONSegmentationV05.h @@ -17,7 +17,7 @@ public AliMUONSegmentationV02 { AliMUONSegmentationV05(){} virtual ~AliMUONSegmentationV05(){} // Initialisation - virtual void Init(AliMUONChamber* chamber); + virtual void Init(Int_t chamber); // Test points for auto calibration void GiveTestPoints(Int_t &n, Float_t *x, Float_t *y); ClassDef(AliMUONSegmentationV05,1)// Segmentation zones are rectangular modules diff --git a/MUON/AliMUONSegmentationV1.cxx b/MUON/AliMUONSegmentationV1.cxx index f9d08d492f8..3887db02cfe 100644 --- a/MUON/AliMUONSegmentationV1.cxx +++ b/MUON/AliMUONSegmentationV1.cxx @@ -15,6 +15,9 @@ /* $Log$ +Revision 1.2 2000/06/15 07:58:48 morsch +Code from MUON-dev joined + Revision 1.1.2.2 2000/06/12 07:57:43 morsch include TMath.cxx @@ -31,6 +34,8 @@ AliMUONSegmentationV1 code from AliMUONSegResV1.cxx #include #include "AliMUONChamber.h" #include "AliMUONSegmentationV1.h" +#include "AliRun.h" +#include "AliMUON.h" //___________________________________________ ClassImp(AliMUONSegmentationV1) @@ -54,14 +59,17 @@ AliMUONSegmentationV1::AliMUONSegmentationV1() } -void AliMUONSegmentationV1::Init(AliMUONChamber* Chamber) +void AliMUONSegmentationV1::Init(Int_t chamber) { // valid only for T5/6 // beware : frMin is SENSITIVE radius by definition. - frSensMin2 = (Chamber->RInner())*(Chamber->RInner()); - frSensMax2 = (Chamber->ROuter())*(Chamber->ROuter()); - fNpx=(Int_t) (Chamber->ROuter()/fDpx) + 1; - fNpy=(Int_t) (Chamber->ROuter()/fDpy) + 1; + AliMUON *pMUON = (AliMUON *) gAlice->GetModule("MUON"); + AliMUONChamber* iChamber=&(pMUON->Chamber(chamber)); + + frSensMin2 = (iChamber->RInner())*(iChamber->RInner()); + frSensMax2 = (iChamber->ROuter())*(iChamber->ROuter()); + fNpx=(Int_t) (iChamber->ROuter()/fDpx) + 1; + fNpy=(Int_t) (iChamber->ROuter()/fDpy) + 1; // fNwire=3; DefaultCut(); fCorr=0; diff --git a/MUON/AliMUONSegmentationV1.h b/MUON/AliMUONSegmentationV1.h index 4af987da790..92f1bbf2efc 100644 --- a/MUON/AliMUONSegmentationV1.h +++ b/MUON/AliMUONSegmentationV1.h @@ -34,7 +34,7 @@ public AliMUONSegmentation { virtual void DefaultCut(void); // // Initialisation - virtual void Init(AliMUONChamber* chamber); + virtual void Init(Int_t id); // // Get member data // -- 2.39.3