]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Update of the PHOS code needed in order to read and reconstruct the beam test raw...
authorcvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 11 Aug 2006 12:36:26 +0000 (12:36 +0000)
committercvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 11 Aug 2006 12:36:26 +0000 (12:36 +0000)
PHOS/AliPHOS.cxx
PHOS/AliPHOS.h
PHOS/AliPHOSClusterizerv1.cxx
PHOS/AliPHOSGetter.cxx

index 2cddd4ff8395e23b7db3dfdf90f460fdcb886c0a..8aecbb2211ce001cd7e2982a2a8ae63935ff03ac 100644 (file)
@@ -16,6 +16,9 @@
 /* History of cvs commits:
  *
  * $Log$
+ * Revision 1.99  2006/06/28 11:36:09  cvetan
+ * New detector numbering scheme (common for DAQ/HLT/Offline). All the subdetectors shall use the AliDAQ class for the sim and rec of the raw data. The AliDAQ and raw reader classes now provide all the necessary interfaces to write and select the detector specific raw-data payload. Look into the AliDAQ.h and AliRawReader.h for more details.
+ *
  * Revision 1.98  2006/05/11 11:30:48  cvetan
  * Major changes in AliAltroBuffer. Now it can be used only for writing of raw data. All the corresponding read method are removed. It is based now on AliFstream in order to avoid endianess problems. The altro raw data is written always with little endian
  *
@@ -94,6 +97,10 @@ Double_t AliPHOS::fgTimeMax     = 2.56E-5 ;  // each sample is over 100 ns fTime
 Double_t AliPHOS::fgTimePeak    = 4.1E-6 ;   // 4 micro seconds
 Double_t AliPHOS::fgTimeTrigger = 100E-9 ;      // 100ns, just for a reference
 
+Double_t AliPHOS::fgHighCharge  = 8.2;       // adjusted for a high gain range of 5.12 GeV (10 bits)
+Double_t AliPHOS::fgHighGain    = 6.64;
+Double_t AliPHOS::fgHighLowGainFactor = 16.; // adjusted for a low gain range of 82 GeV (10 bits) 
+
 //____________________________________________________________________________
   AliPHOS:: AliPHOS() : AliDetector()
 {
@@ -106,12 +113,6 @@ Double_t AliPHOS::fgTimeTrigger = 100E-9 ;      // 100ns, just for a reference
 AliPHOS::AliPHOS(const char* name, const char* title): AliDetector(name, title)
 {
   //   ctor : title is used to identify the layout
-
-  fHighCharge        = 8.2 ;          // adjusted for a high gain range of 5.12 GeV (10 bits)
-  fHighGain          = 6.64 ; 
-  fHighLowGainFactor = 16. ;          // adjusted for a low gain range of 82 GeV (10 bits) 
-  fLowGainOffset     = GetGeometry()->GetNModules() + 1 ;   
-    // offset added to the module id to distinguish high and low gain data
 }
 
 //____________________________________________________________________________
@@ -124,13 +125,6 @@ void AliPHOS::Copy(TObject &obj)const
 {
   // copy method to be used by the cpy ctor
   TObject::Copy(obj);
-  
-  AliPHOS &phos = static_cast<AliPHOS &>(obj); 
-  
-  phos.fHighCharge        = fHighCharge ;
-  phos.fHighGain          = fHighGain ; 
-  phos.fHighLowGainFactor = fHighLowGainFactor ;  
-  phos.fLowGainOffset     = fLowGainOffset;   
 }
 
 //____________________________________________________________________________
@@ -506,7 +500,7 @@ void AliPHOS::Digits2Raw()
       Bool_t lowgain = RawSampledResponse(digit->GetTimeR(), energy, adcValuesHigh, adcValuesLow) ; 
       
       if (lowgain) 
-       buffer->WriteChannel(relId[3], relId[2], module + fLowGainOffset
+       buffer->WriteChannel(relId[3], relId[2], module + GetGeometry()->GetNModules() + 1
                             GetRawFormatTimeBins(), adcValuesLow , kAdcThreshold);
       else 
        buffer->WriteChannel(relId[3], relId[2], module, 
index 33b1c79e37127941b52ac975ba664742e90ab477..8c65abeb8a813ae9cf4ebc071ffc430850f65d2b 100644 (file)
@@ -7,6 +7,9 @@
 /* History of cvs commits:
  *
  * $Log$
+ * Revision 1.67  2006/04/07 08:42:00  hristov
+ * Follow AliAlignObj framework and remove AliPHOSAlignData (Yu.Kharlov)
+ *
  * Revision 1.66  2006/03/24 21:39:33  schutz
  * Modification needed to include PHOS in the global trigger framework
  *
@@ -81,14 +84,13 @@ public:
 
   // Raw Read Out
   Double_t GetRawFormatCapa() const { return fgCapa ; }   
-  Double_t GetRawFormatHighCharge() const { return fHighCharge ; }  
-  Double_t GetRawFormatHighGain() const { return fHighGain ; }  
-  Double_t GetRawFormatHighLowGainFactor() const { return fHighLowGainFactor ; }  
-  Double_t GetRawFormatLowCharge() const { return ( fHighCharge *  fHighLowGainFactor ) ; }  
-  Double_t GetRawFormatLowGain() const { return ( fHighGain / fHighLowGainFactor ) ; }  
-  Int_t GetRawFormatLowGainOffset() const { return fLowGainOffset ; }  
+  static Double_t GetRawFormatHighCharge() { return fgHighCharge ; }  
+  static Double_t GetRawFormatHighGain() { return fgHighGain ; }  
+  static Double_t GetRawFormatHighLowGainFactor() { return fgHighLowGainFactor ; }  
+  static Double_t GetRawFormatLowCharge() { return ( fgHighCharge *  fgHighLowGainFactor ) ; }  
+  static Double_t GetRawFormatLowGain() { return ( fgHighGain / fgHighLowGainFactor ) ; }  
   Int_t GetRawFormatOrder() const { return fgOrder ; }   
-  Int_t GetRawFormatTimeBins() const { return fkTimeBins ; }    
+  static Int_t GetRawFormatTimeBins() { return fkTimeBins ; }    
   Double_t GetRawFormatTimeMax() const { return fgTimeMax ; }   
   Double_t GetRawFormatTimePeak() const { return fgTimePeak ; }    
   Double_t GetRawFormatTimeTrigger() const { return fgTimeTrigger ; }   
@@ -108,10 +110,9 @@ protected:
   
   
   static Double_t fgCapa ;              // capacitor of the preamplifier for the raw RO signal
-  Double_t fHighCharge ;                // high charge (to convert energy to charge) for the raw RO signal
-  Double_t fHighGain ;                  // high gain for the raw RO signal
-  Double_t fHighLowGainFactor ;         // high to low gain factor for the raw RO signal
-  Int_t    fLowGainOffset ;             // to separate high from low gain in the DDL
+  static Double_t fgHighCharge ;                // high charge (to convert energy to charge) for the raw RO signal
+  static Double_t fgHighGain ;                  // high gain for the raw RO signal
+  static Double_t fgHighLowGainFactor ;         // high to low gain factor for the raw RO signal
   static Int_t fgOrder ;                // order of the gamma function for the RO signal
 //   static const Int_t fkTimeBins = 256 ; // number of sampling bins of the raw RO signal  
   static const Int_t fkTimeBins = 64 ; // number of sampling bins of the raw RO signal  
@@ -119,7 +120,7 @@ protected:
   static Double_t fgTimePeak ;          // peaking time of the raw RO signal                                    
   static Double_t fgTimeTrigger ;       // time of the trigger for the RO signal 
                                         
-  ClassDef(AliPHOS,5) // Photon Spectrometer Detector (base class)
+  ClassDef(AliPHOS,6) // Photon Spectrometer Detector (base class)
 } ;
 
 #endif // ALIPHOS_H
index e5cf255774647505d7a351cefa399538e8ae0413..5532b134f84d6cbfbbf0caee45f883d4501f040a 100644 (file)
@@ -18,6 +18,9 @@
 /* History of cvs commits:
  *
  * $Log$
+ * Revision 1.94  2006/08/07 12:27:49  hristov
+ * Removing obsolete code which affected the event numbering scheme
+ *
  * Revision 1.93  2006/08/01 12:20:17  cvetan
  * 1. Adding a possibility to read and reconstruct an old rcu formatted raw data. This is controlled by an option of AliReconstruction and AliPHOSReconstructor. 2. In case of raw data processing (without galice.root) create the default AliPHOSGeometry object. Most likely this should be moved to the CDB
  *
@@ -401,10 +404,6 @@ void AliPHOSClusterizerv1::Init()
     gime = AliPHOSGetter::Instance(GetTitle(), fEventFolderName.Data());
 
   AliPHOSGeometry * geom = gime->PHOSGeometry();
-  if (!geom) {
-    AliError("Could not find PHOS geometry! Loading the default one !");
-    geom = AliPHOSGeometry::GetInstance("IHEP","");
-  }
 
   fEmcCrystals = geom->GetNModules() *  geom->GetNCristalsInModule() ;
 
index 1d7b0daa10ace7f88beb6d0aadbc0808b18d9270..f7fa8e080f891b3bdf5b287f5d4a37069438640f 100644 (file)
@@ -493,6 +493,13 @@ AliPHOSGeometry * AliPHOSGetter::PHOSGeometry() const
   AliPHOSGeometry * rv = 0 ; 
   if (PHOS() )
     rv =  PHOS()->GetGeometry() ;
+  else {
+    rv = AliPHOSGeometry::GetInstance();
+    if (!rv) {
+      AliError("Could not find PHOS geometry! Loading the default one !");
+      rv = AliPHOSGeometry::GetInstance("IHEP","");
+    }
+  }
   return rv ; 
 } 
 
@@ -711,8 +718,9 @@ Int_t AliPHOSGetter::ReadRaw(AliRawReader *rawReader,Bool_t isOldRCUFormat)
       }
       first = kFALSE ; 
       relId[0] = in.GetModule() ;
-      if ( relId[0] >= PHOS()->GetRawFormatLowGainOffset() ) { 
-       relId[0] -=  PHOS()->GetRawFormatLowGainOffset() ;
+      Int_t lowGainOffset = PHOSGeometry()->GetNModules() + 1;
+      if ( relId[0] >= lowGainOffset ) { 
+       relId[0] -=  lowGainOffset ;
        lowGainFlag = kTRUE ;
       } else
        lowGainFlag = kFALSE ;