1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
19 // ITSupgrade base class to reconstruct an event
23 #include "TObjArray.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
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)
42 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
43 AliITSUpgradeReconstructor::AliITSUpgradeReconstructor():
52 AliITSsegmentationUpgrade *s = new AliITSsegmentationUpgrade();
53 fNlayers = s->GetNLayers();
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! ****** ");
61 }//AliITSReconstructor
63 //-----------------------------------------------------------------------
64 AliITSUpgradeReconstructor::~AliITSUpgradeReconstructor(){
73 //_________________________________________________________________
74 void AliITSUpgradeReconstructor::Init() {
75 // Initalize this constructor bet getting/creating the objects
76 // nesseary for a proper ITS reconstruction.
85 //_____________________________________________________________________
86 void AliITSUpgradeReconstructor::ResetDigits(){
87 // Reset number of digits and the digits array for the ITS detector.
90 for(Int_t i=0;i<fNlayers;i++){
94 //____________________________________________________________________
95 void AliITSUpgradeReconstructor::ResetDigits(Int_t branch){
96 // Reset number of digits and the digits array for this branch.
98 if(fDigits->At(branch)) ((TClonesArray*)fDigits->At(branch))->Clear();
101 //___________________________________________________________________
102 void AliITSUpgradeReconstructor::Reconstruct(TTree* digitsTree, TTree* clustersTree) const {
106 for(Int_t iLay=0;iLay<fNlayers;iLay++) {
107 digitsTree->SetBranchAddress(Form("Layer%d",iLay),&(*fDigits)[iLay]);
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
117 for(Int_t iLay=0;iLay<fNlayers;iLay++){
118 fDigits->At(iLay)->Clear();
122 //_______________________________________________________________________________________________________________
123 AliTracker* AliITSUpgradeReconstructor::CreateTracker() const
126 // Create the ITSUpgrade tracker switching betqween the general case and the StandAlone case.
127 // AliITStrackerUpgrade is used only for SA tracks.
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());
138 trackerUp->SetOutwardFinding();
139 trackerUp->SetOuterStartLayer(GetRecoParam()->GetOuterStartLayerSA());
141 trackerUp->SetMinNPoints(GetRecoParam()->GetMinNPointsSA());
144 AliDebug(1,"Tracking Performed in ITS using TPC track as seed\n");
145 AliITStrackerU *t = new AliITStrackerU();
149 //_______________________________________________________________________