/************************************************************************** * 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. * **************************************************************************/ //Class to check the response of the detection elements of the MUON tracking chambers //in function of the position in the detection element. //Author: Nicolas LE BRIS - SUBATECH Nantes //PWG3/muon: #include "AliAnalysisTaskMuonTrackingEff.h" #include "AliCheckMuonDetEltResponse.h" //include STEER: #include "AliLog.h" #include "AliESDEvent.h" #include "AliTracker.h" #include "AliESDMuonTrack.h" //include MUON: #include "AliMUONTrack.h" #include "AliMUONTrackParam.h" #include "AliMUONTrackExtrap.h" #include "AliMUONVCluster.h" #include "AliMUONConstants.h" #include "AliMUONGeometryTransformer.h" #include "AliMUONESDInterface.h" //include MUON/mapping: #include "mapping/AliMpDEManager.h" //include ROOT: #include #include #include #include #include #include #include #include /// \cond CLASSIMP ClassImp(AliCheckMuonDetEltResponse) /// \endcond const Int_t AliCheckMuonDetEltResponse::fNbrOfChamber = 10; const Int_t AliCheckMuonDetEltResponse::fNbrOfStation = 5; const Int_t AliCheckMuonDetEltResponse::fNbrOfDetectionElt[10] = {4, 4, 4, 4, 18, 18, 26, 26, 26, 26}; const Int_t AliCheckMuonDetEltResponse::fFirstDetectionElt[10] = {100, 200, 300, 400, 500, 600, 700, 800, 900, 1000}; const Int_t AliCheckMuonDetEltResponse::fOffset = 100; const Int_t AliCheckMuonDetEltResponse::fOverlapSize = 15; const Int_t AliCheckMuonDetEltResponse::fYSlatSize = 40; //_____________________________________________________________________________ AliCheckMuonDetEltResponse::AliCheckMuonDetEltResponse() : TObject(), fTransformer(0x0), fESD(0), fTracksTotalNbr(0x0), fTrackParams(0x0), fTrackParam(0x0), fCluster(0x0), fDetEltTDHistList(0x0), fDetEltTTHistList(0x0) { /// Default constructor fNCh = AliCheckMuonDetEltResponse::fNbrOfChamber; fNSt = AliCheckMuonDetEltResponse::fNbrOfStation; fNDE = AliAnalysisTaskMuonTrackingEff::fTotNbrOfDetectionElt; for (Int_t iCluster = 0; iCluster GetNumberOfMuonTracks(); fTrackParams = new TClonesArray(); ///Begininig of the loop: for (iTrack = 0; iTrack < nTracks; iTrack++) { esdTrack = fESD -> GetMuonTrack(iTrack); if( esdTrack->ContainTrackerData() ) { AliMUONESDInterface::ESDToMUON(*esdTrack, track); fTrackParams = track.GetTrackParamAtCluster(); TrackParamLoop(); //!GetEntriesFast(); //!At(iTrackParam); fCluster = (AliMUONVCluster* ) fTrackParam ->GetClusterPtr(); fTrackFilter [fCluster->GetChamberId()] = 1; chamberResponse[fCluster->GetChamberId()] = 1; } for (Int_t station = 0; station < fNSt-1; ++station) { Int_t filter; //UncheckedAt(fNDE))->Fill(ch, 0); ((TH2F*) fDetEltTTHistList->UncheckedAt(fNDE))->Fill(ch, 0); } } ///Begining of the loop: for (iTrackParam = 0; iTrackParam < nTrackParams; ++iTrackParam) { fTrackParam = (AliMUONTrackParam*) fTrackParams->At(iTrackParam); fCluster = (AliMUONVCluster* ) fTrackParam ->GetClusterPtr(); newChamber = fCluster->GetChamberId(); detElt = fCluster->GetDetElemId(); ///Global and local positions calculation: posXG = fTrackParam->GetNonBendingCoor(); posYG = fTrackParam->GetBendingCoor(); posZG = fTrackParam->GetZ(); fTransformer->Global2Local(detElt, posXG, posYG, posZG, posXL, posYL, posZL); //! oldChamber + 1) //!UncheckedAt(iDet))->Fill(posXL, posYL); } } //_____________________________________________________________________________ void AliCheckMuonDetEltResponse::FillDetEltTTHisto(Int_t chamber, Int_t detElt, Double_t posXG, Double_t posYG, Double_t posZG, Double_t posXL, Double_t posYL, Double_t posZL) { if(fTrackFilter[chamber] == 1) { Int_t iDet = 0; //!UncheckedAt(iDet)) -> Fill(posXL, posYL); if(abs(posYL) > fOverlapSize) //!Global2Local(fGetDetElt[1], posXG, posYG, posZG, posXL, posYL, posZL); //!UncheckedAt(iDet)) -> Fill(posXL, posYL); } else { fTransformer->Global2Local(fGetDetElt[0], posXG, posYG, posZG, posXL, posYL, posZL); //!UncheckedAt(iDet)) -> Fill(posXL, posYL); } } } } } //_____________________________________________________________________________ void AliCheckMuonDetEltResponse::CalculMissClusterParam(AliMUONTrackParam* extrapTrackParam, Int_t firstMissCh, Int_t nbrOfMissCh) { //Calculation of the cluster parameter which was not detect by //the chamber. for (Int_t iCh = 0; iChGetNonBendingCoor(); //!GetBendingCoor(); //!Global2Local(missDetElt, exTraXG, exTraYG, exTraZG, exTraXL, exTraYL, exTraZL); //!3 & chamber<6) iDet = detElt-fOffset*(chamber+1)+18*(chamber-4)+16; if (chamber>5) iDet = detElt-fOffset*(chamber+1)+26*(chamber-6)+52; return iDet; } //_____________________________________________________________________________ void AliCheckMuonDetEltResponse::GetDetEltFromPosition(Int_t chamber, Double_t posX, Double_t posY, Double_t posZ) { /// ///Gives the detetection element fGetDetElt[0] corresponding to the position. In the case ///of an overlap (two detection element with the same (X,Y)) fGetDetElt[1] is calculated. /// Int_t nbrOfDetElt = AliMpDEManager::GetNofDEInChamber(chamber, kTRUE); //!3) { Int_t shift = 0; //!<| if(posX<0) shift = nbrOfDetElt /4 + 1; //!<|Method to avoid the loop on all elements of if(posX>0) shift = (3*nbrOfDetElt)/4 + 1; //!<|detection, and just loop through fourth chamber. //!<| detElt = fOffset*(chamber+1) + shift; //!<| lastDetElt = fOffset*(chamber+1) +(shift+nbrOfDetElt/2)%nbrOfDetElt; //!<| Int_t nbr = 0; while(detElt != lastDetElt) //!Global2Local(detElt, posX, posY, posZ, posXL, posYL, posZL); //! the cluster is in the detection element (-200 & posY>0) fGetDetElt[0] = fOffset*(chamber+1) ; if(posX<0 & posY>0) fGetDetElt[0] = fOffset*(chamber+1) + 1; if(posX<0 & posY<0) fGetDetElt[0] = fOffset*(chamber+1) + 2; if(posX>0 & posY<0) fGetDetElt[0] = fOffset*(chamber+1) + 3; } }