#include <cstdlib>
#include "TObjArray.h"
#include "TString.h"
#include "AliLog.h"
#include "AliESDEvent.h"
#include "AliESDpid.h"
#include "AliRawReader.h"
#include "AliTOFHeader.h"
#include "AliTOFClusterFinder.h"
#include "AliTOFClusterFinderV1.h"
#include "AliTOFcalib.h"
#include "AliTOFtrackerMI.h"
#include "AliTOFtracker.h"
#include "AliTOFtrackerV1.h"
#include "AliTOFtrackerV2.h"
#include "AliTOFT0maker.h"
#include "AliTOFReconstructor.h"
#include "AliTOFTriggerMask.h"
#include "AliTOFTrigger.h"
class TTree;
ClassImp(AliTOFReconstructor)
AliTOFReconstructor::AliTOFReconstructor() :
AliReconstructor(),
fTOFcalib(0),
fNumberOfTofClusters(0),
fNumberOfTofTrgPads(0),
fClusterFinder(0),
fClusterFinderV1(0)
{
fTOFcalib = new AliTOFcalib();
fTOFcalib->Init();
fClusterFinder = new AliTOFClusterFinder(fTOFcalib);
fClusterFinderV1 = new AliTOFClusterFinderV1(fTOFcalib);
TString optionString = GetOption();
if (optionString.Contains("DecoderV0")) {
fClusterFinder->SetDecoderVersion(0);
fClusterFinderV1->SetDecoderVersion(0);
}
else if (optionString.Contains("DecoderV1")) {
fClusterFinder->SetDecoderVersion(1);
fClusterFinderV1->SetDecoderVersion(1);
}
else {
fClusterFinder->SetDecoderVersion(2);
fClusterFinderV1->SetDecoderVersion(2);
}
#if 0
fTOFcalib->CreateCalObjects();
if(!fTOFcalib->ReadParOnlineDelayFromCDB("TOF/Calib",-1)) {AliFatal("Exiting, no CDB object found!!!");exit(0);}
if(!fTOFcalib->ReadParOnlineStatusFromCDB("TOF/Calib",-1)) {AliFatal("Exiting, no CDB object found!!!");exit(0);}
if(!fTOFcalib->ReadParOfflineFromCDB("TOF/Calib",-1)) {AliFatal("Exiting, no CDB object found!!!");exit(0);}
if(!fTOFcalib->ReadDeltaBCOffsetFromCDB("TOF/Calib",-1)) {AliFatal("Exiting, no CDB object found!!!");exit(0);}
if(!fTOFcalib->ReadCTPLatencyFromCDB("TOF/Calib",-1)) {AliFatal("Exiting, no CDB object found!!!");exit(0);}
if(!fTOFcalib->ReadT0FillFromCDB("TOF/Calib",-1)) {AliFatal("Exiting, no CDB object found!!!");exit(0);}
if(!fTOFcalib->ReadRunParamsFromCDB("TOF/Calib",-1)) {AliFatal("Exiting, no CDB object found!!!");exit(0);}
#endif
}
AliTOFReconstructor::~AliTOFReconstructor()
{
delete fTOFcalib;
fNumberOfTofClusters = 0;
fNumberOfTofTrgPads = 0;
delete fClusterFinder;
delete fClusterFinderV1;
}
void AliTOFReconstructor::Reconstruct(AliRawReader *rawReader,
TTree *clustersTree) const
{
TString optionString = GetOption();
if (optionString.Contains("ClusterizerV1")) {
fClusterFinderV1->Digits2RecPoints(rawReader, clustersTree);
}
else {
fClusterFinder->Digits2RecPoints(rawReader, clustersTree);
}
AliTOFTrigger::PrepareTOFMapFromRaw(rawReader,13600);
}
void AliTOFReconstructor::Reconstruct(TTree *digitsTree,
TTree *clustersTree) const
{
AliDebug(2,Form("Global Event loop mode: Creating Recpoints from Digits Tree"));
TString optionString = GetOption();
if (optionString.Contains("ClusterizerV1")) {
fClusterFinderV1->Digits2RecPoints(digitsTree, clustersTree);
}
else {
fClusterFinder->Digits2RecPoints(digitsTree, clustersTree);
AliTOFTrigger::PrepareTOFMapFromDigit(digitsTree);
}
}
void AliTOFReconstructor::ConvertDigits(AliRawReader* reader, TTree* digitsTree) const
{
AliDebug(2,Form("Global Event loop mode: Converting Raw Data to a Digits Tree"));
TString optionString = GetOption();
if (optionString.Contains("ClusterizerV1")) {
fClusterFinderV1->Digits2RecPoints(reader, digitsTree);
}
else {
fClusterFinder->Digits2RecPoints(reader, digitsTree);
}
}
AliTracker* AliTOFReconstructor::CreateTracker() const
{
TString selectedTracker = GetOption();
AliTracker *tracker;
if (selectedTracker.Contains("TrackerMI")) {
tracker = new AliTOFtrackerMI();
}
else if (selectedTracker.Contains("TrackerV1")) {
tracker = new AliTOFtrackerV1();
}
else if (selectedTracker.Contains("TrackerV2")) {
tracker = new AliTOFtrackerV2();
}
else {
tracker = new AliTOFtracker();
}
return tracker;
}
void AliTOFReconstructor::FillEventTimeWithTOF(AliESDEvent *event, AliESDpid *esdPID)
{
AliTOFTriggerMask *mapTrigger = AliTOFTrigger::GetTOFTriggerMap();
TString optionString = GetOption();
if (optionString.Contains("ClusterizerV1")) {
fNumberOfTofClusters=fClusterFinderV1->GetNumberOfTOFclusters();
fNumberOfTofTrgPads=fClusterFinderV1->GetNumberOfTOFtrgPads();
AliInfo(Form(" Number of TOF cluster readout = %d ",fNumberOfTofClusters));
AliInfo(Form(" Number of TOF cluster readout in trigger window = %d ",fNumberOfTofTrgPads));
} else {
fNumberOfTofClusters=fClusterFinder->GetNumberOfTOFclusters();
fNumberOfTofTrgPads=fClusterFinder->GetNumberOfTOFtrgPads();
AliInfo(Form(" Number of TOF cluster readout = %d ",fNumberOfTofClusters));
AliInfo(Form(" Number of TOF cluster readout in trigger window = %d ",fNumberOfTofTrgPads));
}
if (!GetRecoParam()) AliFatal("cannot get TOF RECO params");
Float_t tofResolution = GetRecoParam()->GetTimeResolution();
AliTOFT0maker *tofT0maker = new AliTOFT0maker(esdPID);
tofT0maker->SetTimeResolution(tofResolution);
tofT0maker->ComputeT0TOF(event);
tofT0maker->WriteInESD(event);
tofT0maker->~AliTOFT0maker();
delete tofT0maker;
esdPID->SetTOFResponse(event,(AliESDpid::EStartTimeType_t)GetRecoParam()->GetStartTimeType());
event->GetTOFHeader()->SetNumberOfTOFclusters(fNumberOfTofClusters);
event->GetTOFHeader()->SetNumberOfTOFtrgPads(fNumberOfTofTrgPads);
event->GetTOFHeader()->SetTriggerMask(mapTrigger);
AliInfo(Form(" Number of readout cluster in trigger window = %d ; number of trgPads from Trigger map = %d",
event->GetTOFHeader()->GetNumberOfTOFtrgPads(),
event->GetTOFHeader()->GetNumberOfTOFmaxipad()));
fClusterFinderV1->ResetDigits();
fClusterFinderV1->ResetRecpoint();
fClusterFinder->ResetRecpoint();
fClusterFinderV1->Clear();
fClusterFinder->Clear();
}
void
AliTOFReconstructor::FillESD(TTree *, TTree *, AliESDEvent * ) const
{
}
AliTOFReconstructor.cxx:1 AliTOFReconstructor.cxx:2 AliTOFReconstructor.cxx:3 AliTOFReconstructor.cxx:4 AliTOFReconstructor.cxx:5 AliTOFReconstructor.cxx:6 AliTOFReconstructor.cxx:7 AliTOFReconstructor.cxx:8 AliTOFReconstructor.cxx:9 AliTOFReconstructor.cxx:10 AliTOFReconstructor.cxx:11 AliTOFReconstructor.cxx:12 AliTOFReconstructor.cxx:13 AliTOFReconstructor.cxx:14 AliTOFReconstructor.cxx:15 AliTOFReconstructor.cxx:16 AliTOFReconstructor.cxx:17 AliTOFReconstructor.cxx:18 AliTOFReconstructor.cxx:19 AliTOFReconstructor.cxx:20 AliTOFReconstructor.cxx:21 AliTOFReconstructor.cxx:22 AliTOFReconstructor.cxx:23 AliTOFReconstructor.cxx:24 AliTOFReconstructor.cxx:25 AliTOFReconstructor.cxx:26 AliTOFReconstructor.cxx:27 AliTOFReconstructor.cxx:28 AliTOFReconstructor.cxx:29 AliTOFReconstructor.cxx:30 AliTOFReconstructor.cxx:31 AliTOFReconstructor.cxx:32 AliTOFReconstructor.cxx:33 AliTOFReconstructor.cxx:34 AliTOFReconstructor.cxx:35 AliTOFReconstructor.cxx:36 AliTOFReconstructor.cxx:37 AliTOFReconstructor.cxx:38 AliTOFReconstructor.cxx:39 AliTOFReconstructor.cxx:40 AliTOFReconstructor.cxx:41 AliTOFReconstructor.cxx:42 AliTOFReconstructor.cxx:43 AliTOFReconstructor.cxx:44 AliTOFReconstructor.cxx:45 AliTOFReconstructor.cxx:46 AliTOFReconstructor.cxx:47 AliTOFReconstructor.cxx:48 AliTOFReconstructor.cxx:49 AliTOFReconstructor.cxx:50 AliTOFReconstructor.cxx:51 AliTOFReconstructor.cxx:52 AliTOFReconstructor.cxx:53 AliTOFReconstructor.cxx:54 AliTOFReconstructor.cxx:55 AliTOFReconstructor.cxx:56 AliTOFReconstructor.cxx:57 AliTOFReconstructor.cxx:58 AliTOFReconstructor.cxx:59 AliTOFReconstructor.cxx:60 AliTOFReconstructor.cxx:61 AliTOFReconstructor.cxx:62 AliTOFReconstructor.cxx:63 AliTOFReconstructor.cxx:64 AliTOFReconstructor.cxx:65 AliTOFReconstructor.cxx:66 AliTOFReconstructor.cxx:67 AliTOFReconstructor.cxx:68 AliTOFReconstructor.cxx:69 AliTOFReconstructor.cxx:70 AliTOFReconstructor.cxx:71 AliTOFReconstructor.cxx:72 AliTOFReconstructor.cxx:73 AliTOFReconstructor.cxx:74 AliTOFReconstructor.cxx:75 AliTOFReconstructor.cxx:76 AliTOFReconstructor.cxx:77 AliTOFReconstructor.cxx:78 AliTOFReconstructor.cxx:79 AliTOFReconstructor.cxx:80 AliTOFReconstructor.cxx:81 AliTOFReconstructor.cxx:82 AliTOFReconstructor.cxx:83 AliTOFReconstructor.cxx:84 AliTOFReconstructor.cxx:85 AliTOFReconstructor.cxx:86 AliTOFReconstructor.cxx:87 AliTOFReconstructor.cxx:88 AliTOFReconstructor.cxx:89 AliTOFReconstructor.cxx:90 AliTOFReconstructor.cxx:91 AliTOFReconstructor.cxx:92 AliTOFReconstructor.cxx:93 AliTOFReconstructor.cxx:94 AliTOFReconstructor.cxx:95 AliTOFReconstructor.cxx:96 AliTOFReconstructor.cxx:97 AliTOFReconstructor.cxx:98 AliTOFReconstructor.cxx:99 AliTOFReconstructor.cxx:100 AliTOFReconstructor.cxx:101 AliTOFReconstructor.cxx:102 AliTOFReconstructor.cxx:103 AliTOFReconstructor.cxx:104 AliTOFReconstructor.cxx:105 AliTOFReconstructor.cxx:106 AliTOFReconstructor.cxx:107 AliTOFReconstructor.cxx:108 AliTOFReconstructor.cxx:109 AliTOFReconstructor.cxx:110 AliTOFReconstructor.cxx:111 AliTOFReconstructor.cxx:112 AliTOFReconstructor.cxx:113 AliTOFReconstructor.cxx:114 AliTOFReconstructor.cxx:115 AliTOFReconstructor.cxx:116 AliTOFReconstructor.cxx:117 AliTOFReconstructor.cxx:118 AliTOFReconstructor.cxx:119 AliTOFReconstructor.cxx:120 AliTOFReconstructor.cxx:121 AliTOFReconstructor.cxx:122 AliTOFReconstructor.cxx:123 AliTOFReconstructor.cxx:124 AliTOFReconstructor.cxx:125 AliTOFReconstructor.cxx:126 AliTOFReconstructor.cxx:127 AliTOFReconstructor.cxx:128 AliTOFReconstructor.cxx:129 AliTOFReconstructor.cxx:130 AliTOFReconstructor.cxx:131 AliTOFReconstructor.cxx:132 AliTOFReconstructor.cxx:133 AliTOFReconstructor.cxx:134 AliTOFReconstructor.cxx:135 AliTOFReconstructor.cxx:136 AliTOFReconstructor.cxx:137 AliTOFReconstructor.cxx:138 AliTOFReconstructor.cxx:139 AliTOFReconstructor.cxx:140 AliTOFReconstructor.cxx:141 AliTOFReconstructor.cxx:142 AliTOFReconstructor.cxx:143 AliTOFReconstructor.cxx:144 AliTOFReconstructor.cxx:145 AliTOFReconstructor.cxx:146 AliTOFReconstructor.cxx:147 AliTOFReconstructor.cxx:148 AliTOFReconstructor.cxx:149 AliTOFReconstructor.cxx:150 AliTOFReconstructor.cxx:151 AliTOFReconstructor.cxx:152 AliTOFReconstructor.cxx:153 AliTOFReconstructor.cxx:154 AliTOFReconstructor.cxx:155 AliTOFReconstructor.cxx:156 AliTOFReconstructor.cxx:157 AliTOFReconstructor.cxx:158 AliTOFReconstructor.cxx:159 AliTOFReconstructor.cxx:160 AliTOFReconstructor.cxx:161 AliTOFReconstructor.cxx:162 AliTOFReconstructor.cxx:163 AliTOFReconstructor.cxx:164 AliTOFReconstructor.cxx:165 AliTOFReconstructor.cxx:166 AliTOFReconstructor.cxx:167 AliTOFReconstructor.cxx:168 AliTOFReconstructor.cxx:169 AliTOFReconstructor.cxx:170 AliTOFReconstructor.cxx:171 AliTOFReconstructor.cxx:172 AliTOFReconstructor.cxx:173 AliTOFReconstructor.cxx:174 AliTOFReconstructor.cxx:175 AliTOFReconstructor.cxx:176 AliTOFReconstructor.cxx:177 AliTOFReconstructor.cxx:178 AliTOFReconstructor.cxx:179 AliTOFReconstructor.cxx:180 AliTOFReconstructor.cxx:181 AliTOFReconstructor.cxx:182 AliTOFReconstructor.cxx:183 AliTOFReconstructor.cxx:184 AliTOFReconstructor.cxx:185 AliTOFReconstructor.cxx:186 AliTOFReconstructor.cxx:187 AliTOFReconstructor.cxx:188 AliTOFReconstructor.cxx:189 AliTOFReconstructor.cxx:190 AliTOFReconstructor.cxx:191 AliTOFReconstructor.cxx:192 AliTOFReconstructor.cxx:193 AliTOFReconstructor.cxx:194 AliTOFReconstructor.cxx:195 AliTOFReconstructor.cxx:196 AliTOFReconstructor.cxx:197 AliTOFReconstructor.cxx:198 AliTOFReconstructor.cxx:199 AliTOFReconstructor.cxx:200 AliTOFReconstructor.cxx:201 AliTOFReconstructor.cxx:202 AliTOFReconstructor.cxx:203 AliTOFReconstructor.cxx:204 AliTOFReconstructor.cxx:205 AliTOFReconstructor.cxx:206 AliTOFReconstructor.cxx:207 AliTOFReconstructor.cxx:208 AliTOFReconstructor.cxx:209 AliTOFReconstructor.cxx:210 AliTOFReconstructor.cxx:211 AliTOFReconstructor.cxx:212 AliTOFReconstructor.cxx:213 AliTOFReconstructor.cxx:214 AliTOFReconstructor.cxx:215 AliTOFReconstructor.cxx:216 AliTOFReconstructor.cxx:217 AliTOFReconstructor.cxx:218 AliTOFReconstructor.cxx:219 AliTOFReconstructor.cxx:220 AliTOFReconstructor.cxx:221 AliTOFReconstructor.cxx:222 AliTOFReconstructor.cxx:223 AliTOFReconstructor.cxx:224 AliTOFReconstructor.cxx:225 AliTOFReconstructor.cxx:226 AliTOFReconstructor.cxx:227 AliTOFReconstructor.cxx:228 AliTOFReconstructor.cxx:229 AliTOFReconstructor.cxx:230 AliTOFReconstructor.cxx:231 AliTOFReconstructor.cxx:232 AliTOFReconstructor.cxx:233 AliTOFReconstructor.cxx:234 AliTOFReconstructor.cxx:235 AliTOFReconstructor.cxx:236 AliTOFReconstructor.cxx:237 AliTOFReconstructor.cxx:238 AliTOFReconstructor.cxx:239 AliTOFReconstructor.cxx:240 AliTOFReconstructor.cxx:241 AliTOFReconstructor.cxx:242 AliTOFReconstructor.cxx:243 AliTOFReconstructor.cxx:244 AliTOFReconstructor.cxx:245 AliTOFReconstructor.cxx:246 AliTOFReconstructor.cxx:247 AliTOFReconstructor.cxx:248 AliTOFReconstructor.cxx:249 AliTOFReconstructor.cxx:250 AliTOFReconstructor.cxx:251 AliTOFReconstructor.cxx:252 AliTOFReconstructor.cxx:253 AliTOFReconstructor.cxx:254 AliTOFReconstructor.cxx:255 AliTOFReconstructor.cxx:256 AliTOFReconstructor.cxx:257 AliTOFReconstructor.cxx:258 AliTOFReconstructor.cxx:259 AliTOFReconstructor.cxx:260 AliTOFReconstructor.cxx:261 AliTOFReconstructor.cxx:262 AliTOFReconstructor.cxx:263 AliTOFReconstructor.cxx:264 AliTOFReconstructor.cxx:265 AliTOFReconstructor.cxx:266 AliTOFReconstructor.cxx:267 AliTOFReconstructor.cxx:268 AliTOFReconstructor.cxx:269 AliTOFReconstructor.cxx:270 AliTOFReconstructor.cxx:271 AliTOFReconstructor.cxx:272 AliTOFReconstructor.cxx:273 AliTOFReconstructor.cxx:274 AliTOFReconstructor.cxx:275 AliTOFReconstructor.cxx:276 AliTOFReconstructor.cxx:277 AliTOFReconstructor.cxx:278 AliTOFReconstructor.cxx:279 AliTOFReconstructor.cxx:280 AliTOFReconstructor.cxx:281 AliTOFReconstructor.cxx:282 AliTOFReconstructor.cxx:283 AliTOFReconstructor.cxx:284 AliTOFReconstructor.cxx:285 AliTOFReconstructor.cxx:286 AliTOFReconstructor.cxx:287 AliTOFReconstructor.cxx:288 AliTOFReconstructor.cxx:289 AliTOFReconstructor.cxx:290 AliTOFReconstructor.cxx:291 AliTOFReconstructor.cxx:292 AliTOFReconstructor.cxx:293 AliTOFReconstructor.cxx:294 AliTOFReconstructor.cxx:295 AliTOFReconstructor.cxx:296 AliTOFReconstructor.cxx:297 AliTOFReconstructor.cxx:298 AliTOFReconstructor.cxx:299 AliTOFReconstructor.cxx:300 AliTOFReconstructor.cxx:301 AliTOFReconstructor.cxx:302 AliTOFReconstructor.cxx:303 AliTOFReconstructor.cxx:304 AliTOFReconstructor.cxx:305 AliTOFReconstructor.cxx:306 AliTOFReconstructor.cxx:307 AliTOFReconstructor.cxx:308 AliTOFReconstructor.cxx:309 AliTOFReconstructor.cxx:310 AliTOFReconstructor.cxx:311 AliTOFReconstructor.cxx:312 AliTOFReconstructor.cxx:313 AliTOFReconstructor.cxx:314 AliTOFReconstructor.cxx:315 AliTOFReconstructor.cxx:316 AliTOFReconstructor.cxx:317 AliTOFReconstructor.cxx:318 AliTOFReconstructor.cxx:319 AliTOFReconstructor.cxx:320 AliTOFReconstructor.cxx:321 AliTOFReconstructor.cxx:322 AliTOFReconstructor.cxx:323 AliTOFReconstructor.cxx:324 AliTOFReconstructor.cxx:325 AliTOFReconstructor.cxx:326 AliTOFReconstructor.cxx:327 AliTOFReconstructor.cxx:328 AliTOFReconstructor.cxx:329 AliTOFReconstructor.cxx:330 AliTOFReconstructor.cxx:331 AliTOFReconstructor.cxx:332 AliTOFReconstructor.cxx:333 AliTOFReconstructor.cxx:334 AliTOFReconstructor.cxx:335 AliTOFReconstructor.cxx:336 AliTOFReconstructor.cxx:337 AliTOFReconstructor.cxx:338 AliTOFReconstructor.cxx:339 AliTOFReconstructor.cxx:340 AliTOFReconstructor.cxx:341 AliTOFReconstructor.cxx:342 AliTOFReconstructor.cxx:343 AliTOFReconstructor.cxx:344 AliTOFReconstructor.cxx:345 AliTOFReconstructor.cxx:346 AliTOFReconstructor.cxx:347 AliTOFReconstructor.cxx:348 AliTOFReconstructor.cxx:349 AliTOFReconstructor.cxx:350 AliTOFReconstructor.cxx:351 AliTOFReconstructor.cxx:352 AliTOFReconstructor.cxx:353 AliTOFReconstructor.cxx:354 AliTOFReconstructor.cxx:355 AliTOFReconstructor.cxx:356 AliTOFReconstructor.cxx:357 AliTOFReconstructor.cxx:358 AliTOFReconstructor.cxx:359 AliTOFReconstructor.cxx:360 AliTOFReconstructor.cxx:361 AliTOFReconstructor.cxx:362 AliTOFReconstructor.cxx:363 AliTOFReconstructor.cxx:364 AliTOFReconstructor.cxx:365 AliTOFReconstructor.cxx:366 AliTOFReconstructor.cxx:367 AliTOFReconstructor.cxx:368 AliTOFReconstructor.cxx:369 AliTOFReconstructor.cxx:370 AliTOFReconstructor.cxx:371 AliTOFReconstructor.cxx:372 AliTOFReconstructor.cxx:373 AliTOFReconstructor.cxx:374 AliTOFReconstructor.cxx:375 AliTOFReconstructor.cxx:376 AliTOFReconstructor.cxx:377