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;
20 for(Int_t i=0;i<fWing; i++) sign*=(-1);
21 fX = DriftPath*sign/10000.;
22 fZ = AnodeOffset/10000.;
25 //----------------------------------------
26 void AliITSRawClusterSDD::Add(AliITSRawClusterSDD* clJ) {
28 fAnode = (fAnode*fQ + clJ->A()*clJ->Q())/(fQ+clJ->Q());
29 fTime = (fTime*fQ + clJ->T()*clJ->Q())/(fQ+clJ->Q());
30 fX = (fX*fQ + clJ->X()*clJ->Q())/(fQ+clJ->Q());
31 fZ = (fZ*fQ + clJ->Z()*clJ->Q())/(fQ+clJ->Q());
33 fNsamples += (Int_t) (clJ->Samples());
35 if(clJ->PeakAmpl() > fPeakAmplitude) fPeakAmplitude = clJ->PeakAmpl();
39 //--------------------------------------
40 Bool_t AliITSRawClusterSDD::Brother(AliITSRawClusterSDD* cluster,Float_t danode,Float_t dtime) {
42 Bool_t brother = kTRUE;
43 if(fWing != cluster->W()) return brother = kFALSE;
44 if(TMath::Abs(fTime-cluster->T()) > dtime) return brother = kFALSE;
45 if(TMath::Abs(fAnode-cluster->A()) > danode) return brother = kFALSE;
49 //--------------------------------------
50 void AliITSRawClusterSDD::PrintInfo() {
52 cout << ", Anode " << fAnode << ", Time: " << fTime << ", Charge: " << fQ;
53 cout << ", Samples: " << fNsamples;
54 cout << ", X: " << fX << ", Z: " << fZ << endl;
56 //--------------------------------------
59 ClassImp(AliITSRawClusterSPD)
60 //--------------------------------------
62 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) {
79 //--------------------------------------
80 void AliITSRawClusterSPD::Add(AliITSRawClusterSPD* clJ) {
81 // Recolculate the new center of gravity coordinate and cluster sizes
82 // in both directions after grouping of clusters
84 if(this->fZStop < clJ->ZStop()) this->fZStop = clJ->ZStop();
86 this->fZ = (this->fZ + clJ->Z())/2.;
87 this->fX = (this->fX + clJ->X())/2.;
88 this->fQ = this->fQ + clJ->Q();
90 this->fXStart = clJ->XStart(); // for a comparison with the next
91 this->fXStop = clJ->XStop(); // z column
93 if(this->fXStartf > clJ->XStartf()) this->fXStartf = clJ->XStartf();
94 if(this->fXStopf < clJ->XStopf()) this->fXStopf = clJ->XStopf();
95 if(this->fZend < clJ->Zend()) this->fZend = clJ->Zend();
96 this->fNClX = this->fXStopf - this->fXStartf + 1;
102 //--------------------------------------
103 Bool_t AliITSRawClusterSPD::Brother(AliITSRawClusterSPD* cluster,Float_t dz,Float_t dx) {
104 // fXStart, fXstop and fZend information is used now instead of dz and dx
105 // to check an absent (or a present) of the gap between two pixels in
106 // both x and z directions. The increasing order of fZend is used.
108 Bool_t brother = kFALSE;
109 Bool_t test2 = kFALSE;
110 Bool_t test3 = kFALSE;
112 // Diagonal clusters are included:
113 if(fXStop >= (cluster->XStart() -1) && fXStart <= (cluster->XStop()+1)) test2 = kTRUE;
115 // Diagonal clusters are excluded:
116 // if(fXStop >= cluster->XStart() && fXStart <= cluster->XStop()) test2 = kTRUE;
117 if(cluster->Zend() == (fZend + 1)) test3 = kTRUE;
119 // cout<<"test 2,3 0k, brother = true "<<endl;
120 return brother = kTRUE;
125 //--------------------------------------
126 void AliITSRawClusterSPD::PrintInfo()
129 cout << ", Z: " << fZ << ", X: " << fX << ", Charge: " << fQ<<endl;
130 cout << " Z cluster size: " << fNClZ <<", X cluster size "<< fNClX <<endl;
131 cout <<" XStart, XStop, XStartf,XStopf,Zend ="<<fXStart<<","<<fXStop<<","<<fXStartf<<","<<fXStopf<<","<<fZend<<endl;
136 ClassImp(AliITSRawClusterSSD)
137 //--------------------------------------
138 AliITSRawClusterSSD::AliITSRawClusterSSD(Float_t Prob,Int_t Sp,Int_t Sn) {
140 //fProbability = Prob;