1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
18 //-----------------------------------------------------------------------------
19 // Class AliMUONChamber
20 // -----------------------
21 // MUON tracking chamber class
22 // now only providing DisIntegration function
23 //-----------------------------------------------------------------------------
25 // --- ROOT includes ---
31 // --- MUON includes ---
33 #include "AliMUONChamber.h"
34 #include "AliMUONHit.h"
38 ClassImp(AliMUONChamber)
41 //_______________________________________________________
42 AliMUONChamber::AliMUONChamber()
45 fCurrentCorrel(1), // to avoid mistakes if ChargeCorrelInit is not called
49 /// Default constructor
51 AliDebug(1, Form("default (empty) ctor this = %p", this));
54 //_______________________________________________________
55 AliMUONChamber::AliMUONChamber(Int_t id)
58 fCurrentCorrel(1), // to avoid mistakes if ChargeCorrelInit is not called
62 /// Standard constructor
65 fMUON = (AliMUON*)gAlice->GetModule("MUON");
67 AliFatal("MUON detector not defined.");
71 AliDebug(1, Form("ctor this = %p", this) );
74 //_______________________________________________________
75 AliMUONChamber::~AliMUONChamber()
79 AliDebug(1, Form("dtor this = %p", this));
83 //_____________________________________________________
84 void AliMUONChamber::ChargeCorrelationInit()
86 /// Initialisation of charge correlation for current hit
87 /// the value is stored, and then used by Disintegration
89 // exponential is here to avoid eventual problems in 0
90 // factor 2 because chargecorrel is q1/q2 and not q1/qtrue
91 fCurrentCorrel = TMath::Exp(gRandom->Gaus(0,fResponse->ChargeCorrel()/2));
94 //_____________________________________________________________________________
96 AliMUONChamber::SetResponseModel(const AliMUONResponse& thisResponse)
99 fResponse = static_cast<AliMUONResponse*>(thisResponse.Clone());