]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONDigitStoreV2S.cxx
Possibility to vary the cos(PA) cut
[u/mrichter/AliRoot.git] / MUON / AliMUONDigitStoreV2S.cxx
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 #include "AliMUONDigitStoreV2S.h"
19
20 //-----------------------------------------------------------------------------
21 /// \class AliMUONDigitStoreV2S
22 ///
23 /// Concrete implementation of AliMUONVDigitStore for simulated digits, using
24 /// the AliMUONDigitStoreVImpl base implementation
25 /// 
26 /// \author Laurent Aphecetche
27 //-----------------------------------------------------------------------------
28
29
30 #include "AliMUONDigit.h"
31 #include <TClonesArray.h>
32
33 /// \cond CLASSIMP
34 ClassImp(AliMUONDigitStoreV2S)
35 /// \endcond
36
37 //_____________________________________________________________________________
38 AliMUONDigitStoreV2S::AliMUONDigitStoreV2S()
39 : AliMUONDigitStoreVImpl("AliMUONDigit")
40 {
41   /// ctor
42 }
43
44 //_____________________________________________________________________________
45 AliMUONDigitStoreV2S::~AliMUONDigitStoreV2S()
46 {
47   /// dtor
48 }
49
50 //_____________________________________________________________________________
51 AliMUONVDigit*
52 AliMUONDigitStoreV2S::AddConcreteDigit(TClonesArray& a, 
53                                        const AliMUONVDigit& digit,
54                                        Int_t index)
55 {
56   /// add a digit to this store  
57   
58   if ( digit.IsA() != AliMUONDigit::Class() ) 
59   {
60     AliMUONDigit d(digit.DetElemId(),digit.ManuId(),digit.ManuChannel(),digit.Cathode());
61     d.SetCharge(digit.Charge());
62     d.SetADC(digit.ADC());
63     d.SetPadXY(digit.PadX(),digit.PadY());
64     d.ChargeInFC();
65     d.Converted();
66     return new(a[index]) AliMUONDigit(d);
67   }
68
69   return new(a[index]) AliMUONDigit(static_cast<const AliMUONDigit&>(digit));
70 }
71
72 //_____________________________________________________________________________
73 AliMUONVDigitStore* 
74 AliMUONDigitStoreV2S::Create() const
75 {
76   /// create an empty store
77   return new AliMUONDigitStoreV2S;
78 }
79
80 //_____________________________________________________________________________
81 AliMUONVDigit* 
82 AliMUONDigitStoreV2S::CreateDigit(Int_t detElemId, Int_t manuId,                                 
83                                   Int_t manuChannel, Int_t cathode) const
84 {
85   /// create a digit, compatible with this store
86   return new AliMUONDigit(detElemId,manuId,manuChannel,cathode);
87 }
88
89