]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONSDigitizerv1.cxx
Removing extra semicolons (FedoraCore3, gcc 3.4.2)
[u/mrichter/AliRoot.git] / MUON / AliMUONSDigitizerv1.cxx
CommitLineData
30178c30 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$ */
cf286af7 17
18/////////////////////////////////////////////////////////////////////////////////
19//
20// AliMUONSDigitizerv1 digitizes hits from the input stream into s-digits.
21// The s-digits are written to the s-digit tree TreeS.
22// The same algorithm is implemented as for AliMUONDigitizerv1 however the
23// chamber response is not applied to the s-digits and we write to TreeS and
24// not TreeD.
25//
26/////////////////////////////////////////////////////////////////////////////////
d1775029 27
30178c30 28#include "AliMUONSDigitizerv1.h"
29#include "AliMUONLoader.h"
30#include "AliMUONData.h"
31#include "AliMUONDigit.h"
32#include "AliMUONTransientDigit.h"
8c343c7c 33#include "AliLog.h"
30178c30 34
d1775029 35ClassImp(AliMUONSDigitizerv1)
36
37//___________________________________________
30178c30 38AliMUONSDigitizerv1::AliMUONSDigitizerv1()
39 : AliMUONDigitizerv1()
d1775029 40{
cf286af7 41 // Default ctor - don't use it
d1775029 42}
43
cf286af7 44//___________________________________________
30178c30 45AliMUONSDigitizerv1::AliMUONSDigitizerv1(AliRunDigitizer* manager)
46 : AliMUONDigitizerv1(manager)
d1775029 47{
cf286af7 48 // ctor which should be used
d1775029 49}
50
8789635b 51//___________________________________________
52AliMUONSDigitizerv1::~AliMUONSDigitizerv1()
53{
54 // Destructor
55}
56
d1775029 57//------------------------------------------------------------------------
cf286af7 58void AliMUONSDigitizerv1::AddDigit(Int_t chamber, Int_t tracks[kMAXTRACKS], Int_t charges[kMAXTRACKS], Int_t digits[6])
d1775029 59{
cf286af7 60// Derived to write to the s-digit tree TreeS.
d1775029 61
30178c30 62 fMUONData->AddSDigit(chamber, tracks, charges, digits);
925e6570 63}
d1775029 64
65//------------------------------------------------------------------------
cf286af7 66Int_t AliMUONSDigitizerv1::GetSignalFrom(AliMUONTransientDigit* td)
d1775029 67{
cf286af7 68// Returns the transient digit signal as is without applying the chamber response.
8c343c7c 69 AliDebug(4,"Returning TransientDigit signal.");
cf286af7 70 return td->Signal();
925e6570 71}
d1775029 72
73//------------------------------------------------------------------------
cf286af7 74Bool_t AliMUONSDigitizerv1::InitOutputData(AliMUONLoader* muonloader)
d1775029 75{
cf286af7 76// Overridden to initialise the output tree to be TreeS rather than TreeD.
8c343c7c 77 AliDebug(3,"Creating s-digits branch and setting the tree address.");
cf286af7 78
30178c30 79 fMUONData->SetLoader(muonloader);
cf286af7 80
81 // New branch per chamber for MUON digit in the tree of digits
82 if (muonloader->TreeS() == NULL)
83 {
84 muonloader->MakeSDigitsContainer();
85 if (muonloader->TreeS() == NULL)
86 {
8c343c7c 87 AliError("Could not create TreeS.");
cf286af7 88 return kFALSE;
925e6570 89 }
90 }
cf286af7 91
30178c30 92 fMUONData->MakeBranch("S");
93 fMUONData->SetTreeAddress("S");
d1775029 94
cf286af7 95 return kTRUE;
925e6570 96}
d1775029 97
cf286af7 98//------------------------------------------------------------------------
99void AliMUONSDigitizerv1::FillOutputData()
100{
101// Overridden to fill TreeS rather than TreeD.
d1775029 102
8c343c7c 103 AliDebug(3,"Filling trees with s-digits.");
30178c30 104 fMUONData->Fill("S");
105 fMUONData->ResetSDigits();
925e6570 106}
d1775029 107
d1775029 108//------------------------------------------------------------------------
cf286af7 109void AliMUONSDigitizerv1::CleanupOutputData(AliMUONLoader* muonloader)
d1775029 110{
cf286af7 111// Overridden to write and then cleanup TreeS that was initialised in InitOutputData.
8c343c7c 112 AliDebug(3,"Writing s-digits and releasing pointers.");
cf286af7 113 muonloader->WriteSDigits("OVERWRITE");
30178c30 114 fMUONData->ResetSDigits();
cf286af7 115 muonloader->UnloadSDigits();
925e6570 116}