X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=TRD%2FAliTRDCalibraFillHisto.cxx;h=e3ce45ac3af327efb2fb347f23db8394145e314e;hb=2de9efcc3df1d7435a201b3d3a89fe6efdae5bde;hp=558e0b0e37720cc746e32b4514b921e1dc5c6eb5;hpb=5f689709fc6811fe0b287f4ac2e3fa27cd2ce02a;p=u%2Fmrichter%2FAliRoot.git diff --git a/TRD/AliTRDCalibraFillHisto.cxx b/TRD/AliTRDCalibraFillHisto.cxx index 558e0b0e377..e3ce45ac3af 100644 --- a/TRD/AliTRDCalibraFillHisto.cxx +++ b/TRD/AliTRDCalibraFillHisto.cxx @@ -142,6 +142,7 @@ AliTRDCalibraFillHisto::AliTRDCalibraFillHisto() ,fLinearFitterOn(kFALSE) ,fLinearFitterDebugOn(kFALSE) ,fExbAltFitOn(kFALSE) + ,fScaleWithTPCSignal(kFALSE) ,fRelativeScale(0) ,fThresholdClusterPRF2(15.0) ,fLimitChargeIntegration(kFALSE) @@ -181,6 +182,7 @@ AliTRDCalibraFillHisto::AliTRDCalibraFillHisto() ,fNumberTrack(0) ,fTimeMax(0) ,fSf(10.0) + ,fRangeHistoCharge(150) ,fNumberBinCharge(50) ,fNumberBinPRF(10) ,fNgroupprf(3) @@ -232,6 +234,7 @@ AliTRDCalibraFillHisto::AliTRDCalibraFillHisto(const AliTRDCalibraFillHisto &c) ,fLinearFitterOn(c.fLinearFitterOn) ,fLinearFitterDebugOn(c.fLinearFitterDebugOn) ,fExbAltFitOn(c.fExbAltFitOn) + ,fScaleWithTPCSignal(c.fScaleWithTPCSignal) ,fRelativeScale(c.fRelativeScale) ,fThresholdClusterPRF2(c.fThresholdClusterPRF2) ,fLimitChargeIntegration(c.fLimitChargeIntegration) @@ -271,6 +274,7 @@ AliTRDCalibraFillHisto::AliTRDCalibraFillHisto(const AliTRDCalibraFillHisto &c) ,fNumberTrack(c.fNumberTrack) ,fTimeMax(c.fTimeMax) ,fSf(c.fSf) + ,fRangeHistoCharge(c.fRangeHistoCharge) ,fNumberBinCharge(c.fNumberBinCharge) ,fNumberBinPRF(c.fNumberBinPRF) ,fNgroupprf(c.fNgroupprf) @@ -685,6 +689,10 @@ Bool_t AliTRDCalibraFillHisto::UpdateHistogramsV1(const AliTRDtrackV1 *t,const A Int_t numberoftrdtracklets = t->GetNumberOfTracklets(); if(numberoftrdtracklets < fMinNbTRDtracklets) return kFALSE; + Double_t tpcsignal = 1.0; + if(esdtrack) tpcsignal = esdtrack->GetTPCsignal()/50.0; + if(fScaleWithTPCSignal && tpcsignal <0.00001) return kFALSE; + // if (!fCalibDB) { AliInfo("Could not get calibDB"); @@ -750,7 +758,15 @@ Bool_t AliTRDCalibraFillHisto::UpdateHistogramsV1(const AliTRDtrackV1 *t,const A // Add the charge if shared cluster cls = tracklet->GetClusters(jc+AliTRDseedV1::kNtb); // - chargeQ += StoreInfoCHPHtrack(cl, tracklet->GetQperTB(jc),group,row,col,cls); //tracklet->GetdQdl(jc) + //Scale with TPC signal or not + if(!fScaleWithTPCSignal) { + chargeQ += StoreInfoCHPHtrack(cl, tracklet->GetQperTB(jc),group,row,col,cls); //tracklet->GetdQdl(jc) + //printf("Do not scale now\n"); + } + else { + chargeQ += StoreInfoCHPHtrack(cl, tracklet->GetQperTB(jc)/tpcsignal,group,row,col,cls); //tracklet->GetdQdl(jc) + } + } //////////////////////////////////////// @@ -811,8 +827,8 @@ Bool_t AliTRDCalibraFillHisto::UpdateHistogramsV1(const AliTRDtrackV1 *t,const A Float_t dcaz = b[1]; Int_t tpcnbclusters = 0; if(esdtrack) tpcnbclusters = esdtrack->GetTPCclusters(0); - Double_t tpcsignal = 0.0; - if(esdtrack) tpcsignal = esdtrack->GetTPCsignal(); + Double_t ttpcsignal = 0.0; + if(esdtrack) ttpcsignal = esdtrack->GetTPCsignal(); Int_t cutvdriftlinear = 0; if(!pass) cutvdriftlinear = 1; @@ -824,7 +840,7 @@ Bool_t AliTRDCalibraFillHisto::UpdateHistogramsV1(const AliTRDtrackV1 *t,const A "dcaxy="<SetYTitle("Det/pad groups"); fCH2d->SetXTitle("charge deposit [a.u]"); fCH2d->SetZTitle("counts"); @@ -2730,7 +2746,7 @@ void AliTRDCalibraFillHisto::SetRelativeScale(Float_t RelativeScale) { // // Set the factor that will divide the deposited charge - // to fit in the histo range [0,300] + // to fit in the histo range [0,fRangeHistoCharge] // if (RelativeScale > 0.0) { @@ -2752,10 +2768,11 @@ void AliTRDCalibraFillHisto::FillCH2d(Int_t x, Float_t y) // //skip simply the value out of range - if((y>=300.0) || (y<0.0)) return; + if((y>=fRangeHistoCharge) || (y<0.0)) return; + if(fRangeHistoCharge < 0.0) return; //Calcul the y place - Int_t yplace = (Int_t) (fNumberBinCharge*y/300.0)+1; + Int_t yplace = (Int_t) (fNumberBinCharge*y/fRangeHistoCharge)+1; Int_t place = (fNumberBinCharge+2)*(x+1)+yplace; //Fill