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