-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFT2.cxx
1870 lines (1762 loc) · 64.2 KB
/
FT2.cxx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#include "FT2.h"
#include "AliCDBManager.h"
#include "AliCDBEntry.h"
#include "AliGRPManager.h"
#include "AliLog.h"
#include "AliITSUReconstructor.h"
#include "AliITSURecoDet.h"
#include <TGeoGlobalMagField.h>
#include "AliMagF.h"
#include "AliGeomManager.h"
#include "AliITSUGeomTGeo.h"
#include "AliTrackerBase.h"
#include "AliITSUTrackerGlo.h"
#include "AliITSURecoSens.h"
#include "AliITSURecoLayer.h"
#include "AliITSsegmentation.h"
#include "AliESDVertex.h"
#include <TParticle.h>
#include <TDatabasePDG.h>
#include <TRandom.h>
#include "AliTPCcalibDB.h"
#include "AliTPCParam.h"
#include "AliTPCClusterParam.h"
#include "AliTPCRecoParam.h"
#include "AliPIDResponse.h"
#include "AliDetectorPID.h"
#include "TH2F.h"
#include "TF3.h"
#include "AliNDLocalRegression.h"
#include "AliMathBase.h"
ClassImp(FTProbe)
ClassImp(FT2)
TH2F* hfake = 0;
using namespace AliITSUAux;
float FT2::fgMaxStepTGeo = 1.0;
//________________________________________________
FTProbe::FTProbe()
:fProbeMass(0.14)
,fTPCmomentum(0)
,fTPCSignal(0)
,fTPCSignalN(0)
,fAbsPdgCode(0)
,fPdgCode(0)
,fAbsPdgCodeForTracking(211)
,fTrueMass(0)
,fProbeNClTPC(0)
,fProbeNClITS(0)
,fProbeNClITSFakes(0)
,fProbeITSPatternFake(0)
,fProbeITSPattern(0)
,fProbeChi2TPC(0)
,fProbeChi2ITS(0)
,fIsDecayed(0)
,fIsAbsorbed(0)
,fDecayRadius(0)
,fAbsorbtionRadius(0)
,fLostInItsTpcMatching(0)
,fTrackToClusterChi2CutITS(0)
,fProbeZAtCutOffCheck(0)
{
// def. c-tor
}
//________________________________________________
FT2::FT2() :
fITSRec(0)
,fITS(0)
,fUsePIDForTracking(0)
,fRunNumber("")
,fIsTPC(kFALSE)
,fPIDResponse(0)
,fTPCParaFile(0)
,fXSectionFile(0)
,fTPCSectorEdge(0)
,fMaxSnpTPC(0.95)
,fTPCInnerRows(63)
,fTPCMiddleRows(64)
,fTPCOuterRows(32)
,fTPCLayers()
,fTPCHitLr()
,fNTPCHits(0)
,fMinTPCHits(0)
,fMinITSLrHit(0)
,fTrueMCtrackMult(-1)
,fProbe()
,fProbeIni()
,fKalmanOutward(0)
,fUseKalmanOut(kTRUE)
,fBz(0.5)
,fSimMat(kFALSE)
,fAllowDecay(kFALSE)
,fCurrITSLr(-1)
,fNClTPC(0)
,fNClITS(0)
,fNClITSFakes(0)
,fITSPatternFake(0)
,fITSPattern(0)
,fChi2TPC(0)
,fChi2ITS(0)
,fTPCMap()
,fSigYITS(3.14e-4) // 5e-4
,fSigZITS(3.38e-4) // 5e-4
,fITSerrSclY(2.0)
,fITSerrSclZ(1.0)
,fNITSLrHit(0)
,fdNdY(-1)
,fTPCClsLossProbIROC(0)
,fTPCClsLossProbOROCmedium(0)
,fTPCClsLossProbOROClong(0)
,fTPCDistortionRPhi(0)
,fTPCDistortionR(0)
,fTPCfMCChi2(0)
,fTPCft2Chi2(0)
,fItsTpcMatchingfMC(0)
,fItsTpcMatchingft2(0)
,fTPCClusterErrorParamY(0)
,fTPCClusterErrorParamZ(0)
,fTPCParam(0)
,fTPCRecoParam(0)
,fAllocCorrelatedITSFakes(kTRUE)
{
//
AliInfo("Default Constructor");
//
memset(fITSSensHit,0,kMaxITSLr*2*sizeof(AliITSURecoSens*));
//
const double accAmp[kMaxITSLr] = {0.017,0.013,0.013,0.014,0.016,0.015,0.015};
const double accSigY[kMaxITSLr] = { 9e-2, 9e-2, 9e-2, 9e-2, 9e-2, 9e-2, 9e-2};
const double accSigZ[kMaxITSLr] = { 9e-2, 9e-2, 9e-2, 9e-2, 9e-2, 9e-2, 9e-2};
//
float c0tr2clChi2[7] = {20,25,30,40,45,45,70}; // cut on cluster to track chi2
float c0gloChi2[7] = {6,10,20,30,60,60,70}; // cut on seed global norm chi2
float c0missPen[7] = {2.,2.,2.,2.,2.,2.,2.}; // missing cluster penalty
for (int i=0;i<kMaxITSLr;i++) {
fNCorrelITSFakes[i] = accAmp[i]; // integral of accompanying hits
fCorrelITSFakesSigY[i] = accSigY[i]; // width in rphi
fCorrelITSFakesSigZ[i] = accSigZ[i]; // width in z
fC0tr2clChi2[i] = c0tr2clChi2[i]; // cut on cluster to track chi2
fC0gloChi2[i] = c0gloChi2[i]; // cut on seed global norm chi2
fC0missPen[i] = c0missPen[i]; // missing cluster penalty
}
fTpcPidSignal[0]=fTpcPidSignal[1]=fTpcPidSignal[2]=fTpcPidSignal[3]=fTpcPidSignal[4] = 0;
}
//________________________________________________
FT2::~FT2()
{
//destroy
AliInfo("Destroy");
delete[] fKalmanOutward;
delete fITSRec;
}
//________________________________________________
void FT2::InitTPCParaFile(const char *TPCParaFile)
{
AliInfo("Setting TPC Files");
fTPCParaFile = TFile::Open(TPCParaFile);
if(fTPCParaFile->IsZombie()) AliFatal("Problem with opening TPC Parameterization File - File not available!");
//
fTPCClsLossProbIROC = (AliNDLocalRegression*)fTPCParaFile->Get("tpcNclProb_IROC");
fTPCClsLossProbOROCmedium = (AliNDLocalRegression*)fTPCParaFile->Get("tpcNclProb_OROCmedium");
fTPCClsLossProbOROClong = (AliNDLocalRegression*)fTPCParaFile->Get("tpcNclProb_OROClong");
//
fTpcPidSignal[0] = (AliNDLocalRegression*)fTPCParaFile->Get("tpcPidSignal_electrons");
fTpcPidSignal[1] = (AliNDLocalRegression*)fTPCParaFile->Get("tpcPidSignal_muons");
fTpcPidSignal[2] = (AliNDLocalRegression*)fTPCParaFile->Get("tpcPidSignal_pions");
fTpcPidSignal[3] = (AliNDLocalRegression*)fTPCParaFile->Get("tpcPidSignal_kaons");
fTpcPidSignal[4] = (AliNDLocalRegression*)fTPCParaFile->Get("tpcPidSignal_protons");
//
if(AliTrackerBase::GetBz()<0){
// B--: parameterization of 137544
fTPCDistortionRPhi = (AliNDLocalRegression*)fTPCParaFile->Get("tpcExBDeltaRPhi_Bminus");
fTPCDistortionR = (AliNDLocalRegression*)fTPCParaFile->Get("tpcExBDeltaR_Bminus");
}
else{
// B++: parameterization of 138871
fTPCDistortionRPhi = (AliNDLocalRegression*)fTPCParaFile->Get("tpcExBDeltaRPhi_Bplus");
fTPCDistortionR = (AliNDLocalRegression*)fTPCParaFile->Get("tpcExBDeltaR_Bplus");
}
fTPCfMCChi2 = (AliNDLocalRegression*)fTPCParaFile->Get("fmcTpcChi2");
fTPCft2Chi2 = (AliNDLocalRegression*)fTPCParaFile->Get("ft2TpcChi2");
fItsTpcMatchingfMC = (AliNDLocalRegression*)fTPCParaFile->Get("fmcITSTPCmatching");
fItsTpcMatchingft2 = (AliNDLocalRegression*)fTPCParaFile->Get("ft2ITSTPCmatching");
fTpcClusterAcc = (TF1*)fTPCParaFile->Get("tpcClusterAcc");
// fTpcClusterAcc = new TF1("fTpcClusterAcc","[0]+[1]/x",80,260);
// fTpcClusterAcc->SetParameters(1.05,-25.1827);
}
//________________________________________________
void FT2::InitXSectionFile(const char *XSectionFile)
{
AliInfo("Setting X-Section Files");
fXSectionFile = TFile::Open(XSectionFile);
if(fXSectionFile->IsZombie()) AliFatal("Problem with opening X-Section File - File not available!");
fXSectionHp[0] = (TH1F*)fXSectionFile->Get("hPiplusPXSection");
fXSectionHp[1] = (TH1F*)fXSectionFile->Get("hPiminusPXSection");
fXSectionHp[2] = (TH1F*)fXSectionFile->Get("hKplusPXSection");
fXSectionHp[3] = (TH1F*)fXSectionFile->Get("hKminusPXSection");
fXSectionHp[4] = (TH1F*)fXSectionFile->Get("hPplusPXSection");
fXSectionHp[5] = (TH1F*)fXSectionFile->Get("hPminusPXSection");
}
//________________________________________________
void FT2::InitDetector(Bool_t addTPC,Float_t scEdge)
{
AliInfo("Initializing Detector");
// read full geometry and initialize qauzi-layers for TPC if requested
AliCDBManager* man = AliCDBManager::Instance();
if (!man->IsDefaultStorageSet() || man->GetRun()<0) AliFatal("CDB manager is not configured");
//
if ( !TGeoGlobalMagField::Instance()->GetField() ) {
AliWarning("Magnetic field is not initialized, loading from GRP");
AliGRPManager grpMan;
if(!grpMan.ReadGRPEntry()) AliFatal("Cannot get GRP entry");
if(!grpMan.SetMagField()) AliFatal("Problem with magnetic field setup");
}
fBz = AliTrackerBase::GetBz();
//
AliGeomManager::LoadGeometry("geometry.root");
AliCDBEntry* ent = man->Get("ITS/Calib/RecoParam");
AliITSURecoParam* par = (AliITSURecoParam*)((TObjArray*)ent->GetObject())->At(1); // need just to initialize the interface
fITSRec = new AliITSUReconstructor();
fITSRec->SetRecoParam(par);
fITSRec->Init();
//
fITS = fITSRec->GetITSInterface();
if (addTPC) AddTPC(scEdge);
int nLrITS = fITS->GetNLayersActive();
fKalmanOutward = new AliExternalTrackParam[nLrITS];
//
AliTPCcalibDB * calib = AliTPCcalibDB::Instance();
const AliMagF * field = (AliMagF*)TGeoGlobalMagField::Instance()->GetField();
calib->SetExBField(field);
calib->SetRun(fRunNumber.Atoi());
// get cluster param from calibDB
AliTPCClusterParam *clsParam = calib->GetClusterParam();
clsParam->Instance();
clsParam->SetInstance(clsParam);
// fTPCClusterErrorParam = new TF1("fTPCClusterErrorParam","AliTPCClusterParam::SGetError0Par([0],[1],x,[2])",0.,250.);
fTPCClusterErrorParamY = new TF1("fTPCClusterErrorParamY","clusterResolutionYAliRoot(x,[0],[1])",0,250.);
fTPCClusterErrorParamZ = new TF1("fTPCClusterErrorParamZ","clusterResolutionZAliRoot(x,[0],[1])",0,250.);
// get tpc param from calibDB
fTPCParam = calib->GetParameters();
// get tpc reco param from calibDB
fTPCRecoParam = calib->GetRecoParam(1); // to be checked with marian
}
//____________________________________________________
void FT2::InitTPCPIDResponse()
{
AliInfo("Initializing TPC PID Response");
fPIDResponse = new AliPIDResponse(kTRUE);
fPIDResponse->GetTPCResponse().SetUseDatabase(kFALSE);
//AliTPCParam* param = AliTPCcalibDB::Instance()->GetParameters();
if (fTPCParam){
TVectorD *paramBB = fTPCParam->GetBetheBlochParameters();
if (paramBB){
fPIDResponse->GetTPCResponse().SetBetheBlochParameters((*paramBB)(0),(*paramBB)(1),(*paramBB)(2),(*paramBB)(3),(*paramBB)(4));
AliInfo(Form("Setting BB parameters from OCDB (AliTPCParam): %.2g, %.2g, %.2g, %.2g, %.2g",(*paramBB)(0),(*paramBB)(1),(*paramBB)(2),(*paramBB)(3),(*paramBB)(4)));
}
else {
AliError("Couldn't get BB parameters from OCDB, the old default values will be used instead");
}
}
else {
AliError("Couldn't get TPC parameters");
}
}
//____________________________________________________
void FT2::InitEnvLocal()
{
AliInfo("Initializing Local Environment");
// init with environment of local ITSU generation
AliCDBManager* man = AliCDBManager::Instance();
man->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
man->SetSpecificStorage("GRP/*/*","alien://folder=/alice/data/2010/OCDB");
// man->SetSpecificStorage("ITS/*/*", "alien://folder=/alice/simulation/LS1_upgrade/Ideal");
// man->SetSpecificStorage("TPC/*/*", "alien://folder=/alice/simulation/2008/v4-15-Release/Ideal/");
man->SetSpecificStorage("ITS/Align/Data", "alien://folder=/alice/simulation/LS1_upgrade/Ideal");
man->SetSpecificStorage("ITS/Calib/RecoParam", "alien://folder=/alice/simulation/LS1_upgrade/Ideal");
man->SetDefaultStorage("alien://folder=/alice/data/2010/OCDB");
man->SetSpecificStorage("MUON/Align/Data","alien://folder=/alice/simulation/2008/v4-15-Release/Residual/");
man->SetSpecificStorage("TPC/Align/Data", "alien://folder=/alice/simulation/2008/v4-15-Release/Residual/");
man->SetSpecificStorage("TPC/Calib/ClusterParam", "alien://folder=/alice/simulation/2008/v4-15-Release/Residual/");
man->SetSpecificStorage("TPC/Calib/RecoParam", "alien://folder=/alice/simulation/2008/v4-15-Release/Residual/");
man->SetSpecificStorage("TPC/Calib/TimeGain", "alien://folder=/alice/simulation/2008/v4-15-Release/Residual/");
man->SetSpecificStorage("TPC/Calib/AltroConfig", "alien://folder=/alice/simulation/2008/v4-15-Release/Residual/");
man->SetSpecificStorage("TPC/Calib/TimeDrift", "alien://folder=/alice/simulation/2008/v4-15-Release/Residual/");
man->SetSpecificStorage("TPC/Calib/Correction", "alien://folder=/alice/simulation/2008/v4-15-Release/Residual/");
// man->SetSpecificStorage("GRP/GRP/Data","alien://folder=/alice/data/2010/OCDB");
// man->SetSpecificStorage("ITS/Align/Data", "alien://folder=/alice/simulation/LS1_upgrade/Ideal");
// man->SetSpecificStorage("ITS/Calib/RecoParam", "alien://folder=/alice/simulation/LS1_upgrade/Ideal");
man->SetRun(fRunNumber.Atoll());
man->Print("");
/*
AliCDBManager* man = AliCDBManager::Instance();
man->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
man->SetSpecificStorage("GRP/GRP/Data",
Form("local://%s",gSystem->pwd()));
man->SetSpecificStorage("ITS/Align/Data",
Form("local://%s",gSystem->pwd()));
man->SetSpecificStorage("ITS/Calib/RecoParam",
Form("local://%s",gSystem->pwd()));
man->SetRun(0);*/
//
}
//____________________________________________________
void FT2::AddTPC(Float_t scEdge)
{
// add TPC mock-up
//
const Float_t kRadLPerRow = 0.000036;
//
const Float_t kTPCInnerRadialPitch = 0.75 ; // cm
const Float_t kTPCMiddleRadialPitch = 1.0 ; // cm
const Float_t kTPCOuterRadialPitch = 1.5 ; // cm
const Int_t kTPCInnerRows = fTPCInnerRows; // 63
const Int_t kTPCMiddleRows = fTPCMiddleRows; // 64
const Int_t kTPCOuterRows = fTPCOuterRows; // 32
const Int_t kTPCRows = (kTPCInnerRows + kTPCMiddleRows + kTPCOuterRows) ;
const Float_t kTPCRowOneRadius = 85.2 ; // cm
const Float_t kTPCRow64Radius = 135.1 ; // cm
const Float_t kTPCRow128Radius = 199.2 ; // cm
Float_t pitch;
//
if (fIsTPC) {
printf("TPC was already added\n");
return;
}
fIsTPC = kTRUE;
fTPCSectorEdge = scEdge;
//
for ( Int_t k = 0 ; k < kTPCRows ; k++ ) {
//
Float_t rowRadius =0;
if (k<kTPCInnerRows) {
rowRadius = kTPCRowOneRadius + k*kTPCInnerRadialPitch ;
pitch = kTPCInnerRadialPitch;
}
else if ( k>=kTPCInnerRows && k<(kTPCInnerRows+kTPCMiddleRows) ){
rowRadius = kTPCRow64Radius + (k-kTPCInnerRows+1)*kTPCMiddleRadialPitch ;
pitch = kTPCMiddleRadialPitch;
}
else if (k>=(kTPCInnerRows+kTPCMiddleRows) && k<kTPCRows ){
rowRadius = kTPCRow128Radius + (k-kTPCInnerRows-kTPCMiddleRows+1)*kTPCOuterRadialPitch ;
pitch = kTPCOuterRadialPitch;
}
AddTPCLayer(k,rowRadius,kRadLPerRow,pitch);
}
//
fTPCHitLr.resize(fTPCLayers.size());
}
//____________________________________________________
void FT2::AddTPCLayer(Int_t rowId,Float_t x, Float_t x2x0, Float_t pitch)
{
// add single TPC layer
fTPCLayers.push_back(FT2TPCLayer(rowId,x,x2x0,pitch));
}
//____________________________________________________
void FT2::PrintLayout()
{
// print setup
if (fITS) fITS->Print("lr");
if (fIsTPC) {
printf("TPC inactive sector edge: %.3f\n",fTPCSectorEdge);
printf("TPC \t R \tx2x0\t Pitch \n");
for (int ilr=0;ilr<(int)fTPCLayers.size();ilr++) {
FT2TPCLayer& lr = fTPCLayers[ilr];
printf("%3d\t%6.2f\t%1.6f\t",ilr,lr.x,lr.x2x0);
//
if (lr.isDead) printf(" \t");
else printf("%6.4f\t",lr.pitch);
//
printf("\n");
}
}
}
//____________________________________________________
Bool_t FT2::ProcessTrack(TParticle* part, AliVertex* vtx)
{
// track the particle throught the setup; it must be provided in the production point
// then relate to vtx
//
if(fTrueMCtrackMult==-1){AliFatal("True MC Multiplicity is 0. This must not happen! Set multiplicity before FT2::InitEnvLocal()!\n");}
static AliESDVertex vtx0;
static Bool_t first = kTRUE;
if (first) {
double vd[6] = {0};
vtx0.SetXYZ(&vd[0]);
vtx0.SetCovarianceMatrix(&vd[0]);
first = kFALSE;
}
if (!InitProbe(part)) {
#if DEBUG
printf("Initialization failed\n");
part->Print();
fProbe.Print();
#endif
return kFALSE;
}
PrepareProbe();
//
// check if there is something to reconstruct
if ( (fIsTPC && fNTPCHits<fMinTPCHits) || (fNITSLrHit<fMinITSLrHit)) {
#if DEBUG
printf("Track hit requirements are not satisfied: Hit ITS Layers: %d (need %d) TPCHits: %d (need %d)\n",
fNITSLrHit,fMinITSLrHit, fNTPCHits, fIsTPC ? fMinTPCHits:0);
fProbe.Print();
#endif
return kFALSE;
}
ResetCovMat(&fProbe);
//
if (!ReconstructProbe(part)) {
#if DEBUG
printf("Track reconstruction failed\n");
fProbe.Print();
#endif
return kFALSE;
}
// check if tracks are rejected by ITS chi2 per layer
fProbe.fTrackToClusterChi2CutITS = CutOnTrackToClusterChi2ITS();
//
// go to innermost radius of ITS (including beam pipe)
if (!PropagateToR(fITS->GetRMin(),-1, kTRUE, kFALSE, kTRUE)) {
#if DEBUG
printf("Track propagatation to ITS RMin=%f failed\n",fITS->GetRMin());
fProbe.Print();
#endif
return kFALSE; // don't exit on faile propagation, may simply not reach this point
}
//
AliVertex* vtuse = vtx ? vtx : (AliVertex*)&vtx0; // if no vertex provided, relate to 0,0,0
//
fDCACov[0] = fDCACov[1] = fDCACov[2] = 0;
Bool_t res = fProbe.PropagateToDCA(vtuse,fBz, fITS->GetRMin(), fDCA, fDCACov);
#if DEBUG
if (!res) {
printf("Track propagation to vertex failed\n");
vtuse->Print();
fProbe.Print();
}
#endif
if(fTuneOnDataOrMC){
#if DEBUG
printf("\n\n\n################################");
printf("### TuneOnDataOrMC is Active ###\n# TPC min. cluster? %d < %d \n# ITS kAny? %d \n",fNClTPC,30,(fITSPattern&(0x1<<0) || (fITSPattern&(0x1<<1) && fITSPattern&(0x1<<2))));
#endif
//
if(fNClTPC<30 || (!(fITSPattern&(0x1<<0)) && !(fITSPattern&(0x1<<1) && fITSPattern&(0x1<<2)))){
#if DEBUG
printf("################################\n\n\n");
#endif
fProbe.fLostInItsTpcMatching=kTRUE;
}
//
Double_t pointChi[3] = {1./AliMathBase::BetheBlochAleph(0.0001+part->P()/TDatabasePDG::Instance()->GetParticle(fProbe.fAbsPdgCode)->Mass()),
abs(part->Eta()),fTrueMCtrackMult};
//
Double_t pointMatch[3] = {fNClTPC,TMath::Abs(part->Eta()),(1./part->Pt())};
//
Double_t templateFmcMatchingEff = fItsTpcMatchingfMC->Eval(pointMatch);
//
#if DEBUG
Double_t templateFt2MatchingEff = fItsTpcMatchingft2->Eval(pointMatch);
printf("# fMC ITS+TPC match.? %0.2f\n# FT2 ITS+TPC match.? %0.2f\n",templateFmcMatchingEff,templateFt2MatchingEff);
#endif
if(gRandom->Rndm()>templateFmcMatchingEff){
#if DEBUG
printf("################################\n\n\n");
#endif
fProbe.fLostInItsTpcMatching=kTRUE;
}
//
Double_t templateFmcChi2stand = fTPCfMCChi2->Eval(pointChi); // TPC standardized chi2 from either full MC or data
Double_t templateFt2Chi2stand = fTPCft2Chi2->Eval(pointChi); // TPC standardized chi2 from ft2 first iteration
if(templateFt2Chi2stand==0)templateFt2Chi2stand=templateFmcChi2stand;
fChi2TPC *=(templateFmcChi2stand/templateFt2Chi2stand);
#if DEBUG
Double_t oldChi2 = fChi2TPC;
printf("# fMC chi2? %0.2f\n# FT2 chi2? %0.2f\n# Old Chi2? %0.2f\n# New Chi2? %0.2f\n",templateFmcChi2stand,templateFt2Chi2stand,oldChi2,fChi2TPC);
printf("################################\n\n\n");
#endif
}
fProbe.fProbeNClTPC = fNClTPC;
fProbe.fProbeNClITS = fNClITS;
fProbe.fProbeNClITSFakes = fNClITSFakes;
fProbe.fProbeITSPatternFake = fITSPatternFake;
fProbe.fProbeITSPattern = fITSPattern;
fProbe.fProbeChi2TPC = fChi2TPC;
fProbe.fProbeChi2ITS = fChi2ITS;
//
/*
printf("Tracking done: NclITS: %d (chi2ITS=%.3f) NclTPC: %3d (chi2TPC=%.3f)\n",fNClITS,fChi2ITS,fNClTPC,fChi2TPC);
fProbe.Print();
//
if (res) {
printf("DCA: {%e %e} DCACov: {%e %e %e}\n",fDCA[0],fDCA[1],fDCACov[0],fDCACov[1],fDCACov[2]);
}
else {
printf("Failed to propagate to vertex\n");
}
*/
//
return res;
}
//____________________________________________________
Bool_t FT2::InitProbe(TParticle* part)
{
// create probe (code copied from AliESDtrack::AliESDtrack(TParticle * part) :
//
Double_t xref;
Double_t alpha;
Double_t param[5];
Double_t covar[15] = {0};
//
fNTPCHits = fNClTPC = fNClITS = fNClITSFakes = fNITSLrHit = fITSPatternFake = fITSPattern = 0;
fChi2TPC = fChi2ITS = 0;
fDCA[0] = fDCA[1] = fDCACov[0] = fDCACov[1] = fDCACov[2] = 0.;
//
Int_t pdgCode = part->GetPdgCode();
TParticlePDG* pdgp = TDatabasePDG::Instance()->GetParticle(pdgCode);
Double_t charge = pdgp->Charge();
fProbe.fProbeMass = pdgp->Mass();
fProbe.fAbsPdgCode = TMath::Abs(pdgCode);
fProbe.fPdgCode = pdgCode;
fProbe.fAbsPdgCodeForTracking = 0;
fProbe.fTrueMass = fProbe.fProbeMass;
//
fProbe.fProbeNClTPC = fNClTPC;
fProbe.fProbeNClITS = fNClITS;
fProbe.fProbeNClITSFakes = fNClITSFakes;
fProbe.fProbeITSPatternFake = fITSPatternFake;
fProbe.fProbeITSPattern = fITSPattern;
fProbe.fProbeChi2TPC = fChi2TPC;
fProbe.fProbeChi2ITS = fChi2ITS;
fProbe.fIsDecayed = fProbe.fIsAbsorbed = 0;
fProbe.fAbsorbtionRadius = fProbe.fDecayRadius = 0.;
fProbe.fTrackToClusterChi2CutITS = 0;
fProbe.fProbeZAtCutOffCheck = 0.;
fProbe.fLostInItsTpcMatching = 0;
//
fProbe.fTPCSignal = 0.;
fProbe.fTPCSignalN = 0;
//
/*
fProbe.fInnerTrackParameters[7] = {0.};
fProbe.fProbeITSClusterIsCls[8] = {0.};
fProbe.fProbeITSClusterX[8] = {0.};
fProbe.fProbeITSClusterY[8] = {0.};
fProbe.fProbeITSClusterZ[8] = {0.};
fProbe.fProbeTPCClusterIsCls[160] = {0.};
fProbe.fProbeTPCClusterX[160] = {0.};
fProbe.fProbeTPCClusterY[160] = {0.};
fProbe.fProbeTPCClusterZ[160] = {0.};
chiwITS[7] = {0.};
*/
//
// Calculate alpha: the rotation angle of the corresponding local system (TPC sector)
alpha = part->Phi()*180./TMath::Pi();
if (alpha<0) alpha+= 360.;
if (alpha>360) alpha -= 360.;
//
Int_t sector = (Int_t)(alpha/20.);
alpha = 10. + 20.*sector;
alpha /= 180;
alpha *= TMath::Pi();
//
// Get the vertex of origin and the momentum
TVector3 ver(part->Vx(),part->Vy(),part->Vz());
TVector3 mom(part->Px(),part->Py(),part->Pz());
// Rotate to the local coordinate system (TPC sector)
ver.RotateZ(-alpha);
mom.RotateZ(-alpha);
// X of the referense plane
xref = ver.X();
//
param[0] = ver.Y();
param[1] = ver.Z();
param[2] = TMath::Sin(mom.Phi());
param[3] = mom.Pz()/mom.Pt();
param[4] = TMath::Sign(1/mom.Pt(),charge);
// AliInfo(Form("Probe Mass is: %f ",fProbe.fProbeMass));
// Set AliExternalTrackParam
fProbe.Set(xref, alpha, param, covar);
ResetCovMat(&fProbe);
fTPCMap.ResetAllBits();
fProbeIni = fProbe;
return kTRUE;
}
//____________________________________________________
Int_t FT2::ProbeDecayAbsorb(double* posIni)
{
// check if the probe has decayed (return 1) or absorbed (return -1).
// if survived, return 0
// Before returning, assign to posIni current position
double posCurr[3];
fProbe.GetXYZ(posCurr);
double params[8];
AliTrackerBase::MeanMaterialBudget(posIni,posCurr,params);
Double_t dist=params[4];
//
#if DEBUG>5
printf("New step length %.2f from XYZ= %+.2f %+.2f %+.2f\n",dist,posIni[0],posIni[1],posIni[2]);
#endif
//
if(gRandom->Rndm()<ParticleDecayProbability(dist)) {
fProbe.fIsDecayed=kTRUE;
fProbe.fIsAbsorbed=kFALSE;
fProbe.fDecayRadius=TMath::Sqrt(posIni[0]*posIni[0]+posIni[1]*posIni[1]);
return 1;
}
if(gRandom->Rndm()<ParticleAbsorptionProbability(params[4],params[0],params[2],params[3])){
fProbe.fIsDecayed=kFALSE;
fProbe.fIsAbsorbed=kTRUE;
fProbe.fAbsorbtionRadius=TMath::Sqrt(posIni[0]*posIni[0]+posIni[1]*posIni[1]);
return -1;
}
for (int j=3;j--;) posIni[j] = posCurr[j];
fProbe.fIsAbsorbed = fProbe.fIsDecayed = 0;
fProbe.fAbsorbtionRadius = fProbe.fDecayRadius = 0;
return 0;
//
}
//____________________________________________________
Bool_t FT2::PrepareProbe()
{
// propagate the probe to max allowed R of the setup
int nlrITS = fITS->GetNLayers(); // including passive layers
//
double xyzIni[3];
if(fAllowDecay){fProbe.GetXYZ(xyzIni);}
//
for (int ilr=0;ilr<nlrITS;ilr++) {
AliITSURecoLayer* lr = fITS->GetLayer(ilr);
//
if (lr->IsPassive()) { // cylindric passive layer, just go to this layer
if (!PropagateToR(lr->GetRMax(),1,kFALSE,fSimMat,fSimMat)) return kFALSE;
}
else { // active layer, need to simulate the hit positions
if (!PassActiveITSLayer(lr)) return kFALSE;
fProbe.fProbeITSClusterIsCls[ilr]=1;
Double_t posClsITS[3];
fProbe.GetXYZ(posClsITS);
fProbe.fProbeITSClusterX[ilr] = posClsITS[0];
fProbe.fProbeITSClusterY[ilr] = posClsITS[1];
fProbe.fProbeITSClusterZ[ilr] = posClsITS[2];
}
if(fAllowDecay && ProbeDecayAbsorb(xyzIni)) return kFALSE;
}
//
fNTPCHits = 0;
if (fIsTPC) {
const double kTanSectH = 1.76326980708464975e-01; // tangent of 10 degree (sector half opening)
if (!fProbe.RotateParamOnly( fProbe.PhiPos() )) {
return kFALSE; // start in the frame with X pointing to track position
}
if (!PropagateToR(fTPCLayers[0].x-0.1,1,kFALSE,fSimMat,fSimMat)) {
return kFALSE; // reach inner layer
}
if(fAllowDecay && ProbeDecayAbsorb(xyzIni)) return kFALSE;
//
int sector = -1;
for (int ilrReset=0;ilrReset<(int)fTPCLayers.size();ilrReset++) {
FT2TPCLayer_t &tpcLrReset = fTPCLayers[ilrReset];
tpcLrReset.hitSect = -1;
}
for (int ilr=0;ilr<(int)fTPCLayers.size();ilr++) {
#if DEBUG>5
printf("At TPC lr %d\n",ilr);
fProbe.Print();
#endif
FT2TPCLayer_t &tpcLr = fTPCLayers[ilr];
double phi = fProbe.PhiPos();
BringTo02Pi(phi);
Int_t sectNew = (Int_t)(phi*TMath::RadToDeg()/20.);
if (sector!=sectNew) {
sector = sectNew;
phi = 10. + 20.*sector;
phi /= 180;
phi *= TMath::Pi();
if (!fProbe.RotateParamOnly(phi)) {
#if DEBUG
printf("TPC:Failed to rotate to alpha %.4f (sc %d)\n",phi,sector);
fProbe.Print();
#endif
return kFALSE; // go to sector frame
}
}
if (!fProbe.PropagateParamOnlyTo(tpcLr.x, fBz)) {
#if DEBUG
printf("TPC:Failed to go to X: %.4f\n",tpcLr.x);
fProbe.Print();
#endif
return kFALSE; // no materials inside TPC
}
fProbe.fProbeZAtCutOffCheck = fProbe.GetZ();
// cut taken from AliTPCclusterer, line 1179
/*
//Int_t crtime = Int_t((fParam->GetZLength(fSector)-fRecoParam->GetCtgRange()*fRx)/fZWidth-fParam->GetNTBinsL1()-5);
//if (i%fMaxTime<=crtime) continue;
Int_t fMaxTime = 1006;
Float_t fZWidth = fTPCParam->GetZWidth();
Float_t fRx = fTPCParam->GetPadRowRadii(sector,ilr);
Int_t crtime = Int_t((fTPCParam->GetZLength(sector)-fTPCRecoParam->GetCtgRange()*fRx)/fZWidth-fTPCParam->GetNTBinsL1()-5);
cout << "This is the crtime " << crtime << endl;
printf("fZWidth: %f\n",fZWidth);
printf("fRx: %f\n",fRx);
printf("ZLength: %f\n",fTPCParam->GetZLength(sector));
printf("CtgRange: %f\n",fTPCRecoParam->GetCtgRange());
printf("NTBinsL1: %f\n",fTPCParam->GetNTBinsL1());
printf("fMaxTime: %f\n",fMaxTime);
printf("Cut?: %d\n\n",ilr%fMaxTime);
// if (ilr%fMaxTime<=crtime) continue;
// if (i%fMaxTime<=crtime) continue;
*/
if(TMath::Abs(fProbe.GetZ()/fProbe.GetX())>fTpcClusterAcc->Eval(fProbe.GetX())) continue;
// cut during cluster seeding, taken from Ruben
Double_t kDeltaZ = 10;
if(TMath::Abs(fProbe.GetZ())>(/*AliTPCReconstructor::GetCtgRange()*/1.05*fProbe.GetX()+kDeltaZ)) continue ;
//if (TMath::Abs(fProbe.GetZ())>kMaxZTPC) break; // exit from the TPC
// was here before
if(fAllowDecay && ProbeDecayAbsorb(xyzIni)) return kFALSE;
double maxY = kTanSectH*tpcLr.x - fTPCSectorEdge; // max allowed Y in the sector
Double_t z = fProbe.GetZ();
if(z>245.) z=245.;
Double_t pointExB[3] = {TMath::Sqrt(fProbe.GetX()*fProbe.GetX()+fProbe.GetY()*fProbe.GetY())/250.,fProbe.GetZ()/250.,fProbe.Phi()-TMath::Pi()};
Double_t TPCdistortionRPhi = fTPCDistortionRPhi->Eval(pointExB); // include tpc field distortion in rphi, assuming rphi==Y
if((fProbe.GetY()<0 && TPCdistortionRPhi<0) || (fProbe.GetY()>0 && TPCdistortionRPhi>0)){
if ((TMath::Abs(fProbe.GetY())+TMath::Abs(TPCdistortionRPhi))>maxY) {
#if DEBUG>3
printf("No hit in dead zone because\n");
printf("R: %f \t Z: %f \t phi: %f\n",pointExB[0],pointExB[1],pointExB[2]);
printf("Probe.Y: %f with \n",fProbe.GetY());
printf("Rphi distortion |%f| larger than pad maxY %0.4f\n",TPCdistortionRPhi,maxY);
fProbe.Print();
#endif
continue; // in dead zone
}
}
else{
if (TMath::Abs(fProbe.GetY()+TPCdistortionRPhi)>maxY) {
#if DEBUG>3
printf("No hit in dead zone because\n");
printf("R: %f \t Z: %f \t phi: %f\n",pointExB[0],pointExB[1],pointExB[2]);
printf("Probe.Y: %f with \n",fProbe.GetY());
printf("Rphi distortion |%f| larger than pad maxY %0.4f\n",TPCdistortionRPhi,maxY);
fProbe.Print();
#endif
continue; // in dead zone
}
}
//
// if track Snp > limit, stop propagation
if (TMath::Abs(fProbe.GetSnp())>fMaxSnpTPC) {
#if DEBUG>2
printf("TPC: Max snp %f reached\n",fMaxSnpTPC);
fProbe.Print();
#endif
return kFALSE;
}
// register hit
#if DEBUG>5
printf("Register TPC hit at sect:%d, Y:%.4f Z:%.4f\n",sector,fProbe.GetY(),fProbe.GetZ());
cout << fNTPCHits << endl;
// fProbe.Print();
#endif
//
Double_t TPCdistortionR = fTPCDistortionR->Eval(pointExB); // include tpc field distortion in R
//
if(TMath::Abs(TPCdistortionR)>tpcLr.pitch){ // distortion is larger than pad pitch => change in R
Int_t ilrDis =ilr;
if(TPCdistortionR<0){ // distortion to pad at lower radius
ilrDis=ilr-1;
}
else if(TPCdistortionR>0){ // distortion to pad at higher radius
ilrDis=ilr+1;
}
FT2TPCLayer_t &tpcLrDisR = fTPCLayers[ilrDis];
//if (tpcLrDisR.isDead) continue;
#if DEBUG>5
printf("Reassigning cluster position to pad row because\n");
printf("R distortion |%0.4f| larger than pad pitch %0.4f\n",TPCdistortionR,tpcLr.pitch);
printf("Was there a hit before? %0.1f\n",tpcLrDisR.hitSect); // sector number set if hit before
printf("Updating # of TPC hits? %i\n",fNTPCHits);
#endif
if(tpcLrDisR.hitSect!=-1){ // if hit before, do not increase TPC hits
fTPCHitLr[fNTPCHits] = ilrDis;
}
else{ // if not hit before, increase TPC hits
fTPCHitLr[fNTPCHits++] = ilrDis;
}
tpcLrDisR.hitSect = sector;
tpcLrDisR.hitY = fProbe.GetY();
tpcLrDisR.hitZ = fProbe.GetZ();
//
fProbe.fProbeTPCClusterIsCls[fNTPCHits]=1;
Double_t posCls[3];
fProbe.GetXYZ(posCls);
fProbe.fProbeTPCClusterX[fNTPCHits] = posCls[0];
fProbe.fProbeTPCClusterY[fNTPCHits] = posCls[1];
fProbe.fProbeTPCClusterZ[fNTPCHits] = posCls[2];
#if DEBUG>5
printf("-----> %i\n",fNTPCHits);
#endif
}
else{
//
//if (tpcLr.isDead) continue;
//
//printf("Track not distorted in R\n");
if(tpcLr.hitSect!=-1){ // if hit before, do not increase TPC hits
//printf("was hit before\n");
fTPCHitLr[fNTPCHits] = ilr;
}
else{
//printf("was not hit before\n");
fTPCHitLr[fNTPCHits++] = ilr;
}
//printf("TPC hits: %i\n",fNTPCHits);
tpcLr.hitSect = sector;
tpcLr.hitY = fProbe.GetY();
tpcLr.hitZ = fProbe.GetZ();
//
fProbe.fProbeTPCClusterIsCls[fNTPCHits]=1;
Double_t posCls[3];
fProbe.GetXYZ(posCls);
fProbe.fProbeTPCClusterX[fNTPCHits] = posCls[0];
fProbe.fProbeTPCClusterY[fNTPCHits] = posCls[1];
fProbe.fProbeTPCClusterZ[fNTPCHits] = posCls[2];
}
}
}
// RS: temporary fix: the errors assigned in clusterizer is sqrt(pixel_extent/12)
double eta = fProbe.Eta();
fITSerrSclZ = 20e-4*(1.4+0.61*eta*eta)*TMath::Sqrt(1./12.)/fSigZITS;
//
return kTRUE;
}
//________________________________________________________________________
Bool_t FT2::ReconstructProbe(TParticle* part)
{
// reconstruct the probe
//
int sect = -1;
fChi2TPC = 0;
fChi2ITS = 0;
fNClITS = 0;
fNClITSFakes = 0;
fITSPatternFake = 0;
fITSPattern = 0;
fNClTPC = 0;
fCurrITSLr = -1;
fProbe.fAbsPdgCodeForTracking = 211; // default assumption is pion
fProbe.fProbeMass = TDatabasePDG::Instance()->GetParticle(fProbe.fAbsPdgCodeForTracking)->Mass();
//
// needed for parameterizations
Double_t point[3] = {
1./AliMathBase::BetheBlochAleph(0.0001+part->P()/TDatabasePDG::Instance()->GetParticle(fProbe.fAbsPdgCode)->Mass()),
abs(part->Eta()),
fTrueMCtrackMult};
//
if (fNTPCHits) {
// TPC tracking
#if DEBUG>5
AliInfo(Form("Number of clusters generated on the pad rows: %i",fNTPCHits));
#endif
for (int ih=fNTPCHits;ih--;) {
#if DEBUG>5
AliInfo(Form("Entering TPC cluster loop: %i",ih));
#endif
if(ih==0 && fUsePIDForTracking){
Int_t typePID=-1;
Double_t p = fProbe.P(); fProbe.fTPCmomentum = p;
if(fProbe.fAbsPdgCode==11){
typePID=0;
}
else if(fProbe.fAbsPdgCode==13){
typePID=1;
}
else if(fProbe.fAbsPdgCode==211){
typePID=2;
}
else if(fProbe.fAbsPdgCode==321){
typePID=3;
}
else if(fProbe.fAbsPdgCode==2212){
typePID=4;
}
else {AliFatal("PDC Code cannot be treated in the code - This case should not be possible here!");}
#if DEBUG>5
AliInfo(Form("PDG code of Probe: %4.f",fProbe.fAbsPdgCode));
AliInfo(Form("Momentum of Probe: %f",fProbe.fTPCmomentum));
#endif
Double_t signalTPC = fTpcPidSignal[typePID]->Eval(point);
fProbe.fTPCSignal = signalTPC;
fProbe.fTPCSignalN = (UShort_t)signalTPC;
Double_t prob[AliPID::kSPECIES]={0.};
GetComputeTPCProbability(&fProbe,AliPID::kSPECIES,prob);
Float_t max=0.,min=1.e9;
Int_t pid=-1;
for (Int_t i=0; i<AliPID::kSPECIES; ++i) {
if (prob[i]>max) {pid=i; max=prob[i];}
if (prob[i]<min) min=prob[i];
}
if (pid>AliPID::kSPECIES-1 || (min>=max)) pid = AliPID::kPion;
#if DEBUG>5
for(Int_t i=0;i<AliPID::kSPECIES;i++){
AliInfo(Form("Pid Prob : %f",prob[i]));
}
#endif
Int_t pdgCode = 0;
if(pid==0) pdgCode = 11;
if(pid==1) pdgCode = 13;
if(pid==2) pdgCode = 211;
if(pid==3) pdgCode = 321;
if(pid==4) pdgCode = 2212;
if(pdgCode==0) AliFatal("This should not have happened");
#if DEBUG>5
AliInfo(Form("Probe mass for tracking: %f",fProbe.fProbeMass));
#endif
if(pid==0) fProbe.fAbsPdgCodeForTracking = 211; // e(11) --> track as pion due to bug in fMC
if(pid==1) fProbe.fAbsPdgCodeForTracking = 211; // mu(13) --> track as pion due to bug in fMC
if(pid==2) fProbe.fAbsPdgCodeForTracking = 211; // pi(211)
if(pid==3) fProbe.fAbsPdgCodeForTracking = 321; // ka(321)
if(pid==4) fProbe.fAbsPdgCodeForTracking = 2212; // pr(2212)
if(fProbe.fAbsPdgCodeForTracking==0) AliFatal("This should not have happened");
TParticlePDG* pdgp = TDatabasePDG::Instance()->GetParticle(fProbe.fAbsPdgCodeForTracking);
fProbe.fProbeMass = pdgp->Mass();
#if DEBUG>5
AliInfo(Form("PID for tracking: %i with probe mass %f",pid,fProbe.fProbeMass));
#endif
}
FT2TPCLayer_t &tpcLr = fTPCLayers[fTPCHitLr[ih]];