]>
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 | |
d7c7c86b | 29 | #include "AliITSDetTypeRec.h" |
1d9af2d5 | 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); |
9b615954 | 59 | AliInfo(" ************* Using the ITS upgrade reconstructor! ****** "); |
1d9af2d5 | 60 | |
61 | }//AliITSReconstructor | |
9b615954 | 62 | |
1d9af2d5 | 63 | //----------------------------------------------------------------------- |
64 | AliITSUpgradeReconstructor::~AliITSUpgradeReconstructor(){ | |
65 | //Destructor | |
66 | if(fDigits){ | |
67 | fDigits->Delete(); | |
68 | delete fDigits; | |
69 | fDigits=0; | |
70 | } | |
1d9af2d5 | 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 | } | |
1d9af2d5 | 85 | //_____________________________________________________________________ |
86 | void AliITSUpgradeReconstructor::ResetDigits(){ | |
87 | // Reset number of digits and the digits array for the ITS detector. | |
88 | ||
89 | if(!fDigits) return; | |
4211bbc5 | 90 | for(Int_t i=0;i<fNlayers;i++){ |
1d9af2d5 | 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 | } | |
1d9af2d5 | 101 | //___________________________________________________________________ |
6ea6235b | 102 | void AliITSUpgradeReconstructor::Reconstruct(TTree* digitsTree, TTree* clustersTree) const { |
103 | // | |
104 | // Clustering | |
105 | // | |
665c0bc7 | 106 | for(Int_t iLay=0;iLay<fNlayers;iLay++) { |
6ea6235b | 107 | digitsTree->SetBranchAddress(Form("Layer%d",iLay),&(*fDigits)[iLay]); |
108 | } | |
109 | ||
110 | digitsTree->GetEntry(0); | |
1d9af2d5 | 111 | AliITSUpgradeClusterFinder *clf = new AliITSUpgradeClusterFinder(); |
6ea6235b | 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; | |
665c0bc7 | 117 | for(Int_t iLay=0;iLay<fNlayers;iLay++){ |
6ea6235b | 118 | fDigits->At(iLay)->Clear(); |
119 | } | |
1d9af2d5 | 120 | |
1d9af2d5 | 121 | } |
122 | //_______________________________________________________________________________________________________________ | |
123 | AliTracker* AliITSUpgradeReconstructor::CreateTracker() const | |
124 | { | |
6ea6235b | 125 | // |
ebaa7604 | 126 | // Create the ITSUpgrade tracker switching betqween the general case and the StandAlone case. |
127 | // AliITStrackerUpgrade is used only for SA tracks. | |
128 | // | |
1d9af2d5 | 129 | |
ebaa7604 | 130 | if(GetRecoParam()->GetTrackerSAOnly()){ |
9b615954 | 131 | AliITStrackerUpgrade *trackerUp = new AliITStrackerUpgrade(fNlayers); |
132 | trackerUp->SetSAFlag(kTRUE); | |
133 | if(trackerUp->GetSAFlag()) AliDebug(1,"Tracking Performed in ITS only\n"); | |
4211bbc5 | 134 | if(GetRecoParam()->GetInwardFindingSA()){ |
9b615954 | 135 | trackerUp->SetInwardFinding(); |
136 | trackerUp->SetInnerStartLayer(GetRecoParam()->GetInnerStartLayerSA()); | |
4211bbc5 | 137 | }else{ |
9b615954 | 138 | trackerUp->SetOutwardFinding(); |
139 | trackerUp->SetOuterStartLayer(GetRecoParam()->GetOuterStartLayerSA()); | |
4211bbc5 | 140 | } |
9b615954 | 141 | trackerUp->SetMinNPoints(GetRecoParam()->GetMinNPointsSA()); |
142 | return trackerUp; | |
ebaa7604 | 143 | } else { |
9b615954 | 144 | AliDebug(1,"Tracking Performed in ITS using TPC track as seed\n"); |
4211bbc5 | 145 | AliITStrackerU *t = new AliITStrackerU(); |
146 | return t; | |
ebaa7604 | 147 | } |
1d9af2d5 | 148 | } |
6ea6235b | 149 | //_______________________________________________________________________ |