]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUON.cxx
- Adapted comments for Doxygen
[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
d19b6003 18// ------------------
19// Class AliMUON
20// ------------------
21// AliDetector class for MUON subsystem
22// providing simulation data management
fe4da5cc 23
88cb7938 24#include "Riostream.h"
25
26#include <AliPDG.h>
a897a37a 27#include <TBRIK.h>
88cb7938 28#include <TCanvas.h>
29#include <TDirectory.h>
30#include <TFile.h>
94de3818 31#include <TGeometry.h>
88cb7938 32#include <TMinuit.h>
fe4da5cc 33#include <TNode.h>
88cb7938 34#include <TNtuple.h>
fe4da5cc 35#include <TObjArray.h>
88cb7938 36#include <TObject.h>
37#include <TObjectTable.h>
38#include <TPad.h>
a897a37a 39#include <TParticle.h>
40#include <TROOT.h>
88cb7938 41#include <TRandom.h>
42#include <TRotMatrix.h>
43#include <TTUBE.h>
a9e2aefa 44#include <TTUBE.h>
88cb7938 45#include <TTree.h>
46#include <TVector.h>
47#include <TVirtualMC.h>
fe4da5cc 48
d4bb94a1 49//#include "AliHeader.h"
88cb7938 50#include "AliLoader.h"
dbb4e169 51#include "AliRunDigitizer.h"
307d9d04 52#include "AliMC.h"
fac3a970 53#include "AliRun.h"
fe4da5cc 54#include "AliMUON.h"
88cb7938 55#include "AliMUONChamberTrigger.h"
88cb7938 56#include "AliMUONConstants.h"
ffd9faa2 57#include "AliMUONHit.h"
a9e2aefa 58#include "AliMUONRawCluster.h"
88cb7938 59#include "AliMUONTransientDigit.h"
ecfa008b 60#include "AliMUONTriggerCircuit.h"
0c527060 61#include "AliMUONTriggerCircuitNew.h"
504d0837 62#include "AliMUONGeometry.h"
63#include "AliMUONGeometryTransformer.h"
d4bb94a1 64#include "AliMUONGeometryBuilder.h"
e118b27e 65#include "AliMUONCommonGeometryBuilder.h"
d1cd2474 66#include "AliMUONVGeometryBuilder.h"
a713db22 67#include "AliMUONGeometrySegmentation.h"
dbb4e169 68#include "AliMUONDigitizerv2.h"
d1775029 69#include "AliMUONSDigitizerv1.h"
a19e2543 70#include "AliMUONRawWriter.h"
504d0837 71#include "AliMUONSegmentation.h"
8c343c7c 72#include "AliLog.h"
a9e2aefa 73
68585390 74#include "AliMUONSDigitizerV2.h"
75#include "AliMUONDigitizerV3.h"
76
d5609cfc 77#include "AliMUONSt1GeometryBuilderV2.h"
78#include "AliMUONSt2GeometryBuilderV2.h"
79#include "AliMUONSlatGeometryBuilder.h"
80#include "AliMUONTriggerGeometryBuilder.h"
81
a9e2aefa 82// Defaults parameters for Z positions of chambers
83// taken from values for "stations" in AliMUON::AliMUON
84// const Float_t zch[7]={528, 690., 975., 1249., 1449., 1610, 1710.};
85// and from array "dstation" in AliMUONv1::CreateGeometry
86// Float_t dstation[5]={20., 20., 20, 20., 20.};
87// for tracking chambers,
88// according to (Z1 = zch - dstation) and (Z2 = zch + dstation)
89// for the first and second chambers in the station, respectively,
90// and from "DTPLANES" in AliMUONv1::CreateGeometry
91// const Float_t DTPLANES = 15.;
92// for trigger chambers,
93// according to (Z1 = zch) and (Z2 = zch + DTPLANES)
94// for the first and second chambers in the station, respectively
fe4da5cc 95
13985652 96/// \cond CLASSIMP
97ClassImp(AliMUON)
98/// \endcond
30178c30 99
ce3f5e87 100//__________________________________________________________________
fe4da5cc 101AliMUON::AliMUON()
30178c30 102 : AliDetector(),
103 fNCh(0),
104 fNTrackingCh(0),
105 fMUONData(0),
106 fSplitLevel(0),
107 fChambers(0),
30178c30 108 fTriggerCircuits(0),
0c527060 109 fTriggerCircuitsNew(0),
d4bb94a1 110 fGeometryBuilder(0),
504d0837 111 fSegmentation(0),
30178c30 112 fAccCut(kFALSE),
113 fAccMin(0.),
114 fAccMax(0.),
115 fMaxStepGas(0.),
116 fMaxStepAlu(0.),
117 fMaxDestepGas(0.),
118 fMaxDestepAlu(0.),
119 fMaxIterPad(0),
ced309a5 120 fCurIterPad(0),
68585390 121 fTriggerScalerEvent(kFALSE),
122 fSDigitizerType(""),
d5609cfc 123 fDigitizerType(""),
124 fRawWriter(0x0)
fe4da5cc 125{
d19b6003 126/// Default Constructor
127
128 AliDebug(1,Form("default (empty) ctor this=%p",this));
1bd26093 129 fIshunt = 0;
fe4da5cc 130}
30178c30 131
ce3f5e87 132//__________________________________________________________________
68585390 133AliMUON::AliMUON(const char *name, const char *title,
134 const char* sDigitizerClassName,
135 const char* digitizerClassName)
30178c30 136 : AliDetector(name,title),
137 fNCh(AliMUONConstants::NCh()),
138 fNTrackingCh(AliMUONConstants::NTrackingCh()),
139 fMUONData(0),
140 fSplitLevel(0),
141 fChambers(0),
30178c30 142 fTriggerCircuits(0),
0c527060 143 fTriggerCircuitsNew(0),
d4bb94a1 144 fGeometryBuilder(0),
504d0837 145 fSegmentation(0),
30178c30 146 fAccCut(kFALSE),
147 fAccMin(0.),
148 fAccMax(0.),
149 fMaxStepGas(0.1),
150 fMaxStepAlu(0.1),
151 fMaxDestepGas(-1), // Negatives values are ignored by geant3 CONS200
152 fMaxDestepAlu(-1), // in the calculation of the tracking parameters
153 fMaxIterPad(0),
ced309a5 154 fCurIterPad(0),
68585390 155 fTriggerScalerEvent(kFALSE),
156 fSDigitizerType(sDigitizerClassName),
d5609cfc 157 fDigitizerType(digitizerClassName),
158 fRawWriter(0x0)
fe4da5cc 159{
d19b6003 160/// Standard constructor
161
162 AliDebug(1,Form("ctor this=%p",this));
30178c30 163 fIshunt = 0;
a897a37a 164
ce3f5e87 165 SetMarkerColor(kRed);//
e118b27e 166
167 // Geometry builder
168 fGeometryBuilder = new AliMUONGeometryBuilder(this);
169
170 // Common geometry definitions
171 fGeometryBuilder
172 ->AddBuilder(new AliMUONCommonGeometryBuilder(this));
173
d5609cfc 174 // By default, add also all the needed geometry builders.
175 // If you want to change this from outside, please use ResetGeometryBuilder
176 // method, followed by AddGeometryBuilder ones.
177
178 AddGeometryBuilder(new AliMUONSt1GeometryBuilderV2(this));
179 AddGeometryBuilder(new AliMUONSt2GeometryBuilderV2(this));
180 AddGeometryBuilder(new AliMUONSlatGeometryBuilder(this));
181 AddGeometryBuilder(new AliMUONTriggerGeometryBuilder(this));
182
183 //
184 // Creating List of Chambers
a9e2aefa 185 Int_t ch;
f665c1ea 186 fChambers = new TObjArray(AliMUONConstants::NCh());
d1cd2474 187
a9e2aefa 188 // Loop over stations
f665c1ea 189 for (Int_t st = 0; st < AliMUONConstants::NCh() / 2; st++) {
a9e2aefa 190 // Loop over 2 chambers in the station
ce3f5e87 191 for (Int_t stCH = 0; stCH < 2; stCH++) {
192 //
193 //
194 // Default Parameters for Muon Tracking Stations
195 ch = 2 * st + stCH;
196 if (ch < AliMUONConstants::NTrackingCh()) {
197 fChambers->AddAt(new AliMUONChamber(ch),ch);
198 } else {
504d0837 199 fChambers->AddAt(new AliMUONChamberTrigger(ch, GetGeometryTransformer()),ch);
ce3f5e87 200 }
ce3f5e87 201 } // Chamber stCH (0, 1) in
a9e2aefa 202 } // Station st (0...)
ce3f5e87 203
ce3f5e87 204 // cp new design of AliMUONTriggerDecision
205 fTriggerCircuits = new TObjArray(AliMUONConstants::NTriggerCircuit());
206 for (Int_t circ=0; circ<AliMUONConstants::NTriggerCircuit(); circ++) {
207 fTriggerCircuits->AddAt(new AliMUONTriggerCircuit(),circ);
208 }
0c527060 209
210 fTriggerCircuitsNew = new TObjArray(AliMUONConstants::NTriggerCircuit());
211 for (Int_t circ=0; circ<AliMUONConstants::NTriggerCircuit(); circ++) {
212 fTriggerCircuitsNew->AddAt(new AliMUONTriggerCircuitNew(),circ);
213 }
214
fe4da5cc 215}
30178c30 216
ce3f5e87 217//____________________________________________________________________
fe4da5cc 218AliMUON::~AliMUON()
219{
d19b6003 220/// Destructor
221
edee5e63 222 AliDebug(1,Form("dtor this=%p",this));
ce3f5e87 223 fIshunt = 0;
d1cd2474 224
c6df4ef2 225 if (fChambers){
226 fChambers->Delete();
227 delete fChambers;
228 }
229 if (fTriggerCircuits){
230 fTriggerCircuits->Delete();
231 delete fTriggerCircuits;
232 }
0c527060 233 if (fTriggerCircuitsNew){
234 fTriggerCircuitsNew->Delete();
235 delete fTriggerCircuitsNew;
236 }
237
c6df4ef2 238 delete fMUONData;
d4bb94a1 239 delete fGeometryBuilder;
504d0837 240 delete fSegmentation;
d5609cfc 241 delete fRawWriter;
d1cd2474 242}
30178c30 243
d1cd2474 244//_____________________________________________________________________________
245void AliMUON::AddGeometryBuilder(AliMUONVGeometryBuilder* geomBuilder)
246{
d19b6003 247/// Add the geometry builder to the list
d1cd2474 248
d4bb94a1 249 fGeometryBuilder->AddBuilder(geomBuilder);
a897a37a 250}
c9d10ab5 251
ce3f5e87 252//____________________________________________________________________
fe4da5cc 253void AliMUON::BuildGeometry()
254{
d19b6003 255/// Geometry for event display
c9d10ab5 256
002920d1 257
ae89d471 258// for (Int_t i = 0; i < AliMUONConstants::NCh(); i++)
259// this->Chamber(i).SegmentationModel2(1)->Draw("eventdisplay");// to be check !
260
002920d1 261
fe4da5cc 262}
c9d10ab5 263
504d0837 264//____________________________________________________________________
265const AliMUONGeometry* AliMUON::GetGeometry() const
266{
d19b6003 267/// Return geometry parametrisation
504d0837 268
269 if ( !fGeometryBuilder) {
270 AliWarningStream() << "GeometryBuilder not defined." << std::endl;
271 return 0;
272 }
273
274 return fGeometryBuilder->GetGeometry();
275}
276
277//____________________________________________________________________
278const AliMUONGeometryTransformer* AliMUON::GetGeometryTransformer() const
279{
d19b6003 280/// Return geometry parametrisation
504d0837 281
282 const AliMUONGeometry* kGeometry = GetGeometry();
283
284 if ( !kGeometry) return 0;
285
286 return kGeometry->GetTransformer();
287}
288
ce3f5e87 289//__________________________________________________________________
290void AliMUON::SetTreeAddress()
a897a37a 291{
d19b6003 292/// Set Hits tree address
293
ce3f5e87 294 GetMUONData()->SetLoader(fLoader);
d1775029 295 // GetMUONData()->MakeBranch("D,S,RC");
296 // GetMUONData()->SetTreeAddress("H,D,S,RC");
52c9bc11 297 GetMUONData()->SetTreeAddress("H");
307d9d04 298 if (fHits != GetMUONData()->Hits()) {
ae31c826 299 if ( gAlice->GetMCApp() )
6d2f7cbd 300 if ( gAlice->GetMCApp()->GetHitLists() ) {
301 fHits = GetMUONData()->Hits();
302 gAlice->GetMCApp()->AddHitList(fHits); // For purifyKine, only necessary when Hit list is created in AliMUONData
303 }
307d9d04 304 }
6d2f7cbd 305 fHits = GetMUONData()->Hits(); // Added by Ivana to use the methods FisrtHit, NextHit of AliDetector
a9e2aefa 306}
307
ce3f5e87 308//_________________________________________________________________
a897a37a 309void AliMUON::SetChargeSlope(Int_t id, Float_t p1)
fe4da5cc 310{
d19b6003 311/// Set the inverse charge slope for chamber id
312
ce3f5e87 313 Int_t i=2*(id-1); //PH ((AliMUONChamber*) (*fChambers)[i])->SetSigmaIntegration(p1);
314 //PH ((AliMUONChamber*) (*fChambers)[i+1])->SetSigmaIntegration(p1);
2682e810 315 ((AliMUONChamber*) fChambers->At(i))->SetChargeSlope(p1);
316 ((AliMUONChamber*) fChambers->At(i+1))->SetChargeSlope(p1);
fe4da5cc 317}
ce3f5e87 318//__________________________________________________________________
a897a37a 319void AliMUON::SetChargeSpread(Int_t id, Float_t p1, Float_t p2)
fe4da5cc 320{
d19b6003 321/// Set sigma of charge spread for chamber id
322
fe4da5cc 323 Int_t i=2*(id-1);
2682e810 324 ((AliMUONChamber*) fChambers->At(i))->SetChargeSpread(p1,p2);
325 ((AliMUONChamber*) fChambers->At(i+1))->SetChargeSpread(p1,p2);
fe4da5cc 326}
ce3f5e87 327//___________________________________________________________________
a897a37a 328void AliMUON::SetSigmaIntegration(Int_t id, Float_t p1)
fe4da5cc 329{
d19b6003 330/// Set integration limits for charge spread
fe4da5cc 331 Int_t i=2*(id-1);
2682e810 332 ((AliMUONChamber*) fChambers->At(i))->SetSigmaIntegration(p1);
333 ((AliMUONChamber*) fChambers->At(i+1))->SetSigmaIntegration(p1);
fe4da5cc 334}
335
ce3f5e87 336//__________________________________________________________________
d09fafb0 337void AliMUON::SetMaxAdc(Int_t id, Int_t p1)
fe4da5cc 338{
d19b6003 339/// Set maximum number for ADCcounts (saturation)
340
fe4da5cc 341 Int_t i=2*(id-1);
2682e810 342 ((AliMUONChamber*) fChambers->At(i))->SetMaxAdc(p1);
343 ((AliMUONChamber*) fChambers->At(i+1))->SetMaxAdc(p1);
fe4da5cc 344}
d4bb94a1 345
ce3f5e87 346//__________________________________________________________________
a897a37a 347void AliMUON::SetMaxStepGas(Float_t p1)
fe4da5cc 348{
d19b6003 349/// Set stepsize in gas
350
ce3f5e87 351 fMaxStepGas=p1;
fe4da5cc 352}
ce3f5e87 353//__________________________________________________________________
a897a37a 354void AliMUON::SetMaxStepAlu(Float_t p1)
fe4da5cc 355{
d19b6003 356/// Set step size in Alu
357
fe4da5cc 358 fMaxStepAlu=p1;
359}
ce3f5e87 360//__________________________________________________________________
a897a37a 361void AliMUON::SetMaxDestepGas(Float_t p1)
fe4da5cc 362{
d19b6003 363/// Set maximum step size in Gas
364
fe4da5cc 365 fMaxDestepGas=p1;
366}
ce3f5e87 367//__________________________________________________________________
a897a37a 368void AliMUON::SetMaxDestepAlu(Float_t p1)
fe4da5cc 369{
d19b6003 370/// Set maximum step size in Alu
371
ce3f5e87 372 fMaxDestepAlu=p1;
fe4da5cc 373}
d4bb94a1 374
d1cd2474 375//____________________________________________________________________
376Float_t AliMUON::GetMaxStepGas() const
377{
d19b6003 378/// Return stepsize in gas
d1cd2474 379
380 return fMaxStepGas;
381}
382
383//____________________________________________________________________
384Float_t AliMUON::GetMaxStepAlu() const
385{
d19b6003 386/// Return step size in Alu
d1cd2474 387
388 return fMaxStepAlu;
389}
390
391//____________________________________________________________________
392Float_t AliMUON::GetMaxDestepGas() const
393{
d19b6003 394/// Return maximum step size in Gas
d1cd2474 395
396 return fMaxDestepGas;
397}
398
399//____________________________________________________________________
400Float_t AliMUON::GetMaxDestepAlu() const
401{
d19b6003 402/// Return maximum step size in Gas
d1cd2474 403
404 return fMaxDestepAlu;
405}
d4bb94a1 406
883746f3 407//____________________________________________________________________
408 void AliMUON::SetAlign(Bool_t align)
a713db22 409{
d19b6003 410/// Set option for alignement to geometry builder
883746f3 411
412 fGeometryBuilder->SetAlign(align);
413}
fe4da5cc 414
82d1ac0a 415//____________________________________________________________________
416 void AliMUON::SetAlign(const TString& fileName, Bool_t align)
417{
d19b6003 418/// Set option for alignement to geometry builder
82d1ac0a 419
420 fGeometryBuilder->SetAlign(fileName, align);
421}
422
ce3f5e87 423//____________________________________________________________________
a9e2aefa 424void AliMUON::SetResponseModel(Int_t id, AliMUONResponse *response)
fe4da5cc 425{
d19b6003 426/// Set the response for chamber id
2682e810 427 ((AliMUONChamber*) fChambers->At(id))->SetResponseModel(response);
fe4da5cc 428}
d19b6003 429
ce3f5e87 430//____________________________________________________________________
c92eb8ad 431AliDigitizer* AliMUON::CreateDigitizer(AliRunDigitizer* manager) const
85a5290f 432{
d19b6003 433/// FIXME: the selection of the class should be done through a factory
434/// mechanism. (see also Hits2SDigits()).
68585390 435
436 AliInfo(Form("Digitizer used : %s",fDigitizerType.Data()));
437
438 if ( fDigitizerType == "digitizer:default" )
439 {
440 return new AliMUONDigitizerv2(manager);
441 }
442 else if ( fDigitizerType == "digitizer:NewDigitizerNewTrigger" )
443 {
444 return new AliMUONDigitizerV3(manager,AliMUONDigitizerV3::kTriggerElectronics);
445 }
446 else if ( fDigitizerType == "digitizer:NewDigitizerOldTrigger" )
447 {
4142b82d 448 return new AliMUONDigitizerV3(manager,AliMUONDigitizerV3::kTriggerDecision, kFALSE, kFALSE);
68585390 449 }
4142b82d 450 else if ( fDigitizerType == "digitizer:NewDigitizerEffTrigger" )
451 {
452 return new AliMUONDigitizerV3(manager,AliMUONDigitizerV3::kTriggerDecision, kTRUE, kFALSE);
453 }
454 else if ( fDigitizerType == "digitizer:NewDigitizerWithNoiseOldTrigger" )
455 {
456 return new AliMUONDigitizerV3(manager,AliMUONDigitizerV3::kTriggerDecision, kFALSE, kTRUE);
457 }
68585390 458 else
459 {
460 AliFatal(Form("Unknown digitizer type : %s",fDigitizerType.Data()));
461 }
462 return 0x0;
463}
464
465//_____________________________________________________________________
466TString
467AliMUON::SDigitizerType() const
468{
d19b6003 469/// Return digitizer type
470
68585390 471 return fSDigitizerType;
85a5290f 472}
68585390 473
ce3f5e87 474//_____________________________________________________________________
2ab0c725 475void AliMUON::SDigits2Digits()
476{
d19b6003 477/// Write TreeD here only
d963c261 478
d963c261 479 char hname[30];
88cb7938 480 // sprintf(hname,"TreeD%d",fLoader->GetHeader()->GetEvent());
481 fLoader->TreeD()->Write(hname,TObject::kOverwrite);
482 fLoader->TreeD()->Reset();
2ab0c725 483}
a9e2aefa 484
d1775029 485//_____________________________________________________________________
486void AliMUON::Hits2SDigits()
487{
d19b6003 488/// FIXME: the selection of the sdigitizer should be done through a
489/// factory mechanism.
68585390 490
491 AliInfo(Form("SDigitizer used : %s",fSDigitizerType.Data()));
492
493 if ( fSDigitizerType == "sdigitizer:default" )
494 {
495 // Adaption of AliMUONSDigitizerv1 to be excuted by the AliSimulation framework
496 AliRunLoader* runLoader = fLoader->GetRunLoader();
497 AliRunDigitizer * manager = new AliRunDigitizer(1,1);
498 manager->SetInputStream(0,runLoader->GetFileName(),AliConfig::GetDefaultEventFolderName());
499 AliMUONDigitizer * dMUON = new AliMUONSDigitizerv1(manager);
500 fLoader->LoadHits("READ");
501 for (Int_t iEvent = 0; iEvent < runLoader->GetNumberOfEvents(); iEvent++) {
502 runLoader->GetEvent(iEvent);
503 dMUON->Exec("");
504 }
505 fLoader->UnloadHits();
506 }
507 else if ( fSDigitizerType == "sdigitizer:AliMUONSDigitizerV2" )
508 {
509 TTask* sdigitizer = new AliMUONSDigitizerV2;
510 sdigitizer->ExecuteTask();
dbb4e169 511 }
68585390 512 else
513 {
514 AliFatal(Form("Unknown sdigitizer classname : %s",fSDigitizerType.Data()));
515 }
516}
517
518//_____________________________________________________________________
519TString
520AliMUON::DigitizerType() const
521{
d19b6003 522/// Return digitizer type
523
68585390 524 return fDigitizerType;
d1775029 525}
68585390 526
39e39255 527//_____________________________________________________________________
528void AliMUON::Digits2Raw()
529{
d19b6003 530/// Convert digits of the current event to raw data
531
d5609cfc 532 if (!fRawWriter)
533 {
534 fRawWriter = new AliMUONRawWriter(fMUONData);
535 if (fTriggerScalerEvent == kTRUE)
536 {
84ceeb06 537 fRawWriter->SetScalersNumbers();
d5609cfc 538 }
539 }
540
541 if (!fRawWriter->Digits2Raw())
542 {
543 AliError("pb writting raw data");
544 }
39e39255 545}
68585390 546
ce3f5e87 547//_______________________________________________________________________
3fa6cfdd 548AliLoader* AliMUON::MakeLoader(const char* topfoldername)
549{
d19b6003 550/// Build standard getter (AliLoader type);
551/// if detector wants to use castomized getter, it must overload this method
8c343c7c 552
553 AliDebug(1,Form("Creating standard getter for detector %s. Top folder is %s.",
554 GetName(),topfoldername));
128843d9 555 fLoader = new AliLoader(GetName(),topfoldername);
ce3f5e87 556 fMUONData = new AliMUONData(fLoader,GetName(),GetName());
d652f85c 557 fMUONData->SetSplitLevel(fSplitLevel);
3fa6cfdd 558 return fLoader;
559}
ce3f5e87 560//_______________________________________________________________________
a897a37a 561
562AliMUONRawCluster *AliMUON::RawCluster(Int_t ichamber, Int_t icathod, Int_t icluster)
563{
d19b6003 564/// Return rawcluster (icluster) for chamber ichamber and cathode icathod
565/// Obsolete ??
566
ce3f5e87 567 TClonesArray *muonRawCluster = GetMUONData()->RawClusters(ichamber);
a897a37a 568 ResetRawClusters();
88cb7938 569 TTree *treeR = fLoader->TreeR();
a9e2aefa 570 Int_t nent=(Int_t)treeR->GetEntries();
571 treeR->GetEvent(nent-2+icathod-1);
572 //treeR->GetEvent(icathod);
573 //Int_t nrawcl = (Int_t)muonRawCluster->GetEntriesFast();
a897a37a 574
a9e2aefa 575 AliMUONRawCluster * mRaw = (AliMUONRawCluster*)muonRawCluster->UncheckedAt(icluster);
a897a37a 576 //printf("RawCluster _ nent nrawcl icluster mRaw %d %d %d%p\n",nent,nrawcl,icluster,mRaw);
577
578 return mRaw;
579}
ffd9faa2 580
d5609cfc 581//________________________________________________________________________
582void
583AliMUON::ResetGeometryBuilder()
584{
d19b6003 585/// Only to be used by "experts" wanting to change the geometry builders
586/// to be used.
587/// As the ctor of AliMUON now defines a default geometrybuilder, this
588/// ResetGeometryBuilder() must be called prior to call the
589/// AddGeometryBuilder()
590
d5609cfc 591 delete fGeometryBuilder;
592 fGeometryBuilder = new AliMUONGeometryBuilder(this);
593 fGeometryBuilder
594 ->AddBuilder(new AliMUONCommonGeometryBuilder(this));
595}