4 #include "AliITSRawCluster.h"
6 ClassImp(AliITSRawCluster)
8 ClassImp(AliITSRawClusterSDD)
9 //--------------------------------------
10 AliITSRawClusterSDD::AliITSRawClusterSDD(Int_t wing, Float_t Anode,Float_t Time,Float_t Charge,Float_t PeakAmplitude,Float_t Asigma, Float_t Tsigma,Float_t DriftPath,Float_t AnodeOffset,Int_t Samples) {
16 fPeakAmplitude = PeakAmplitude;
21 for(i=0;i<fWing; i++) sign*=(-1);
22 fX = DriftPath*sign/10000.;
23 fZ = AnodeOffset/10000.;
26 //----------------------------------------
27 void AliITSRawClusterSDD::Add(AliITSRawClusterSDD* clJ) {
29 fAnode = (fAnode*fQ + clJ->A()*clJ->Q())/(fQ+clJ->Q());
30 fTime = (fTime*fQ + clJ->T()*clJ->Q())/(fQ+clJ->Q());
31 fX = (fX*fQ + clJ->X()*clJ->Q())/(fQ+clJ->Q());
32 fZ = (fZ*fQ + clJ->Z()*clJ->Q())/(fQ+clJ->Q());
34 fNsamples += (Int_t) (clJ->Samples());
36 if(clJ->PeakAmpl() > fPeakAmplitude) fPeakAmplitude = clJ->PeakAmpl();
40 //--------------------------------------
41 Bool_t AliITSRawClusterSDD::Brother(AliITSRawClusterSDD* cluster,Float_t danode,Float_t dtime) {
43 Bool_t brother = kTRUE;
44 if(fWing != cluster->W()) return brother = kFALSE;
45 if(TMath::Abs(fTime-cluster->T()) > dtime) return brother = kFALSE;
46 if(TMath::Abs(fAnode-cluster->A()) > danode) return brother = kFALSE;
50 //--------------------------------------
51 void AliITSRawClusterSDD::Print() {
53 cout << ", Anode " << fAnode << ", Time: " << fTime << ", Charge: " << fQ;
54 cout << ", Samples: " << fNsamples;
55 cout << ", X: " << fX << ", Z: " << fZ << endl;
57 //--------------------------------------
60 ClassImp(AliITSRawClusterSPD)
61 //--------------------------------------
63 AliITSRawClusterSPD::AliITSRawClusterSPD(Float_t clz,Float_t clx,Float_t Charge,Int_t ClusterSizeZ,Int_t ClusterSizeX,Int_t xstart,Int_t xstop,Int_t xstartf,Int_t xstopf,Float_t zstart,Float_t zstop,Int_t zend) {
80 //--------------------------------------
81 void AliITSRawClusterSPD::Add(AliITSRawClusterSPD* clJ) {
82 // Recolculate the new center of gravity coordinate and cluster sizes
83 // in both directions after grouping of clusters
85 if(this->fZStop < clJ->ZStop()) this->fZStop = clJ->ZStop();
87 this->fZ = (this->fZ + clJ->Z())/2.;
88 this->fX = (this->fX + clJ->X())/2.;
89 this->fQ = this->fQ + clJ->Q();
91 this->fXStart = clJ->XStart(); // for a comparison with the next
92 this->fXStop = clJ->XStop(); // z column
94 if(this->fXStartf > clJ->XStartf()) this->fXStartf = clJ->XStartf();
95 if(this->fXStopf < clJ->XStopf()) this->fXStopf = clJ->XStopf();
96 if(this->fZend < clJ->Zend()) this->fZend = clJ->Zend();
97 this->fNClX = this->fXStopf - this->fXStartf + 1;
103 //--------------------------------------
104 Bool_t AliITSRawClusterSPD::Brother(AliITSRawClusterSPD* cluster,Float_t dz,Float_t dx) {
105 // fXStart, fXstop and fZend information is used now instead of dz and dx
106 // to check an absent (or a present) of the gap between two pixels in
107 // both x and z directions. The increasing order of fZend is used.
109 Bool_t brother = kFALSE;
110 Bool_t test2 = kFALSE;
111 Bool_t test3 = kFALSE;
113 // Diagonal clusters are included:
114 if(fXStop >= (cluster->XStart() -1) && fXStart <= (cluster->XStop()+1)) test2 = kTRUE;
116 // Diagonal clusters are excluded:
117 // if(fXStop >= cluster->XStart() && fXStart <= cluster->XStop()) test2 = kTRUE;
118 if(cluster->Zend() == (fZend + 1)) test3 = kTRUE;
120 // cout<<"test 2,3 0k, brother = true "<<endl;
121 return brother = kTRUE;
126 //--------------------------------------
127 void AliITSRawClusterSPD::Print()
130 cout << ", Z: " << fZ << ", X: " << fX << ", Charge: " << fQ<<endl;
131 cout << " Z cluster size: " << fNClZ <<", X cluster size "<< fNClX <<endl;
132 cout <<" XStart, XStop, XStartf,XStopf,Zend ="<<fXStart<<","<<fXStop<<","<<fXStartf<<","<<fXStopf<<","<<fZend<<endl;
137 ClassImp(AliITSRawClusterSSD)
138 //--------------------------------------
139 AliITSRawClusterSSD::AliITSRawClusterSSD(Float_t Prob,Int_t Sp,Int_t Sn) {
141 //fProbability = Prob;