]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/UPGRADE/AliITSDigitUpgrade.cxx
Removing iostream.h, which gives compilation error on gcc 4.4.1
[u/mrichter/AliRoot.git] / ITS / UPGRADE / AliITSDigitUpgrade.cxx
CommitLineData
1d9af2d5 1/**************************************************************************
2 * Copyright(c) 2004-2006, 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 "AliITSDigitUpgrade.h"
19#include "AliITSsegmentationUpgrade.h"
20#include "AliLog.h"
21
22///////////////////////////////////////////////////////////////////
23// //
24// Class defining the digit object
25// for ITS upgrade
26// Inherits from AliDigit
27// //
28///////////////////////////////////////////////////////////////////
29
30ClassImp(AliITSDigitUpgrade)
31//______________________________________________________________________
32 AliITSDigitUpgrade::AliITSDigitUpgrade():AliDigit(),
33 fPixId(9999),
34 fSignal(0),
35 fNLayer(0),
36 fNelectrons(0)
37{for(Int_t i=0; i<3 ; i++) fSignalID[i]=-1;} //default creator
38//_______________________________________________________________________
39AliITSDigitUpgrade::AliITSDigitUpgrade(Int_t *digits): AliDigit(digits),
40 fPixId(9999),
41 fSignal(0),
42 fNLayer(0),
43 fNelectrons(0)
44{for(Int_t i=0; i<3 ; i++) fSignalID[i]=-1;} //standard creator digits only
45//____________________________________________________________________________________________________
46AliITSDigitUpgrade::AliITSDigitUpgrade(ULong_t pixid, Float_t eloss): AliDigit(),
47 fPixId(pixid),
48 fSignal(eloss),
49 fNLayer(0),
50 fNelectrons(0)
51{for(Int_t i=0; i<3 ; i++) fSignalID[i]=-1;} //standard creator digits only
52//____________________________________________________________________________________________________
53AliITSDigitUpgrade::AliITSDigitUpgrade(const AliITSDigitUpgrade &d):AliDigit(d),
54 fPixId(d.fPixId),
55 fSignal(d.fSignal),
56 fNLayer(d.fNLayer),
57 fNelectrons(d.fNelectrons)
58{for(Int_t i=0; i<3 ; i++) fSignalID[i]=d.fSignalID[i];} //copy constructor
59//____________________________________________________________________________________________________
60void AliITSDigitUpgrade::GetPosition(Int_t ilayer, Int_t nx, Int_t nz, Double_t &xloc, Double_t &zloc){
61 AliITSsegmentationUpgrade *s =new AliITSsegmentationUpgrade();
62 if(s->GetCellSizeX(ilayer)!=0) xloc= (nx)*(s->GetCellSizeX(ilayer))+0.5*(s->GetCellSizeX(ilayer));
63 else AliError("Upgrade segmentation not initalized");
64
65 if(s->GetCellSizeZ(ilayer)!=0)
66 zloc=(nz)*(s->GetCellSizeZ(ilayer))+0.5*(s->GetCellSizeZ(ilayer))-(s->GetHalfLength(ilayer));
67 else AliError("Upgrade segmentation not initalized");
68 delete s;
69}
70//____________________________________________________________________________________________________
71void AliITSDigitUpgrade::PrintInfo(){
72 //Standard output format for this class
73 Double_t xz[2]={-1,-1};
74 GetPosition(fNLayer,GetxPixelNumber(),GetzPixelNumber(),xz[0],xz[1]);
75
76 AliDebug(10, Form("pixid %10.0i (%6.3f,%6.3f) in layer %i ",(Int_t)fPixId,xz[0],xz[1],fNLayer));
77 AliDebug(10,Form(" Eloss %f Nel %f track ID %i %i %i ", fSignal, fNelectrons,fTracks[0],fTracks[1],fTracks[2]));
78 AliDebug(10,Form(" ElossID %f %f %f \n", fSignalID[0],fSignalID[1],fSignalID[2]));
79}
80