/*
$Id$
$Log$
+ Revision 1.37 2002/10/14 14:57:07 hristov
+ Merging the VirtualMC branch to the main development branch (HEAD)
+
+ Revision 1.32.4.4 2002/10/14 13:14:08 hristov
+ Updating VirtualMC to v3-09-02
+
+ Revision 1.36 2002/09/11 10:32:41 hristov
+ Use new for arrays with variable size
+
+ Revision 1.35 2002/09/09 17:23:28 nilsen
+ Minor changes in support of changes to AliITSdigitS?D class'.
+
+ Revision 1.34 2002/06/07 16:32:28 nilsen
+ Latest SDD changes to speed up the SDD simulation code.
+
Revision 1.33 2002/04/24 22:02:31 nilsen
New SDigits and Digits routines, and related changes, (including new
noise values).
*/
-#include <iostream.h>
+#include <Riostream.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
} // end if
const char *kopt=fResponse->ZeroSuppOption();
- if (strstr(fParam,"file") ) {
+ if (strstr(fParam.Data(),"file") ) {
fD.Set(fNofMaps);
fT1.Set(fNofMaps);
if (strstr(kopt,"2D")) {
//____________________________________________
void AliITSsimulationSDD::AddDigit( Int_t i, Int_t j, Int_t signal ) {
// Adds a Digit.
- Int_t digits[3], tracks[3], hits[3];
- Float_t phys, charges[3];
+ Int_t size = AliITSdigitSPD::GetNTracks();
+ Int_t digits[3];
+ Int_t * tracks = new Int_t[size];
+ Int_t * hits = new Int_t[size];
+ Float_t phys;
+ Float_t * charges = new Float_t[size];
if( fResponse->Do10to8() ) signal = Convert8to10( signal );
digits[0] = i;
AliITSpListItem *pItem = fpList->GetpListItem( i, j );
if( pItem == 0 ) {
phys = 0.0;
- for( Int_t l=0; l<3; l++ ) {
+ for( Int_t l=0; l<size; l++ ) {
tracks[l] = 0;
hits[l] = 0;
charges[l] = 0.0;
if( idtrack >= 0 ) phys = pItem->GetSignal();
else phys = 0.0;
- for( Int_t l=0; l<3; l++ ) {
+ for( Int_t l=0; l<size; l++ ) if(l<pItem->GetMaxKept()) {
tracks[l] = pItem->GetTrack( l );
hits[l] = pItem->GetHit( l );
charges[l] = pItem->GetSignal( l );
- }
+ }else{
+ tracks[l] = -3;
+ hits[l] = -1;
+ charges[l] = 0.0;
+ }// end for if
}
fITS->AddSimDigit( 1, phys, digits, tracks, hits, charges );
+ delete [] tracks;
+ delete [] hits;
+ delete [] charges;
}
/*
// Albert W.) :
// Read 2D zero-suppression parameters for SDD
- if (!strstr(fParam,"file")) return;
+ if (!strstr(fParam.Data(),"file")) return;
Int_t na,pos,tempTh;
Float_t mu,sigma;
// Torino people should give input
// Read 1D zero-suppression parameters for SDD
- if (!strstr(fParam,"file")) return;
+ if (!strstr(fParam.Data(),"file")) return;
Int_t na,pos,tempTh;
Float_t mu,sigma;