]>
Commit | Line | Data |
---|---|---|
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 | //. | |
19 | // ITSupgrade base class to reconstruct an event | |
20 | //. | |
21 | //. | |
22 | //. | |
23 | #include "TObjArray.h" | |
24 | #include "TTree.h" | |
25 | #include "AliITSRecPoint.h" | |
26 | #include "AliITSReconstructor.h" | |
27 | #include "AliITSupgrade.h" | |
28 | #include "AliITSUpgradeReconstructor.h" //class header | |
29 | #include "AliITSDetTypeRec.h" | |
30 | #include "AliITS.h" //Reconstruct() | |
31 | #include "AliESDEvent.h" //FillEsd() | |
32 | #include "AliRawReader.h" //Reconstruct() for raw digits | |
33 | #include "AliRun.h" | |
34 | #include "AliLog.h" // | |
35 | #include "AliITSRawStream.h" //ConvertDigits() | |
36 | #include "AliITSsegmentationUpgrade.h" | |
37 | #include "AliITSUpgradeClusterFinder.h" | |
38 | #include "AliITStrackerUpgrade.h" | |
39 | #include "AliITStrackerU.h" | |
40 | ClassImp(AliITSUpgradeReconstructor) | |
41 | ||
42 | //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | |
43 | AliITSUpgradeReconstructor::AliITSUpgradeReconstructor(): | |
44 | AliReconstructor(), | |
45 | fDigits(0x0), | |
46 | fNlayers(0) | |
47 | { | |
48 | // | |
49 | //ctor | |
50 | // | |
51 | ||
52 | AliITSsegmentationUpgrade *s = new AliITSsegmentationUpgrade(); | |
53 | fNlayers = s->GetNLayers(); | |
54 | delete s; | |
55 | ||
56 | fDigits = new TObjArray(fNlayers); | |
57 | fDigits->SetOwner(kTRUE); | |
58 | for(Int_t iLay =0; iLay<fNlayers; iLay++) fDigits->AddAt(new TClonesArray("AliITSDigitUpgrade",5000),iLay); | |
59 | AliInfo(" ************* Using the ITS upgrade reconstructor! ****** "); | |
60 | ||
61 | }//AliITSReconstructor | |
62 | ||
63 | //----------------------------------------------------------------------- | |
64 | AliITSUpgradeReconstructor::~AliITSUpgradeReconstructor(){ | |
65 | //Destructor | |
66 | if(fDigits){ | |
67 | fDigits->Delete(); | |
68 | delete fDigits; | |
69 | fDigits=0; | |
70 | } | |
71 | } | |
72 | ||
73 | //_________________________________________________________________ | |
74 | void AliITSUpgradeReconstructor::Init() { | |
75 | // Initalize this constructor bet getting/creating the objects | |
76 | // nesseary for a proper ITS reconstruction. | |
77 | // Inputs: | |
78 | // none. | |
79 | // Output: | |
80 | // none. | |
81 | // Return: | |
82 | // none. | |
83 | return; | |
84 | } | |
85 | //_____________________________________________________________________ | |
86 | void AliITSUpgradeReconstructor::ResetDigits(){ | |
87 | // Reset number of digits and the digits array for the ITS detector. | |
88 | ||
89 | if(!fDigits) return; | |
90 | for(Int_t i=0;i<fNlayers;i++){ | |
91 | ResetDigits(i); | |
92 | } | |
93 | } | |
94 | //____________________________________________________________________ | |
95 | void AliITSUpgradeReconstructor::ResetDigits(Int_t branch){ | |
96 | // Reset number of digits and the digits array for this branch. | |
97 | ||
98 | if(fDigits->At(branch)) ((TClonesArray*)fDigits->At(branch))->Clear(); | |
99 | ||
100 | } | |
101 | //___________________________________________________________________ | |
102 | void AliITSUpgradeReconstructor::Reconstruct(TTree* digitsTree, TTree* clustersTree) const { | |
103 | // | |
104 | // Clustering | |
105 | // | |
106 | for(Int_t iLay=0;iLay<fNlayers;iLay++) { | |
107 | digitsTree->SetBranchAddress(Form("Layer%d",iLay),&(*fDigits)[iLay]); | |
108 | } | |
109 | ||
110 | digitsTree->GetEntry(0); | |
111 | AliITSUpgradeClusterFinder *clf = new AliITSUpgradeClusterFinder(); | |
112 | clf->MakeRecPointBranch(clustersTree); | |
113 | clf->SetRecPointTreeAddress(clustersTree); | |
114 | clf->DigitsToRecPoints(fDigits); //cluster finder | |
115 | clustersTree->Fill(); //fill tree for current event | |
116 | delete clf; | |
117 | for(Int_t iLay=0;iLay<fNlayers;iLay++){ | |
118 | fDigits->At(iLay)->Clear(); | |
119 | } | |
120 | ||
121 | } | |
122 | //_______________________________________________________________________________________________________________ | |
123 | AliTracker* AliITSUpgradeReconstructor::CreateTracker() const | |
124 | { | |
125 | // | |
126 | // Create the ITSUpgrade tracker switching betqween the general case and the StandAlone case. | |
127 | // AliITStrackerUpgrade is used only for SA tracks. | |
128 | // | |
129 | ||
130 | if(GetRecoParam()->GetTrackerSAOnly()){ | |
131 | AliITStrackerUpgrade *trackerUp = new AliITStrackerUpgrade(fNlayers); | |
132 | trackerUp->SetSAFlag(kTRUE); | |
133 | if(trackerUp->GetSAFlag()) AliDebug(1,"Tracking Performed in ITS only\n"); | |
134 | if(GetRecoParam()->GetInwardFindingSA()){ | |
135 | trackerUp->SetInwardFinding(); | |
136 | trackerUp->SetInnerStartLayer(GetRecoParam()->GetInnerStartLayerSA()); | |
137 | }else{ | |
138 | trackerUp->SetOutwardFinding(); | |
139 | trackerUp->SetOuterStartLayer(GetRecoParam()->GetOuterStartLayerSA()); | |
140 | } | |
141 | trackerUp->SetMinNPoints(GetRecoParam()->GetMinNPointsSA()); | |
142 | return trackerUp; | |
143 | } else { | |
144 | AliDebug(1,"Tracking Performed in ITS using TPC track as seed\n"); | |
145 | AliITStrackerU *t = new AliITStrackerU(); | |
146 | return t; | |
147 | } | |
148 | } | |
149 | //_______________________________________________________________________ |