/**************************************************************************
- * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *
* *
* Author: The ALICE Off-line Project. *
* Contributors are mentioned in the code where appropriate. *
* provided "as is" without express or implied warranty. *
**************************************************************************/
+/* $Id$ */
#include <Riostream.h>
#include <TRandom.h>
fMapAW0(0),
fMapAW1(0),
fMapTW0(0),
-fMapTW1(0)
+fMapTW1(0),
+fDrSpeed0(0),
+fDrSpeed1(0)
{
// default constructor
SetThresholds(fgkMinValDefault,0.);
SetTemperature(fgkTemperatureDefault);
SetDataType();
- /* for(Int_t i=0;i<fgkChips*fgkChannels;i++){
- for(Int_t j=0;j<fgkMapTimeNBin;j++){
- fMapA[i][j]=0;
- fMapT[i][j]=0;
- }
- }
- */
}
//______________________________________________________________________
AliITSCalibrationSDD::AliITSCalibrationSDD(const char *dataType):
fMapAW0(0),
fMapAW1(0),
fMapTW0(0),
-fMapTW1(0){
+fMapTW1(0),
+fDrSpeed0(0),
+fDrSpeed1(0)
+{
// constructor
SetDeadChannels();
SetThresholds(fgkMinValDefault,0.);
SetTemperature(fgkTemperatureDefault);
SetDataType(dataType);
- /*for(Int_t i=0;i<fgkChips*fgkChannels;i++){
- for(Int_t j=0;j<fgkMapTimeNBin;j++){
- fMapA[i][j]=0;
- fMapT[i][j]=0;
- }
- }
- */
}
//_____________________________________________________________________
AliITSCalibrationSDD::~AliITSCalibrationSDD(){
if(fMapAW1) delete fMapAW1;
if(fMapTW0) delete fMapTW0;
if(fMapTW1) delete fMapTW1;
-
+ if(fDrSpeed0) delete fDrSpeed0;
+ if(fDrSpeed1) delete fDrSpeed1;
}
//______________________________________________________________________
fBadChannels[i]=anode;
fGain[wing][chip][channel]=0;
}
-//_____________________________________________________________________
-Bool_t AliITSCalibrationSDD::IsBadChannel(Int_t anode){
- //returns kTRUE if the anode i (0-512) has fGain=0
- if(anode<0 || anode >fgkChannels*fgkChips*fgkWings-1)AliError("Wrong anode number");
- Int_t wing=0;
- Int_t chip,channel;
- chip=anode/fgkChannels;
- channel=anode-(chip*fgkChannels);
- if(anode>=fgkChips*fgkChannels) wing=1;
- if(wing==1)chip-=fgkChips;
- if(fGain[wing][chip][channel]==0) return kTRUE;
- else return kFALSE;
-}
+//______________________________________________________________________
+Float_t AliITSCalibrationSDD::GetChannelGain(Int_t anode) const{
+ // returns gain for givenanode
+ Int_t iWing=GetWing(anode);
+ Int_t iChip=GetChip(anode);
+ Int_t iChan=GetChipChannel(anode);
+ return fGain[iWing][iChip][iChan];
+}
/*
//______________________________________________________________________
void AliITSCalibrationSDD::SetDeadChannels(Int_t nchip, Int_t nchan){
delete [] channelChip;
}
*/
+
+
//______________________________________________________________________
void AliITSCalibrationSDD::PrintGains() const{
//