-//
-void AliPMDRawDataRead()
-{
- // To read PMD raw data
+// To read PMD raw data
+void AliPMDRawDataRead(Int_t iEvent)
+{
TObjArray pmdddlcont;
-
- Int_t ievt = 0;
- AliRawReaderFile reader(ievt);
- AliPMDRawStream stream(&reader);
-
- Int_t indexDDL = 0;
-
-
- for (Int_t iddl = 0; iddl < 6; iddl++)
+
+ for(Int_t ievt = 0; ievt < iEvent; ievt++)
{
+ AliRawReaderFile reader(ievt);
+ AliPMDRawStream stream(&reader);
- reader.Select("PMD", iddl, iddl);
- //cout << reader.GetDataSize() << endl;
- stream.DdlData(&pmdddlcont);
- Int_t ientries = pmdddlcont.GetEntries();
- for (Int_t ient = 0; ient < ientries; ient++)
+ Int_t indexDDL = 0;
+ for (Int_t iddl = 0; iddl < 6; iddl++)
{
- 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();
-
+ reader.Select("PMD", iddl, iddl);
+ //cout << reader.GetDataSize() << endl;
+ stream.DdlData(indexDDL,&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<<sig<<endl;
+
+ }
+ pmdddlcont.Clear();
+
}
- pmdddlcont.Clear();
}
-
-
-}
+}
\ No newline at end of file
-//
+// To read PMD raw root data and fetch the adc value for each cell
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();
-
-
-
+
+ AliRawReaderRoot reader("raw.root",ievt);
+ // reader.NextEvent();
+ cout<<" Processing Event No : "<<ievt<<endl;
/*
- reader.ReadHeader();
- cout << "LDC ID = " << reader.GetLDCId() << endl;
- cout << "Equipment ID = " << reader.GetEquipmentId() << endl;
- cout << "Data Size = " << reader.GetDataSize() << endl;
+ 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);
-
+ junk = stream.DdlData(iddl,&pmdddlcont);
+
Int_t ientries = pmdddlcont.GetEntries();
for (Int_t ient = 0; ient < ientries; ient++)
{
Int_t row = pmdddl->GetRow();
Int_t col = pmdddl->GetColumn();
Int_t sig = pmdddl->GetSignal();
-
- // cout << row << " " << col << " " << sig << endl;
-
+
+ //cout << iddl<<" "<<row << " " << col << " " << sig << endl;
}
pmdddlcont.Clear();
-
}
-
-
-}
+}
\ No newline at end of file
gStyle->SetOptFit(1);
//****** File with the ESD
- TFile *ef=TFile::Open("AliESDcheck.root");
+ TFile *ef=TFile::Open("AliESDs.root");
if (!ef || !ef->IsOpen()) {cerr<<"Can't AliESDs.root !\n"; return 1;}
- AliESD* event = new AliESD;
+ AliESDEvent * event = new AliESDEvent;
TTree* tree = (TTree*) ef->Get("esdTree");
if (!tree) {cerr<<"no ESD tree found\n"; return 1;};
- tree->SetBranchAddress("ESD", &event);
-
+ event->ReadFromTree(tree);
Int_t n=0;
//******* The loop over events
while (npmdcl--) {
AliESDPmdTrack *pmdtr = event->GetPmdTrack(npmdcl);
- Int_t det = pmdtr->GetDetector();
- Float_t theta = pmdtr->GetTheta();
- Float_t phi = pmdtr->GetPhi();
+ Int_t det = pmdtr->GetDetector();
+ Float_t clsX = pmdtr->GetClusterX();
+ Float_t clsY = pmdtr->GetClusterY();
+ Float_t clsZ = pmdtr->GetClusterZ();
+ Float_t ncell = pmdtr->GetClusterCells();
Float_t adc = pmdtr->GetClusterADC();
Float_t pid = pmdtr->GetClusterPID();
}
}
+
+ delete event;
+
timer.Stop();
timer.Print();
return 0;
-}
+}
\ No newline at end of file