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