macro for PMD reconstruction
authorbnandi <bnandi@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 17 Nov 2006 07:34:05 +0000 (07:34 +0000)
committerbnandi <bnandi@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 17 Nov 2006 07:34:05 +0000 (07:34 +0000)
PMD/AliPMDClusterFinder.cxx
PMD/AliPMDRec.C [new file with mode: 0644]
PMD/AliPMDRootDataRead.C [new file with mode: 0644]

index cfea1a9..75b1a38 100644 (file)
@@ -571,8 +571,7 @@ void AliPMDClusterFinder::Digits2RecPoints(Int_t ievt, AliRawReader *rawReader)
 
          Float_t sig1 = (Float_t) sig;
          // CALIBRATION
-         //Float_t gain = fCalibData->GetGainFact(det,smn,row,col);
-         Float_t gain = 1.0;
+         Float_t gain = fCalibData->GetGainFact(det,smn,row,col);
 
          //printf("sig = %d gain = %f\n",sig,gain);
          sig = (Int_t) (sig1*gain);
diff --git a/PMD/AliPMDRec.C b/PMD/AliPMDRec.C
new file mode 100644 (file)
index 0000000..ec56511
--- /dev/null
@@ -0,0 +1,23 @@
+void AliPMDRec()
+{
+  // This macro for the full reconstruction chain. Only PMD is ON.
+  //
+
+  Int_t firstEvent = 0;
+  Int_t lastEvent = 1;
+
+  AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 2, 1., 10., 1);
+  AliTracker::SetFieldMap(field,1);
+
+  AliReconstruction rec;
+  rec.SetRunReconstruction("PMD");
+  rec.SetRunVertexFinder(kFALSE);
+  rec.SetFillESD("PMD");
+  rec.SetFillTriggerESD(kFALSE);
+
+  //  rec.Run("./");
+  //  rec.Run("raw.date");
+  rec.Run("raw_6b_61.root",firstEvent,lastEvent);
+
+}
+
diff --git a/PMD/AliPMDRootDataRead.C b/PMD/AliPMDRootDataRead.C
new file mode 100644 (file)
index 0000000..2205a60
--- /dev/null
@@ -0,0 +1,58 @@
+//
+void AliPMDRootDataRead()
+{
+  // To read PMD raw root data and fetch the adc value for each cell
+
+  TObjArray pmdddlcont;
+
+  Int_t ievt = 2;
+
+  Bool_t junk;
+
+  AliRawReaderRoot reader("raw_6b_61.root",ievt);
+  //reader.NextEvent();
+  //reader.NextEvent();
+
+
+
+  /*
+  reader.ReadHeader();
+  cout << "LDC ID =       " << reader.GetLDCId()       << endl;
+  cout << "Equipment ID = " << reader.GetEquipmentId() << endl;
+  cout << "Data Size =    " << reader.GetDataSize()    << endl;
+  */
+
+  AliPMDRawStream stream(&reader);
+
+  Int_t indexDDL = 0;
+
+
+  for (Int_t iddl = 0; iddl < 6; iddl++)
+    {
+      
+      reader.Select("PMD", iddl, iddl);
+
+      junk = stream.DdlData(&pmdddlcont);
+
+      Int_t ientries = pmdddlcont.GetEntries();
+      for (Int_t ient = 0; ient < ientries; ient++)
+       {
+         AliPMDddldata *pmdddl = (AliPMDddldata*)pmdddlcont.UncheckedAt(ient);
+         
+         Int_t det = pmdddl->GetDetector();
+         Int_t smn = pmdddl->GetSMN();
+         //Int_t mcm = pmdddl->GetMCM();
+         //Int_t chno = pmdddl->GetChannel();
+         Int_t row = pmdddl->GetRow();
+         Int_t col = pmdddl->GetColumn();
+         Int_t sig = pmdddl->GetSignal();
+
+         // cout << row << " " << col << " " << sig << endl;
+
+       }
+      pmdddlcont.Clear();
+
+    }
+
+
+}