Forward kinematic ranges to entries only if not set by user.
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 18 Jun 2001 13:07:30 +0000 (13:07 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 18 Jun 2001 13:07:30 +0000 (13:07 +0000)
EVGEN/AliGenCocktail.cxx

index 24fd346..364322d 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.11  2001/01/30 09:23:12  hristov
+Streamers removed (R.Brun)
+
 Revision 1.10  2001/01/26 19:55:49  hristov
 Major upgrade of AliRoot code
 
@@ -78,18 +81,19 @@ AddGenerator(AliGenerator *Generator, char* Name, Float_t RateExp)
 {
 //
 //  Forward parameters to the new generator
-    if(TestBit(kPtRange)) 
-    Generator->SetPtRange(fPtMin,fPtMax);
-    if(TestBit(kMomentumRange))
-    Generator->SetMomentumRange(fPMin,fPMax);
-
-    Generator->SetYRange(fYMin,fYMax);
-    Generator->
-       SetPhiRange(fPhiMin*180/TMath::Pi(),fPhiMax*180/TMath::Pi());
-    Generator->
-       SetThetaRange(fThetaMin*180/TMath::Pi(),fThetaMax*180/TMath::Pi());
-    Generator->
-       SetOrigin(fOrigin[0], fOrigin[1], fOrigin[2]);
+    if(TestBit(kPtRange) && !(Generator->TestBit(kPtRange)) && !(Generator->TestBit(kMomentumRange))) 
+       Generator->SetPtRange(fPtMin,fPtMax);
+    if(TestBit(kMomentumRange) && !(Generator->TestBit(kPtRange)) && !(Generator->TestBit(kMomentumRange)))
+       Generator->SetMomentumRange(fPMin,fPMax);
+    
+    if (!(Generator->TestBit(kYRange)))    
+       Generator->SetYRange(fYMin,fYMax);
+    if (!(Generator->TestBit(kPhiRange)))   
+       Generator->SetPhiRange(fPhiMin*180/TMath::Pi(),fPhiMax*180/TMath::Pi());
+    if (!(Generator->TestBit(kThetaRange))) 
+       Generator->SetThetaRange(fThetaMin*180/TMath::Pi(),fThetaMax*180/TMath::Pi());
+    if (!(Generator->TestBit(kVertexRange))) 
+       Generator->SetOrigin(fOrigin[0], fOrigin[1], fOrigin[2]);
     Generator->
        SetSigma(fOsigma[0], fOsigma[1], fOsigma[2]);
     Generator->SetVertexSmear(fVertexSmear);