+Bool_t AliITSPlaneEffSPD::FillHistos(UInt_t key, Bool_t found,
+ Float_t *tr, Float_t *clu, Int_t *csize, Float_t *angtrkmod) {
+//
+// depending on the value of key this method
+// either call the standard one for clusters
+// or the one for FO studies
+// if key < 1200 --> call FillHistosST
+// if key >= 1200 --> call FillHistosFO
+if(key>=kNModule*kNChip*(kNClockPhase+1))
+ {AliError("GetChipFromKey: you asked for a non existing key"); return kFALSE;}
+if(key<kNModule*kNChip) return FillHistosStd(key,found,tr,clu,csize,angtrkmod);
+else return FillHistosFO(key,found,tr);
+return kFALSE;
+}
+//__________________________________________________________
+Bool_t AliITSPlaneEffSPD::FillHistosFO(UInt_t key, Bool_t found, Float_t *tr) {
+// this method fill the histograms for FastOr studies
+// input: - key: unique key of the basic block
+// - found: Boolean to asses whether a FastOr bit has been associated to the track or not
+// - tr[0],tr[1] local X and Z coordinates of the track prediction, respectively
+// - tr[2],tr[3] error on local X and Z coordinates of the track prediction, respectively
+// output: kTRUE if filling was succesfull kFALSE otherwise
+// side effects: updating of the histograms.
+ if (!fHis) {
+ AliWarning("FillHistos: histograms do not exist! Call SetCreateHistos(kTRUE) first");
+ return kFALSE;
+ }
+ if(key>=kNModule*kNChip*(kNClockPhase+1))
+ {AliWarning("FillHistos: you asked for a non existing key"); return kFALSE;}
+ if(key<kNModule*kNChip)
+ {AliWarning("FillHistos: you asked for a key which is not for FO studies"); return kFALSE;}
+ Int_t id=GetModFromKey(key);
+ Int_t BCm4=GetBCm4FromKey(key);
+ if(id>=kNHisto)
+ {AliWarning("FillHistos: you want to fill a non-existing histos"); return kFALSE;}
+ if(found) {
+ fHisTrackXFOtrue[id][BCm4]->Fill(tr[0]);
+ fHisTrackZFOtrue[id][BCm4]->Fill(tr[1]);
+ fHisTrackXZFOtrue[id][BCm4]->Fill(tr[1],tr[0]);
+ }
+ else {
+ fHisTrackXFOfalse[id][BCm4]->Fill(tr[0]);
+ fHisTrackZFOfalse[id][BCm4]->Fill(tr[1]);
+ fHisTrackXZFOfalse[id][BCm4]->Fill(tr[1],tr[0]);
+ }
+return kTRUE;
+}
+//__________________________________________________________
+Bool_t AliITSPlaneEffSPD::FillHistosStd(UInt_t key, Bool_t found,