const Bool_t expert = kTRUE ;
const Bool_t image = kTRUE ;
- char TDCname[100];
- char ADCname[100];
TH1I *fhDigTDC[64];
TH1I *fhDigADC[64];
- char texte[100];
// create Digits histograms in Digits subdir
TH1I * h0 = new TH1I("hDigitMultiplicity", "Digits multiplicity distribution in VZERO;# of Digits;Entries", 100, 0, 99) ;
for (Int_t i=0; i<64; i++)
{
- sprintf(TDCname, "hDigitTDC%d", i);
- sprintf(texte,"Digit TDC in cell %d; TDC value;Entries",i);
- fhDigTDC[i] = new TH1I(TDCname,texte,300,0.,149.);
-
- sprintf(ADCname,"hDigitADC%d",i);
- sprintf(texte,"Digit ADC in cell %d;ADC value;Entries",i);
- fhDigADC[i]= new TH1I(ADCname,texte,1024,0.,1023.);
+ fhDigTDC[i] = new TH1I(Form("hDigitTDC%d", i),Form("Digit TDC in cell %d; TDC value;Entries",i),300,0.,149.);
+ fhDigADC[i]= new TH1I(Form("hDigitADC%d", i),Form("Digit ADC in cell %d;ADC value;Entries",i),1024,0.,1023.);
Add2DigitsList(fhDigTDC[i],i+1, !expert, image);
Add2DigitsList(fhDigADC[i],i+1+64, !expert, image);
//____________________________________________________________________________
-void AliVZEROQADataMakerSim::MakeHits(TClonesArray * hits)
+void AliVZEROQADataMakerSim::MakeHits()
{
//make QA data from Hits
- // Check id histograms already created for this Event Specie
- if ( ! GetHitsData(0) )
- InitHits() ;
-
- GetHitsData(0)->Fill(hits->GetEntriesFast()) ; // fills Hit multiplicity
- Int_t nhits = hits->GetEntriesFast();
+ Int_t nhits = fHitsArray->GetEntriesFast();
+ GetHitsData(0)->Fill(nhits) ; // fills Hit multiplicity
for (Int_t ihit=0;ihit<nhits;ihit++)
{
- AliVZEROhit * VZEROHit = (AliVZEROhit*) hits->UncheckedAt(ihit);
+ AliVZEROhit * VZEROHit = (AliVZEROhit*) fHitsArray->UncheckedAt(ihit);
if (!VZEROHit) {
AliError("The unchecked hit doesn't exist");
break;
void AliVZEROQADataMakerSim::MakeHits(TTree *hitTree)
{
//fills QA histos for Hits
- TClonesArray * hits = new TClonesArray("AliVZEROhit", 1000);
+ if (fHitsArray)
+ fHitsArray->Clear() ;
+ else
+ fHitsArray = new TClonesArray("AliVZEROhit", 1000);
TBranch * branch = hitTree->GetBranch("VZERO") ;
if ( ! branch ) {
} else {
if (branch) {
- branch->SetAddress(&hits);
+ branch->SetAddress(&fHitsArray);
}else{
AliError("Branch VZERO hit not found");
exit(111);
// Start loop on tracks in the hits containers
for (Int_t track=0; track<ntracks;track++) {
branch->GetEntry(track);
- GetHitsData(0)->Fill(hits->GetEntriesFast()) ; // fills Hit multiplicity
- Int_t nhits = hits->GetEntriesFast();
+ Int_t nhits = fHitsArray->GetEntriesFast();
+ GetHitsData(0)->Fill(nhits) ; // fills Hit multiplicity
for (Int_t ihit=0;ihit<nhits;ihit++)
{
- AliVZEROhit * VZEROHit = (AliVZEROhit*) hits->UncheckedAt(ihit);
+ AliVZEROhit * VZEROHit = (AliVZEROhit*) fHitsArray->UncheckedAt(ihit);
if (!VZEROHit) {
AliError("The unchecked hit doesn't exist");
break;
//____________________________________________________________________________
-void AliVZEROQADataMakerSim::MakeDigits(TClonesArray * digits)
+void AliVZEROQADataMakerSim::MakeDigits()
{
// makes data from Digits
- // Check id histograms already created for this Event Specie
- if ( ! GetDigitsData(0) )
- InitDigits() ;
-
- GetDigitsData(0)->Fill(digits->GetEntriesFast()) ;
- TIter next(digits) ;
+ GetDigitsData(0)->Fill(fDigitsArray->GetEntriesFast()) ;
+ TIter next(fDigitsArray) ;
AliVZEROdigit *VZERODigit ;
while ( (VZERODigit = dynamic_cast<AliVZEROdigit *>(next())) ) {
Int_t PMNumber = VZERODigit->PMNumber();
{
// makes data from Digit Tree
- TClonesArray * digits = new TClonesArray("AliVZEROdigit", 1000) ;
+ if (fDigitsArray)
+ fDigitsArray->Clear() ;
+ else
+ fDigitsArray = new TClonesArray("AliVZEROdigit", 1000) ;
TBranch * branch = digitTree->GetBranch("VZERODigit") ;
if ( ! branch ) {
AliWarning("VZERO branch in Digit Tree not found") ;
} else {
- branch->SetAddress(&digits) ;
+ branch->SetAddress(&fDigitsArray) ;
branch->GetEntry(0) ;
- MakeDigits(digits) ;
+ MakeDigits() ;
}
}