15 fDPhiWindow2(0.08*0.08),
16 fDThetaWindow2(0.025*0.025),
31 fFastOrFiredChips(1200),
32 fClusterFiredChips(1200),
38 for (
int il=2;il--;) fSCl2Tracks[il] = fTCl2Tracks[il][0] = fTCl2Tracks[il][1] = 0;
39 for(Int_t ilayer = 0; ilayer < 6; ilayer++)fITSClusters[ilayer] = 0;
43 AliMultiplicity::AliMultiplicity(Int_t ntr, Float_t *th, Float_t *ph, Float_t *dth, Float_t *dph, Int_t *labels, Int_t* labelsL2, Int_t ns, Float_t *ts, Float_t *ps, Int_t *labelss, Short_t nfcL1, Short_t nfcL2,
const TBits & fFastOr):
49 fDPhiWindow2(0.08*0.08),
50 fDThetaWindow2(0.025*0.025),
65 fFastOrFiredChips(1200),
66 fClusterFiredChips(1200),
74 fTh =
new Double_t [ntr];
75 fPhi =
new Double_t [ntr];
100 for(Int_t ilayer = 0; ilayer < 6; ilayer++)
fITSClusters[ilayer] = 0;
135 fTh =
new Double_t [ntr];
136 fPhi =
new Double_t [ntr];
191 if(
this == &m)
return *
this;
216 for (
int il=2;il--;) {
235 if(
this==&obj)
return;
294 for(Int_t ilayer = 0; ilayer < 6; ilayer++){
331 for (
int il=2;il--;) {
368 for (
int il=2;il--;) {
392 }
else if (layer == 1) {
399 Error(
"SetLabel",
"Invalid track number %d or layer %d",i,layer);
411 Error(
"SetLabelSingle",
"Invalid single cluster number %d",i);
417 if(layMax < layMin) {
431 for (Int_t i=layMin; i<=layMax; i++) sum+=
fITSClusters[i];
449 fUsedClusT[id] = (((ULong64_t)trSPD2)<<32) + trSPD1;
473 if (mode<0 || mode>1 || i<0 || i>
fNtracks)
return kFALSE;
480 const ULong64_t kMask0 = 0x0000ffff0000ffffLL;
481 const ULong64_t kMask1 = 0xffff0000ffff0000LL;
482 return (
fUsedClusT[i]&(mode ? kMask1:kMask0)) == 0;
494 if ( mode<0 || mode>1 || i<0 || i>
fNtracks )
return kFALSE;
503 if (mode) { spd1 >>= 16; spd2 >>= 16;}
504 else { spd1 &= 0xffff; spd2 &= 0xffff;}
508 return !(spd1<0&&spd2<0);
519 if ( mode<0 || mode>1 || i<0 || i>
fNtracks || lr<0||lr>1)
return nrefs;
526 if (mode) { lr==0 ? tr >>= 16 : tr >>= 16;}
527 else { lr==0 ? tr &= 0xffff : tr &= 0xffff;}
542 if ( mode<0 || mode>1 || i<0 || i>
fNtracks)
return nrefs;
561 if (mode<0 || mode>1 || i<0 || i>
fNsingle)
return kFALSE;
566 const UInt_t kMask0 = 0x0000ffff;
567 const UInt_t kMask1 = 0xffff0000;
568 return (
fUsedClusS[i]&(mode ? kMask1:kMask0)) == 0;
580 if (mode<0 || mode>1 || i<0 || i>
fNsingle)
return kFALSE;
585 if (mode) tr >>= 16;
else tr &= 0xffff;
603 printf(
"N.tracklets: %4d N.singles: %4d, Multiple cluster->track refs:%s\n" 604 "Used: DPhiShift: %.3e Sig^2: dPhi:%.3e dTht:%.3e NStdDev:%.2f ScaleDThtSin2T:%s\n",
607 TString opts = opt; opts.ToLower();
608 int t0spd1=-1,t1spd1=-1,t0spd2=-1,t1spd2=-1,
nt[2][2]={{0}};
609 UInt_t t[2][2][10]={{{0}}};
611 if (opts.Contains(
"t")) {
618 printf(
"T#%3d| Eta:%+5.2f Th:%+6.3f Phi:%+6.3f DTh:%+6.3f DPhi:%+6.3f L1:%5d L2:%5d ",
623 if (!
nt[0][0])
printf(
"%4d ",-1);
else for(
int j=0;j<
nt[0][0];j++)
printf(
"%4d ",t[0][0][j]);
printf(
"/");
624 if (!nt[0][1])
printf(
"%4d ",-1);
else for(
int j=0;j<nt[0][1];j++)
printf(
"%4d ",t[0][1][j]);
printf(
"]");
627 if (!nt[1][0])
printf(
"%4d ",-1);
else for(
int j=0;j<nt[1][0];j++)
printf(
"%4d ",t[1][0][j]);
printf(
"/");
628 if (!nt[1][1])
printf(
"%4d ",-1);
else for(
int j=0;j<nt[1][1];j++)
printf(
"%4d ",t[1][1][j]);
printf(
"]\n");
632 if (opts.Contains(
"s")) {
643 if (!
nt[0][0])
printf(
"%4d ",-1);
else for(
int j=0;j<
nt[0][0];j++)
printf(
"%4d ",t[0][0][j]);
printf(
"/");
644 if (!nt[0][1])
printf(
"%4d ",-1);
else for(
int j=0;j<nt[0][1];j++)
printf(
"%4d ",t[0][1][j]);
printf(
"]\n");
660 Error(
"GetLabelSingle",
"Invalid cluster number %d",i);
return -9999;
668 if (lr<0||lr>1)
return -999;
669 if (icl<0||icl>(
int)
GetNumberOfITSClusters(lr)) {Error(
"GetPhiAll",
"Wrong cluster ID=%d for SPD%d",icl,lr);
return -999;}
677 if (lr<0||lr>1)
return -999;
678 if (icl<0||icl>(
int)
GetNumberOfITSClusters(lr)) {Error(
"GetPhiAll",
"Wrong cluster ID=%d for SPD%d",icl,lr);
return -999;}
686 if (lr<0||lr>1)
return -99999;
687 if (icl<0||icl>(
int)
GetNumberOfITSClusters(lr)) {Error(
"GetPhiAll",
"Wrong cluster ID=%d for SPD%d",icl,lr);
return -99999;}
void SetLabelSingle(Int_t i, Int_t label)
Bool_t AreSPD2SinglesStored() const
virtual void Copy(TObject &obj) const
printf("Chi2/npoints = %f\n", TMath::Sqrt(chi2/npoints))
void SetSingleClusterData(Int_t id, const Float_t *scl, UInt_t tr=0)
Int_t GetLabelSingle(Int_t i) const
virtual Double_t * GetPhi() const
Bool_t FreeSingleCluster(Int_t i, Int_t mode) const
Bool_t GetMultTrackRefs() const
Int_t GetLabelSingleLr(Int_t i, Int_t layer) const
Double_t GetEta(Int_t i) const
Int_t GetReference(UInt_t from, UInt_t which) const
Bool_t FreeClustersTracklet(Int_t i, Int_t mode) const
Double_t GetThetaSingleLr(Int_t i, Int_t lr) const
Double_t GetPhiSingleLr(Int_t i, Int_t lr) const
virtual Int_t GetLabel(Int_t i, Int_t layer) const
AliRefArray * fTCl2Tracks[2][2]
virtual ~AliMultiplicity()
virtual void Clear(Option_t *opt="")
Bool_t GetScaleDThetaBySin2T() const
Bool_t GetTrackletTrackIDs(Int_t i, Int_t mode, Int_t &spd1, Int_t &spd2) const
UInt_t GetReferences(UInt_t from, UInt_t *refs, UInt_t maxRef) const
Int_t GetSingleClusterTrackIDs(Int_t i, Int_t mode, UInt_t *refs, UInt_t maxRef) const
Float_t GetPhiAll(int icl, int lr) const
Double_t GetDeltaTheta(Int_t i) const
void SetTrackletData(Int_t id, const Float_t *tlet, UInt_t trSPD1=0, UInt_t trSPD2=0)
Double_t * GetThetaSingle() const
virtual void Print(Option_t *opt="") const
UInt_t GetNumberOfITSClusters(Int_t layer) const
virtual Double_t * GetTheta() const
AliRefArray * fSCl2Tracks[2]
Int_t GetTrackletTrackIDsLay(Int_t lr, Int_t i, Int_t mode, UInt_t *refs, UInt_t maxRef) const
virtual Double_t GetDeltaPhi(Int_t i) const
Int_t GetLabelAll(int icl, int lr) const
virtual void Clear(Option_t *opt="")
Float_t GetThetaAll(int icl, int lr) const
Bool_t HasReference(UInt_t from) const
#define AliError(message)
Int_t GetNumberOfSingleClustersLr(Int_t lr) const
virtual void SetLabel(Int_t i, Int_t layer, Int_t label)
Bool_t GetSingleClusterTrackID(Int_t i, Int_t mode, Int_t &tr) const
void Duplicate(const AliMultiplicity &m)
AliMultiplicity & operator=(const AliMultiplicity &m)
Double_t * GetPhiSingle() const