MINOS
UCL MINOS Homepage
Back to my MINOS
OK. So I was trying to output the PID data in the eventdisplay, so I could look for muons in the special muon/pion Cerenkov runs we took.
So I made the following modifications to SetUpDisplay.C:
chain->SetBranchAddress("Snarl",&snarl);
chain->SetBranchAddress("UnTrackedHitInfo",&clonearray_un);
chain->SetBranchAddress("XTalkHitInfo",&clonearray_x);
chain->SetBranchAddress("TrackInfo",&cdti);
chain->SetBranchAddress("PIDInfo",&clonearray_pid);
if(cdto->Cosmic()||true){
chain->SetBranchAddress("StraightTrackedHitInfo",&clonearray);
}
else{
chain->SetBranchAddress("TrackedHitInfo",&clonearray);
}
And also to DrawDisplay.cxx:
if(clonearray_un){
TClonesArray &unc = *clonearray_un;
int clonesize = clonearray_un->GetEntries();
cout << "UN entries: " << clonearray_un->GetEntries() << endl;
int ind = 0;
while(ind
CDTrackedHitInfo *cdthi = (CDTrackedHitInfo*) unc[ind];
event[cdthi->GetPlane()][(cdthi->GetEnd()-1)*24+cdthi->GetStrip()]
=cdthi->GetCharge(digiType);
trTime[cdthi->GetPlane()][(cdthi->GetEnd()-1)*24+cdthi->GetStrip()]
= 1e9*(cdthi->GetTime() - cdti->GetAbsTime());
cout << "U: " << cdthi->GetEnd() << " "
<< cdthi->GetPlane() << " "
<< cdthi->GetStrip() << " "
<< cdthi->GetTime() << " "
<< 1e9*(cdthi->GetTime() + cdti->GetAbsTime())
<< endl;
ind++;
}
}
if(clonearray_pid){
cout << "PID exists" << endl;
TClonesArray &pidc = *clonearray_pid;
int clonesize = clonearray_pid->GetEntries();
cout << "PID Entries: " << clonearray_pid->GetEntries() << endl;
int ind = 0;
while(ind < clonesize) {
CDPIDInfo *cdpidi = (CDPIDInfo*) pidc[ind];
cout << "*COV*: " << cdpidi->GetKovADC3() << " " << cdpidi->GetKovADC2() << " " << cdpidi->GetTickSinceLast() << endl;
ind++;
}
}
if(clonearray_x){
TClonesArray &xc = *clonearray_x;
int clonesize = clonearray_x->GetEntries();
int ind = 0;
while(ind
int xdigiType = 1;
if(digiType==1) xdigiType=3;
event[cdxhi->GetPlane()][(cdxhi->GetEnd()-1)*24+cdxhi->GetStrip()]
= cdxhi->GetCharge(xdigiType);
xtalk[cdxhi->GetPlane()][(cdxhi->GetEnd()-1)*24+cdxhi->GetStrip()]
=1;
trTime[cdxhi->GetPlane()][(cdxhi->GetEnd()-1)*24+cdxhi->GetStrip()]
= 1e9*(cdxhi->GetTime() - cdti->GetAbsTime());
cout << "X: " << cdxhi->GetEnd() << " "
<< cdxhi->GetPlane() << " "
<< cdxhi->GetStrip() << " "
<< cdxhi->GetTime() << " "
<< 1e9*(cdxhi->GetTime() + cdti->GetAbsTime())
<< endl;
ind++;
}
}
int ncol = 5;
int col[5];
The output of which was either:
UN entries: 17
U: 1 9 17 0.957796 1.91559e+09
U: 2 12 1 0.957795 1.91559e+09
.
.
.
U: 2 24 14 0.957795 1.91559e+09
U: 1 26 14 0.957796 1.91559e+09
PID exists
PID Entries: 0
or:
PID exists
./runDisplay.sh: line 11: 24263 Segmentation fault loon SetUpDisplay.C
depending on what run I looked at.
At the moment I'm more concerned about the first one; if I open up a TBrowser on the root file I'm using, the PIDInfo branch is clearly there. Can you have a quick look and see if I've made any obvious mistakes in my code? Or do I have to add anything to any of the files in CalDetTracker?