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