Option_t* GetDetectors(){return fOpt;}
// Set response
- virtual void SetResponseModel(Int_t module, AliITSresponse *response){
- fDetTypeSim->SetResponseModel(module,response);}
+ virtual void SetResponseModel(Int_t dettype, AliITSresponse *response){
+ fDetTypeSim->SetResponseModel(dettype,response);}
// Set segmentation for Simulation
virtual void SetSegmentationModel(Int_t id, AliITSsegmentation *seg){
fDetTypeSim->SetSegmentationModel(id,seg);}
}
//_______________________________________________________________________
-void AliITSDetTypeRec::SetCalibrationModel(Int_t module,AliITSresponse *resp){
+void AliITSDetTypeRec::SetCalibrationModel(Int_t dettype,AliITSresponse *resp){
//Set segmentation model for module number
- if(fCalibration==0) fCalibration = new TObjArray(fGeom->GetIndexMax());
- if(fCalibration->At(module)!=0) delete fCalibration->At(module);
- fCalibration->AddAt(resp,module);
+ if(fCalibration==0) fCalibration = new TObjArray(fgkNdettypes);
+ if(fCalibration->At(dettype)!=0) delete fCalibration->At(dettype);
+ fCalibration->AddAt(resp,dettype);
}
//_______________________________________________________________________
-AliITSresponse* AliITSDetTypeRec::GetCalibrationModel(Int_t module){
+AliITSresponse* AliITSDetTypeRec::GetCalibrationModel(Int_t dettype){
//Get segmentation model for module number
Warning("GetalibrationModel","fResponse is 0!");
return 0;
}
- return (AliITSresponse*)fCalibration->At(module);
+ return (AliITSresponse*)fCalibration->At(dettype);
}
//______________________________________________________________________
if(dettype==0){
seg = new AliITSsegmentationSPD(fGeom);
SetSegmentationModel(dettype,seg);
+ SetCalibrationModel(dettype,new AliITSresponseSPD());
+ SetDigitClassName(dettype,"AliITSdigitSPD");
+ SetClusterClassName(dettype,"AliITSRawClusterSPD");
+
}
if(dettype==1){
res = new AliITSresponseSDD("simulated");
seg = new AliITSsegmentationSDD(fGeom,res);
SetSegmentationModel(dettype,seg);
+ SetCalibrationModel(dettype,new AliITSresponseSDD("simulated"));
+ const char *kopt = GetCalibrationModel(dettype)->ZeroSuppOption();
+ if((!strstr(kopt,"2D"))&&(!strstr(kopt,"1D"))) SetDigitClassName(dettype,"AliITSdigit");
+ else SetDigitClassName(dettype,"AliITSdigitSDD");
+ SetClusterClassName(dettype,"AliITSRawClusterSDD");
+
}
if(dettype==2){
AliITSsegmentationSSD* seg2 = new AliITSsegmentationSSD(fGeom);
seg2->SetAnglesLay6(0.0275,0.0075); // strip angels rad P and N side.
SetSegmentationModel(dettype,seg2);
- }
-
- }
-
- for(Int_t imod=0;imod<fGeom->GetIndexMax();imod++){
- Int_t dettype = fGeom->GetModuleType(imod);
- //SPD
- if(dettype==0){
- SetCalibrationModel(imod,new AliITSresponseSPD());
- SetDigitClassName(dettype,"AliITSdigitSPD");
- SetClusterClassName(dettype,"AliITSRawClusterSPD");
- }
- //SDD
- if(dettype==1){
- SetCalibrationModel(imod,new AliITSresponseSDD("simulated"));
- const char *kopt = GetCalibrationModel(imod)->ZeroSuppOption();
- if((!strstr(kopt,"2D"))&&(!strstr(kopt,"1D"))) SetDigitClassName(dettype,"AliITSdigit");
- else SetDigitClassName(dettype,"AliITSdigitSDD");
- SetClusterClassName(dettype,"AliITSRawClusterSDD");
- }
- //SSD
- if(dettype==2){
- SetCalibrationModel(imod,new AliITSresponseSSD("simulated"));
+ SetCalibrationModel(dettype,new AliITSresponseSSD("simulated"));
SetDigitClassName(dettype,"AliITSdigitSSD");
SetClusterClassName(dettype,"AliITSRawClusterSSD");
+
+
}
}
MakeTreeC();
- for(Int_t imod=0;imod<fGeom->GetIndexMax();imod++){
- Int_t dettype = fGeom->GetModuleType(imod);
+ for(Int_t dettype=0;dettype<fgkNdettypes;dettype++){
//SPD
if(dettype==0){
if(!GetReconstructionModel(dettype)){
if(dettype==1){
if(!GetReconstructionModel(dettype)){
seg = (AliITSsegmentation*)GetSegmentationModel(dettype);
- res = (AliITSresponse*)GetCalibrationModel(imod);
+ res = (AliITSresponse*)GetCalibrationModel(dettype);
TClonesArray *dig1 = DigitsAddress(1);
TClonesArray *rec1 = ClustersAddress(1);
clf = new AliITSClusterFinderSDD(seg,res,dig1,rec1);
}
//________________________________________________________________
-void AliITSDetTypeRec::SetDefaultClusterFindersV2(){
+void AliITSDetTypeRec::SetDefaultClusterFindersV2(Bool_t rawdata){
//Set defaults for cluster finder V2
AliITSClusterFinder *clf;
MakeTreeC();
- for(Int_t imod=0;imod<fGeom->GetIndexMax();imod++){
- Int_t dettype = fGeom->GetModuleType(imod);
+ for(Int_t dettype=0;dettype<fgkNdettypes;dettype++){
//SPD
if(dettype==0){
if(!GetReconstructionModel(dettype)){
clf = new AliITSClusterFinderV2SPD(fGeom);
clf->InitGeometry();
clf->SetSegmentation(seg);
- clf->SetDigits(DigitsAddress(0));
+ if(!rawdata) clf->SetDigits(DigitsAddress(0));
SetReconstructionModel(dettype,clf);
}
clf = new AliITSClusterFinderV2SDD(fGeom);
clf->InitGeometry();
clf->SetSegmentation(seg);
- clf->SetDigits(DigitsAddress(1));
+ if(!rawdata) clf->SetDigits(DigitsAddress(1));
SetReconstructionModel(dettype,clf);
}
clf = new AliITSClusterFinderV2SSD(fGeom);
clf->InitGeometry();
clf->SetSegmentation(seg);
- clf->SetDigits(DigitsAddress(2));
+ if(!rawdata) clf->SetDigits(DigitsAddress(2));
SetReconstructionModel(dettype,clf);
}
}
TClonesArray &lrecp = *fClustersV2;
new(lrecp[fNClustersV2++]) AliITSclusterV2(r);
-}
+ }
//______________________________________________________________________
void AliITSDetTypeRec::DigitsToRecPoints(Int_t evNumber,Int_t lastentry,Option_t *opt, Bool_t v2){
// none.
// Return:
// none.
- if(fGeom){
+ if(!fGeom){
Warning("DigitsToRecPoints","fGeom is null!");
return;
}
return;
}
- SetDefaultClusterFindersV2();
AliITSClusterFinderV2 *rec = 0;
Int_t id=0;
AliITSLoader* GetLoader() const {return fLoader;}
virtual void SetDefaults();
virtual void SetDefaultClusterFinders();
- virtual void SetDefaultClusterFindersV2();
+ virtual void SetDefaultClusterFindersV2(Bool_t rawdata=kFALSE);
virtual void MakeBranch(Option_t *opt);
virtual void SetTreeAddress();
virtual void SetTreeAddressD(TTree* treeD);
virtual void SetSegmentationModel(Int_t dettype, AliITSsegmentation *seg);
- virtual void SetCalibrationModel(Int_t module, AliITSresponse *cal);
+ virtual void SetCalibrationModel(Int_t dettype, AliITSresponse *cal);
virtual void SetReconstructionModel(Int_t dettype, AliITSClusterFinder *rec);
virtual AliITSsegmentation* GetSegmentationModel(Int_t dettype);
- virtual AliITSresponse* GetCalibrationModel(Int_t module);
+ virtual AliITSresponse* GetCalibrationModel(Int_t dettype);
virtual AliITSClusterFinder* GetReconstructionModel(Int_t dettype);
virtual void SetDigitClassName(Int_t i,Char_t *digit)
}
//_______________________________________________________________________
-void AliITSDetTypeSim::SetResponseModel(Int_t module,AliITSresponse *resp){
+void AliITSDetTypeSim::SetResponseModel(Int_t dettype,AliITSresponse *resp){
//Set segmentation model for module number
- if(fResponse==0) fResponse = new TObjArray(fGeom->GetIndexMax());
- fResponse->AddAt(resp,module);
+ if(fResponse==0) fResponse = new TObjArray(fgkNdettypes);
+ fResponse->AddAt(resp,dettype);
}
//______________________________________________________________________
void AliITSDetTypeSim::ResetResponse(){
}
//_______________________________________________________________________
-AliITSresponse* AliITSDetTypeSim::GetResponseModel(Int_t module){
+AliITSresponse* AliITSDetTypeSim::GetResponseModel(Int_t dettype){
//Get segmentation model for module number
Warning("GetResponseModel","fResponse is 0!");
return 0;
}
- return (AliITSresponse*)(fResponse->At(module));
+ return (AliITSresponse*)(fResponse->At(dettype));
}
//_______________________________________________________________________
void AliITSDetTypeSim::SetDefaults(){
return;
}
- if(!fResponse) fResponse = new TObjArray(fGeom->GetIndexMax());
+ if(!fResponse) fResponse = new TObjArray(fgkNdettypes);
AliITSsegmentation* seg;
AliITSresponse* res;
ResetResponse();
ResetSegmentation();
- for(Int_t imod=0;imod<fGeom->GetIndexMax();imod++){
- Int_t dettype = fGeom->GetModuleType(imod);
+ for(Int_t idet=0;idet<fgkNdettypes;idet++){
//SPD
- if(dettype==0){
- if(!GetSegmentationModel(dettype)){
+ if(idet==0){
+ if(!GetSegmentationModel(idet)){
seg = new AliITSsegmentationSPD(fGeom);
- SetSegmentationModel(dettype,seg);
+ SetSegmentationModel(idet,seg);
}
- if(!GetResponseModel(imod)){
+ if(!GetResponseModel(idet)){
res = new AliITSresponseSPD();
- SetResponseModel(imod,res);
+ SetResponseModel(idet,res);
}
- const char *kData0=(GetResponseModel(imod))->DataType();
+ const char *kData0=(GetResponseModel(idet))->DataType();
if (strstr(kData0,"real")) {
- SetDigitClassName(dettype,"AliITSdigit");
- } else SetDigitClassName(dettype,"AliITSdigitSPD");
+ SetDigitClassName(idet,"AliITSdigit");
+ } else SetDigitClassName(idet,"AliITSdigitSPD");
}
//SDD
- if(dettype==1){
- if(!GetResponseModel(imod)){
- SetResponseModel(imod,new AliITSresponseSDD("simulated"));
+ if(idet==1){
+ if(!GetResponseModel(idet)){
+ SetResponseModel(idet,new AliITSresponseSDD("simulated"));
}
- if(!GetSegmentationModel(dettype)){
- res = GetResponseModel(imod);
+ if(!GetSegmentationModel(idet)){
+ res = GetResponseModel(idet);
seg = new AliITSsegmentationSDD(fGeom,res);
- SetSegmentationModel(dettype,seg);
+ SetSegmentationModel(idet,seg);
}
- const char *kopt = GetResponseModel(imod)->ZeroSuppOption();
- if((!strstr(kopt,"2D"))&&(!strstr(kopt,"1D"))) SetDigitClassName(dettype,"AliITSdigit");
- else SetDigitClassName(dettype,"AliITSdigitSDD");
+ const char *kopt = GetResponseModel(idet)->ZeroSuppOption();
+ if((!strstr(kopt,"2D"))&&(!strstr(kopt,"1D"))) SetDigitClassName(idet,"AliITSdigit");
+ else SetDigitClassName(idet,"AliITSdigitSDD");
}
//SSD
- if(dettype==2){
- if(!GetSegmentationModel(dettype)){
+ if(idet==2){
+ if(!GetSegmentationModel(idet)){
seg = new AliITSsegmentationSSD(fGeom);
- SetSegmentationModel(dettype,seg);
+ SetSegmentationModel(idet,seg);
}
- if(!GetResponseModel(imod)){
- SetResponseModel(imod,new AliITSresponseSSD("simulated"));
+ if(!GetResponseModel(idet)){
+ SetResponseModel(idet,new AliITSresponseSSD("simulated"));
}
- const char *kData2 = (GetResponseModel(imod))->DataType();
+ const char *kData2 = (GetResponseModel(idet))->DataType();
if (strstr(kData2,"real")) {
- SetDigitClassName(dettype,"AliITSdigit");
- } else SetDigitClassName(dettype,"AliITSdigitSSD");
+ SetDigitClassName(idet,"AliITSdigit");
+ } else SetDigitClassName(idet,"AliITSdigitSSD");
}
return;
}
- if(!fResponse) fResponse = new TObjArray(fGeom->GetIndexMax());
+ if(!fResponse) fResponse = new TObjArray(fgkNdettypes);
AliITSsegmentation* seg;
AliITSresponse* res;
sim = GetSimulationModel(idet);
if(!sim){
seg = (AliITSsegmentationSPD*)GetSegmentationModel(idet);
- res = (AliITSresponseSPD*)GetResponseModel(fGeom->GetStartSPD());
+ res = (AliITSresponseSPD*)GetResponseModel(idet);
sim = new AliITSsimulationSPD(seg,res);
SetSimulationModel(idet,sim);
} else{
- sim->SetResponseModel(GetResponseModel(fGeom->GetStartSPD()));
+ sim->SetResponseModel(GetResponseModel(idet));
sim->SetSegmentationModel((AliITSsegmentationSPD*)GetSegmentationModel(idet));
sim->Init();
}
sim = GetSimulationModel(idet);
if(!sim){
seg = (AliITSsegmentationSDD*)GetSegmentationModel(idet);
- res = (AliITSresponseSDD*)GetResponseModel(fGeom->GetStartSDD());
+ res = (AliITSresponseSDD*)GetResponseModel(idet);
sim = new AliITSsimulationSDD(seg,res);
SetSimulationModel(idet,sim);
} else {
- sim->SetResponseModel((AliITSresponseSDD*)GetResponseModel(fGeom->GetStartSDD()));
+ sim->SetResponseModel((AliITSresponseSDD*)GetResponseModel(idet));
sim->SetSegmentationModel((AliITSsegmentationSDD*)GetSegmentationModel(idet));
sim->Init();
}
sim = GetSimulationModel(idet);
if(!sim){
seg = (AliITSsegmentationSSD*)GetSegmentationModel(idet);
- res = (AliITSresponseSSD*)GetResponseModel(fGeom->GetStartSSD());
+ res = (AliITSresponseSSD*)GetResponseModel(idet);
sim = new AliITSsimulationSSD(seg,res);
SetSimulationModel(idet,sim);
} else{
- sim->SetResponseModel((AliITSresponseSSD*)GetResponseModel(fGeom->GetStartSSD()));
+ sim->SetResponseModel((AliITSresponseSSD*)GetResponseModel(idet));
sim->SetSegmentationModel((AliITSsegmentationSSD*)GetSegmentationModel(idet));
sim->Init();
}
new(ldigits[fNDigits[branch]++]) AliITSdigitSPD(digits,tracks,hits);
break;
case 1:
- resp = (AliITSresponseSDD*)GetResponseModel(fGeom->GetStartSDD());
+ resp = (AliITSresponseSDD*)GetResponseModel(branch);
new(ldigits[fNDigits[branch]++]) AliITSdigitSDD(phys,digits,tracks,
hits,charges,resp);
break;
virtual AliITSsegmentation* GetSegmentationModel(Int_t dettype);
virtual AliITSsegmentation* GetSegmentationModelByModule(Int_t module);
- virtual void SetResponseModel(Int_t module,AliITSresponse *resp);
- virtual AliITSresponse* GetResponseModel(Int_t module);
+ virtual void SetResponseModel(Int_t dettype,AliITSresponse *resp);
+ virtual AliITSresponse* GetResponseModel(Int_t dettype);
TObjArray* GetResponse() const {return fResponse;}
TObjArray* GetSegmentation() const {return fSegmentation;}
s0 = (AliITSgeomSPD*) GetITSgeom()->GetShape(kSPD);// Get shape info.
if (s0) {
- AliITSresponse *resp0=0;
- Int_t nspd=0;
- for(Int_t nmod=0;nmod<GetITSgeom()->GetIndexMax();nmod++){
- if(GetITSgeom()->GetModuleType(nmod)==kSPD){
- resp0 = new AliITSresponseSPD();
- SetResponseModel(nmod,resp0);
- nspd=nmod;
- }
- }
+ AliITSresponse *resp0=new AliITSresponseSPD();
+ SetResponseModel(kSPD,resp0);
AliITSsegmentationSPD *seg0=new AliITSsegmentationSPD(GetITSgeom());
seg0->SetDetSize(s0->GetDx()*2.*kconv, // base this on AliITSgeomSPD
seg0->SetBinSize(bx,bz); // Based on AliITSgeomSPD for now.
SetSegmentationModel(kSPD,seg0);
// set digit and raw cluster classes to be used
- const char *kData0=(fDetTypeSim->GetResponseModel(nspd))->DataType();
+ const char *kData0=(fDetTypeSim->GetResponseModel(kSPD))->DataType();
if (strstr(kData0,"real"))
fDetTypeSim->SetDigitClassName(kSPD,"AliITSdigit");
else fDetTypeSim->SetDigitClassName(kSPD,"AliITSdigitSPD");
s1 = (AliITSgeomSDD*) GetITSgeom()->GetShape(kSDD);// Get shape info.
if (s1) {
- AliITSresponseSDD *resp1=0;
- Int_t nsdd=0;
- for(Int_t nmod=0;nmod<GetITSgeom()->GetIndexMax();nmod++){
- if(GetITSgeom()->GetModuleType(nmod)==kSDD){
- resp1 = new AliITSresponseSDD("simulated");
- SetResponseModel(nmod,resp1);
- nsdd=nmod;
- }
- }
- AliITSsegmentationSDD *seg1=new AliITSsegmentationSDD(GetITSgeom(),resp1);
- seg1->SetDetSize(s1->GetDx()*kconv, // base this on AliITSgeomSDD
- s1->GetDz()*4.*kconv, // for now.
- s1->GetDy()*4.*kconv); // x,z,y full width in microns.
- seg1->SetNPads(256,256);// Use AliITSgeomSDD for now
- SetSegmentationModel(kSDD,seg1);
- const char *kData1=(fDetTypeSim->GetResponseModel(nsdd))->DataType();
- const char *kopt=fDetTypeSim->GetResponseModel(GetITSgeom()->GetStartSDD())->ZeroSuppOption();
- if((!strstr(kopt,"2D")) && (!strstr(kopt,"1D")) || strstr(kData1,"real") ){
- fDetTypeSim->SetDigitClassName(kSDD,"AliITSdigit");
+ AliITSresponseSDD *resp1=new AliITSresponseSDD("simulated");
+ SetResponseModel(kSDD,resp1);
+ AliITSsegmentationSDD *seg1=new AliITSsegmentationSDD(GetITSgeom(),resp1);
+ seg1->SetDetSize(s1->GetDx()*kconv, // base this on AliITSgeomSDD
+ s1->GetDz()*4.*kconv, // for now.
+ s1->GetDy()*4.*kconv); // x,z,y full width in microns.
+ seg1->SetNPads(256,256);// Use AliITSgeomSDD for now
+ SetSegmentationModel(kSDD,seg1);
+ const char *kData1=(fDetTypeSim->GetResponseModel(kSDD))->DataType();
+ const char *kopt=fDetTypeSim->GetResponseModel(kSDD)->ZeroSuppOption();
+ if((!strstr(kopt,"2D")) && (!strstr(kopt,"1D")) || strstr(kData1,"real") ){
+ fDetTypeSim->SetDigitClassName(kSDD,"AliITSdigit");
} else fDetTypeSim->SetDigitClassName(kSDD,"AliITSdigitSDD");
}
s2 = (AliITSgeomSSD*) GetITSgeom()->GetShape(kSSD);// Get shape info. Do it this way for now.
if (s2) {
- AliITSresponse *resp2=0;
- Int_t nssd=0;
- for(Int_t nmod=0;nmod<GetITSgeom()->GetIndexMax();nmod++){
- if(GetITSgeom()->GetModuleType(nmod)==kSSD){
- resp2 = new AliITSresponseSSD("simulated");
- SetResponseModel(nmod,resp2);
- nssd=nmod;
- }
- }
+ AliITSresponse *resp2=new AliITSresponseSSD("simulated");
+ SetResponseModel(kSSD,resp2);
AliITSsegmentationSSD *seg2=new AliITSsegmentationSSD(GetITSgeom());
seg2->SetDetSize(s2->GetDx()*2.*kconv, // base this on AliITSgeomSSD
seg2->SetAnglesLay5(0.0075,0.0275); // strip angels rad P and N side.
seg2->SetAnglesLay6(0.0275,0.0075); // strip angels rad P and N side.
SetSegmentationModel(kSSD,seg2);
- const char *kData2=(fDetTypeSim->GetResponseModel(nssd))->DataType();
+ const char *kData2=(fDetTypeSim->GetResponseModel(kSSD))->DataType();
if(strstr(kData2,"real") ) fDetTypeSim->SetDigitClassName(kSSD,"AliITSdigit");
else fDetTypeSim->SetDigitClassName(kSSD,"AliITSdigitSSD");
}
fDetTypeSim->ResetSegmentation();
//SPD
s0 = (AliITSgeomSPD*) GetITSgeom()->GetShape(kSPD);// Get shape info. Do it this way for now.
- AliITSresponseSPD* resp0=0;
- for(Int_t nspd=GetITSgeom()->GetStartSPD();nspd<=GetITSgeom()->GetLastSPD();nspd++){
- resp0 = new AliITSresponseSPD();
- SetResponseModel(nspd,resp0);
- }
+ AliITSresponseSPD* resp0=new AliITSresponseSPD();
+ SetResponseModel(kSPD,resp0);
+
AliITSsegmentationSPD *seg0=new AliITSsegmentationSPD(GetITSgeom());
seg0->SetDetSize(s0->GetDx()*2.*kconv, // base this on AliITSgeomSPD
s0->GetDz()*2.*kconv, // for now.
seg0->SetBinSize(bx,bz); // Based on AliITSgeomSPD for now.
SetSegmentationModel(kSPD,seg0);
// set digit and raw cluster classes to be used
- const char *kData0=(fDetTypeSim->GetResponseModel(GetITSgeom()->GetStartSPD()))->DataType();
+ const char *kData0=(fDetTypeSim->GetResponseModel(kSPD))->DataType();
if (strstr(kData0,"real")) fDetTypeSim->SetDigitClassName(kSPD,"AliITSdigit");
else fDetTypeSim->SetDigitClassName(kSPD,"AliITSdigitSPD");
// SDD
s1 = (AliITSgeomSDD*) GetITSgeom()->GetShape(kSDD);// Get shape info. Do it this way for now.
- AliITSresponseSDD* resp1=0;
- for(Int_t nsdd=GetITSgeom()->GetStartSDD();nsdd<=GetITSgeom()->GetLastSDD();nsdd++){
- resp1 = new AliITSresponseSDD("simulated");
- SetResponseModel(nsdd,resp1);
- }
+ AliITSresponseSDD* resp1=new AliITSresponseSDD("simulated");
+ SetResponseModel(kSDD,resp1);
AliITSsegmentationSDD *seg1=new AliITSsegmentationSDD(GetITSgeom(),resp1);
seg1->SetDetSize(s1->GetDx()*kconv, // base this on AliITSgeomSDD
s1->GetDy()*2.*kconv); // x,z,y full width in microns.
seg1->SetNPads(256,256);// Use AliITSgeomSDD for now
SetSegmentationModel(kSDD,seg1);
- const char *kData1=(fDetTypeSim->GetResponseModel(GetITSgeom()->GetStartSDD()))->DataType();
- const char *kopt=fDetTypeSim->GetResponseModel(GetITSgeom()->GetStartSDD())->ZeroSuppOption();
+ const char *kData1=(fDetTypeSim->GetResponseModel(kSDD))->DataType();
+ const char *kopt=fDetTypeSim->GetResponseModel(kSDD)->ZeroSuppOption();
if((!strstr(kopt,"2D")) && (!strstr(kopt,"1D")) || strstr(kData1,"real") ){
fDetTypeSim->SetDigitClassName(kSDD,"AliITSdigit");
} else fDetTypeSim->SetDigitClassName(kSDD,"AliITSdigitSDD");
// SSD Layer 5
+
s2 = (AliITSgeomSSD*) GetITSgeom()->GetShape(kSSD);// Get shape info. Do it this way for now.
- for(Int_t nssd=GetITSgeom()->GetStartSSD();nssd<=GetITSgeom()->GetLastSSD();nssd++){
- SetResponseModel(nssd,new AliITSresponseSSD("simulated"));
- }
+ SetResponseModel(kSSD,new AliITSresponseSSD("simulated"));
AliITSsegmentationSSD *seg2=new AliITSsegmentationSSD(GetITSgeom());
seg2->SetDetSize(s2->GetDx()*2.*kconv, // base this on AliITSgeomSSD
seg2->SetAnglesLay5(0.0075,0.0275); // strip angels rad P and N side.
seg2->SetAnglesLay6(0.0275,0.0075); // strip angels rad P and N side.
SetSegmentationModel(kSSD,seg2);
- const char *kData2=(fDetTypeSim->GetResponseModel(GetITSgeom()->GetStartSSD()))->DataType();
+ const char *kData2=(fDetTypeSim->GetResponseModel(kSSD))->DataType();
if(strstr(kData2,"real") ) fDetTypeSim->SetDigitClassName(kSSD,"AliITSdigit");
else fDetTypeSim->SetDigitClassName(kSSD,"AliITSdigitSSD");
if(fgkNTYPES>3){
AliITSgeomSDD *s1;
AliITSgeomSSD *s2;
- for(Int_t nmod=0;nmod<GetITSgeom()->GetIndexMax();nmod++){
- if(GetITSgeom()->GetModuleType(nmod)==kSPD)SetResponseModel(nmod,new AliITSresponseSPD());
- }
-
+ SetResponseModel(kSPD,new AliITSresponseSPD());
SetSegmentationModel(kSPD,new AliITSsegmentationSPD());
fDetTypeSim->SetDigitClassName(kSPD,"AliITSdigitSPD");
// SDD
s1 = (AliITSgeomSDD*) GetITSgeom()->GetShape(kSDD);// Get shape info. Do it this way for now.
- AliITSresponseSDD *resp1=0;
- Int_t nsdd=0;
-
- for(Int_t nmod=0;nmod<GetITSgeom()->GetIndexMax();nmod++){
- if(GetITSgeom()->GetModuleType(nmod)==kSDD){
- resp1 = new AliITSresponseSDD("simulated");
- SetResponseModel(nmod,resp1);
- nsdd=nmod;
- }
- }
-
+ AliITSresponseSDD *resp1=new AliITSresponseSDD("simulated");
+ SetResponseModel(kSDD,resp1);
AliITSsegmentationSDD *seg1=new AliITSsegmentationSDD(GetITSgeom(),resp1);
seg1->SetDetSize(s1->GetDx()*kconv, // base this on AliITSgeomSDD
seg1->SetNPads(256,256);// Use AliITSgeomSDD for now
SetSegmentationModel(kSDD,seg1);
- const char *kData1=(fDetTypeSim->GetResponseModel(nsdd))->DataType();
- const char *kopt=fDetTypeSim->GetResponseModel(nsdd)->ZeroSuppOption();
+ const char *kData1=(fDetTypeSim->GetResponseModel(kSDD))->DataType();
+ const char *kopt=fDetTypeSim->GetResponseModel(kSDD)->ZeroSuppOption();
if((!strstr(kopt,"2D")) && (!strstr(kopt,"1D")) || strstr(kData1,"real") ){
fDetTypeSim->SetDigitClassName(kSDD,"AliITSdigit");
} else fDetTypeSim->SetDigitClassName(kSDD,"AliITSdigitSDD");
s2 = (AliITSgeomSSD*) GetITSgeom()->GetShape(kSSD);// Get shape info. Do it this way for now.
- AliITSresponse *resp2=0;
- Int_t nssd=0;
- for(Int_t nmod=0;nmod<GetITSgeom()->GetIndexMax();nmod++){
- if(GetITSgeom()->GetModuleType(nmod)==kSSD){
- resp2 = new AliITSresponseSSD("simulated");
- SetResponseModel(nmod,resp2);
- nssd=nmod;
- }
- }
-
+ AliITSresponse *resp2= new AliITSresponseSSD("simulated");
+ SetResponseModel(kSSD,resp2);
AliITSsegmentationSSD *seg2=new AliITSsegmentationSSD(GetITSgeom());
seg2->SetDetSize(s2->GetDx()*2.*kconv, // base this on AliITSgeomSSD
seg2->SetAnglesLay6(0.,0.); // strip angles rad P and N side.
SetSegmentationModel(kSSD,seg2);
- const char *kData2=(fDetTypeSim->GetResponseModel(nsdd))->DataType();
+ const char *kData2=(fDetTypeSim->GetResponseModel(kSSD))->DataType();
if(strstr(kData2,"real") ) fDetTypeSim->SetDigitClassName(kSSD,"AliITSdigit");
else fDetTypeSim->SetDigitClassName(kSSD,"AliITSdigitSSD");
AliITSsimulation *sim;
AliITSsegmentation *seg;
AliITSresponse *res;
- Int_t nspd =0;
- Int_t nsdd =0;
- Int_t nssd =0;
- for(Int_t i=0;i<GetITSgeom()->GetIndexMax();i++){
- if(GetITSgeom()->GetModuleType(i)==kSPD) nspd=i;
- if(GetITSgeom()->GetModuleType(i)==kSDD) nsdd=i;
- if(GetITSgeom()->GetModuleType(i)==kSSD) nssd=i;
- }
//SPD
if(fDetTypeSim){
sim = fDetTypeSim->GetSimulationModel(kSPD);
if (!sim) {
seg =(AliITSsegmentation*)fDetTypeSim->GetSegmentationModel(kSPD);
if(seg==0) seg = new AliITSsegmentationSPD();
- res = (AliITSresponse*)fDetTypeSim->GetResponseModel(nspd);
+ res = (AliITSresponse*)fDetTypeSim->GetResponseModel(kSPD);
if(res==0) res = new AliITSresponseSPD();
sim = new AliITSsimulationSPDdubna(seg,res,0);
SetSimulationModel(kSPD,sim);
}else{ // simulation exists, make sure it is set up properly.
sim->SetSegmentationModel((AliITSsegmentation*)fDetTypeSim->GetSegmentationModel(kSPD));
- sim->SetResponseModel((AliITSresponse*)fDetTypeSim->GetResponseModel(nspd));
+ sim->SetResponseModel((AliITSresponse*)fDetTypeSim->GetResponseModel(kSPD));
sim->Init();
} // end if
} // end if iDetType
sim = fDetTypeSim->GetSimulationModel(kSDD);
if (!sim) {
seg = (AliITSsegmentation*)fDetTypeSim->GetSegmentationModel(kSDD);
- res = (AliITSresponse*)fDetTypeSim->GetResponseModel(nsdd);
+ res = (AliITSresponse*)fDetTypeSim->GetResponseModel(kSDD);
sim = new AliITSsimulationSDD(seg,res);
SetSimulationModel(kSDD,sim);
}else{ // simulation exists, make sure it is set up properly.
sim->SetSegmentationModel((AliITSsegmentation*)fDetTypeSim->GetSegmentationModel(kSDD));
- sim->SetResponseModel((AliITSresponse*)fDetTypeSim->GetResponseModel(nsdd));
+ sim->SetResponseModel((AliITSresponse*)fDetTypeSim->GetResponseModel(kSDD));
sim->Init();
} //end if
sim = fDetTypeSim->GetSimulationModel(kSSD);
if (!sim) {
seg = (AliITSsegmentation*)fDetTypeSim->GetSegmentationModel(kSSD);
- res = (AliITSresponse*)fDetTypeSim->GetResponseModel(nsdd);
+ res = (AliITSresponse*)fDetTypeSim->GetResponseModel(kSSD);
sim = new AliITSsimulationSSD(seg,res);
SetSimulationModel(kSSD,sim);
}else{ // simulation exists, make sure it is set up properly.
sim->SetSegmentationModel((AliITSsegmentation*)fDetTypeSim->GetSegmentationModel(kSSD));
- sim->SetResponseModel((AliITSresponse*)fDetTypeSim->GetResponseModel(nssd));
+ sim->SetResponseModel((AliITSresponse*)fDetTypeSim->GetResponseModel(kSSD));
sim->Init();
} // end if
} // end if iDetType
//SPD
// Get shape info. Do it this way for now.
s0 = (AliITSgeomSPD*) GetITSgeom()->GetShape(kSPD);
- AliITSresponse *resp0=0;
- for(Int_t nmod=0;nmod<GetITSgeom()->GetIndexMax();nmod++){
- if(GetITSgeom()->GetModuleType(nmod)==kSPD){
- resp0 = new AliITSresponseSPD();
- resp0->SetTemperature();
- resp0->SetDistanceOverVoltage();
- SetResponseModel(nmod,resp0);
- }
- }
+ AliITSresponse *resp0=new AliITSresponseSPD();
+ resp0->SetTemperature();
+ resp0->SetDistanceOverVoltage();
+ SetResponseModel(kSPD,resp0);
+
AliITSsegmentationSPD *seg0=new AliITSsegmentationSPD(GetITSgeom());
seg0->SetDetSize(s0->GetDx()*2.*kconv, // base this on AliITSgeomSPD
s0->GetDz()*2.*kconv, // for now.
seg0->SetBinSize(bx,bz); // Based on AliITSgeomSPD for now.
SetSegmentationModel(kSPD,seg0);
// set digit and raw cluster classes to be used
- const char *kData0=(fDetTypeSim->GetResponseModel(GetITSgeom()->GetStartSPD()))->DataType();
+ const char *kData0=(fDetTypeSim->GetResponseModel(kSPD))->DataType();
if (strstr(kData0,"real")) fDetTypeSim->SetDigitClassName(kSPD,"AliITSdigit");
else fDetTypeSim->SetDigitClassName(kSPD,"AliITSdigitSPD");
// SetSimulationModel(kSPD,new AliITSsimulationSPDdubna(seg0,resp0));
AliITSsimulation *sim;
AliITSsegmentation *seg;
AliITSresponse *res;
- if(fDetTypeSim){
- sim = fDetTypeSim->GetSimulationModel(kSPD);
- if (!sim) {
- seg = (AliITSsegmentation*)fDetTypeSim->GetSegmentationModel(kSPD);
- res = (AliITSresponse*)fDetTypeSim->GetResponseModel(GetITSgeom()->GetStartSPD());
- sim = new AliITSsimulationSPDdubna(seg,res,0);
- SetSimulationModel(kSPD,sim);
- }else{ // simulation exists, make sure it is set up properly.
- sim->SetResponseModel((AliITSresponse*)fDetTypeSim->GetResponseModel(kSPD));
- sim->SetSegmentationModel((AliITSsegmentation*)fDetTypeSim->GetSegmentationModel(kSPD));
- sim->Init();
- } // end if
- } // end if iDetType
-
+ if(fDetTypeSim){
+ sim = fDetTypeSim->GetSimulationModel(kSPD);
+ if (!sim) {
+ seg = (AliITSsegmentation*)fDetTypeSim->GetSegmentationModel(kSPD);
+ res = (AliITSresponse*)fDetTypeSim->GetResponseModel(kSPD);
+ sim = new AliITSsimulationSPDdubna(seg,res,0);
+ SetSimulationModel(kSPD,sim);
+ }else{ // simulation exists, make sure it is set up properly.
+ sim->SetResponseModel((AliITSresponse*)fDetTypeSim->GetResponseModel(kSPD));
+ sim->SetSegmentationModel((AliITSsegmentation*)fDetTypeSim->GetSegmentationModel(kSPD));
+ sim->Init();
+ } // end if
+ } // end if iDetType
+
/*
- if(fDetTypeSim){
+ if(fDetTypeSim){
sim = fDetTypeSim->GetSimulationModel(kSDD);
if (!sim) {
seg = (AliITSsegmentation*)fDetTypeSim->GetSegmentationModel(kSDD);
// Get shape info. Do it this way for now.
s0 = (AliITSgeomSSD*) GetITSgeom()->GetShape(kSSD);
- AliITSresponse *resp0=0;
- Int_t nssd=0;
-
- for(Int_t nmod=0;nmod<GetITSgeom()->GetIndexMax();nmod++){
- if(GetITSgeom()->GetModuleType(nmod)==kSSD){
- resp0= new AliITSresponseSSD("simulated");
- SetResponseModel(nmod,resp0);
- nssd=nmod;
- }
- }
-
+ AliITSresponse *resp0=new AliITSresponseSSD("simulated");
+ SetResponseModel(kSSD,resp0);
AliITSsegmentationSSD *seg0=new AliITSsegmentationSSD(GetITSgeom());
seg0->SetDetSize(s0->GetDx()*2.*kconv, // base this on AliITSgeomSSD
SetSegmentationModel(kSSD,seg0);
// set digit and raw cluster classes to be used
- const char *kData0=(fDetTypeSim->GetResponseModel(nssd))->DataType();
+ const char *kData0=(fDetTypeSim->GetResponseModel(kSSD))->DataType();
if (strstr(kData0,"real")) fDetTypeSim->SetDigitClassName(kSSD,"AliITSdigit");
else fDetTypeSim->SetDigitClassName(kSSD,"AliITSdigitSSD");
// SetSimulationModel(kSSD,new AliITSsimulationSSD(seg0,resp0));
AliITSsimulation *sim;
AliITSsegmentation *seg;
AliITSresponse *res;
- Int_t nspd=0;
- Int_t nsdd=0;
- Int_t nssd=0;
- for(Int_t i=0;i<GetITSgeom()->GetIndexMax();i++){
- if(GetITSgeom()->GetModuleType(i)==kSPD) nspd=i;
- if(GetITSgeom()->GetModuleType(i)==kSDD) nsdd=i;
- if(GetITSgeom()->GetModuleType(i)==kSSD) nssd=i;
- }
/*
//SPD
if(fDetTypeSim){
sim = fDetTypeSim->GetSimulationModel(kSSD);
if (!sim) {
seg = (AliITSsegmentation*)fDetTypeSim->GetSegmentationModel(kSSD);
- res = (AliITSresponse*)fDetTypeSim->GetResponseModel(nssd);
+ res = (AliITSresponse*)fDetTypeSim->GetResponseModel(kSSD);
sim = new AliITSsimulationSSD(seg,res);
SetSimulationModel(kSSD,sim);
}else{ // simulation exists, make sure it is set up properly.
sim->SetSegmentationModel((AliITSsegmentation*)fDetTypeSim->GetSegmentationModel(kSSD));
- sim->SetResponseModel((AliITSresponse*)fDetTypeSim->GetResponseModel(nssd));
+ sim->SetResponseModel((AliITSresponse*)fDetTypeSim->GetResponseModel(kSSD));
((AliITSsimulation*)sim)->Init();
// if(sim->GetResponseModel()==0) sim->SetResponseModel(
// (AliITSresponse*)iDetType->GetResponseModel());