X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=MUON%2FAliMUON.cxx;h=b8b617d5b6fd1861a0885253cbce401823f2da8e;hb=6d149c9e4e40adc691d5ce333d3ad967e84e439f;hp=963b209f0c6dcb6753a8a604fb895f4e99b2312f;hpb=8109731a7c5f0a6eac55f1389379f3c04f0c42ae;p=u%2Fmrichter%2FAliRoot.git diff --git a/MUON/AliMUON.cxx b/MUON/AliMUON.cxx index 963b209f0c6..b8b617d5b6f 100644 --- a/MUON/AliMUON.cxx +++ b/MUON/AliMUON.cxx @@ -53,9 +53,7 @@ #include "AliMUON.h" #include "AliMUONChamberTrigger.h" #include "AliMUONConstants.h" -#include "AliMUONHit.h" -#include "AliMUONMerger.h" -#include "AliMUONPadHit.h" +#include "AliMUONHit.h" #include "AliMUONRawCluster.h" #include "AliMUONTransientDigit.h" #include "AliMUONTriggerCircuit.h" @@ -67,7 +65,7 @@ #include "AliMUONDigitizerv2.h" #include "AliMUONSDigitizerv1.h" #include "AliMUONRawData.h" -#include "AliMUONFactory.h" +#include "AliMUONFactoryV2.h" #include "AliLog.h" // Defaults parameters for Z positions of chambers @@ -96,7 +94,6 @@ AliMUON::AliMUON() fChambers(0), fTriggerCircuits(0), fGeometryBuilder(0), - fSegmentationType(1),// set to 1 default wise old seg fDEIndexing(0), fAccCut(kFALSE), fAccMin(0.), @@ -107,7 +104,6 @@ AliMUON::AliMUON() fMaxDestepAlu(0.), fMaxIterPad(0), fCurIterPad(0), - fMerger(0), fFactory(0) { // Default Constructor @@ -125,7 +121,6 @@ AliMUON::AliMUON(const char *name, const char *title) fChambers(0), fTriggerCircuits(0), fGeometryBuilder(0), - fSegmentationType(1),// set to 1 default wise old seg fDEIndexing(0), fAccCut(kFALSE), fAccMin(0.), @@ -136,7 +131,6 @@ AliMUON::AliMUON(const char *name, const char *title) fMaxDestepAlu(-1), // in the calculation of the tracking parameters fMaxIterPad(0), fCurIterPad(0), - fMerger(0), fFactory(0) { @@ -187,8 +181,8 @@ AliMUON::AliMUON(const char *name, const char *title) // chamber->InitGeo(AliMUONConstants::DefaultChamberZ(ch)); // Set chamber inner and outer radius to default - chamber->SetRInner(AliMUONConstants::Dmin(st)/2); - chamber->SetROuter(AliMUONConstants::Dmax(st)/2); + chamber->SetRInner(AliMUONConstants::Dmin(st)/2.); + chamber->SetROuter(AliMUONConstants::Dmax(st)/2.); // } // Chamber stCH (0, 1) in } // Station st (0...) @@ -215,7 +209,6 @@ AliMUON::~AliMUON() // Destructor AliDebug(1,"Calling AliMUON destructor"); fIshunt = 0; - if (fMerger) delete fMerger; if (fChambers){ fChambers->Delete(); @@ -257,26 +250,11 @@ void AliMUON::BuildGeometry() { // Geometry for event display - if (!fSegmentationType) { - AliFatal("No Segmentation Type defined."); - return; - } - if (fSegmentationType == 1) { - for (Int_t i=0; i<7; i++) { - for (Int_t j=0; j<2; j++) { - Int_t id=2*i+j+1; - this->Chamber(id-1).SegmentationModel(1)->Draw("eventdisplay"); - } - } - } else { -// for (Int_t i=0; i<14; i++) { -// for (Int_t j=0; j<100; j++) { -// Int_t id= (i+1)*100 + j; -// this->Chamber(i).SegmentationModel2(1)->Draw(id,"eventdisplay");// to be check ! -// } -// } - } +// for (Int_t i = 0; i < AliMUONConstants::NCh(); i++) +// this->Chamber(i).SegmentationModel2(1)->Draw("eventdisplay");// to be check ! + + } //__________________________________________________________________ @@ -296,15 +274,6 @@ void AliMUON::SetTreeAddress() fHits = GetMUONData()->Hits(); // Added by Ivana to use the methods FisrtHit, NextHit of AliDetector } -//____________________________________________________________________ -void AliMUON::SetPadSize(Int_t id, Int_t isec, Float_t p1, Float_t p2) -{ -// Set the pad size for chamber id and cathode isec - Int_t i=2*(id-1); - ((AliMUONChamber*) fChambers->At(i)) ->SetPadSize(isec,p1,p2); - ((AliMUONChamber*) fChambers->At(i+1))->SetPadSize(isec,p1,p2); -} - //___________________________________________ void AliMUON::SetChambersZ(const Float_t *Z) { @@ -382,27 +351,6 @@ void AliMUON::SetMaxDestepAlu(Float_t p1) fMaxDestepAlu=p1; } -//___________________________________________________________________ -void AliMUON::SetAcceptance(Bool_t acc, Float_t angmin, Float_t angmax) -{ -// Set acceptance cuts - fAccCut=acc; - fAccMin=angmin*TMath::Pi()/180; - fAccMax=angmax*TMath::Pi()/180; - Int_t ch; - if (acc) { - for (Int_t st = 0; st < AliMUONConstants::NCh() / 2; st++) { - // Loop over 2 chambers in the station - for (Int_t stCH = 0; stCH < 2; stCH++) { - ch = 2 * st + stCH; - // Set chamber inner and outer radius according to acceptance cuts - Chamber(ch).SetRInner(TMath::Abs(AliMUONConstants::DefaultChamberZ(ch)*TMath::Tan(fAccMin))); - Chamber(ch).SetROuter(TMath::Abs(AliMUONConstants::DefaultChamberZ(ch)*TMath::Tan(fAccMax))); - } // chamber loop - } // station loop - } -} - //____________________________________________________________________ Float_t AliMUON::GetMaxStepGas() const { @@ -443,12 +391,6 @@ Float_t AliMUON::GetMaxDestepAlu() const fGeometryBuilder->SetAlign(align); } -//____________________________________________________________________ -void AliMUON::SetSegmentationModel(Int_t id, Int_t isec, AliSegmentation *segmentation) -{ -// Set the segmentation for chamber id cathode isec - ((AliMUONChamber*) fChambers->At(id))->SetSegmentationModel(isec, segmentation); -} //____________________________________________________________________ void AliMUON::SetSegmentationModel(Int_t id, Int_t isec, AliMUONGeometrySegmentation* segmentation) { @@ -463,12 +405,6 @@ void AliMUON::SetResponseModel(Int_t id, AliMUONResponse *response) ((AliMUONChamber*) fChambers->At(id))->SetResponseModel(response); } //____________________________________________________________________ -void AliMUON::SetNsec(Int_t id, Int_t nsec) -{ -// Set number of segmented cathods for chamber id - ((AliMUONChamber*) fChambers->At(id))->SetNsec(nsec); -} -//____________________________________________________________________ AliDigitizer* AliMUON::CreateDigitizer(AliRunDigitizer* manager) const { return new AliMUONDigitizerv2(manager); @@ -479,13 +415,6 @@ void AliMUON::SDigits2Digits() // write TreeD here - if (!fMerger) { - AliDebug(1,"Create default AliMUONMerger "); - AliDebug(1," no merging, just digitization of 1 event will be done"); - fMerger = new AliMUONMerger(); - } - fMerger->Init(); - fMerger->Digitise(); char hname[30]; // sprintf(hname,"TreeD%d",fLoader->GetHeader()->GetEvent()); fLoader->TreeD()->Write(hname,TObject::kOverwrite); @@ -514,7 +443,7 @@ void AliMUON::Digits2Raw() AliMUONRawData* rawData; rawData = new AliMUONRawData(fLoader); - if (!rawData->WriteRawData()) AliInfo("pb writting raw data"); + if (!rawData->Digits2Raw()) AliInfo("pb writting raw data"); delete rawData; return; } @@ -533,35 +462,6 @@ AliLoader* AliMUON::MakeLoader(const char* topfoldername) return fLoader; } //_______________________________________________________________________ -AliMUONPadHit* AliMUON::FirstPad(AliMUONHit* hit, TClonesArray *clusters) -{ -// to be removed - // Initialise the pad iterator - // Return the address of the first padhit for hit - TClonesArray *theClusters = clusters; - Int_t nclust = theClusters->GetEntriesFast(); - if (nclust && hit->PHlast() > 0) { - fMaxIterPad=hit->PHlast(); - fCurIterPad=hit->PHfirst(); - return (AliMUONPadHit*) clusters->UncheckedAt(fCurIterPad-1); - } else { - return 0; - } -} -//_______________________________________________________________________ -AliMUONPadHit* AliMUON::NextPad(TClonesArray *clusters) -{ - // To be removed -// Get next pad (in iterator) -// - fCurIterPad++; - if (fCurIterPad <= fMaxIterPad) { - return (AliMUONPadHit*) clusters->UncheckedAt(fCurIterPad-1); - } else { - return 0; - } -} -//_______________________________________________________________________ AliMUONRawCluster *AliMUON::RawCluster(Int_t ichamber, Int_t icathod, Int_t icluster) { @@ -582,42 +482,4 @@ AliMUONRawCluster *AliMUON::RawCluster(Int_t ichamber, Int_t icathod, Int_t iclu return mRaw; } //________________________________________________________________________ -void AliMUON::SetMerger(AliMUONMerger* merger) -{ -// Set pointer to merger - fMerger = merger; -} -//________________________________________________________________________ -AliMUONMerger* AliMUON::Merger() -{ -// Return pointer to merger - return fMerger; -} -/* PH Commented out waiting for correct implementation -//________________________________________________________________________ -void AliMUON::RemapTrackHitIDs(Int_t* map) -{ -// Remaps the track numbers in the hits arrays, so that they correspond -// to the entry indices in the Kine tree. -// The correspondance is not direct. To get the real index into the Kine tree -// compute the particle index as follows: -// -// num_primaries = AliStack::GetNprimary(); -// num_tracks = AliStack::GetNtracks(); -// track = AliMUONHit::Track() -// -// if (track < num_primaries) -// particleindex = track + num_tracks - num_primaries; -// else -// particleindex = track - num_primaries; - - // Remap the track numbers based on the specified map. - AliMUONData* data = GetMUONData(); - TClonesArray* hits = data->Hits(); - for (Int_t i = 0; i < hits->GetEntriesFast(); i++) - { - AliMUONHit* hit = static_cast( hits->At(i) ); - hit->SetTrack( map[hit->Track()] ); - }; -}; -*/ +