]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUON.cxx
Logging of Debug, Info and Error Messages follwing AliRoot Standard http://aliweb...
[u/mrichter/AliRoot.git] / MUON / AliMUON.cxx
CommitLineData
4c039060 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
4c039060 15
88cb7938 16/* $Id$ */
17
a9e2aefa 18
19///////////////////////////////////////////////
fe4da5cc 20// Manager and hits classes for set:MUON //
21////////////////////////////////////////////////
22
88cb7938 23#include "Riostream.h"
24
25#include <AliPDG.h>
a897a37a 26#include <TBRIK.h>
88cb7938 27#include <TCanvas.h>
28#include <TDirectory.h>
29#include <TFile.h>
94de3818 30#include <TGeometry.h>
88cb7938 31#include <TMinuit.h>
fe4da5cc 32#include <TNode.h>
88cb7938 33#include <TNtuple.h>
fe4da5cc 34#include <TObjArray.h>
88cb7938 35#include <TObject.h>
36#include <TObjectTable.h>
37#include <TPad.h>
a897a37a 38#include <TParticle.h>
39#include <TROOT.h>
88cb7938 40#include <TRandom.h>
41#include <TRotMatrix.h>
42#include <TTUBE.h>
a9e2aefa 43#include <TTUBE.h>
88cb7938 44#include <TTree.h>
45#include <TVector.h>
46#include <TVirtualMC.h>
fe4da5cc 47
d4bb94a1 48//#include "AliHeader.h"
88cb7938 49#include "AliLoader.h"
dbb4e169 50#include "AliRunDigitizer.h"
307d9d04 51#include "AliMC.h"
fac3a970 52#include "AliRun.h"
fe4da5cc 53#include "AliMUON.h"
88cb7938 54#include "AliMUONChamberTrigger.h"
88cb7938 55#include "AliMUONConstants.h"
a9e2aefa 56#include "AliMUONHit.h"
88cb7938 57#include "AliMUONMerger.h"
a9e2aefa 58#include "AliMUONPadHit.h"
a9e2aefa 59#include "AliMUONRawCluster.h"
88cb7938 60#include "AliMUONTransientDigit.h"
ecfa008b 61#include "AliMUONTriggerCircuit.h"
d4bb94a1 62#include "AliMUONGeometryBuilder.h"
d1cd2474 63#include "AliMUONVGeometryBuilder.h"
dbb4e169 64#include "AliMUONDigitizerv2.h"
d1775029 65#include "AliMUONSDigitizerv1.h"
39e39255 66#include "AliMUONRawData.h"
8c343c7c 67#include "AliLog.h"
a9e2aefa 68
69// Defaults parameters for Z positions of chambers
70// taken from values for "stations" in AliMUON::AliMUON
71// const Float_t zch[7]={528, 690., 975., 1249., 1449., 1610, 1710.};
72// and from array "dstation" in AliMUONv1::CreateGeometry
73// Float_t dstation[5]={20., 20., 20, 20., 20.};
74// for tracking chambers,
75// according to (Z1 = zch - dstation) and (Z2 = zch + dstation)
76// for the first and second chambers in the station, respectively,
77// and from "DTPLANES" in AliMUONv1::CreateGeometry
78// const Float_t DTPLANES = 15.;
79// for trigger chambers,
80// according to (Z1 = zch) and (Z2 = zch + DTPLANES)
81// for the first and second chambers in the station, respectively
fe4da5cc 82
fe4da5cc 83ClassImp(AliMUON)
30178c30 84
ce3f5e87 85//__________________________________________________________________
fe4da5cc 86AliMUON::AliMUON()
30178c30 87 : AliDetector(),
88 fNCh(0),
89 fNTrackingCh(0),
90 fMUONData(0),
91 fSplitLevel(0),
92 fChambers(0),
30178c30 93 fTriggerCircuits(0),
d4bb94a1 94 fGeometryBuilder(0),
30178c30 95 fAccCut(kFALSE),
96 fAccMin(0.),
97 fAccMax(0.),
98 fMaxStepGas(0.),
99 fMaxStepAlu(0.),
100 fMaxDestepGas(0.),
101 fMaxDestepAlu(0.),
102 fMaxIterPad(0),
103 fCurIterPad(0),
104 fMerger(0)
fe4da5cc 105{
de05461e 106// Default Constructor
107//
1bd26093 108 fIshunt = 0;
fe4da5cc 109}
30178c30 110
ce3f5e87 111//__________________________________________________________________
fe4da5cc 112AliMUON::AliMUON(const char *name, const char *title)
30178c30 113 : AliDetector(name,title),
114 fNCh(AliMUONConstants::NCh()),
115 fNTrackingCh(AliMUONConstants::NTrackingCh()),
116 fMUONData(0),
117 fSplitLevel(0),
118 fChambers(0),
30178c30 119 fTriggerCircuits(0),
d4bb94a1 120 fGeometryBuilder(0),
30178c30 121 fAccCut(kFALSE),
122 fAccMin(0.),
123 fAccMax(0.),
124 fMaxStepGas(0.1),
125 fMaxStepAlu(0.1),
126 fMaxDestepGas(-1), // Negatives values are ignored by geant3 CONS200
127 fMaxDestepAlu(-1), // in the calculation of the tracking parameters
128 fMaxIterPad(0),
129 fCurIterPad(0),
130 fMerger(0)
fe4da5cc 131{
f665c1ea 132
30178c30 133 fIshunt = 0;
a897a37a 134
ce3f5e87 135 SetMarkerColor(kRed);//
a9e2aefa 136//
ce3f5e87 137// Creating List of Chambers
a9e2aefa 138 Int_t ch;
f665c1ea 139 fChambers = new TObjArray(AliMUONConstants::NCh());
d1cd2474 140
a9e2aefa 141 // Loop over stations
f665c1ea 142 for (Int_t st = 0; st < AliMUONConstants::NCh() / 2; st++) {
a9e2aefa 143 // Loop over 2 chambers in the station
ce3f5e87 144 for (Int_t stCH = 0; stCH < 2; stCH++) {
145 //
146 //
147 // Default Parameters for Muon Tracking Stations
148 ch = 2 * st + stCH;
149 if (ch < AliMUONConstants::NTrackingCh()) {
150 fChambers->AddAt(new AliMUONChamber(ch),ch);
151 } else {
152 fChambers->AddAt(new AliMUONChamberTrigger(ch),ch);
153 }
154 AliMUONChamber* chamber = (AliMUONChamber*) fChambers->At(ch);
d1cd2474 155 //chamber->SetGid(0);
ce3f5e87 156 // Default values for Z of chambers
157 chamber->SetZ(AliMUONConstants::DefaultChamberZ(ch));
158 //
159 chamber->InitGeo(AliMUONConstants::DefaultChamberZ(ch));
160 // Set chamber inner and outer radius to default
161 chamber->SetRInner(AliMUONConstants::Dmin(st)/2);
162 chamber->SetROuter(AliMUONConstants::Dmax(st)/2);
163 //
164 } // Chamber stCH (0, 1) in
a9e2aefa 165 } // Station st (0...)
ce3f5e87 166
ce3f5e87 167 // cp new design of AliMUONTriggerDecision
168 fTriggerCircuits = new TObjArray(AliMUONConstants::NTriggerCircuit());
169 for (Int_t circ=0; circ<AliMUONConstants::NTriggerCircuit(); circ++) {
170 fTriggerCircuits->AddAt(new AliMUONTriggerCircuit(),circ);
171 }
d4bb94a1 172
173 // Geometry builder
174 fGeometryBuilder = new AliMUONGeometryBuilder(this);
fe4da5cc 175}
30178c30 176
ce3f5e87 177//____________________________________________________________________
30178c30 178AliMUON::AliMUON(const AliMUON& rMUON)
179 : AliDetector(rMUON)
a9e2aefa 180{
30178c30 181// Protected copy constructor
182
8c343c7c 183 AliFatal("Not implemented.");
a9e2aefa 184}
30178c30 185
ce3f5e87 186//____________________________________________________________________
fe4da5cc 187AliMUON::~AliMUON()
188{
de05461e 189// Destructor
8c343c7c 190 AliDebug(1,"Calling AliMUON destructor");
ce3f5e87 191 fIshunt = 0;
192 if (fMerger) delete fMerger;
d1cd2474 193
c6df4ef2 194 if (fChambers){
195 fChambers->Delete();
196 delete fChambers;
197 }
198 if (fTriggerCircuits){
199 fTriggerCircuits->Delete();
200 delete fTriggerCircuits;
201 }
202 delete fMUONData;
d4bb94a1 203 delete fGeometryBuilder;
d1cd2474 204}
30178c30 205
206//________________________________________________________________________
207AliMUON& AliMUON::operator = (const AliMUON& rhs)
208{
209// Protected assignement operator
210
211 if (this == &rhs) return *this;
212
8c343c7c 213 AliFatal("Not implemented.");
30178c30 214
215 return *this;
216}
217
d1cd2474 218//_____________________________________________________________________________
219void AliMUON::AddGeometryBuilder(AliMUONVGeometryBuilder* geomBuilder)
220{
221// Adds the geometry builder to the list
222// ---
223
d4bb94a1 224 fGeometryBuilder->AddBuilder(geomBuilder);
a897a37a 225}
c9d10ab5 226
ce3f5e87 227//____________________________________________________________________
fe4da5cc 228void AliMUON::BuildGeometry()
229{
de05461e 230// Geometry for event display
c9d10ab5 231
232 for (Int_t i=0; i<7; i++) {
233 for (Int_t j=0; j<2; j++) {
234 Int_t id=2*i+j+1;
235 this->Chamber(id-1).SegmentationModel(1)->Draw("eventdisplay");
236 }
237 }
fe4da5cc 238}
c9d10ab5 239
ce3f5e87 240//__________________________________________________________________
241void AliMUON::SetTreeAddress()
a897a37a 242{
ce3f5e87 243 GetMUONData()->SetLoader(fLoader);
d1775029 244 // GetMUONData()->MakeBranch("D,S,RC");
245 // GetMUONData()->SetTreeAddress("H,D,S,RC");
52c9bc11 246 GetMUONData()->SetTreeAddress("H");
307d9d04 247 if (fHits != GetMUONData()->Hits()) {
ae31c826 248 if ( gAlice->GetMCApp() )
6d2f7cbd 249 if ( gAlice->GetMCApp()->GetHitLists() ) {
250 fHits = GetMUONData()->Hits();
251 gAlice->GetMCApp()->AddHitList(fHits); // For purifyKine, only necessary when Hit list is created in AliMUONData
252 }
307d9d04 253 }
6d2f7cbd 254 fHits = GetMUONData()->Hits(); // Added by Ivana to use the methods FisrtHit, NextHit of AliDetector
a9e2aefa 255}
256
ce3f5e87 257//____________________________________________________________________
a9e2aefa 258void AliMUON::SetPadSize(Int_t id, Int_t isec, Float_t p1, Float_t p2)
259{
de05461e 260// Set the pad size for chamber id and cathode isec
a9e2aefa 261 Int_t i=2*(id-1);
2682e810 262 ((AliMUONChamber*) fChambers->At(i)) ->SetPadSize(isec,p1,p2);
263 ((AliMUONChamber*) fChambers->At(i+1))->SetPadSize(isec,p1,p2);
a897a37a 264}
265
fe4da5cc 266//___________________________________________
a9e2aefa 267void AliMUON::SetChambersZ(const Float_t *Z)
268{
269 // Set Z values for all chambers (tracking and trigger)
270 // from the array pointed to by "Z"
f665c1ea 271 for (Int_t ch = 0; ch < AliMUONConstants::NCh(); ch++)
2682e810 272 ((AliMUONChamber*) fChambers->At(ch))->SetZ(Z[ch]);
f665c1ea 273 return;
a9e2aefa 274}
ce3f5e87 275//_________________________________________________________________
a9e2aefa 276void AliMUON::SetChambersZToDefault()
fe4da5cc 277{
a9e2aefa 278 // Set Z values for all chambers (tracking and trigger)
279 // to default values
f665c1ea 280 SetChambersZ(AliMUONConstants::DefaultChamberZ());
a9e2aefa 281 return;
fe4da5cc 282}
ce3f5e87 283//_________________________________________________________________
a897a37a 284void AliMUON::SetChargeSlope(Int_t id, Float_t p1)
fe4da5cc 285{
de05461e 286// Set the inverse charge slope for chamber id
ce3f5e87 287 Int_t i=2*(id-1); //PH ((AliMUONChamber*) (*fChambers)[i])->SetSigmaIntegration(p1);
288 //PH ((AliMUONChamber*) (*fChambers)[i+1])->SetSigmaIntegration(p1);
2682e810 289 ((AliMUONChamber*) fChambers->At(i))->SetChargeSlope(p1);
290 ((AliMUONChamber*) fChambers->At(i+1))->SetChargeSlope(p1);
fe4da5cc 291}
ce3f5e87 292//__________________________________________________________________
a897a37a 293void AliMUON::SetChargeSpread(Int_t id, Float_t p1, Float_t p2)
fe4da5cc 294{
de05461e 295// Set sigma of charge spread for chamber id
fe4da5cc 296 Int_t i=2*(id-1);
2682e810 297 ((AliMUONChamber*) fChambers->At(i))->SetChargeSpread(p1,p2);
298 ((AliMUONChamber*) fChambers->At(i+1))->SetChargeSpread(p1,p2);
fe4da5cc 299}
ce3f5e87 300//___________________________________________________________________
a897a37a 301void AliMUON::SetSigmaIntegration(Int_t id, Float_t p1)
fe4da5cc 302{
de05461e 303// Set integration limits for charge spread
fe4da5cc 304 Int_t i=2*(id-1);
2682e810 305 ((AliMUONChamber*) fChambers->At(i))->SetSigmaIntegration(p1);
306 ((AliMUONChamber*) fChambers->At(i+1))->SetSigmaIntegration(p1);
fe4da5cc 307}
308
ce3f5e87 309//__________________________________________________________________
d09fafb0 310void AliMUON::SetMaxAdc(Int_t id, Int_t p1)
fe4da5cc 311{
de05461e 312// Set maximum number for ADCcounts (saturation)
fe4da5cc 313 Int_t i=2*(id-1);
2682e810 314 ((AliMUONChamber*) fChambers->At(i))->SetMaxAdc(p1);
315 ((AliMUONChamber*) fChambers->At(i+1))->SetMaxAdc(p1);
fe4da5cc 316}
d4bb94a1 317
ce3f5e87 318//__________________________________________________________________
a897a37a 319void AliMUON::SetMaxStepGas(Float_t p1)
fe4da5cc 320{
de05461e 321// Set stepsize in gas
ce3f5e87 322 fMaxStepGas=p1;
fe4da5cc 323}
ce3f5e87 324//__________________________________________________________________
a897a37a 325void AliMUON::SetMaxStepAlu(Float_t p1)
fe4da5cc 326{
de05461e 327// Set step size in Alu
fe4da5cc 328 fMaxStepAlu=p1;
329}
ce3f5e87 330//__________________________________________________________________
a897a37a 331void AliMUON::SetMaxDestepGas(Float_t p1)
fe4da5cc 332{
de05461e 333// Set maximum step size in Gas
fe4da5cc 334 fMaxDestepGas=p1;
335}
ce3f5e87 336//__________________________________________________________________
a897a37a 337void AliMUON::SetMaxDestepAlu(Float_t p1)
fe4da5cc 338{
de05461e 339// Set maximum step size in Alu
ce3f5e87 340 fMaxDestepAlu=p1;
fe4da5cc 341}
d4bb94a1 342
ce3f5e87 343//___________________________________________________________________
5c1f55c5 344void AliMUON::SetAcceptance(Bool_t acc, Float_t angmin, Float_t angmax)
fe4da5cc 345{
de05461e 346// Set acceptance cuts
ce3f5e87 347 fAccCut=acc;
348 fAccMin=angmin*TMath::Pi()/180;
349 fAccMax=angmax*TMath::Pi()/180;
350 Int_t ch;
351 if (acc) {
352 for (Int_t st = 0; st < AliMUONConstants::NCh() / 2; st++) {
353 // Loop over 2 chambers in the station
354 for (Int_t stCH = 0; stCH < 2; stCH++) {
355 ch = 2 * st + stCH;
356 // Set chamber inner and outer radius according to acceptance cuts
b13a15bc 357 Chamber(ch).SetRInner(TMath::Abs(AliMUONConstants::DefaultChamberZ(ch)*TMath::Tan(fAccMin)));
358 Chamber(ch).SetROuter(TMath::Abs(AliMUONConstants::DefaultChamberZ(ch)*TMath::Tan(fAccMax)));
ce3f5e87 359 } // chamber loop
360 } // station loop
361 }
fe4da5cc 362}
d1cd2474 363
364//____________________________________________________________________
365Float_t AliMUON::GetMaxStepGas() const
366{
367// Return stepsize in gas
368
369 return fMaxStepGas;
370}
371
372//____________________________________________________________________
373Float_t AliMUON::GetMaxStepAlu() const
374{
375// Return step size in Alu
376
377 return fMaxStepAlu;
378}
379
380//____________________________________________________________________
381Float_t AliMUON::GetMaxDestepGas() const
382{
383// Return maximum step size in Gas
384
385 return fMaxDestepGas;
386}
387
388//____________________________________________________________________
389Float_t AliMUON::GetMaxDestepAlu() const
390{
391// Return maximum step size in Gas
392
393 return fMaxDestepAlu;
394}
d4bb94a1 395
883746f3 396//____________________________________________________________________
397 void AliMUON::SetAlign(Bool_t align)
398 {
399 // Sets option for alignement to geometry builder
400
401 fGeometryBuilder->SetAlign(align);
402}
403
ce3f5e87 404//____________________________________________________________________
a30a000f 405void AliMUON::SetSegmentationModel(Int_t id, Int_t isec, AliSegmentation *segmentation)
fe4da5cc 406{
de05461e 407// Set the segmentation for chamber id cathode isec
2682e810 408 ((AliMUONChamber*) fChambers->At(id))->SetSegmentationModel(isec, segmentation);
fe4da5cc 409
410}
ce3f5e87 411//____________________________________________________________________
a9e2aefa 412void AliMUON::SetResponseModel(Int_t id, AliMUONResponse *response)
fe4da5cc 413{
de05461e 414// Set the response for chamber id
2682e810 415 ((AliMUONChamber*) fChambers->At(id))->SetResponseModel(response);
fe4da5cc 416}
ce3f5e87 417//____________________________________________________________________
fe4da5cc 418void AliMUON::SetNsec(Int_t id, Int_t nsec)
419{
de05461e 420// Set number of segmented cathods for chamber id
2682e810 421 ((AliMUONChamber*) fChambers->At(id))->SetNsec(nsec);
fe4da5cc 422}
85a5290f 423//____________________________________________________________________
c92eb8ad 424AliDigitizer* AliMUON::CreateDigitizer(AliRunDigitizer* manager) const
85a5290f 425{
dbb4e169 426 return new AliMUONDigitizerv2(manager);
85a5290f 427}
ce3f5e87 428//_____________________________________________________________________
2ab0c725 429void AliMUON::SDigits2Digits()
430{
d963c261 431
432// write TreeD here
433
434 if (!fMerger) {
8c343c7c 435 AliDebug(1,"Create default AliMUONMerger ");
436 AliDebug(1," no merging, just digitization of 1 event will be done");
437 fMerger = new AliMUONMerger();
2ab0c725 438 }
d963c261 439 fMerger->Init();
440 fMerger->Digitise();
441 char hname[30];
88cb7938 442 // sprintf(hname,"TreeD%d",fLoader->GetHeader()->GetEvent());
443 fLoader->TreeD()->Write(hname,TObject::kOverwrite);
444 fLoader->TreeD()->Reset();
2ab0c725 445}
a9e2aefa 446
d1775029 447//_____________________________________________________________________
448void AliMUON::Hits2SDigits()
449{
dbb4e169 450 // Adaption of AliMUONSDigitizerv1 to be excuted by the AliSimulation framework
451 AliRunLoader* runLoader = fLoader->GetRunLoader();
452 AliRunDigitizer * manager = new AliRunDigitizer(1,1);
e191bb57 453 manager->SetInputStream(0,runLoader->GetFileName(),AliConfig::GetDefaultEventFolderName());
dbb4e169 454 AliMUONDigitizer * dMUON = new AliMUONSDigitizerv1(manager);
455 fLoader->LoadHits("READ");
456 for (Int_t iEvent = 0; iEvent < runLoader->GetNumberOfEvents(); iEvent++) {
457 runLoader->GetEvent(iEvent);
458 dMUON->Exec("");
459 }
460 fLoader->UnloadHits();
d1775029 461}
39e39255 462//_____________________________________________________________________
463void AliMUON::Digits2Raw()
464{
465 // convert digits of the current event to raw data
466 AliMUONRawData* rawData;
467
468 rawData = new AliMUONRawData(fLoader);
8c343c7c 469 if (!rawData->WriteRawData()) AliInfo("pb writting raw data");
39e39255 470 delete rawData;
471 return;
472}
ce3f5e87 473//_______________________________________________________________________
3fa6cfdd 474AliLoader* AliMUON::MakeLoader(const char* topfoldername)
475{
476//builds standard getter (AliLoader type)
477//if detector wants to use castomized getter, it must overload this method
478
8c343c7c 479
480 AliDebug(1,Form("Creating standard getter for detector %s. Top folder is %s.",
481 GetName(),topfoldername));
128843d9 482 fLoader = new AliLoader(GetName(),topfoldername);
ce3f5e87 483 fMUONData = new AliMUONData(fLoader,GetName(),GetName());
d652f85c 484 fMUONData->SetSplitLevel(fSplitLevel);
3fa6cfdd 485 return fLoader;
486}
ce3f5e87 487//_______________________________________________________________________
a9e2aefa 488AliMUONPadHit* AliMUON::FirstPad(AliMUONHit* hit, TClonesArray *clusters)
fe4da5cc 489{
5a35ac13 490// to be removed
fe4da5cc 491 // Initialise the pad iterator
492 // Return the address of the first padhit for hit
a897a37a 493 TClonesArray *theClusters = clusters;
fe4da5cc 494 Int_t nclust = theClusters->GetEntriesFast();
1bd28025 495 if (nclust && hit->PHlast() > 0) {
30178c30 496 fMaxIterPad=hit->PHlast();
497 fCurIterPad=hit->PHfirst();
498 return (AliMUONPadHit*) clusters->UncheckedAt(fCurIterPad-1);
fe4da5cc 499 } else {
500 return 0;
501 }
502}
ce3f5e87 503//_______________________________________________________________________
a9e2aefa 504AliMUONPadHit* AliMUON::NextPad(TClonesArray *clusters)
fe4da5cc 505{
5a35ac13 506 // To be removed
de05461e 507// Get next pad (in iterator)
508//
30178c30 509 fCurIterPad++;
510 if (fCurIterPad <= fMaxIterPad) {
511 return (AliMUONPadHit*) clusters->UncheckedAt(fCurIterPad-1);
fe4da5cc 512 } else {
513 return 0;
514 }
515}
ce3f5e87 516//_______________________________________________________________________
a897a37a 517
518AliMUONRawCluster *AliMUON::RawCluster(Int_t ichamber, Int_t icathod, Int_t icluster)
519{
de05461e 520//
521// Return rawcluster (icluster) for chamber ichamber and cathode icathod
522// Obsolete ??
ce3f5e87 523 TClonesArray *muonRawCluster = GetMUONData()->RawClusters(ichamber);
a897a37a 524 ResetRawClusters();
88cb7938 525 TTree *treeR = fLoader->TreeR();
a9e2aefa 526 Int_t nent=(Int_t)treeR->GetEntries();
527 treeR->GetEvent(nent-2+icathod-1);
528 //treeR->GetEvent(icathod);
529 //Int_t nrawcl = (Int_t)muonRawCluster->GetEntriesFast();
a897a37a 530
a9e2aefa 531 AliMUONRawCluster * mRaw = (AliMUONRawCluster*)muonRawCluster->UncheckedAt(icluster);
a897a37a 532 //printf("RawCluster _ nent nrawcl icluster mRaw %d %d %d%p\n",nent,nrawcl,icluster,mRaw);
533
534 return mRaw;
535}
ce3f5e87 536//________________________________________________________________________
1cae9436 537void AliMUON::SetMerger(AliMUONMerger* merger)
538{
539// Set pointer to merger
540 fMerger = merger;
541}
ce3f5e87 542//________________________________________________________________________
1cae9436 543AliMUONMerger* AliMUON::Merger()
544{
545// Return pointer to merger
546 return fMerger;
547}
ce01996f 548/* PH Commented out waiting for correct implementation
ce3f5e87 549//________________________________________________________________________
48b32e42 550void AliMUON::RemapTrackHitIDs(Int_t* map)
551{
552// Remaps the track numbers in the hits arrays, so that they correspond
553// to the entry indices in the Kine tree.
554// The correspondance is not direct. To get the real index into the Kine tree
555// compute the particle index as follows:
556//
557// num_primaries = AliStack::GetNprimary();
558// num_tracks = AliStack::GetNtracks();
559// track = AliMUONHit::Track()
560//
561// if (track < num_primaries)
562// particleindex = track + num_tracks - num_primaries;
563// else
564// particleindex = track - num_primaries;
565
566 // Remap the track numbers based on the specified map.
567 AliMUONData* data = GetMUONData();
568 TClonesArray* hits = data->Hits();
569 for (Int_t i = 0; i < hits->GetEntriesFast(); i++)
570 {
571 AliMUONHit* hit = static_cast<AliMUONHit*>( hits->At(i) );
572 hit->SetTrack( map[hit->Track()] );
573 };
574};
ce01996f 575*/