/**************************************************************************
* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- * *
+ * *
* Author: The ALICE Off-line Project. *
* Contributors are mentioned in the code where appropriate. *
* *
#include "AliITSBadChannelsSSD.h"
-#include <cstring>
-
-//////////////////////////////////////////////////////
-// Author: Enrico Fragiacomo
-// Date: 23/08/2007
-// Modified: 08/07/2008
-// //
-//////////////////////////////////////////////////////
-
-//const Int_t AliITSBadChannelsSSD::fgkDefaultNModulesSSD = 1698;
-//const Int_t AliITSBadChannelsSSD::fgkDefaultNStripsSSD = 768;
ClassImp(AliITSBadChannelsSSD)
-
-//______________________________________________________________________
- AliITSBadChannelsSSD::AliITSBadChannelsSSD()
- // Default Constructor
-{
- for(Int_t i=0; i<2*fgkDefaultNModulesSSD*fgkDefaultNStripsSSD; i++)
- fBadChannels[i]=0;
- }
//______________________________________________________________________
-AliITSBadChannelsSSD::AliITSBadChannelsSSD(const AliITSBadChannelsSSD &source):
- TObject(source)
-{
- // copy Constructor
- memcpy(fBadChannels,source.fBadChannels,
- 2*fgkDefaultNModulesSSD*fgkDefaultNStripsSSD*sizeof(Char_t));
+AliITSBadChannelsSSD::AliITSBadChannelsSSD():
+fMod(0),
+fBadNChannelsList(0),
+fBadPChannelsList(0){
+ // Default Constructor
+
}
//______________________________________________________________________
AliITSBadChannelsSSD::~AliITSBadChannelsSSD(){
// destructor
-}
-//______________________________________________________________________
-AliITSBadChannelsSSD& AliITSBadChannelsSSD::operator=(const AliITSBadChannelsSSD &source) {
- // ass. op.
- if (this == &source)return *this;
- memcpy(fBadChannels,source.fBadChannels,
- 2*fgkDefaultNModulesSSD*fgkDefaultNStripsSSD*sizeof(Char_t));
-
- return *this;
}
+
#ifndef ALIITSBADCHANNELSSSD_H
#define ALIITSBADCHANNELSSSD_H
+#include "TObjArray.h"
+#include "TArrayI.h"
+
//////////////////////////////////////////////
-// Author: Enrico Fragiacomo
-// Date: 23/08/2007
-// Modified: 08/07/2008
+// Response class for SSD //
// //
//////////////////////////////////////////////
-#include "TObject.h"
-
class AliITSBadChannelsSSD : public TObject {
public:
-
AliITSBadChannelsSSD();
virtual ~AliITSBadChannelsSSD();
- AliITSBadChannelsSSD(const AliITSBadChannelsSSD &source); // copy constructor
- AliITSBadChannelsSSD& operator=(const AliITSBadChannelsSSD &source); // ass. op.
- void AddBadChannelP(Int_t module, Int_t strip, Char_t value) {
- fBadChannels[module*2*fgkDefaultNStripsSSD+strip] = value;
- }
- Char_t GetBadChannelP(Int_t module, Int_t strip) {
- return fBadChannels[module*2*fgkDefaultNStripsSSD+strip];
- }
+ void SetNBadPChannelsList(Int_t n) { fBadPChannelsList.Set(n); }
+ void AddBadPChannel(Int_t c, Int_t n) { fBadPChannelsList.AddAt(n,c);}
+ TArrayI GetBadPChannelsList() const {return fBadPChannelsList; }
+ Int_t GetBadPChannel(Int_t n) {return fBadPChannelsList.At(n); }
+ void SetNBadNChannelsList(Int_t n) { fBadNChannelsList.Set(n); }
+ void AddBadNChannel(Int_t c, Int_t n) { fBadNChannelsList.AddAt(n,c);}
+ TArrayI GetBadNChannelsList() const {return fBadNChannelsList; }
+ Int_t GetBadNChannel(Int_t n) {return fBadNChannelsList.At(n); }
+ //
- void AddBadChannelN(Int_t module, Int_t strip, Char_t value) {
- fBadChannels[module*2*fgkDefaultNStripsSSD+fgkDefaultNStripsSSD+strip] = value;
- }
- Char_t GetBadChannelN(Int_t module, Int_t strip) {
- return fBadChannels[module*2*fgkDefaultNStripsSSD+fgkDefaultNStripsSSD+strip];
- }
+ void SetMod(UShort_t mod) {fMod = mod;}
+ UShort_t GetMod() { return fMod;}
protected:
- static const Int_t fgkDefaultNModulesSSD = 1698;
- static const Int_t fgkDefaultNStripsSSD = 768;
- //static const Int_t fgkDefaultNModulesSSD; // Total numbers of SSD modules
- // static const Int_t fgkDefaultNStripsSSD; // Total numbers of SSD modules
- Char_t fBadChannels[2*fgkDefaultNModulesSSD*fgkDefaultNStripsSSD];
- // Char_t *fBadChannels;
-
+ UShort_t fMod; // module number (from 0 to 1535). Needed by the preprocessor to
+ // extract the information from the Detector Algorithm
+
+ TArrayI fBadNChannelsList; // list of P side dead channels
+ TArrayI fBadPChannelsList; // list of N side dead channels
+
private:
-
- ClassDef(AliITSBadChannelsSSD,2) // BadChannels class for SSD
- };
+ AliITSBadChannelsSSD(const AliITSBadChannelsSSD &source); // copy constructor
+ AliITSBadChannelsSSD& operator=(const AliITSBadChannelsSSD &source); // ass. op.
+ ClassDef(AliITSBadChannelsSSD,1) //Response class for SSD
+};
#endif
--- /dev/null
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Author: The ALICE Off-line Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+
+#include "AliITSBadChannelsSSDv2.h"
+#include <cstring>
+
+//////////////////////////////////////////////////////
+// Author: Enrico Fragiacomo
+// Date: 23/08/2007
+// Modified: 08/07/2008
+// //
+//////////////////////////////////////////////////////
+
+//const Int_t AliITSBadChannelsSSD::fgkDefaultNModulesSSD = 1698;
+//const Int_t AliITSBadChannelsSSD::fgkDefaultNStripsSSD = 768;
+
+ClassImp(AliITSBadChannelsSSDv2)
+
+//______________________________________________________________________
+ AliITSBadChannelsSSDv2::AliITSBadChannelsSSDv2()
+ // Default Constructor
+{
+ for(Int_t i=0; i<2*fgkDefaultNModulesSSD*fgkDefaultNStripsSSD; i++)
+ fBadChannels[i]=0;
+ }
+
+//______________________________________________________________________
+AliITSBadChannelsSSDv2::AliITSBadChannelsSSDv2(const AliITSBadChannelsSSDv2 &source):
+ TObject(source)
+{
+ // copy Constructor
+ memcpy(fBadChannels,source.fBadChannels,
+ 2*fgkDefaultNModulesSSD*fgkDefaultNStripsSSD*sizeof(Char_t));
+}
+
+//______________________________________________________________________
+AliITSBadChannelsSSDv2::~AliITSBadChannelsSSDv2(){
+ // destructor
+}
+
+//______________________________________________________________________
+AliITSBadChannelsSSDv2& AliITSBadChannelsSSDv2::operator=(const AliITSBadChannelsSSDv2 &source) {
+ // ass. op.
+ if (this == &source)return *this;
+ memcpy(fBadChannels,source.fBadChannels,
+ 2*fgkDefaultNModulesSSD*fgkDefaultNStripsSSD*sizeof(Char_t));
+
+ return *this;
+}
--- /dev/null
+#ifndef ALIITSBADCHANNELSSSDV2_H
+#define ALIITSBADCHANNELSSSDV2_H
+
+//////////////////////////////////////////////
+// Author: Enrico Fragiacomo
+// Date: 23/08/2007
+// Modified: 08/07/2008
+// //
+//////////////////////////////////////////////
+#include "TObject.h"
+
+class AliITSBadChannelsSSDv2 : public TObject {
+
+ public:
+
+ AliITSBadChannelsSSDv2();
+ virtual ~AliITSBadChannelsSSDv2();
+ AliITSBadChannelsSSDv2(const AliITSBadChannelsSSDv2 &source); // copy constructor
+ AliITSBadChannelsSSDv2& operator=(const AliITSBadChannelsSSDv2 &source); // ass. op.
+
+ void AddBadChannelP(Int_t module, Int_t strip, Char_t value) {
+ fBadChannels[module*2*fgkDefaultNStripsSSD+strip] = value;
+ }
+ Char_t GetBadChannelP(Int_t module, Int_t strip) {
+ return fBadChannels[module*2*fgkDefaultNStripsSSD+strip];
+ }
+
+ void AddBadChannelN(Int_t module, Int_t strip, Char_t value) {
+ fBadChannels[module*2*fgkDefaultNStripsSSD+fgkDefaultNStripsSSD+strip] = value;
+ }
+ Char_t GetBadChannelN(Int_t module, Int_t strip) {
+ return fBadChannels[module*2*fgkDefaultNStripsSSD+fgkDefaultNStripsSSD+strip];
+ }
+
+ protected:
+
+ static const Int_t fgkDefaultNModulesSSD = 1698;
+ static const Int_t fgkDefaultNStripsSSD = 768;
+ //static const Int_t fgkDefaultNModulesSSD; // Total numbers of SSD modules
+ // static const Int_t fgkDefaultNStripsSSD; // Total numbers of SSD modules
+ Char_t fBadChannels[2*fgkDefaultNModulesSSD*fgkDefaultNStripsSSD];
+ // Char_t *fBadChannels;
+
+ private:
+
+ ClassDef(AliITSBadChannelsSSDv2,1) // BadChannels class for SSD
+ };
+
+#endif
/* Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
#include "AliITSCalibration.h"
-#include "AliITSNoiseSSD.h"
-#include "AliITSPedestalSSD.h"
-#include "AliITSGainSSD.h"
-#include "AliITSBadChannelsSSD.h"
+#include "AliITSNoiseSSDv2.h"
+#include "AliITSPedestalSSDv2.h"
+#include "AliITSGainSSDv2.h"
+#include "AliITSBadChannelsSSDv2.h"
#include "AliITSresponseSSD.h"
#include "TArrayF.h"
#include "TArrayI.h"
Float_t GetNoiseP(Int_t n) {return fNoise->GetNoiseP(fModule,n); }
Float_t GetNoiseN(Int_t n) {return fNoise->GetNoiseN(fModule,n); }
- void SetNoise( AliITSNoiseSSD* noise) {fNoise=noise;}
+ void SetNoise( AliITSNoiseSSDv2* noise) {fNoise=noise;}
Float_t GetPedestalP(Int_t n) {return fPedestal->GetPedestalP(fModule,n); }
Float_t GetPedestalN(Int_t n) {return fPedestal->GetPedestalN(fModule,n); }
- void SetPedestal( AliITSPedestalSSD* pedestal) {fPedestal=pedestal;}
+ void SetPedestal( AliITSPedestalSSDv2* pedestal) {fPedestal=pedestal;}
Float_t GetGainP(Int_t n) {return fGain->GetGainP(fModule,n); }
Float_t GetGainN(Int_t n) {return fGain->GetGainN(fModule,n); }
void SetGainP(Int_t n, Float_t value) {fGain->AddGainP(fModule,n,value);}
void SetGainN(Int_t n, Float_t value) {fGain->AddGainN(fModule,n,value);}
- void SetGain( AliITSGainSSD* gain) {fGain=gain;}
+ void SetGain( AliITSGainSSDv2* gain) {fGain=gain;}
void SetBad() {
fIsBad = kTRUE;
Int_t ChipsPerModule() const{return fgkChipsPerModule;} // # chips/module
Int_t ChannelsPerChip() const{ return fgkChannelsPerChip;}// #channels/chip
- void SetBadChannels( AliITSBadChannelsSSD* badchannels) {
+ void SetBadChannels( AliITSBadChannelsSSDv2* badchannels) {
fBadChannels=badchannels;}
Char_t GetBadPChannel(Int_t n) {
return fBadChannels->GetBadChannelP(fModule,n); }
Int_t fNPar; // Number of detector param
Double_t *fDetPar; //[fNPar] Array of parameters
- AliITSNoiseSSD *fNoise;
- AliITSPedestalSSD *fPedestal;
- AliITSGainSSD *fGain;
- AliITSBadChannelsSSD *fBadChannels;
+ AliITSNoiseSSDv2 *fNoise;
+ AliITSPedestalSSDv2 *fPedestal;
+ AliITSGainSSDv2 *fGain;
+ AliITSBadChannelsSSDv2 *fBadChannels;
Bool_t fIsBad; // module is dead or alive ?
Bool_t fIsChipBad[fgkChipsPerModule]; // chip is dead or alive ?
AliITSCalibrationSSD(const AliITSCalibrationSSD &source); // copy constructor
AliITSCalibrationSSD& operator=(const AliITSCalibrationSSD &source); // ass. op.
- ClassDef(AliITSCalibrationSSD,3) //Response class for SSD
+ ClassDef(AliITSCalibrationSSD,4) //Response class for SSD
};
#endif
#include "AliITSDriftSpeedArraySDD.h"
#include "AliITSDriftSpeedSDD.h"
#include "AliITSCalibrationSSD.h"
+#include "AliITSNoiseSSDv2.h"
+#include "AliITSGainSSDv2.h"
+#include "AliITSBadChannelsSSDv2.h"
#include "AliITSNoiseSSD.h"
#include "AliITSGainSSD.h"
#include "AliITSBadChannelsSSD.h"
-#include "AliITSPedestalSSD.h"
#include "AliITSsegmentationSPD.h"
#include "AliITSsegmentationSDD.h"
#include "AliITSsegmentationSSD.h"
// AliCDBEntry *entrySSD = AliCDBManager::Instance()->Get("ITS/Calib/CalibSSD");
AliCDBEntry *entryNoiseSSD = AliCDBManager::Instance()->Get("ITS/Calib/NoiseSSD");
- AliCDBEntry *entryPedestalSSD = AliCDBManager::Instance()->Get("ITS/Calib/PedestalSSD");
AliCDBEntry *entryGainSSD = AliCDBManager::Instance()->Get("ITS/Calib/GainSSD");
AliCDBEntry *entryBadChannelsSSD = AliCDBManager::Instance()->Get("ITS/Calib/BadChannelsSSD");
AliCDBEntry *entry2SPD = AliCDBManager::Instance()->Get("ITS/Calib/RespSPD");
AliCDBEntry *mapTSDD = AliCDBManager::Instance()->Get("ITS/Calib/MapsTimeSDD");
if(!entrySPD || !deadSPD || !entrySDD || !entryNoiseSSD || !entryGainSSD ||
- !entryPedestalSSD || !entryBadChannelsSSD ||
+ !entryBadChannelsSSD ||
!entry2SPD || !entry2SDD || !entry2SSD || !drSpSDD || !ddlMapSDD || !mapASDD || !mapTSDD ){
AliFatal("Calibration object retrieval failed! ");
return kFALSE;
if(!cacheStatus)mapTSDD->SetObject(NULL);
mapTSDD->SetOwner(kTRUE);
- AliITSNoiseSSD *noiseSSD = (AliITSNoiseSSD *)entryNoiseSSD->GetObject();
+ TObject *emptyssd = 0; TString ssdobjectname = 0;
+ AliITSNoiseSSDv2 *noiseSSD = new AliITSNoiseSSDv2();
+ emptyssd = (TObject *)entryNoiseSSD->GetObject();
+ ssdobjectname = emptyssd->GetName();
+ if(ssdobjectname=="TObjArray") {
+ TObjArray *noiseSSDOld = (TObjArray *)entryNoiseSSD->GetObject();
+ ReadOldSSDNoise(noiseSSDOld, noiseSSD);
+ }
+ else if(ssdobjectname=="AliITSNoiseSSDv2")
+ noiseSSD = (AliITSNoiseSSDv2 *)entryNoiseSSD->GetObject();
if(!cacheStatus)entryNoiseSSD->SetObject(NULL);
entryNoiseSSD->SetOwner(kTRUE);
- AliITSPedestalSSD *pedestalSSD =
- (AliITSPedestalSSD*)entryPedestalSSD->GetObject();
- if(!cacheStatus)entryPedestalSSD->SetObject(NULL);
- entryPedestalSSD->SetOwner(kTRUE);
-
- AliITSGainSSD *gainSSD = (AliITSGainSSD *)entryGainSSD->GetObject();
+ AliITSGainSSDv2 *gainSSD = new AliITSGainSSDv2();
+ emptyssd = (TObject *)entryGainSSD->GetObject();
+ ssdobjectname = emptyssd->GetName();
+ if(ssdobjectname=="Gain") {
+ TObjArray *gainSSDOld = (TObjArray *)entryGainSSD->GetObject();
+ ReadOldSSDGain(gainSSDOld, gainSSD);
+ }
+ else if(ssdobjectname=="AliITSGainSSDv2")
+ gainSSD = (AliITSGainSSDv2 *)entryGainSSD->GetObject();
if(!cacheStatus)entryGainSSD->SetObject(NULL);
entryGainSSD->SetOwner(kTRUE);
- AliITSBadChannelsSSD *badchannelsSSD =
- (AliITSBadChannelsSSD*)entryBadChannelsSSD->GetObject();
+ AliITSBadChannelsSSDv2 *badChannelsSSD = new AliITSBadChannelsSSDv2();
+ emptyssd = (TObject *)entryBadChannelsSSD->GetObject();
+ ssdobjectname = emptyssd->GetName();
+ if(ssdobjectname=="TObjArray") {
+ TObjArray *badChannelsSSDOld = (TObjArray *)entryBadChannelsSSD->GetObject();
+ ReadOldSSDBadChannels(badChannelsSSDOld, badChannelsSSD);
+ }
+ else if(ssdobjectname=="AliITSBadChannelsSSDv2")
+ badChannelsSSD = (AliITSBadChannelsSSDv2*)entryBadChannelsSSD->GetObject();
if(!cacheStatus)entryBadChannelsSSD->SetObject(NULL);
entryBadChannelsSSD->SetOwner(kTRUE);
delete deadSPD;
delete entrySDD;
delete entryNoiseSSD;
- delete entryPedestalSSD;
delete entryGainSSD;
delete entryBadChannelsSSD;
delete entry2SPD;
}
if ((!pSPD)||(!pSDD)||(!pSSD) || (!calSPD) || (!caldeadSPD) ||(!calSDD) || (!drSp) || (!ddlsdd)
- || (!mapAn) || (!mapT) || (!noiseSSD)|| (!gainSSD)|| (!badchannelsSSD)) {
+ || (!mapAn) || (!mapT) || (!noiseSSD)|| (!gainSSD)|| (!badChannelsSSD)) {
AliWarning("Can not get calibration from calibration database !");
return kFALSE;
}
fSSDCalibration->SetResponse((AliITSresponse*)pSSD);
fSSDCalibration->SetNoise(noiseSSD);
- fSSDCalibration->SetPedestal(pedestalSSD);
fSSDCalibration->SetGain(gainSSD);
- fSSDCalibration->SetBadChannels(badchannelsSSD);
+ fSSDCalibration->SetBadChannels(badChannelsSSD);
//fSSDCalibration->FillBadChipMap();
}
+//______________________________________________________________________
+void AliITSDetTypeRec::ReadOldSSDNoise(TObjArray *array,
+ AliITSNoiseSSDv2 *noiseSSD) {
+ //Reads the old SSD calibration object and converts it to the new format
+ const Int_t fgkSSDSTRIPSPERMODULE = 1536;
+ const Int_t fgkSSDPSIDESTRIPSPERMODULE = 768;
+
+ Int_t fNMod = array->GetEntries();
+ cout<<"Converting old calibration object for noise..."<<endl;
+
+ //NOISE
+ Double_t noise = 0.0;
+ for (Int_t iModule = 0; iModule < fNMod; iModule++) {
+ AliITSNoiseSSD *noiseModule = (AliITSNoiseSSD*) (array->At(iModule));
+ for(Int_t iStrip = 0; iStrip < fgkSSDSTRIPSPERMODULE; iStrip++) {
+ noise = (iStrip < fgkSSDPSIDESTRIPSPERMODULE) ? noiseModule->GetNoiseP(iStrip) : noiseModule->GetNoiseN(1535 - iStrip);
+ if(iStrip < fgkSSDPSIDESTRIPSPERMODULE)
+ noiseSSD->AddNoiseP(iModule,iStrip,noise);
+ if(iStrip >= fgkSSDPSIDESTRIPSPERMODULE)
+ noiseSSD->AddNoiseN(iModule,1535 - iStrip,noise);
+ }//loop over strips
+ }//loop over modules
+}
+
+//______________________________________________________________________
+void AliITSDetTypeRec::ReadOldSSDBadChannels(TObjArray *array,
+ AliITSBadChannelsSSDv2 *badChannelsSSD) {
+ //Reads the old SSD calibration object and converts it to the new format
+ Int_t fNMod = array->GetEntries();
+ cout<<"Converting old calibration object for bad channels..."<<endl;
+ for (Int_t iModule = 0; iModule < fNMod; iModule++) {
+ //for (Int_t iModule = 0; iModule < 1; iModule++) {
+ AliITSBadChannelsSSD *bad = (AliITSBadChannelsSSD*) (array->At(iModule));
+ TArrayI arrayPSide = bad->GetBadPChannelsList();
+ for(Int_t iPCounter = 0; iPCounter < arrayPSide.GetSize(); iPCounter++)
+ badChannelsSSD->AddBadChannelP(iModule,
+ iPCounter,
+ (Char_t)arrayPSide.At(iPCounter));
+
+ TArrayI arrayNSide = bad->GetBadNChannelsList();
+ for(Int_t iNCounter = 0; iNCounter < arrayNSide.GetSize(); iNCounter++)
+ badChannelsSSD->AddBadChannelN(iModule,
+ iNCounter,
+ (Char_t)arrayNSide.At(iNCounter));
+
+ }//loop over modules
+}
+
+//______________________________________________________________________
+void AliITSDetTypeRec::ReadOldSSDGain(TObjArray *array,
+ AliITSGainSSDv2 *gainSSD) {
+ //Reads the old SSD calibration object and converts it to the new format
+
+ Int_t fNMod = array->GetEntries();
+ cout<<"Converting old calibration object for gain..."<<endl;
+
+ //GAIN
+ for (Int_t iModule = 0; iModule < fNMod; iModule++) {
+ AliITSGainSSD *gainModule = (AliITSGainSSD*) (array->At(iModule));
+ TArrayF arrayPSide = gainModule->GetGainP();
+ for(Int_t iPCounter = 0; iPCounter < arrayPSide.GetSize(); iPCounter++)
+ gainSSD->AddGainP(iModule,
+ iPCounter,
+ arrayPSide.At(iPCounter));
+ TArrayF arrayNSide = gainModule->GetGainN();
+ for(Int_t iNCounter = 0; iNCounter < arrayNSide.GetSize(); iNCounter++)
+ gainSSD->AddGainN(iModule,
+ iNCounter,
+ arrayNSide.At(iNCounter));
+ }//loop over modules
+}
+
class AliITSRawCluster;
class AliITSRecPoint;
class AliRawReader;
-
+class AliITSGainSSDv2;
+class AliITSBadChannelsSSDv2;
+class AliITSNoiseSSDv2;
class AliITSDetTypeRec : public TObject {
public:
AliITSDetTypeRec(const AliITSDetTypeRec& rec);
AliITSDetTypeRec& operator=(const AliITSDetTypeRec &source);
+ //conversion of the old SSD calibration objects tothe new ones
+ void ReadOldSSDNoise(TObjArray *array,
+ AliITSNoiseSSDv2 *noiseSSD);
+ void ReadOldSSDBadChannels(TObjArray *array,
+ AliITSBadChannelsSSDv2 *badChannelsSSD);
+ void ReadOldSSDGain(TObjArray *array,
+ AliITSGainSSDv2 *gainSSD);
+
// virtual void SetLoader(AliITSLoader* loader) {fLoader=loader;}
static const Int_t fgkNdettypes; // number of det. types
static const Int_t fgkDefaultNModulesSPD; // Total numbers of SPD modules by default
#include "AliITSDriftSpeedArraySDD.h"
#include "AliITSDriftSpeedSDD.h"
#include "AliITSCalibrationSSD.h"
+#include "AliITSNoiseSSDv2.h"
+#include "AliITSGainSSDv2.h"
+#include "AliITSBadChannelsSSDv2.h"
#include "AliITSNoiseSSD.h"
#include "AliITSGainSSD.h"
#include "AliITSBadChannelsSSD.h"
entrySSD->SetOwner(kTRUE);
*/
- AliITSNoiseSSD *noiseSSD = (AliITSNoiseSSD *)entryNoiseSSD->GetObject();
+ TObject *emptyssd = 0; TString ssdobjectname = 0;
+ AliITSNoiseSSDv2 *noiseSSD = new AliITSNoiseSSDv2();
+ emptyssd = (TObject *)entryNoiseSSD->GetObject();
+ ssdobjectname = emptyssd->GetName();
+ if(ssdobjectname=="TObjArray") {
+ TObjArray *noiseSSDOld = (TObjArray *)entryNoiseSSD->GetObject();
+ ReadOldSSDNoise(noiseSSDOld, noiseSSD);
+ }
+ else if(ssdobjectname=="AliITSNoiseSSDv2")
+ noiseSSD = (AliITSNoiseSSDv2 *)entryNoiseSSD->GetObject();
if(!isCacheActive)entryNoiseSSD->SetObject(NULL);
entryNoiseSSD->SetOwner(kTRUE);
- AliITSGainSSD *gainSSD = (AliITSGainSSD *)entryGainSSD->GetObject();
+ AliITSGainSSDv2 *gainSSD = new AliITSGainSSDv2();
+ emptyssd = (TObject *)entryGainSSD->GetObject();
+ ssdobjectname = emptyssd->GetName();
+ if(ssdobjectname=="Gain") {
+ TObjArray *gainSSDOld = (TObjArray *)entryGainSSD->GetObject();
+ ReadOldSSDGain(gainSSDOld, gainSSD);
+ }
+ else if(ssdobjectname=="AliITSGainSSDv2")
+ gainSSD = (AliITSGainSSDv2 *)entryGainSSD->GetObject();
if(!isCacheActive)entryGainSSD->SetObject(NULL);
entryGainSSD->SetOwner(kTRUE);
- AliITSBadChannelsSSD *badchannelsSSD =
- (AliITSBadChannelsSSD *)entryBadChannelsSSD->GetObject();
+ AliITSBadChannelsSSDv2 *badChannelsSSD = new AliITSBadChannelsSSDv2();
+ emptyssd = (TObject *)entryBadChannelsSSD->GetObject();
+ ssdobjectname = emptyssd->GetName();
+ if(ssdobjectname=="TObjArray") {
+ TObjArray *badChannelsSSDOld = (TObjArray *)entryBadChannelsSSD->GetObject();
+ ReadOldSSDBadChannels(badChannelsSSDOld, badChannelsSSD);
+ }
+ else if(ssdobjectname=="AliITSBadChannelsSSDv2")
+ badChannelsSSD = (AliITSBadChannelsSSDv2*)entryBadChannelsSSD->GetObject();
if(!isCacheActive)entryBadChannelsSSD->SetObject(NULL);
entryBadChannelsSSD->SetOwner(kTRUE);
+ /*AliITSNoiseSSDv2 *noiseSSD = (AliITSNoiseSSDv2 *)entryNoiseSSD->GetObject();
+ if(!isCacheActive)entryNoiseSSD->SetObject(NULL);
+ entryNoiseSSD->SetOwner(kTRUE);
+
+ AliITSGainSSDv2 *gainSSD = (AliITSGainSSDv2 *)entryGainSSD->GetObject();
+ if(!isCacheActive)entryGainSSD->SetObject(NULL);
+ entryGainSSD->SetOwner(kTRUE);
+
+ AliITSBadChannelsSSDv2 *badchannelsSSD =
+ (AliITSBadChannelsSSDv2 *)entryBadChannelsSSD->GetObject();
+ if(!isCacheActive)entryBadChannelsSSD->SetObject(NULL);
+ entryBadChannelsSSD->SetOwner(kTRUE);*/
+
AliITSresponseSSD *pSSD = (AliITSresponseSSD*)entry2SSD->GetObject();
if(!isCacheActive)entry2SSD->SetObject(NULL);
entry2SSD->SetOwner(kTRUE);
AliCDBManager::Instance()->SetCacheFlag(origCacheStatus);
if ((!pSPD)||(!pSSD) || (!calSPD) || (!calSDD) || (!drSp) || (!ddlsdd)
- || (!mapAn) || (!mapT) || (!noiseSSD)|| (!gainSSD)|| (!badchannelsSSD)) {
+ || (!mapAn) || (!mapT) || (!noiseSSD)|| (!gainSSD)|| (!badChannelsSSD)) {
AliWarning("Can not get calibration from calibration database !");
return kFALSE;
}
fSSDCalibration->SetResponse((AliITSresponse*)pSSD);
fSSDCalibration->SetNoise(noiseSSD);
fSSDCalibration->SetGain(gainSSD);
- fSSDCalibration->SetBadChannels(badchannelsSSD);
+ fSSDCalibration->SetBadChannels(badChannelsSSD);
//fSSDCalibration->FillBadChipMap();
AliCDBManager::Instance()->Put(&respSSD, idRespSSD, &md);
}
+//______________________________________________________________________
+void AliITSDetTypeSim::ReadOldSSDNoise(TObjArray *array,
+ AliITSNoiseSSDv2 *noiseSSD) {
+ //Reads the old SSD calibration object and converts it to the new format
+ const Int_t fgkSSDSTRIPSPERMODULE = 1536;
+ const Int_t fgkSSDPSIDESTRIPSPERMODULE = 768;
+
+ Int_t fNMod = array->GetEntries();
+ cout<<"Converting old calibration object for noise..."<<endl;
+
+ //NOISE
+ Double_t noise = 0.0;
+ for (Int_t iModule = 0; iModule < fNMod; iModule++) {
+ AliITSNoiseSSD *noiseModule = (AliITSNoiseSSD*) (array->At(iModule));
+ for(Int_t iStrip = 0; iStrip < fgkSSDSTRIPSPERMODULE; iStrip++) {
+ noise = (iStrip < fgkSSDPSIDESTRIPSPERMODULE) ? noiseModule->GetNoiseP(iStrip) : noiseModule->GetNoiseN(1535 - iStrip);
+ if(iStrip < fgkSSDPSIDESTRIPSPERMODULE)
+ noiseSSD->AddNoiseP(iModule,iStrip,noise);
+ if(iStrip >= fgkSSDPSIDESTRIPSPERMODULE)
+ noiseSSD->AddNoiseN(iModule,1535 - iStrip,noise);
+ }//loop over strips
+ }//loop over modules
+}
+
+//______________________________________________________________________
+void AliITSDetTypeSim::ReadOldSSDBadChannels(TObjArray *array,
+ AliITSBadChannelsSSDv2 *badChannelsSSD) {
+ //Reads the old SSD calibration object and converts it to the new format
+ Int_t fNMod = array->GetEntries();
+ cout<<"Converting old calibration object for bad channels..."<<endl;
+ for (Int_t iModule = 0; iModule < fNMod; iModule++) {
+ //for (Int_t iModule = 0; iModule < 1; iModule++) {
+ AliITSBadChannelsSSD *bad = (AliITSBadChannelsSSD*) (array->At(iModule));
+ TArrayI arrayPSide = bad->GetBadPChannelsList();
+ for(Int_t iPCounter = 0; iPCounter < arrayPSide.GetSize(); iPCounter++)
+ badChannelsSSD->AddBadChannelP(iModule,
+ iPCounter,
+ (Char_t)arrayPSide.At(iPCounter));
+
+ TArrayI arrayNSide = bad->GetBadNChannelsList();
+ for(Int_t iNCounter = 0; iNCounter < arrayNSide.GetSize(); iNCounter++)
+ badChannelsSSD->AddBadChannelN(iModule,
+ iNCounter,
+ (Char_t)arrayNSide.At(iNCounter));
+
+ }//loop over modules
+}
+
+//______________________________________________________________________
+void AliITSDetTypeSim::ReadOldSSDGain(TObjArray *array,
+ AliITSGainSSDv2 *gainSSD) {
+ //Reads the old SSD calibration object and converts it to the new format
+
+ Int_t fNMod = array->GetEntries();
+ cout<<"Converting old calibration object for gain..."<<endl;
+
+ //GAIN
+ for (Int_t iModule = 0; iModule < fNMod; iModule++) {
+ AliITSGainSSD *gainModule = (AliITSGainSSD*) (array->At(iModule));
+ TArrayF arrayPSide = gainModule->GetGainP();
+ for(Int_t iPCounter = 0; iPCounter < arrayPSide.GetSize(); iPCounter++)
+ gainSSD->AddGainP(iModule,
+ iPCounter,
+ arrayPSide.At(iPCounter));
+ TArrayF arrayNSide = gainModule->GetGainN();
+ for(Int_t iNCounter = 0; iNCounter < arrayNSide.GetSize(); iNCounter++)
+ gainSSD->AddGainN(iModule,
+ iNCounter,
+ arrayNSide.At(iNCounter));
+ }//loop over modules
+}
class AliITSsegmentation;
class AliITSresponse;
class AliITSCalibrationSSD;
+class AliITSGainSSDv2;
+class AliITSBadChannelsSSDv2;
+class AliITSNoiseSSDv2;
class AliITSDetTypeSim : public TObject {
public:
private:
void SetDefaultSegmentation(Int_t idet); // creates def segm.
+
+ //conversion of the old SSD calibration objects tothe new ones
+ void ReadOldSSDNoise(TObjArray *array,
+ AliITSNoiseSSDv2 *noiseSSD);
+ void ReadOldSSDBadChannels(TObjArray *array,
+ AliITSBadChannelsSSDv2 *badChannelsSSD);
+ void ReadOldSSDGain(TObjArray *array,
+ AliITSGainSSDv2 *gainSSD);
+
static const Int_t fgkNdettypes; // number of different det. types
static const Int_t fgkDefaultNModulesSPD; // Total numbers of SPD modules by default
static const Int_t fgkDefaultNModulesSDD; // Total numbers of SDD modules by default
#include "AliITSGainSSD.h"
-#include <cstring>
//////////////////////////////////////////////////////
// Author: Enrico Fragiacomo
// Date: 23/08/2007
-// Modified: 08/07/2008
// //
//////////////////////////////////////////////////////
-//const Int_t AliITSGainSSD::fgkDefaultNModulesSSD = 1698;
-//const Int_t AliITSGainSSD::fgkDefaultNStripsSSD = 768;
-
ClassImp(AliITSGainSSD)
-
-//______________________________________________________________________
- AliITSGainSSD::AliITSGainSSD()
-{
- // Default Constructor
- for(Int_t i=0; i<2*fgkDefaultNModulesSSD*fgkDefaultNStripsSSD; i++)
- fGain[i]=0;
-}
//______________________________________________________________________
-AliITSGainSSD::AliITSGainSSD(const AliITSGainSSD &source):
- TObject(source)
-{
- // copy Constructor
- memcpy(fGain,source.fGain,
- 2*fgkDefaultNModulesSSD*fgkDefaultNStripsSSD*sizeof(UShort_t));
+AliITSGainSSD::AliITSGainSSD():
+fMod(0),
+fGainP(0),
+fGainN(0) {
+ // Default Constructor
}
//______________________________________________________________________
}
-//______________________________________________________________________
-AliITSGainSSD& AliITSGainSSD::operator=(const AliITSGainSSD &source) {
- // ass. op.
- if (this == &source)return *this;
-
- memcpy(fGain,source.fGain,
- 2*fgkDefaultNModulesSSD*fgkDefaultNStripsSSD*sizeof(UShort_t));
-
- return *this;
-}
#ifndef ALIITSGAINSSD_H
#define ALIITSGAINSSD_H
+#include "TObjArray.h"
+#include "TArrayF.h"
+
//////////////////////////////////////////////
// Author: Enrico Fragiacomo
// Date: 23/08/2007
-// Modified: 08/07/2008
// //
//////////////////////////////////////////////
-#include "TObject.h"
-
class AliITSGainSSD : public TObject {
public:
AliITSGainSSD();
virtual ~AliITSGainSSD();
+
+ void SetNGainP(Int_t n) { fGainP.Set(n); }
+ void AddGainP(Int_t c, Float_t n) { fGainP.AddAt(n,c);}
+ TArrayF GetGainP() const {return fGainP; }
+ Float_t GetGainP(Int_t n) {return fGainP.At(n); }
+ void SetNGainN(Int_t n) { fGainN.Set(n); }
+ void AddGainN(Int_t c, Float_t n) { fGainN.AddAt(n,c);}
+ TArrayF GetGainN() const {return fGainN; }
+ Float_t GetGainN(Int_t n) {return fGainN.At(n); }
+
+ void SetMod(UShort_t mod) {fMod = mod;}
+ UShort_t GetMod() { return fMod;}
+
+protected:
+
+ UShort_t fMod; // module number (from 0 to 1535). Needed by the preprocessor to
+ // extract the information from the Detector Algorithm
+
+ TArrayF fGainP; // Gain for P side channels
+ TArrayF fGainN; // Gain for N side channels
+
+ private:
AliITSGainSSD(const AliITSGainSSD &source); // copy constructor
AliITSGainSSD& operator=(const AliITSGainSSD &source); // ass. op.
- void AddGainP(Int_t module, Int_t strip, Float_t value) {
- fGain[module*2*fgkDefaultNStripsSSD+strip] = (UShort_t) (1000.*value);
- }
- Float_t GetGainP(Int_t module, Int_t strip) {
- return ((Float_t) ( (Float_t) fGain[module*2*fgkDefaultNStripsSSD+strip] ) /1000.);
- }
-
- void AddGainN(Int_t module, Int_t strip, Float_t value) {
- fGain[module*2*fgkDefaultNStripsSSD+fgkDefaultNStripsSSD+strip] =
- (UShort_t) (1000.*value);
- }
- Float_t GetGainN(Int_t module, Int_t strip) {
- return ( (Float_t) ((Float_t) fGain[module*2*fgkDefaultNStripsSSD+fgkDefaultNStripsSSD+strip])/1000.);
- }
-
- protected:
-
- static const Int_t fgkDefaultNModulesSSD = 1698;
- static const Int_t fgkDefaultNStripsSSD = 768;
-
- //static const Int_t fgkDefaultNModulesSSD; // Total numbers of SSD modules
- //static const Int_t fgkDefaultNStripsSSD; // Total numbers of SSD modules
-
- UShort_t fGain[2*fgkDefaultNModulesSSD*fgkDefaultNStripsSSD];
- // UShort_t *fGain;
-
- private:
-
- ClassDef(AliITSGainSSD,2) // Gain class for SSD
- };
+ ClassDef(AliITSGainSSD,1) //Response class for SSD
+};
#endif
--- /dev/null
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Author: The ALICE Off-line Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+
+#include "AliITSGainSSDv2.h"
+#include <cstring>
+
+//////////////////////////////////////////////////////
+// Author: Enrico Fragiacomo
+// Date: 23/08/2007
+// Modified: 08/07/2008
+// //
+//////////////////////////////////////////////////////
+
+//const Int_t AliITSGainSSD::fgkDefaultNModulesSSD = 1698;
+//const Int_t AliITSGainSSD::fgkDefaultNStripsSSD = 768;
+
+ClassImp(AliITSGainSSDv2)
+
+//______________________________________________________________________
+ AliITSGainSSDv2::AliITSGainSSDv2()
+{
+ // Default Constructor
+ for(Int_t i=0; i<2*fgkDefaultNModulesSSD*fgkDefaultNStripsSSD; i++)
+ fGain[i]=0;
+}
+
+//______________________________________________________________________
+AliITSGainSSDv2::AliITSGainSSDv2(const AliITSGainSSDv2 &source):
+ TObject(source)
+{
+ // copy Constructor
+ memcpy(fGain,source.fGain,
+ 2*fgkDefaultNModulesSSD*fgkDefaultNStripsSSD*sizeof(UShort_t));
+}
+
+//______________________________________________________________________
+AliITSGainSSDv2::~AliITSGainSSDv2(){
+ // destructor
+
+}
+
+//______________________________________________________________________
+AliITSGainSSDv2& AliITSGainSSDv2::operator=(const AliITSGainSSDv2 &source) {
+ // ass. op.
+ if (this == &source)return *this;
+
+ memcpy(fGain,source.fGain,
+ 2*fgkDefaultNModulesSSD*fgkDefaultNStripsSSD*sizeof(UShort_t));
+
+ return *this;
+}
--- /dev/null
+#ifndef ALIITSGAINSSDV2_H
+#define ALIITSGAINSSDV2_H
+
+//////////////////////////////////////////////
+// Author: Enrico Fragiacomo
+// Date: 23/08/2007
+// Modified: 08/07/2008
+// //
+//////////////////////////////////////////////
+#include "TObject.h"
+
+class AliITSGainSSDv2 : public TObject {
+
+ public:
+
+ AliITSGainSSDv2();
+ virtual ~AliITSGainSSDv2();
+ AliITSGainSSDv2(const AliITSGainSSDv2 &source); // copy constructor
+ AliITSGainSSDv2& operator=(const AliITSGainSSDv2 &source); // ass. op.
+
+ void AddGainP(Int_t module, Int_t strip, Float_t value) {
+ fGain[module*2*fgkDefaultNStripsSSD+strip] = (UShort_t) (1000.*value);
+ }
+ Float_t GetGainP(Int_t module, Int_t strip) {
+ return ((Float_t) ( (Float_t) fGain[module*2*fgkDefaultNStripsSSD+strip] ) /1000.);
+ }
+
+ void AddGainN(Int_t module, Int_t strip, Float_t value) {
+ fGain[module*2*fgkDefaultNStripsSSD+fgkDefaultNStripsSSD+strip] =
+ (UShort_t) (1000.*value);
+ }
+ Float_t GetGainN(Int_t module, Int_t strip) {
+ return ( (Float_t) ((Float_t) fGain[module*2*fgkDefaultNStripsSSD+fgkDefaultNStripsSSD+strip])/1000.);
+ }
+
+ protected:
+
+ static const Int_t fgkDefaultNModulesSSD = 1698;
+ static const Int_t fgkDefaultNStripsSSD = 768;
+
+ //static const Int_t fgkDefaultNModulesSSD; // Total numbers of SSD modules
+ //static const Int_t fgkDefaultNStripsSSD; // Total numbers of SSD modules
+
+ UShort_t fGain[2*fgkDefaultNModulesSSD*fgkDefaultNStripsSSD];
+ // UShort_t *fGain;
+
+ private:
+
+ ClassDef(AliITSGainSSDv2,1) // Gain class for SSD
+ };
+#endif
#include "TFile.h"
#include "TString.h"
#include "AliLog.h"
-#include "AliITSNoiseSSD.h"
-#include "AliITSPedestalSSD.h"
-#include "AliITSBadChannelsSSD.h"
+#include "AliITSNoiseSSDv2.h"
+#include "AliITSPedestalSSDv2.h"
+#include "AliITSBadChannelsSSDv2.h"
#include "AliITSRawStreamSSD.h"
#include "AliRawReaderDate.h"
#include "AliITSRawStreamSSD.h"
AliWarning(Form("Error reading file %s with Static Bad Channels Map!", filename));
return kFALSE;
}
- bcfile->GetObject("AliITSBadChannelsSSD;1", fBadChannelsList);
+ bcfile->GetObject("AliITSBadChannelsSSDv2;1", fBadChannelsList);
if (!fBadChannelsList) {
AliWarning("Error fBadChannelsList == NULL!");
bcfile->Close();
//______________________________________________________________________________
-AliITSNoiseSSD* AliITSHandleDaSSD::GetCalibrationOCDBNoise() const
+AliITSNoiseSSDv2* AliITSHandleDaSSD::GetCalibrationOCDBNoise() const
{
// Fill in the array for OCDB
- AliITSNoiseSSD *ldcn = NULL;
+ AliITSNoiseSSDv2 *ldcn = NULL;
AliITSModuleDaSSD *module = NULL;
AliITSChannelDaSSD *strip = NULL;
if (!fModules) return NULL;
- ldcn = new AliITSNoiseSSD;
+ ldcn = new AliITSNoiseSSDv2;
if (!ldcn) {
- AliError("Error allocation mamory for AliITSBadChannelsSSD object, return NULL!");
+ AliError("Error allocation mamory for AliITSBadChannelsSSDv2 object, return NULL!");
return NULL;
}
for (Int_t i = 0; i < fNumberOfModules; i++) {
//______________________________________________________________________________
-AliITSBadChannelsSSD* AliITSHandleDaSSD::GetCalibrationBadChannels() const
+AliITSBadChannelsSSDv2* AliITSHandleDaSSD::GetCalibrationBadChannels() const
{
// Fill in the TObjArray with the list of bad channels
- AliITSBadChannelsSSD *ldcbc = NULL;
+ AliITSBadChannelsSSDv2 *ldcbc = NULL;
AliITSModuleDaSSD *module = NULL;
AliITSChannelDaSSD *strip = NULL;
if (!fModules) return NULL;
- ldcbc = new AliITSBadChannelsSSD;
+ ldcbc = new AliITSBadChannelsSSDv2;
if (!ldcbc) {
- AliError("Error allocation mamory for AliITSBadChannelsSSD object, return NULL!");
+ AliError("Error allocation mamory for AliITSBadChannelsSSDv2 object, return NULL!");
return NULL;
}
for (Int_t i = 0; i < fNumberOfModules; i++) {
Bool_t AliITSHandleDaSSD::SaveCalibrationSSDLDC(Char_t*& dafname)
{
// Save Calibration data locally
- AliITSBadChannelsSSD *ldcbc = NULL;
- AliITSPedestalSSD *ldcp = NULL;
- AliITSNoiseSSD *ldcn = NULL;
+ AliITSBadChannelsSSDv2 *ldcbc = NULL;
+ AliITSPedestalSSDv2 *ldcp = NULL;
+ AliITSNoiseSSDv2 *ldcn = NULL;
AliITSModuleDaSSD *module = NULL;
AliITSChannelDaSSD *strip = NULL;
Char_t *tmpfname;
TString dadatafilename("");
if (!fModules) return kFALSE;
- ldcn = new AliITSNoiseSSD;
- ldcp = new AliITSPedestalSSD;
- ldcbc = new AliITSBadChannelsSSD;
+ ldcn = new AliITSNoiseSSDv2;
+ ldcp = new AliITSPedestalSSDv2;
+ ldcbc = new AliITSBadChannelsSSDv2;
if ((!ldcn) || (!ldcp) || (!ldcp)) {
AliError("Error allocation mamory for calibration objects, return kFALSE!");
return kFALSE;
//______________________________________________________________________________
-Int_t AliITSHandleDaSSD::MergeBadChannels(AliITSBadChannelsSSD*& bcl) const
+Int_t AliITSHandleDaSSD::MergeBadChannels(AliITSBadChannelsSSDv2*& bcl) const
{
// Merges the statick bad channels list with bad channels got upon calibration
AliITSModuleDaSSD *module = 0;
#include "TObject.h"
#include "TArrayS.h"
#include "AliITSModuleDaSSD.h"
+#include "AliITSBadChannelsSSDv2.h"
+#include "AliITSNoiseSSDv2.h"
///////////////////////////////////////////////////////////////////////////////
///
{if ((fModules) && (index < fNumberOfModules)) return fModules[index]; else return NULL;}
Int_t GetModuleIndex (const UChar_t ddlID, const UChar_t ad, const UChar_t adc) const;
AliITSChannelDaSSD* GetStrip (const UChar_t ddlID, const UChar_t ad, const UChar_t adc, const UShort_t stripID) const;
- AliITSNoiseSSD* GetCalibrationOCDBNoise() const;
- AliITSBadChannelsSSD* GetCalibrationBadChannels() const;
+ AliITSNoiseSSDv2* GetCalibrationOCDBNoise() const;
+ AliITSBadChannelsSSDv2* GetCalibrationBadChannels() const;
Bool_t SaveCalibrationSSDLDC(Char_t*& dafname);
- Int_t MergeBadChannels(AliITSBadChannelsSSD*& bcl) const;
+ Int_t MergeBadChannels(AliITSBadChannelsSSDv2*& bcl) const;
void SetModIndProcessed(Int_t mi) {fModIndProcessed = mi;}
void SetModIndRead (Int_t mr) {fModIndRead = mr;}
TArrayS fEqIndex; //! index array of equipmnts (DDLs).
Long_t fNumberOfEvents; // Number of physics or calibration events in raw data file fRawDataFileName
- AliITSBadChannelsSSD *fBadChannelsList; //! List of bad channels: static or created on base of calculated noise and pedestal
+ AliITSBadChannelsSSDv2 *fBadChannelsList; //! List of bad channels: static or created on base of calculated noise and pedestal
Int_t *fDDLModuleMap; //! DDL map
TArrayS fALaddersOff; //! Lisst of ladders of side A that are off and should be suppressed
TArrayS fCLaddersOff; //! Lisst of ladders of side C that are off and should be suppressed
(signal <= AliITSChannelDaSSD::GetUnderflowConst())); }
string ConvBase(const unsigned long value, const long base) const;
- ClassDef(AliITSHandleDaSSD, 6)
+ ClassDef(AliITSHandleDaSSD, 7)
};
#include "AliITSNoiseSSD.h"
-#include <cstring>
//////////////////////////////////////////////////////
// Author: Enrico Fragiacomo
// Date: 23/08/2007
-// Modified: 08/07/2008
// //
//////////////////////////////////////////////////////
-//const Int_t AliITSNoiseSSD::fgkDefaultNModulesSSD = 1698;
-//const Int_t AliITSNoiseSSD::fgkDefaultNStripsSSD = 768;
-
ClassImp(AliITSNoiseSSD)
-
+
//______________________________________________________________________
- AliITSNoiseSSD::AliITSNoiseSSD() {
- // Default Constructor
- for(Int_t i=0; i<2*fgkDefaultNModulesSSD*fgkDefaultNStripsSSD; i++)
- fNois[i]=0;
+AliITSNoiseSSD::AliITSNoiseSSD():
+fMod(0),
+fNoisP(0),
+fNoisN(0) {
+ // Default Constructor
}
//______________________________________________________________________
-AliITSNoiseSSD::AliITSNoiseSSD(const AliITSNoiseSSD &source):
- TObject(source)
-{
+AliITSNoiseSSD::AliITSNoiseSSD(const AliITSNoiseSSD &source): TObject(source),
+fMod(source.fMod),
+fNoisP(source.fNoisP),
+fNoisN(source.fNoisN) {
// copy Constructor
- memcpy(fNois,source.fNois,
- 2*fgkDefaultNModulesSSD*fgkDefaultNStripsSSD*sizeof(Float_t));
}
-
//______________________________________________________________________
AliITSNoiseSSD::~AliITSNoiseSSD(){
// destructor
// ass. op.
if (this == &source)
return *this;
-
- memcpy(fNois,source.fNois,
- 2*fgkDefaultNModulesSSD*fgkDefaultNStripsSSD*sizeof(Float_t));
-
+ fMod = source.fMod;
+ fNoisP = source.fMod;
+ fNoisN = source.fMod;
return *this;
}
#ifndef ALIITSNOISESSD_H
#define ALIITSNOISESSD_H
+#include "TObjArray.h"
+#include "TArrayF.h"
+
//////////////////////////////////////////////
// Author: Enrico Fragiacomo
// Date: 23/08/2007
-// Modified: 08/07/2008
// //
//////////////////////////////////////////////
-#include "TObject.h"
-
class AliITSNoiseSSD : public TObject {
public:
AliITSNoiseSSD(const AliITSNoiseSSD &source); // copy constructor
AliITSNoiseSSD& operator=(const AliITSNoiseSSD &source); // ass. op.
- void AddNoiseP(Int_t module, Int_t strip, Float_t value) {
- fNois[module*2*fgkDefaultNStripsSSD+strip] = value;
- }
- Float_t GetNoiseP(Int_t module, Int_t strip) {
- return fNois[module*2*fgkDefaultNStripsSSD+strip];
- }
-
- void AddNoiseN(Int_t module, Int_t strip, Float_t value) {
- fNois[module*2*fgkDefaultNStripsSSD+fgkDefaultNStripsSSD+strip] = value;
- }
- Float_t GetNoiseN(Int_t module, Int_t strip) {
- return fNois[module*2*fgkDefaultNStripsSSD+fgkDefaultNStripsSSD+strip];
- }
-
- protected:
-
- static const Int_t fgkDefaultNModulesSSD = 1698;
- static const Int_t fgkDefaultNStripsSSD = 768;
-
- // static const Int_t fgkDefaultNModulesSSD; // Total numbers of SSD modules
- //static const Int_t fgkDefaultNStripsSSD; // Total numbers of SSD modules
-
- Float_t fNois[2*fgkDefaultNModulesSSD*fgkDefaultNStripsSSD];
- //Float_t *fNois;
-
+ void SetNNoiseP(Int_t n) { fNoisP.Set(n); }
+ void AddNoiseP(Int_t c, Float_t n) { fNoisP.AddAt(n,c);}
+ TArrayF GetNoiseP() const {return fNoisP; }
+ Float_t GetNoiseP(Int_t n) {return fNoisP.At(n); }
+ void SetNNoiseN(Int_t n) { fNoisN.Set(n); }
+ void AddNoiseN(Int_t c, Float_t n) { fNoisN.AddAt(n,c);}
+ TArrayF GetNoiseN() const {return fNoisN; }
+ Float_t GetNoiseN(Int_t n) {return fNoisN.At(n); }
+
+ void SetMod(UShort_t mod) {fMod = mod;}
+ UShort_t GetMod() { return fMod;}
+
+protected:
+
+ UShort_t fMod; // module number (from 0 to 1535). Needed by the preprocessor to
+ // extract the information from the Detector Algorithm
+
+ TArrayF fNoisP; // Noise for P side channels
+ TArrayF fNoisN; // Noise for N side channels
+
private:
-
- ClassDef(AliITSNoiseSSD,2) // Noise class for SSD
- };
+
+ ClassDef(AliITSNoiseSSD,1) // Noise class for SSD
+};
#endif
--- /dev/null
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Author: The ALICE Off-line Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+
+#include "AliITSNoiseSSDv2.h"
+#include <cstring>
+
+//////////////////////////////////////////////////////
+// Author: Enrico Fragiacomo
+// Date: 23/08/2007
+// Modified: 08/07/2008
+// //
+//////////////////////////////////////////////////////
+
+//const Int_t AliITSNoiseSSD::fgkDefaultNModulesSSD = 1698;
+//const Int_t AliITSNoiseSSD::fgkDefaultNStripsSSD = 768;
+
+ClassImp(AliITSNoiseSSDv2)
+
+//______________________________________________________________________
+ AliITSNoiseSSDv2::AliITSNoiseSSDv2() {
+ // Default Constructor
+ for(Int_t i=0; i<2*fgkDefaultNModulesSSD*fgkDefaultNStripsSSD; i++)
+ fNois[i]=0;
+}
+
+//______________________________________________________________________
+AliITSNoiseSSDv2::AliITSNoiseSSDv2(const AliITSNoiseSSDv2 &source):
+ TObject(source)
+{
+ // copy Constructor
+ memcpy(fNois,source.fNois,
+ 2*fgkDefaultNModulesSSD*fgkDefaultNStripsSSD*sizeof(Float_t));
+}
+
+//______________________________________________________________________
+AliITSNoiseSSDv2::~AliITSNoiseSSDv2(){
+ // destructor
+
+}
+
+//______________________________________________________________________
+AliITSNoiseSSDv2& AliITSNoiseSSDv2::operator=(const AliITSNoiseSSDv2 &source) {
+ // ass. op.
+ if (this == &source)
+ return *this;
+
+ memcpy(fNois,source.fNois,
+ 2*fgkDefaultNModulesSSD*fgkDefaultNStripsSSD*sizeof(Float_t));
+
+ return *this;
+}
--- /dev/null
+#ifndef ALIITSNOISESSDV2_H
+#define ALIITSNOISESSDV2_H
+
+//////////////////////////////////////////////
+// Author: Enrico Fragiacomo
+// Date: 23/08/2007
+// Modified: 08/07/2008
+// //
+//////////////////////////////////////////////
+#include "TObject.h"
+
+class AliITSNoiseSSDv2 : public TObject {
+
+ public:
+
+ AliITSNoiseSSDv2();
+ virtual ~AliITSNoiseSSDv2();
+ AliITSNoiseSSDv2(const AliITSNoiseSSDv2 &source); // copy constructor
+ AliITSNoiseSSDv2& operator=(const AliITSNoiseSSDv2 &source); // ass. op.
+
+ void AddNoiseP(Int_t module, Int_t strip, Float_t value) {
+ fNois[module*2*fgkDefaultNStripsSSD+strip] = value;
+ }
+ Float_t GetNoiseP(Int_t module, Int_t strip) {
+ return fNois[module*2*fgkDefaultNStripsSSD+strip];
+ }
+
+ void AddNoiseN(Int_t module, Int_t strip, Float_t value) {
+ fNois[module*2*fgkDefaultNStripsSSD+fgkDefaultNStripsSSD+strip] = value;
+ }
+ Float_t GetNoiseN(Int_t module, Int_t strip) {
+ return fNois[module*2*fgkDefaultNStripsSSD+fgkDefaultNStripsSSD+strip];
+ }
+
+ protected:
+
+ static const Int_t fgkDefaultNModulesSSD = 1698;
+ static const Int_t fgkDefaultNStripsSSD = 768;
+
+ // static const Int_t fgkDefaultNModulesSSD; // Total numbers of SSD modules
+ //static const Int_t fgkDefaultNStripsSSD; // Total numbers of SSD modules
+
+ Float_t fNois[2*fgkDefaultNModulesSSD*fgkDefaultNStripsSSD];
+ //Float_t *fNois;
+
+ private:
+
+ ClassDef(AliITSNoiseSSDv2,1) // Noise class for SSD
+ };
+#endif
/**************************************************************************
- * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * Copyright(c) 2007-9, 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 "AliITSPedestalSSD.h"
-#include <cstring>
//////////////////////////////////////////////////////
// Author: Enrico Fragiacomo
-// Date: 23/08/2007
-// Modified: 08/07/2008
+// Date: 12/12/2007
// //
//////////////////////////////////////////////////////
-//const Int_t AliITSPedestalSSD::fgkDefaultNModulesSSD = 1698;
-//const Int_t AliITSPedestalSSD::fgkDefaultNStripsSSD = 768;
-
ClassImp(AliITSPedestalSSD)
-
+
//______________________________________________________________________
- AliITSPedestalSSD::AliITSPedestalSSD()
+AliITSPedestalSSD::AliITSPedestalSSD():
+fMod(0),
+fPedP(0),
+fPedN(0) {
// Default Constructor
- //: fPedestal(new Float_t[2*fgkDefaultNModulesSSD*fgkDefaultNStripsSSD])
-{
- for(Int_t i=0; i<2*fgkDefaultNModulesSSD*fgkDefaultNStripsSSD; i++)
- fPedestal[i]=0;
- }
+}
//______________________________________________________________________
-AliITSPedestalSSD::AliITSPedestalSSD(const AliITSPedestalSSD &source):
- TObject(source)
- //, fPedestal(new Float_t[2*fgkDefaultNModulesSSD*fgkDefaultNStripsSSD])
-{
+AliITSPedestalSSD::AliITSPedestalSSD(const AliITSPedestalSSD &source): TObject(source),
+fMod(source.fMod),
+fPedP(source.fPedP),
+fPedN(source.fPedN) {
// copy Constructor
- memcpy(fPedestal,source.fPedestal,
- 2*fgkDefaultNModulesSSD*fgkDefaultNStripsSSD*sizeof(Float_t));
}
-
//______________________________________________________________________
AliITSPedestalSSD::~AliITSPedestalSSD(){
// destructor
//______________________________________________________________________
AliITSPedestalSSD& AliITSPedestalSSD::operator=(const AliITSPedestalSSD &source) {
// ass. op.
- if (this == &source)return *this;
-
- memcpy(fPedestal,source.fPedestal,
- 2*fgkDefaultNModulesSSD*fgkDefaultNStripsSSD*sizeof(Float_t));
-
+ if (this == &source)
+ return *this;
+ fMod = source.fMod;
+ fPedP = source.fMod;
+ fPedN = source.fMod;
return *this;
}
#ifndef ALIITSPEDESTALSSD_H
#define ALIITSPEDESTALSSD_H
+#include "TObjArray.h"
+#include "TArrayF.h"
+
//////////////////////////////////////////////
// Author: Enrico Fragiacomo
-// Date: 23/08/2007
-// Modified: 08/07/2008
+// Date: 12/12/2007
// //
//////////////////////////////////////////////
-#include "TObject.h"
+
+/* $Id$ */
class AliITSPedestalSSD : public TObject {
AliITSPedestalSSD(const AliITSPedestalSSD &source); // copy constructor
AliITSPedestalSSD& operator=(const AliITSPedestalSSD &source); // ass. op.
- void AddPedestalP(Int_t module, Int_t strip, Float_t value) {
- fPedestal[module*2*fgkDefaultNStripsSSD+strip] = value;
- }
- Float_t GetPedestalP(Int_t module, Int_t strip) {
- return fPedestal[module*2*fgkDefaultNStripsSSD+strip];
- }
-
- void AddPedestalN(Int_t module, Int_t strip, Float_t value) {
- fPedestal[module*2*fgkDefaultNStripsSSD+fgkDefaultNStripsSSD+strip] = value;
- }
- Float_t GetPedestalN(Int_t module, Int_t strip) {
- return fPedestal[module*2*fgkDefaultNStripsSSD+fgkDefaultNStripsSSD+strip];
- }
-
- protected:
-
- static const Int_t fgkDefaultNModulesSSD = 1698;
- static const Int_t fgkDefaultNStripsSSD = 768;
-
- // static const Int_t fgkDefaultNModulesSSD; // Total numbers of SSD modules
- //static const Int_t fgkDefaultNStripsSSD; // Total numbers of SSD modules
-
-Float_t fPedestal[2*fgkDefaultNModulesSSD*fgkDefaultNStripsSSD];
-
+ void SetNPedestalP(Int_t n) { fPedP.Set(n); }
+ void AddPedestalP(Int_t c, Float_t n) { fPedP.AddAt(n,c);}
+ TArrayF GetPedestalP() const {return fPedP; }
+ Float_t GetPedestalP(Int_t n) {return fPedP.At(n); }
+ void SetNPedestalN(Int_t n) { fPedN.Set(n); }
+ void AddPedestalN(Int_t c, Float_t n) { fPedN.AddAt(n,c);}
+ TArrayF GetPedestalN() const {return fPedN; }
+ Float_t GetPedestalN(Int_t n) {return fPedN.At(n); }
+
+ void SetMod(UShort_t mod) {fMod = mod;}
+ UShort_t GetMod() { return fMod;}
+
+protected:
+
+ UShort_t fMod; // module number (from 0 to 1535). Needed by the preprocessor to
+ // extract the information from the Detector Algorithm
+
+ TArrayF fPedP; // Pedestal for P side channels
+ TArrayF fPedN; // Pedestal for N side channels
+
private:
-
- ClassDef(AliITSPedestalSSD,2) // Pedestal class for SSD
- };
+
+ ClassDef(AliITSPedestalSSD,1) // Pedestal class for SSD
+};
#endif
--- /dev/null
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Author: The ALICE Off-line Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+
+#include "AliITSPedestalSSDv2.h"
+#include <cstring>
+
+//////////////////////////////////////////////////////
+// Author: Enrico Fragiacomo
+// Date: 23/08/2007
+// Modified: 08/07/2008
+// //
+//////////////////////////////////////////////////////
+
+//const Int_t AliITSPedestalSSD::fgkDefaultNModulesSSD = 1698;
+//const Int_t AliITSPedestalSSD::fgkDefaultNStripsSSD = 768;
+
+ClassImp(AliITSPedestalSSDv2)
+
+//______________________________________________________________________
+ AliITSPedestalSSDv2::AliITSPedestalSSDv2()
+ // Default Constructor
+ //: fPedestal(new Float_t[2*fgkDefaultNModulesSSD*fgkDefaultNStripsSSD])
+{
+ for(Int_t i=0; i<2*fgkDefaultNModulesSSD*fgkDefaultNStripsSSD; i++)
+ fPedestal[i]=0;
+ }
+
+//______________________________________________________________________
+AliITSPedestalSSDv2::AliITSPedestalSSDv2(const AliITSPedestalSSDv2 &source):
+ TObject(source)
+ //, fPedestal(new Float_t[2*fgkDefaultNModulesSSD*fgkDefaultNStripsSSD])
+{
+ // copy Constructor
+ memcpy(fPedestal,source.fPedestal,
+ 2*fgkDefaultNModulesSSD*fgkDefaultNStripsSSD*sizeof(Float_t));
+}
+
+//______________________________________________________________________
+AliITSPedestalSSDv2::~AliITSPedestalSSDv2(){
+ // destructor
+
+}
+
+//______________________________________________________________________
+AliITSPedestalSSDv2& AliITSPedestalSSDv2::operator=(const AliITSPedestalSSDv2 &source) {
+ // ass. op.
+ if (this == &source)return *this;
+
+ memcpy(fPedestal,source.fPedestal,
+ 2*fgkDefaultNModulesSSD*fgkDefaultNStripsSSD*sizeof(Float_t));
+
+ return *this;
+}
--- /dev/null
+#ifndef ALIITSPEDESTALSSDV2_H
+#define ALIITSPEDESTALSSDV2_H
+
+//////////////////////////////////////////////
+// Author: Enrico Fragiacomo
+// Date: 23/08/2007
+// Modified: 08/07/2008
+// //
+//////////////////////////////////////////////
+#include "TObject.h"
+
+class AliITSPedestalSSDv2 : public TObject {
+
+ public:
+
+ AliITSPedestalSSDv2();
+ virtual ~AliITSPedestalSSDv2();
+ AliITSPedestalSSDv2(const AliITSPedestalSSDv2 &source); // copy constructor
+ AliITSPedestalSSDv2& operator=(const AliITSPedestalSSDv2 &source); // ass. op.
+
+ void AddPedestalP(Int_t module, Int_t strip, Float_t value) {
+ fPedestal[module*2*fgkDefaultNStripsSSD+strip] = value;
+ }
+ Float_t GetPedestalP(Int_t module, Int_t strip) {
+ return fPedestal[module*2*fgkDefaultNStripsSSD+strip];
+ }
+
+ void AddPedestalN(Int_t module, Int_t strip, Float_t value) {
+ fPedestal[module*2*fgkDefaultNStripsSSD+fgkDefaultNStripsSSD+strip] = value;
+ }
+ Float_t GetPedestalN(Int_t module, Int_t strip) {
+ return fPedestal[module*2*fgkDefaultNStripsSSD+fgkDefaultNStripsSSD+strip];
+ }
+
+ protected:
+
+ static const Int_t fgkDefaultNModulesSSD = 1698;
+ static const Int_t fgkDefaultNStripsSSD = 768;
+
+ // static const Int_t fgkDefaultNModulesSSD; // Total numbers of SSD modules
+ //static const Int_t fgkDefaultNStripsSSD; // Total numbers of SSD modules
+
+Float_t fPedestal[2*fgkDefaultNModulesSSD*fgkDefaultNStripsSSD];
+
+ private:
+
+ ClassDef(AliITSPedestalSSDv2,1) // Pedestal class for SSD
+ };
+#endif
#include <TObjString.h>
#include "AliITSRawStreamSSD.h"
-#include "AliITSNoiseSSD.h"
-#include "AliITSPedestalSSD.h"
-#include "AliITSBadChannelsSSD.h"
+#include "AliITSNoiseSSDv2.h"
+#include "AliITSPedestalSSDv2.h"
+#include "AliITSBadChannelsSSDv2.h"
#include <Riostream.h>
//---------------------------------------
// initialize the calibration objects
- AliITSNoiseSSD *calib = new AliITSNoiseSSD();
- AliITSBadChannelsSSD *badch = new AliITSBadChannelsSSD();
- AliITSPedestalSSD *pedel = new AliITSPedestalSSD();
+ AliITSNoiseSSDv2 *calib = new AliITSNoiseSSDv2();
+ AliITSBadChannelsSSDv2 *badch = new AliITSBadChannelsSSDv2();
+ AliITSPedestalSSDv2 *pedel = new AliITSPedestalSSDv2();
TString runType = GetRunType();
if(runType == "ELECTRONICS_CALIBRATION_RUN") {
return 2;
}
- AliITSNoiseSSD *cal;
- f->GetObject("AliITSNoiseSSD;1", cal);
+ AliITSNoiseSSDv2 *cal;
+ f->GetObject("AliITSNoiseSSDv2;1", cal);
if(!cal) {
Log("File does not contain expected data for the noise!");
delete list;
return 3;
}
- AliITSPedestalSSD *ped;
- f->GetObject("AliITSPedestalSSD;1", ped);
+ AliITSPedestalSSDv2 *ped;
+ f->GetObject("AliITSPedestalSSDv2;1", ped);
if(!ped) {
Log("File does not contain expected data for the pedestals!");
delete list;
return 5;
}
- AliITSBadChannelsSSD *bad;
- f->GetObject("AliITSBadChannelsSSD;1", bad);
+ AliITSBadChannelsSSDv2 *bad;
+ f->GetObject("AliITSBadChannelsSSDv2;1", bad);
if(!bad) {
Log("File does not contain expected data for bad channels !");
delete list;
#include "AliITSgeomTGeo.h"
#include "AliRawEventHeaderBase.h"
#include "AliITSRecPoint.h"
+#include "AliITSBadChannelsSSDv2.h"
#include "AliCDBManager.h"
#include "AliCDBEntry.h"
fSSDEventPerCycle(0),
fkOnline(kMode),
fLDC(ldc),
-fSSDRawsOffset(0),
+fSSDRawsOffset(0), fSSDRawsDAOffset(0),
fSSDRawsCommonLevelOffset(0),
fSSDhTask(0),
-fGenOffset(0) {
+fGenOffset(0),
+fCDBManager(0) {
// Default constructor
//initilize the raw signal vs strip number histograms
if(fkOnline) {
- AliCDBManager * man = AliCDBManager::Instance();
- man->SetDefaultStorage("local://$ALICE_ROOT");
+ fCDBManager = AliCDBManager::Instance();
+ //fCDBManager->SetDefaultStorage("local://$ALICE_ROOT");
+ fCDBManager->SetDefaultStorage(gSystem->Getenv("AMORE_CDB_URI"));
Int_t runNumber = atoi(gSystem->Getenv("DATE_RUN_NUMBER"));
if(!runNumber)
AliInfo("DATE_RUN_NUMBER not defined!!!\n");
- man->SetRun(runNumber);
- AliCDBEntry *geomGRP = man->Get("GRP/Geometry/Data");
+ fCDBManager->SetRun(runNumber);
+ AliCDBEntry *geomGRP = fCDBManager->Get("GRP/Geometry/Data");
if(!geomGRP) AliInfo("GRP geometry not found!!!\n");
Int_t gLayer = 0,gLadder = 0, gModule = 0;
else {
for(Int_t iModule = 0; iModule < fgkSSDMODULES; iModule++)
fHistSSDRawSignalModule[iModule]=NULL;
+ fCDBManager = NULL;
}
}
fSSDEventPerCycle(qadm.fSSDEventPerCycle),
fkOnline(qadm.fkOnline),
fLDC(qadm.fLDC),
-fSSDRawsOffset(qadm.fSSDRawsOffset),
+fSSDRawsOffset(qadm.fSSDRawsOffset), fSSDRawsDAOffset(qadm.fSSDRawsDAOffset),
fSSDRawsCommonLevelOffset(qadm.fSSDRawsCommonLevelOffset),
fSSDhTask(qadm.fSSDhTask),
-fGenOffset(qadm.fGenOffset) {
+fGenOffset(qadm.fGenOffset),
+fCDBManager(qadm.fCDBManager) {
//copy ctor
fAliITSQADataMakerRec->SetName((const char*)qadm.fAliITSQADataMakerRec->GetName()) ;
fAliITSQADataMakerRec->SetTitle((const char*)qadm.fAliITSQADataMakerRec->GetTitle());
// destructor
for(Int_t iModule = 0; iModule < fgkSSDMODULES; iModule++)
if(fHistSSDRawSignalModule[iModule]) delete fHistSSDRawSignalModule[iModule];
+ if(fCDBManager) delete fCDBManager;
}
//____________________________________________________________________________
//online part
if(fkOnline) {
+ //Output of the DA
+ MonitorOCDBObjects();
+
Int_t gHistPositionOccupancyPerModule = 0;
Int_t gLayer = 0, gLadder = 0, gModule = 0;
//occupancy per module
gHistPositionOccupancyPerModule = (gLayer == 5) ? ((gLadder - 1)*fgkSSDMODULESPERLADDERLAYER5 + gModule - 1) : ((gLadder - 1)*fgkSSDMODULESPERLADDERLAYER6 + gModule + fgkSSDMODULESLAYER5 - 1);
gHistPositionOccupancyPerLadder = (gLayer == 5) ? 2*(gLadder - 1) : 2*(gLadder - 1 + fgkSSDLADDERSLAYER5);
- //P-SIDE OCCUPANCY
+ //P-SIDE OCCUPANCY
occupancy = GetOccupancyModule((TH1 *)fAliITSQADataMakerRec->GetRawsData(fGenOffset+fSSDRawsCommonLevelOffset+fgkSSDMODULES+gHistPositionOccupancyPerModule),0);
fAliITSQADataMakerRec->GetRawsData(fGenOffset+fSSDRawsCommonLevelOffset+fgkSSDMODULES+fgkSSDMODULES+gHistPositionOccupancyPerLadder)->Fill(gModule,occupancy);
lLadderLocationY = 3*gLadder; // sideP=1 sideN=0
else if(gLayer == 6)
((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenOffset+fSSDRawsCommonLevelOffset+fgkSSDMODULES+2*fgkSSDLADDERSLAYER5+2*fgkSSDLADDERSLAYER6+1))->SetBinContent(gModule,lLadderLocationY,occupancy);
- //N-SIDE OCCUPANCY
+ //N-SIDE OCCUPANCY
occupancy = GetOccupancyModule((TH1 *)fAliITSQADataMakerRec->GetRawsData(fGenOffset+fSSDRawsCommonLevelOffset+fgkSSDMODULES+gHistPositionOccupancyPerModule),1);
fAliITSQADataMakerRec->GetRawsData(fGenOffset+fSSDRawsCommonLevelOffset+fgkSSDMODULES+fgkSSDMODULES+gHistPositionOccupancyPerLadder+1)->Fill(gModule,occupancy);
if(gLayer == 5)
}
fAliITSQADataMakerRec->Add2RawsList(fHistSSDOccupancyLayer6, fGenOffset+fSSDRawsOffset);
fSSDRawsOffset += 1;
+
+ //Output of the DA
+ TH2D *fHistPSideBadChannelMapLayer5 = new TH2D("fHistPSideBadChannelMapLayer5",
+ "Layer 5;N_{module};N_{ladder}",
+ 22,1,23,
+ 34,500,534);
+ fHistPSideBadChannelMapLayer5->GetXaxis()->SetTitleColor(1);
+ fHistPSideBadChannelMapLayer5->SetStats(kFALSE);
+ fHistPSideBadChannelMapLayer5->GetYaxis()->SetTitleOffset(1.8);
+ fHistPSideBadChannelMapLayer5->GetXaxis()->SetNdivisions(22);
+ fHistPSideBadChannelMapLayer5->GetYaxis()->SetNdivisions(34);
+ fHistPSideBadChannelMapLayer5->GetXaxis()->SetLabelSize(0.03);
+ fHistPSideBadChannelMapLayer5->GetYaxis()->SetLabelSize(0.03);
+ fHistPSideBadChannelMapLayer5->GetZaxis()->SetTitleOffset(1.6);
+ fHistPSideBadChannelMapLayer5->GetZaxis()->SetTitle("Bad channels (p-side)[%]");
+ fAliITSQADataMakerRec->Add2RawsList(fHistPSideBadChannelMapLayer5, fGenOffset+fSSDRawsOffset);
+ fSSDRawsOffset += 1; fSSDRawsDAOffset += 1;
+
+ TH2D *fHistNSideBadChannelMapLayer5 = new TH2D("fHistNSideBadChannelMapLayer5",
+ "Layer 5;N_{module};N_{ladder}",
+ 22,1,23,
+ 34,500,534);
+ fHistNSideBadChannelMapLayer5->GetXaxis()->SetTitleColor(1);
+ fHistNSideBadChannelMapLayer5->SetStats(kFALSE);
+ fHistNSideBadChannelMapLayer5->GetYaxis()->SetTitleOffset(1.8);
+ fHistNSideBadChannelMapLayer5->GetXaxis()->SetNdivisions(22);
+ fHistNSideBadChannelMapLayer5->GetYaxis()->SetNdivisions(34);
+ fHistNSideBadChannelMapLayer5->GetXaxis()->SetLabelSize(0.03);
+ fHistNSideBadChannelMapLayer5->GetYaxis()->SetLabelSize(0.03);
+ fHistNSideBadChannelMapLayer5->GetZaxis()->SetTitleOffset(1.6);
+ fHistNSideBadChannelMapLayer5->GetZaxis()->SetTitle("Bad channels (n-side)[%]");
+ fAliITSQADataMakerRec->Add2RawsList(fHistNSideBadChannelMapLayer5, fGenOffset+fSSDRawsOffset);
+ fSSDRawsOffset += 1; fSSDRawsDAOffset += 1;
+
+ TH2D *fHistPSideBadChannelMapLayer6 = new TH2D("fHistPSideBadChannelMapLayer6",
+ "Layer 6;N_{module};N_{ladder}",
+ 25,1,26,
+ 38,600,638);
+ fHistPSideBadChannelMapLayer6->GetXaxis()->SetTitleColor(1);
+ fHistPSideBadChannelMapLayer6->SetStats(kFALSE);
+ fHistPSideBadChannelMapLayer6->GetYaxis()->SetTitleOffset(1.8);
+ fHistPSideBadChannelMapLayer6->GetXaxis()->SetNdivisions(25);
+ fHistPSideBadChannelMapLayer6->GetYaxis()->SetNdivisions(38);
+ fHistPSideBadChannelMapLayer6->GetXaxis()->SetLabelSize(0.03);
+ fHistPSideBadChannelMapLayer6->GetYaxis()->SetLabelSize(0.03);
+ fHistPSideBadChannelMapLayer6->GetZaxis()->SetTitleOffset(1.6);
+ fHistPSideBadChannelMapLayer6->GetZaxis()->SetTitle("Bad channels (p-side)[%]");
+ fAliITSQADataMakerRec->Add2RawsList(fHistPSideBadChannelMapLayer6, fGenOffset+fSSDRawsOffset);
+ fSSDRawsOffset += 1; fSSDRawsDAOffset += 1;
+
+ TH2D *fHistNSideBadChannelMapLayer6 = new TH2D("fHistNSideBadChannelMapLayer6",
+ "Layer 6;N_{module};N_{ladder}",
+ 25,1,26,
+ 38,600,638);
+ fHistNSideBadChannelMapLayer6->GetXaxis()->SetTitleColor(1);
+ fHistNSideBadChannelMapLayer6->SetStats(kFALSE);
+ fHistNSideBadChannelMapLayer6->GetYaxis()->SetTitleOffset(1.8);
+ fHistNSideBadChannelMapLayer6->GetXaxis()->SetNdivisions(25);
+ fHistNSideBadChannelMapLayer6->GetYaxis()->SetNdivisions(38);
+ fHistNSideBadChannelMapLayer6->GetXaxis()->SetLabelSize(0.03);
+ fHistNSideBadChannelMapLayer6->GetYaxis()->SetLabelSize(0.03);
+ fHistNSideBadChannelMapLayer6->GetZaxis()->SetTitleOffset(1.6);
+ fHistNSideBadChannelMapLayer6->GetZaxis()->SetTitle("Bad channels (n-side)[%]");
+ fAliITSQADataMakerRec->Add2RawsList(fHistNSideBadChannelMapLayer6, fGenOffset+fSSDRawsOffset);
+ fSSDRawsOffset += 1; fSSDRawsDAOffset += 1;
}//online flag
fSSDhTask = fSSDRawsOffset;
AliDebug(1,Form("%d SSD Raws histograms booked\n",fSSDhTask));
}
//____________________________________________________________________________ //
-Double_t AliITSQASSDDataMakerRec::GetOccupancyStrip(TH1 *lHisto, Int_t *occupancyMatrix) {
+void AliITSQASSDDataMakerRec::GetOccupancyStrip(TH1 *lHisto, Int_t *occupancyMatrix) {
//Increments the entries in the occupancy matrix based
//on whether the signal for each strip is larger than the cutoff
//Currently the cutoff is at 0 which means that if ZS
return lOccupancy;
}
+//____________________________________________________________________________
+void AliITSQASSDDataMakerRec::MonitorOCDBObjects() {
+ //Monitor in AMORE the output of the DA
+ //Currently only the bad channel list is monitored
+ //Todo: Noise - Pedestal
+ AliCDBEntry *entryBadChannelsSSD = fCDBManager->Get("ITS/Calib/BadChannelsSSD");
+ if(!entryBadChannelsSSD)
+ AliError("OCDB entry for the bad channel list is not valid!");
+ AliITSBadChannelsSSDv2 *badchannelsSSD = (AliITSBadChannelsSSDv2 *)entryBadChannelsSSD->GetObject();
+ if(!badchannelsSSD)
+ AliError("Bad channel list object is not a valid AliITSBadChannelsSSD object!");
+
+ //_____________________________________________________________________________//
+ Int_t nBadPSideChannels = 0, nBadNSideChannels = 0;
+ Int_t layer = 0, ladder = 0, module = 0;
+ Int_t nPSideChannelsLayer5 = 0, nNSideChannelsLayer5 = 0;
+ Int_t nPSideChannelsLayer6 = 0, nNSideChannelsLayer6 = 0;
+ //_____________________________________________________________________________//
+
+ for(Int_t i = 0; i < fgkSSDMODULES; i++) {
+ AliITSgeomTGeo::GetModuleId(i+500,layer,ladder,module);
+ nBadPSideChannels = 0, nBadNSideChannels = 0;
+ nPSideChannelsLayer5 = 0, nNSideChannelsLayer5 = 0;
+ nPSideChannelsLayer6 = 0, nNSideChannelsLayer6 = 0;
+
+ Int_t badChannel = 0;
+ for(Int_t j = 0; j < fgkNumberOfPSideStrips; j++) {
+ badChannel = (Int_t)(badchannelsSSD->GetBadChannelP(i,j));
+ if(badChannel != 0) {
+ if(layer == 5)
+ nPSideChannelsLayer5 += 1;
+ if(layer == 6)
+ nPSideChannelsLayer6 += 1;
+ nBadPSideChannels += 1;
+ }//badchannel flag != 0
+ badChannel = (Int_t)(badchannelsSSD->GetBadChannelN(i,j));
+ if(badChannel != 0) {
+ if(layer == 5)
+ nNSideChannelsLayer5 += 1;
+ if(layer == 6)
+ nNSideChannelsLayer6 += 1;
+ nBadNSideChannels += 1;
+ }//badchannel flag != 0
+ }//loop over strips
+ if(layer == 5) {
+ if(nPSideChannelsLayer5 > 0)
+ ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenOffset+fSSDRawsOffset-fSSDRawsDAOffset))->Fill(module,499+ladder,
+ 100.*nPSideChannelsLayer5/fgkNumberOfPSideStrips);
+ else ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenOffset+fSSDRawsOffset-fSSDRawsDAOffset))->Fill(module,499+ladder,0.0001);
+ if(nNSideChannelsLayer5 > 0)
+ ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenOffset+fSSDRawsOffset-fSSDRawsDAOffset+1))->Fill(module,499+ladder,
+ 100.*nNSideChannelsLayer5/fgkNumberOfPSideStrips);
+ else ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenOffset+fSSDRawsOffset-fSSDRawsDAOffset+1))->Fill(module,499+ladder,0.0001);
+ }//layer 5
+ if(layer == 6) {
+ if(nPSideChannelsLayer6 > 0)
+ ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenOffset+fSSDRawsOffset-fSSDRawsDAOffset+2))->Fill(module,599+ladder,
+ 100.*nPSideChannelsLayer6/fgkNumberOfPSideStrips);
+ else ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenOffset+fSSDRawsOffset-fSSDRawsDAOffset+2))->Fill(module,599+ladder,0.0001);
+ if(nNSideChannelsLayer6 > 0)
+ ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenOffset+fSSDRawsOffset-fSSDRawsDAOffset+3))->Fill(module,599+ladder,
+ 100.*nNSideChannelsLayer6/fgkNumberOfPSideStrips);
+ else ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenOffset+fSSDRawsOffset-fSSDRawsDAOffset+3))->Fill(module,599+ladder,0.0001);
+ }//layer 6
+ }//module loop
+}
+
//____________________________________________________________________________
void AliITSQASSDDataMakerRec::InitRecPoints()
{
class TObjArray;
class TH1D;
+
class AliRawReader;
class AliITSQADataMakerRec;
+class AliCDBManager;
class AliITSQASSDDataMakerRec: public TObject {
private:
- Double_t GetOccupancyStrip(TH1 *lHisto, Int_t *occupancyMatrix);
+ void GetOccupancyStrip(TH1 *lHisto, Int_t *occupancyMatrix);
Double_t GetOccupancyModule(TH1 *lHisto, Int_t stripside);
-
+ void MonitorOCDBObjects();
+
static const Int_t fgkNumOfLDCs = 3; //number of SSD LDCs
static const Int_t fgkNumOfDDLs = 16; //number of SSD DDLs
static const Int_t fgkSSDMODULES = 1698; //total number of SSD modules
Bool_t fkOnline; //online (1) or offline (0) use
Int_t fLDC; //LDC number (0 for offline, 1 to 4 for online)
Int_t fSSDRawsOffset; //SSD raw data plot offset
+ Int_t fSSDRawsDAOffset; //SSD DA plot offset
Int_t fSSDRawsCommonLevelOffset; //Raw data QA - top level offset - histos used both online and offline
Int_t fSSDhTask; //number of histo booked for each SSD task
Int_t fGenOffset; //qachecking offset
TH1D *fHistSSDRawSignalModule[fgkSSDMODULES]; //raw signal vs strip number - SSD
Int_t fOccupancyMatrix[fgkSSDMODULES][2*fgkNumberOfPSideStrips]; //occupancy values per strip
- ClassDef(AliITSQASSDDataMakerRec,3) // description
+ AliCDBManager *fCDBManager; //CDB manager
+ ClassDef(AliITSQASSDDataMakerRec,4) // description
};
#endif
#pragma link C++ class AliITSDriftSpeedArraySDD+;
#pragma link C++ class AliITSDDLModuleMapSDD+;
#pragma link C++ class AliITSBadChannelsSSD+;
+#pragma link C++ class AliITSBadChannelsSSDv2+;
#pragma link C++ class AliITSGainSSD+;
+#pragma link C++ class AliITSGainSSDv2+;
#pragma link C++ class AliITSNoiseSSD+;
+#pragma link C++ class AliITSNoiseSSDv2+;
#pragma link C++ class AliITSHandleDaSSD+;
#pragma link C++ class AliITSModuleDaSSD+;
#pragma link C++ class AliITSChannelDaSSD+;
#pragma link C++ class AliITSIntMap+;
#pragma link C++ class AliITSIntMapNode+;
#pragma link C++ class AliITSPedestalSSD+;
+#pragma link C++ class AliITSPedestalSSDv2+;
#pragma link C++ class AliITSSurveyToAlignSSD+;
#endif
AliITSDDLModuleMapSDD.cxx \
AliITSDriftSpeedArraySDD.cxx \
AliITSBadChannelsSSD.cxx \
+ AliITSBadChannelsSSDv2.cxx \
AliITSGainSSD.cxx \
+ AliITSGainSSDv2.cxx \
AliITSNoiseSSD.cxx \
+ AliITSNoiseSSDv2.cxx \
AliITSChannelDaSSD.cxx \
AliITSModuleDaSSD.cxx \
AliITSHandleDaSSD.cxx \
AliITSIntMap.cxx \
AliITSIntMapNode.cxx \
AliITSPedestalSSD.cxx \
+ AliITSPedestalSSDv2.cxx \
AliITSSurveyToAlignSSD.cxx
HDRS:= $(SRCS:.cxx=.h)