]>
Commit | Line | Data |
---|---|---|
a9e2aefa | 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 | **************************************************************************/ | |
2682e810 | 15 | |
88cb7938 | 16 | /* $Id$ */ |
a9e2aefa | 17 | |
3d1463c8 | 18 | //----------------------------------------------------------------------------- |
d19b6003 | 19 | // Class AliMUONChamber |
20 | // ----------------------- | |
21 | // MUON tracking chamber class | |
22 | // now only providing DisIntegration function | |
3d1463c8 | 23 | //----------------------------------------------------------------------------- |
d19b6003 | 24 | |
30178c30 | 25 | // --- ROOT includes --- |
26 | #include <TRandom.h> | |
27 | #include <TMath.h> | |
a713db22 | 28 | #include "AliRun.h" |
29 | ||
30178c30 | 30 | |
681d067b | 31 | // --- MUON includes --- |
a713db22 | 32 | #include "AliMUON.h" |
a9e2aefa | 33 | #include "AliMUONChamber.h" |
a713db22 | 34 | #include "AliMUONHit.h" |
8c343c7c | 35 | #include "AliLog.h" |
a9e2aefa | 36 | |
5398f946 | 37 | /// \cond CLASSIMP |
a9e2aefa | 38 | ClassImp(AliMUONChamber) |
5398f946 | 39 | /// \endcond |
a9e2aefa | 40 | |
5398f946 | 41 | //_______________________________________________________ |
30178c30 | 42 | AliMUONChamber::AliMUONChamber() |
43 | : TObject(), | |
44 | fId(0), | |
30178c30 | 45 | fCurrentCorrel(1), // to avoid mistakes if ChargeCorrelInit is not called |
30178c30 | 46 | fResponse(0), |
a713db22 | 47 | fMUON(0) |
d81db581 | 48 | { |
d19b6003 | 49 | /// Default constructor |
cbf9f933 | 50 | |
51 | AliDebug(1, Form("default (empty) ctor this = %p", this)); | |
d81db581 | 52 | } |
53 | ||
a713db22 | 54 | //_______________________________________________________ |
30178c30 | 55 | AliMUONChamber::AliMUONChamber(Int_t id) |
56 | : TObject(), | |
57 | fId(id), | |
30178c30 | 58 | fCurrentCorrel(1), // to avoid mistakes if ChargeCorrelInit is not called |
30178c30 | 59 | fResponse(0), |
a713db22 | 60 | fMUON(0) |
a9e2aefa | 61 | { |
d19b6003 | 62 | /// Standard constructor |
a713db22 | 63 | |
64 | // muon | |
65 | fMUON = (AliMUON*)gAlice->GetModule("MUON"); | |
66 | if (!fMUON) { | |
67 | AliFatal("MUON detector not defined."); | |
68 | return; | |
69 | } | |
002920d1 | 70 | |
cbf9f933 | 71 | AliDebug(1, Form("ctor this = %p", this) ); |
30178c30 | 72 | } |
73 | ||
a713db22 | 74 | //_______________________________________________________ |
a9e2aefa | 75 | AliMUONChamber::~AliMUONChamber() |
76 | { | |
d19b6003 | 77 | /// Destructor |
002920d1 | 78 | |
cbf9f933 | 79 | AliDebug(1, Form("dtor this = %p", this)); |
df42123e | 80 | delete fResponse; |
a9e2aefa | 81 | } |
82 | ||
a713db22 | 83 | //_____________________________________________________ |
d19b6003 | 84 | void AliMUONChamber::ChargeCorrelationInit() |
85 | { | |
86 | /// Initialisation of charge correlation for current hit | |
87 | /// the value is stored, and then used by Disintegration | |
953daa5a | 88 | |
89 | // exponential is here to avoid eventual problems in 0 | |
90 | // factor 2 because chargecorrel is q1/q2 and not q1/qtrue | |
16d57990 | 91 | fCurrentCorrel = TMath::Exp(gRandom->Gaus(0,fResponse->ChargeCorrel()/2)); |
681d067b | 92 | } |
93 | ||
df42123e | 94 | //_____________________________________________________________________________ |
95 | void | |
96 | AliMUONChamber::SetResponseModel(const AliMUONResponse& thisResponse) | |
a713db22 | 97 | { |
df42123e | 98 | delete fResponse; |
99 | fResponse = static_cast<AliMUONResponse*>(thisResponse.Clone()); | |
a713db22 | 100 | } |
df42123e | 101 |