//If second input event available, add the clusters.
if(fSecondInputAODTree && fSecondInputAODEvent){
+ GetSecondInputAODVertex(v);
nclusters = ((AliAODEvent*)fSecondInputAODEvent)->GetNCaloClusters();
if(fDebug > 1) printf("AliCaloTrackAODReader::FillInputEMCAL() - Add second input clusters, entries %d\n", nclusters) ;
for (Int_t iclus = 0; iclus < nclusters; iclus++) {
if(fDebug > 1) printf("AliCaloTrackAODReader::FillInputPHOS() - aod entries %d\n", fAODPHOSNormalInputEntries);
//If second input event available, add the clusters.
- if(fSecondInputAODTree && fSecondInputAODEvent){
+ if(fSecondInputAODTree && fSecondInputAODEvent){
+ GetSecondInputAODVertex(v);
nclusters = ((AliAODEvent*)fSecondInputAODEvent)->GetNCaloClusters();
if(fDebug > 1) printf("AliCaloTrackAODReader::FillInputPHOS() - Add second input clusters, entries %d\n", nclusters);
for (Int_t iclus = 0; iclus < nclusters; iclus++) {
v[2] = ((AliAODEvent*)fInputEvent)->GetVertex(0)->GetZ() ;//CHECK!!!
}
+//____________________________________________________________________________
+void AliCaloTrackAODReader::GetSecondInputAODVertex(Double_t v[3]) const {
+ //Return vertex position of second AOD input
+
+ v[0] = ((AliAODEvent*)fSecondInputAODEvent)->GetVertex(0)->GetX() ;//CHECK!!!
+ v[1] = ((AliAODEvent*)fSecondInputAODEvent)->GetVertex(0)->GetY() ;//CHECK!!!
+ v[2] = ((AliAODEvent*)fSecondInputAODEvent)->GetVertex(0)->GetZ() ;//CHECK!!!
+}
+
//____________________________________________________________________________
Double_t AliCaloTrackAODReader::GetBField() const {
//Return magnetic field