ClassImp(AliITSRawClusterSDD)
//--------------------------------------
-AliITSRawClusterSDD::AliITSRawClusterSDD(Int_t wing, Float_t Anode,Float_t Time,Float_t Charge,Float_t PeakAmplitude,Int_t PeakPosition,Float_t Asigma, Float_t Tsigma,Float_t DriftPath,Float_t AnodeOffset,Int_t Samples) {
+AliITSRawClusterSDD::AliITSRawClusterSDD(Int_t wing, Float_t Anode,Float_t Time, Float_t Charge,
+ Float_t PeakAmplitude,Int_t PeakPosition, Float_t Asigma, Float_t Tsigma, Float_t DriftPath, Float_t AnodeOffset, Int_t Samples,
+ Int_t Tstart, Int_t Tstop, Int_t Tstartf, Int_t Tstopf, Int_t Anodes, Int_t Astart, Int_t Astop)
+{
// constructor
fWing = wing;
fAnode = Anode;
fQ = Charge;
fPeakAmplitude = PeakAmplitude;
fPeakPosition = PeakPosition;
- fNanodes = 1;
- fNsamples = Samples;
- fMultiplicity=fNsamples;
+ fAsigma = Asigma;
+ fTsigma = Tsigma;
+ fNanodes = Anodes;
+ fTstart = Tstart;
+ fTstop = Tstop;
+ fTstartf = Tstartf;
+ fTstopf = Tstopf;
+ fAstart = Astart;
+ fAstop = Astop;
+ fMultiplicity = Samples;
+ fSumAmplitude = 0;
Int_t sign = 1;
for(Int_t i=0;i<fWing; i++) sign*=(-1);
fX = DriftPath*sign/10000.;
fZ = AnodeOffset/10000.;
}
+AliITSRawClusterSDD::AliITSRawClusterSDD( const AliITSRawClusterSDD & source)
+{
+ // copy constructor
+ fWing = source.fWing;
+ fAnode = source.fAnode;
+ fTime = source.fTime;
+ fQ = source.fQ;
+ fPeakAmplitude = source.fPeakAmplitude;
+ fPeakPosition = source.fPeakPosition;
+ fAsigma = source.fAsigma;
+ fTsigma = source.fTsigma;
+ fNanodes = source.fNanodes;
+ fTstart = source.fTstart;
+ fTstop = source.fTstop;
+ fTstartf = source.fTstartf;
+ fTstopf = source.fTstopf;
+ fAstart = source.fAstart;
+ fAstop = source.fAstop;
+ fMultiplicity = source.fMultiplicity;
+ fSumAmplitude = source.fSumAmplitude;
+ fX = source.fX;
+ fZ = source.fZ;
+}
//----------------------------------------
void AliITSRawClusterSDD::Add(AliITSRawClusterSDD* clJ) {
// add
fX = (fX*fQ + clJ->X()*clJ->Q())/(fQ+clJ->Q());
fZ = (fZ*fQ + clJ->Z()*clJ->Q())/(fQ+clJ->Q());
fQ += clJ->Q();
- fNsamples += (Int_t) (clJ->Samples());
+ if(fSumAmplitude == 0) fSumAmplitude += fPeakAmplitude;
+ /*
+ fAnode = (fAnode*fSumAmplitude+clJ->A()*clJ->PeakAmpl())/(fSumAmplitude+clJ->PeakAmpl());
+ fTime = (fTime*fSumAmplitude +clJ->T()*clJ->PeakAmpl())/(fSumAmplitude+clJ->PeakAmpl());
+ fX = (fX*fSumAmplitude +clJ->X()*clJ->PeakAmpl())/(fSumAmplitude+clJ->PeakAmpl());
+ fZ = (fZ*fSumAmplitude +clJ->Z()*clJ->PeakAmpl())/(fSumAmplitude+clJ->PeakAmpl());
+ */
+ fSumAmplitude += clJ->PeakAmpl();
+
+ fTstart = clJ->Tstart();
+ fTstop = clJ->Tstop();
+ if(fTstartf > clJ->Tstartf()) fTstartf = clJ->Tstartf();
+ if(fTstopf < clJ->Tstopf()) fTstopf = clJ->Tstopf();
+ if(fAstop < clJ->Astop()) fAstop = clJ->Astop();
+
+ fMultiplicity += (Int_t) (clJ->Samples());
(fNanodes)++;
- fMultiplicity=fNsamples;
if(clJ->PeakAmpl() > fPeakAmplitude) {
fPeakAmplitude = clJ->PeakAmpl();
fPeakPosition = clJ->PeakPos();
return;
}
+
//--------------------------------------
Bool_t AliITSRawClusterSDD::Brother(AliITSRawClusterSDD* cluster,Float_t danode,Float_t dtime) {
- // brother
- Bool_t brother = kTRUE;
- if(fWing != cluster->W()) return brother = kFALSE;
- if(TMath::Abs(fTime-cluster->T()) > dtime) return brother = kFALSE;
- if(TMath::Abs(fAnode-cluster->A()) > danode) return brother = kFALSE;
+
+ Bool_t brother = kFALSE;
+
+ Bool_t test2 = kFALSE;
+ Bool_t test3 = kFALSE;
+ Bool_t test4 = kFALSE;
+ Bool_t test5 = kFALSE;
+
+ if(fWing != cluster->W()) return brother;
+
+ if(fTstopf >= cluster->Tstart() && fTstartf <= cluster->Tstop()) test2 = kTRUE;
+ if(cluster->Astop() == (fAstop+1)) test3 = kTRUE;
+
+ if(TMath::Abs(fTime-cluster->T()) < dtime) test4 = kTRUE;
+ if(TMath::Abs(fAnode-cluster->A()) < danode) test5 = kTRUE;
+
+ if((test2 && test3) || (test4 && test5) ) {
+ return brother = kTRUE;
+ }
+
return brother;
}
void AliITSRawClusterSDD::PrintInfo() {
// print
cout << ", Anode " << fAnode << ", Time: " << fTime << ", Charge: " << fQ;
- cout << ", Samples: " << fNsamples;
- cout << ", X: " << fX << ", Z: " << fZ << endl;
+ cout << ", Samples: " << fMultiplicity;
+ cout << ", X: " << fX << ", Z: " << fZ << "tstart " << fTstart << "tstop "<< fTstop <<endl;
}
//--------------------------------------
AliITSRawClusterSDD() {
// constructor
fX=fZ=fQ=0;
- fWing=fNsamples=0;
+ fWing=0;
fNanodes=1;
fAnode=fTime=fPeakAmplitude=0;
fPeakPosition=-1;
fMultiplicity=0;
+ fTstart=fTstop=fTstartf=fTstopf=0;
+ fAstart=fAstop=0;
}
-
- AliITSRawClusterSDD(Int_t wing, Float_t Anode,Float_t Time,Float_t Charge,
- Float_t PeakAmplitude,Int_t PeakPosition,Float_t Asigma, Float_t Tsigma,Float_t DriftPath, Float_t AnodeOffset,Int_t Samples);
+
+ AliITSRawClusterSDD(Int_t wing, Float_t Anode,Float_t Time, Float_t Charge,
+ Float_t PeakAmplitude,Int_t PeakPosition, Float_t Asigma, Float_t Tsigma, Float_t DriftPath, Float_t AnodeOffset, Int_t Samples,
+ Int_t Tstart, Int_t Tstop, Int_t Tstartf, Int_t Tstopf, Int_t Anodes, Int_t Astart, Int_t Astop);
+ AliITSRawClusterSDD( const AliITSRawClusterSDD & source);
+// AliITSRawClusterSDD(Int_t wing, Float_t Anode,Float_t Time,Float_t Charge,
+// Float_t PeakAmplitude,Int_t PeakPosition,Float_t Asigma, Float_t Tsigma,Float_t DriftPath, Float_t AnodeOffset,Int_t Samples);
virtual ~AliITSRawClusterSDD() {
// destructor
}
void Add(AliITSRawClusterSDD* clJ);
Bool_t Brother(AliITSRawClusterSDD* cluster,Float_t dz,Float_t dx);
+// Bool_t Brother(AliITSRawClusterSDD* cluster);
void PrintInfo();
// Setters
void SetX(Float_t x) {fX=x;}
void SetQ(Float_t q) {fQ=q;}
void SetAnode(Float_t anode) {fAnode=anode;}
void SetTime(Float_t time) {fTime=time;}
- void SetWing(Int_t wing) {fWing=wing;}
+ void SetAsigma(Float_t asigma) {fAsigma=asigma;}
+ void SetTsigma(Float_t tsigma) {fTsigma=tsigma;}
+ void SetWing(Int_t wing) {fWing=wing;}
void SetNanodes(Int_t na) {fNanodes=na;}
- void SetNsamples(Int_t ns) {fNsamples=ns;}
+ void SetNsamples(Int_t ns) {fMultiplicity=ns;}
void SetPeakAmpl(Float_t ampl) {fPeakAmplitude=ampl;}
void SetPeakPos(Int_t pos) {fPeakPosition=pos;}
// Getters
//T
return fTime ;
}
+ Float_t Asigma() const {
+ //Asigma
+ return fAsigma ;
+ }
+ Float_t Tsigma() const {
+ //Tsigma
+ return fTsigma ;
+ }
Float_t W() const {
//W
return fWing ;
}
Int_t Samples() const {
//Samples
- return fNsamples ;
+ return fMultiplicity;
}
Float_t PeakAmpl() const {
//PeakAmpl
return fPeakAmplitude ;
}
+ Float_t SumAmpl() const {
+ //PeakAmpl
+ return fSumAmplitude ;
+ }
Int_t PeakPos() {return fPeakPosition;}
-
+
+ Int_t Tstart() const {
+ //Tstart
+ return fTstart ;
+ }
+ Int_t Tstartf() const {
+ //Tstartf
+ return fTstartf ;
+ }
+ Int_t Tstop() const {
+ //Tstop
+ return fTstop ;
+ }
+ Int_t Tstopf() const {
+ //Tstopf
+ return fTstopf ;
+ }
+ Int_t Astart() const {
+ //Astart
+ return fAstart ;
+ }
+ Int_t Astop() const {
+ //Astop
+ return fAstop ;
+ }
public:
Float_t fX; // X of cluster
Int_t fWing; // Wing number
Float_t fAnode; // Anode number
Float_t fTime; // Drift Time
+ Float_t fAsigma; //
+ Float_t fTsigma; //
Float_t fPeakAmplitude; // Peak Amplitude
+ Float_t fSumAmplitude; // Total Amplitude (for weighting)
Int_t fPeakPosition; // index of digit corresponding to peak
Int_t fNanodes; // N of anodes used for the cluster
- Int_t fNsamples; // N of samples used for the cluster
+ Int_t fTstart; // First sample in 1D cluster
+ Int_t fTstop; // Last sample in 1D cluster
+ Int_t fTstartf; // First sample in the full 2D cluster
+ Int_t fTstopf; // Last sample in the full 2D cluster
+ Int_t fAstart; // First anode in the 2D cluster
+ Int_t fAstop; // last anode in the 2D cluster
ClassDef(AliITSRawClusterSDD,1) // AliITSRawCluster class for SDD
};