1 #include "AliITSSumTP.h"
2 #include "AliTrackPointArray.h"
4 ///////////////////////////////////////////////////////////////////
6 // Class for ITS trackpoints summary + some aux. info ) //
7 // Author: Ruben Shahoian //
9 ///////////////////////////////////////////////////////////////////
15 //__________________________________________
16 AliITSSumTP::AliITSSumTP(const AliITSSumTP& src) :
17 TObject(src), fTracks(src.fTracks.GetEntriesFast()), fVertex(src.GetVertex()),
18 fNVars(src.fNVars), fCrvVars(0)
21 fCrvVars = new Double32_t[fNVars];
22 TObjArray& arrSrc = src.GetTracks();
23 for (int i=fNVars;i--;) fCrvVars[i] = src.fCrvVars[i];
24 for (int i=arrSrc.GetEntriesFast();i--;) fTracks.AddAtAndExpand(arrSrc.UncheckedAt(i),i);
27 //__________________________________________
28 AliITSSumTP& AliITSSumTP::operator=(const AliITSSumTP& src)
31 if (this == &src) return *this;
33 TObject::operator=(src);
34 fVertex = src.GetVertex();
36 fCrvVars = new Double32_t[fNVars];
37 TObjArray& arrSrc = src.GetTracks();
38 for (int i=fNVars;i--;) fCrvVars[i] = src.fCrvVars[i];
39 for (int i=arrSrc.GetEntriesFast();i--;) fTracks.AddAtAndExpand(arrSrc.UncheckedAt(i),i);
43 //__________________________________________
44 void AliITSSumTP::BookNTracks(Int_t n)
46 // book space for tracks info
47 delete[] fCrvVars; fCrvVars = 0;
48 fNVars = n*kNVarPerTrack;
50 fCrvVars = new Double32_t[fNVars];
51 for (int i=fNVars;i--;) fCrvVars[i]=0;
55 //__________________________________________
56 void AliITSSumTP::Reset()
66 //__________________________________________
67 void AliITSSumTP::Print(Option_t *) const
70 printf("Vertex: "); fVertex.Print();
71 int ntr = GetNTracks();
72 printf("Number of tracks: %d\n",ntr);
73 for (int itr=0;itr<ntr;itr++) {
74 AliTrackPointArray* tr = GetTrack(itr);
75 printf("#%2d : %d hits CrvGlo: %+.2e/%+.2e CrvTPC: %+.2e/%+.2e\n",itr,tr->GetNPoints(),
76 GetCrvGlo(itr),GetCrvGloErr(itr),
77 GetCrvTPC(itr),GetCrvTPCErr(itr));