From 30178c30974cdd6a3b59f09e4d479925642e175b Mon Sep 17 00:00:00 2001 From: martinez Date: Tue, 25 May 2004 12:29:00 +0000 Subject: [PATCH] Code revision: - includes - hiding non implemented copy constructors/assignement operators in protected area - added copyright, CVS Id (if missing) - naming coding conventions - constant functions - initialization of base class in constructors (I. Hrivnacova) --- MUON/AliMUON.cxx | 118 +++++++++++++----------- MUON/AliMUON.h | 28 +++--- MUON/AliMUONChamber.cxx | 81 +++++++++------- MUON/AliMUONChamber.h | 40 ++++---- MUON/AliMUONChamberGeometry.h | 16 +++- MUON/AliMUONChamberTrigger.cxx | 9 +- MUON/AliMUONChamberTrigger.h | 12 ++- MUON/AliMUONClusterFinderAZ.cxx | 66 +++++++------ MUON/AliMUONClusterFinderAZ.h | 26 +++--- MUON/AliMUONClusterFinderVS.cxx | 38 ++++---- MUON/AliMUONClusterFinderVS.h | 13 ++- MUON/AliMUONClusterInput.cxx | 27 ++++-- MUON/AliMUONClusterInput.h | 37 ++++---- MUON/AliMUONClusterReconstructor.cxx | 48 +++++++--- MUON/AliMUONClusterReconstructor.h | 14 +-- MUON/AliMUONConstants.h | 9 +- MUON/AliMUONData.cxx | 22 ++--- MUON/AliMUONData.h | 22 +++-- MUON/AliMUONDataInterface.cxx | 6 +- MUON/AliMUONDataInterface.h | 32 ++++--- MUON/AliMUONDigit.cxx | 7 ++ MUON/AliMUONDigit.h | 3 +- MUON/AliMUONDigitizer.cxx | 64 ++++++------- MUON/AliMUONDigitizer.h | 38 ++++---- MUON/AliMUONDigitizerv1.cxx | 84 +++++++++-------- MUON/AliMUONDigitizerv1.h | 8 ++ MUON/AliMUONDigitizerv2.cxx | 67 +++++++------- MUON/AliMUONDigitizerv2.h | 6 ++ MUON/AliMUONDisplay.cxx | 59 ++++++------ MUON/AliMUONDisplay.h | 21 +++-- MUON/AliMUONEventReconstructor.cxx | 79 ++++++++-------- MUON/AliMUONEventReconstructor.h | 17 ++-- MUON/AliMUONFactory.cxx | 7 +- MUON/AliMUONFactory.h | 5 +- MUON/AliMUONGeometryConstituent.cxx | 15 +++ MUON/AliMUONGeometryConstituent.h | 14 ++- MUON/AliMUONGeometryEnvelope.cxx | 15 +++ MUON/AliMUONGeometryEnvelope.h | 14 ++- MUON/AliMUONGlobalTrigger.cxx | 75 +++++++-------- MUON/AliMUONGlobalTrigger.h | 3 +- MUON/AliMUONHit.cxx | 10 +- MUON/AliMUONHit.h | 3 +- MUON/AliMUONHitForRec.cxx | 65 ++++++++----- MUON/AliMUONHitForRec.h | 51 +++++----- MUON/AliMUONHitMapA1.cxx | 30 +++--- MUON/AliMUONHitMapA1.h | 14 +-- MUON/AliMUONLoader.h | 1 + MUON/AliMUONLocalTrigger.cxx | 43 +++++---- MUON/AliMUONLocalTrigger.h | 3 +- MUON/AliMUONMerger.cxx | 24 +++-- MUON/AliMUONMerger.h | 6 +- MUON/AliMUONPadHit.cxx | 15 +++ MUON/AliMUONPadHit.h | 7 +- MUON/AliMUONPixel.cxx | 10 ++ MUON/AliMUONPixel.h | 9 +- MUON/AliMUONPoints.cxx | 51 +++++----- MUON/AliMUONPoints.h | 29 +++--- MUON/AliMUONRawCluster.cxx | 7 +- MUON/AliMUONRawCluster.h | 5 +- MUON/AliMUONRecoDisplay.cxx | 31 ++++--- MUON/AliMUONRecoDisplay.h | 23 ++--- MUON/AliMUONRecoEvent.cxx | 6 +- MUON/AliMUONRecoEvent.h | 10 +- MUON/AliMUONRecoTrack.cxx | 15 +-- MUON/AliMUONRecoTrack.h | 10 +- MUON/AliMUONReconstHit.cxx | 13 ++- MUON/AliMUONReconstHit.h | 6 +- MUON/AliMUONReconstructor.cxx | 38 ++++---- MUON/AliMUONReconstructor.h | 4 +- MUON/AliMUONResponse.cxx | 12 +++ MUON/AliMUONResponse.h | 28 +++--- MUON/AliMUONResponseTrigger.cxx | 16 +++- MUON/AliMUONResponseTrigger.h | 7 +- MUON/AliMUONResponseTriggerV1.cxx | 16 ++-- MUON/AliMUONResponseTriggerV1.h | 3 + MUON/AliMUONResponseV0.cxx | 13 ++- MUON/AliMUONResponseV0.h | 25 ++--- MUON/AliMUONSDigitizerv1.cxx | 64 ++++++------- MUON/AliMUONSDigitizerv1.h | 5 + MUON/AliMUONSegment.cxx | 28 ++++-- MUON/AliMUONSegment.h | 22 +++-- MUON/AliMUONSegmentationSlat.cxx | 29 +++--- MUON/AliMUONSegmentationSlat.h | 20 ++-- MUON/AliMUONSegmentationSlatModule.cxx | 8 +- MUON/AliMUONSegmentationSlatModule.h | 10 +- MUON/AliMUONSegmentationSlatModuleN.cxx | 8 +- MUON/AliMUONSegmentationSlatModuleN.h | 5 +- MUON/AliMUONSegmentationSlatN.cxx | 15 ++- MUON/AliMUONSegmentationSlatN.h | 17 ++-- MUON/AliMUONSegmentationTrigger.cxx | 18 +++- MUON/AliMUONSegmentationTrigger.h | 14 ++- MUON/AliMUONSegmentationTriggerX.cxx | 5 +- MUON/AliMUONSegmentationTriggerX.h | 13 ++- MUON/AliMUONSegmentationTriggerY.cxx | 15 ++- MUON/AliMUONSegmentationTriggerY.h | 16 ++-- MUON/AliMUONSegmentationV0.cxx | 32 +++++-- MUON/AliMUONSegmentationV0.h | 28 +++--- MUON/AliMUONSegmentationV01.cxx | 28 ++++-- MUON/AliMUONSegmentationV01.h | 24 +++-- MUON/AliMUONSegmentationV02.cxx | 12 ++- MUON/AliMUONSegmentationV02.h | 7 +- MUON/AliMUONSegmentationV04.cxx | 10 +- MUON/AliMUONSegmentationV04.h | 7 +- MUON/AliMUONSegmentationV05.cxx | 9 +- MUON/AliMUONSegmentationV05.h | 7 +- MUON/AliMUONSegmentationV1.cxx | 30 ++++-- MUON/AliMUONSegmentationV1.h | 21 +++-- MUON/AliMUONSlatGeometryBuilder.cxx | 14 ++- MUON/AliMUONSlatGeometryBuilder.h | 14 ++- MUON/AliMUONSt1Decoder.h | 1 + MUON/AliMUONSt1ElectronicElement.cxx | 3 +- MUON/AliMUONSt1ElectronicElement.h | 1 + MUON/AliMUONSt1GeometryBuilder.cxx | 4 + MUON/AliMUONSt1GeometryBuilder.h | 11 ++- MUON/AliMUONSt1GeometryBuilderV2.cxx | 1 - MUON/AliMUONSt1GeometryBuilderV2.h | 25 +---- MUON/AliMUONSt1IniReader.h | 1 + MUON/AliMUONSt1Response.h | 14 +-- MUON/AliMUONSt1ResponseParameter.h | 1 + MUON/AliMUONSt1ResponseRule.h | 1 + MUON/AliMUONSt1Segmentation.cxx | 3 +- MUON/AliMUONSt1Segmentation.h | 7 +- MUON/AliMUONSt1SpecialMotif.h | 1 + MUON/AliMUONSt2GeometryBuilder.cxx | 19 ++++ MUON/AliMUONSt2GeometryBuilder.h | 14 ++- MUON/AliMUONTrack.cxx | 73 +++++++++------ MUON/AliMUONTrack.h | 10 +- MUON/AliMUONTrackHit.cxx | 30 ++++-- MUON/AliMUONTrackHit.h | 16 ++-- MUON/AliMUONTrackK.cxx | 77 +++++++++------- MUON/AliMUONTrackK.h | 15 ++- MUON/AliMUONTrackParam.cxx | 49 +++++++--- MUON/AliMUONTrackParam.h | 14 +-- MUON/AliMUONTransientDigit.cxx | 32 +++++-- MUON/AliMUONTransientDigit.h | 11 ++- MUON/AliMUONTriggerCircuit.cxx | 71 +++++++------- MUON/AliMUONTriggerCircuit.h | 71 +++++++------- MUON/AliMUONTriggerConstants.cxx | 43 ++++----- MUON/AliMUONTriggerConstants.h | 21 +++-- MUON/AliMUONTriggerDecision.cxx | 47 +++++----- MUON/AliMUONTriggerDecision.h | 28 +++--- MUON/AliMUONTriggerGeometryBuilder.cxx | 19 ++++ MUON/AliMUONTriggerGeometryBuilder.h | 14 ++- MUON/AliMUONTriggerLut.cxx | 36 +++++--- MUON/AliMUONTriggerLut.h | 22 +++-- MUON/AliMUONTriggerTrack.cxx | 51 +++++----- MUON/AliMUONTriggerTrack.h | 6 +- MUON/AliMUONVGeometryBuilder.cxx | 19 ++++ MUON/AliMUONVGeometryBuilder.h | 13 ++- MUON/AliMUONv0.cxx | 13 +-- MUON/AliMUONv0.h | 5 +- MUON/AliMUONv1.cxx | 19 ++-- MUON/AliMUONv1.h | 14 +-- MUON/AliMUONv3.cxx | 21 +++-- MUON/AliMUONv3.h | 17 ++-- 155 files changed, 2018 insertions(+), 1445 deletions(-) diff --git a/MUON/AliMUON.cxx b/MUON/AliMUON.cxx index 2a6b1d70974..2361689e38e 100644 --- a/MUON/AliMUON.cxx +++ b/MUON/AliMUON.cxx @@ -84,39 +84,61 @@ // for the first and second chambers in the station, respectively ClassImp(AliMUON) + //__________________________________________________________________ AliMUON::AliMUON() + : AliDetector(), + fNCh(0), + fNTrackingCh(0), + fMUONData(0), + fSplitLevel(0), + fChambers(0), + fGeometryBuilders(0), + fTriggerCircuits(0), + fAccCut(kFALSE), + fAccMin(0.), + fAccMax(0.), + fMaxStepGas(0.), + fMaxStepAlu(0.), + fMaxDestepGas(0.), + fMaxDestepAlu(0.), + fMaxIterPad(0), + fCurIterPad(0), + fMerger(0) { // Default Constructor // - fNCh = 0; - fNTrackingCh = 0; fIshunt = 0; - fChambers = 0; - fGeometryBuilders = 0; - fTriggerCircuits = 0; - fAccMin = 0.; - fAccMax = 0.; - fAccCut = kFALSE; - fMerger = 0; - fMUONData = 0; - fSplitLevel = 0; } + //__________________________________________________________________ AliMUON::AliMUON(const char *name, const char *title) - : AliDetector(name,title) + : AliDetector(name,title), + fNCh(AliMUONConstants::NCh()), + fNTrackingCh(AliMUONConstants::NTrackingCh()), + fMUONData(0), + fSplitLevel(0), + fChambers(0), + fGeometryBuilders(0), + fTriggerCircuits(0), + fAccCut(kFALSE), + fAccMin(0.), + fAccMax(0.), + fMaxStepGas(0.1), + fMaxStepAlu(0.1), + fMaxDestepGas(-1), // Negatives values are ignored by geant3 CONS200 + fMaxDestepAlu(-1), // in the calculation of the tracking parameters + fMaxIterPad(0), + fCurIterPad(0), + fMerger(0) { //Begin_Html /* */ //End_Html - fMUONData = 0x0; - fSplitLevel= 0; - fIshunt = 0; - fNCh = AliMUONConstants::NCh(); - fNTrackingCh = AliMUONConstants::NTrackingCh(); + fIshunt = 0; SetMarkerColor(kRed);// // @@ -151,33 +173,22 @@ AliMUON::AliMUON(const char *name, const char *title) } // Chamber stCH (0, 1) in } // Station st (0...) - // Negatives values are ignored by geant3 CONS200 in the calculation of the tracking parameters - fMaxStepGas=0.1; - fMaxStepAlu=0.1; - fMaxDestepGas=-1; - fMaxDestepAlu=-1; - - fMaxIterPad = 0; - fCurIterPad = 0; - - fAccMin = 0.; - fAccMax = 0.; - fAccCut = kFALSE; - // cp new design of AliMUONTriggerDecision fTriggerCircuits = new TObjArray(AliMUONConstants::NTriggerCircuit()); for (Int_t circ=0; circAddAt(new AliMUONTriggerCircuit(),circ); } - fMerger = 0; } + //____________________________________________________________________ -AliMUON::AliMUON(const AliMUON& rMUON):AliDetector(rMUON) +AliMUON::AliMUON(const AliMUON& rMUON) + : AliDetector(rMUON) { -// Dummy copy constructor - ; - +// Protected copy constructor + + Fatal("AliMUONMergerModule", "Not implemented."); } + //____________________________________________________________________ AliMUON::~AliMUON() { @@ -200,6 +211,19 @@ AliMUON::~AliMUON() } delete fMUONData; } + +//________________________________________________________________________ +AliMUON& AliMUON::operator = (const AliMUON& rhs) +{ +// Protected assignement operator + + if (this == &rhs) return *this; + + Fatal("operator=", "Not implemented."); + + return *this; +} + //_____________________________________________________________________________ void AliMUON::AddGeometryBuilder(AliMUONVGeometryBuilder* geomBuilder) { @@ -219,11 +243,6 @@ void AliMUON::BuildGeometry() } } } -//___________________________________________________________________ -Int_t AliMUON::DistancetoPrimitive(Int_t , Int_t ) -{ - return 9999; -} //__________________________________________________________________ void AliMUON::SetTreeAddress() { @@ -461,9 +480,9 @@ AliMUONPadHit* AliMUON::FirstPad(AliMUONHit* hit, TClonesArray *clusters) TClonesArray *theClusters = clusters; Int_t nclust = theClusters->GetEntriesFast(); if (nclust && hit->PHlast() > 0) { - AliMUON::fMaxIterPad=hit->PHlast(); - AliMUON::fCurIterPad=hit->PHfirst(); - return (AliMUONPadHit*) clusters->UncheckedAt(AliMUON::fCurIterPad-1); + fMaxIterPad=hit->PHlast(); + fCurIterPad=hit->PHfirst(); + return (AliMUONPadHit*) clusters->UncheckedAt(fCurIterPad-1); } else { return 0; } @@ -474,9 +493,9 @@ AliMUONPadHit* AliMUON::NextPad(TClonesArray *clusters) // To be removed // Get next pad (in iterator) // - AliMUON::fCurIterPad++; - if (AliMUON::fCurIterPad <= AliMUON::fMaxIterPad) { - return (AliMUONPadHit*) clusters->UncheckedAt(AliMUON::fCurIterPad-1); + fCurIterPad++; + if (fCurIterPad <= fMaxIterPad) { + return (AliMUONPadHit*) clusters->UncheckedAt(fCurIterPad-1); } else { return 0; } @@ -514,13 +533,6 @@ AliMUONMerger* AliMUON::Merger() return fMerger; } //________________________________________________________________________ -AliMUON& AliMUON::operator = (const AliMUON& /*rhs*/) -{ -// copy operator -// dummy version - return *this; -} -//________________________________________________________________________ void AliMUON::RemapTrackHitIDs(Int_t* map) { // Remaps the track numbers in the hits arrays, so that they correspond diff --git a/MUON/AliMUON.h b/MUON/AliMUON.h index 39261244c87..ae57d4874c4 100644 --- a/MUON/AliMUON.h +++ b/MUON/AliMUON.h @@ -4,17 +4,22 @@ * See cxx source for full Copyright notice */ /* $Id$ */ -/* $Id$ */ - +// Revision of includes 07/05/2004 //////////////////////////////////////////////// // AliDetector Class for MUON subsystem // //////////////////////////////////////////////// -#include "TObjArray.h" + +#include + #include "AliDetector.h" #include "AliMUONData.h" #include "AliMUONChamber.h" +class TVector; +class TFile; +class TTree; + class AliLoader; class AliSegmentation; class AliMUONTriggerCircuit; @@ -29,17 +34,15 @@ class AliMUONMerger; class AliMUONVGeometryBuilder; class AliESD; - -class AliMUON : public AliDetector { - public: +class AliMUON : public AliDetector +{ + public: AliMUON(); AliMUON(const char *name, const char *title); - AliMUON(const AliMUON& rMUON); virtual ~AliMUON(); void AddGeometryBuilder(AliMUONVGeometryBuilder* geomBuilder); virtual void BuildGeometry(); - Int_t DistancetoPrimitive(Int_t px, Int_t py); AliMUONData* GetMUONData() {return fMUONData;} virtual Int_t IsVersion() const {return 0;} @@ -106,13 +109,14 @@ class AliMUON : public AliDetector { // Return pointers to digits AliMUONRawCluster *RawCluster(Int_t ichamber, Int_t icathod, Int_t icluster); - // Copy Operator + // Inherited and overridden from AliModule: + virtual void RemapTrackHitIDs(Int_t * map); + + protected: + AliMUON(const AliMUON& rMUON); AliMUON& operator = (const AliMUON& rhs); - // Inherited and overridden from AliModule: - virtual void RemapTrackHitIDs(Int_t * map); - protected: Int_t fNCh; // Number of chambers Int_t fNTrackingCh; // Number of tracking chambers* AliMUONData* fMUONData; // Data container for MUON subsystem diff --git a/MUON/AliMUONChamber.cxx b/MUON/AliMUONChamber.cxx index f50e80bfe6d..710005f0166 100644 --- a/MUON/AliMUONChamber.cxx +++ b/MUON/AliMUONChamber.cxx @@ -15,44 +15,64 @@ /* $Id$ */ +// --- ROOT includes --- +#include +#include + // --- MUON includes --- #include "AliMUONChamber.h" #include "AliMUONChamberGeometry.h" -// --- ROOT includes --- - -#include "TRandom.h" -#include "TMath.h" - ClassImp(AliMUONChamber) - AliMUONChamber::AliMUONChamber() +AliMUONChamber::AliMUONChamber() + : TObject(), + fId(0), + fdGas(0.), + fdAlu(0.), + fZ(0.), + fnsec(1), + frMin(0.), + frMax(0.), + fCurrentCorrel(1), // to avoid mistakes if ChargeCorrelInit is not called + fSegmentation(0), + fReconstruction(0), + fResponse(0), + fGeometry(0) { // Default constructor - fSegmentation = 0; - fResponse=0; - fnsec=1; - fReconstruction=0; - fGeometry = 0; - - fId=0; - // to avoid mistakes if ChargeCorrelInit is not called - fCurrentCorrel =1; } - AliMUONChamber::AliMUONChamber(Int_t id) +AliMUONChamber::AliMUONChamber(Int_t id) + : TObject(), + fId(id), + fdGas(0.), + fdAlu(0.), + fZ(0.), + fnsec(1), + frMin(0.), + frMax(0.), + fCurrentCorrel(1), // to avoid mistakes if ChargeCorrelInit is not called + fSegmentation(0), + fReconstruction(0), + fResponse(0), + fGeometry(0) { // Construtor with chamber id fSegmentation = new TObjArray(2); fSegmentation->AddAt(0,0); fSegmentation->AddAt(0,1); - fResponse=0; - fnsec=1; - fReconstruction=0; - fId=id; + fGeometry = new AliMUONChamberGeometry(fId); - // to avoid mistakes if ChargeCorrelInit is not called - fCurrentCorrel =1; +} + +AliMUONChamber::AliMUONChamber(const AliMUONChamber& rChamber) + : TObject(rChamber) +{ +// Protected copy constructor + + Fatal("AliMUONMergerModule", "Not implemented."); + // Dummy copy constructor } AliMUONChamber::~AliMUONChamber() @@ -65,12 +85,16 @@ AliMUONChamber::~AliMUONChamber() delete fGeometry; } -AliMUONChamber::AliMUONChamber(const AliMUONChamber& rChamber):TObject(rChamber) +AliMUONChamber & AliMUONChamber::operator =(const AliMUONChamber& rhs) { - // Dummy copy constructor - ; -} +// Protected assignement operator + if (this == &rhs) return *this; + + Fatal("operator=", "Not implemented."); + + return *this; +} Bool_t AliMUONChamber::IsSensId(Int_t volId) const { @@ -214,8 +238,3 @@ void AliMUONChamber::InitGeo(Float_t /*zpos*/) } -AliMUONChamber & AliMUONChamber::operator =(const AliMUONChamber& /*rhs*/) -{ -// Dummy assignment operator - return *this; -} diff --git a/MUON/AliMUONChamber.h b/MUON/AliMUONChamber.h index e5434c5a70a..dc48ffad8ca 100644 --- a/MUON/AliMUONChamber.h +++ b/MUON/AliMUONChamber.h @@ -4,55 +4,47 @@ * See cxx source for full Copyright notice */ /* $Id$ */ +// Revision of includes 07/05/2004 + +#include +#include -#include "TObjArray.h" #include "AliSegmentation.h" #include "AliMUONResponse.h" class AliMUONClusterFinderVS; -//class AliMUONResponse ; -//class AliSegmentation ; class AliMUONChamberGeometry; -class AliMUONChamber: -public TObject +class AliMUONChamber : public TObject { public: AliMUONChamber(); AliMUONChamber(Int_t id); - AliMUONChamber(const AliMUONChamber & rChamber); virtual ~AliMUONChamber(); // // Get chamber Id - virtual Int_t GetId() {return fId;} + virtual Int_t GetId() const {return fId;} // // Get chamber Id virtual Bool_t IsSensId(Int_t volId) const; -/* -// Get GEANT id of sensitive volume - virtual Int_t GetGid() {return fGid;} -// Set GEANT id of sensitive volume - virtual void SetGid(Int_t id) {fGid=id;} -// -*/ // Initialisation virtual void Init(); // Set z-position of chamber virtual void SetZ(Float_t Z) {fZ = Z;} // Get z-position of chamber - virtual Float_t Z(){return fZ;} + virtual Float_t Z() const {return fZ;} // Set inner radius of sensitive volume virtual void SetRInner(Float_t rmin) {frMin=rmin;} // Set outer radius of sensitive volum virtual void SetROuter(Float_t rmax) {frMax=rmax;} // Return inner radius of sensitive volume - virtual Float_t RInner() {return frMin;} + virtual Float_t RInner() const {return frMin;} // Return outer radius of sensitive volum - virtual Float_t ROuter() {return frMax;} + virtual Float_t ROuter() const {return frMax;} // // Set response model virtual void SetResponseModel(AliMUONResponse* thisResponse) {fResponse=thisResponse;} @@ -77,7 +69,7 @@ public TObject // Get pointer to cluster reconstruction model virtual AliMUONClusterFinderVS* &ReconstructionModel(){return fReconstruction;} // Get number of segmentation sectors - virtual Int_t Nsec() {return fnsec;} + virtual Int_t Nsec() const {return fnsec;} // Set number of segmented cathodes (1 or 2) virtual void SetNsec(Int_t nsec) {fnsec=nsec;} // @@ -118,8 +110,8 @@ public TObject // Initialize geometry related parameters virtual void InitGeo(Float_t z); // - virtual Float_t DGas() {return fdGas;} - virtual Float_t DAlu() {return fdAlu;} + virtual Float_t DGas() const {return fdGas;} + virtual Float_t DAlu() const {return fdAlu;} virtual void SetDGas(Float_t DGas) {fdGas = DGas;} virtual void SetDAlu(Float_t DAlu) {fdAlu = DAlu;} virtual void SetChargeCorrel(Float_t correl) {fResponse->SetChargeCorrel(correl);} @@ -128,15 +120,15 @@ public TObject void SetGeometry(AliMUONChamberGeometry* geometry) {fGeometry = geometry;} AliMUONChamberGeometry* GetGeometry() const {return fGeometry; } -// assignment operator - AliMUONChamber& operator =(const AliMUONChamber& rhs); protected: + AliMUONChamber(const AliMUONChamber & rChamber); + // assignment operator + AliMUONChamber& operator =(const AliMUONChamber& rhs); + 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 - // moved to AliMUONChamberGeometry Float_t fZ; // Z position (cm) Int_t fnsec; // number of semented cathode planes Float_t frMin; // innermost sensitive radius diff --git a/MUON/AliMUONChamberGeometry.h b/MUON/AliMUONChamberGeometry.h index 018227edce6..5131f39bf98 100644 --- a/MUON/AliMUONChamberGeometry.h +++ b/MUON/AliMUONChamberGeometry.h @@ -1,4 +1,9 @@ -// $Id$ +/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * See cxx source for full Copyright notice */ + +/* $Id$ */ +// Revision of includes 07/05/2004 + // // Class AliMUONChamberGeometry // ----------------------------- @@ -25,12 +30,8 @@ class AliMUONChamberGeometry : public TObject public: AliMUONChamberGeometry(Int_t chamberId); AliMUONChamberGeometry(); - AliMUONChamberGeometry(const AliMUONChamberGeometry& rhs); virtual ~AliMUONChamberGeometry(); - // operators - AliMUONChamberGeometry& operator = (const AliMUONChamberGeometry& rhs); - // methods // adding virtual envelopes @@ -100,6 +101,11 @@ class AliMUONChamberGeometry : public TObject const TObjArray* GetEnvelopes() const; Bool_t IsSensitiveVolume(Int_t volId) const; + protected: + AliMUONChamberGeometry(const AliMUONChamberGeometry& rhs); + // operators + AliMUONChamberGeometry& operator = (const AliMUONChamberGeometry& rhs); + private: // methods AliMUONGeometryEnvelope* FindEnvelope(const TString& name) const; diff --git a/MUON/AliMUONChamberTrigger.cxx b/MUON/AliMUONChamberTrigger.cxx index 7a61ca188cb..289ea24508c 100644 --- a/MUON/AliMUONChamberTrigger.cxx +++ b/MUON/AliMUONChamberTrigger.cxx @@ -16,24 +16,21 @@ /* $Id$ */ #include "AliMUONChamberTrigger.h" -#include "AliMUONSegmentationTrigger.h" #include "AliMUONResponseTrigger.h" -#include "AliMUONResponseTriggerV1.h" -#include -#include -#include ClassImp(AliMUONChamberTrigger) //------------------------------------------- AliMUONChamberTrigger::AliMUONChamberTrigger() + : AliMUONChamber() { // Default constructor } -AliMUONChamberTrigger::AliMUONChamberTrigger(Int_t id) : AliMUONChamber(id) +AliMUONChamberTrigger::AliMUONChamberTrigger(Int_t id) + : AliMUONChamber(id) { // Constructor using chamber id } diff --git a/MUON/AliMUONChamberTrigger.h b/MUON/AliMUONChamberTrigger.h index 4de877642af..cbb840dfa37 100644 --- a/MUON/AliMUONChamberTrigger.h +++ b/MUON/AliMUONChamberTrigger.h @@ -5,6 +5,7 @@ * See cxx source for full Copyright notice */ /* $Id$ */ +// Revision of includes 07/05/2004 #include "AliMUONChamber.h" @@ -14,19 +15,20 @@ class AliMUONSegmentationTrigger ; class AliMUONResponseTrigger ; class AliMUONResponseTriggerV1 ; -class AliMUONChamberTrigger: -public AliMUONChamber { - public: +class AliMUONChamberTrigger : public AliMUONChamber +{ + public: AliMUONChamberTrigger(); AliMUONChamberTrigger(Int_t id); virtual ~AliMUONChamberTrigger(){} -// Cluster formation method (charge disintegration) + + // Cluster formation method (charge disintegration) virtual void DisIntegration(Float_t eloss, Float_t tof, Float_t xhit, Float_t yhit, Float_t zhit, Int_t& nnew, Float_t newclust[6][500]); ClassDef(AliMUONChamberTrigger,1) // Muon trigger chamber class - }; +}; #endif diff --git a/MUON/AliMUONClusterFinderAZ.cxx b/MUON/AliMUONClusterFinderAZ.cxx index b61c7b4d9f2..6a4eb06c955 100644 --- a/MUON/AliMUONClusterFinderAZ.cxx +++ b/MUON/AliMUONClusterFinderAZ.cxx @@ -1,7 +1,22 @@ -#include "AliMUONClusterFinderAZ.h" +/************************************************************************** + * 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$ */ + +// Clusterizer class developped by Zitchenko (Dubna) -#include -#include #include #include #include @@ -13,6 +28,7 @@ #include #include +#include "AliMUONClusterFinderAZ.h" #include "AliHeader.h" #include "AliRun.h" #include "AliMUON.h" @@ -25,21 +41,14 @@ #include "AliMUONPixel.h" #include "AliMC.h" -// Clusterizer class developped by Zitchenko (Dubna) -// -// -// - - ClassImp(AliMUONClusterFinderAZ) const Double_t AliMUONClusterFinderAZ::fgkCouplMin = 1.e-3; // threshold on coupling AliMUONClusterFinderAZ* AliMUONClusterFinderAZ::fgClusterFinder = 0x0; TMinuit* AliMUONClusterFinderAZ::fgMinuit = 0x0; - //_____________________________________________________________________________ -AliMUONClusterFinderAZ::AliMUONClusterFinderAZ(Bool_t draw=0, Int_t iReco=0) +AliMUONClusterFinderAZ::AliMUONClusterFinderAZ(Bool_t draw, Int_t iReco) : AliMUONClusterFinderVS() { // Constructor @@ -93,19 +102,6 @@ AliMUONClusterFinderAZ::~AliMUONClusterFinderAZ() */ } -//_____________________________________________________________________________ -AliMUONClusterFinderAZ& -AliMUONClusterFinderAZ::operator=(const AliMUONClusterFinderAZ& rhs) -{ -// Protected assignement operator - - if (this == &rhs) return *this; - - Fatal("operator=", "Not implemented."); - - return *this; -} - //_____________________________________________________________________________ void AliMUONClusterFinderAZ::FindRawClusters() { @@ -2083,7 +2079,7 @@ Int_t AliMUONClusterFinderAZ::Fit(Int_t nfit, Int_t *clustFit, TObjArray **clust while (1) { max = !min; - fcn1(fNpar, gin, func0, param, 1); nCall++; + Fcn1(fNpar, gin, func0, param, 1); nCall++; //cout << " Func: " << func0 << endl; func2[max] = func0; @@ -2092,7 +2088,7 @@ Int_t AliMUONClusterFinderAZ::Fit(Int_t nfit, Int_t *clustFit, TObjArray **clust delta[j] = step0[j]; param[j] += delta[j] / 10; if (j > 0) param[j-1] -= delta[j-1] / 10; - fcn1(fNpar, gin, func1, param, 1); nCall++; + Fcn1(fNpar, gin, func1, param, 1); nCall++; deriv[max][j] = (func1 - func0) / delta[j] * 10; // first derivative //cout << j << " " << deriv[max][j] << endl; dder[j] = param0[0][j] != param0[1][j] ? (deriv[0][j] - deriv[1][j]) / @@ -2232,7 +2228,7 @@ Int_t AliMUONClusterFinderAZ::Fit(Int_t nfit, Int_t *clustFit, TObjArray **clust } //_____________________________________________________________________________ -void AliMUONClusterFinderAZ::fcn1(Int_t & /*npar*/, Double_t * /*gin*/, Double_t &f, Double_t *par, Int_t /*iflag*/) +void AliMUONClusterFinderAZ::Fcn1(Int_t & /*npar*/, Double_t * /*gin*/, Double_t &f, Double_t *par, Int_t /*iflag*/) { // Fit for one track AliMUONClusterFinderAZ& c = *(AliMUONClusterFinderAZ::fgClusterFinder); @@ -2300,7 +2296,7 @@ void AliMUONClusterFinderAZ::UpdatePads(Int_t /*nfit*/, Double_t *par) } //_____________________________________________________________________________ -Bool_t AliMUONClusterFinderAZ::TestTrack(Int_t /*t*/) { +Bool_t AliMUONClusterFinderAZ::TestTrack(Int_t /*t*/) const { // Test if track was user selected return kTRUE; /* @@ -2493,3 +2489,17 @@ void AliMUONClusterFinderAZ::FindCluster(Int_t *localMax, Int_t iMax) delete [] used; used = 0; } + +//_____________________________________________________________________________ +AliMUONClusterFinderAZ& +AliMUONClusterFinderAZ::operator=(const AliMUONClusterFinderAZ& rhs) +{ +// Protected assignement operator + + if (this == &rhs) return *this; + + Fatal("operator=", "Not implemented."); + + return *this; +} + diff --git a/MUON/AliMUONClusterFinderAZ.h b/MUON/AliMUONClusterFinderAZ.h index ba6eb5103cb..706ed305233 100644 --- a/MUON/AliMUONClusterFinderAZ.h +++ b/MUON/AliMUONClusterFinderAZ.h @@ -3,28 +3,30 @@ /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * See cxx source for full Copyright notice */ -#include +/* $Id$ */ +// Revision of includes 07/05/2004 + +#include "AliMUONClusterFinderVS.h" + class TH2F; class TH2D; class TClonesArray; -class AliSegmentation; -class AliMUONResponse; class TMinuit; class TMatrixD; -class AliMUONPixel; -#include "AliMUONClusterFinderVS.h" - -//class AliMUONClusterFinderAZ : public TObject { -class AliMUONClusterFinderAZ : public AliMUONClusterFinderVS { - public: +class AliSegmentation; +class AliMUONResponse; +class AliMUONPixel; - AliMUONClusterFinderAZ(Bool_t draw, Int_t iReco);// Constructor +class AliMUONClusterFinderAZ : public AliMUONClusterFinderVS +{ +public: + AliMUONClusterFinderAZ(Bool_t draw = 0, Int_t iReco = 0);// Constructor virtual ~AliMUONClusterFinderAZ(); // Destructor void FindRawClusters(); // the same interface as for old cluster finder void EventLoop(Int_t nev, Int_t ch); // first event - Bool_t TestTrack(Int_t t); // test if track was selected + Bool_t TestTrack(Int_t t) const; // test if track was selected protected: AliMUONClusterFinderAZ(const AliMUONClusterFinderAZ& rhs); @@ -84,7 +86,7 @@ protected: void FlagLocalMax(TH2D *hist, Int_t i, Int_t j, Int_t *isLocalMax); // flag local max void FindCluster(Int_t *localMax, Int_t iMax); // find cluster around local max // This function is used for fitting - void fcn1(Int_t &npar, Double_t *gin, Double_t &f, Double_t *par, Int_t iflag); + void Fcn1(Int_t &npar, Double_t *gin, Double_t &f, Double_t *par, Int_t iflag); ClassDef(AliMUONClusterFinderAZ,0) // cluster finder in MUON arm of ALICE }; diff --git a/MUON/AliMUONClusterFinderVS.cxx b/MUON/AliMUONClusterFinderVS.cxx index b02a92e06da..6c600ae1ca1 100644 --- a/MUON/AliMUONClusterFinderVS.cxx +++ b/MUON/AliMUONClusterFinderVS.cxx @@ -15,6 +15,9 @@ /* $Id$ */ +#include +#include + #include "AliMUONClusterFinderVS.h" #include "AliMUONDigit.h" #include "AliMUONRawCluster.h" @@ -22,20 +25,6 @@ #include "AliMUONResponse.h" #include "AliMUONClusterInput.h" #include "AliMUONHitMapA1.h" -#include "AliRun.h" -#include "AliMUON.h" - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include //_____________________________________________________________________ // This function is minimized in the double-Mathieson fit @@ -47,6 +36,7 @@ void fcnCombiS2(Int_t &npar, Double_t *gin, Double_t &f, Double_t *par, Int_t if ClassImp(AliMUONClusterFinderVS) AliMUONClusterFinderVS::AliMUONClusterFinderVS() + : TObject() { // Default constructor fInput=AliMUONClusterInput::Instance(); @@ -64,8 +54,6 @@ AliMUONClusterFinderVS::AliMUONClusterFinderVS() } fRawClusters = new TClonesArray("AliMUONRawCluster",1000); fNRawClusters = 0; - - } //____________________________________________________________________________ AliMUONClusterFinderVS::~AliMUONClusterFinderVS() @@ -80,8 +68,9 @@ AliMUONClusterFinderVS::~AliMUONClusterFinderVS() AliMUONClusterFinderVS::AliMUONClusterFinderVS(const AliMUONClusterFinderVS & clusterFinder):TObject(clusterFinder) { -// Dummy copy Constructor - ; +// Protected copy constructor + + Fatal("AliMUONClusterFinderAZModule", "Not implemented."); } //____________________________________________________________________________ void AliMUONClusterFinderVS::ResetRawClusters() @@ -2094,7 +2083,7 @@ void AliMUONClusterFinderVS::AddRawCluster(const AliMUONRawCluster& c) fprintf(stderr,"\nfNRawClusters %d\n",fNRawClusters); } -Bool_t AliMUONClusterFinderVS::TestTrack(Int_t t) { +Bool_t AliMUONClusterFinderVS::TestTrack(Int_t t) const { // Test if track was user selected if (fTrack[0]==-1 || fTrack[1]==-1) { return kTRUE; @@ -2106,10 +2095,15 @@ Bool_t AliMUONClusterFinderVS::TestTrack(Int_t t) { } AliMUONClusterFinderVS& AliMUONClusterFinderVS -::operator = (const AliMUONClusterFinderVS& /*rhs*/) +::operator = (const AliMUONClusterFinderVS& rhs) { -// Dummy assignment operator - return *this; +// Protected assignement operator + + if (this == &rhs) return *this; + + Fatal("operator=", "Not implemented."); + + return *this; } diff --git a/MUON/AliMUONClusterFinderVS.h b/MUON/AliMUONClusterFinderVS.h index 4b0c89c4e4a..ffa68abb9dd 100644 --- a/MUON/AliMUONClusterFinderVS.h +++ b/MUON/AliMUONClusterFinderVS.h @@ -4,6 +4,7 @@ * See cxx source for full Copyright notice */ /* $Id$ */ +// Revision of includes 07/05/2004 //////////////////////////////////////////////// // MUON Cluster Finder Class // @@ -11,11 +12,12 @@ #include +class TClonesArray; + class AliMUONClusterInput; class AliMUONHitMapA1; class AliMUONResponse; class AliSegmentation; -class TClonesArray; class AliMUONRawCluster; class AliMUONDigit; @@ -24,7 +26,6 @@ class AliMUONClusterFinderVS : public TObject { public: AliMUONClusterFinderVS(); - AliMUONClusterFinderVS(const AliMUONClusterFinderVS& clusterFinder); virtual ~AliMUONClusterFinderVS(); // Decluster ? virtual void SetDeclusterFlag(Int_t flag=1) {fDeclusterFlag =flag;} @@ -55,9 +56,7 @@ class AliMUONClusterFinderVS : public TObject virtual void AddRawCluster(const AliMUONRawCluster& cluster); // Set tracks for debugging virtual void SetTracks(Int_t t1, Int_t t2) {fTrack[0]=t1; fTrack[1]=t2;} - virtual Bool_t TestTrack(Int_t t); -// Assignment operator - AliMUONClusterFinderVS & operator = (const AliMUONClusterFinderVS& rhs); + virtual Bool_t TestTrack(Int_t t) const; // debug level void SetDebugLevel(Int_t level) {fDebugLevel = level;} void SetGhostChi2Cut(Float_t cut) {fGhostChi2Cut = cut;} @@ -67,6 +66,10 @@ class AliMUONClusterFinderVS : public TObject void ResetRawClusters(); protected: + AliMUONClusterFinderVS(const AliMUONClusterFinderVS& clusterFinder); +// Assignment operator + AliMUONClusterFinderVS & operator = (const AliMUONClusterFinderVS& rhs); + AliMUONClusterInput* fInput; // ! AliMUONClusterInput instance AliMUONHitMapA1* fHitMap[2]; // Hit Maps for cathode 1 and 2 AliSegmentation* fSeg[2]; // Segmentations for cathode 1 and 2 diff --git a/MUON/AliMUONClusterInput.cxx b/MUON/AliMUONClusterInput.cxx index 9f4f1951d9f..0b0b54ff322 100644 --- a/MUON/AliMUONClusterInput.cxx +++ b/MUON/AliMUONClusterInput.cxx @@ -15,24 +15,25 @@ /* $Id$ */ +#include +#include + #include "AliRun.h" #include "AliMUON.h" #include "AliMUONChamber.h" #include "AliMUONClusterInput.h" -#include "AliSegmentation.h" #include "AliMUONResponse.h" #include "AliMUONRawCluster.h" #include "AliMUONDigit.h" -#include -#include - ClassImp(AliMUONClusterInput) AliMUONClusterInput* AliMUONClusterInput::fgClusterInput = 0; TMinuit* AliMUONClusterInput::fgMinuit = 0; -AliMUONClusterInput::AliMUONClusterInput(){ +AliMUONClusterInput::AliMUONClusterInput() + : TObject() +{ fgClusterInput = 0; fgMinuit = 0; fDigits[0]=0; @@ -59,9 +60,12 @@ AliMUONClusterInput::~AliMUONClusterInput() // Destructor delete fgMinuit; } + AliMUONClusterInput::AliMUONClusterInput(const AliMUONClusterInput& clusterInput):TObject(clusterInput) { - +// Protected copy constructor + + Fatal("AliMUONClusterInput", "Not implemented."); } void AliMUONClusterInput::SetDigits(Int_t chamber, TClonesArray* dig1, TClonesArray* dig2) @@ -212,8 +216,13 @@ Float_t AliMUONClusterInput::DiscrChargeCombiS2(Int_t i,Double_t *par, Int_t cat } AliMUONClusterInput& AliMUONClusterInput -::operator = (const AliMUONClusterInput& /*rhs*/) +::operator = (const AliMUONClusterInput& rhs) { -// Dummy assignment operator - return *this; +// Protected assignement operator + + if (this == &rhs) return *this; + + Fatal("operator=", "Not implemented."); + + return *this; } diff --git a/MUON/AliMUONClusterInput.h b/MUON/AliMUONClusterInput.h index 5806b289c59..b17e11c2da2 100644 --- a/MUON/AliMUONClusterInput.h +++ b/MUON/AliMUONClusterInput.h @@ -3,18 +3,21 @@ /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * See cxx source for full Copyright notice */ -/*$Id $*/ +/* $Id $*/ +// Revision of includes 07/05/2004 + +#include +#include // needed for inline function Digit class TMinuit; + class AliMUONDigit; class AliMUONRawCluster; class AliSegmentation; class AliMUONResponse; -#include // needed for inline function Digit - - -class AliMUONClusterInput : public TObject { +class AliMUONClusterInput : public TObject +{ public: virtual ~AliMUONClusterInput(); static AliMUONClusterInput* Instance(); @@ -23,20 +26,20 @@ class AliMUONClusterInput : public TObject { void SetDigits(Int_t chamber, TClonesArray* dig); void SetCluster(AliMUONRawCluster* cluster); // Access functions - Int_t Chamber() {return fChamber;} - AliMUONDigit* Digit(Int_t cath, Int_t i) {return (AliMUONDigit*) (fDigits[cath]->UncheckedAt(i));} - TClonesArray* Digits(Int_t cath) {return fDigits[cath];} - Int_t NDigits(Int_t cath) {return fNDigits[cath];} - AliSegmentation* Segmentation(Int_t cath) {return fSegmentation[cath];} - AliMUONResponse* Response() {return fResponse;} + Int_t Chamber() const {return fChamber;} + AliMUONDigit* Digit(Int_t cath, Int_t i) const {return (AliMUONDigit*) (fDigits[cath]->UncheckedAt(i));} + TClonesArray* Digits(Int_t cath) const {return fDigits[cath];} + Int_t NDigits(Int_t cath) const {return fNDigits[cath];} + AliSegmentation* Segmentation(Int_t cath) const {return fSegmentation[cath];} + AliMUONResponse* Response() const {return fResponse;} // Fitting - TMinuit* Fitter() {return fgMinuit;} + TMinuit* Fitter() const {return fgMinuit;} // Current cluster information - Float_t TotalCharge(Int_t cath) {return fChargeTot[cath];} - Float_t Charge(Int_t dig, Int_t cath) {return fCharge[dig][cath];} - Int_t Ix(Int_t dig, Int_t cath) {return fix[dig][cath];} - Int_t Iy(Int_t dig, Int_t cath) {return fiy[dig][cath];} - Int_t Nmul(Int_t cath) {return fNmul[cath];} + Float_t TotalCharge(Int_t cath) const {return fChargeTot[cath];} + Float_t Charge(Int_t dig, Int_t cath) const {return fCharge[dig][cath];} + Int_t Ix(Int_t dig, Int_t cath) const {return fix[dig][cath];} + Int_t Iy(Int_t dig, Int_t cath) const {return fiy[dig][cath];} + Int_t Nmul(Int_t cath) const {return fNmul[cath];} // Helpers for Fit Float_t DiscrChargeS1(Int_t i,Double_t *par); Float_t DiscrChargeCombiS1(Int_t i,Double_t *par, Int_t cath); diff --git a/MUON/AliMUONClusterReconstructor.cxx b/MUON/AliMUONClusterReconstructor.cxx index 232adb9e125..4bbc81e57ba 100644 --- a/MUON/AliMUONClusterReconstructor.cxx +++ b/MUON/AliMUONClusterReconstructor.cxx @@ -32,22 +32,15 @@ // //////////////////////////////////// -#include // for cout -#include // for exit() - -#include - -#include "AliMUON.h" #include "AliMUONClusterReconstructor.h" +#include "AliMUON.h" #include "AliMUONDigit.h" #include "AliMUONConstants.h" #include "AliMUONData.h" #include "AliMUONClusterFinderVS.h" -#include "AliMUONClusterFinderAZ.h" #include "AliMUONClusterInput.h" #include "AliMUONRawCluster.h" #include "AliRun.h" // for gAlice -#include "AliConfig.h" #include "AliRunLoader.h" #include "AliLoader.h" @@ -57,8 +50,9 @@ ClassImp(AliMUONClusterReconstructor) // Class implementation in ROOT context //__________________________________________________________________________ AliMUONClusterReconstructor::AliMUONClusterReconstructor(AliLoader* loader) + : TObject() { - // Default Constructor + // Standard Constructor fDebug = 0; fNCh = 0; @@ -82,9 +76,23 @@ AliMUONClusterReconstructor::AliMUONClusterReconstructor(AliLoader* loader) // getting MUON fMUON = (AliMUON*) gAlice->GetDetector("MUON"); +} - return; +//__________________________________________________________________________ +AliMUONClusterReconstructor::AliMUONClusterReconstructor() + : TObject(), + fNCh(0), + fNTrackingCh(0), + fMUONData(0), + fMUON(0), + fChambers(0), + fPrintLevel(fgkDefaultPrintLevel), + fDebug(0), + fLoader(0) +{ + // Default Constructor } + //____________________________________________________________________ void AliMUONClusterReconstructor::SetReconstructionModel(Int_t id, AliMUONClusterFinderVS *reconst) { @@ -98,15 +106,25 @@ void AliMUONClusterReconstructor::SetReconstructionModel(Int_t id, AliMUONCluste ((AliMUONChamber*) fChambers->At(id))->SetReconstructionModel(reconst); } //_______________________________________________________________________ -AliMUONClusterReconstructor::AliMUONClusterReconstructor (const AliMUONClusterReconstructor& Reconstructor):TObject(Reconstructor) +AliMUONClusterReconstructor::AliMUONClusterReconstructor (const AliMUONClusterReconstructor& rhs) + : TObject(rhs) { - // Dummy copy constructor +// Protected copy constructor + + Fatal("AliMUONClusterReconstructor", "Not implemented."); } -AliMUONClusterReconstructor & AliMUONClusterReconstructor::operator=(const AliMUONClusterReconstructor& /*Reconstructor*/) +//_______________________________________________________________________ +AliMUONClusterReconstructor & +AliMUONClusterReconstructor::operator=(const AliMUONClusterReconstructor& rhs) { - // Dummy assignment operator - return *this; +// Protected assignement operator + + if (this == &rhs) return *this; + + Fatal("operator=", "Not implemented."); + + return *this; } //__________________________________________________________________________ diff --git a/MUON/AliMUONClusterReconstructor.h b/MUON/AliMUONClusterReconstructor.h index d2e841f386d..7f29adc591a 100644 --- a/MUON/AliMUONClusterReconstructor.h +++ b/MUON/AliMUONClusterReconstructor.h @@ -4,12 +4,13 @@ * See cxx source for full Copyright notice */ /*$Id$*/ +// Revision of includes 07/05/2004 //////////////////////////////////// // MUON event reconstructor in ALICE //////////////////////////////////// -#include "TObjArray.h" -#include "AliDetector.h" + +#include class AliLoader; class AliMUON; @@ -19,13 +20,11 @@ class AliMUONClusterFinderVS; class AliMUONData; -class AliMUONClusterReconstructor : public TObject { - +class AliMUONClusterReconstructor : public TObject +{ public: AliMUONClusterReconstructor(AliLoader* loader); // Constructor virtual ~AliMUONClusterReconstructor(void); // Destructor - AliMUONClusterReconstructor (const AliMUONClusterReconstructor& rhs); // copy constructor - AliMUONClusterReconstructor& operator=(const AliMUONClusterReconstructor& rhs); // assignment operator // Interface with AliMUONData virtual void SetTreeAddress(){}; @@ -45,6 +44,9 @@ class AliMUONClusterReconstructor : public TObject { void SetPrintLevel(Int_t printLevel) {fPrintLevel = printLevel;} protected: + AliMUONClusterReconstructor(); // Default constructor + AliMUONClusterReconstructor (const AliMUONClusterReconstructor& rhs); // copy constructor + AliMUONClusterReconstructor& operator=(const AliMUONClusterReconstructor& rhs); // assignment operator private: static const Int_t fgkDefaultPrintLevel; // Default print level diff --git a/MUON/AliMUONConstants.h b/MUON/AliMUONConstants.h index 053256caf4c..1e5e1b3ff05 100644 --- a/MUON/AliMUONConstants.h +++ b/MUON/AliMUONConstants.h @@ -3,7 +3,8 @@ /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * See cxx source for full Copyright notice */ -/*$Id $*/ +/* $Id $*/ +// Revision of includes 07/05/2004 #include @@ -27,9 +28,11 @@ class AliMUONConstants : public TObject { static Float_t Dmax(Int_t i) {return fgDmax[i];} // return maximum zoom for event display static Int_t MaxZoom() {return fgMaxZoom;} - private: - AliMUONConstants(){} + + protected: + AliMUONConstants() : TObject() {} virtual ~AliMUONConstants(){} + private: static Int_t fgNCh; // Number of Chambers static Int_t fgNTrackingCh; // Number of Tracking Chambers diff --git a/MUON/AliMUONData.cxx b/MUON/AliMUONData.cxx index 2e117f348a2..94c13960fc7 100644 --- a/MUON/AliMUONData.cxx +++ b/MUON/AliMUONData.cxx @@ -20,12 +20,9 @@ // Gines Martinez, Subatech, September 2003 // -//Root includes -#include "TNamed.h" //AliRoot include -#include "AliRun.h" -#include "AliMC.h" -#include "AliLoader.h" +//#include "AliRun.h" +//#include "AliMC.h" #include "AliMUONConstants.h" #include "AliMUONData.h" #include "AliMUONDigit.h" @@ -35,6 +32,7 @@ #include "AliMUONRawCluster.h" #include "AliMUONTrack.h" #include "AliMUONTriggerTrack.h" + ClassImp(AliMUONData) //_____________________________________________________________________________ @@ -188,13 +186,13 @@ void AliMUONData::AddDigit(Int_t id, const AliMUONDigit& digit) new(ldigits[fNdigits[id]++]) AliMUONDigit(digit); } //_____________________________________________________________________________ -void AliMUONData::AddSDigit(Int_t id, Int_t *tracks, Int_t *charges, Int_t *Sdigits) +void AliMUONData::AddSDigit(Int_t id, Int_t *tracks, Int_t *charges, Int_t *sdigits) { // // Add a MUON Sdigit to the list of SDigits of the detection plane id // TClonesArray &lSdigits = * SDigits(id) ; - new(lSdigits[fNSdigits[id]++]) AliMUONDigit(tracks,charges,Sdigits); + new(lSdigits[fNSdigits[id]++]) AliMUONDigit(tracks,charges,sdigits); } //_____________________________________________________________________________ void AliMUONData::AddSDigit(Int_t id, const AliMUONDigit& Sdigit) @@ -567,9 +565,9 @@ void AliMUONData::MakeBranch(Option_t* option) Info("MakeBranch","Branch %s is already in tree.",GetName()); return; } - TClonesArray * Sdigits = SDigits(iDetectionPlane); - branch = TreeS()->Branch(branchname, &Sdigits, kBufferSize,1); - //Info("MakeBranch","Making Branch %s for Sdigits in detection plane %d\n",branchname,iDetectionPlane+1); + TClonesArray * sdigits = SDigits(iDetectionPlane); + branch = TreeS()->Branch(branchname, &sdigits, kBufferSize,1); + //Info("MakeBranch","Making Branch %s for sdigits in detection plane %d\n",branchname,iDetectionPlane+1); } } @@ -844,8 +842,8 @@ void AliMUONData::SetTreeAddress(Option_t* option) sprintf(branchname,"%sSDigits%d",GetName(),i+1); if (fSDigits) { branch = TreeS()->GetBranch(branchname); - TClonesArray * Sdigits = SDigits(i); - if (branch) branch->SetAddress( &Sdigits ); + TClonesArray * sdigits = SDigits(i); + if (branch) branch->SetAddress( &sdigits ); else Warning("SetTreeAddress","(%s) Failed for SDigits Detection plane %d. Can not find branch in tree.",GetName(),i); } } diff --git a/MUON/AliMUONData.h b/MUON/AliMUONData.h index d869884cba9..825e3e944ca 100644 --- a/MUON/AliMUONData.h +++ b/MUON/AliMUONData.h @@ -5,12 +5,15 @@ * See cxx source for full Copyright notice */ /* $Id$ */ +// Revision of includes 07/05/2004 // AliMUONData // Class containing MUON data: hits, digits, rawclusters, globaltrigger, localtrigger, etc ... // Gines Martinez, Subatech, September 2003 // +#include + #include "AliLoader.h" class TClonesArray; @@ -18,7 +21,6 @@ class TNamed; class TObjArray; class TTree; - class AliMUONConstants; class AliMUONRawCluster; class AliMUONTrack; @@ -81,15 +83,15 @@ class AliMUONData : public TNamed TClonesArray* RecTracks() {return fRecTracks;} TClonesArray* RecTriggerTracks() {return fRecTriggerTracks;} - void GetTrack(Int_t it) {fLoader->TreeH()->GetEvent(it);} - Int_t GetNtracks() {return (Int_t) fLoader->TreeH()->GetEntries();} - void GetCathode(Int_t ic) {fLoader->TreeD()->GetEvent(ic);} - void GetCathodeS(Int_t ic) {fLoader->TreeS()->GetEvent(ic);} - void GetRawClusters() {fLoader->TreeR()->GetEvent(0);} - void GetTrigger() {fLoader->TreeR()->GetEvent(0);} - Int_t GetSplitLevel() {return fSplitLevel;} - void GetRecTracks() {fLoader->TreeT()->GetEvent(0);} - void GetRecTriggerTracks() {fLoader->TreeT()->GetEvent(0);} + void GetTrack(Int_t it) const {fLoader->TreeH()->GetEvent(it);} + Int_t GetNtracks() const {return (Int_t) fLoader->TreeH()->GetEntries();} + void GetCathode(Int_t ic) const {fLoader->TreeD()->GetEvent(ic);} + void GetCathodeS(Int_t ic) const {fLoader->TreeS()->GetEvent(ic);} + void GetRawClusters() const {fLoader->TreeR()->GetEvent(0);} + void GetTrigger() const {fLoader->TreeR()->GetEvent(0);} + Int_t GetSplitLevel() const {return fSplitLevel;} + void GetRecTracks() const {fLoader->TreeT()->GetEvent(0);} + void GetRecTriggerTracks() const {fLoader->TreeT()->GetEvent(0);} Bool_t IsRawClusterBranchesInTree(); Bool_t IsTriggerBranchesInTree(); diff --git a/MUON/AliMUONDataInterface.cxx b/MUON/AliMUONDataInterface.cxx index 7acd680dd49..f1a10d8ba79 100644 --- a/MUON/AliMUONDataInterface.cxx +++ b/MUON/AliMUONDataInterface.cxx @@ -3,12 +3,16 @@ // email: artur@alice.phy.uct.ac.za #include +#include #include "AliRunLoader.h" #include "AliLoader.h" #include "AliMUONDataInterface.h" -#include "AliMUONData.h" +#include "AliMUONLocalTrigger.h" +#include "AliMUONHit.h" +#include "AliMUONDigit.h" +#include "AliMUONRawCluster.h" ClassImp(AliMUONDataInterface) diff --git a/MUON/AliMUONDataInterface.h b/MUON/AliMUONDataInterface.h index b795e4da0d8..8e3cf2391b9 100644 --- a/MUON/AliMUONDataInterface.h +++ b/MUON/AliMUONDataInterface.h @@ -1,21 +1,27 @@ #ifndef ALI_MUON_DATA_INTERFACE_H #define ALI_MUON_DATA_INTERFACE_H +/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * See cxx source for full Copyright notice */ + +/* $Id$ */ +// Includes revised 07/05/2004 // Author: Artur Szostak // email: artur@alice.phy.uct.ac.za #include #include -#include -#include "AliRunLoader.h" -#include "AliLoader.h" #include "AliMUONData.h" -#include "AliMUONHit.h" -#include "AliMUONDigit.h" -#include "AliMUONRawCluster.h" -#include "AliMUONLocalTrigger.h" +class TParticle; + +class AliRunLoader; +class AliLoader; +class AliMUONRawCluster; +class AliMUONLocalTrigger; +class AliMUONHit; +class AliMUONDigit; // An easy to use interface to the MUON module data stored in TreeK, TreeH, TreeS, TreeD and TreeR @@ -86,22 +92,22 @@ public: // Returns the name of the currently selected file. - TString CurrentFile() { return fFilename; }; + TString CurrentFile() const { return fFilename; }; // Returns the name of the currently selected folder. - TString CurrentFolder() { return fFoldername; }; + TString CurrentFolder() const { return fFoldername; }; // Returns the number of the currently selected event. - Int_t CurrentEvent() { return fEventnumber; }; + Int_t CurrentEvent() const { return fEventnumber; }; // Returns the currently selected track. - Int_t CurrentTrack() { return fTrack; }; + Int_t CurrentTrack() const { return fTrack; }; // Returns the currently selected cathode in TreeS. - Int_t CurrentSCathode() { return fSCathode; }; + Int_t CurrentSCathode() const { return fSCathode; }; // Returns the currently selected cathode in TreeD. - Int_t CurrentDCathode() { return fCathode; }; + Int_t CurrentDCathode() const { return fCathode; }; protected: AliMUONDataInterface(const AliMUONDataInterface& rhs); diff --git a/MUON/AliMUONDigit.cxx b/MUON/AliMUONDigit.cxx index cde04b760a8..3fff34d4dae 100644 --- a/MUON/AliMUONDigit.cxx +++ b/MUON/AliMUONDigit.cxx @@ -36,6 +36,13 @@ ClassImp(AliMUONDigit) } } +//_____________________________________________________________________________ + AliMUONDigit::AliMUONDigit() + : TObject() +{ +// Default constructor +} + //_____________________________________________________________________________ AliMUONDigit::AliMUONDigit(Int_t *digits) { diff --git a/MUON/AliMUONDigit.h b/MUON/AliMUONDigit.h index 02927930f7d..ef8b0eb6d02 100644 --- a/MUON/AliMUONDigit.h +++ b/MUON/AliMUONDigit.h @@ -4,6 +4,7 @@ * See cxx source for full Copyright notice */ /* $Id$ */ +// Revision of includes 07/05/2004 #include @@ -12,7 +13,7 @@ static const Int_t kMAXTRACKS=10; class AliMUONDigit : public TObject { public: - AliMUONDigit() {} + AliMUONDigit(); AliMUONDigit(const AliMUONDigit& rhs); AliMUONDigit(Int_t *digits); AliMUONDigit(Int_t *tracks, Int_t *charges, Int_t *digits); diff --git a/MUON/AliMUONDigitizer.cxx b/MUON/AliMUONDigitizer.cxx index ace38608435..d0e2a49883c 100644 --- a/MUON/AliMUONDigitizer.cxx +++ b/MUON/AliMUONDigitizer.cxx @@ -15,28 +15,22 @@ /* $Id$ */ -#include -#include -#include - #include "AliRun.h" #include "AliRunDigitizer.h" #include "AliRunLoader.h" -#include "AliLoader.h" #include "AliMUONDigitizer.h" #include "AliMUONConstants.h" #include "AliMUONChamber.h" #include "AliMUONHitMapA1.h" #include "AliMUON.h" +#include "AliMUONLoader.h" #include "AliMUONChamber.h" #include "AliMUONConstants.h" -#include "AliMUONDigit.h" #include "AliMUONDigitizer.h" -#include "AliMUONHit.h" -#include "AliMUONHitMapA1.h" -#include "AliMUONPadHit.h" #include "AliMUONTransientDigit.h" +#include "AliMUONHitMapA1.h" + ///////////////////////////////////////////////////////////////////////////////////// // @@ -64,10 +58,10 @@ AliMUONDigitizer::AliMUONDigitizer() : // Default constructor. // Initializes all pointers to NULL. - runloader = NULL; - gime = NULL; - pMUON = NULL; - muondata = NULL; + fRunLoader = NULL; + fGime = NULL; + fMUON = NULL; + fMUONData = NULL; }; //___________________________________________ @@ -83,10 +77,10 @@ AliMUONDigitizer::AliMUONDigitizer(AliRunDigitizer* manager) : // Constructor which should be used rather than the default constructor. // Initializes all pointers to NULL. - runloader = NULL; - gime = NULL; - pMUON = NULL; - muondata = NULL; + fRunLoader = NULL; + fGime = NULL; + fMUON = NULL; + fMUONData = NULL; }; //___________________________________________ @@ -143,8 +137,8 @@ void AliMUONDigitizer::Exec(Option_t* option) return; }; - if (! FetchLoaders(fManager->GetInputFolderName(0), runloader, gime) ) return; - if (! FetchGlobalPointers(runloader) ) return; + if (! FetchLoaders(fManager->GetInputFolderName(0), fRunLoader, fGime) ) return; + if (! FetchGlobalPointers(fRunLoader) ) return; InitArrays(); @@ -161,21 +155,21 @@ void AliMUONDigitizer::Exec(Option_t* option) if (inputFile != 0) // If this is the first file then we already have the loaders loaded. - if (! FetchLoaders(fManager->GetInputFolderName(inputFile), runloader, gime) ) + if (! FetchLoaders(fManager->GetInputFolderName(inputFile), fRunLoader, fGime) ) continue; else // If this is not the first file then it is assumed to be background. fSignal = kFALSE; - if (! InitInputData(gime) ) continue; + if (! InitInputData(fGime) ) continue; GenerateTransientDigits(); - CleanupInputData(gime); + CleanupInputData(fGime); }; - Bool_t ok = FetchLoaders(fManager->GetOutputFolderName(), runloader, gime); - if (ok) ok = InitOutputData(gime); + Bool_t ok = FetchLoaders(fManager->GetOutputFolderName(), fRunLoader, fGime); + if (ok) ok = InitOutputData(fGime); if (ok) CreateDigits(); - if (ok) CleanupOutputData(gime); + if (ok) CleanupOutputData(fGime); CleanupArrays(); }; @@ -291,13 +285,13 @@ void AliMUONDigitizer::CreateDigits() }; //------------------------------------------------------------------------ -void AliMUONDigitizer::AddDigit(AliMUONTransientDigit* td, Int_t response_charge) +void AliMUONDigitizer::AddDigit(AliMUONTransientDigit* td, Int_t responseCharge) { // Prepares the digits, track and charge arrays in preparation for a call to // AddDigit(Int_t, Int_t[kMAXTRACKS], Int_t[kMAXTRACKS], Int_t[6]) // This method is called by CreateDigits() whenever a new digit needs to be added // to the output stream trees. -// The response_charge value is used as the Signal of the new digit. +// The responseCharge value is used as the Signal of the new digit. // The OnWriteTransientDigit method is also called just before the adding the // digit to allow inheriting digitizers to be able to do some specific processing // at this point. @@ -309,7 +303,7 @@ void AliMUONDigitizer::AddDigit(AliMUONTransientDigit* td, Int_t response_charge digits[0] = td->PadX(); digits[1] = td->PadY(); digits[2] = td->Cathode() - 1; - digits[3] = response_charge; + digits[3] = responseCharge; digits[4] = td->Physics(); digits[5] = td->Hit(); @@ -344,7 +338,7 @@ void AliMUONDigitizer::AddDigit(AliMUONTransientDigit* td, Int_t response_charge }; }; - if (GetDebug() > 3) Info("AddDigit", "Adding digit with charge %d.", response_charge); + if (GetDebug() > 3) Info("AddDigit", "Adding digit with charge %d.", responseCharge); OnWriteTransientDigit(td); AddDigit(td->Chamber(), tracks, charges, digits); @@ -414,14 +408,14 @@ Bool_t AliMUONDigitizer::FetchGlobalPointers(AliRunLoader* runloader) Error("FetchGlobalPointers", "Could not find the AliRun object in runloader 0x%X.", (void*)runloader); return kFALSE; }; - pMUON = (AliMUON*) gAlice->GetDetector("MUON"); - if (pMUON == NULL) + fMUON = (AliMUON*) gAlice->GetDetector("MUON"); + if (fMUON == NULL) { Error("FetchGlobalPointers", "Could not find the MUON module in runloader 0x%X.", (void*)runloader); return kFALSE; }; - muondata = pMUON->GetMUONData(); - if (muondata == NULL) + fMUONData = fMUON->GetMUONData(); + if (fMUONData == NULL) { Error("FetchGlobalPointers", "Could not find AliMUONData object in runloader 0x%X.", (void*)runloader); return kFALSE; @@ -472,7 +466,7 @@ void AliMUONDigitizer::InitArrays() for (Int_t i = 0; i < AliMUONConstants::NCh(); i++) { if (GetDebug() > 3) Info("InitArrays", "Creating hit map for chamber %d, cathode 1.", i+1); - AliMUONChamber* chamber = &(pMUON->Chamber(i)); + AliMUONChamber* chamber = &(fMUON->Chamber(i)); AliSegmentation* c1Segmentation = chamber->SegmentationModel(1); // Cathode plane 1 fHitMap[i] = new AliMUONHitMapA1(c1Segmentation, fTDList); if (GetDebug() > 3) Info("InitArrays", "Creating hit map for chamber %d, cathode 2.", i+1); @@ -503,7 +497,7 @@ void AliMUONDigitizer::CleanupArrays() }; //------------------------------------------------------------------------ -void AliMUONDigitizer::SortTracks(Int_t *tracks, Int_t *charges, Int_t ntr) +void AliMUONDigitizer::SortTracks(Int_t *tracks, Int_t *charges, Int_t ntr) const { // // Sort the list of tracks contributing to a given digit diff --git a/MUON/AliMUONDigitizer.h b/MUON/AliMUONDigitizer.h index 32458513baf..1bf15e6b376 100644 --- a/MUON/AliMUONDigitizer.h +++ b/MUON/AliMUONDigitizer.h @@ -4,16 +4,18 @@ * See cxx source for full Copyright notice */ /* $Id$ */ +// Revision of includes 07/05/2004 + #include "AliDigitizer.h" -#include "AliRunLoader.h" -#include "AliMUONLoader.h" -#include "AliMUONTransientDigit.h" -#include "AliMUON.h" -#include "AliMUONData.h" +#include "AliMUONDigit.h" class AliRunDigitizer; +class AliRunLoader; class AliMUONHitMapA1; - +class AliMUON; +class AliMUONData; +class AliMUONLoader; +class AliMUONTransientDigit; class AliMUONDigitizer : public AliDigitizer { @@ -52,7 +54,7 @@ protected: /* Digitizers inheriting from AliMUONDigitizer should implement this abstract method so that TransientDigit objects are generated and put onto the fTDList. The method would be implemented as some loop over the input stream. The data can be - fetched from the muondata pointer. To add to the fTDList once should use code similar + fetched from the fMUONData pointer. To add to the fTDList once should use code similar to the following: TObject* source_object; // Assume the object from which the transient digit @@ -72,7 +74,7 @@ protected: // Loops over the fTDList of transient digits to write them to the output stream. virtual void CreateDigits(); - /* Inheriting digitizers should implement this method to prepare the muondata + /* Inheriting digitizers should implement this method to prepare the fMUONData object before GenerateTransientDigits() is called. If the initialization was successful then kTRUE should be returned otherwise kFALSE should be returned. @@ -84,17 +86,17 @@ protected: */ virtual void CleanupInputData(AliMUONLoader* muonloader) = 0; - /* Inheriting digitizers should implement this method to prepare the muondata + /* Inheriting digitizers should implement this method to prepare the fMUONData object before CreateDigits() is called. If the initialization was successful then kTRUE should be returned otherwise kFALSE should be returned. */ virtual Bool_t InitOutputData(AliMUONLoader* muonloader) = 0; - /* When all the data is added to the muondata object and the trees need to be + /* When all the data is added to the fMUONData object and the trees need to be filled then this method is called by CreateDigits(). Thus code like - muondata->Fill("D") + fMUONData->Fill("D") should go into this method. */ virtual void FillOutputData() = 0; @@ -122,12 +124,12 @@ protected: virtual void OnCreateTransientDigit(AliMUONTransientDigit* /*digit*/, TObject* /*source_object*/); /* Called by AddDigit(AliMUONTransientDigit*, Int_t) when transient digit is added to the - muondata object ready for writing to the data trees. + fMUONData object ready for writing to the data trees. */ virtual void OnWriteTransientDigit(AliMUONTransientDigit* digit); // Wrapper method for AddDigit(Int_t, Int_t[kMAXTRACKS], Int_t[kMAXTRACKS], Int_t[6]) - void AddDigit(AliMUONTransientDigit* td, Int_t response_charge); + void AddDigit(AliMUONTransientDigit* td, Int_t responseCharge); // Creates a new fTDList object, and creates and fills the fHitMap arrays. // Note: this method assumes the array pointers are NULL when calling this method. @@ -159,13 +161,13 @@ protected: Bool_t ExistTransientDigit(AliMUONTransientDigit * mTD); // Sorts the 3 most significant tracks. - void SortTracks(Int_t *tracks, Int_t *charges, Int_t ntr); + void SortTracks(Int_t *tracks, Int_t *charges, Int_t ntr) const; - AliRunLoader* runloader; //! Global run loader. - AliMUONLoader* gime; //! MUON specific loader. - AliMUON* pMUON; //! Pointer to MUON module. - AliMUONData* muondata; //! muon data interface + AliRunLoader* fRunLoader; //! Global run loader. + AliMUONLoader* fGime; //! MUON specific loader. + AliMUON* fMUON; //! Pointer to MUON module. + AliMUONData* fMUONData; //! muon data interface AliMUONHitMapA1 **fHitMap; //! pointer to array of pointers to hitmaps TObjArray *fTDList; //! list of AliMUONTransientDigits diff --git a/MUON/AliMUONDigitizerv1.cxx b/MUON/AliMUONDigitizerv1.cxx index b5e01b07a25..6649b88f7ed 100644 --- a/MUON/AliMUONDigitizerv1.cxx +++ b/MUON/AliMUONDigitizerv1.cxx @@ -1,26 +1,19 @@ - -#include -#include -#include -#include -#include -#include -#include - -#include "AliRun.h" -#include "AliRunDigitizer.h" -#include "AliRunLoader.h" -#include "AliLoader.h" - -#include "AliMUON.h" -#include "AliMUONChamber.h" -#include "AliMUONConstants.h" -#include "AliMUONDigit.h" -#include "AliMUONDigitizerv1.h" -#include "AliMUONHit.h" -#include "AliMUONHitMapA1.h" -#include "AliMUONPadHit.h" -#include "AliMUONTransientDigit.h" +/************************************************************************** + * 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$ */ ///////////////////////////////////////////////////////////////////////////////// // @@ -35,6 +28,17 @@ // ///////////////////////////////////////////////////////////////////////////////// +#include + +#include "AliMUON.h" +#include "AliMUONData.h" +#include "AliMUONLoader.h" +#include "AliMUONChamber.h" +#include "AliMUONConstants.h" +#include "AliMUONDigitizerv1.h" +#include "AliMUONHit.h" +#include "AliMUONTransientDigit.h" + ClassImp(AliMUONDigitizerv1) //___________________________________________ @@ -62,7 +66,7 @@ void AliMUONDigitizerv1::GenerateTransientDigits() // MakeTransientDigitsFromHit for each hit. // Note: Charge correlation is applied to the tracking chambers. - TTree* treeH = gime->TreeH(); + TTree* treeH = fGime->TreeH(); if (GetDebug() > 1) Info("GenerateTransientDigits", "Generating transient digits using treeH = 0x%X" , (void*)treeH); @@ -72,11 +76,11 @@ void AliMUONDigitizerv1::GenerateTransientDigits() for (Int_t itrack = 0; itrack < ntracks; itrack++) { if (GetDebug() > 2) Info("GenerateTransientDigits", "Processing track %d...", itrack); - muondata->ResetHits(); + fMUONData->ResetHits(); treeH->GetEvent(itrack); // // Loop over hits - TClonesArray* hits = muondata->Hits(); + TClonesArray* hits = fMUONData->Hits(); for (Int_t ihit = 0; ihit < hits->GetEntriesFast(); ihit++) { AliMUONHit* mHit = static_cast( hits->At(ihit) ); @@ -98,7 +102,7 @@ void AliMUONDigitizerv1::GenerateTransientDigits() } // // Inititializing Correlation - AliMUONChamber& chamber = pMUON->Chamber(ichamber); + AliMUONChamber& chamber = fMUON->Chamber(ichamber); chamber.ChargeCorrelationInit(); if (ichamber < AliMUONConstants::NTrackingCh()) { @@ -132,7 +136,7 @@ void AliMUONDigitizerv1::MakeTransientDigitsFromHit(Int_t track, Int_t iHit, Ali Float_t newdigit[6][500]; // Pad information Int_t nnew=0; // Number of touched Pads per hit Int_t ichamber = mHit->Chamber()-1; - AliMUONChamber& chamber = pMUON->Chamber(ichamber); + AliMUONChamber& chamber = fMUON->Chamber(ichamber); chamber.DisIntegration(mHit->Eloss(), mHit->Age(), mHit->X(), mHit->Y(), mHit->Z(), nnew, newdigit); // Creating new TransientDigits from hit @@ -174,7 +178,7 @@ void AliMUONDigitizerv1::MakeTransientDigitsFromHit(Int_t track, Int_t iHit, Ali void AliMUONDigitizerv1::AddDigit(Int_t chamber, Int_t tracks[kMAXTRACKS], Int_t charges[kMAXTRACKS], Int_t digits[6]) { // Derived to add digits to TreeD. - muondata->AddDigit(chamber, tracks, charges, digits); + fMUONData->AddDigit(chamber, tracks, charges, digits); }; //------------------------------------------------------------------------ @@ -188,7 +192,7 @@ Int_t AliMUONDigitizerv1::GetSignalFrom(AliMUONTransientDigit* td) // // Digit Response (noise, threshold, saturation, ...) Int_t q = td->Signal(); - AliMUONChamber& chamber = pMUON->Chamber(td->Chamber()); + AliMUONChamber& chamber = fMUON->Chamber(td->Chamber()); AliMUONResponse* response = chamber.ResponseModel(); q = response->DigitResponse(q, td); return q; @@ -198,12 +202,12 @@ Int_t AliMUONDigitizerv1::GetSignalFrom(AliMUONTransientDigit* td) Bool_t AliMUONDigitizerv1::InitOutputData(AliMUONLoader* muonloader) { // Derived to initialize the output digits tree TreeD, create it if necessary -// and sets the muondata tree address to treeD. +// and sets the fMUONData tree address to treeD. if (GetDebug() > 2) Info("InitOutputData", "Creating digits branch and setting the tree address."); - muondata->SetLoader(muonloader); + fMUONData->SetLoader(muonloader); // New branch per chamber for MUON digit in the tree of digits if (muonloader->TreeD() == NULL) @@ -216,8 +220,8 @@ Bool_t AliMUONDigitizerv1::InitOutputData(AliMUONLoader* muonloader) }; }; - muondata->MakeBranch("D"); - muondata->SetTreeAddress("D"); + fMUONData->MakeBranch("D"); + fMUONData->SetTreeAddress("D"); return kTRUE; }; @@ -225,11 +229,11 @@ Bool_t AliMUONDigitizerv1::InitOutputData(AliMUONLoader* muonloader) //------------------------------------------------------------------------ void AliMUONDigitizerv1::FillOutputData() { -// Derived to fill TreeD and resets the digit array in muondata. +// Derived to fill TreeD and resets the digit array in fMUONData. if (GetDebug() > 2) Info("FillOutputData", "Filling trees with digits."); - muondata->Fill("D"); - muondata->ResetDigits(); + fMUONData->Fill("D"); + fMUONData->ResetDigits(); }; //------------------------------------------------------------------------ @@ -252,7 +256,7 @@ Bool_t AliMUONDigitizerv1::InitInputData(AliMUONLoader* muonloader) if (GetDebug() > 2) Info("InitInputData", "Loading hits in READ mode and setting the tree address."); - muondata->SetLoader(muonloader); + fMUONData->SetLoader(muonloader); if (muonloader->TreeH() == NULL) { @@ -264,7 +268,7 @@ Bool_t AliMUONDigitizerv1::InitInputData(AliMUONLoader* muonloader) }; }; - muondata->SetTreeAddress("H"); + fMUONData->SetTreeAddress("H"); return kTRUE; }; @@ -274,7 +278,7 @@ void AliMUONDigitizerv1::CleanupInputData(AliMUONLoader* muonloader) // Derived to release the loaded hits and unload them. if (GetDebug() > 2) Info("CleanupInputData", "Releasing loaded hits."); - muondata->ResetHits(); + fMUONData->ResetHits(); muonloader->UnloadHits(); }; diff --git a/MUON/AliMUONDigitizerv1.h b/MUON/AliMUONDigitizerv1.h index 67f84f966ba..89a6f75d82e 100644 --- a/MUON/AliMUONDigitizerv1.h +++ b/MUON/AliMUONDigitizerv1.h @@ -3,6 +3,9 @@ /* Copyright(c) 1998-2001, ALICE Experiment at CERN, All rights reserved. * * See cxx source for full Copyright notice */ +/* $Id$ */ +// Revision of includes 07/05/2004 + // The AliMUONDigitizer procees : // - Addition of hits from different tracks // - Merging of hits from different files @@ -12,6 +15,11 @@ // Gines MARTINEZ Subatech Feb 2003 #include "AliMUONDigitizer.h" +#include "AliMUONDigit.h" + +class AliMUONLoader; +class AliMUONHit; +class AliMUONTransientDigit; class AliMUONDigitizerv1 : public AliMUONDigitizer { diff --git a/MUON/AliMUONDigitizerv2.cxx b/MUON/AliMUONDigitizerv2.cxx index eb12e651890..6780262d84a 100644 --- a/MUON/AliMUONDigitizerv2.cxx +++ b/MUON/AliMUONDigitizerv2.cxx @@ -1,29 +1,23 @@ +/************************************************************************** + * 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$ */ // Do the Digitization (Digit) from summable Digits (SDigit) // Allow the merging of signal file with background file(s). -#include -#include -#include -#include -#include -#include -#include - -#include "AliMUON.h" -#include "AliMUONChamber.h" -#include "AliMUONConstants.h" -#include "AliMUONDigit.h" -#include "AliMUONDigitizerv2.h" -#include "AliMUONHit.h" -#include "AliMUONHitMapA1.h" -#include "AliMUONPadHit.h" -#include "AliMUONTransientDigit.h" -#include "AliRun.h" -#include "AliRunDigitizer.h" -#include "AliRunLoader.h" -#include "AliLoader.h" - ///////////////////////////////////////////////////////////////////////////////// // // AliMUONDigitizerv2 digitizes digits from s-digits. @@ -34,6 +28,13 @@ // ///////////////////////////////////////////////////////////////////////////////// +#include "AliMUONData.h" +#include "AliMUONLoader.h" +#include "AliMUONConstants.h" +#include "AliMUONDigit.h" +#include "AliMUONDigitizerv2.h" +#include "AliMUONTransientDigit.h" + ClassImp(AliMUONDigitizerv2) //___________________________________________ @@ -70,18 +71,18 @@ void AliMUONDigitizerv2::GenerateTransientDigits() TClonesArray* muonSDigits; for (Int_t ich = 0; ich < AliMUONConstants::NCh(); ich++) // loop over chamber { - muondata->ResetSDigits(); - muondata->GetCathodeS(0); - muonSDigits = muondata->SDigits(ich); + fMUONData->ResetSDigits(); + fMUONData->GetCathodeS(0); + muonSDigits = fMUONData->SDigits(ich); ndig = muonSDigits->GetEntriesFast(); for (k = 0; k < ndig; k++) { sDigit = (AliMUONDigit*) muonSDigits->UncheckedAt(k); MakeTransientDigitFromSDigit(ich,sDigit); } - muondata->ResetSDigits(); - muondata->GetCathodeS(1); - muonSDigits = muondata->SDigits(ich); + fMUONData->ResetSDigits(); + fMUONData->GetCathodeS(1); + muonSDigits = fMUONData->SDigits(ich); ndig=muonSDigits->GetEntriesFast(); for (k = 0; k < ndig; k++) { @@ -137,20 +138,20 @@ void AliMUONDigitizerv2::MakeTransientDigitFromSDigit(Int_t iChamber, AliMUONDig void AliMUONDigitizerv2::AddDigit(Int_t chamber, Int_t tracks[kMAXTRACKS], Int_t charges[kMAXTRACKS], Int_t digits[6]) { // Override to add new digits to the digits tree TreeD. - muondata->AddDigit(chamber, tracks, charges, digits); + fMUONData->AddDigit(chamber, tracks, charges, digits); }; //------------------------------------------------------------------------ Bool_t AliMUONDigitizerv2::InitInputData(AliMUONLoader* muonloader) { -// Overridden to initialize muondata to read from the s-digits tree TreeS. +// Overridden to initialize fMUONData to read from the s-digits tree TreeS. // If the s-digits are not loaded then the muon loader is used to load the // s-digits into memory. if (GetDebug() > 2) Info("InitInputData", "Loading s-digits in READ mode and setting the tree address."); - muondata->SetLoader(muonloader); + fMUONData->SetLoader(muonloader); if (muonloader->TreeS() == NULL) { @@ -162,7 +163,7 @@ Bool_t AliMUONDigitizerv2::InitInputData(AliMUONLoader* muonloader) }; }; - muondata->SetTreeAddress("S"); + fMUONData->SetTreeAddress("S"); return kTRUE; }; @@ -172,6 +173,6 @@ void AliMUONDigitizerv2::CleanupInputData(AliMUONLoader* muonloader) // Overridden to release and unload s-digits from memory. if (GetDebug() > 2) Info("CleanupInputData", "Releasing loaded s-digits."); - muondata->ResetSDigits(); + fMUONData->ResetSDigits(); muonloader->UnloadSDigits(); }; diff --git a/MUON/AliMUONDigitizerv2.h b/MUON/AliMUONDigitizerv2.h index 5d3c8fa9629..f8cea04f45f 100644 --- a/MUON/AliMUONDigitizerv2.h +++ b/MUON/AliMUONDigitizerv2.h @@ -3,7 +3,13 @@ /* Copyright(c) 1998-2001, ALICE Experiment at CERN, All rights reserved. * * See cxx source for full Copyright notice */ +/* $Id$ */ +// Revision of includes 07/05/2004 + #include "AliMUONDigitizerv1.h" +#include "AliMUONDigit.h" + +class AliMUONLoader; class AliMUONDigitizerv2 : public AliMUONDigitizerv1 { diff --git a/MUON/AliMUONDisplay.cxx b/MUON/AliMUONDisplay.cxx index 427d5a356b6..a651d9a6d29 100644 --- a/MUON/AliMUONDisplay.cxx +++ b/MUON/AliMUONDisplay.cxx @@ -23,42 +23,30 @@ // // ////////////////////////////////////////////////////////////////////////// -#include -#include #include #include #include #include #include -#include #include #include -#include #include #include #include -#include #include -#include -#include #include #include -#include #include -#include #include +#include "AliMUONDisplay.h" #include "AliRun.h" -#include "AliDetector.h" #include "AliMUON.h" -#include "AliMUONDisplay.h" #include "AliMUONPoints.h" -#include "TParticle.h" #include "AliMUONGlobalTrigger.h" #include "AliHeader.h" #include "AliMUONHit.h" -#include "AliMUONPadHit.h" #include "AliMUONDigit.h" #include "AliMUONRawCluster.h" @@ -76,6 +64,7 @@ ClassImp(AliMUONDisplay) //_____________________________________________________________________________ AliMUONDisplay::AliMUONDisplay() + : AliDisplay() { // Constructor fPoints = 0; @@ -88,6 +77,7 @@ AliMUONDisplay::AliMUONDisplay() //_____________________________________________________________________________ AliMUONDisplay::AliMUONDisplay(Int_t size, AliLoader * loader) + : AliDisplay() { // Create an event display object. // A canvas named "edisplay" is created with a vertical size in pixels @@ -233,10 +223,12 @@ AliMUONDisplay::AliMUONDisplay(Int_t size, AliLoader * loader) fMUONData =0x0; } -AliMUONDisplay::AliMUONDisplay(const AliMUONDisplay & display):AliDisplay(display) +AliMUONDisplay::AliMUONDisplay(const AliMUONDisplay & display) + : AliDisplay(display) { -// Dummy copy constructor - ; +// Protected copy constructor + + Fatal("AliMUONDisplay", "Not implemented."); } @@ -340,7 +332,7 @@ void AliMUONDisplay::DisplayButtons() } //_____________________________________________________________________________ -void AliMUONDisplay::CreateColors() +void AliMUONDisplay::CreateColors() const { // Create the colors palette used to display clusters @@ -628,11 +620,11 @@ void AliMUONDisplay::DrawTitle(Option_t *option) Float_t dx = xmax-xmin; Float_t dy = ymax-ymin; - AliRunLoader * RunLoader; + AliRunLoader * runLoader; if (fLoader) - RunLoader = fLoader->GetRunLoader(); + runLoader = fLoader->GetRunLoader(); else - RunLoader = 0x0; + runLoader = 0x0; if (strlen(option) == 0) { @@ -644,7 +636,7 @@ void AliMUONDisplay::DrawTitle(Option_t *option) title->Draw(); char ptitle[100]; sprintf(ptitle, "Alice event:%d Run:%d Chamber:%d Cathode:%d", - RunLoader->GetEventNumber(), + runLoader->GetEventNumber(), gAlice->GetHeader()->GetRun(), fChamber, fCathode); @@ -1187,21 +1179,21 @@ void AliMUONDisplay::SetView(Float_t theta, Float_t phi, Float_t psi) //_____________________________________________________________________________ void AliMUONDisplay::ShowNextEvent(Int_t delta) { - AliRunLoader * RunLoader; + AliRunLoader * runLoader; if (fLoader) - RunLoader = fLoader->GetRunLoader(); + runLoader = fLoader->GetRunLoader(); else - RunLoader = 0x0; + runLoader = 0x0; // Display (current event_number + delta) // delta = 1 shown next event // delta = -1 show previous event if (delta) { - //RunLoader->CleanDetectors(); - //RunLoader->CleanKinematics(); - Int_t currentEvent = RunLoader->GetEventNumber(); + //runLoader->CleanDetectors(); + //runLoader->CleanKinematics(); + Int_t currentEvent = runLoader->GetEventNumber(); Int_t newEvent = currentEvent + delta; - RunLoader->GetEvent(newEvent); + runLoader->GetEvent(newEvent); fEvent=newEvent; } LoadDigits(fChamber, fCathode); @@ -1257,10 +1249,15 @@ void AliMUONDisplay::ResetRpoints() } } -AliMUONDisplay & AliMUONDisplay::operator = (const AliMUONDisplay &) +AliMUONDisplay & AliMUONDisplay::operator = (const AliMUONDisplay & rhs) { -// Dummy assignment operator - return *this; +// Protected assignement operator + + if (this == &rhs) return *this; + + Fatal("operator=", "Not implemented."); + + return *this; } diff --git a/MUON/AliMUONDisplay.h b/MUON/AliMUONDisplay.h index 562f5c724be..963aa5f542d 100644 --- a/MUON/AliMUONDisplay.h +++ b/MUON/AliMUONDisplay.h @@ -5,6 +5,7 @@ * See cxx source for full Copyright notice */ /* $Id$ */ +// Revision of includes 07/05/2004 ////////////////////////////////////////////////////////////////////////// // // @@ -14,9 +15,6 @@ // // ////////////////////////////////////////////////////////////////////////// -//#ifndef ROOT_TObject -#include -//#endif #include "AliDisplay.h" class AliLoader; @@ -28,16 +26,16 @@ class TSlider; class TButton; class TArc; -class AliMUONDisplay : /*splaypublic TObject,*/ public AliDisplay { +class AliMUONDisplay : public AliDisplay +{ public: AliMUONDisplay(); AliMUONDisplay(Int_t size, AliLoader * loader=0x0); - AliMUONDisplay(const AliMUONDisplay& display); virtual ~AliMUONDisplay(); virtual void Clear(Option_t *option=""); virtual void DisplayButtons(); - virtual void CreateColors(); + virtual void CreateColors() const; virtual void DisplayColorScale(); virtual Int_t DistancetoPrimitive(Int_t px, Int_t py); virtual void Draw(Option_t *option=""); @@ -49,9 +47,9 @@ public: virtual void DrawView(Float_t theta, Float_t phi, Float_t psi=0); virtual void DrawP(Float_t,Float_t,Float_t,Float_t,Float_t,Int_t){} virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py); - Int_t GetZoomMode() {return fZoomMode;} - Int_t GetChamber() {return fChamber;} - Int_t GetCathode() {return fCathode;} + Int_t GetZoomMode() const {return fZoomMode;} + Int_t GetChamber() const {return fChamber;} + Int_t GetCathode() const {return fCathode;} AliMUONData* GetMUONData() {return fMUONData;} AliLoader* GetLoader() {return fLoader;} @@ -80,7 +78,10 @@ public: virtual void NextChamber(Int_t delta=1); virtual void NextCathode(); void Trigger(); - AliMUONDisplay& operator = (const AliMUONDisplay& rhs); + +protected: + AliMUONDisplay(const AliMUONDisplay& display); + AliMUONDisplay& operator = (const AliMUONDisplay& rhs); private: diff --git a/MUON/AliMUONEventReconstructor.cxx b/MUON/AliMUONEventReconstructor.cxx index 4a372f90060..5a41a46fe8f 100644 --- a/MUON/AliMUONEventReconstructor.cxx +++ b/MUON/AliMUONEventReconstructor.cxx @@ -32,17 +32,16 @@ // //////////////////////////////////// -#include // for cout -#include // for exit() - -#include +#include +#include +#include +#include //AZ -#include "AliMUON.h" -//#include "AliMUONChamber.h" #include "AliMUONEventReconstructor.h" +#include "AliMUON.h" +#include "AliMUONHit.h" #include "AliMUONHitForRec.h" #include "AliMUONTriggerTrack.h" -//#include "AliMUONTriggerConstants.h" #include "AliMUONTriggerCircuit.h" #include "AliMUONRawCluster.h" #include "AliMUONLocalTrigger.h" @@ -53,11 +52,9 @@ #include "AliMUONTrackHit.h" #include "AliMagF.h" #include "AliRun.h" // for gAlice -#include "AliConfig.h" #include "AliRunLoader.h" #include "AliLoader.h" #include "AliMUONTrackK.h" //AZ -#include //AZ #include "AliMC.h" //************* Defaults parameters for reconstruction @@ -86,6 +83,7 @@ ClassImp(AliMUONEventReconstructor) // Class implementation in ROOT context //__________________________________________________________________________ AliMUONEventReconstructor::AliMUONEventReconstructor(AliLoader* loader) + : TObject() { // Constructor for class AliMUONEventReconstructor SetReconstructionParametersToDefaults(); @@ -96,7 +94,7 @@ AliMUONEventReconstructor::AliMUONEventReconstructor(AliLoader* loader) fNHitsForRec = 0; // really needed or GetEntriesFast sufficient ???? // Memory allocation for the TClonesArray's of segments in stations // Is 2000 the right size ???? - for (Int_t st = 0; st < kMaxMuonTrackingStations; st++) { + for (Int_t st = 0; st < fgkMaxMuonTrackingStations; st++) { fSegmentsPtr[st] = new TClonesArray("AliMUONSegment", 2000); fNSegments[st] = 0; // really needed or GetEntriesFast sufficient ???? } @@ -155,15 +153,24 @@ AliMUONEventReconstructor::AliMUONEventReconstructor(AliLoader* loader) return; } //__________________________________________________________________________ -AliMUONEventReconstructor::AliMUONEventReconstructor (const AliMUONEventReconstructor& Reconstructor):TObject(Reconstructor) +AliMUONEventReconstructor::AliMUONEventReconstructor (const AliMUONEventReconstructor& rhs) + : TObject(rhs) { - // Dummy copy constructor +// Protected copy constructor + + Fatal("AliMUONEventReconstructor", "Not implemented."); } -AliMUONEventReconstructor & AliMUONEventReconstructor::operator=(const AliMUONEventReconstructor& /*Reconstructor*/) +AliMUONEventReconstructor & +AliMUONEventReconstructor::operator=(const AliMUONEventReconstructor& rhs) { - // Dummy assignment operator - return *this; +// Protected assignement operator + + if (this == &rhs) return *this; + + Fatal("operator=", "Not implemented."); + + return *this; } //__________________________________________________________________________ @@ -177,7 +184,7 @@ AliMUONEventReconstructor::~AliMUONEventReconstructor(void) // if (fEventTree) delete fEventTree; if (fRecoEvent) delete fRecoEvent; delete fHitsForRecPtr; // Correct destruction of everything ???? or delete [] ???? - for (Int_t st = 0; st < kMaxMuonTrackingStations; st++) + for (Int_t st = 0; st < fgkMaxMuonTrackingStations; st++) delete fSegmentsPtr[st]; // Correct destruction of everything ???? return; } @@ -213,7 +220,7 @@ void AliMUONEventReconstructor::SetReconstructionParametersToDefaults(void) // Maximum distance in non bending plane // 5 * 0.22 just to remember the way it was made in TRACKF_STAT // SIGCUT*DYMAX(IZ) - for (Int_t st = 0; st < kMaxMuonTrackingStations; st++) + for (Int_t st = 0; st < fgkMaxMuonTrackingStations; st++) fSegmentMaxDistNonBending[st] = 5. * 0.22; // Maximum distance in bending plane: // values from TRACKF_STAT, corresponding to (J psi 20cm), @@ -410,7 +417,7 @@ void AliMUONEventReconstructor::ResetSegments(void) { // To reset the TClonesArray of segments and the number of Segments // for all stations - for (Int_t st = 0; st < kMaxMuonTrackingStations; st++) { + for (Int_t st = 0; st < fgkMaxMuonTrackingStations; st++) { if (fSegmentsPtr[st]) fSegmentsPtr[st]->Clear(); fNSegments[st] = 0; } @@ -828,12 +835,12 @@ void AliMUONEventReconstructor::MakeSegments(void) ResetSegments(); // Loop over stations Int_t nb = (fTrackMethod == 2) ? 3 : 0; //AZ - //AZ for (Int_t st = 0; st < kMaxMuonTrackingStations; st++) - for (Int_t st = nb; st < kMaxMuonTrackingStations; st++) //AZ + //AZ for (Int_t st = 0; st < fgkMaxMuonTrackingStations; st++) + for (Int_t st = nb; st < fgkMaxMuonTrackingStations; st++) //AZ MakeSegmentsPerStation(st); if (fPrintLevel >= 10) { cout << "end of MakeSegments" << endl; - for (Int_t st = 0; st < kMaxMuonTrackingStations; st++) { + for (Int_t st = 0; st < fgkMaxMuonTrackingStations; st++) { cout << "station(0...): " << st << " Segments: " << fNSegments[st] << endl; @@ -1022,14 +1029,14 @@ Bool_t AliMUONEventReconstructor::MakeTriggerTracks(void) AliMUONTriggerCircuit *circuit; AliMUONTriggerTrack *recTriggerTrack = 0; - TTree* TR = fLoader->TreeR(); + TTree* treeR = fLoader->TreeR(); // Loading MUON subsystem AliMUON * pMUON = (AliMUON *) gAlice->GetDetector("MUON"); - nTRentries = Int_t(TR->GetEntries()); + nTRentries = Int_t(treeR->GetEntries()); - TR->GetEvent(0); // only one entry + treeR->GetEvent(0); // only one entry if (!(fMUONData->IsTriggerBranchesInTree())) { cout << "Warning in AliMUONEventReconstructor::MakeTriggerTracks" @@ -1733,7 +1740,7 @@ void AliMUONEventReconstructor::MakeTrackCandidatesK(void) void AliMUONEventReconstructor::FollowTracksK(void) { // Follow tracks using Kalman filter - Bool_t Ok; + Bool_t ok; Int_t icand, ichamBeg, ichamEnd, chamBits; Double_t zDipole1, zDipole2; AliMUONTrackK *trackK; @@ -1787,14 +1794,14 @@ void AliMUONEventReconstructor::FollowTracksK(void) // Discard candidate which will produce the double track if (icand > 0) { - Ok = CheckCandidateK(icand,nSeeds); - if (!Ok) { + ok = CheckCandidateK(icand,nSeeds); + if (!ok) { //trackK->SetRecover(-1); // mark candidate to be removed //continue; } } - Ok = kTRUE; + ok = kTRUE; if (trackK->GetRecover() == 0) hit = (AliMUONHitForRec*) trackK->GetHitOnTrack()->Last(); // last hit else hit = (AliMUONHitForRec*) (*trackK->GetHitOnTrack())[1]; // 2'nd hit @@ -1803,13 +1810,13 @@ void AliMUONEventReconstructor::FollowTracksK(void) // Check propagation direction if (trackK->GetTrackDir() > 0) { ichamEnd = 9; // forward propagation - Ok = trackK->KalmanFilter(ichamBeg,ichamEnd,kFALSE,zDipole1,zDipole2); - if (Ok) { + ok = trackK->KalmanFilter(ichamBeg,ichamEnd,kFALSE,zDipole1,zDipole2); + if (ok) { ichamBeg = ichamEnd; ichamEnd = 6; // backward propagation // Change weight matrix and zero fChi2 for backpropagation trackK->StartBack(); - Ok = trackK->KalmanFilter(ichamBeg,ichamEnd,kTRUE,zDipole1,zDipole2); + ok = trackK->KalmanFilter(ichamBeg,ichamEnd,kTRUE,zDipole1,zDipole2); ichamBeg = ichamEnd; ichamEnd = 0; } @@ -1819,18 +1826,18 @@ void AliMUONEventReconstructor::FollowTracksK(void) ichamEnd = 6; // backward propagation // Change weight matrix and zero fChi2 for backpropagation trackK->StartBack(); - Ok = trackK->KalmanFilter(ichamBeg,ichamEnd,kTRUE,zDipole1,zDipole2); + ok = trackK->KalmanFilter(ichamBeg,ichamEnd,kTRUE,zDipole1,zDipole2); ichamBeg = ichamEnd; ichamEnd = 0; } } - if (Ok) { + if (ok) { trackK->SetTrackDir(-1); trackK->SetBPFlag(kFALSE); - Ok = trackK->KalmanFilter(ichamBeg,ichamEnd,kFALSE,zDipole1,zDipole2); + ok = trackK->KalmanFilter(ichamBeg,ichamEnd,kFALSE,zDipole1,zDipole2); } - if (Ok) trackK->SetTrackQuality(0); // compute "track quality" + if (ok) trackK->SetTrackQuality(0); // compute "track quality" else trackK->SetRecover(-1); // mark candidate to be removed // Majority 3 of 4 in first 2 stations @@ -1855,7 +1862,7 @@ void AliMUONEventReconstructor::FollowTracksK(void) } //__________________________________________________________________________ -Bool_t AliMUONEventReconstructor::CheckCandidateK(Int_t icand, Int_t nSeeds) +Bool_t AliMUONEventReconstructor::CheckCandidateK(Int_t icand, Int_t nSeeds) const { // Discards track candidate if it will produce the double track (having // the same seed segment hits as hits of a good track found before) diff --git a/MUON/AliMUONEventReconstructor.h b/MUON/AliMUONEventReconstructor.h index 91b3f9bf2c7..4507f841d82 100644 --- a/MUON/AliMUONEventReconstructor.h +++ b/MUON/AliMUONEventReconstructor.h @@ -4,6 +4,7 @@ * See cxx source for full Copyright notice */ /*$Id$*/ +// Revision of includes 07/05/2004 //////////////////////////////////// // MUON event reconstructor in ALICE @@ -27,8 +28,6 @@ class AliMUONEventReconstructor : public TObject { public: AliMUONEventReconstructor(AliLoader* loader); // default Constructor virtual ~AliMUONEventReconstructor(void); // Destructor - AliMUONEventReconstructor (const AliMUONEventReconstructor& Reconstructor); // copy constructor - AliMUONEventReconstructor& operator=(const AliMUONEventReconstructor& Reconstructor); // assignment operator // Parameters for event reconstruction: public methods // Get and Set, Set to defaults @@ -98,12 +97,14 @@ class AliMUONEventReconstructor : public TObject { AliMUONData* GetMUONData() {return fMUONData;} protected: + AliMUONEventReconstructor (const AliMUONEventReconstructor& rhs); // copy constructor + AliMUONEventReconstructor& operator=(const AliMUONEventReconstructor& rhs); // assignment operator private: // Constants which should be elsewhere ???? static const Int_t fgkMaxMuonTrackingChambers = 10; // Max number of Muon tracking chambers - static const Int_t kMaxMuonTrackingStations = 5; // Max number of Muon tracking stations + static const Int_t fgkMaxMuonTrackingStations = 5; // Max number of Muon tracking stations // Defaults parameters for reconstruction static const Double_t fgkDefaultMinBendingMomentum; @@ -137,8 +138,8 @@ class AliMUONEventReconstructor : public TObject { Double_t fMaxSigma2Distance; // maximum square distance in units of the variance (maximum chi2) Double_t fRMin[fgkMaxMuonTrackingChambers]; // minimum radius (cm) Double_t fRMax[fgkMaxMuonTrackingChambers]; // maximum radius (cm) - Double_t fSegmentMaxDistBending[kMaxMuonTrackingStations]; // maximum distance (cm) for segments in bending plane - Double_t fSegmentMaxDistNonBending[kMaxMuonTrackingStations]; // maximum distance (cm) for segments in non bending plane + Double_t fSegmentMaxDistBending[fgkMaxMuonTrackingStations]; // maximum distance (cm) for segments in bending plane + Double_t fSegmentMaxDistNonBending[fgkMaxMuonTrackingStations]; // maximum distance (cm) for segments in non bending plane Double_t fBendingResolution; // chamber resolution (cm) in bending plane Double_t fNonBendingResolution; // chamber resolution (cm) in non bending plane Double_t fChamberThicknessInX0; // chamber thickness in number of radiation lengths @@ -167,8 +168,8 @@ class AliMUONEventReconstructor : public TObject { Int_t fIndexOfFirstHitForRecPerChamber[fgkMaxMuonTrackingChambers]; // index (0...) of first HitForRec // Segments inside a station - TClonesArray *fSegmentsPtr[kMaxMuonTrackingStations]; // array of pointers to the segments for each station - Int_t fNSegments[kMaxMuonTrackingStations]; // number of segments for each station + TClonesArray *fSegmentsPtr[fgkMaxMuonTrackingStations]; // array of pointers to the segments for each station + Int_t fNSegments[fgkMaxMuonTrackingStations]; // number of segments for each station // Reconstructed tracks TClonesArray *fRecTracksPtr; // pointer to array of reconstructed tracks @@ -226,7 +227,7 @@ class AliMUONEventReconstructor : public TObject { void FollowTracksK(void); void RemoveDoubleTracksK(void); void GoToVertex(void); - Bool_t CheckCandidateK(Int_t icand, Int_t nSeeds); + Bool_t CheckCandidateK(Int_t icand, Int_t nSeeds) const; ClassDef(AliMUONEventReconstructor, 0) // MUON event reconstructor in ALICE }; diff --git a/MUON/AliMUONFactory.cxx b/MUON/AliMUONFactory.cxx index ba79a686daa..c4d117fa293 100644 --- a/MUON/AliMUONFactory.cxx +++ b/MUON/AliMUONFactory.cxx @@ -24,14 +24,10 @@ #include "AliMUONChamber.h" #include "AliMUONResponseV0.h" #include "AliMUONResponseTrigger.h" -#include "AliMUONSegmentationV0.h" #include "AliMUONSegmentationV01.h" #include "AliMUONSegmentationV02.h" -#include "AliMUONSegmentationV04.h" -#include "AliMUONSegmentationV05.h" #include "AliMUONSegmentationSlat.h" #include "AliMUONSegmentationSlatN.h" -#include "AliMUONSegmentationTrigger.h" #include "AliMUONSegmentationTriggerX.h" #include "AliMUONSegmentationTriggerY.h" @@ -52,10 +48,11 @@ AliMUONFactory::AliMUONFactory(const AliMUONFactory& rhs) { // Protected copy constructor - Fatal("AliMUONFactoryModule", "Not implemented."); + Fatal("AliMUONFactory", "Not implemented."); } //__________________________________________________________________________ + AliMUONFactory::~AliMUONFactory() { // diff --git a/MUON/AliMUONFactory.h b/MUON/AliMUONFactory.h index 2fc81523de4..8f825ed8e74 100644 --- a/MUON/AliMUONFactory.h +++ b/MUON/AliMUONFactory.h @@ -4,12 +4,13 @@ * See cxx source for full Copyright notice */ /* $Id$ */ +// Revision of includes 07/05/2004 //////////////////////////////////////////////////////////// // Factory for muon chambers, segmentations and response // //////////////////////////////////////////////////////////// -#include "AliDetector.h" -// #include "AliMUONTriggerCircuit.h" // cp + +#include class AliMUON; class AliMUONResponseV0; diff --git a/MUON/AliMUONGeometryConstituent.cxx b/MUON/AliMUONGeometryConstituent.cxx index 9108d54ee70..821fd261f63 100644 --- a/MUON/AliMUONGeometryConstituent.cxx +++ b/MUON/AliMUONGeometryConstituent.cxx @@ -1,3 +1,18 @@ +/************************************************************************** + * 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$ // // Class AliMUONGeometryConstituent diff --git a/MUON/AliMUONGeometryConstituent.h b/MUON/AliMUONGeometryConstituent.h index 678cb8ba964..0c0b220a516 100644 --- a/MUON/AliMUONGeometryConstituent.h +++ b/MUON/AliMUONGeometryConstituent.h @@ -1,4 +1,8 @@ +/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * See cxx source for full Copyright notice */ + // $Id$ +// Revision of includes 07/05/2004 // // Class AliMUONGeometryConstituent // -------------------------------- @@ -29,18 +33,20 @@ class AliMUONGeometryConstituent : public TNamed const TGeoRotation& rotation, Int_t npar, Double_t* param); AliMUONGeometryConstituent(); - AliMUONGeometryConstituent(const AliMUONGeometryConstituent& rhs); virtual ~AliMUONGeometryConstituent(); - // operators - AliMUONGeometryConstituent& operator = (const AliMUONGeometryConstituent& rhs); - // get methods Int_t GetCopyNo() const; Int_t GetNpar() const; Double_t* GetParam() const; const TGeoCombiTrans* GetTransformation() const; + protected: + AliMUONGeometryConstituent(const AliMUONGeometryConstituent& rhs); + + // operators + AliMUONGeometryConstituent& operator = (const AliMUONGeometryConstituent& rhs); + private: Int_t fCopyNo; // copy number Int_t fNpar; // number of shape parameters diff --git a/MUON/AliMUONGeometryEnvelope.cxx b/MUON/AliMUONGeometryEnvelope.cxx index 65ee19be981..169b321f504 100644 --- a/MUON/AliMUONGeometryEnvelope.cxx +++ b/MUON/AliMUONGeometryEnvelope.cxx @@ -1,3 +1,18 @@ +/************************************************************************** + * 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$ // // Class AliMUONGeometryEnvelope diff --git a/MUON/AliMUONGeometryEnvelope.h b/MUON/AliMUONGeometryEnvelope.h index 9a2d843bd96..923f114115a 100644 --- a/MUON/AliMUONGeometryEnvelope.h +++ b/MUON/AliMUONGeometryEnvelope.h @@ -1,4 +1,8 @@ +/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * See cxx source for full Copyright notice */ + // $Id$ +// Revision of includes 07/05/2004 // // Class AliMUONGeometryEnvelope // ----------------------------- @@ -24,11 +28,7 @@ class AliMUONGeometryEnvelope : public TNamed AliMUONGeometryEnvelope(const TString& name, Int_t copyNo, const char* only); AliMUONGeometryEnvelope(); - AliMUONGeometryEnvelope(const AliMUONGeometryEnvelope& rhs); virtual ~AliMUONGeometryEnvelope(); - - // operators - AliMUONGeometryEnvelope& operator = (const AliMUONGeometryEnvelope& rhs); // methods void AddConstituent(const TString& name, Int_t copyNo); @@ -58,6 +58,12 @@ class AliMUONGeometryEnvelope : public TNamed const TGeoCombiTrans* GetTransformation() const; const TObjArray* GetConstituents() const; + protected: + AliMUONGeometryEnvelope(const AliMUONGeometryEnvelope& rhs); + + // operators + AliMUONGeometryEnvelope& operator = (const AliMUONGeometryEnvelope& rhs); + private: Bool_t fIsVirtual; // true if envelope is not represented // by a real volume diff --git a/MUON/AliMUONGlobalTrigger.cxx b/MUON/AliMUONGlobalTrigger.cxx index f7a307b480b..f11b4cb9cd4 100644 --- a/MUON/AliMUONGlobalTrigger.cxx +++ b/MUON/AliMUONGlobalTrigger.cxx @@ -13,15 +13,14 @@ * provided "as is" without express or implied warranty. * **************************************************************************/ -/* - -*/ +/* $Id$ */ #include "AliMUONGlobalTrigger.h" ClassImp(AliMUONGlobalTrigger); //---------------------------------------------------------------------- AliMUONGlobalTrigger::AliMUONGlobalTrigger() + : TObject() { // constructor fSinglePlusLpt = 0; @@ -45,56 +44,60 @@ AliMUONGlobalTrigger::AliMUONGlobalTrigger() fPairLikeApt = 0; } //---------------------------------------------------------------------- -AliMUONGlobalTrigger::AliMUONGlobalTrigger(const AliMUONGlobalTrigger& MUONGlobalTrig):TObject(MUONGlobalTrig) +AliMUONGlobalTrigger::AliMUONGlobalTrigger(const AliMUONGlobalTrigger& theMUONGlobalTrig) + : TObject(theMUONGlobalTrig) { // copy constructor - fSinglePlusLpt = MUONGlobalTrig.fSinglePlusLpt; - fSinglePlusHpt = MUONGlobalTrig.fSinglePlusHpt; - fSinglePlusApt = MUONGlobalTrig.fSinglePlusApt; + fSinglePlusLpt = theMUONGlobalTrig.fSinglePlusLpt; + fSinglePlusHpt = theMUONGlobalTrig.fSinglePlusHpt; + fSinglePlusApt = theMUONGlobalTrig.fSinglePlusApt; - fSingleMinusLpt = MUONGlobalTrig.fSingleMinusLpt; - fSingleMinusHpt = MUONGlobalTrig.fSingleMinusHpt; - fSingleMinusApt = MUONGlobalTrig.fSingleMinusApt; + fSingleMinusLpt = theMUONGlobalTrig.fSingleMinusLpt; + fSingleMinusHpt = theMUONGlobalTrig.fSingleMinusHpt; + fSingleMinusApt = theMUONGlobalTrig.fSingleMinusApt; - fSingleUndefLpt = MUONGlobalTrig.fSingleUndefLpt; - fSingleUndefHpt = MUONGlobalTrig.fSingleUndefHpt; - fSingleUndefApt = MUONGlobalTrig.fSingleUndefApt; + fSingleUndefLpt = theMUONGlobalTrig.fSingleUndefLpt; + fSingleUndefHpt = theMUONGlobalTrig.fSingleUndefHpt; + fSingleUndefApt = theMUONGlobalTrig.fSingleUndefApt; - fPairUnlikeLpt = MUONGlobalTrig.fPairUnlikeLpt; - fPairUnlikeHpt = MUONGlobalTrig.fPairUnlikeHpt; - fPairUnlikeApt = MUONGlobalTrig.fPairUnlikeApt; + fPairUnlikeLpt = theMUONGlobalTrig.fPairUnlikeLpt; + fPairUnlikeHpt = theMUONGlobalTrig.fPairUnlikeHpt; + fPairUnlikeApt = theMUONGlobalTrig.fPairUnlikeApt; - fPairLikeLpt = MUONGlobalTrig.fPairLikeLpt; - fPairLikeHpt = MUONGlobalTrig.fPairLikeHpt; - fPairLikeApt = MUONGlobalTrig.fPairLikeApt; + fPairLikeLpt = theMUONGlobalTrig.fPairLikeLpt; + fPairLikeHpt = theMUONGlobalTrig.fPairLikeHpt; + fPairLikeApt = theMUONGlobalTrig.fPairLikeApt; } //---------------------------------------------------------------------- -AliMUONGlobalTrigger& AliMUONGlobalTrigger::operator=(const AliMUONGlobalTrigger& MUONGlobalTrig) +AliMUONGlobalTrigger& AliMUONGlobalTrigger::operator=(const AliMUONGlobalTrigger& theMUONGlobalTrig) { // equal operator (useful for non-pointer member in TClonesArray) - if (this == &MUONGlobalTrig) + if (this == &theMUONGlobalTrig) return *this; + + // base class assignement + TObject::operator=(theMUONGlobalTrig); - fSinglePlusLpt = MUONGlobalTrig.fSinglePlusLpt; - fSinglePlusHpt = MUONGlobalTrig.fSinglePlusHpt; - fSinglePlusApt = MUONGlobalTrig.fSinglePlusApt; + fSinglePlusLpt = theMUONGlobalTrig.fSinglePlusLpt; + fSinglePlusHpt = theMUONGlobalTrig.fSinglePlusHpt; + fSinglePlusApt = theMUONGlobalTrig.fSinglePlusApt; - fSingleMinusLpt = MUONGlobalTrig.fSingleMinusLpt; - fSingleMinusHpt = MUONGlobalTrig.fSingleMinusHpt; - fSingleMinusApt = MUONGlobalTrig.fSingleMinusApt; + fSingleMinusLpt = theMUONGlobalTrig.fSingleMinusLpt; + fSingleMinusHpt = theMUONGlobalTrig.fSingleMinusHpt; + fSingleMinusApt = theMUONGlobalTrig.fSingleMinusApt; - fSingleUndefLpt = MUONGlobalTrig.fSingleUndefLpt; - fSingleUndefHpt = MUONGlobalTrig.fSingleUndefHpt; - fSingleUndefApt = MUONGlobalTrig.fSingleUndefApt; + fSingleUndefLpt = theMUONGlobalTrig.fSingleUndefLpt; + fSingleUndefHpt = theMUONGlobalTrig.fSingleUndefHpt; + fSingleUndefApt = theMUONGlobalTrig.fSingleUndefApt; - fPairUnlikeLpt = MUONGlobalTrig.fPairUnlikeLpt; - fPairUnlikeHpt = MUONGlobalTrig.fPairUnlikeHpt; - fPairUnlikeApt = MUONGlobalTrig.fPairUnlikeApt; + fPairUnlikeLpt = theMUONGlobalTrig.fPairUnlikeLpt; + fPairUnlikeHpt = theMUONGlobalTrig.fPairUnlikeHpt; + fPairUnlikeApt = theMUONGlobalTrig.fPairUnlikeApt; - fPairLikeLpt = MUONGlobalTrig.fPairLikeLpt; - fPairLikeHpt = MUONGlobalTrig.fPairLikeHpt; - fPairLikeApt = MUONGlobalTrig.fPairLikeApt; + fPairLikeLpt = theMUONGlobalTrig.fPairLikeLpt; + fPairLikeHpt = theMUONGlobalTrig.fPairLikeHpt; + fPairLikeApt = theMUONGlobalTrig.fPairLikeApt; return *this; } diff --git a/MUON/AliMUONGlobalTrigger.h b/MUON/AliMUONGlobalTrigger.h index 1d97174b2d9..e117a681c16 100644 --- a/MUON/AliMUONGlobalTrigger.h +++ b/MUON/AliMUONGlobalTrigger.h @@ -4,7 +4,8 @@ /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * See cxx source for full Copyright notice */ -/* */ +/* $Id$ */ +// Revision of includes 07/05/2004 #include diff --git a/MUON/AliMUONHit.cxx b/MUON/AliMUONHit.cxx index 9c7149b455e..b4182227457 100644 --- a/MUON/AliMUONHit.cxx +++ b/MUON/AliMUONHit.cxx @@ -24,11 +24,19 @@ // Incident fTheta and fPhi angle with respect of the wire plane of the chamber. // -#include "TMath.h" +#include + #include "AliMUONHit.h" ClassImp(AliMUONHit) +//___________________________________________ +AliMUONHit::AliMUONHit() + : AliHit() +{ +// Default constructor +} + //___________________________________________ AliMUONHit::AliMUONHit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits): AliHit(shunt, track) diff --git a/MUON/AliMUONHit.h b/MUON/AliMUONHit.h index 9784aa64b46..b70073c543d 100644 --- a/MUON/AliMUONHit.h +++ b/MUON/AliMUONHit.h @@ -4,6 +4,7 @@ * See cxx source for full Copyright notice */ /* $Id$ */ +// Revision of includes 07/05/2004 // MUON classe for MonteCarlo Hits, inherited from AliHit for the // In addition to the ALiHit data member fX, fY, fZ and fTrack, AliMUONHit contains some info about the particle crossing the chamber: @@ -21,7 +22,7 @@ class AliMUONHit : public AliHit { public: - AliMUONHit() {} + AliMUONHit(); AliMUONHit(Int_t fIshunt, Int_t track, Int_t *vol, Float_t *hits); AliMUONHit(Int_t fIshunt, Int_t track, Int_t iChamber, Int_t idpart, Float_t X, Float_t Y, Float_t Z, Float_t tof, Float_t momentum, Float_t theta, Float_t phi, Float_t length, Float_t destep); AliMUONHit(Int_t fIshunt, Int_t track, Int_t iChamber, Int_t idpart, diff --git a/MUON/AliMUONHitForRec.cxx b/MUON/AliMUONHitForRec.cxx index 5f98fad7a4a..1537a7d2463 100644 --- a/MUON/AliMUONHitForRec.cxx +++ b/MUON/AliMUONHitForRec.cxx @@ -21,25 +21,35 @@ //__________________________________________________________________________ #include "AliMUONHitForRec.h" -#include "AliMUONTrackParam.h" #include "AliMUONRawCluster.h" #include "AliMUONHit.h" ClassImp(AliMUONHitForRec) // Class implementation in ROOT context //__________________________________________________________________________ -AliMUONHitForRec::AliMUONHitForRec(AliMUONHit* Ghit) +AliMUONHitForRec::AliMUONHitForRec() + : TObject() +{ + // Default Constructor + + fFirstTrackHitPtr = 0; + fLastTrackHitPtr = 0; +} + + //__________________________________________________________________________ +AliMUONHitForRec::AliMUONHitForRec(AliMUONHit* theGhit) + : TObject() { // Constructor for AliMUONHitForRec from a GEANT hit. // Fills the bending, non bending, and Z coordinates, // which are taken from the coordinates of the GEANT hit, // the track number (GEANT and not TH), // and the chamber number (0...). - fBendingCoor = Ghit->Y(); - fNonBendingCoor = Ghit->X(); - fZ = Ghit->Z(); - // fTrack = Ghit->fTrack; ????????? - fChamberNumber = Ghit->Chamber() - 1; + fBendingCoor = theGhit->Y(); + fNonBendingCoor = theGhit->X(); + fZ = theGhit->Z(); + // fTrack = theGhit->fTrack; ????????? + fChamberNumber = theGhit->Chamber() - 1; // other fields will be updated in // AliMUONEventReconstructor::NewHitForRecFromGEANT, // except the following ones @@ -67,12 +77,13 @@ AliMUONHitForRec::AliMUONHitForRec(AliMUONHit* Ghit) // } //__________________________________________________________________________ -AliMUONHitForRec::AliMUONHitForRec(AliMUONRawCluster* RawCluster) +AliMUONHitForRec::AliMUONHitForRec(AliMUONRawCluster* theRawCluster) + : TObject() { // Constructor for AliMUONHitForRec from a raw cluster. // Fills the bending and non bending coordinates. - fNonBendingCoor = RawCluster->GetX(0); - fBendingCoor = RawCluster->GetY(0); + fNonBendingCoor = theRawCluster->GetX(0); + fBendingCoor = theRawCluster->GetY(0); // other fields will be updated in // AliMUONEventReconstructor::AddHitsForRecFromRawClusters, // except the following ones @@ -85,15 +96,25 @@ AliMUONHitForRec::AliMUONHitForRec(AliMUONRawCluster* RawCluster) return; } -AliMUONHitForRec::AliMUONHitForRec (const AliMUONHitForRec& MUONHitForRec):TObject(MUONHitForRec) + //__________________________________________________________________________ +AliMUONHitForRec::AliMUONHitForRec (const AliMUONHitForRec& rhs) + : TObject(rhs) { -// Dummy copy constructor +// Protected copy constructor + + Fatal("AliMUONHitForRec", "Not implemented."); } -AliMUONHitForRec & AliMUONHitForRec::operator=(const AliMUONHitForRec& /*MUONHitForRec*/) + //__________________________________________________________________________ +AliMUONHitForRec & AliMUONHitForRec::operator=(const AliMUONHitForRec& rhs) { -// Dummy assignment operator - return *this; +// Protected assignement operator + + if (this == &rhs) return *this; + + Fatal("operator=", "Not implemented."); + + return *this; } //__________________________________________________________________________ /*AZ @@ -119,10 +140,10 @@ Int_t AliMUONHitForRec::Compare(const TObject* Hit) const } //__________________________________________________________________________ -Double_t AliMUONHitForRec::NormalizedChi2WithHitForRec(AliMUONHitForRec* HitForRec, Double_t Sigma2Cut) +Double_t AliMUONHitForRec::NormalizedChi2WithHitForRec(AliMUONHitForRec* hitForRec, Double_t Sigma2Cut) const { - // Calculate the normalized Chi2 between the current HitForRec (this) - // and the HitForRec pointed to by "HitForRec", + // Calculate the normalized Chi2 between the current hitForRec (this) + // and the hitForRec pointed to by "hitForRec", // i.e. the square deviations between the coordinates, // in both the bending and the non bending plane, // divided by the variance of the same quantities and by "Sigma2Cut". @@ -134,15 +155,15 @@ Double_t AliMUONHitForRec::NormalizedChi2WithHitForRec(AliMUONHitForRec* HitForR chi2 = 0.0; chi2Max = 3.0; // coordinate in bending plane - diff = this->fBendingCoor - HitForRec->fBendingCoor; + diff = fBendingCoor - hitForRec->fBendingCoor; normDiff = diff * diff / - (this->fBendingReso2 + HitForRec->fBendingReso2) / Sigma2Cut; + (fBendingReso2 + hitForRec->fBendingReso2) / Sigma2Cut; if (normDiff > 1.0) return chi2Max; chi2 = chi2 + normDiff; // coordinate in non bending plane - diff = this->fNonBendingCoor - HitForRec->fNonBendingCoor; + diff = fNonBendingCoor - hitForRec->fNonBendingCoor; normDiff = diff * diff / - (this->fNonBendingReso2 + HitForRec->fNonBendingReso2) / Sigma2Cut; + (fNonBendingReso2 + hitForRec->fNonBendingReso2) / Sigma2Cut; if (normDiff > 1.0) return chi2Max; chi2 = chi2 + normDiff; return chi2; diff --git a/MUON/AliMUONHitForRec.h b/MUON/AliMUONHitForRec.h index e7cdd4239b5..73759cac7b7 100644 --- a/MUON/AliMUONHitForRec.h +++ b/MUON/AliMUONHitForRec.h @@ -4,8 +4,9 @@ * See cxx source for full Copyright notice */ /*$Id$*/ +// Revision of includes 07/05/2004 -#include +#include class AliMUONHit; class AliMUONRawCluster; @@ -14,57 +15,53 @@ class AliMUONTrackParam; class AliMUONHitForRec : public TObject { public: - AliMUONHitForRec(){ - // Constructor - fFirstTrackHitPtr = 0; - fLastTrackHitPtr = 0; - } // Constructor - virtual ~AliMUONHitForRec(){ - // Destructor - ;} // Destructor - AliMUONHitForRec (const AliMUONHitForRec& AliMUONHitForRec); // copy constructor - AliMUONHitForRec& operator=(const AliMUONHitForRec& AliMUONHitForRec); // assignment operator + AliMUONHitForRec(); // Constructor + virtual ~AliMUONHitForRec(){} // Destructor AliMUONHitForRec(AliMUONHit* mHit); // Constructor from GEANT hit - AliMUONHitForRec(AliMUONRawCluster* RawCluster); // Constructor from raw cluster + AliMUONHitForRec(AliMUONRawCluster* theRawCluster); // Constructor from raw cluster // Inline functions for Get and Set - Double_t GetBendingCoor(void) { return fBendingCoor;} + Double_t GetBendingCoor(void) const { return fBendingCoor;} void SetBendingCoor(Double_t BendingCoor) { fBendingCoor = BendingCoor;} - Double_t GetNonBendingCoor(void) { return fNonBendingCoor;} + Double_t GetNonBendingCoor(void) const { return fNonBendingCoor;} void SetNonBendingCoor(Double_t NonBendingCoor) { fNonBendingCoor = NonBendingCoor;} - Double_t GetZ(void) { return fZ;} + Double_t GetZ(void) const { return fZ;} void SetZ(Double_t Z) { fZ = Z;} - Double_t GetBendingReso2(void) { return fBendingReso2;} + Double_t GetBendingReso2(void) const { return fBendingReso2;} void SetBendingReso2(Double_t BendingReso2) { fBendingReso2 = BendingReso2;} - Double_t GetNonBendingReso2(void) { return fNonBendingReso2;} + Double_t GetNonBendingReso2(void) const { return fNonBendingReso2;} void SetNonBendingReso2(Double_t NonBendingReso2) { fNonBendingReso2 = NonBendingReso2;} - Int_t GetChamberNumber(void) { return fChamberNumber;} + Int_t GetChamberNumber(void) const { return fChamberNumber;} void SetChamberNumber(Int_t ChamberNumber) { fChamberNumber = ChamberNumber;} - Int_t GetHitNumber(void) { return fHitNumber;} + Int_t GetHitNumber(void) const { return fHitNumber;} void SetHitNumber(Int_t HitNumber) { fHitNumber = HitNumber;} - Int_t GetTHTrack(void) { return fTHTrack;} + Int_t GetTHTrack(void) const { return fTHTrack;} void SetTHTrack(Int_t THTrack) { fTHTrack = THTrack;} - Int_t GetGeantSignal(void) { return fGeantSignal;} + Int_t GetGeantSignal(void) const { return fGeantSignal;} void SetGeantSignal(Int_t GeantSignal) { fGeantSignal = GeantSignal;} - Int_t GetIndexOfFirstSegment(void) { return fIndexOfFirstSegment;} + Int_t GetIndexOfFirstSegment(void) const { return fIndexOfFirstSegment;} void SetIndexOfFirstSegment(Int_t IndexOfFirstSegment) { fIndexOfFirstSegment = IndexOfFirstSegment;} - Int_t GetNSegments(void) { return fNSegments;} + Int_t GetNSegments(void) const { return fNSegments;} void SetNSegments(Int_t NSegments) { fNSegments = NSegments;} - AliMUONTrackHit* GetFirstTrackHitPtr(void) { return fFirstTrackHitPtr;} + AliMUONTrackHit* GetFirstTrackHitPtr(void) const { return fFirstTrackHitPtr;} void SetFirstTrackHitPtr(AliMUONTrackHit* FirstTrackHitPtr) { fFirstTrackHitPtr = FirstTrackHitPtr;} - AliMUONTrackHit* GetLastTrackHitPtr(void) { return fLastTrackHitPtr;} + AliMUONTrackHit* GetLastTrackHitPtr(void) const { return fLastTrackHitPtr;} void SetLastTrackHitPtr(AliMUONTrackHit* LastTrackHitPtr) { fLastTrackHitPtr = LastTrackHitPtr;} - Int_t GetNTrackHits(void) { return fNTrackHits;} + Int_t GetNTrackHits(void) const { return fNTrackHits;} void SetNTrackHits(Int_t NTrackHits) { fNTrackHits = NTrackHits;} - Double_t NormalizedChi2WithHitForRec(AliMUONHitForRec* Hit, Double_t Sigma2Cut); + Double_t NormalizedChi2WithHitForRec(AliMUONHitForRec* Hit, Double_t Sigma2Cut) const; /* void UpdateFromChamberTrackParam(AliMUONTrackParam *TrackParam, Double_t MCSfactor); */ // What is necessary for sorting TClonesArray's; sufficient too ???? Bool_t IsSortable() const { return kTRUE; } Int_t Compare(const TObject* HitForRec) const; // "Compare" function for sorting + protected: + AliMUONHitForRec (const AliMUONHitForRec& AliMUONHitForRec); // copy constructor + AliMUONHitForRec& operator=(const AliMUONHitForRec& AliMUONHitForRec); // assignment operator + private: Double_t fBendingCoor; // coordinate (cm) in bending plane Double_t fNonBendingCoor; // coordinate (cm) in non bending plane diff --git a/MUON/AliMUONHitMapA1.cxx b/MUON/AliMUONHitMapA1.cxx index 9573067de43..1e8ad685a4d 100644 --- a/MUON/AliMUONHitMapA1.cxx +++ b/MUON/AliMUONHitMapA1.cxx @@ -15,17 +15,17 @@ /* $Id$ */ +#include +#include + #include "AliMUONHitMapA1.h" #include "AliSegmentation.h" -#include "AliMUONResponse.h" #include "AliMUONDigit.h" -#include -#include - ClassImp(AliMUONHitMapA1) - AliMUONHitMapA1::AliMUONHitMapA1() +AliMUONHitMapA1::AliMUONHitMapA1() + : AliHitMap() { // Default constructor fNpx = 0; @@ -37,6 +37,7 @@ ClassImp(AliMUONHitMapA1) } AliMUONHitMapA1::AliMUONHitMapA1(AliSegmentation *seg, TObjArray *dig) + : AliHitMap() { // Constructor fNpx = seg->Npx()+1; @@ -48,10 +49,12 @@ AliMUONHitMapA1::AliMUONHitMapA1(AliSegmentation *seg, TObjArray *dig) Clear(); } -AliMUONHitMapA1::AliMUONHitMapA1(const AliMUONHitMapA1 & hitMap):AliHitMap(hitMap) +AliMUONHitMapA1::AliMUONHitMapA1(const AliMUONHitMapA1 & hitMap) + : AliHitMap(hitMap) { -// Dummy copy constructor - ; +// Protected copy constructor + + Fatal("AliMUONHitMapA1", "Not implemented."); } @@ -155,10 +158,15 @@ FlagType AliMUONHitMapA1::TestHit(Int_t ix, Int_t iy) } } -AliMUONHitMapA1 & AliMUONHitMapA1::operator = (const AliMUONHitMapA1 & /*rhs*/) +AliMUONHitMapA1 & AliMUONHitMapA1::operator = (const AliMUONHitMapA1 & rhs) { -// Dummy assignment operator - return *this; +// Protected assignement operator + + if (this == &rhs) return *this; + + Fatal("operator=", "Not implemented."); + + return *this; } diff --git a/MUON/AliMUONHitMapA1.h b/MUON/AliMUONHitMapA1.h index 7d108c03128..ba55a88c8d0 100644 --- a/MUON/AliMUONHitMapA1.h +++ b/MUON/AliMUONHitMapA1.h @@ -5,22 +5,21 @@ * See cxx source for full Copyright notice */ /* $Id$ */ +// Revision of includes 07/05/2004 #include "AliHitMap.h" -class AliSegmentation; -class TObjArray; +class TObjArray; +class AliSegmentation; -class AliMUONHitMapA1 : -public AliHitMap +class AliMUONHitMapA1 : public AliHitMap { public: AliMUONHitMapA1(); AliMUONHitMapA1(AliSegmentation *seg, TObjArray *dig); - AliMUONHitMapA1(const AliMUONHitMapA1 & hitMap); - virtual ~AliMUONHitMapA1(); + // Fill hits from list of digits into hit map virtual void FillHits(); // Clear the hit map @@ -39,6 +38,9 @@ public AliHitMap virtual Bool_t ValidateHit(Int_t ix, Int_t iy); // Test hit status virtual FlagType TestHit(Int_t ix, Int_t iy); + + protected: + AliMUONHitMapA1(const AliMUONHitMapA1 & hitMap); // Assignment operator AliMUONHitMapA1& operator = (const AliMUONHitMapA1& rhs); diff --git a/MUON/AliMUONLoader.h b/MUON/AliMUONLoader.h index bbea2603169..c3f00bec8a4 100644 --- a/MUON/AliMUONLoader.h +++ b/MUON/AliMUONLoader.h @@ -17,6 +17,7 @@ **************************************************************************/ /* $Id$ */ +// Revision of includes 07/05/2004 #include "AliLoader.h" diff --git a/MUON/AliMUONLocalTrigger.cxx b/MUON/AliMUONLocalTrigger.cxx index c041e367a98..5a3449b0441 100644 --- a/MUON/AliMUONLocalTrigger.cxx +++ b/MUON/AliMUONLocalTrigger.cxx @@ -13,15 +13,14 @@ * provided "as is" without express or implied warranty. * **************************************************************************/ -/* - -*/ +/* $Id$ */ #include "AliMUONLocalTrigger.h" ClassImp(AliMUONLocalTrigger); //---------------------------------------------------------------------- AliMUONLocalTrigger::AliMUONLocalTrigger() + : TObject() { // constructor fLoCircuit = 0; @@ -33,31 +32,35 @@ AliMUONLocalTrigger::AliMUONLocalTrigger() fLoApt = 0; } //---------------------------------------------------------------------- -AliMUONLocalTrigger::AliMUONLocalTrigger(const AliMUONLocalTrigger& MUONLocalTrig):TObject(MUONLocalTrig) +AliMUONLocalTrigger::AliMUONLocalTrigger(const AliMUONLocalTrigger& theMUONLocalTrig) + : TObject(theMUONLocalTrig) { // copy constructor (useful for TClonesArray) - fLoCircuit = MUONLocalTrig.fLoCircuit; - fLoStripX = MUONLocalTrig.fLoStripX; - fLoDev = MUONLocalTrig.fLoDev; - fLoStripY = MUONLocalTrig.fLoStripY; - fLoLpt = MUONLocalTrig.fLoLpt; - fLoHpt = MUONLocalTrig.fLoHpt; - fLoApt = MUONLocalTrig.fLoApt; + fLoCircuit = theMUONLocalTrig.fLoCircuit; + fLoStripX = theMUONLocalTrig.fLoStripX; + fLoDev = theMUONLocalTrig.fLoDev; + fLoStripY = theMUONLocalTrig.fLoStripY; + fLoLpt = theMUONLocalTrig.fLoLpt; + fLoHpt = theMUONLocalTrig.fLoHpt; + fLoApt = theMUONLocalTrig.fLoApt; } //---------------------------------------------------------------------- -AliMUONLocalTrigger& AliMUONLocalTrigger::operator=(const AliMUONLocalTrigger& MUONLocalTrig) +AliMUONLocalTrigger& AliMUONLocalTrigger::operator=(const AliMUONLocalTrigger& theMUONLocalTrig) { // equal operator (useful for non-pointer member in TClonesArray) - if (this == &MUONLocalTrig) + if (this == &theMUONLocalTrig) return *this; - fLoCircuit = MUONLocalTrig.fLoCircuit; - fLoStripX = MUONLocalTrig.fLoStripX; - fLoDev = MUONLocalTrig.fLoDev; - fLoStripY = MUONLocalTrig.fLoStripY; - fLoLpt = MUONLocalTrig.fLoLpt; - fLoHpt = MUONLocalTrig.fLoHpt; - fLoApt = MUONLocalTrig.fLoApt; + // base class assignement + TObject::operator=(theMUONLocalTrig); + + fLoCircuit = theMUONLocalTrig.fLoCircuit; + fLoStripX = theMUONLocalTrig.fLoStripX; + fLoDev = theMUONLocalTrig.fLoDev; + fLoStripY = theMUONLocalTrig.fLoStripY; + fLoLpt = theMUONLocalTrig.fLoLpt; + fLoHpt = theMUONLocalTrig.fLoHpt; + fLoApt = theMUONLocalTrig.fLoApt; return *this; } diff --git a/MUON/AliMUONLocalTrigger.h b/MUON/AliMUONLocalTrigger.h index 842eeceb0bc..7c16ff3f6b3 100644 --- a/MUON/AliMUONLocalTrigger.h +++ b/MUON/AliMUONLocalTrigger.h @@ -4,7 +4,8 @@ /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * See cxx source for full Copyright notice */ -/* */ +/* $Id$ */ +// Revision of includes 07/05/2004 #include diff --git a/MUON/AliMUONMerger.cxx b/MUON/AliMUONMerger.cxx index 01601f60073..1993a03148d 100644 --- a/MUON/AliMUONMerger.cxx +++ b/MUON/AliMUONMerger.cxx @@ -15,24 +15,22 @@ /* $Id$ */ -#include -#include #include #include -#include -#include +#include +//#include +//#include -#include "AliHitMap.h" -#include "AliMUON.h" -#include "AliMUONChamber.h" -#include "AliMUONConstants.h" -#include "AliMUONDigit.h" -#include "AliMUONHit.h" -#include "AliMUONHitMapA1.h" #include "AliMUONMerger.h" +#include "AliMUON.h" #include "AliMUONPadHit.h" #include "AliMUONTransientDigit.h" -#include "AliRun.h" +#include "AliHitMap.h" +//#include "AliMUONChamber.h" +//#include "AliMUONConstants.h" +//#include "AliMUONHit.h" +//#include "AliMUONHitMapA1.h" +//#include "AliRun.h" ClassImp(AliMUONMerger) @@ -428,7 +426,7 @@ void AliMUONMerger::Digitise() -void AliMUONMerger::SortTracks(Int_t *tracks,Int_t *charges,Int_t ntr) +void AliMUONMerger::SortTracks(Int_t *tracks,Int_t *charges,Int_t ntr) const { // // Sort the list of tracks contributing to a given digit diff --git a/MUON/AliMUONMerger.h b/MUON/AliMUONMerger.h index e15551d7939..4594bbb1b7b 100644 --- a/MUON/AliMUONMerger.h +++ b/MUON/AliMUONMerger.h @@ -4,9 +4,9 @@ * See cxx source for full Copyright notice */ /* $Id$ */ +// Revision of includes 07/05/2004 -// #include "AliMerger.h" -// #include "AliMergable.h" +class TTree; class AliMUONPadHit; class AliHitMap; @@ -48,7 +48,7 @@ class AliMUONMerger { private: // Open the bgr file TFile *InitBgr(); - void SortTracks(Int_t *tracks,Int_t *charges,Int_t ntr); + void SortTracks(Int_t *tracks,Int_t *charges,Int_t ntr) const; private: TTree *fTrH1; //! Hits Tree for background event diff --git a/MUON/AliMUONPadHit.cxx b/MUON/AliMUONPadHit.cxx index 0b4b3ac4c5b..8d9c1343fbe 100644 --- a/MUON/AliMUONPadHit.cxx +++ b/MUON/AliMUONPadHit.cxx @@ -19,8 +19,23 @@ ClassImp(AliMUONPadHit) +//___________________________________________ +AliMUONPadHit::AliMUONPadHit() + : TObject(), + fHitNumber(0), + fCathode(0), + fQ(0), + fPadX(0), + fPadY(0), + fQpad(0), + fRSec(0) +{ +// Default constructor +} + //___________________________________________ AliMUONPadHit::AliMUONPadHit(Int_t *clhits) + : TObject() { // Constructor fHitNumber=clhits[0]; diff --git a/MUON/AliMUONPadHit.h b/MUON/AliMUONPadHit.h index 202d027f0f5..360474ae4d5 100644 --- a/MUON/AliMUONPadHit.h +++ b/MUON/AliMUONPadHit.h @@ -4,18 +4,17 @@ * See cxx source for full Copyright notice */ /* $Id$ */ +// Revision of includes 07/05/2004 #include - class AliMUONPadHit : public TObject { public: - AliMUONPadHit() { - fHitNumber=fQ=fPadX=fPadY=fQpad=fRSec=0; -} + AliMUONPadHit(); AliMUONPadHit(Int_t *clhits); virtual ~AliMUONPadHit() {;} + Int_t HitNumber() const {return fHitNumber;} Int_t Cathode() const {return fCathode;} Int_t Q() const {return fQ;} diff --git a/MUON/AliMUONPixel.cxx b/MUON/AliMUONPixel.cxx index 69fb91a08ff..79bd6b40a39 100644 --- a/MUON/AliMUONPixel.cxx +++ b/MUON/AliMUONPixel.cxx @@ -13,12 +13,22 @@ * provided "as is" without express or implied warranty. * **************************************************************************/ +/* $Id$ */ + #include "AliMUONPixel.h" ClassImp(AliMUONPixel) // Class implementation in ROOT context +//_____________________________________________________________________________ +AliMUONPixel::AliMUONPixel() + : TObject() +{ +// Default constructor +} + //_____________________________________________________________________________ AliMUONPixel::AliMUONPixel(Double_t xc, Double_t yc, Double_t wx, Double_t wy, Double_t charge) + : TObject() { // Constructor fXY[0] = xc; fXY[1] = yc; fSize[0] = wx; fSize[1] = wy; fCharge = charge; diff --git a/MUON/AliMUONPixel.h b/MUON/AliMUONPixel.h index ef4dddd04ed..c3c5f0a6878 100644 --- a/MUON/AliMUONPixel.h +++ b/MUON/AliMUONPixel.h @@ -3,15 +3,16 @@ /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * See cxx source for full Copyright notice */ -#include -class TObjArray; +/* $Id$ */ +// Revision of includes 07/05/2004 + +#include class AliMUONPixel : public TObject { public: - AliMUONPixel(){ - ;} // Default constructor + AliMUONPixel(); AliMUONPixel(Double_t xc, Double_t yc, Double_t wx, Double_t wy, Double_t charge); // constructor virtual ~AliMUONPixel(); // Destructor diff --git a/MUON/AliMUONPoints.cxx b/MUON/AliMUONPoints.cxx index 157bc3a3ebc..e13c891a74a 100644 --- a/MUON/AliMUONPoints.cxx +++ b/MUON/AliMUONPoints.cxx @@ -28,34 +28,25 @@ // // /////////////////////////////////////////////////////////////////////////////// -#include "AliMUONPoints.h" -#include "AliMUONDisplay.h" -#include "AliRun.h" -#include "AliMUON.h" -#include "AliMUONChamber.h" -#include "AliMUONResponse.h" -#include "AliMUONHit.h" -#include "AliMUONPadHit.h" -#include "AliMUONDigit.h" -#include "AliMUONRawCluster.h" - - #include -#include #include #include -#include #include -#include #include -#include -#include #include +#include "AliMUONPoints.h" +#include "AliMUONDisplay.h" +#include "AliRun.h" +#include "AliMUON.h" +#include "AliMUONHit.h" +#include "AliMUONDigit.h" + ClassImp(AliMUONPoints) //_____________________________________________________________________________ AliMUONPoints::AliMUONPoints() + : AliPoints() { // // Default constructor @@ -81,9 +72,13 @@ AliMUONPoints::AliMUONPoints(Int_t npoints) fMatrix = 0; } -AliMUONPoints::AliMUONPoints(const AliMUONPoints& points):AliPoints(points) +//_____________________________________________________________________________ +AliMUONPoints::AliMUONPoints(const AliMUONPoints& points) + : AliPoints(points) { -// Copy constructor +// Protected copy constructor + + Fatal("AliMUONPoints", "Not implemented."); } //_____________________________________________________________________________ @@ -102,7 +97,7 @@ AliMUONPoints::~AliMUONPoints() } //_____________________________________________________________________________ -void AliMUONPoints::DumpHit() +void AliMUONPoints::DumpHit() const { // // Dump hit corresponding to this point @@ -112,7 +107,7 @@ void AliMUONPoints::DumpHit() } //_____________________________________________________________________________ -void AliMUONPoints::DumpDigit() +void AliMUONPoints::DumpDigit() const { // // Dump digit corresponding to this point @@ -191,13 +186,13 @@ void AliMUONPoints::InspectDigit() } //_____________________________________________________________________________ -Int_t AliMUONPoints::GetTrackIndex() +Int_t AliMUONPoints::GetTrackIndex() const { // // Dump digit corresponding to this point // - this->Inspect(); + Inspect(); /* if (fDigitIndex != 0) { Int_t ncol=this->fMatrix->GetNcols(); @@ -246,7 +241,13 @@ AliMUONDigit *AliMUONPoints::GetDigit() const } //_____________________________________________________________________________ -AliMUONPoints& AliMUONPoints::operator= (const AliMUONPoints& /*rhs*/) +AliMUONPoints& AliMUONPoints::operator= (const AliMUONPoints& rhs) { - return *this; +// Protected assignement operator + + if (this == &rhs) return *this; + + Fatal("operator=", "Not implemented."); + + return *this; } diff --git a/MUON/AliMUONPoints.h b/MUON/AliMUONPoints.h index 5862d7d5bac..a320b57ec67 100644 --- a/MUON/AliMUONPoints.h +++ b/MUON/AliMUONPoints.h @@ -5,40 +5,43 @@ * See cxx source for full Copyright notice */ /* $Id$ */ +// Revision of includes 07/05/2004 -class AliMUONDigit; -class AliMUONHit; +#include "AliPoints.h" class TMatrix; class TMarker3DBox; -#include "AliPoints.h" +class AliMUONDigit; +class AliMUONHit; -class AliMUONPoints : public AliPoints { - public: +class AliMUONPoints : public AliPoints +{ +public: AliMUONPoints(); AliMUONPoints(Int_t npoints); - AliMUONPoints(const AliMUONPoints& points); virtual ~AliMUONPoints(); - Int_t GetHitIndex() {return fHitIndex;} - Int_t GetTrackIndex(); // *MENU* - Int_t GetDigitIndex() {return fDigitIndex;} - TMarker3DBox *GetMarker(Int_t i) {return fMarker[i];} + Int_t GetHitIndex() const {return fHitIndex;} + Int_t GetTrackIndex() const; // *MENU* + Int_t GetDigitIndex() const {return fDigitIndex;} + TMarker3DBox *GetMarker(Int_t i) const {return fMarker[i];} AliMUONHit *GetHit() const; AliMUONDigit *GetDigit() const; virtual void InspectHit(); // *MENU* - virtual void DumpHit(); // *MENU* + virtual void DumpHit() const; // *MENU* virtual void InspectDigit(); // *MENU* - virtual void DumpDigit(); // *MENU* + virtual void DumpDigit() const; // *MENU* virtual void SetHitIndex(Int_t hitindex) {fHitIndex = hitindex;} virtual void SetTrackIndex(Int_t trackindex) {fTrackIndex = trackindex;} virtual void SetDigitIndex(Int_t digitindex) {fDigitIndex = digitindex;} virtual void Set3DMarker(Int_t i,TMarker3DBox *marker) {fMarker[i] = marker;} virtual void SetMatrix(TMatrix *matrix) {fMatrix = matrix;} - AliMUONPoints& operator = (const AliMUONPoints& rhs); protected: + AliMUONPoints(const AliMUONPoints& points); + AliMUONPoints& operator = (const AliMUONPoints& rhs); + Int_t fHitIndex; // Link to hit number Int_t fTrackIndex; // Link to track number Int_t fDigitIndex; // Link to digit diff --git a/MUON/AliMUONRawCluster.cxx b/MUON/AliMUONRawCluster.cxx index 558c9c347c1..612f7e4ffa3 100644 --- a/MUON/AliMUONRawCluster.cxx +++ b/MUON/AliMUONRawCluster.cxx @@ -21,13 +21,16 @@ // // -#include "AliMUONRawCluster.h" #include +#include "AliMUONRawCluster.h" + ClassImp(AliMUONRawCluster); -AliMUONRawCluster::AliMUONRawCluster() { +AliMUONRawCluster::AliMUONRawCluster() + : TObject() +{ // Constructor fTracks[0]=fTracks[1]=fTracks[2]=-1; for (int j=0;j<2;j++) { diff --git a/MUON/AliMUONRawCluster.h b/MUON/AliMUONRawCluster.h index f7ff918be29..84b71a0470c 100644 --- a/MUON/AliMUONRawCluster.h +++ b/MUON/AliMUONRawCluster.h @@ -5,17 +5,18 @@ * See cxx source for full Copyright notice */ /* $Id$ */ +// Revision of includes 07/05/2004 // Class for the MUON RecPoint // It contains the propeorties of the physics cluters found in the tracking chambers // RawCluster contains also the information from the both cathode of the chambers. -class TArrayF; - #include #include // because of inline funtion GetRadius +class TArrayF; + class AliMUONRawCluster : public TObject { public: diff --git a/MUON/AliMUONRecoDisplay.cxx b/MUON/AliMUONRecoDisplay.cxx index b0f2bd84c69..41a4ff94436 100644 --- a/MUON/AliMUONRecoDisplay.cxx +++ b/MUON/AliMUONRecoDisplay.cxx @@ -44,31 +44,40 @@ // // ////////////////////////////////////////////////////////////////////// -#include - #include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include -#include #include #include #include +#include -#include -#include -#include -#include +#include "AliRun.h" +#include "AliDetector.h" +#include "AliConfig.h" +#include "AliHeader.h" +#include "AliPoints.h" +#include "AliMC.h" #include "AliMUONRecoDisplay.h" #include "AliMUONRecoEvent.h" #include "AliMUONRecoTrack.h" -#include "AliMC.h" +#include "AliMUONHit.h" ClassImp(AliMUONRecoDisplay) //------------------------------------------------------------------- AliMUONRecoDisplay::AliMUONRecoDisplay(Int_t nevent) - :AliDisplay(750) + : AliDisplay(750) { //************ Constructor of the reco. event display********** // get reconstructed event from file @@ -467,7 +476,7 @@ void AliMUONRecoDisplay::ShowNextEvent(Int_t delta) if (gROOT->GetListOfCanvases()->FindObject("xy")) XYPlot(); } //------------------------------------------------------------------- -Bool_t AliMUONRecoDisplay::IsReconstructible(Int_t track) +Bool_t AliMUONRecoDisplay::IsReconstructible(Int_t track) const { // true if at least three hits in first 2 stations, 3 in last 2 stations // and one in station 3 @@ -816,5 +825,3 @@ void AliMUONRecoDisplay::PolyLineInfo(TClonesArray *line3Dlist) } } } - - diff --git a/MUON/AliMUONRecoDisplay.h b/MUON/AliMUONRecoDisplay.h index f4904135d0a..daac8846603 100644 --- a/MUON/AliMUONRecoDisplay.h +++ b/MUON/AliMUONRecoDisplay.h @@ -4,26 +4,19 @@ * See cxx source for full Copyright notice */ /*$Id$*/ +// Revision of includes 07/05/2004 // Authors : M.Gheata, A.Gheata 09/10/00 -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "AliMUONHit.h" +#include "AliDisplay.h" + +class TTree; +class TFile; +class TClonesArray; class AliMUONRecoEvent; -class AliMUONRecoDisplay:public AliDisplay +class AliMUONRecoDisplay : public AliDisplay { public: AliMUONRecoDisplay(Int_t nevent=0); @@ -50,7 +43,7 @@ class AliMUONRecoDisplay:public AliDisplay Int_t GetBestMatch(Int_t indr, Float_t tolerance=3.0); TClonesArray* MakePolyLines3D(TClonesArray *tracklist); void MapEvent(Int_t nevent); - Bool_t IsReconstructible(Int_t track); + Bool_t IsReconstructible(Int_t track) const; //data members Int_t fEvent; // current event number AliMUONRecoEvent *fEvGen; // Geant event diff --git a/MUON/AliMUONRecoEvent.cxx b/MUON/AliMUONRecoEvent.cxx index 5a9125df65d..eebef1ac97e 100644 --- a/MUON/AliMUONRecoEvent.cxx +++ b/MUON/AliMUONRecoEvent.cxx @@ -41,13 +41,8 @@ //////////////////////////////////////////////////////////////////// #include -#include #include -#include - -#include #include -#include #include "AliMUONRecoEvent.h" #include "AliMUONRecoTrack.h" @@ -57,6 +52,7 @@ #include "AliMUONTrackParam.h" #include "AliMUONHitForRec.h" #include "AliMUONTrackHit.h" +#include "AliRun.h" #include "AliHeader.h" ClassImp(AliMUONRecoEvent) diff --git a/MUON/AliMUONRecoEvent.h b/MUON/AliMUONRecoEvent.h index cdfba1a08f9..92d17699e90 100644 --- a/MUON/AliMUONRecoEvent.h +++ b/MUON/AliMUONRecoEvent.h @@ -5,17 +5,15 @@ * See cxx source for full Copyright notice */ /*$Id$*/ - +// Revision of includes 07/05/2004 // Authors : M.Gheata, A.Gheata 09/10/00 #include -#include -#include -#include -#include "AliMUONHit.h" -class AliMUONEventReconstructor; +class TClonesArray; + +class AliMUONEventReconstructor; class AliMUONRecoTrack; ///////////////////////////////////////////////////////////////////// diff --git a/MUON/AliMUONRecoTrack.cxx b/MUON/AliMUONRecoTrack.cxx index 8487dc6db12..3b34ab06985 100644 --- a/MUON/AliMUONRecoTrack.cxx +++ b/MUON/AliMUONRecoTrack.cxx @@ -26,27 +26,14 @@ //////////////////////////////////////////////////////////////////// #include -#include -#include -#include - -#include -#include -#include #include "AliMUONRecoTrack.h" -#include "AliMUONEventReconstructor.h" -#include "AliMUONTrack.h" -#include "AliMUONTrackK.h" -#include "AliMUONTrackParam.h" -#include "AliMUONHitForRec.h" -#include "AliMUONTrackHit.h" -#include "AliHeader.h" ClassImp(AliMUONRecoTrack) //------------------------------------------------------------------- AliMUONRecoTrack::AliMUONRecoTrack(Bool_t active) + : TObject() { //Constructor of AliMUONRecoTrack fSign = 0; diff --git a/MUON/AliMUONRecoTrack.h b/MUON/AliMUONRecoTrack.h index 0f3312e699f..5121b8b46b8 100644 --- a/MUON/AliMUONRecoTrack.h +++ b/MUON/AliMUONRecoTrack.h @@ -10,11 +10,7 @@ // Authors : M.Gheata, A.Gheata 09/10/00 #include -//#include -//#include -//#include -//#include "AliMUONHit.h" -//class AliMUONEventReconstructor; +#include //////////////////////////////////////////////////////////////////// // // @@ -24,7 +20,7 @@ // // //////////////////////////////////////////////////////////////////// -class AliMUONRecoTrack:public TObject +class AliMUONRecoTrack : public TObject { public: AliMUONRecoTrack() { } @@ -36,7 +32,7 @@ class AliMUONRecoTrack:public TObject const Double_t GetPosX(Int_t chamber) const {return fPosX[chamber];}; const Double_t GetPosY(Int_t chamber) const {return fPosY[chamber];}; const Double_t GetPosZ(Int_t chamber) const {return fPosZ[chamber];}; - const Double_t GetVertexPos() { return fZvr;}; + const Double_t GetVertexPos() const { return fZvr;}; const Double_t P() {return TMath::Sqrt(fPr[0]*fPr[0] + fPr[1]*fPr[1] + fPr[2]*fPr[2]);}; const Double_t Phi(); void SetChi2r(Double_t chi) { fChi2r = chi;}; diff --git a/MUON/AliMUONReconstHit.cxx b/MUON/AliMUONReconstHit.cxx index ca567a52f24..55de97350e7 100644 --- a/MUON/AliMUONReconstHit.cxx +++ b/MUON/AliMUONReconstHit.cxx @@ -18,9 +18,20 @@ #include "AliMUONReconstHit.h" ClassImp(AliMUONReconstHit) -//___________________________________________ + +//_____________________________________________________________________________ +AliMUONReconstHit::AliMUONReconstHit() + : TObject() +{ +// Default constructor + + fCorrelIndex[0]=fCorrelIndex[1]=fCorrelIndex[2]=fCorrelIndex[3]=0; + fX[0]=fX[1]=fX[2]=fX[3]=0; fY[0]=fY[1]=fY[2]=fY[3]=0; +} + //_____________________________________________________________________________ AliMUONReconstHit::AliMUONReconstHit(Int_t *idx, Float_t *x, Float_t *y) + : TObject() { // // Creates a MUON correlation object diff --git a/MUON/AliMUONReconstHit.h b/MUON/AliMUONReconstHit.h index 8ffd4cd72fd..4749cde7c81 100644 --- a/MUON/AliMUONReconstHit.h +++ b/MUON/AliMUONReconstHit.h @@ -5,16 +5,14 @@ * See cxx source for full Copyright notice */ /* $Id$ */ +// Revision of includes 07/05/2004 #include class AliMUONReconstHit : public TObject { public: - AliMUONReconstHit() { - fCorrelIndex[0]=fCorrelIndex[1]=fCorrelIndex[2]=fCorrelIndex[3]=0; - fX[0]=fX[1]=fX[2]=fX[3]=0; fY[0]=fY[1]=fY[2]=fY[3]=0; - } + AliMUONReconstHit(); AliMUONReconstHit(Int_t *idx, Float_t *x, Float_t *y); virtual ~AliMUONReconstHit() {} diff --git a/MUON/AliMUONReconstructor.cxx b/MUON/AliMUONReconstructor.cxx index 339686d74aa..c32ab8bafbb 100644 --- a/MUON/AliMUONReconstructor.cxx +++ b/MUON/AliMUONReconstructor.cxx @@ -21,12 +21,13 @@ // // /////////////////////////////////////////////////////////////////////////////// #include -#include "TArrayF.h" +#include + #include "AliRunLoader.h" -#include "AliRun.h" #include "AliHeader.h" #include "AliGenEventHeader.h" #include "AliESD.h" + #include "AliMUONData.h" #include "AliMUONEventReconstructor.h" #include "AliMUONClusterReconstructor.h" @@ -41,6 +42,7 @@ ClassImp(AliMUONReconstructor) //_____________________________________________________________________________ AliMUONReconstructor::AliMUONReconstructor() + : AliReconstructor() { } //_____________________________________________________________________________ @@ -67,9 +69,9 @@ void AliMUONReconstructor::Reconstruct(AliRunLoader* runLoader) const for (Int_t i = 0; i < 10; i++) { - AliMUONClusterFinderVS *RecModel = new AliMUONClusterFinderVS(); - RecModel->SetGhostChi2Cut(10); - recoCluster->SetReconstructionModel(i,RecModel); + AliMUONClusterFinderVS *recModel = new AliMUONClusterFinderVS(); + recModel->SetGhostChi2Cut(10); + recoCluster->SetReconstructionModel(i,recModel); } loader->LoadDigits("READ"); @@ -190,7 +192,7 @@ void AliMUONReconstructor::FillESD(AliRunLoader* runLoader, AliESD* esd) const } } // setting ESD MUON class - AliESDMuonTrack* ESDTrack = new AliESDMuonTrack() ; + AliESDMuonTrack* theESDTrack = new AliESDMuonTrack() ; //-------------------- trigger tracks------------- Long_t trigPat = 0; @@ -235,20 +237,20 @@ void AliMUONReconstructor::FillESD(AliRunLoader* runLoader, AliESD* esd) const chi2MatchTrigger = recTrack->GetChi2MatchTrigger(); // setting data member of ESD MUON - ESDTrack->SetInverseBendingMomentum(inverseBendingMomentum); - ESDTrack->SetThetaX(TMath::ATan(nonBendingSlope)); - ESDTrack->SetThetaY(TMath::ATan(bendingSlope)); - ESDTrack->SetZ(vertex[2]); - ESDTrack->SetBendingCoor(vertex[1]); // calculate vertex at ESD or Tracking level ? - ESDTrack->SetNonBendingCoor(vertex[0]); - ESDTrack->SetChi2(fitFmin); - ESDTrack->SetNHit(nTrackHits); - ESDTrack->SetMatchTrigger(matchTrigger); - ESDTrack->SetChi2MatchTrigger(chi2MatchTrigger); + theESDTrack->SetInverseBendingMomentum(inverseBendingMomentum); + theESDTrack->SetThetaX(TMath::ATan(nonBendingSlope)); + theESDTrack->SetThetaY(TMath::ATan(bendingSlope)); + theESDTrack->SetZ(vertex[2]); + theESDTrack->SetBendingCoor(vertex[1]); // calculate vertex at ESD or Tracking level ? + theESDTrack->SetNonBendingCoor(vertex[0]); + theESDTrack->SetChi2(fitFmin); + theESDTrack->SetNHit(nTrackHits); + theESDTrack->SetMatchTrigger(matchTrigger); + theESDTrack->SetChi2MatchTrigger(chi2MatchTrigger); // storing ESD MUON Track into ESD Event if (nRecTracks != 0) - esd->AddMuonTrack(ESDTrack); + esd->AddMuonTrack(theESDTrack); } // end loop tracks // add global trigger pattern @@ -263,7 +265,7 @@ void AliMUONReconstructor::FillESD(AliRunLoader* runLoader, AliESD* esd) const loader->UnloadTracks(); if (!header) runLoader->UnloadKinematics(); - delete ESDTrack; + delete theESDTrack; delete muonData; // delete particle; } diff --git a/MUON/AliMUONReconstructor.h b/MUON/AliMUONReconstructor.h index ce554a86112..a7772fc3020 100644 --- a/MUON/AliMUONReconstructor.h +++ b/MUON/AliMUONReconstructor.h @@ -4,10 +4,12 @@ * See cxx source for full Copyright notice */ /* $Id$ */ +// Revision of includes 07/05/2004 #include "AliReconstructor.h" -class AliMUONReconstructor: public AliReconstructor { +class AliMUONReconstructor: public AliReconstructor +{ public: AliMUONReconstructor(); virtual ~AliMUONReconstructor(); diff --git a/MUON/AliMUONResponse.cxx b/MUON/AliMUONResponse.cxx index d17a80695ec..190922c0d8b 100644 --- a/MUON/AliMUONResponse.cxx +++ b/MUON/AliMUONResponse.cxx @@ -19,3 +19,15 @@ ClassImp(AliMUONResponse) +AliMUONResponse::AliMUONResponse() + : TObject() +{ +// Default constructor +} + + +AliMUONResponse::~AliMUONResponse() +{ +// Destructor +} + diff --git a/MUON/AliMUONResponse.h b/MUON/AliMUONResponse.h index 7ec1b45dcdb..a7ed4a97b6d 100644 --- a/MUON/AliMUONResponse.h +++ b/MUON/AliMUONResponse.h @@ -4,33 +4,37 @@ * See cxx source for full Copyright notice */ /* $Id$ */ +// Revision of includes 07/05/2004 -#include "TObject.h" +#include class TF1; class AliSegmentation; class AliMUONTransientDigit; -class AliMUONResponse : -public TObject { +class AliMUONResponse : public TObject +{ public: + AliMUONResponse(); + virtual ~AliMUONResponse(); + // // Configuration methods // // Set number of sigmas over which cluster disintegration is performed virtual void SetSigmaIntegration(Float_t p1) =0; // Get number of sigmas over which cluster disintegration is performed - virtual Float_t SigmaIntegration() =0; + virtual Float_t SigmaIntegration() const =0; // Set single electron pulse height (ADCcounts/e) virtual void SetChargeSlope(Float_t p1) =0; // Get single electron pulse height (ADCcounts/e) - virtual Float_t ChargeSlope() =0; + virtual Float_t ChargeSlope() const =0; // Set sigmas of the charge spread function virtual void SetChargeSpread(Float_t p1, Float_t p2) =0; // Get sigma_X of the charge spread function - virtual Float_t ChargeSpreadX() =0; + virtual Float_t ChargeSpreadX() const =0; // Get sigma_Y of the charge spread function - virtual Float_t ChargeSpreadY() =0; + virtual Float_t ChargeSpreadY() const =0; // Set maximum Adc-count value virtual void SetMaxAdc(Int_t p1) =0; // Set saturation value @@ -38,19 +42,19 @@ public TObject { // Set zero suppression threshold virtual void SetZeroSuppression(Int_t val) =0; // Get maximum Adc-count value - virtual Int_t MaxAdc() =0; + virtual Int_t MaxAdc() const =0; // Get saturation value - virtual Int_t Saturation() =0; + virtual Int_t Saturation() const =0; // Get maximum zero suppression threshold - virtual Int_t ZeroSuppression() =0; + virtual Int_t ZeroSuppression() const =0; // Set anode cathode Pitch virtual void SetPitch(Float_t) =0; // Get anode cathode Pitch - virtual Float_t Pitch() =0; + virtual Float_t Pitch() const =0; // Set the charge correlation virtual void SetChargeCorrel(Float_t correl) =0; // Get the charge correlation - virtual Float_t ChargeCorrel() =0; + virtual Float_t ChargeCorrel() const =0; // // Chamber response methods // Pulse height from scored quantity (eloss) diff --git a/MUON/AliMUONResponseTrigger.cxx b/MUON/AliMUONResponseTrigger.cxx index 405c253f78c..5a899c67bb1 100644 --- a/MUON/AliMUONResponseTrigger.cxx +++ b/MUON/AliMUONResponseTrigger.cxx @@ -15,14 +15,22 @@ /* $Id$ */ +//#include +//#include +//#include + #include "AliMUONResponseTrigger.h" -#include "AliSegmentation.h" -#include -#include -#include +//#include "AliSegmentation.h" ClassImp(AliMUONResponseTrigger) +//------------------------------------------------------------------ +AliMUONResponseTrigger::AliMUONResponseTrigger() + : AliMUONResponseV0() +{ +// Default constructor +}; + //------------------------------------------------------------------ Int_t AliMUONResponseTrigger::SetGenerCluster(){ // nothing to be done except return 0 diff --git a/MUON/AliMUONResponseTrigger.h b/MUON/AliMUONResponseTrigger.h index 14bbe066337..e7a17c0c2fd 100644 --- a/MUON/AliMUONResponseTrigger.h +++ b/MUON/AliMUONResponseTrigger.h @@ -4,13 +4,14 @@ * See cxx source for full Copyright notice */ /* $Id$ */ +// Revision of includes 07/05/2004 #include "AliMUONResponseV0.h" -class AliMUONResponseTrigger : -public AliMUONResponseV0 { +class AliMUONResponseTrigger : public AliMUONResponseV0 +{ public: - AliMUONResponseTrigger(){}; + AliMUONResponseTrigger(); virtual ~AliMUONResponseTrigger(){} virtual Int_t DigitResponse(Int_t digit, AliMUONTransientDigit* where); diff --git a/MUON/AliMUONResponseTriggerV1.cxx b/MUON/AliMUONResponseTriggerV1.cxx index 798e0873eb8..aa65cf243e9 100644 --- a/MUON/AliMUONResponseTriggerV1.cxx +++ b/MUON/AliMUONResponseTriggerV1.cxx @@ -13,27 +13,29 @@ * provided "as is" without express or implied warranty. * **************************************************************************/ -/* +/* $Id$ */ -*/ +#include +#include #include "AliMUONResponseTriggerV1.h" #include "AliSegmentation.h" -#include -#include -#include ClassImp(AliMUONResponseTriggerV1) //------------------------------------------------------------------ -AliMUONResponseTriggerV1::AliMUONResponseTriggerV1(){ +AliMUONResponseTriggerV1::AliMUONResponseTriggerV1() + : AliMUONResponseTrigger() +{ // default constructor Float_t hv=9.2; SetParameters(hv); } //------------------------------------------------------------------ -AliMUONResponseTriggerV1::AliMUONResponseTriggerV1(Float_t hv){ +AliMUONResponseTriggerV1::AliMUONResponseTriggerV1(Float_t hv) + : AliMUONResponseTrigger() +{ // Constructor SetParameters(hv); } diff --git a/MUON/AliMUONResponseTriggerV1.h b/MUON/AliMUONResponseTriggerV1.h index 2eb3cc61701..887268ce320 100644 --- a/MUON/AliMUONResponseTriggerV1.h +++ b/MUON/AliMUONResponseTriggerV1.h @@ -3,6 +3,9 @@ /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * See cxx source for full Copyright notice */ +/* $Id$ */ +// Revision of includes 07/05/2004 + #include "AliMUONResponseTrigger.h" class AliMUONResponseTriggerV1 : public AliMUONResponseTrigger diff --git a/MUON/AliMUONResponseV0.cxx b/MUON/AliMUONResponseV0.cxx index 4abf2a271d5..089d2e5d752 100644 --- a/MUON/AliMUONResponseV0.cxx +++ b/MUON/AliMUONResponseV0.cxx @@ -15,14 +15,23 @@ /* $Id$ */ -#include "AliMUONResponseV0.h" -#include "AliSegmentation.h" #include #include +#include "AliMUONResponseV0.h" +#include "AliSegmentation.h" ClassImp(AliMUONResponseV0) +//__________________________________________________________________________ +AliMUONResponseV0::AliMUONResponseV0() + : AliMUONResponse() +{ +// Default constructor + + fChargeCorrel = 0; +} + //__________________________________________________________________________ void AliMUONResponseV0::SetSqrtKx3AndDeriveKx2Kx4(Float_t SqrtKx3) { diff --git a/MUON/AliMUONResponseV0.h b/MUON/AliMUONResponseV0.h index 4addf18281a..517f8fed7f0 100644 --- a/MUON/AliMUONResponseV0.h +++ b/MUON/AliMUONResponseV0.h @@ -4,13 +4,14 @@ * See cxx source for full Copyright notice */ /* $Id$ */ +// Revision of includes 07/05/2004 #include "AliMUONResponse.h" -class AliMUONResponseV0 : -public AliMUONResponse { +class AliMUONResponseV0 : public AliMUONResponse +{ public: - AliMUONResponseV0(){fChargeCorrel = 0;} // by default + AliMUONResponseV0(); virtual ~AliMUONResponseV0(){} // // Configuration methods @@ -18,18 +19,18 @@ public AliMUONResponse { // Set number of sigmas over which cluster didintegration is performed virtual void SetSigmaIntegration(Float_t p1) {fSigmaIntegration=p1;} // Get number of sigmas over which cluster didintegration is performed - virtual Float_t SigmaIntegration() {return fSigmaIntegration;} + virtual Float_t SigmaIntegration() const {return fSigmaIntegration;} // Set single electron pulse height (ADCcounts/e) virtual void SetChargeSlope(Float_t p1) {fChargeSlope=p1;} // Get Set single electron pulse height (ADCcounts/e) - virtual Float_t ChargeSlope() {return fChargeSlope;} + virtual Float_t ChargeSlope() const {return fChargeSlope;} // Set sigmas of the charge spread function virtual void SetChargeSpread(Float_t p1, Float_t p2) {fChargeSpreadX=p1; fChargeSpreadY=p2;} // Get sigma_X of the charge spread function - virtual Float_t ChargeSpreadX() {return fChargeSpreadX;} + virtual Float_t ChargeSpreadX() const {return fChargeSpreadX;} // Get sigma_Y of the charge spread function - virtual Float_t ChargeSpreadY() {return fChargeSpreadY;} + virtual Float_t ChargeSpreadY() const {return fChargeSpreadY;} // Set maximum Adc-count value virtual void SetMaxAdc(Int_t p1) {fMaxAdc=p1;} // Set saturation value @@ -37,20 +38,20 @@ public AliMUONResponse { // Set zero suppression threshold virtual void SetZeroSuppression(Int_t p1) {fZeroSuppression=p1;} // Get maximum Adc-count value - virtual Int_t MaxAdc() {return fMaxAdc;} + virtual Int_t MaxAdc() const {return fMaxAdc;} // Get saturation value - virtual Int_t Saturation() {return fSaturation;} + virtual Int_t Saturation() const {return fSaturation;} // Get zero suppression threshold - virtual Int_t ZeroSuppression() {return fZeroSuppression;} + virtual Int_t ZeroSuppression() const {return fZeroSuppression;} // Set anode cathode Pitch - virtual Float_t Pitch() {return fPitch;} + virtual Float_t Pitch() const {return fPitch;} // Get anode cathode Pitch virtual void SetPitch(Float_t p1) {fPitch=p1;}; // Set the charge correlation virtual void SetChargeCorrel(Float_t correl){fChargeCorrel = correl;} // Get the charge correlation - virtual Float_t ChargeCorrel(){return fChargeCorrel;} + virtual Float_t ChargeCorrel() const {return fChargeCorrel;} // Set Mathieson parameters // Mathieson \sqrt{Kx3} and derived Kx2 and Kx4 virtual void SetSqrtKx3AndDeriveKx2Kx4(Float_t SqrtKx3); diff --git a/MUON/AliMUONSDigitizerv1.cxx b/MUON/AliMUONSDigitizerv1.cxx index 2b885a87faf..ece2293e79a 100644 --- a/MUON/AliMUONSDigitizerv1.cxx +++ b/MUON/AliMUONSDigitizerv1.cxx @@ -1,25 +1,19 @@ - -#include -#include -#include -#include -#include -#include -#include - -#include "AliRun.h" -#include "AliRunLoader.h" -#include "AliLoader.h" - -#include "AliMUON.h" -#include "AliMUONChamber.h" -#include "AliMUONConstants.h" -#include "AliMUONDigit.h" -#include "AliMUONSDigitizerv1.h" -#include "AliMUONHit.h" -#include "AliMUONHitMapA1.h" -#include "AliMUONPadHit.h" -#include "AliMUONTransientDigit.h" +/************************************************************************** + * 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$ */ ///////////////////////////////////////////////////////////////////////////////// // @@ -31,16 +25,24 @@ // ///////////////////////////////////////////////////////////////////////////////// +#include "AliMUONSDigitizerv1.h" +#include "AliMUONLoader.h" +#include "AliMUONData.h" +#include "AliMUONDigit.h" +#include "AliMUONTransientDigit.h" + ClassImp(AliMUONSDigitizerv1) //___________________________________________ -AliMUONSDigitizerv1::AliMUONSDigitizerv1() : AliMUONDigitizerv1() +AliMUONSDigitizerv1::AliMUONSDigitizerv1() + : AliMUONDigitizerv1() { // Default ctor - don't use it } //___________________________________________ -AliMUONSDigitizerv1::AliMUONSDigitizerv1(AliRunDigitizer* manager) : AliMUONDigitizerv1(manager) +AliMUONSDigitizerv1::AliMUONSDigitizerv1(AliRunDigitizer* manager) + : AliMUONDigitizerv1(manager) { // ctor which should be used } @@ -56,7 +58,7 @@ void AliMUONSDigitizerv1::AddDigit(Int_t chamber, Int_t tracks[kMAXTRACKS], Int_ { // Derived to write to the s-digit tree TreeS. - muondata->AddSDigit(chamber, tracks, charges, digits); + fMUONData->AddSDigit(chamber, tracks, charges, digits); }; //------------------------------------------------------------------------ @@ -76,7 +78,7 @@ Bool_t AliMUONSDigitizerv1::InitOutputData(AliMUONLoader* muonloader) if (GetDebug() > 2) Info("InitOutputData", "Creating s-digits branch and setting the tree address."); - muondata->SetLoader(muonloader); + fMUONData->SetLoader(muonloader); // New branch per chamber for MUON digit in the tree of digits if (muonloader->TreeS() == NULL) @@ -89,8 +91,8 @@ Bool_t AliMUONSDigitizerv1::InitOutputData(AliMUONLoader* muonloader) }; }; - muondata->MakeBranch("S"); - muondata->SetTreeAddress("S"); + fMUONData->MakeBranch("S"); + fMUONData->SetTreeAddress("S"); return kTRUE; }; @@ -101,8 +103,8 @@ void AliMUONSDigitizerv1::FillOutputData() // Overridden to fill TreeS rather than TreeD. if (GetDebug() > 2) Info("FillOutputData", "Filling trees with s-digits."); - muondata->Fill("S"); - muondata->ResetSDigits(); + fMUONData->Fill("S"); + fMUONData->ResetSDigits(); }; //------------------------------------------------------------------------ @@ -112,6 +114,6 @@ void AliMUONSDigitizerv1::CleanupOutputData(AliMUONLoader* muonloader) if (GetDebug() > 2) Info("CleanupOutputData", "Writing s-digits and releasing pointers."); muonloader->WriteSDigits("OVERWRITE"); - muondata->ResetSDigits(); + fMUONData->ResetSDigits(); muonloader->UnloadSDigits(); }; diff --git a/MUON/AliMUONSDigitizerv1.h b/MUON/AliMUONSDigitizerv1.h index 4b421764dce..63e51117a50 100644 --- a/MUON/AliMUONSDigitizerv1.h +++ b/MUON/AliMUONSDigitizerv1.h @@ -1,5 +1,10 @@ #ifndef ALIMUONSDIGITIZERV1_H #define ALIMUONSDIGITIZERV1_H +/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * See cxx source for full Copyright notice */ + +/* $Id$ */ +// Revision of includes 07/05/2004 // The AliMUONSDigitizer produces // SDigits from Hits diff --git a/MUON/AliMUONSegment.cxx b/MUON/AliMUONSegment.cxx index 7609edc587b..a4f1a89587b 100644 --- a/MUON/AliMUONSegment.cxx +++ b/MUON/AliMUONSegment.cxx @@ -26,10 +26,10 @@ // /////////////////////////////////////////////////////////// +#include "AliMUONSegment.h" #include "AliMUON.h" #include "AliMUONChamber.h" #include "AliMUONHitForRec.h" -#include "AliMUONSegment.h" #include "AliMUONTrackParam.h" #include "AliRun.h" // for gAlice @@ -37,6 +37,7 @@ ClassImp(AliMUONSegment) // Class implementation in ROOT context //__________________________________________________________________________ AliMUONSegment::AliMUONSegment() + : TObject() { // Default constructor fHitForRecPtr1 = 0; // pointer to HitForRec in first chamber @@ -62,6 +63,7 @@ AliMUONSegment::AliMUONSegment() //__________________________________________________________________________ AliMUONSegment::AliMUONSegment(AliMUONHitForRec* Hit1, AliMUONHitForRec* Hit2) + : TObject() { // Constructor for AliMUONSegment from two HitForRec's, // one, in the first chamber of the station, pointed to by "Hit1", @@ -97,15 +99,23 @@ AliMUONSegment::AliMUONSegment(AliMUONHitForRec* Hit1, AliMUONHitForRec* Hit2) return; } -AliMUONSegment::AliMUONSegment (const AliMUONSegment& MUONSegment):TObject(MUONSegment) +AliMUONSegment::AliMUONSegment (const AliMUONSegment& theMUONSegment) + : TObject(theMUONSegment) { -// Dummy copy constructor +// Protected copy constructor + + Fatal("AliMUONSegment", "Not implemented."); } -AliMUONSegment & AliMUONSegment::operator=(const AliMUONSegment& /*MUONSegment*/) +AliMUONSegment & AliMUONSegment::operator=(const AliMUONSegment& rhs) { -// Dummy assignment operator - return *this; +// Protected assignement operator + + if (this == &rhs) return *this; + + Fatal("operator=", "Not implemented."); + + return *this; } //__________________________________________________________________________ @@ -123,7 +133,7 @@ Int_t AliMUONSegment::Compare(const TObject* Segment) const } //__________________________________________________________________________ -Double_t AliMUONSegment::NormalizedChi2WithSegment(AliMUONSegment* Segment, Double_t Sigma2Cut) +Double_t AliMUONSegment::NormalizedChi2WithSegment(AliMUONSegment* Segment, Double_t Sigma2Cut) const { // Calculate the normalized Chi2 between the current Segment (this) // and the Segment pointed to by "Segment", @@ -165,7 +175,7 @@ Double_t AliMUONSegment::NormalizedChi2WithSegment(AliMUONSegment* Segment, Doub } //__________________________________________________________________________ -AliMUONSegment* AliMUONSegment::CreateSegmentFromLinearExtrapToStation (Int_t Station, Double_t MCSfactor) +AliMUONSegment* AliMUONSegment::CreateSegmentFromLinearExtrapToStation (Int_t Station, Double_t MCSfactor) const { // Extrapolates linearly the current Segment (this) to station (0..) "Station". // Multiple Coulomb scattering calculated from "MCSfactor" @@ -209,7 +219,7 @@ AliMUONSegment* AliMUONSegment::CreateSegmentFromLinearExtrapToStation (Int_t St } //__________________________________________________________________________ -AliMUONHitForRec* AliMUONSegment::CreateHitForRecFromLinearExtrapToChamber (Int_t Chamber, Double_t MCSfactor) +AliMUONHitForRec* AliMUONSegment::CreateHitForRecFromLinearExtrapToChamber (Int_t Chamber, Double_t MCSfactor) const { // Extrapolates linearly the current Segment (this) to chamber(0..) "Chamber". // Multiple Coulomb scattering calculated from "MCSfactor" diff --git a/MUON/AliMUONSegment.h b/MUON/AliMUONSegment.h index 6a84125559c..e9120243b62 100644 --- a/MUON/AliMUONSegment.h +++ b/MUON/AliMUONSegment.h @@ -4,6 +4,7 @@ * See cxx source for full Copyright notice */ /*$Id$*/ +// Revision of includes 07/05/2004 /////////////////////////////////////////////////////////// // Segment for reconstruction in ALICE dimuon spectrometer @@ -14,14 +15,11 @@ class AliMUONHitForRec; class AliMUONTrackParam; -class AliMUONSegment : public TObject { +class AliMUONSegment : public TObject +{ public: AliMUONSegment(); // default constructor - virtual ~AliMUONSegment(){ - // Destructor - ;} // Destructor - AliMUONSegment (const AliMUONSegment& AliMUONSegment); // copy constructor - AliMUONSegment& operator=(const AliMUONSegment& AliMUONSegment); // assignment operator + virtual ~AliMUONSegment(){} // Destructor AliMUONSegment(AliMUONHitForRec* Hit1, AliMUONHitForRec* Hit2); // Constructor from two HitForRec's // Inline functions for Get and Set @@ -43,15 +41,19 @@ class AliMUONSegment : public TObject { Bool_t GetInTrack(void) const {return fInTrack;} void SetInTrack(Bool_t InTrack) {fInTrack = InTrack;} - AliMUONSegment* CreateSegmentFromLinearExtrapToStation (Int_t Station, Double_t MCSfactor); - Double_t NormalizedChi2WithSegment(AliMUONSegment* Segment, Double_t Sigma2Cut); - AliMUONHitForRec* CreateHitForRecFromLinearExtrapToChamber (Int_t Chamber, Double_t MCSfactor); + AliMUONSegment* CreateSegmentFromLinearExtrapToStation (Int_t Station, Double_t MCSfactor) const; + Double_t NormalizedChi2WithSegment(AliMUONSegment* Segment, Double_t Sigma2Cut) const; + AliMUONHitForRec* CreateHitForRecFromLinearExtrapToChamber (Int_t Chamber, Double_t MCSfactor) const; void UpdateFromStationTrackParam(AliMUONTrackParam *TrackParam, Double_t MCSfactor, Double_t Dz1, Double_t Dz2, Double_t Dz3, Int_t Station, Double_t InverseMomentum); // What is necessary for sorting TClonesArray's; sufficient too ???? Bool_t IsSortable() const { return kTRUE; } Int_t Compare(const TObject* Segment) const; // "Compare" function for sorting + protected: + AliMUONSegment (const AliMUONSegment& AliMUONSegment); // copy constructor + AliMUONSegment& operator=(const AliMUONSegment& AliMUONSegment); // assignment operator + private: AliMUONHitForRec* fHitForRecPtr1; // pointer to HitForRec in first chamber AliMUONHitForRec* fHitForRecPtr2; // pointer to HitForRec in second chamber @@ -74,6 +76,6 @@ class AliMUONSegment : public TObject { Bool_t fInTrack; // TRUE if segment belongs to one track ClassDef(AliMUONSegment, 1) // Segment for reconstruction in ALICE dimuon spectrometer - }; +}; #endif diff --git a/MUON/AliMUONSegmentationSlat.cxx b/MUON/AliMUONSegmentationSlat.cxx index 6986364bb94..a561bb1803b 100644 --- a/MUON/AliMUONSegmentationSlat.cxx +++ b/MUON/AliMUONSegmentationSlat.cxx @@ -15,18 +15,18 @@ /* $Id$ */ +#include +#include +#include +#include +#include +#include + #include "AliMUONSegmentationSlat.h" #include "AliMUONSegmentationSlatModule.h" #include "AliMUON.h" #include "AliMUONChamber.h" -#include "TArrayI.h" -#include "TObjArray.h" #include "AliRun.h" -#include -#include -#include -#include -#include //___________________________________________ ClassImp(AliMUONSegmentationSlat) @@ -191,7 +191,7 @@ void AliMUONSegmentationSlat::GlobalToLocal( } void AliMUONSegmentationSlat::GlobalToLocal( - Int_t ix, Int_t iy, Int_t &islat, Int_t &ixlocal, Int_t &iylocal) + Int_t ix, Int_t iy, Int_t &islat, Int_t &ixlocal, Int_t &iylocal) const { // // Perform global to local transformation for pad coordinates @@ -206,18 +206,16 @@ void AliMUONSegmentationSlat::GlobalToLocal( for (Int_t i=0; iNpy(); - if (iytemp <= 0) break; iylocal = iytemp; index=i+1; } - ixlocal=TMath::Abs(ix); islat=index; } void AliMUONSegmentationSlat:: -LocalToGlobal(Int_t islat, Float_t xlocal, Float_t ylocal, Float_t &x, Float_t &y, Float_t &z) +LocalToGlobal(Int_t islat, Float_t xlocal, Float_t ylocal, Float_t &x, Float_t &y, Float_t &z) const { // Transform from local to global space coordinates // @@ -237,8 +235,8 @@ LocalToGlobal(Int_t islat, Float_t xlocal, Float_t ylocal, Float_t &x, Float_ } -void AliMUONSegmentationSlat::LocalToGlobal( - Int_t islat, Int_t ixlocal, Int_t iylocal, Int_t &ix, Int_t &iy) +void AliMUONSegmentationSlat::LocalToGlobal ( + Int_t islat, Int_t ixlocal, Int_t iylocal, Int_t &ix, Int_t &iy) const { // Transform from local to global pad coordinates // @@ -432,11 +430,12 @@ Int_t AliMUONSegmentationSlat::Ix() Int_t ixl,iyl,ix,iy; ixl=fCurrentSlat->Ix(); iyl=fCurrentSlat->Iy(); - LocalToGlobal(fSlatIndex, ixl, iyl, ix, iy); + Int_t ixc, iyc, isc; Float_t xc, yc; GlobalToLocal(ix, iy, isc, ixc, iyc); + Slat(isc)->GetPadC(ixc,iyc,xc,yc); return ix; } @@ -567,7 +566,7 @@ AliMUONSegmentationSlatModule* AliMUONSegmentationSlat::Slat(Int_t index) const AliMUONSegmentationSlatModule* AliMUONSegmentationSlat:: -CreateSlatModule() +CreateSlatModule() const { // Factory method for slat module return new AliMUONSegmentationSlatModule(4); diff --git a/MUON/AliMUONSegmentationSlat.h b/MUON/AliMUONSegmentationSlat.h index a12dbe6c11c..c2dc9e21cfb 100644 --- a/MUON/AliMUONSegmentationSlat.h +++ b/MUON/AliMUONSegmentationSlat.h @@ -4,6 +4,8 @@ * See cxx source for full Copyright notice */ /* $Id$ */ +// Revision of includes 07/05/2004 + ///////////////////////////////////////////////////// // Segmentation classes for slat modules // // to be used with AluMUONSegmentationSlat // @@ -13,12 +15,12 @@ class TArrayI; class TObjArray; + class AliMUONSegmentationSlatModule; class AliMUONChamber; - -class AliMUONSegmentationSlat : -public AliSegmentation { +class AliMUONSegmentationSlat : public AliSegmentation +{ public: AliMUONSegmentationSlat(); AliMUONSegmentationSlat(Int_t nsec); @@ -133,16 +135,16 @@ public AliSegmentation { virtual void GlobalToLocal( Float_t x, Float_t y, Float_t z, Int_t &islat, Float_t &xlocal, Float_t &ylocal); virtual void GlobalToLocal( - Int_t ix, Int_t iy, Int_t &islat, Int_t &ixlocal, Int_t &iylocal); + Int_t ix, Int_t iy, Int_t &islat, Int_t &ixlocal, Int_t &iylocal) const; - virtual void LocalToGlobal( - Int_t islat, Float_t xlocal, Float_t ylocal, Float_t &x, Float_t &y, Float_t &z); - virtual void LocalToGlobal( - Int_t islat, Int_t ixlocal, Int_t iylocal, Int_t &ix, Int_t &iy); + virtual void LocalToGlobal ( + Int_t islat, Float_t xlocal, Float_t ylocal, Float_t &x, Float_t &y, Float_t &z) const; + virtual void LocalToGlobal ( + Int_t islat, Int_t ixlocal, Int_t iylocal, Int_t &ix, Int_t &iy) const; virtual void SetSymmetry(Int_t ix); virtual void SetSymmetry(Float_t x); // Factory method for associated slat module class - virtual AliMUONSegmentationSlatModule* CreateSlatModule(); + virtual AliMUONSegmentationSlatModule* CreateSlatModule() const; protected: diff --git a/MUON/AliMUONSegmentationSlatModule.cxx b/MUON/AliMUONSegmentationSlatModule.cxx index 195e50a48bb..7988c2cfab8 100644 --- a/MUON/AliMUONSegmentationSlatModule.cxx +++ b/MUON/AliMUONSegmentationSlatModule.cxx @@ -20,14 +20,10 @@ // to be used with AluMUONSegmentationSlat // ///////////////////////////////////////////////////// +#include +#include #include "AliMUONSegmentationSlatModule.h" -#include "AliRun.h" -#include "AliMUON.h" -#include -#include - -#include "AliMUONSegmentationV01.h" //___________________________________________ ClassImp(AliMUONSegmentationSlatModule) diff --git a/MUON/AliMUONSegmentationSlatModule.h b/MUON/AliMUONSegmentationSlatModule.h index 5e78b5e3b08..e80a1689684 100644 --- a/MUON/AliMUONSegmentationSlatModule.h +++ b/MUON/AliMUONSegmentationSlatModule.h @@ -4,20 +4,20 @@ * See cxx source for full Copyright notice */ /* $Id$ */ +// Revision of includes 07/05/2004 ///////////////////////////////////////////////////// // Segmentation classes for slat modules // // to be used with AluMUONSegmentationSlat // ///////////////////////////////////////////////////// +#include "AliMUONSegmentationV0.h" + class TArrayF; class TArrayI; -class TObjArray; - -#include "AliMUONSegmentationV0.h" -class AliMUONSegmentationSlatModule : -public AliMUONSegmentationV0 { +class AliMUONSegmentationSlatModule : public AliMUONSegmentationV0 +{ public: AliMUONSegmentationSlatModule(); AliMUONSegmentationSlatModule(Int_t nsec); diff --git a/MUON/AliMUONSegmentationSlatModuleN.cxx b/MUON/AliMUONSegmentationSlatModuleN.cxx index 89f6287609c..5165795c4eb 100644 --- a/MUON/AliMUONSegmentationSlatModuleN.cxx +++ b/MUON/AliMUONSegmentationSlatModuleN.cxx @@ -21,16 +21,16 @@ ///////////////////////////////////////////////////// -#include "AliMUONSegmentationSlatModuleN.h" -#include -#include +#include +#include -#include "AliMUONSegmentationV01.h" +#include "AliMUONSegmentationSlatModuleN.h" //___________________________________________ ClassImp(AliMUONSegmentationSlatModuleN) AliMUONSegmentationSlatModuleN::AliMUONSegmentationSlatModuleN() + : AliMUONSegmentationSlatModule() { // Default constructor } diff --git a/MUON/AliMUONSegmentationSlatModuleN.h b/MUON/AliMUONSegmentationSlatModuleN.h index 711d1306eda..fb9d9b9f5d9 100644 --- a/MUON/AliMUONSegmentationSlatModuleN.h +++ b/MUON/AliMUONSegmentationSlatModuleN.h @@ -4,6 +4,7 @@ * See cxx source for full Copyright notice */ /* $Id$ */ +// Revision of includes 07/05/2004 ///////////////////////////////////////////////////// // Segmentation classes for slat modules // @@ -12,8 +13,8 @@ #include "AliMUONSegmentationSlatModule.h" -class AliMUONSegmentationSlatModuleN : -public AliMUONSegmentationSlatModule { +class AliMUONSegmentationSlatModuleN : public AliMUONSegmentationSlatModule +{ public: AliMUONSegmentationSlatModuleN(); AliMUONSegmentationSlatModuleN(Int_t nsec); diff --git a/MUON/AliMUONSegmentationSlatN.cxx b/MUON/AliMUONSegmentationSlatN.cxx index cb70cebb0fd..6d9697bef1e 100644 --- a/MUON/AliMUONSegmentationSlatN.cxx +++ b/MUON/AliMUONSegmentationSlatN.cxx @@ -15,18 +15,17 @@ /* $Id$ */ +#include +#include + #include "AliMUONSegmentationSlatN.h" #include "AliMUONSegmentationSlatModuleN.h" -#include "TArrayI.h" -#include "TArrayF.h" -#include "TObjArray.h" -#include -#include //___________________________________________ ClassImp(AliMUONSegmentationSlatN); AliMUONSegmentationSlatN::AliMUONSegmentationSlatN() + : AliMUONSegmentationSlat() { // Default constructor } @@ -61,7 +60,7 @@ Float_t AliMUONSegmentationSlatN::Dpy(Int_t isec) const void AliMUONSegmentationSlatN::GlobalToLocal( - Int_t ix, Int_t iy, Int_t &islat, Int_t &ixlocal, Int_t &iylocal) + Int_t ix, Int_t iy, Int_t &islat, Int_t &ixlocal, Int_t &iylocal) const { // // Perform local to global transformation for pad coordinates @@ -88,7 +87,7 @@ void AliMUONSegmentationSlatN::GlobalToLocal( } void AliMUONSegmentationSlatN::LocalToGlobal( - Int_t islat, Int_t ixlocal, Int_t iylocal, Int_t &ix, Int_t &iy) + Int_t islat, Int_t ixlocal, Int_t iylocal, Int_t &ix, Int_t &iy) const { // Local to global transformation for pad coordinates @@ -131,7 +130,7 @@ GetPadI(Float_t x, Float_t y, Float_t z, Int_t &ix, Int_t &iy) } AliMUONSegmentationSlatModule* AliMUONSegmentationSlatN:: -CreateSlatModule() +CreateSlatModule() const { // Factory method for slat module return new AliMUONSegmentationSlatModuleN(4); diff --git a/MUON/AliMUONSegmentationSlatN.h b/MUON/AliMUONSegmentationSlatN.h index b216f8e15fc..d7dbcb95f19 100644 --- a/MUON/AliMUONSegmentationSlatN.h +++ b/MUON/AliMUONSegmentationSlatN.h @@ -4,6 +4,7 @@ * See cxx source for full Copyright notice */ /* $Id$ */ +// Revision of includes 07/05/2004 ///////////////////////////////////////////////////// // Segmentation classes for slat modules // @@ -12,13 +13,13 @@ #include "AliMUONSegmentationSlat.h" -class TArrayF; -class TList; -class AliMUONSegmentationSlatModuleN; +//class TArrayF; +//class TList; +//class AliMUONSegmentationSlatModuleN; -class AliMUONSegmentationSlatN : -public AliMUONSegmentationSlat { +class AliMUONSegmentationSlatN : public AliMUONSegmentationSlat +{ public: AliMUONSegmentationSlatN(); AliMUONSegmentationSlatN(Int_t nsec); @@ -39,11 +40,11 @@ public AliMUONSegmentationSlat { // // Class specific methods virtual void GlobalToLocal( - Int_t ix, Int_t iy, Int_t &islat, Int_t &ixlocal, Int_t &iylocal); + Int_t ix, Int_t iy, Int_t &islat, Int_t &ixlocal, Int_t &iylocal) const; virtual void LocalToGlobal( - Int_t islat, Int_t ixlocal, Int_t iylocal, Int_t &ix, Int_t &iy); + Int_t islat, Int_t ixlocal, Int_t iylocal, Int_t &ix, Int_t &iy) const; // Factory method for associated slat module class - AliMUONSegmentationSlatModule* CreateSlatModule(); + AliMUONSegmentationSlatModule* CreateSlatModule() const; private: ClassDef(AliMUONSegmentationSlatN,1) // Segmentation for Muon Chamber built from Slat Modules diff --git a/MUON/AliMUONSegmentationTrigger.cxx b/MUON/AliMUONSegmentationTrigger.cxx index 14abdb30ee7..082a1ce72b7 100644 --- a/MUON/AliMUONSegmentationTrigger.cxx +++ b/MUON/AliMUONSegmentationTrigger.cxx @@ -15,18 +15,28 @@ /* $Id$ */ +#include +//#include +//#include +//#include + #include "AliMUONSegmentationTrigger.h" #include "AliMUONTriggerConstants.h" #include "AliRun.h" #include "AliMUON.h" -#include -#include -#include #include "AliMUONChamber.h" -#include ClassImp(AliMUONSegmentationTrigger) +//------------------------------------------------------------------ +AliMUONSegmentationTrigger::AliMUONSegmentationTrigger() + : AliMUONSegmentationV0() +{ +// Constructor + + fChamber=0; +} + //------------------------------------------------------------------ void AliMUONSegmentationTrigger::Init(Int_t chamber) { diff --git a/MUON/AliMUONSegmentationTrigger.h b/MUON/AliMUONSegmentationTrigger.h index 8bba7970410..84b13c904ff 100644 --- a/MUON/AliMUONSegmentationTrigger.h +++ b/MUON/AliMUONSegmentationTrigger.h @@ -5,17 +5,21 @@ * See cxx source for full Copyright notice */ /* $Id$ */ +// Revision of includes 07/05/2004 -#include "AliMUONSegmentationV0.h" -class AliMUONChamber; //---------------------------------------------- // // Chamber segmentation virtual base class // -class AliMUONSegmentationTrigger : -public AliMUONSegmentationV0 { + +#include "AliMUONSegmentationV0.h" + +class AliMUONChamber; + +class AliMUONSegmentationTrigger : public AliMUONSegmentationV0 +{ public: - AliMUONSegmentationTrigger(){fChamber=0;} + AliMUONSegmentationTrigger(); virtual ~AliMUONSegmentationTrigger(){} virtual void Init(Int_t chamber); // Initialization Int_t ModuleNumber(Int_t imodule); // returns module number of ModuleId diff --git a/MUON/AliMUONSegmentationTriggerX.cxx b/MUON/AliMUONSegmentationTriggerX.cxx index b5973b85b4b..1b033bfd137 100644 --- a/MUON/AliMUONSegmentationTriggerX.cxx +++ b/MUON/AliMUONSegmentationTriggerX.cxx @@ -23,12 +23,9 @@ #include "AliMUON.h" #include "AliMUONSegmentationTriggerX.h" #include "AliMUONTriggerConstants.h" -#include "TMath.h" -#include "TRandom.h" -#include "TArc.h" #include "AliMUONChamber.h" #include "AliRun.h" // gAlice -#include + ClassImp(AliMUONSegmentationTriggerX) //------------------------------------------------------------------ diff --git a/MUON/AliMUONSegmentationTriggerX.h b/MUON/AliMUONSegmentationTriggerX.h index 747c938f95c..46cc3b0ab2d 100644 --- a/MUON/AliMUONSegmentationTriggerX.h +++ b/MUON/AliMUONSegmentationTriggerX.h @@ -5,16 +5,19 @@ * See cxx source for full Copyright notice */ /* $Id$ */ +// Revision of includes 07/05/2004 -#include "AliMUONSegmentationTrigger.h" - -class AliMUONChamber; //---------------------------------------------- // // Chamber segmentation virtual base class // -class AliMUONSegmentationTriggerX : -public AliMUONSegmentationTrigger { + +#include "AliMUONSegmentationTrigger.h" + +class AliMUONChamber; + +class AliMUONSegmentationTriggerX : public AliMUONSegmentationTrigger +{ public: AliMUONSegmentationTriggerX(){} virtual ~AliMUONSegmentationTriggerX(){} diff --git a/MUON/AliMUONSegmentationTriggerY.cxx b/MUON/AliMUONSegmentationTriggerY.cxx index bee410846c8..92e8e8a36cc 100644 --- a/MUON/AliMUONSegmentationTriggerY.cxx +++ b/MUON/AliMUONSegmentationTriggerY.cxx @@ -15,17 +15,22 @@ /* $Id$ */ +#include + #include "AliMUONSegmentationTriggerY.h" #include "AliMUONTriggerConstants.h" -#include "TMath.h" -#include "TRandom.h" -#include "TArc.h" -#include "AliMUONChamber.h" #include "AliMUON.h" #include "AliRun.h" -#include + ClassImp(AliMUONSegmentationTriggerY) +//------------------------------------------------------------------ +AliMUONSegmentationTriggerY::AliMUONSegmentationTriggerY() + : AliMUONSegmentationTrigger() +{ +// Constructor +} + //------------------------------------------------------------------ void AliMUONSegmentationTriggerY::Init(Int_t chamber) { diff --git a/MUON/AliMUONSegmentationTriggerY.h b/MUON/AliMUONSegmentationTriggerY.h index fba16978954..bf62710ae96 100644 --- a/MUON/AliMUONSegmentationTriggerY.h +++ b/MUON/AliMUONSegmentationTriggerY.h @@ -4,19 +4,21 @@ * See cxx source for full Copyright notice */ /* $Id$ */ +// Revision of includes 07/05/2004 - -#include "AliMUONSegmentationTrigger.h" - -class AliMUONChamber; //---------------------------------------------- // // Chamber segmentation virtual base class // -class AliMUONSegmentationTriggerY : -public AliMUONSegmentationTrigger { + +#include "AliMUONSegmentationTrigger.h" + +class AliMUONChamber; + +class AliMUONSegmentationTriggerY : public AliMUONSegmentationTrigger +{ public: - AliMUONSegmentationTriggerY(){} + AliMUONSegmentationTriggerY(); virtual ~AliMUONSegmentationTriggerY(){} // Transform from pad to real coordinates virtual void GetPadI(Float_t x,Float_t y,Int_t &ix,Int_t &iy); diff --git a/MUON/AliMUONSegmentationV0.cxx b/MUON/AliMUONSegmentationV0.cxx index 1f44f23035a..bafb319418f 100644 --- a/MUON/AliMUONSegmentationV0.cxx +++ b/MUON/AliMUONSegmentationV0.cxx @@ -15,17 +15,29 @@ /* $Id$ */ +#include +#include + #include "AliMUONSegmentationV0.h" -#include "TArc.h" -#include "TMath.h" #include "AliMUONChamber.h" #include "AliRun.h" #include "AliMUON.h" ClassImp(AliMUONSegmentationV0) - AliMUONSegmentationV0::AliMUONSegmentationV0(const AliMUONSegmentationV0& segmentation):AliSegmentation(segmentation) + +AliMUONSegmentationV0::AliMUONSegmentationV0() + : AliSegmentation() { - // Dummy copy constructor + fCorr=0; + fChamber=0; +} + +AliMUONSegmentationV0::AliMUONSegmentationV0(const AliMUONSegmentationV0& segmentation) + : AliSegmentation(segmentation) +{ +// Protected copy constructor + + Fatal("AliMUONSegmentationV0", "Not implemented."); } void AliMUONSegmentationV0::Init(Int_t chamber) @@ -312,8 +324,14 @@ void AliMUONSegmentationV0::Draw(const char *) const circle->Draw(); } -AliMUONSegmentationV0& AliMUONSegmentationV0::operator =(const AliMUONSegmentationV0 & /*rhs*/) +AliMUONSegmentationV0& +AliMUONSegmentationV0::operator =(const AliMUONSegmentationV0 & rhs) { -// Dummy assignment operator - return *this; +// Protected assignement operator + + if (this == &rhs) return *this; + + Fatal("operator=", "Not implemented."); + + return *this; } diff --git a/MUON/AliMUONSegmentationV0.h b/MUON/AliMUONSegmentationV0.h index 517338e55a4..f1b634ce33f 100644 --- a/MUON/AliMUONSegmentationV0.h +++ b/MUON/AliMUONSegmentationV0.h @@ -4,23 +4,24 @@ * See cxx source for full Copyright notice */ /* $Id$ */ +// Revision of includes 07/05/2004 + +//---------------------------------------------- +// +// Chamber segmentation for homogeneously segmented circular chamber +// #include "AliSegmentation.h" class AliMUONChamber; class TF1; -//---------------------------------------------- -// -// Chamber segmentation for homogeneously segmented circular chamber -// -class AliMUONSegmentationV0 : -public AliSegmentation { +class AliMUONSegmentationV0 : public AliSegmentation +{ public: - AliMUONSegmentationV0(){fCorr=0;fChamber=0;} - AliMUONSegmentationV0(const AliMUONSegmentationV0 & segmentation); - + AliMUONSegmentationV0(); virtual ~AliMUONSegmentationV0(){} + // Set Chamber Segmentation Parameters // // Pad size Dx*Dy @@ -107,11 +108,14 @@ dummy); virtual void SetCorrFunc(Int_t dum, TF1* func); // Get the correction Function virtual TF1* CorrFunc(Int_t) const {return fCorr;} - // assignment operator - AliMUONSegmentationV0& operator=(const AliMUONSegmentationV0& rhs); ClassDef(AliMUONSegmentationV0,1) //Class for homogeneous segmentation - protected: + + protected: + AliMUONSegmentationV0(const AliMUONSegmentationV0 & segmentation); + // assignment operator + AliMUONSegmentationV0& operator=(const AliMUONSegmentationV0& rhs); + // // Implementation of the segmentation class: // Version 0 models rectangular pads with the same dimensions all diff --git a/MUON/AliMUONSegmentationV01.cxx b/MUON/AliMUONSegmentationV01.cxx index 94da57b1fb8..ad4f8ff31da 100644 --- a/MUON/AliMUONSegmentationV01.cxx +++ b/MUON/AliMUONSegmentationV01.cxx @@ -27,7 +27,6 @@ #include #include #include -#include #include "AliMUONSegmentationV01.h" #include "AliMUON.h" @@ -35,15 +34,20 @@ #include "AliRun.h" + //___________________________________________ ClassImp(AliMUONSegmentationV01) - AliMUONSegmentationV01::AliMUONSegmentationV01(const AliMUONSegmentationV01& segmentation):AliMUONSegmentationV0(segmentation) +AliMUONSegmentationV01::AliMUONSegmentationV01(const AliMUONSegmentationV01& segmentation) + : AliMUONSegmentationV0(segmentation) { -// Dummy copy constructor +// Protected copy constructor + + Fatal("AliMUONSegmentationV01", "Not implemented."); } AliMUONSegmentationV01::AliMUONSegmentationV01() + : AliMUONSegmentationV0() { // Default constructor fRSec = 0; @@ -54,6 +58,7 @@ AliMUONSegmentationV01::AliMUONSegmentationV01() } AliMUONSegmentationV01::AliMUONSegmentationV01(Int_t nsec) + : AliMUONSegmentationV0() { // Non default constructor @@ -193,6 +198,7 @@ void AliMUONSegmentationV01::Init(Int_t chamber) fId=chamber; } +//______________________________________________________________________ Int_t AliMUONSegmentationV01::Sector(Int_t ix, Int_t iy) { // Returns sector number for given pad position @@ -208,6 +214,7 @@ Int_t AliMUONSegmentationV01::Sector(Int_t ix, Int_t iy) } return isec; } + //______________________________________________________________________ void AliMUONSegmentationV01::GetPadI(Float_t x, Float_t y, Int_t &ix, Int_t &iy) { @@ -354,7 +361,7 @@ void AliMUONSegmentationV01::FirstPad(Float_t xhit, Float_t yhit, Float_t dx, Fl fIx=fIxmin; fIy=fIymin; GetPadC(fIx,fIy,fX,fY); - + // added if (fSector == -1) { fSector=Sector(fIx,fIy); @@ -659,10 +666,15 @@ TF1* AliMUONSegmentationV01::CorrFunc(Int_t isec) const return (TF1*) fCorrA->At(isec); } -AliMUONSegmentationV01& AliMUONSegmentationV01::operator -=(const AliMUONSegmentationV01 & /*rhs*/) +AliMUONSegmentationV01& +AliMUONSegmentationV01::operator =(const AliMUONSegmentationV01 & rhs) { -// Dummy assignment operator - return *this; +// Protected assignement operator + + if (this == &rhs) return *this; + + Fatal("operator=", "Not implemented."); + + return *this; } diff --git a/MUON/AliMUONSegmentationV01.h b/MUON/AliMUONSegmentationV01.h index 7d030bd859f..5094bac57b4 100644 --- a/MUON/AliMUONSegmentationV01.h +++ b/MUON/AliMUONSegmentationV01.h @@ -5,25 +5,26 @@ * See cxx source for full Copyright notice */ /* $Id$ */ +// Revision of includes 07/05/2004 ///////////////////////////////////////////////////// // Segmentation and Response classes version 01 // ///////////////////////////////////////////////////// -class AliMUON; -class TObjArray; + +#include // needed for CINT +#include // needed for CINT #include "AliMUONSegmentationV0.h" -#include "TArrayI.h" // because the object, and not the pointer, -#include "TArrayF.h" // belongs to the class +class TObjArray; -class AliMUONSegmentationV01 : -public AliMUONSegmentationV0 { +class AliMUON; + +class AliMUONSegmentationV01 : public AliMUONSegmentationV0 +{ public: AliMUONSegmentationV01(); AliMUONSegmentationV01(Int_t nsec); - AliMUONSegmentationV01(const AliMUONSegmentationV01 & segmentation); - virtual ~AliMUONSegmentationV01(); // @@ -89,10 +90,13 @@ public AliMUONSegmentationV0 { virtual void SetCorrFunc(Int_t dum, TF1* func); // Get the correction function virtual TF1* CorrFunc(Int_t iZone) const; + ClassDef(AliMUONSegmentationV01,1) // Segmentation approximating circular zones with different pad size + + protected: + AliMUONSegmentationV01(const AliMUONSegmentationV01 & segmentation); // assignment operator AliMUONSegmentationV01& operator=(const AliMUONSegmentationV01& rhs); - ClassDef(AliMUONSegmentationV01,1) // Segmentation approximating circular zones with different pad size - protected: + // Geometry // Int_t fNsec; // Number of sectors diff --git a/MUON/AliMUONSegmentationV02.cxx b/MUON/AliMUONSegmentationV02.cxx index 7e2264ab54f..de31b6d314d 100644 --- a/MUON/AliMUONSegmentationV02.cxx +++ b/MUON/AliMUONSegmentationV02.cxx @@ -19,16 +19,22 @@ // Segmentation and Response classes version 02 // ///////////////////////////////////////////////////// +#include #include "AliMUONSegmentationV02.h" -#include "Riostream.h" //___________________________________________ ClassImp(AliMUONSegmentationV02) -AliMUONSegmentationV02::AliMUONSegmentationV02(Int_t nsec): - AliMUONSegmentationV01(nsec) +AliMUONSegmentationV02::AliMUONSegmentationV02() + : AliMUONSegmentationV01() +{ +// Default constructor +} + +AliMUONSegmentationV02::AliMUONSegmentationV02(Int_t nsec) + : AliMUONSegmentationV01(nsec) { // Non default constructor } diff --git a/MUON/AliMUONSegmentationV02.h b/MUON/AliMUONSegmentationV02.h index e7c6d9fc98f..001b841b50d 100644 --- a/MUON/AliMUONSegmentationV02.h +++ b/MUON/AliMUONSegmentationV02.h @@ -4,6 +4,7 @@ * See cxx source for full Copyright notice */ /* $Id$ */ +// Revision of includes 07/05/2004 ///////////////////////////////////////////////////// // Segmentation and Response classes version 02 // @@ -12,10 +13,10 @@ #include "AliMUONSegmentationV01.h" -class AliMUONSegmentationV02 : -public AliMUONSegmentationV01 { +class AliMUONSegmentationV02 : public AliMUONSegmentationV01 +{ public: - AliMUONSegmentationV02(){} + AliMUONSegmentationV02(); AliMUONSegmentationV02(Int_t nsec); virtual ~AliMUONSegmentationV02(){} diff --git a/MUON/AliMUONSegmentationV04.cxx b/MUON/AliMUONSegmentationV04.cxx index 1a08ccb5560..707604bf57a 100644 --- a/MUON/AliMUONSegmentationV04.cxx +++ b/MUON/AliMUONSegmentationV04.cxx @@ -19,18 +19,24 @@ // Segmentation and Response classes version 04 // ///////////////////////////////////////////////////// +#include +#include #include "AliMUONSegmentationV04.h" #include "AliMUONChamber.h" #include "AliMUON.h" #include "AliRun.h" -#include - //___________________________________________ ClassImp(AliMUONSegmentationV04) +AliMUONSegmentationV04::AliMUONSegmentationV04() + : AliMUONSegmentationV01() +{ +// Constructor +} + void AliMUONSegmentationV04::Init(Int_t chamber) { diff --git a/MUON/AliMUONSegmentationV04.h b/MUON/AliMUONSegmentationV04.h index 45f1ebe0c0a..6c7bb7fe4e3 100644 --- a/MUON/AliMUONSegmentationV04.h +++ b/MUON/AliMUONSegmentationV04.h @@ -4,6 +4,7 @@ * See cxx source for full Copyright notice */ /* $Id$ */ +// Revision of includes 07/05/2004 ///////////////////////////////////////////////////// // Segmentation and Response classes version 04 // @@ -11,10 +12,10 @@ #include "AliMUONSegmentationV01.h" -class AliMUONSegmentationV04 : -public AliMUONSegmentationV01 { +class AliMUONSegmentationV04 : public AliMUONSegmentationV01 +{ public: - AliMUONSegmentationV04(){} + AliMUONSegmentationV04(); virtual ~AliMUONSegmentationV04(){} // Initialisation virtual void Init(Int_t chamber); diff --git a/MUON/AliMUONSegmentationV05.cxx b/MUON/AliMUONSegmentationV05.cxx index e29df14c3d7..8f5de897aca 100644 --- a/MUON/AliMUONSegmentationV05.cxx +++ b/MUON/AliMUONSegmentationV05.cxx @@ -19,17 +19,24 @@ // Segmentation and Response classes version 05 // ///////////////////////////////////////////////////// +#include +#include #include "AliMUONSegmentationV05.h" #include "AliMUON.h" #include "AliMUONChamber.h" #include "AliRun.h" -#include //___________________________________________ ClassImp(AliMUONSegmentationV05) +AliMUONSegmentationV05::AliMUONSegmentationV05() + : AliMUONSegmentationV02() +{ +// Constructor +} + void AliMUONSegmentationV05::Init(Int_t chamber) { // diff --git a/MUON/AliMUONSegmentationV05.h b/MUON/AliMUONSegmentationV05.h index ef8e4059efb..38dad9b5386 100644 --- a/MUON/AliMUONSegmentationV05.h +++ b/MUON/AliMUONSegmentationV05.h @@ -4,6 +4,7 @@ * See cxx source for full Copyright notice */ /* $Id$ */ +// Revision of includes 07/05/2004 ///////////////////////////////////////////////////// // Segmentation version 05 // @@ -11,10 +12,10 @@ #include "AliMUONSegmentationV02.h" -class AliMUONSegmentationV05 : -public AliMUONSegmentationV02 { +class AliMUONSegmentationV05 : public AliMUONSegmentationV02 +{ public: - AliMUONSegmentationV05(){} + AliMUONSegmentationV05(); virtual ~AliMUONSegmentationV05(){} // Initialisation virtual void Init(Int_t chamber); diff --git a/MUON/AliMUONSegmentationV1.cxx b/MUON/AliMUONSegmentationV1.cxx index 9f7e36007a7..b9c67664c44 100644 --- a/MUON/AliMUONSegmentationV1.cxx +++ b/MUON/AliMUONSegmentationV1.cxx @@ -20,6 +20,7 @@ ///////////////////////////////////////////////////////// #include + #include "AliMUONChamber.h" #include "AliMUONSegmentationV1.h" #include "AliRun.h" @@ -29,14 +30,17 @@ //___________________________________________ ClassImp(AliMUONSegmentationV1) - AliMUONSegmentationV1::AliMUONSegmentationV1(const AliMUONSegmentationV1& segmentation):AliSegmentation(segmentation) +AliMUONSegmentationV1::AliMUONSegmentationV1(const AliMUONSegmentationV1& segmentation) + : AliSegmentation(segmentation) { -// Dummy copy constructor +// Protected copy constructor + + Fatal("AliMUONSegmentationV1", "Not implemented."); } AliMUONSegmentationV1::AliMUONSegmentationV1() - + : AliSegmentation() { // initizalize the class with default settings fNzone=1; @@ -249,7 +253,7 @@ Int_t AliMUONSegmentationV1::MorePads() } } -Int_t AliMUONSegmentationV1::IsParallel2(Int_t iX, Int_t iY) +Int_t AliMUONSegmentationV1::IsParallel2(Int_t iX, Int_t iY) const { // test if the pad is read in parallel for zone 2 // iX and iY are assumed to be positive and starting at 0 numbering (cF. iX) @@ -266,7 +270,7 @@ Int_t AliMUONSegmentationV1::IsParallel2(Int_t iX, Int_t iY) return (iX%6)/3+1; } -Int_t AliMUONSegmentationV1::IsParallel3(Int_t iX, Int_t iY) +Int_t AliMUONSegmentationV1::IsParallel3(Int_t iX, Int_t iY) const { // test if the pad is read in parallel for zone 3 // iX and iY are assumed to be positive and starting at 0 numbering (cF. iX) @@ -283,7 +287,7 @@ Int_t AliMUONSegmentationV1::IsParallel3(Int_t iX, Int_t iY) return (iX%9)/3+1 - (iY%3==2 && iX%3==0); } -Int_t AliMUONSegmentationV1::NParallel2(Int_t /*iX*/, Int_t iY) +Int_t AliMUONSegmentationV1::NParallel2(Int_t /*iX*/, Int_t iY) const { // returns the number of pads connected in parallel for zone 2 // iX and iY are assumed to be positive and starting at 0 numbering (cF. iX) @@ -298,7 +302,7 @@ Int_t AliMUONSegmentationV1::NParallel2(Int_t /*iX*/, Int_t iY) return 2; } -Int_t AliMUONSegmentationV1::NParallel3(Int_t iX, Int_t iY) +Int_t AliMUONSegmentationV1::NParallel3(Int_t iX, Int_t iY) const { // test if the pad is read in parallel for zone 3 // iX and iY are assumed to be positive and starting at 0 numbering (cF. iX) @@ -539,8 +543,14 @@ void AliMUONSegmentationV1::GiveTestPoints(Int_t &n, Float_t *x, Float_t *y) con y[0]=x[0]; } -AliMUONSegmentationV1& AliMUONSegmentationV1::operator =(const AliMUONSegmentationV1 & /*rhs*/) +AliMUONSegmentationV1& +AliMUONSegmentationV1::operator =(const AliMUONSegmentationV1 & rhs) { -// Dummy assignment operator - return *this; +// Protected assignement operator + + if (this == &rhs) return *this; + + Fatal("operator=", "Not implemented."); + + return *this; } diff --git a/MUON/AliMUONSegmentationV1.h b/MUON/AliMUONSegmentationV1.h index c38163415a4..c424ba8460c 100644 --- a/MUON/AliMUONSegmentationV1.h +++ b/MUON/AliMUONSegmentationV1.h @@ -4,14 +4,14 @@ * See cxx source for full Copyright notice */ /* $Id$ */ +// Revision of includes 07/05/2004 #include "AliSegmentation.h" -class AliMUONSegmentationV1 : -public AliSegmentation { +class AliMUONSegmentationV1 : public AliSegmentation +{ public: AliMUONSegmentationV1(); - AliMUONSegmentationV1(const AliMUONSegmentationV1 & segmentation); virtual ~AliMUONSegmentationV1(){} // // Set Chamber Segmentation Parameters @@ -102,11 +102,11 @@ public AliSegmentation { virtual Int_t Sector(Int_t /*ix*/, Int_t /*iy*/) {return 1;} virtual Int_t Sector(Float_t /*x*/, Float_t /*y*/) {return 1;} // Position of pad in perellel read-out - virtual Int_t IsParallel2(Int_t iX, Int_t iY); - virtual Int_t IsParallel3(Int_t iX, Int_t iY); + virtual Int_t IsParallel2(Int_t iX, Int_t iY) const; + virtual Int_t IsParallel3(Int_t iX, Int_t iY) const; // Number of pads read in parallel - virtual Int_t NParallel2(Int_t iX, Int_t iY); - virtual Int_t NParallel3(Int_t iX, Int_t iY); + virtual Int_t NParallel2(Int_t iX, Int_t iY) const; + virtual Int_t NParallel3(Int_t iX, Int_t iY) const; // // Number of pads read in parallel and offset to add to x virtual void GetNParallelAndOffset(Int_t iX, Int_t iY, @@ -131,9 +131,12 @@ public AliSegmentation { // Get the correction function virtual TF1* CorrFunc(Int_t) const {return fCorr;} // - AliMUONSegmentationV1& operator=(const AliMUONSegmentationV1& rhs); ClassDef(AliMUONSegmentationV1,1) // Implementation of the Lyon type chamber segmentation with parallel read-out - protected: + + protected: + AliMUONSegmentationV1(const AliMUONSegmentationV1 & segmentation); + AliMUONSegmentationV1& operator=(const AliMUONSegmentationV1& rhs); + // // Implementation of the segmentation data // Version This models rectangular pads with the same dimensions all diff --git a/MUON/AliMUONSlatGeometryBuilder.cxx b/MUON/AliMUONSlatGeometryBuilder.cxx index 694e4abb741..0bc13d2f237 100644 --- a/MUON/AliMUONSlatGeometryBuilder.cxx +++ b/MUON/AliMUONSlatGeometryBuilder.cxx @@ -14,27 +14,25 @@ // * Float_t slat_length // * Float_t slat_number or Float_t slat_position - - #include #include -#include "AliRun.h" +#include #include "AliMUONSlatGeometryBuilder.h" #include "AliMUON.h" #include "AliMUONChamber.h" #include "AliMUONChamberGeometry.h" +#include "AliRun.h" ClassImp(AliMUONSlatGeometryBuilder) -Int_t ConvertSlatNum(Int_t numslat, Int_t quadnum, Int_t fspq); - - +//Int_t ConvertSlatNum(Int_t numslat, Int_t quadnum, Int_t fspq); //______________________________________________________________________________ AliMUONSlatGeometryBuilder::AliMUONSlatGeometryBuilder(AliMUON* muon) - : AliMUONVGeometryBuilder(&muon->Chamber(4), &muon->Chamber(5), &muon->Chamber(6), &muon->Chamber(7), &muon->Chamber(8), &muon->Chamber(9)), -// : AliMUONVGeometryBuilder(&muon->Chamber(4), &muon->Chamber(5)), + : AliMUONVGeometryBuilder(&muon->Chamber(4), &muon->Chamber(5), + &muon->Chamber(6), &muon->Chamber(7), + &muon->Chamber(8), &muon->Chamber(9)), fMUON(muon) { // Standard constructor diff --git a/MUON/AliMUONSlatGeometryBuilder.h b/MUON/AliMUONSlatGeometryBuilder.h index 4ad975019fa..f208d05bc58 100644 --- a/MUON/AliMUONSlatGeometryBuilder.h +++ b/MUON/AliMUONSlatGeometryBuilder.h @@ -1,4 +1,8 @@ +/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * See cxx source for full Copyright notice */ + // $Id$ +// Revision of includes 07/05/2004 // // Class AliMUONSlatGeometryBuilder // ----------------------------- @@ -18,17 +22,19 @@ class AliMUONSlatGeometryBuilder : public AliMUONVGeometryBuilder { public: AliMUONSlatGeometryBuilder(AliMUON* muon); - AliMUONSlatGeometryBuilder(const AliMUONSlatGeometryBuilder& rhs); AliMUONSlatGeometryBuilder(); virtual ~AliMUONSlatGeometryBuilder(); - // operators - AliMUONSlatGeometryBuilder& operator = (const AliMUONSlatGeometryBuilder& rhs); - // methods virtual void CreateGeometry(); virtual void SetTransformations(); virtual void SetSensitiveVolumes(); + + protected: + AliMUONSlatGeometryBuilder(const AliMUONSlatGeometryBuilder& rhs); + + // operators + AliMUONSlatGeometryBuilder& operator = (const AliMUONSlatGeometryBuilder& rhs); private: Int_t ConvertSlatNum(Int_t numslat, Int_t quadnum, Int_t fspq) const; diff --git a/MUON/AliMUONSt1Decoder.h b/MUON/AliMUONSt1Decoder.h index 81ee2eecb58..89b256b6d69 100644 --- a/MUON/AliMUONSt1Decoder.h +++ b/MUON/AliMUONSt1Decoder.h @@ -4,6 +4,7 @@ * See cxx source for full Copyright notice */ /* $Id$ */ +// Revision of includes 07/05/2004 // Authors: David Guez, Ivana Hrivnacova, Marion MacCormick; IPN Orsay // diff --git a/MUON/AliMUONSt1ElectronicElement.cxx b/MUON/AliMUONSt1ElectronicElement.cxx index 4dc85fced51..08bb7a81234 100644 --- a/MUON/AliMUONSt1ElectronicElement.cxx +++ b/MUON/AliMUONSt1ElectronicElement.cxx @@ -27,9 +27,8 @@ // a range of gassiplex/MANAS numbers, in a given range of MANU addresses // Included in AliRoot 2003/01/28 -#include "AliMpPad.h" - #include "AliMUONSt1ElectronicElement.h" +#include "AliMpPad.h" ClassImp(AliMUONSt1ElectronicElement); diff --git a/MUON/AliMUONSt1ElectronicElement.h b/MUON/AliMUONSt1ElectronicElement.h index 512bbd5660e..b5cfa4715f7 100644 --- a/MUON/AliMUONSt1ElectronicElement.h +++ b/MUON/AliMUONSt1ElectronicElement.h @@ -4,6 +4,7 @@ * See cxx source for full Copyright notice */ /* $Id$ */ +// Revision of includes 07/05/2004 // Authors: David Guez, Ivana Hrivnacova, Marion MacCormick; IPN Orsay // diff --git a/MUON/AliMUONSt1GeometryBuilder.cxx b/MUON/AliMUONSt1GeometryBuilder.cxx index b6e6a5f7532..66916fc01cc 100644 --- a/MUON/AliMUONSt1GeometryBuilder.cxx +++ b/MUON/AliMUONSt1GeometryBuilder.cxx @@ -39,6 +39,8 @@ AliMUONSt1GeometryBuilder::AliMUONSt1GeometryBuilder() AliMUONSt1GeometryBuilder::AliMUONSt1GeometryBuilder(const AliMUONSt1GeometryBuilder& rhs) : AliMUONVGeometryBuilder(rhs) { +// Protected copy constructor + Fatal("Copy constructor", "Copy constructor is not implemented."); } @@ -52,6 +54,8 @@ AliMUONSt1GeometryBuilder::~AliMUONSt1GeometryBuilder() { AliMUONSt1GeometryBuilder& AliMUONSt1GeometryBuilder::operator = (const AliMUONSt1GeometryBuilder& rhs) { +// Protected assignement operator + // check assignement to self if (this == &rhs) return *this; diff --git a/MUON/AliMUONSt1GeometryBuilder.h b/MUON/AliMUONSt1GeometryBuilder.h index 9f7e1a95b56..b8d8edb80c4 100644 --- a/MUON/AliMUONSt1GeometryBuilder.h +++ b/MUON/AliMUONSt1GeometryBuilder.h @@ -2,6 +2,7 @@ * See cxx source for full Copyright notice */ // $Id$ +// Revision of includes 07/05/2004 // // Class AliMUONSt1GeometryBuilder // ----------------------------- @@ -21,18 +22,20 @@ class AliMUONSt1GeometryBuilder : public AliMUONVGeometryBuilder { public: AliMUONSt1GeometryBuilder(AliMUON* muon); - AliMUONSt1GeometryBuilder(const AliMUONSt1GeometryBuilder& rhs); AliMUONSt1GeometryBuilder(); virtual ~AliMUONSt1GeometryBuilder(); - - // operators - AliMUONSt1GeometryBuilder& operator = (const AliMUONSt1GeometryBuilder& rhs); // methods virtual void CreateGeometry(); virtual void SetTransformations(); virtual void SetSensitiveVolumes(); + protected: + AliMUONSt1GeometryBuilder(const AliMUONSt1GeometryBuilder& rhs); + + // operators + AliMUONSt1GeometryBuilder& operator = (const AliMUONSt1GeometryBuilder& rhs); + private: AliMUON* fMUON; // the MUON detector class diff --git a/MUON/AliMUONSt1GeometryBuilderV2.cxx b/MUON/AliMUONSt1GeometryBuilderV2.cxx index fd24d67ecb7..e3baf1c8f3c 100644 --- a/MUON/AliMUONSt1GeometryBuilderV2.cxx +++ b/MUON/AliMUONSt1GeometryBuilderV2.cxx @@ -52,7 +52,6 @@ #include "AliMUON.h" #include "AliMUONChamber.h" #include "AliMUONChamberGeometry.h" -#include "AliMUONConstants.h" #include "AliRun.h" #include "AliMagF.h" diff --git a/MUON/AliMUONSt1GeometryBuilderV2.h b/MUON/AliMUONSt1GeometryBuilderV2.h index 696e0c3d5e2..a135b24fe1a 100644 --- a/MUON/AliMUONSt1GeometryBuilderV2.h +++ b/MUON/AliMUONSt1GeometryBuilderV2.h @@ -2,6 +2,7 @@ * See cxx source for full Copyright notice */ // $Id$ +// Revision of includes 07/05/2004 // // Class AliMUONSt1GeometryBuilderV2 // --------------------------------- @@ -12,21 +13,7 @@ #ifndef ALI_MUON_ST1_GEOMETRY_BUILDER_V2_H #define ALI_MUON_ST1_GEOMETRY_BUILDER_V2_H -//#include "AliMUONSt1Containers.h" #include "AliMUONSt1Types.h" - -/* -#ifdef ST1_WITH_STL - #include - #ifdef __HP_aCC - using std::map; - #endif -#endif - -#ifdef ST1_WITH_ROOT - #include "TExMap.h" -#endif -*/ #include "AliMUONVGeometryBuilder.h" //typedef Float_t GReal_t; // for AliGeant3 @@ -56,16 +43,6 @@ class AliMUONSt1GeometryBuilderV2 : public AliMUONVGeometryBuilder AliMUONSt1GeometryBuilderV2& operator = (const AliMUONSt1GeometryBuilderV2& rhs); private: - // Typedefs - // -/* -#ifdef ST1_WITH_STL - typedef map SpecialMap; -#endif -#ifdef ST1_WITH_ROOT - typedef TExMap SpecialMap; -#endif -*/ // Constants // static const GReal_t fgkHzPadPlane; // Pad plane diff --git a/MUON/AliMUONSt1IniReader.h b/MUON/AliMUONSt1IniReader.h index 199339e705d..d182a306d4b 100644 --- a/MUON/AliMUONSt1IniReader.h +++ b/MUON/AliMUONSt1IniReader.h @@ -4,6 +4,7 @@ * See cxx source for full Copyright notice */ /* $Id$ */ +// Revision of includes 07/05/2004 // Authors: David Guez, Ivana Hrivnacova, Marion MacCormick; IPN Orsay // diff --git a/MUON/AliMUONSt1Response.h b/MUON/AliMUONSt1Response.h index dacd2e07210..631d9ff5c64 100644 --- a/MUON/AliMUONSt1Response.h +++ b/MUON/AliMUONSt1Response.h @@ -5,6 +5,7 @@ * See cxx source for full Copyright notice */ /* $Id$ */ +// Revision of includes 07/05/2004 // Authors: David Guez, Ivana Hrivnacova, Marion MacCormick; IPN Orsay // @@ -35,9 +36,8 @@ class AliMUONSt1ResponseParameter; class AliMUONSt1Response : public AliMUONResponseV0 { -public: + public: AliMUONSt1Response(Int_t chamber=1); - AliMUONSt1Response(const AliMUONSt1Response& rhs); virtual ~AliMUONSt1Response(); // @@ -51,15 +51,17 @@ public: virtual Int_t DigitResponse(Int_t digit,AliMUONTransientDigit* where); void PrintStatistics() const; + protected: + AliMUONSt1Response(const AliMUONSt1Response& rhs); + + // operators + AliMUONSt1Response& operator=(const AliMUONSt1Response & rhs); -private: + private: // typedefs typedef map ParamsMap; typedef map ListMap; - // operators - AliMUONSt1Response& operator=(const AliMUONSt1Response & rhs); - // private methods AliMpZone* FindZone(AliMpSector* sector,Int_t posId) const; // to be moved in AliMpSector:: void ReadFiles(); diff --git a/MUON/AliMUONSt1ResponseParameter.h b/MUON/AliMUONSt1ResponseParameter.h index e3c79bbffb8..d86cda8253e 100644 --- a/MUON/AliMUONSt1ResponseParameter.h +++ b/MUON/AliMUONSt1ResponseParameter.h @@ -5,6 +5,7 @@ * See cxx source for full Copyright notice */ /* $Id$ */ +// Revision of includes 07/05/2004 // Authors: David Guez, Ivana Hrivnacova, Marion MacCormick; IPN Orsay // diff --git a/MUON/AliMUONSt1ResponseRule.h b/MUON/AliMUONSt1ResponseRule.h index 053ae90fcf2..0a12c628632 100644 --- a/MUON/AliMUONSt1ResponseRule.h +++ b/MUON/AliMUONSt1ResponseRule.h @@ -4,6 +4,7 @@ * See cxx source for full Copyright notice */ /* $Id$ */ +// Revision of includes 07/05/2004 // Authors: David Guez, Ivana Hrivnacova, Marion MacCormick; IPN Orsay // diff --git a/MUON/AliMUONSt1Segmentation.cxx b/MUON/AliMUONSt1Segmentation.cxx index 07e231cdced..b1c10046d70 100644 --- a/MUON/AliMUONSt1Segmentation.cxx +++ b/MUON/AliMUONSt1Segmentation.cxx @@ -108,7 +108,8 @@ AliMUONSt1Segmentation::AliMUONSt1Segmentation() } //______________________________________________________________________________ -AliMUONSt1Segmentation::AliMUONSt1Segmentation(const AliMUONSt1Segmentation& rhs) :AliSegmentation(rhs) +AliMUONSt1Segmentation::AliMUONSt1Segmentation(const AliMUONSt1Segmentation& rhs) + : AliSegmentation(rhs) { // Copy constructor Fatal("Copy constructor", diff --git a/MUON/AliMUONSt1Segmentation.h b/MUON/AliMUONSt1Segmentation.h index fad0e4ebf29..dc766b3ac27 100644 --- a/MUON/AliMUONSt1Segmentation.h +++ b/MUON/AliMUONSt1Segmentation.h @@ -5,6 +5,7 @@ * See cxx source for full Copyright notice */ /* $Id$ */ +// Revision of includes 07/05/2004 // Authors: David Guez, Ivana Hrivnacova, Marion MacCormick; IPN Orsay // @@ -30,7 +31,6 @@ class AliMUONSt1Segmentation : public AliSegmentation { public: AliMUONSt1Segmentation(const AliMpPlaneType planeType); - AliMUONSt1Segmentation(const AliMUONSt1Segmentation& rhs); AliMUONSt1Segmentation(); virtual ~AliMUONSt1Segmentation(); @@ -134,10 +134,13 @@ class AliMUONSt1Segmentation : public AliSegmentation virtual TF1* CorrFunc(Int_t isec) const; // Get the correction Function - private: + protected: + AliMUONSt1Segmentation(const AliMUONSt1Segmentation& rhs); + // operators AliMUONSt1Segmentation& operator=(const AliMUONSt1Segmentation & rhs); + private: // methods void UpdateCurrentPadValues(const AliMpPad& pad); diff --git a/MUON/AliMUONSt1SpecialMotif.h b/MUON/AliMUONSt1SpecialMotif.h index 7336b82db71..1cd2e0490fa 100644 --- a/MUON/AliMUONSt1SpecialMotif.h +++ b/MUON/AliMUONSt1SpecialMotif.h @@ -4,6 +4,7 @@ * See cxx source for full Copyright notice */ /* $Id$ */ +// Revision of includes 07/05/2004 // Authors: David Guez, Ivana Hrivnacova, Marion MacCormick; IPN Orsay // diff --git a/MUON/AliMUONSt2GeometryBuilder.cxx b/MUON/AliMUONSt2GeometryBuilder.cxx index 8dbe54333cd..75631c08dbb 100644 --- a/MUON/AliMUONSt2GeometryBuilder.cxx +++ b/MUON/AliMUONSt2GeometryBuilder.cxx @@ -1,3 +1,18 @@ +/************************************************************************** + * 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$ // // Class AliMUONSt2GeometryBuilder @@ -39,6 +54,8 @@ AliMUONSt2GeometryBuilder::AliMUONSt2GeometryBuilder() AliMUONSt2GeometryBuilder::AliMUONSt2GeometryBuilder(const AliMUONSt2GeometryBuilder& rhs) : AliMUONVGeometryBuilder(rhs) { +// Protected copy constructor + Fatal("Copy constructor", "Copy constructor is not implemented."); } @@ -52,6 +69,8 @@ AliMUONSt2GeometryBuilder::~AliMUONSt2GeometryBuilder() { AliMUONSt2GeometryBuilder& AliMUONSt2GeometryBuilder::operator = (const AliMUONSt2GeometryBuilder& rhs) { +// Protected assignement operator + // check assignement to self if (this == &rhs) return *this; diff --git a/MUON/AliMUONSt2GeometryBuilder.h b/MUON/AliMUONSt2GeometryBuilder.h index 018953701e3..985220ab26a 100644 --- a/MUON/AliMUONSt2GeometryBuilder.h +++ b/MUON/AliMUONSt2GeometryBuilder.h @@ -1,4 +1,8 @@ +/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * See cxx source for full Copyright notice */ + // $Id$ +// Revision of includes 07/05/2004 // // Class AliMUONSt2GeometryBuilder // ----------------------------- @@ -17,18 +21,20 @@ class AliMUONSt2GeometryBuilder : public AliMUONVGeometryBuilder { public: AliMUONSt2GeometryBuilder(AliMUON* muon); - AliMUONSt2GeometryBuilder(const AliMUONSt2GeometryBuilder& rhs); AliMUONSt2GeometryBuilder(); virtual ~AliMUONSt2GeometryBuilder(); - - // operators - AliMUONSt2GeometryBuilder& operator = (const AliMUONSt2GeometryBuilder& rhs); // methods virtual void CreateGeometry(); virtual void SetTransformations(); virtual void SetSensitiveVolumes(); + protected: + AliMUONSt2GeometryBuilder(const AliMUONSt2GeometryBuilder& rhs); + + // operators + AliMUONSt2GeometryBuilder& operator = (const AliMUONSt2GeometryBuilder& rhs); + private: AliMUON* fMUON; // the MUON detector class diff --git a/MUON/AliMUONTrack.cxx b/MUON/AliMUONTrack.cxx index 69a2e9f055c..54f370a9fff 100644 --- a/MUON/AliMUONTrack.cxx +++ b/MUON/AliMUONTrack.cxx @@ -25,10 +25,9 @@ // /////////////////////////////////////////////////// -#include // for cout #include // for exit() -#include +#include // for cout #include #include #include @@ -55,7 +54,8 @@ ClassImp(AliMUONTrack) // Class implementation in ROOT context TVirtualFitter* AliMUONTrack::fgFitter = NULL; //__________________________________________________________________________ -AliMUONTrack::AliMUONTrack() +AliMUONTrack::AliMUONTrack() + : TObject() { // Default constructor fgFitter = 0; @@ -66,6 +66,7 @@ AliMUONTrack::AliMUONTrack() //__________________________________________________________________________ AliMUONTrack::AliMUONTrack(AliMUONSegment* BegSegment, AliMUONSegment* EndSegment, AliMUONEventReconstructor* EventReconstructor) + : TObject() { // Constructor from two Segment's fEventReconstructor = EventReconstructor; // link back to EventReconstructor @@ -89,6 +90,7 @@ AliMUONTrack::AliMUONTrack(AliMUONSegment* BegSegment, AliMUONSegment* EndSegmen //__________________________________________________________________________ AliMUONTrack::AliMUONTrack(AliMUONSegment* Segment, AliMUONHitForRec* HitForRec, AliMUONEventReconstructor* EventReconstructor) + : TObject() { // Constructor from one Segment and one HitForRec fEventReconstructor = EventReconstructor; // link back to EventReconstructor @@ -127,38 +129,51 @@ AliMUONTrack::~AliMUONTrack() } //__________________________________________________________________________ -AliMUONTrack::AliMUONTrack (const AliMUONTrack& MUONTrack):TObject(MUONTrack) +AliMUONTrack::AliMUONTrack (const AliMUONTrack& theMUONTrack) + : TObject(theMUONTrack) { - fEventReconstructor = new AliMUONEventReconstructor(*MUONTrack.fEventReconstructor); // is it right ? - fTrackParamAtVertex = MUONTrack.fTrackParamAtVertex; - fTrackHitsPtr = new TObjArray(*MUONTrack.fTrackHitsPtr); // is it right ? - fTrackParamAtHit = new TClonesArray(*MUONTrack.fTrackParamAtHit); - fNTrackHits = MUONTrack.fNTrackHits; - fFitMCS = MUONTrack.fFitMCS; - fFitNParam = MUONTrack.fFitNParam; - fFitFMin = MUONTrack.fFitFMin; - fFitStart = MUONTrack.fFitStart; - fMatchTrigger = MUONTrack.fMatchTrigger; - fChi2MatchTrigger = MUONTrack.fChi2MatchTrigger; + //fEventReconstructor = new AliMUONEventReconstructor(*MUONTrack.fEventReconstructor); + // is it right ? + // NO, because it would use dummy copy constructor + // and AliMUONTrack is not the owner of its EventReconstructor + fEventReconstructor = theMUONTrack.fEventReconstructor; + fTrackParamAtVertex = theMUONTrack.fTrackParamAtVertex; + fTrackHitsPtr = new TObjArray(*theMUONTrack.fTrackHitsPtr); // is it right ? + fTrackParamAtHit = new TClonesArray(*theMUONTrack.fTrackParamAtHit); + fNTrackHits = theMUONTrack.fNTrackHits; + fFitMCS = theMUONTrack.fFitMCS; + fFitNParam = theMUONTrack.fFitNParam; + fFitFMin = theMUONTrack.fFitFMin; + fFitStart = theMUONTrack.fFitStart; + fMatchTrigger = theMUONTrack.fMatchTrigger; + fChi2MatchTrigger = theMUONTrack.fChi2MatchTrigger; } //__________________________________________________________________________ -AliMUONTrack & AliMUONTrack::operator=(const AliMUONTrack& MUONTrack) +AliMUONTrack & AliMUONTrack::operator=(const AliMUONTrack& theMUONTrack) { - if (this == &MUONTrack) + + // check assignement to self + if (this == &theMUONTrack) return *this; - fEventReconstructor = new AliMUONEventReconstructor(*MUONTrack.fEventReconstructor); // is it right ? - fTrackParamAtVertex = MUONTrack.fTrackParamAtVertex; - fTrackHitsPtr = new TObjArray(*MUONTrack.fTrackHitsPtr); // is it right ? - fTrackParamAtHit = new TClonesArray(*MUONTrack.fTrackParamAtHit); - fNTrackHits = MUONTrack.fNTrackHits; - fFitMCS = MUONTrack.fFitMCS; - fFitNParam = MUONTrack.fFitNParam; - fFitFMin = MUONTrack.fFitFMin; - fFitStart = MUONTrack.fFitStart; - fMatchTrigger = MUONTrack.fMatchTrigger; - fChi2MatchTrigger = MUONTrack.fChi2MatchTrigger; + // base class assignement + TObject::operator=(theMUONTrack); + + // fEventReconstructor = new AliMUONEventReconstructor(*MUONTrack.fEventReconstructor); // is it right ? + // is it right ? NO because it would use dummy copy constructor + fEventReconstructor = theMUONTrack.fEventReconstructor; + fTrackParamAtVertex = theMUONTrack.fTrackParamAtVertex; + fTrackHitsPtr = new TObjArray(*theMUONTrack.fTrackHitsPtr); // is it right ? + fTrackParamAtHit = new TClonesArray(*theMUONTrack.fTrackParamAtHit); + fNTrackHits = theMUONTrack.fNTrackHits; + fFitMCS = theMUONTrack.fFitMCS; + fFitNParam = theMUONTrack.fFitNParam; + fFitFMin = theMUONTrack.fFitFMin; + fFitStart = theMUONTrack.fFitStart; + fMatchTrigger = theMUONTrack.fMatchTrigger; + fChi2MatchTrigger = theMUONTrack.fChi2MatchTrigger; + return *this; } @@ -267,7 +282,7 @@ void AliMUONTrack::RecursiveDump(void) const } //__________________________________________________________________________ -Int_t AliMUONTrack::HitsInCommon(AliMUONTrack* Track) +Int_t AliMUONTrack::HitsInCommon(AliMUONTrack* Track) const { // Returns the number of hits in common // between the current track ("this") diff --git a/MUON/AliMUONTrack.h b/MUON/AliMUONTrack.h index be351d7c16e..593f984fa24 100644 --- a/MUON/AliMUONTrack.h +++ b/MUON/AliMUONTrack.h @@ -4,24 +4,28 @@ * See cxx source for full Copyright notice */ /*$Id$*/ +// Revision of includes 07/05/2004 + /////////////////////////////////////////////////// // Reconstructed track in ALICE dimuon spectrometer /////////////////////////////////////////////////// +#include + #include "AliMUONTrackParam.h" // object belongs to the class //const Int_t kMaxTrackingChamber=10; // not used class TObjArray; -class TClonesArray; class TVirtualFitter; class AliMUONEventReconstructor; class AliMUONHitForRec; class AliMUONSegment; -class AliMUONTrack : public TObject { +class AliMUONTrack : public TObject +{ public: AliMUONTrack(); // Default constructor virtual ~AliMUONTrack(); // Destructor @@ -59,7 +63,7 @@ class AliMUONTrack : public TObject { void AddSegment(AliMUONSegment* Segment); // Add Segment void AddHitForRec(AliMUONHitForRec* HitForRec); // Add HitForRec void SetTrackParamAtHit(Int_t indexHit, AliMUONTrackParam *TrackParam) const; - Int_t HitsInCommon(AliMUONTrack* Track); + Int_t HitsInCommon(AliMUONTrack* Track) const; void MatchTriggerTrack(TClonesArray* TriggerTrackArray); static TVirtualFitter* Fitter(void) {return fgFitter;} diff --git a/MUON/AliMUONTrackHit.cxx b/MUON/AliMUONTrackHit.cxx index 2ff7cdb7820..e8ae95bd5a2 100644 --- a/MUON/AliMUONTrackHit.cxx +++ b/MUON/AliMUONTrackHit.cxx @@ -25,11 +25,21 @@ // /////////////////////////////////////////////////////// -#include "AliMUONHitForRec.h" #include "AliMUONTrackHit.h" +#include "AliMUONHitForRec.h" ClassImp(AliMUONTrackHit) // Class implementation in ROOT context + //__________________________________________________________________________ +AliMUONTrackHit::AliMUONTrackHit() + : TObject() +{ + // Default constructor + fHitForRecPtr = 0; + fNextTrackHitWithSameHitForRec = 0; + fPrevTrackHitWithSameHitForRec = 0; +} + //__________________________________________________________________________ AliMUONTrackHit::AliMUONTrackHit(AliMUONHitForRec* Hit) { @@ -50,16 +60,24 @@ AliMUONTrackHit::AliMUONTrackHit(AliMUONHitForRec* Hit) } //__________________________________________________________________________ -AliMUONTrackHit::AliMUONTrackHit (const AliMUONTrackHit& MUONTrackHit):TObject(MUONTrackHit) +AliMUONTrackHit::AliMUONTrackHit (const AliMUONTrackHit& theMUONTrackHit) + : TObject(theMUONTrackHit) { -// Dummy copy constructor +// Protected copy constructor + + Fatal("AliMUONTrackHit", "Not implemented."); } //__________________________________________________________________________ -AliMUONTrackHit & AliMUONTrackHit::operator=(const AliMUONTrackHit& /*MUONTrackHit*/) +AliMUONTrackHit & AliMUONTrackHit::operator=(const AliMUONTrackHit& rhs) { -// Dummy assignment operator - return *this; +// Protected assignement operator + + if (this == &rhs) return *this; + + Fatal("operator=", "Not implemented."); + + return *this; } diff --git a/MUON/AliMUONTrackHit.h b/MUON/AliMUONTrackHit.h index f623deed533..e9669cb8ff7 100644 --- a/MUON/AliMUONTrackHit.h +++ b/MUON/AliMUONTrackHit.h @@ -4,6 +4,7 @@ * See cxx source for full Copyright notice */ /*$Id$*/ +// Revision of includes 07/05/2004 /////////////////////////////////////////////////////// // Reconstructed track hit in ALICE dimuon spectrometer @@ -14,17 +15,11 @@ class AliMUONHitForRec; -class AliMUONTrackHit : public TObject { +class AliMUONTrackHit : public TObject +{ public: - AliMUONTrackHit(){ - // Constructor - fHitForRecPtr = 0; - fNextTrackHitWithSameHitForRec = 0; - fPrevTrackHitWithSameHitForRec = 0; - } // Constructor + AliMUONTrackHit(); // Constructor virtual ~AliMUONTrackHit(); // Destructor - AliMUONTrackHit (const AliMUONTrackHit& AliMUONTrackHit); // copy constructor - AliMUONTrackHit& operator=(const AliMUONTrackHit& AliMUONTrackHit); // assignment operator AliMUONTrackHit(AliMUONHitForRec* Hit); // Constructor from one HitForRec // Inline functions for Get and Set @@ -39,6 +34,9 @@ class AliMUONTrackHit : public TObject { Int_t Compare(const TObject* TrackHit) const; // "Compare" function for sorting protected: + AliMUONTrackHit (const AliMUONTrackHit& AliMUONTrackHit); // copy constructor + AliMUONTrackHit& operator=(const AliMUONTrackHit& AliMUONTrackHit); // assignment operator + private: void SetNextTrackHitWithSameHitForRec(AliMUONTrackHit *Next) {fNextTrackHitWithSameHitForRec = Next;} void SetPrevTrackHitWithSameHitForRec(AliMUONTrackHit *Prev) {fPrevTrackHitWithSameHitForRec = Prev;} diff --git a/MUON/AliMUONTrackK.cxx b/MUON/AliMUONTrackK.cxx index a5e46afa3c7..84b06e5b141 100644 --- a/MUON/AliMUONTrackK.cxx +++ b/MUON/AliMUONTrackK.cxx @@ -13,14 +13,13 @@ * provided "as is" without express or implied warranty. * **************************************************************************/ -#include "AliMUONTrackK.h" +#include // for exit() #include #include -#include #include -#include // for exit() +#include "AliMUONTrackK.h" #include "AliCallf77.h" #include "AliMUON.h" #include "AliMUONChamber.h" @@ -30,7 +29,7 @@ #include "AliMUONRawCluster.h" #include "AliMUONTrackParam.h" #include "AliRun.h" -#include "AliMagF.h" +//#include "AliMagF.h" const Int_t AliMUONTrackK::fgkSize = 5; const Int_t AliMUONTrackK::fgkNSigma = 4; @@ -82,6 +81,7 @@ TClonesArray* AliMUONTrackK::fgHitForRec = NULL; //__________________________________________________________________________ AliMUONTrackK::AliMUONTrackK() + : TObject() { // Default constructor @@ -104,6 +104,7 @@ AliMUONTrackK::AliMUONTrackK() //__________________________________________________________________________ AliMUONTrackK::AliMUONTrackK(AliMUONEventReconstructor *EventReconstructor, TClonesArray *hitForRec) + : TObject() { // Constructor @@ -127,6 +128,7 @@ AliMUONTrackK::AliMUONTrackK(AliMUONEventReconstructor *EventReconstructor, TClo //__________________________________________________________________________ AliMUONTrackK::AliMUONTrackK(AliMUONSegment *segment) + : TObject() { // Constructor from a segment Double_t dX, dY, dZ; @@ -217,9 +219,12 @@ AliMUONTrackK::~AliMUONTrackK() } //__________________________________________________________________________ -AliMUONTrackK::AliMUONTrackK (const AliMUONTrackK& source):TObject(source) +AliMUONTrackK::AliMUONTrackK (const AliMUONTrackK& source) + : TObject(source) { -// Dummy copy constructor +// Protected copy constructor + + Fatal("AliMUONTrackK", "Not implemented."); } //__________________________________________________________________________ @@ -228,6 +233,10 @@ AliMUONTrackK & AliMUONTrackK::operator=(const AliMUONTrackK& source) // Assignment operator // Members if(&source == this) return *this; + + // base class assignement + TObject::operator=(source); + fStartSegment = source.fStartSegment; fNTrackHits = source.fNTrackHits; fChi2 = source.fChi2; @@ -652,8 +661,8 @@ void AliMUONTrackK::WeightPropagation(Double_t zEnd) Int_t i, j; Double_t dPar; - TMatrixD Jacob(fgkSize,fgkSize); - Jacob = 0; + TMatrixD jacob(fgkSize,fgkSize); + jacob = 0; // Save initial and propagated parameters TMatrixD trackPar0 = *fTrackPar; @@ -681,23 +690,23 @@ void AliMUONTrackK::WeightPropagation(Double_t zEnd) (*fTrackPar)(i,0) += dPar; ParPropagation(zEnd); for (j=0; jPrint(); + //jacob->Print(); //trackParNew0.Print(); - //TMatrixD par1(Jacob,TMatrixD::kMult,trackPar0); // + //TMatrixD par1(jacob,TMatrixD::kMult,trackPar0); // //par1.Print(); /* - if (Jacob.Determinant() != 0) { - // Jacob.Invert(); + if (jacob.Determinant() != 0) { + // jacob.Invert(); } else { - cout << " ***** Warning in WeightPropagation: Determinant Jacob=0:" << endl; + cout << " ***** Warning in WeightPropagation: Determinant jacob=0:" << endl; } */ - TMatrixD weight1(*fWeight,TMatrixD::kMult,Jacob); // WD - *fWeight = TMatrixD(Jacob,TMatrixD::kTransposeMult,weight1); // DtWD + TMatrixD weight1(*fWeight,TMatrixD::kMult,jacob); // WD + *fWeight = TMatrixD(jacob,TMatrixD::kTransposeMult,weight1); // DtWD //fWeight->Print(); // Restore initial and propagated parameters @@ -714,12 +723,12 @@ Bool_t AliMUONTrackK::FindPoint(Int_t ichamb, Double_t zEnd, Int_t currIndx, Int // Picks up point within a window for the chamber No ichamb // Split the track if there are more than 1 hit Int_t ihit, nRecTracks; - Double_t WindowB, WindowNonB, dChi2Tmp=0, dChi2, y, x, savePosition=0; + Double_t windowB, windowNonB, dChi2Tmp=0, dChi2, y, x, savePosition=0; TClonesArray *trackPtr; AliMUONHitForRec *hit, *hitLoop; AliMUONTrackK *trackK; - Bool_t Ok = kFALSE; + Bool_t ok = kFALSE; //sigmaB = fgEventReconstructor->GetBendingResolution(); // bending resolution //sigmaNonB = fgEventReconstructor->GetNonBendingResolution(); // non-bending resolution *fCovariance = *fWeight; @@ -733,8 +742,8 @@ Bool_t AliMUONTrackK::FindPoint(Int_t ichamb, Double_t zEnd, Int_t currIndx, Int } else { cout << " ***** Warning in FindPoint: Determinant fCovariance=0:" << endl; } - //WindowB = fgkNSigma*TMath::Sqrt((*fCovariance)(0,0)+sigmaB*sigmaB); - //WindowNonB = fgkNSigma*TMath::Sqrt((*fCovariance)(1,1)+sigmaNonB*sigmaNonB); + //windowB = fgkNSigma*TMath::Sqrt((*fCovariance)(0,0)+sigmaB*sigmaB); + //windowNonB = fgkNSigma*TMath::Sqrt((*fCovariance)(1,1)+sigmaNonB*sigmaNonB); // Loop over all hits and take hits from the chamber TMatrixD pointWeight(fgkSize,fgkSize); TMatrixD saveWeight = pointWeight; @@ -770,10 +779,10 @@ Bool_t AliMUONTrackK::FindPoint(Int_t ichamb, Double_t zEnd, Int_t currIndx, Int } y = hit->GetBendingCoor(); x = hit->GetNonBendingCoor(); - WindowB = fgkNSigma*TMath::Sqrt((*fCovariance)(0,0)+hit->GetBendingReso2()); - WindowNonB = fgkNSigma*TMath::Sqrt((*fCovariance)(1,1)+hit->GetNonBendingReso2()); - if (TMath::Abs((*fTrackParNew)(0,0)-y) <= WindowB && - TMath::Abs((*fTrackParNew)(1,0)-x) <= WindowNonB) { + windowB = fgkNSigma*TMath::Sqrt((*fCovariance)(0,0)+hit->GetBendingReso2()); + windowNonB = fgkNSigma*TMath::Sqrt((*fCovariance)(1,1)+hit->GetNonBendingReso2()); + if (TMath::Abs((*fTrackParNew)(0,0)-y) <= windowB && + TMath::Abs((*fTrackParNew)(1,0)-x) <= windowNonB) { // Vector of measurements and covariance matrix point.Zero(); point(0,0) = y; @@ -782,7 +791,7 @@ Bool_t AliMUONTrackK::FindPoint(Int_t ichamb, Double_t zEnd, Int_t currIndx, Int pointWeight(1,1) = 1/hit->GetNonBendingReso2(); TryPoint(point,pointWeight,trackPar,dChi2); if (TMath::Abs(1./(trackPar)(4,0)) < fgEventReconstructor->GetMinBendingMomentum()) continue; // p < p_min - next hit - Ok = kTRUE; + ok = kTRUE; nHitsOK++; //if (nHitsOK > -1) { if (nHitsOK == 1) { @@ -839,7 +848,7 @@ Bool_t AliMUONTrackK::FindPoint(Int_t ichamb, Double_t zEnd, Int_t currIndx, Int } } else break; // different chamber } // for (ihit=currIndx; - if (Ok) { + if (ok) { *fTrackPar = trackParTmp; *fWeight = saveWeight; *fWeight += pointWeightTmp; @@ -847,7 +856,7 @@ Bool_t AliMUONTrackK::FindPoint(Int_t ichamb, Double_t zEnd, Int_t currIndx, Int // Restore members fPosition = savePosition; } - return Ok; + return ok; } //__________________________________________________________________________ @@ -995,7 +1004,7 @@ Int_t AliMUONTrackK::Compare(const TObject* trackK) const } //__________________________________________________________________________ -Bool_t AliMUONTrackK::KeepTrack(AliMUONTrackK* track0) +Bool_t AliMUONTrackK::KeepTrack(AliMUONTrackK* track0) const { // Check whether or not to keep current track // (keep, if it has less than half of common hits with track0) @@ -1112,7 +1121,7 @@ void AliMUONTrackK::GoToVertex(void) // R > 1 // R < 1 - Double_t dZ, r0Norm, X0, deltaP, dChi2, pTotal, pOld; + Double_t dZ, r0Norm, x0, deltaP, dChi2, pTotal, pOld; AliMUONHitForRec *hit; AliMUONRawCluster *clus; TClonesArray *rawclusters; @@ -1132,9 +1141,9 @@ void AliMUONTrackK::GoToVertex(void) ParPropagation(zPos[i]); WeightPropagation(zPos[i]); dZ = TMath::Abs (fPositionNew-fPosition); - if (r0Norm > 1) X0 = x01[i]; - else X0 = x02[i]; - MSLine(dZ,X0); // multiple scattering in the medium (linear approximation) + if (r0Norm > 1) x0 = x01[i]; + else x0 = x02[i]; + MSLine(dZ,x0); // multiple scattering in the medium (linear approximation) fPosition = fPositionNew; *fTrackPar = *fTrackParNew; r0Norm = (*fTrackPar)(0,0)*(*fTrackPar)(0,0) + @@ -1259,7 +1268,7 @@ void AliMUONTrackK::GoToVertex(void) } //__________________________________________________________________________ -void AliMUONTrackK::MSLine(Double_t dZ, Double_t X0) +void AliMUONTrackK::MSLine(Double_t dZ, Double_t x0) { // Adds multiple scattering in a thick layer for linear propagation @@ -1274,7 +1283,7 @@ void AliMUONTrackK::MSLine(Double_t dZ, Double_t X0) Double_t step = TMath::Abs(dZ)/cosAlph/cosBeta; // step length // Projected scattering angle - Double_t theta0 = 0.0136/velo/momentum/TMath::Sqrt(X0)*(1+0.038*TMath::Log(step/X0)); + Double_t theta0 = 0.0136/velo/momentum/TMath::Sqrt(x0)*(1+0.038*TMath::Log(step/x0)); Double_t theta02 = theta0*theta0; Double_t dl2 = step*step/2*theta02; Double_t dl3 = dl2*step*2/3; diff --git a/MUON/AliMUONTrackK.h b/MUON/AliMUONTrackK.h index 188fa4206d6..8eea8e2252b 100644 --- a/MUON/AliMUONTrackK.h +++ b/MUON/AliMUONTrackK.h @@ -3,11 +3,15 @@ /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * See cxx source for full Copyright notice */ -#include -class TArrayD; +/*$Id$*/ +// Revision of includes 07/05/2004 + +#include + class TMatrixD; class AliMUONEventReconstructor; class TClonesArray; +class TObjArray; class AliMUONSegment; class AliMUON; class AliMUONHitForRec; @@ -18,8 +22,6 @@ class AliMUONTrackK : public TObject { AliMUONTrackK(); // Default constructor virtual ~AliMUONTrackK(); // Destructor - AliMUONTrackK (const AliMUONTrackK& source); // copy constructor - AliMUONTrackK& operator=(const AliMUONTrackK& source); // assignment operator //AliMUONTrackK(const AliMUONEventReconstructor *EventReconstructor, const AliMUONHitForRec *hitForRec); // Constructor AliMUONTrackK(AliMUONEventReconstructor *EventReconstructor, TClonesArray *hitForRec); // Constructor @@ -42,7 +44,7 @@ class AliMUONTrackK : public TObject { Bool_t KalmanFilter(Int_t ichamBeg, Int_t ichamEnd, Bool_t Back, Double_t zDipole1, Double_t zDipole2); // Kalman filter void StartBack(void); // start backpropagator void SetTrackQuality(Int_t iChi2); // compute track quality or Chi2 - Bool_t KeepTrack(AliMUONTrackK* track0); // keep or discard track + Bool_t KeepTrack(AliMUONTrackK* track0) const; // keep or discard track void Kill(void); // kill track candidate void Branson(void); // Branson correction void GoToZ(Double_t zEnd); // propagate track to given Z @@ -56,6 +58,9 @@ class AliMUONTrackK : public TObject { protected: + AliMUONTrackK (const AliMUONTrackK& source); // copy constructor + AliMUONTrackK& operator=(const AliMUONTrackK& source); // assignment operator + private: static Int_t fgNOfPoints; // number of points in event diff --git a/MUON/AliMUONTrackParam.cxx b/MUON/AliMUONTrackParam.cxx index a64ed48ae9e..f05505a548a 100644 --- a/MUON/AliMUONTrackParam.cxx +++ b/MUON/AliMUONTrackParam.cxx @@ -70,31 +70,50 @@ extern "C" { Field[0] = b[0]; Field[1] = b[1]; Field[2] = b[2]; } } + //_________________________________________________________________________ +AliMUONTrackParam::AliMUONTrackParam() + : TObject() +{ +// Constructor -AliMUONTrackParam& AliMUONTrackParam::operator=(const AliMUONTrackParam& MUONTrackParam) + fInverseBendingMomentum = 0; + fBendingSlope = 0; + fNonBendingSlope = 0; + fZ = 0; + fBendingCoor = 0; + fNonBendingCoor = 0; +} + + //_________________________________________________________________________ +AliMUONTrackParam& +AliMUONTrackParam::operator=(const AliMUONTrackParam& theMUONTrackParam) { - if (this == &MUONTrackParam) + if (this == &theMUONTrackParam) return *this; - fInverseBendingMomentum = MUONTrackParam.fInverseBendingMomentum; - fBendingSlope = MUONTrackParam.fBendingSlope; - fNonBendingSlope = MUONTrackParam.fNonBendingSlope; - fZ = MUONTrackParam.fZ; - fBendingCoor = MUONTrackParam.fBendingCoor; - fNonBendingCoor = MUONTrackParam.fNonBendingCoor; + // base class assignement + TObject::operator=(theMUONTrackParam); + + fInverseBendingMomentum = theMUONTrackParam.fInverseBendingMomentum; + fBendingSlope = theMUONTrackParam.fBendingSlope; + fNonBendingSlope = theMUONTrackParam.fNonBendingSlope; + fZ = theMUONTrackParam.fZ; + fBendingCoor = theMUONTrackParam.fBendingCoor; + fNonBendingCoor = theMUONTrackParam.fNonBendingCoor; return *this; } //_________________________________________________________________________ -AliMUONTrackParam::AliMUONTrackParam(const AliMUONTrackParam& MUONTrackParam):TObject(MUONTrackParam) +AliMUONTrackParam::AliMUONTrackParam(const AliMUONTrackParam& theMUONTrackParam) + : TObject(theMUONTrackParam) { - fInverseBendingMomentum = MUONTrackParam.fInverseBendingMomentum; - fBendingSlope = MUONTrackParam.fBendingSlope; - fNonBendingSlope = MUONTrackParam.fNonBendingSlope; - fZ = MUONTrackParam.fZ; - fBendingCoor = MUONTrackParam.fBendingCoor; - fNonBendingCoor = MUONTrackParam.fNonBendingCoor; + fInverseBendingMomentum = theMUONTrackParam.fInverseBendingMomentum; + fBendingSlope = theMUONTrackParam.fBendingSlope; + fNonBendingSlope = theMUONTrackParam.fNonBendingSlope; + fZ = theMUONTrackParam.fZ; + fBendingCoor = theMUONTrackParam.fBendingCoor; + fNonBendingCoor = theMUONTrackParam.fNonBendingCoor; } //__________________________________________________________________________ diff --git a/MUON/AliMUONTrackParam.h b/MUON/AliMUONTrackParam.h index 689400b5bdd..ce09432017b 100644 --- a/MUON/AliMUONTrackParam.h +++ b/MUON/AliMUONTrackParam.h @@ -4,6 +4,7 @@ * See cxx source for full Copyright notice */ /*$Id$*/ +// Revision of includes 07/05/2004 /////////////////////////////////////////////////// // Track parameters in ALICE dimuon spectrometer @@ -11,17 +12,10 @@ #include -class AliMUONTrackParam : public TObject { +class AliMUONTrackParam : public TObject +{ public: - AliMUONTrackParam(){ - fInverseBendingMomentum = 0; - fBendingSlope = 0; - fNonBendingSlope = 0; - fZ = 0; - fBendingCoor = 0; - fNonBendingCoor = 0; - // Constructor - } // Constructor + AliMUONTrackParam(); // Constructor virtual ~AliMUONTrackParam(){} // Destructor AliMUONTrackParam(const AliMUONTrackParam& rhs);// copy constructor (should be added per default !) diff --git a/MUON/AliMUONTransientDigit.cxx b/MUON/AliMUONTransientDigit.cxx index 9586d67ed7d..865d817789b 100644 --- a/MUON/AliMUONTransientDigit.cxx +++ b/MUON/AliMUONTransientDigit.cxx @@ -15,18 +15,30 @@ /* $Id$ */ -#include "AliMUONTransientDigit.h" #include -#include "TVector.h" +#include + +#include "AliMUONTransientDigit.h" ClassImp(AliMUONTransientDigit) +//____________________________________________________________________________ +AliMUONTransientDigit::AliMUONTransientDigit() + : AliMUONDigit() +{ +// Constructor + + fTrackList=0; +} //____________________________________________________________________________ - AliMUONTransientDigit::AliMUONTransientDigit(const AliMUONTransientDigit& digit):AliMUONDigit(digit) + AliMUONTransientDigit::AliMUONTransientDigit(const AliMUONTransientDigit& digit) + : AliMUONDigit(digit) { -// dummy copy constructor +// Protected copy constructor + + Fatal("AliMUONFTransientDigit", "Not implemented."); } @@ -49,10 +61,16 @@ AliMUONTransientDigit::~AliMUONTransientDigit() } //////////////////////////////////////////////////////////////////////// -AliMUONTransientDigit& AliMUONTransientDigit::operator =(const AliMUONTransientDigit& /*rhs*/) +AliMUONTransientDigit& +AliMUONTransientDigit::operator =(const AliMUONTransientDigit& rhs) { -// Dummy assignment operator - return *this; +// Protected assignement operator + + if (this == &rhs) return *this; + + Fatal("operator=", "Not implemented."); + + return *this; } //////////////////////////////////////////////////////////////////////// diff --git a/MUON/AliMUONTransientDigit.h b/MUON/AliMUONTransientDigit.h index 3a1a7c1ca61..23208714ec2 100644 --- a/MUON/AliMUONTransientDigit.h +++ b/MUON/AliMUONTransientDigit.h @@ -5,15 +5,16 @@ * See cxx source for full Copyright notice */ /* $Id$ */ +// Revision of includes 07/05/2004 #include "AliMUONDigit.h" -#include "TObjArray.h" + +class TObjArray; class AliMUONTransientDigit : public AliMUONDigit { public: - AliMUONTransientDigit() {fTrackList=0;} - AliMUONTransientDigit(const AliMUONTransientDigit& digit); + AliMUONTransientDigit(); AliMUONTransientDigit(Int_t rpad, Int_t *digits); virtual ~AliMUONTransientDigit(); @@ -23,9 +24,11 @@ class AliMUONTransientDigit : public AliMUONDigit Int_t GetCharge(Int_t i) const; void AddToTrackList(Int_t track, Int_t charge); void UpdateTrackList(Int_t track, Int_t charge); - AliMUONTransientDigit & operator =(const AliMUONTransientDigit & rhs); protected: + AliMUONTransientDigit(const AliMUONTransientDigit& digit); + AliMUONTransientDigit & operator =(const AliMUONTransientDigit & rhs); + Int_t fChamber; // chamber number of pad TObjArray *fTrackList; // List of tracks contributing diff --git a/MUON/AliMUONTriggerCircuit.cxx b/MUON/AliMUONTriggerCircuit.cxx index 0dc2a678b6d..fd0e4f9d384 100644 --- a/MUON/AliMUONTriggerCircuit.cxx +++ b/MUON/AliMUONTriggerCircuit.cxx @@ -15,20 +15,20 @@ /* $Id$ */ +#include + +#include "AliMUONTriggerCircuit.h" #include "AliRun.h" #include "AliMUON.h" -#include "AliMUONTriggerCircuit.h" #include "AliMUONTriggerConstants.h" #include "AliSegmentation.h" -#include "AliMUONResponse.h" #include "AliMUONChamber.h" -#include "TMath.h" -#include "Riostream.h" ClassImp(AliMUONTriggerCircuit) //---------------------------------------------------------------------- -AliMUONTriggerCircuit::AliMUONTriggerCircuit() +AliMUONTriggerCircuit::AliMUONTriggerCircuit() + : TObject() { // Constructor fSegmentation=0; @@ -49,16 +49,25 @@ AliMUONTriggerCircuit::AliMUONTriggerCircuit() } //---------------------------------------------------------------------- -AliMUONTriggerCircuit::AliMUONTriggerCircuit(const AliMUONTriggerCircuit& MUONTriggerCircuit):TObject(MUONTriggerCircuit) +AliMUONTriggerCircuit::AliMUONTriggerCircuit(const AliMUONTriggerCircuit& theMUONTriggerCircuit) + : TObject(theMUONTriggerCircuit) { -// Dummy copy constructor +// Protected copy constructor + + Fatal("AliMUONTriggerCircuit", "Not implemented."); } //---------------------------------------------------------------------- -AliMUONTriggerCircuit & AliMUONTriggerCircuit::operator=(const AliMUONTriggerCircuit& /*MUONTriggerCircuit*/) +AliMUONTriggerCircuit & +AliMUONTriggerCircuit::operator=(const AliMUONTriggerCircuit& rhs) { -// Dummy assignment operator - return *this; +// Protected assignement operator + + if (this == &rhs) return *this; + + Fatal("operator=", "Not implemented."); + + return *this; } //---------------------------------------------------------------------- @@ -73,7 +82,7 @@ void AliMUONTriggerCircuit::Init(Int_t iCircuit) { } //---------------------------------------------------------------------- -Int_t AliMUONTriggerCircuit::CircuitNumber(Int_t idCircuit){ +Int_t AliMUONTriggerCircuit::CircuitNumber(Int_t idCircuit) const { // returns circuit number iCircuit (0-234) corresponding to circuit idCircuit Int_t iCircuit=0; for (Int_t i=0; i<234; i++) { @@ -85,7 +94,7 @@ Int_t AliMUONTriggerCircuit::CircuitNumber(Int_t idCircuit){ return iCircuit; } //---------------------------------------------------------------------- -Int_t AliMUONTriggerCircuit::ModuleNumber(Int_t idModule){ +Int_t AliMUONTriggerCircuit::ModuleNumber(Int_t idModule) const { // returns module number imod (from 0 to 63) corresponding to module idmodule Int_t absidModule=TMath::Abs(idModule); Int_t iModule=0; @@ -99,12 +108,12 @@ Int_t AliMUONTriggerCircuit::ModuleNumber(Int_t idModule){ } //---------------------------------------------------------------------- -Int_t AliMUONTriggerCircuit::Module(Int_t idCircuit) { +Int_t AliMUONTriggerCircuit::Module(Int_t idCircuit) const { // returns ModuleId where Circuit idCircuit is sitting return Int_t(idCircuit/10); } //---------------------------------------------------------------------- -Int_t AliMUONTriggerCircuit::Position(Int_t idCircuit) { +Int_t AliMUONTriggerCircuit::Position(Int_t idCircuit) const { // returns position of idCircuit in correcponding Module return TMath::Abs(idCircuit)-TMath::Abs(Module(idCircuit))*10; } @@ -385,39 +394,39 @@ Float_t AliMUONTriggerCircuit::PtCal(Int_t istripX, Int_t idev, Int_t istripY){ //---------------------------------------------------------------------- //--- methods which return member data related info //---------------------------------------------------------------------- -Int_t AliMUONTriggerCircuit::GetIdCircuit(){ +Int_t AliMUONTriggerCircuit::GetIdCircuit() const { // returns circuit Id return fIdCircuit; } //---------------------------------------------------------------------- -Int_t AliMUONTriggerCircuit::GetIdModule(){ +Int_t AliMUONTriggerCircuit::GetIdModule() const { // returns module Id return Module(fIdCircuit); } //---------------------------------------------------------------------- -Int_t AliMUONTriggerCircuit::GetNstripX() { +Int_t AliMUONTriggerCircuit::GetNstripX() const { // returns the number of X strips in the module where the circuit is sitting return AliMUONTriggerConstants::NstripX(ModuleNumber(Module(fIdCircuit))); } //---------------------------------------------------------------------- -Int_t AliMUONTriggerCircuit::GetNstripY() { +Int_t AliMUONTriggerCircuit::GetNstripY() const { // returns the number of Y strips in the module where the circuit is sitting return AliMUONTriggerConstants::NstripY(ModuleNumber(Module(fIdCircuit))); } //---------------------------------------------------------------------- -Int_t AliMUONTriggerCircuit::GetPosCircuit() { +Int_t AliMUONTriggerCircuit::GetPosCircuit() const { // returns the position of the circuit in its module return Position(fIdCircuit); } //---------------------------------------------------------------------- -Int_t AliMUONTriggerCircuit::GetIdCircuitD(){ +Int_t AliMUONTriggerCircuit::GetIdCircuitD() const { // returns the Id of the circuit down Int_t idModule=Module(fIdCircuit); Int_t idModuleD=(TMath::Abs(idModule)+10)*(TMath::Abs(idModule)/idModule); return (TMath::Abs(idModuleD)*10+1)*(TMath::Abs(idModule)/idModule); } //---------------------------------------------------------------------- -Int_t AliMUONTriggerCircuit::GetICircuitD(){ +Int_t AliMUONTriggerCircuit::GetICircuitD() const { // returns the number of the circuit down Int_t idModule=Module(fIdCircuit); Int_t idModuleD=(TMath::Abs(idModule)+10)*(TMath::Abs(idModule)/idModule); @@ -426,14 +435,14 @@ Int_t AliMUONTriggerCircuit::GetICircuitD(){ return CircuitNumber(idCircuitD); } //---------------------------------------------------------------------- -Int_t AliMUONTriggerCircuit::GetIdCircuitU(){ +Int_t AliMUONTriggerCircuit::GetIdCircuitU() const { // returns the Id of the circuit up Int_t idModule=Module(fIdCircuit); Int_t idModuleU=(TMath::Abs(idModule)-10)*(TMath::Abs(idModule)/idModule); return (TMath::Abs(idModuleU)*10+1)*(TMath::Abs(idModule)/idModule); } //---------------------------------------------------------------------- -Int_t AliMUONTriggerCircuit::GetICircuitU(){ +Int_t AliMUONTriggerCircuit::GetICircuitU() const { // returns the number of the circuit up Int_t idModule=Module(fIdCircuit); Int_t idModuleU=(TMath::Abs(idModule)-10)*(TMath::Abs(idModule)/idModule); @@ -442,43 +451,43 @@ Int_t AliMUONTriggerCircuit::GetICircuitU(){ return CircuitNumber(idCircuitU); } //---------------------------------------------------------------------- -Int_t AliMUONTriggerCircuit::GetX2m(){ +Int_t AliMUONTriggerCircuit::GetX2m() const { // returns fX2m return fX2m; } //---------------------------------------------------------------------- -Int_t AliMUONTriggerCircuit::GetX2ud(){ +Int_t AliMUONTriggerCircuit::GetX2ud() const { // returns fX2ud return fX2ud; } //---------------------------------------------------------------------- -void AliMUONTriggerCircuit::GetOrMud(Int_t orMud[2]){ +void AliMUONTriggerCircuit::GetOrMud(Int_t orMud[2]) const { // returns fOrMud orMud[0]=fOrMud[0]; orMud[1]=fOrMud[1]; } //---------------------------------------------------------------------- -Int_t AliMUONTriggerCircuit::GetXcode(Int_t chamber, Int_t istrip){ +Int_t AliMUONTriggerCircuit::GetXcode(Int_t chamber, Int_t istrip) const { // returns X code of circuit/chamber/istrip (warning : chamber in [0,3]) return fXcode[chamber][istrip]; } //---------------------------------------------------------------------- -Int_t AliMUONTriggerCircuit::GetYcode(Int_t chamber, Int_t istrip){ +Int_t AliMUONTriggerCircuit::GetYcode(Int_t chamber, Int_t istrip) const { // returns Y code of circuit/chamber/istrip (warning : chamber in [0,3]) return fYcode[chamber][istrip]; } //---------------------------------------------------------------------- -Float_t AliMUONTriggerCircuit::GetY11Pos(Int_t istrip){ +Float_t AliMUONTriggerCircuit::GetY11Pos(Int_t istrip) const { // returns Y position of X strip istrip in MC11 return fYpos11[istrip]; } //---------------------------------------------------------------------- -Float_t AliMUONTriggerCircuit::GetY21Pos(Int_t istrip){ +Float_t AliMUONTriggerCircuit::GetY21Pos(Int_t istrip) const { // returns Y position of X strip istrip in MC21 return fYpos21[istrip]; } //---------------------------------------------------------------------- -Float_t AliMUONTriggerCircuit::GetX11Pos(Int_t istrip){ +Float_t AliMUONTriggerCircuit::GetX11Pos(Int_t istrip) const { // returns X position of Y strip istrip in MC11 return fXpos11[istrip]; } diff --git a/MUON/AliMUONTriggerCircuit.h b/MUON/AliMUONTriggerCircuit.h index dc5d874b1d8..8688058a884 100644 --- a/MUON/AliMUONTriggerCircuit.h +++ b/MUON/AliMUONTriggerCircuit.h @@ -1,21 +1,23 @@ #ifndef ALIMUONTRIGGERCIRCUIT_H #define ALIMUONTRIGGERCIRCUIT_H +/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * See cxx source for full Copyright notice */ -#include "TObjArray.h" -#include -#include "AliMUONSegmentationTrigger.h" +/* $Id$ */ +// Revision of includes 07/05/2004 -class AliMUONSegmentationTrigger; -//---------------------------------------------- -class AliMUONTriggerCircuit : -public TObject { +#include +#include + +#include "AliSegmentation.h" + +class TObjArray; + +class AliMUONTriggerCircuit : public TObject +{ public: AliMUONTriggerCircuit(); virtual ~AliMUONTriggerCircuit(){;} - // copy constructor - AliMUONTriggerCircuit(const AliMUONTriggerCircuit& AliMUONTriggerCircuit); - // assignment operator - AliMUONTriggerCircuit& operator=(const AliMUONTriggerCircuit& AliMUONTriggerCircuit); // initializations void Init(Int_t iCircuit); @@ -24,23 +26,23 @@ public TObject { Float_t PtCal(Int_t istripX, Int_t idev, Int_t istripY); //--- methods which return member data related info - Int_t GetIdCircuit(); - Int_t GetIdModule(); - Int_t GetNstripX(); - Int_t GetNstripY(); - Int_t GetPosCircuit(); - Int_t GetIdCircuitD(); - Int_t GetICircuitD(); - Int_t GetIdCircuitU(); - Int_t GetICircuitU(); - Int_t GetX2m(); - Int_t GetX2ud(); - void GetOrMud(Int_t orMud[2]); - Int_t GetXcode(Int_t chamber, Int_t istrip); - Int_t GetYcode(Int_t chamber, Int_t istrip); - Float_t GetY11Pos(Int_t istrip); - Float_t GetY21Pos(Int_t istrip); - Float_t GetX11Pos(Int_t istrip); + Int_t GetIdCircuit() const; + Int_t GetIdModule() const; + Int_t GetNstripX() const; + Int_t GetNstripY() const; + Int_t GetPosCircuit() const; + Int_t GetIdCircuitD() const; + Int_t GetICircuitD() const; + Int_t GetIdCircuitU() const; + Int_t GetICircuitU() const; + Int_t GetX2m() const; + Int_t GetX2ud() const; + void GetOrMud(Int_t orMud[2]) const; + Int_t GetXcode(Int_t chamber, Int_t istrip) const; + Int_t GetYcode(Int_t chamber, Int_t istrip) const; + Float_t GetY11Pos(Int_t istrip) const; + Float_t GetY21Pos(Int_t istrip) const; + Float_t GetX11Pos(Int_t istrip) const; // Get reference to segmentation model virtual AliSegmentation* SegmentationModel(Int_t isec) { @@ -48,13 +50,18 @@ public TObject { } protected: + // copy constructor + AliMUONTriggerCircuit(const AliMUONTriggerCircuit& AliMUONTriggerCircuit); + // assignment operator + AliMUONTriggerCircuit& operator=(const AliMUONTriggerCircuit& AliMUONTriggerCircuit); + TObjArray *fSegmentation; // pointer to segmentation private: - Int_t CircuitNumber(Int_t idCircuit); - Int_t ModuleNumber(Int_t idModule); - Int_t Module(Int_t idCircuit); - Int_t Position(Int_t idCircuit); + Int_t CircuitNumber(Int_t idCircuit) const; + Int_t ModuleNumber(Int_t idModule) const; + Int_t Module(Int_t idCircuit) const; + Int_t Position(Int_t idCircuit) const; void LoadX2(); void LoadXCode(); void LoadYCode(); diff --git a/MUON/AliMUONTriggerConstants.cxx b/MUON/AliMUONTriggerConstants.cxx index 5eff99d4c95..0d789e7be80 100644 --- a/MUON/AliMUONTriggerConstants.cxx +++ b/MUON/AliMUONTriggerConstants.cxx @@ -21,6 +21,7 @@ ClassImp(AliMUONTriggerConstants) //---------------------------------------------------------------------- AliMUONTriggerConstants::AliMUONTriggerConstants() + : TNamed() { // constructor ; @@ -33,11 +34,11 @@ AliMUONTriggerConstants::~AliMUONTriggerConstants() } //---------------------------------------------------------------------- -const Int_t AliMUONTriggerConstants::fgNmodule = 126; +const Int_t AliMUONTriggerConstants::fgkNmodule = 126; //---------------------------------------------------------------------- // conv : line-column (line : from top to bottom, column : from left to right) -const Int_t AliMUONTriggerConstants::fgModuleId[126] = +const Int_t AliMUONTriggerConstants::fgkModuleId[126] = {11,12,13,14,15,16,17, // right side of the chamber 21,22,23,24,25,26,27, 31,32,33,34,35,36,37, @@ -58,7 +59,7 @@ const Int_t AliMUONTriggerConstants::fgModuleId[126] = -91,-92,-93,-94,-95,-96,-97}; //---------------------------------------------------------------------- -const Int_t AliMUONTriggerConstants::fgNstripX[126]= +const Int_t AliMUONTriggerConstants::fgkNstripX[126]= {16,16,16,16,16,16,16, // right side of the chamber 32,32,32,32,32,32,16, 32,32,32,32,32,32,16, @@ -79,7 +80,7 @@ const Int_t AliMUONTriggerConstants::fgNstripX[126]= 16,16,16,16,16,16,16}; //---------------------------------------------------------------------- -const Int_t AliMUONTriggerConstants::fgNstripY[126]= +const Int_t AliMUONTriggerConstants::fgkNstripY[126]= { 8, 8, 8, 8, 8, 8,16, // right side of the chamber 8, 8, 8, 8, 8, 8,16, 16,16,16,16,16, 8,16, @@ -100,7 +101,7 @@ const Int_t AliMUONTriggerConstants::fgNstripY[126]= 8, 8, 8, 8, 8, 8,16}; //---------------------------------------------------------------------- -const Float_t AliMUONTriggerConstants::fgXcMin[126]= +const Float_t AliMUONTriggerConstants::fgkXcMin[126]= {-36.,-70.,-104.,-138.,-172.,-206.,-274., //right -36.,-70.,-104.,-138.,-172.,-206.,-274., -36.,-70.,-104.,-138.,-172.,-206.,-274., @@ -122,7 +123,7 @@ const Float_t AliMUONTriggerConstants::fgXcMin[126]= }; //---------------------------------------------------------------------- -const Float_t AliMUONTriggerConstants::fgXcMax[126]= +const Float_t AliMUONTriggerConstants::fgkXcMax[126]= {-2.,-36.,-70.,-104.,-138.,-172.,-206., // right -2.,-36.,-70.,-104.,-138.,-172.,-206., -2.,-36.,-70.,-104.,-138.,-172.,-206., @@ -144,7 +145,7 @@ const Float_t AliMUONTriggerConstants::fgXcMax[126]= }; //---------------------------------------------------------------------- -const Int_t AliMUONTriggerConstants::fgCircuitId[234]= +const Int_t AliMUONTriggerConstants::fgkCircuitId[234]= {111, 121, 131, 141, 151, 161, 171, 211, 212, 221, 222, 231, 232, 241, 242, 251, 252, 261, 262, 271, 311, 312, 321, 322, 331, 332, 341, 342, 351, 352, 361, 362, 371, @@ -175,44 +176,44 @@ const Int_t AliMUONTriggerConstants::fgCircuitId[234]= //---------------------------------------------------------------------- Int_t AliMUONTriggerConstants::Nmodule() { -// returns fgNmodule - return fgNmodule; +// returns fgkNmodule + return fgkNmodule; } //---------------------------------------------------------------------- Int_t AliMUONTriggerConstants::ModuleId(Int_t imodule) { -// returns fgModuleId - return fgModuleId[imodule]; +// returns fgkModuleId + return fgkModuleId[imodule]; } //---------------------------------------------------------------------- Int_t AliMUONTriggerConstants::NstripX(Int_t imodule) { -// returns fgNstripX - return fgNstripX[imodule]; +// returns fgkNstripX + return fgkNstripX[imodule]; } //---------------------------------------------------------------------- Int_t AliMUONTriggerConstants::NstripY(Int_t imodule) { -// return fgNstripY - return fgNstripY[imodule]; +// return fgkNstripY + return fgkNstripY[imodule]; } //---------------------------------------------------------------------- Float_t AliMUONTriggerConstants::XcMin(Int_t imodule) { -// returns fgXcMin - return fgXcMin[imodule]; +// returns fgkXcMin + return fgkXcMin[imodule]; } //---------------------------------------------------------------------- Float_t AliMUONTriggerConstants::XcMax(Int_t imodule) { -// returns fgXcMax - return fgXcMax[imodule]; +// returns fgkXcMax + return fgkXcMax[imodule]; } //---------------------------------------------------------------------- Int_t AliMUONTriggerConstants::CircuitId(Int_t icircuit) { -// returns fgCircuitId - return fgCircuitId[icircuit]; +// returns fgkCircuitId + return fgkCircuitId[icircuit]; } diff --git a/MUON/AliMUONTriggerConstants.h b/MUON/AliMUONTriggerConstants.h index 4e445e3c9cb..8c5223f3e16 100644 --- a/MUON/AliMUONTriggerConstants.h +++ b/MUON/AliMUONTriggerConstants.h @@ -4,10 +4,13 @@ /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * See cxx source for full Copyright notice */ +/* $Id$ */ +// Revision of includes 07/05/2004 + #include -class AliMUONTriggerConstants : -public TNamed { +class AliMUONTriggerConstants : public TNamed +{ public: AliMUONTriggerConstants(); ~AliMUONTriggerConstants(); @@ -22,13 +25,13 @@ public: static Int_t CircuitId(Int_t icircuit); private: - static const Int_t fgNmodule; // total number of module - static const Int_t fgModuleId[126]; // module Id. number - static const Int_t fgNstripX[126]; // number of X strips - static const Int_t fgNstripY[126]; // number of Y strips - static const Float_t fgXcMin[126]; // min X pos of module - static const Float_t fgXcMax[126]; // max X poa of module - static const Int_t fgCircuitId[234]; // circuit Id. number + static const Int_t fgkNmodule; // total number of module + static const Int_t fgkModuleId[126]; // module Id. number + static const Int_t fgkNstripX[126]; // number of X strips + static const Int_t fgkNstripY[126]; // number of Y strips + static const Float_t fgkXcMin[126]; // min X pos of module + static const Float_t fgkXcMax[126]; // max X poa of module + static const Int_t fgkCircuitId[234]; // circuit Id. number ClassDef(AliMUONTriggerConstants,1) // Trigger Constants class diff --git a/MUON/AliMUONTriggerDecision.cxx b/MUON/AliMUONTriggerDecision.cxx index 3d06ee001c6..8a7f4ee3620 100644 --- a/MUON/AliMUONTriggerDecision.cxx +++ b/MUON/AliMUONTriggerDecision.cxx @@ -15,39 +15,27 @@ /* $Id$ */ +#include + #include "AliMUONTriggerCircuit.h" #include "AliMUONTriggerDecision.h" #include "AliMUONTriggerLut.h" -#include "AliMUONHitMapA1.h" -#include "AliRun.h" #include "AliMUON.h" -#include "AliRunLoader.h" -#include "AliLoader.h" -#include "AliSegmentation.h" -#include "AliMUONResponse.h" -#include "AliMUONChamber.h" #include "AliMUONDigit.h" #include "AliMUONConstants.h" #include "AliMUONGlobalTrigger.h" #include "AliMUONLocalTrigger.h" +#include "AliRun.h" +#include "AliRunLoader.h" +#include "AliLoader.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - //---------------------------------------------------------------------- ClassImp(AliMUONTriggerDecision) //---------------------------------------------------------------------- AliMUONTriggerDecision::AliMUONTriggerDecision(AliLoader* loader, Int_t iprint) + : TObject() { // Constructor fDebug = iprint; // print option @@ -119,6 +107,17 @@ AliMUONTriggerDecision::AliMUONTriggerDecision(AliLoader* loader, Int_t iprint) } } +//---------------------------------------------------------------------- +AliMUONTriggerDecision::AliMUONTriggerDecision() + : TObject(), + fLoader(0), + fTriggerCircuit(0), + fMUONData(0), + fMUON(0) +{ +// Default constructor +} + //---------------------------------------------------------------------- AliMUONTriggerDecision::AliMUONTriggerDecision(const AliMUONTriggerDecision& rhs) : TObject(rhs) @@ -1306,28 +1305,28 @@ void AliMUONTriggerDecision::PrintLocalOutput(Int_t minDevStrip[5], //---------------------------------------------------------------------- //--- methods which return member data related info //---------------------------------------------------------------------- -Int_t AliMUONTriggerDecision::GetITrigger(Int_t icirc){ +Int_t AliMUONTriggerDecision::GetITrigger(Int_t icirc) const{ // returns Local Trigger Status return fTrigger[icirc]; } //---------------------------------------------------------------------- -Int_t AliMUONTriggerDecision::GetStripX11(Int_t icirc){ +Int_t AliMUONTriggerDecision::GetStripX11(Int_t icirc) const{ // returns fStripX11 return fStripX11[icirc]; } //---------------------------------------------------------------------- -Int_t AliMUONTriggerDecision::GetDev(Int_t icirc){ +Int_t AliMUONTriggerDecision::GetDev(Int_t icirc) const{ // returns idev return fDev[icirc]; } //---------------------------------------------------------------------- -Int_t AliMUONTriggerDecision::GetStripY11(Int_t icirc){ +Int_t AliMUONTriggerDecision::GetStripY11(Int_t icirc) const{ // returns fStripY11; return fStripY11[icirc]; } //---------------------------------------------------------------------- void AliMUONTriggerDecision::GetLutOutput(Int_t icirc, Int_t lpt[2], - Int_t hpt[2], Int_t apt[2]){ + Int_t hpt[2], Int_t apt[2]) const { // returns Look up Table output for (Int_t i=0; i<2; i++) { lpt[i]=fLutLpt[icirc][i]; @@ -1340,7 +1339,7 @@ void AliMUONTriggerDecision::GetGlobalTrigger(Int_t singlePlus[3], Int_t singleMinus[3], Int_t singleUndef[3], Int_t pairUnlike[3], - Int_t pairLike[3]){ + Int_t pairLike[3]) const { // returns Global Trigger information (0,1,2 : Lpt,Hpt,Apt) // should not be used anymore. for (Int_t i=0; i<3; i++) { diff --git a/MUON/AliMUONTriggerDecision.h b/MUON/AliMUONTriggerDecision.h index d39689eac2a..d7dd7e98180 100644 --- a/MUON/AliMUONTriggerDecision.h +++ b/MUON/AliMUONTriggerDecision.h @@ -1,24 +1,30 @@ /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * See cxx source for full Copyright notice */ + /* $Id$ */ +// Revision of includes 07/05/2004 + #ifndef ALIMUONTRIGGERDECISION_H #define ALIMUONTRIGGERDECISION_H + //////////////////////////////////////////////// // MUON Trigger Decision Class // //////////////////////////////////////////////// -#include "TObject.h" -#include "TObjArray.h" + +#include + +//class TClonesArray; class AliLoader; -class TClonesArray; class AliMUONData; class AliMUON; -class AliMUONTriggerDecision : -public TObject { +class AliMUONTriggerDecision : public TObject +{ public: AliMUONTriggerDecision(AliLoader* loader, Int_t iprint = 0); // constructor + AliMUONTriggerDecision(); // constructor ~AliMUONTriggerDecision(); // destructor AliMUONData* GetMUONData() {return fMUONData;} @@ -49,14 +55,14 @@ public TObject { Int_t coordY[5]); // return member data information - Int_t GetITrigger(Int_t icirc); - Int_t GetStripX11(Int_t icirc); - Int_t GetDev(Int_t icirc); - Int_t GetStripY11(Int_t icirc); - void GetLutOutput(Int_t icirc, Int_t lpt[2], Int_t hpt[2], Int_t apt[2]); + Int_t GetITrigger(Int_t icirc) const; + Int_t GetStripX11(Int_t icirc) const; + Int_t GetDev(Int_t icirc) const; + Int_t GetStripY11(Int_t icirc) const; + void GetLutOutput(Int_t icirc, Int_t lpt[2], Int_t hpt[2], Int_t apt[2]) const; void GetGlobalTrigger(Int_t singlePlus[3], Int_t singleMinus[3], Int_t singleUndef[3], Int_t pairUnlike[3], - Int_t pairLike[3]); + Int_t pairLike[3]) const; // Add a new Local Trigger diff --git a/MUON/AliMUONTriggerGeometryBuilder.cxx b/MUON/AliMUONTriggerGeometryBuilder.cxx index 34e2ae2c883..b431452a215 100644 --- a/MUON/AliMUONTriggerGeometryBuilder.cxx +++ b/MUON/AliMUONTriggerGeometryBuilder.cxx @@ -1,3 +1,18 @@ +/************************************************************************** + * 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$ // // Class AliMUONTriggerGeometryBuilder @@ -38,6 +53,8 @@ AliMUONTriggerGeometryBuilder::AliMUONTriggerGeometryBuilder() AliMUONTriggerGeometryBuilder::AliMUONTriggerGeometryBuilder(const AliMUONTriggerGeometryBuilder& rhs) : AliMUONVGeometryBuilder(rhs) { +// Protected copy constructor + Fatal("Copy constructor", "Copy constructor is not implemented."); } @@ -51,6 +68,8 @@ AliMUONTriggerGeometryBuilder::~AliMUONTriggerGeometryBuilder() { AliMUONTriggerGeometryBuilder& AliMUONTriggerGeometryBuilder::operator = (const AliMUONTriggerGeometryBuilder& rhs) { +// Protected assignement operator + // check assignement to self if (this == &rhs) return *this; diff --git a/MUON/AliMUONTriggerGeometryBuilder.h b/MUON/AliMUONTriggerGeometryBuilder.h index 2600fd56f14..4aa6ec8a9b7 100644 --- a/MUON/AliMUONTriggerGeometryBuilder.h +++ b/MUON/AliMUONTriggerGeometryBuilder.h @@ -1,4 +1,8 @@ +/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * See cxx source for full Copyright notice */ + // $Id$ +// Revision of includes 07/05/2004 // // Class AliMUONTriggerGeometryBuilder // ----------------------------------- @@ -17,18 +21,20 @@ class AliMUONTriggerGeometryBuilder : public AliMUONVGeometryBuilder { public: AliMUONTriggerGeometryBuilder(AliMUON* muon); - AliMUONTriggerGeometryBuilder(const AliMUONTriggerGeometryBuilder& rhs); AliMUONTriggerGeometryBuilder(); virtual ~AliMUONTriggerGeometryBuilder(); - - // operators - AliMUONTriggerGeometryBuilder& operator = (const AliMUONTriggerGeometryBuilder& rhs); // methods virtual void CreateGeometry(); virtual void SetTransformations(); virtual void SetSensitiveVolumes(); + protected: + AliMUONTriggerGeometryBuilder(const AliMUONTriggerGeometryBuilder& rhs); + + // operators + AliMUONTriggerGeometryBuilder& operator = (const AliMUONTriggerGeometryBuilder& rhs); + private: AliMUON* fMUON; // the MUON detector class diff --git a/MUON/AliMUONTriggerLut.cxx b/MUON/AliMUONTriggerLut.cxx index 228021e3990..d67d666f6a6 100644 --- a/MUON/AliMUONTriggerLut.cxx +++ b/MUON/AliMUONTriggerLut.cxx @@ -15,21 +15,22 @@ /* $Id$ */ -#include "AliMUONTriggerCircuit.h" +#include +#include +#include +#include + #include "AliMUONTriggerLut.h" -#include "TTree.h" +#include "AliMUONTriggerCircuit.h" #include "AliRun.h" #include "AliMUON.h" -#include "TMath.h" -#include "TFile.h" -#include "TROOT.h" -#include "TH3.h" -#include ClassImp(AliMUONTriggerLut) //---------------------------------------------------------------------- -AliMUONTriggerLut::AliMUONTriggerLut() { +AliMUONTriggerLut::AliMUONTriggerLut() + : TNamed() +{ // constructor fLptPlus = fLptMinu = fLptUnde = 0; fHptPlus = fHptMinu = fHptUnde = 0; @@ -53,16 +54,25 @@ AliMUONTriggerLut::~AliMUONTriggerLut() { } //---------------------------------------------------------------------- -AliMUONTriggerLut::AliMUONTriggerLut (const AliMUONTriggerLut& MUONTriggerLut):TNamed(MUONTriggerLut) +AliMUONTriggerLut::AliMUONTriggerLut (const AliMUONTriggerLut& theMUONTriggerLut) + : TNamed(theMUONTriggerLut) { -// Dummy copy constructor +// Protected copy constructor + + Fatal("AliMUONTriggerLut", "Not implemented."); } //---------------------------------------------------------------------- -AliMUONTriggerLut & AliMUONTriggerLut::operator=(const AliMUONTriggerLut& /*MUONTriggerLut*/) +AliMUONTriggerLut & +AliMUONTriggerLut::operator=(const AliMUONTriggerLut& rhs) { -// Dummy assignment operator - return *this; +// Protected assignement operator + + if (this == &rhs) return *this; + + Fatal("operator=", "Not implemented."); + + return *this; } //---------------------------------------------------------------------- diff --git a/MUON/AliMUONTriggerLut.h b/MUON/AliMUONTriggerLut.h index 09537bb95e4..8d81fe45328 100644 --- a/MUON/AliMUONTriggerLut.h +++ b/MUON/AliMUONTriggerLut.h @@ -1,24 +1,32 @@ #ifndef ALIMUONTRIGGERLUT_H #define ALIMUONTRIGGERLUT_H +/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * See cxx source for full Copyright notice */ + +/* $Id$ */ +// Revision of includes 07/05/2004 + +#include -#include "TNamed.h" class TH3S; //---------------------------------------------- -class AliMUONTriggerLut : -public TNamed { +class AliMUONTriggerLut : public TNamed +{ public: AliMUONTriggerLut(); // constructor ~AliMUONTriggerLut(); // destructor - // copy constructor - AliMUONTriggerLut (const AliMUONTriggerLut& AliMUONTriggerLut); - // assignment operator - AliMUONTriggerLut& operator=(const AliMUONTriggerLut& AliMUONTriggerLut); void LoadLut(); void GetLutOutput(Int_t circuit, Int_t xstrip, Int_t idev, Int_t ystrip, Int_t lutLpt[2], Int_t lutHpt[2], Int_t lutApt[2]); + + protected: + // copy constructor + AliMUONTriggerLut (const AliMUONTriggerLut& AliMUONTriggerLut); + // assignment operator + AliMUONTriggerLut& operator=(const AliMUONTriggerLut& AliMUONTriggerLut); private: Int_t GetMask(Int_t ystrip); diff --git a/MUON/AliMUONTriggerTrack.cxx b/MUON/AliMUONTriggerTrack.cxx index ac0eae36451..68eb207a4fa 100644 --- a/MUON/AliMUONTriggerTrack.cxx +++ b/MUON/AliMUONTriggerTrack.cxx @@ -13,7 +13,7 @@ * provided "as is" without express or implied warranty. * **************************************************************************/ -/* */ +/* $Id$*/ /////////////////////////////////////////////////// // @@ -26,20 +26,13 @@ // no need for a AliMUONTriggerTrackParam /////////////////////////////////////////////////// -#include // for cout -#include // for exit() - -#include -#include -#include -#include - -#include "AliMUONEventReconstructor.h" #include "AliMUONTriggerTrack.h" +#include "AliMUONEventReconstructor.h" //__________________________________________________________________________ AliMUONTriggerTrack::AliMUONTriggerTrack() + : TObject() { fEventReconstructor = 0; fx11 = 0.; @@ -50,6 +43,7 @@ AliMUONTriggerTrack::AliMUONTriggerTrack() } //__________________________________________________________________________ AliMUONTriggerTrack::AliMUONTriggerTrack(Float_t x11, Float_t y11, Float_t thetax, Float_t thetay, Long_t theGTPattern, AliMUONEventReconstructor* EventReconstructor) + : TObject() { fEventReconstructor = EventReconstructor; // link back to EventReconstructor fx11 = x11; @@ -69,29 +63,36 @@ AliMUONTriggerTrack::~AliMUONTriggerTrack() } //__________________________________________________________________________ -AliMUONTriggerTrack::AliMUONTriggerTrack (const AliMUONTriggerTrack& MUONTriggerTrack):TObject(MUONTriggerTrack) +AliMUONTriggerTrack::AliMUONTriggerTrack (const AliMUONTriggerTrack& theMUONTriggerTrack) + : TObject(theMUONTriggerTrack) { - fEventReconstructor = new AliMUONEventReconstructor(*MUONTriggerTrack.fEventReconstructor); - fx11 = MUONTriggerTrack.fx11; - fy11 = MUONTriggerTrack.fy11; - fthetax = MUONTriggerTrack.fthetax; - fthetay = MUONTriggerTrack.fthetay; - fGTPattern = MUONTriggerTrack.fGTPattern; + // fEventReconstructor = new AliMUONEventReconstructor(*MUONTriggerTrack.fEventReconstructor); + fEventReconstructor = theMUONTriggerTrack.fEventReconstructor; + fx11 = theMUONTriggerTrack.fx11; + fy11 = theMUONTriggerTrack.fy11; + fthetax = theMUONTriggerTrack.fthetax; + fthetay = theMUONTriggerTrack.fthetay; + fGTPattern = theMUONTriggerTrack.fGTPattern; } //__________________________________________________________________________ AliMUONTriggerTrack & AliMUONTriggerTrack::operator=(const AliMUONTriggerTrack& -MUONTriggerTrack) +theMUONTriggerTrack) { - if (this == &MUONTriggerTrack) + // check assignement to self + if (this == &theMUONTriggerTrack) return *this; - fEventReconstructor = new AliMUONEventReconstructor(*MUONTriggerTrack.fEventReconstructor); - fx11 = MUONTriggerTrack.fx11; - fy11 = MUONTriggerTrack.fy11; - fthetax = MUONTriggerTrack.fthetax; - fthetay = MUONTriggerTrack.fthetay; - fGTPattern = MUONTriggerTrack.fGTPattern; + // base class assignement + TObject::operator=(theMUONTriggerTrack); + + //fEventReconstructor = new AliMUONEventReconstructor(*theMUONTriggerTrack.fEventReconstructor); + fEventReconstructor = theMUONTriggerTrack.fEventReconstructor; + fx11 = theMUONTriggerTrack.fx11; + fy11 = theMUONTriggerTrack.fy11; + fthetax = theMUONTriggerTrack.fthetax; + fthetay = theMUONTriggerTrack.fthetay; + fGTPattern = theMUONTriggerTrack.fGTPattern; return *this; } diff --git a/MUON/AliMUONTriggerTrack.h b/MUON/AliMUONTriggerTrack.h index 02d5d04c9cf..8fa6986e926 100644 --- a/MUON/AliMUONTriggerTrack.h +++ b/MUON/AliMUONTriggerTrack.h @@ -4,16 +4,18 @@ * See cxx source for full Copyright notice */ /*$Id$*/ +// Revision of includes 07/05/2004 /////////////////////////////////////////////////// // Reconstructed trigger track in ALICE dimuon spectrometer /////////////////////////////////////////////////// +#include -class TObjArray; class AliMUONEventReconstructor; -class AliMUONTriggerTrack : public TObject { +class AliMUONTriggerTrack : public TObject +{ public: AliMUONTriggerTrack(); // Constructor virtual ~AliMUONTriggerTrack(); // Destructor diff --git a/MUON/AliMUONVGeometryBuilder.cxx b/MUON/AliMUONVGeometryBuilder.cxx index 4060fd1da0b..98e94befbd6 100644 --- a/MUON/AliMUONVGeometryBuilder.cxx +++ b/MUON/AliMUONVGeometryBuilder.cxx @@ -1,3 +1,18 @@ +/************************************************************************** + * 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$ // // Class AliMUONVGeometryBuilder @@ -49,6 +64,8 @@ AliMUONVGeometryBuilder::AliMUONVGeometryBuilder() AliMUONVGeometryBuilder::AliMUONVGeometryBuilder(const AliMUONVGeometryBuilder& rhs) : TObject(rhs) { +// Protected copy constructor + Fatal("Copy constructor", "Copy constructor is not implemented."); } @@ -66,6 +83,8 @@ AliMUONVGeometryBuilder::~AliMUONVGeometryBuilder() { AliMUONVGeometryBuilder& AliMUONVGeometryBuilder::operator = (const AliMUONVGeometryBuilder& rhs) { +// Protected assignement operator + // check assignement to self if (this == &rhs) return *this; diff --git a/MUON/AliMUONVGeometryBuilder.h b/MUON/AliMUONVGeometryBuilder.h index 081114a3ce7..db6661b8abe 100644 --- a/MUON/AliMUONVGeometryBuilder.h +++ b/MUON/AliMUONVGeometryBuilder.h @@ -1,4 +1,8 @@ +/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * See cxx source for full Copyright notice */ + // $Id$ +// Revision of includes 07/05/2004 // // Class AliMUONVGeometryBuilder // ----------------------------- @@ -28,12 +32,8 @@ class AliMUONVGeometryBuilder : public TObject AliMUONChamber* ch4 = 0, AliMUONChamber* ch5 = 0, AliMUONChamber* ch6 = 0); - AliMUONVGeometryBuilder(const AliMUONVGeometryBuilder& rhs); AliMUONVGeometryBuilder(); virtual ~AliMUONVGeometryBuilder(); - - // operators - AliMUONVGeometryBuilder& operator = (const AliMUONVGeometryBuilder& rhs); // methods virtual void CreateMaterials() {} // make = 0; ? @@ -62,6 +62,11 @@ class AliMUONVGeometryBuilder : public TObject // should be defined and set to its geometry class. protected: + AliMUONVGeometryBuilder(const AliMUONVGeometryBuilder& rhs); + + // operators + AliMUONVGeometryBuilder& operator = (const AliMUONVGeometryBuilder& rhs); + // methods AliMUONChamber* GetChamber(Int_t chamberId) const; diff --git a/MUON/AliMUONv0.cxx b/MUON/AliMUONv0.cxx index b2234211305..5c66c7dbab9 100644 --- a/MUON/AliMUONv0.cxx +++ b/MUON/AliMUONv0.cxx @@ -19,22 +19,15 @@ // Manager and hits classes for set:MUON version 0 // ///////////////////////////////////////////////////////// -#include - #include -#include -#include -#include #include -#include "AliCallf77.h" #include "AliConst.h" #include "AliMUONChamber.h" #include "AliMUONChamberGeometry.h" #include "AliMUONConstants.h" #include "AliMUONFactory.h" #include "AliMUONHit.h" -#include "AliMUONPadHit.h" #include "AliMUONv0.h" #include "AliMagF.h" #include "AliRun.h" @@ -43,7 +36,8 @@ ClassImp(AliMUONv0) //___________________________________________ -AliMUONv0::AliMUONv0() : AliMUON() +AliMUONv0::AliMUONv0() + : AliMUON() { // Constructor fChambers = 0; @@ -51,13 +45,14 @@ AliMUONv0::AliMUONv0() : AliMUON() //___________________________________________ AliMUONv0::AliMUONv0(const char *name, const char *title) - : AliMUON(name,title) + : AliMUON(name,title) { // Constructor AliMUONFactory factory; factory.Build(this, title); } +//___________________________________________ void AliMUONv0::CreateGeometry() { // Creates coarse geometry for hit density simulations diff --git a/MUON/AliMUONv0.h b/MUON/AliMUONv0.h index 6952a7ecc11..a2ece181fd3 100644 --- a/MUON/AliMUONv0.h +++ b/MUON/AliMUONv0.h @@ -5,13 +5,16 @@ * See cxx source for full Copyright notice */ /* $Id$ */ +// Revision of includes 07/05/2004 ///////////////////////////////////////////////////////// // Manager and hits classes for set:MUON version 0 // ///////////////////////////////////////////////////////// #include "AliMUON.h" -class AliMUONv0 : public AliMUON { + +class AliMUONv0 : public AliMUON +{ public: AliMUONv0(); AliMUONv0(const char *name, const char *title); diff --git a/MUON/AliMUONv1.cxx b/MUON/AliMUONv1.cxx index 39f2cf57ba5..354760ca45c 100644 --- a/MUON/AliMUONv1.cxx +++ b/MUON/AliMUONv1.cxx @@ -22,21 +22,17 @@ #include #include #include -#include -#include #include -#include #include #include -#include +#include "AliMUONv1.h" #include "AliConst.h" #include "AliMUONChamber.h" #include "AliMUONConstants.h" #include "AliMUONFactory.h" #include "AliMUONHit.h" #include "AliMUONTriggerCircuit.h" -#include "AliMUONv1.h" #include "AliMUONVGeometryBuilder.h" #include "AliMUONChamberGeometry.h" #include "AliMUONGeometryEnvelope.h" @@ -48,8 +44,9 @@ ClassImp(AliMUONv1) //___________________________________________ -AliMUONv1::AliMUONv1() : AliMUON() - ,fTrackMomentum(), fTrackPosition(),fGlobalTransformation(0) +AliMUONv1::AliMUONv1() + : AliMUON(), + fTrackMomentum(), fTrackPosition(),fGlobalTransformation(0) { // Constructor fChambers = 0; @@ -603,7 +600,7 @@ void AliMUONv1::StepManager() //-------------- Angle effect // Ratio between energy loss of particle and Mip as a function of BetaGamma of particle (Energy/Mass) - Float_t BetaxGamma = fTrackMomentum.P()/mass;// pc/mc2 + Float_t betaxGamma = fTrackMomentum.P()/mass;// pc/mc2 Float_t sigmaEffect10degrees; Float_t sigmaEffectThetadegrees; Float_t eLossParticleELossMip; @@ -612,9 +609,9 @@ void AliMUONv1::StepManager() if (fAngleEffect){ - if ( (BetaxGamma >3.2) && (thetawires*kRaddeg<=15.) ) { - BetaxGamma=TMath::Log(BetaxGamma); - eLossParticleELossMip = fElossRatio->Eval(BetaxGamma); + if ( (betaxGamma >3.2) && (thetawires*kRaddeg<=15.) ) { + betaxGamma=TMath::Log(betaxGamma); + eLossParticleELossMip = fElossRatio->Eval(betaxGamma); // 10 degrees is a reference for a model (arbitrary) sigmaEffect10degrees=fAngleEffect10->Eval(eLossParticleELossMip);// in micrometers // Angle with respect to the wires assuming that chambers are perpendicular to the z axis. diff --git a/MUON/AliMUONv1.h b/MUON/AliMUONv1.h index 4d6895714b5..3a543b04abc 100644 --- a/MUON/AliMUONv1.h +++ b/MUON/AliMUONv1.h @@ -4,23 +4,24 @@ * See cxx source for full Copyright notice */ /* $Id$ */ +// Revision of includes 07/05/2004 ///////////////////////////////////////////////////////// // Manager and hits classes for set:MUON version 1 // ///////////////////////////////////////////////////////// -#include "TLorentzVector.h" +#include #include "AliMUON.h" class TF1; class TGeoCombiTrans; - class TString; class TGeoHMatrix; -class AliMUONv1 : public AliMUON { -public: +class AliMUONv1 : public AliMUON +{ + public: AliMUONv1(); AliMUONv1(const char *name, const char *title); virtual ~AliMUONv1(); @@ -36,7 +37,8 @@ public: { fAngleEffect = Opt; } void SetStepMaxInActiveGas(Float_t StepMax) {fStepMaxInActiveGas = StepMax; } -protected: + + protected: AliMUONv1(const AliMUONv1& right); AliMUONv1& operator = (const AliMUONv1& right); @@ -56,7 +58,7 @@ protected: TF1 * fAngleEffectNorma;// Angle effect: Normalisation form theta=10 degres to theta between 0 and 10 (Khalil BOUDJEMLINE sep 2003 Ph.D Thesis) TGeoCombiTrans* fGlobalTransformation; // global transformation // applied to the whole geometry -private: + private: // method void PlaceVolume(const TString& name, const TString& mName, Int_t copyNo, const TGeoHMatrix& matrix, Int_t npar, Double_t* param, diff --git a/MUON/AliMUONv3.cxx b/MUON/AliMUONv3.cxx index 9cea1dfd776..71a67650ade 100644 --- a/MUON/AliMUONv3.cxx +++ b/MUON/AliMUONv3.cxx @@ -29,10 +29,10 @@ #include #include #include -#include +#include #include -#include +#include "AliMUONv3.h" #include "AliConst.h" #include "AliMUONChamber.h" #include "AliMUONConstants.h" @@ -40,7 +40,6 @@ #include "AliMUONHit.h" #include "AliMUONTriggerCircuit.h" #include "AliMUONChamberGeometry.h" -#include "AliMUONv3.h" #include "AliMagF.h" #include "AliRun.h" #include "AliMC.h" @@ -48,8 +47,9 @@ ClassImp(AliMUONv3) //___________________________________________ -AliMUONv3::AliMUONv3() : AliMUON() - ,fTrackMomentum(), fTrackPosition() +AliMUONv3::AliMUONv3() + : AliMUON(), + fTrackMomentum(), fTrackPosition() { // Constructor fChambers = 0; @@ -65,7 +65,8 @@ AliMUONv3::AliMUONv3() : AliMUON() } //___________________________________________ AliMUONv3::AliMUONv3(const char *name, const char *title) - : AliMUON(name,title), fTrackMomentum(), fTrackPosition() + : AliMUON(name,title), + fTrackMomentum(), fTrackPosition() { // Constructor // By default include all stations @@ -1749,7 +1750,7 @@ void AliMUONv3::StepManager() //-------------- Angle effect // Ratio between energy loss of particle and Mip as a function of BetaGamma of particle (Energy/Mass) - Float_t BetaxGamma = fTrackMomentum.P()/mass;// pc/mc2 + Float_t betaxGamma = fTrackMomentum.P()/mass;// pc/mc2 Float_t sigmaEffect10degrees; Float_t sigmaEffectThetadegrees; Float_t eLossParticleELossMip; @@ -1758,9 +1759,9 @@ void AliMUONv3::StepManager() if (fAngleEffect){ - if ( (BetaxGamma >3.2) && (thetawires*kRaddeg<=15.) ) { - BetaxGamma=TMath::Log(BetaxGamma); - eLossParticleELossMip = fElossRatio->Eval(BetaxGamma); + if ( (betaxGamma >3.2) && (thetawires*kRaddeg<=15.) ) { + betaxGamma=TMath::Log(betaxGamma); + eLossParticleELossMip = fElossRatio->Eval(betaxGamma); // 10 degrees is a reference for a model (arbitrary) sigmaEffect10degrees=fAngleEffect10->Eval(eLossParticleELossMip);// in micrometers // Angle with respect to the wires assuming that chambers are perpendicular to the z axis. diff --git a/MUON/AliMUONv3.h b/MUON/AliMUONv3.h index 16da6481065..914f6a6e6be 100644 --- a/MUON/AliMUONv3.h +++ b/MUON/AliMUONv3.h @@ -4,7 +4,7 @@ * See cxx source for full Copyright notice */ /* $Id$ */ -/* $Id$ */ +// Revision of includes 07/05/2004 ///////////////////////////////////////////////////////// // Manager and hits classes for set:MUON version 3 // @@ -15,13 +15,15 @@ // are created using new geometry builders // (See ALIMUON*GeometryBuilder classes) -#include "TLorentzVector.h" +#include + #include "AliMUON.h" class TF1; -class AliMUONv3 : public AliMUON { -public: +class AliMUONv3 : public AliMUON +{ + public: AliMUONv3(); AliMUONv3(const char *name, const char *title); virtual ~AliMUONv3() {} @@ -37,7 +39,8 @@ public: { fAngleEffect = Opt; } void SetStepMaxInActiveGas(Float_t StepMax) {fStepMaxInActiveGas = StepMax; } -protected: + + protected: AliMUONv3(const AliMUONv3& right); AliMUONv3& operator = (const AliMUONv3& right); Int_t* fStations; //! allow to externally set which station to create @@ -55,10 +58,8 @@ protected: TF1 * fElossRatio; // Ratio of particle mean eloss with respect MIP's TF1 * fAngleEffect10; // Angle effect in tracking chambers at theta =10 degres as a function of ElossRatio (Khalil BOUDJEMLINE sep 2003 Ph.D Thesis) (in micrometers) TF1 * fAngleEffectNorma;// Angle effect: Normalisation form theta=10 degres to theta between 0 and 10 (Khalil BOUDJEMLINE sep 2003 Ph.D Thesis) -private: - ClassDef(AliMUONv3,1) // MUON Detector class Version 1 - + ClassDef(AliMUONv3,1) // MUON Detector class Version 1 }; #endif -- 2.43.0