Commit 80233ed8 authored by Breno Rilho Lemos's avatar Breno Rilho Lemos 💬

Add options 'blendersave', 'minavgpt'; lighting adjustments

parent 5e6dcaa0
...@@ -36,6 +36,8 @@ ...@@ -36,6 +36,8 @@
Int_t esd_event_id = 0; // global variable to store unique event id Int_t esd_event_id = 0; // global variable to store unique event id
Double_t highAvgPz, lowAvgPz, highAvgPzEvent, lowAvgPzEvent; //variables to store info about highest and lowest <Pz> values Double_t highAvgPz, lowAvgPz, highAvgPzEvent, lowAvgPzEvent; //variables to store info about highest and lowest <Pz> values
Double_t highAvgPt, highAvgPtEvent; //variables to store info about highest and lowest <Pt> values
class AliAnalysisTaskMyTask; // your analysis class class AliAnalysisTaskMyTask; // your analysis class
...@@ -44,14 +46,14 @@ using namespace std; // std namespace: so you can do things like 'cou ...@@ -44,14 +46,14 @@ using namespace std; // std namespace: so you can do things like 'cou
ClassImp(AliAnalysisTaskMyTask) // classimp: necessary for root ClassImp(AliAnalysisTaskMyTask) // classimp: necessary for root
AliAnalysisTaskMyTask::AliAnalysisTaskMyTask() : AliAnalysisTaskSE(), AliAnalysisTaskMyTask::AliAnalysisTaskMyTask() : AliAnalysisTaskSE(),
fESD(0), fOutputList(0), fHistPt(0), fHistAvgPz(0), fHistMass(0) fESD(0), fOutputList(0), fHistPt(0), fHistAvgPz(0), fHistAvgPt(0), fHistMass(0)
{ {
// default constructor, don't allocate memory here! // default constructor, don't allocate memory here!
// this is used by root for IO purposes, it needs to remain empty // this is used by root for IO purposes, it needs to remain empty
} }
//_____________________________________________________________________________ //_____________________________________________________________________________
AliAnalysisTaskMyTask::AliAnalysisTaskMyTask(const char* name) : AliAnalysisTaskSE(name), AliAnalysisTaskMyTask::AliAnalysisTaskMyTask(const char* name) : AliAnalysisTaskSE(name),
fESD(0), fOutputList(0), fHistPt(0), fHistAvgPz(0), fHistMass(0) fESD(0), fOutputList(0), fHistPt(0), fHistAvgPz(0), fHistAvgPt(0), fHistMass(0)
{ {
// constructor // constructor
DefineInput(0, TChain::Class()); // define the input of the analysis: in this case we take a 'chain' of events DefineInput(0, TChain::Class()); // define the input of the analysis: in this case we take a 'chain' of events
...@@ -96,6 +98,10 @@ void AliAnalysisTaskMyTask::UserCreateOutputObjects() ...@@ -96,6 +98,10 @@ void AliAnalysisTaskMyTask::UserCreateOutputObjects()
fHistAvgPz = new TH1F("fHistAvgPz", "fHistAvgPz", 100, 0, 10); // create histogram fHistAvgPz = new TH1F("fHistAvgPz", "fHistAvgPz", 100, 0, 10); // create histogram
fOutputList->Add(fHistAvgPz); fOutputList->Add(fHistAvgPz);
// <Pt> histogram: value of average Pt (or Pt per track) for each event
fHistAvgPt = new TH1F("fHistAvgPt", "fHistAvgPt", 100, 0, 10); // create histogram
fOutputList->Add(fHistAvgPt);
// my mass histogram // my mass histogram
Double_t fHistMassEdges[12] = {0.0,0.0005,0.0405,0.08,0.12,0.13,0.17,0.48,0.52,0.92,0.96,1.0}; // 11 bins =>> has 11+1 = 12 edges Double_t fHistMassEdges[12] = {0.0,0.0005,0.0405,0.08,0.12,0.13,0.17,0.48,0.52,0.92,0.96,1.0}; // 11 bins =>> has 11+1 = 12 edges
...@@ -155,6 +161,8 @@ void AliAnalysisTaskMyTask::export_to_our_ESD_textual_format (Int_t selectedEven ...@@ -155,6 +161,8 @@ void AliAnalysisTaskMyTask::export_to_our_ESD_textual_format (Int_t selectedEven
Double_t PzSum = 0; Double_t PzSum = 0;
Double_t absPzSum = 0; Double_t absPzSum = 0;
Double_t PtSum = 0;
for(Int_t i(0); i < iTracks; i++) { // loop over all these tracks for(Int_t i(0); i < iTracks; i++) { // loop over all these tracks
AliESDtrack* track = static_cast<AliESDtrack*>(fESD->GetTrack(i)); // get a track (type AliESDtrack) from the event AliESDtrack* track = static_cast<AliESDtrack*>(fESD->GetTrack(i)); // get a track (type AliESDtrack) from the event
...@@ -166,18 +174,20 @@ void AliAnalysisTaskMyTask::export_to_our_ESD_textual_format (Int_t selectedEven ...@@ -166,18 +174,20 @@ void AliAnalysisTaskMyTask::export_to_our_ESD_textual_format (Int_t selectedEven
Double_t Px = track->Px(); Double_t Px = track->Px();
Double_t Py = track->Py(); Double_t Py = track->Py();
Double_t Pt = track->Pt(); // transversal momentum, in case we need it Double_t Pt = track->Pt(); // transversal momentum
Double_t Pz = track->Pz(); Double_t Pz = track->Pz();
PzSum += Pz/iTracks; // Pz sum for |<Pz>| histogram PzSum += Pz/iTracks; // Pz sum for |<Pz>| histogram
absPzSum += abs(Pz)/iTracks; //Remember: in C++, abs function overloads absPzSum += abs(Pz)/iTracks; //Remember: in C++, abs function overloads
PtSum += Pt/iTracks; // Pt sum for <Pt> histogram
Double_t Charge = track->Charge(); Double_t Charge = track->Charge();
// Add VERTEX (x, y, z), MASS, CHARGE and MOMENTUM (x, y, z) to esd-detail.dat file // Add VERTEX (x, y, z), MASS, CHARGE and MOMENTUM (x, y, z) to esd-detail.dat file
esd_detail << Vx << " " << Vy << " " << Vz << " "; esd_detail << Vx << " " << Vy << " " << Vz << " ";
esd_detail << Mass << " " << Charge << " "; esd_detail << Mass << " " << Charge << " ";
esd_detail << Px << " " << Py << " " << Pz << endl; esd_detail << Px << " " << Py << " " << Pz << " " << Pt << endl;
fHistPt->Fill(Pt); // plot the pt value of the track in a histogram fHistPt->Fill(Pt); // plot the pt value of the track in a histogram
...@@ -189,11 +199,22 @@ void AliAnalysisTaskMyTask::export_to_our_ESD_textual_format (Int_t selectedEven ...@@ -189,11 +199,22 @@ void AliAnalysisTaskMyTask::export_to_our_ESD_textual_format (Int_t selectedEven
fHistAvgPz->Fill(abs(PzSum)); fHistAvgPz->Fill(abs(PzSum));
} }
if(PtSum != 0) { // This will only fill <Pt> histogram for events with tracks (non-empty)
fHistAvgPt->Fill(abs(PtSum));
}
if(selectedEventID == 0) { if(selectedEventID == 0) {
// Pz:
highAvgPzEvent = 0; highAvgPzEvent = 0;
lowAvgPzEvent = 0; lowAvgPzEvent = 0;
highAvgPz = PzSum; highAvgPz = PzSum;
lowAvgPz = PzSum; lowAvgPz = PzSum;
// Pt:
highAvgPtEvent = 0;
highAvgPt = PtSum;
} else { } else {
if(PzSum>highAvgPz) { if(PzSum>highAvgPz) {
...@@ -205,6 +226,11 @@ void AliAnalysisTaskMyTask::export_to_our_ESD_textual_format (Int_t selectedEven ...@@ -205,6 +226,11 @@ void AliAnalysisTaskMyTask::export_to_our_ESD_textual_format (Int_t selectedEven
lowAvgPzEvent = selectedEventID; lowAvgPzEvent = selectedEventID;
} }
if(PtSum>highAvgPt) {
highAvgPt = PtSum;
highAvgPtEvent = selectedEventID;
}
} }
} }
...@@ -237,6 +263,9 @@ void AliAnalysisTaskMyTask::Terminate(Option_t *) ...@@ -237,6 +263,9 @@ void AliAnalysisTaskMyTask::Terminate(Option_t *)
// terminate // terminate
// called at the END of the analysis (when all events are processed) // called at the END of the analysis (when all events are processed)
cout << endl << endl << "Lowest Pz Mean (<Pz>) = " << lowAvgPz << " at Event " << lowAvgPzEvent; cout << endl << endl << "Lowest Pz Mean (<Pz>) = " << lowAvgPz << " at Event " << lowAvgPzEvent;
cout << endl << "Highest Pz Mean (<Pz>) = " << highAvgPz << " at Event " << highAvgPzEvent << endl << endl; cout << endl << "Highest Pz Mean (<Pz>) = " << highAvgPz << " at Event " << highAvgPzEvent << endl;
cout << endl << "Highest Pt Mean (<Pt>) = " << highAvgPt << " at Event " << highAvgPtEvent << endl << endl;
} }
//_____________________________________________________________________________ //_____________________________________________________________________________
...@@ -24,6 +24,7 @@ class AliAnalysisTaskMyTask : public AliAnalysisTaskSE ...@@ -24,6 +24,7 @@ class AliAnalysisTaskMyTask : public AliAnalysisTaskSE
TList* fOutputList; //! output list TList* fOutputList; //! output list
TH1F* fHistPt; //! Pt histogram TH1F* fHistPt; //! Pt histogram
TH1F* fHistAvgPz; //! |<Pz>| histogram TH1F* fHistAvgPz; //! |<Pz>| histogram
TH1F* fHistAvgPt; //! <Pt> histogram
TH1F* fHistMass; //! my particle histogram!! :D TH1F* fHistMass; //! my particle histogram!! :D
void export_to_our_ESD_textual_format (Int_t selectedEventID); void export_to_our_ESD_textual_format (Int_t selectedEventID);
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# animate_particles.py - Animate HEP events # animate_particles.py - Animate HEP events
# #
# For console only rendering (example): # For console only rendering (example):
# $ blender -noaudio --background -P animate_particles.py -- -radius=0.05 -duration=1 -camera="BarrelCamera" -datafile="esd-detail.dat" -n_event=0 -simulated_t=0.02 -fps=24 -resolution=100 -transparency=1.2 -stamp_note="Texto no canto" -its=1 -tpc=0 -trd=1 -emcal=0 # $ blender -noaudio --background -P animate_particles.py -- -radius=0.05 -duration=1 -camera="BarrelCamera" -datafile="esd-detail.dat" -n_event=0 -simulated_t=0.02 -fps=24 -resolution=100 -transparency=1.2 -stamp_note="Texto no canto" -its=1 -tpc=0 -trd=1 -emcal=0 -blendersave=0
# #
import os import os
...@@ -40,6 +40,7 @@ parser.add_argument('-its','--its') ...@@ -40,6 +40,7 @@ parser.add_argument('-its','--its')
parser.add_argument('-tpc','--tpc') parser.add_argument('-tpc','--tpc')
parser.add_argument('-trd','--trd') parser.add_argument('-trd','--trd')
parser.add_argument('-emcal','--emcal') parser.add_argument('-emcal','--emcal')
parser.add_argument('-blendersave','--blendersave')
args = parser.parse_args() args = parser.parse_args()
bpy.context.user_preferences.view.show_splash = False bpy.context.user_preferences.view.show_splash = False
...@@ -56,7 +57,9 @@ fps = int(args.fps) ...@@ -56,7 +57,9 @@ fps = int(args.fps)
resolution_percent = int(args.resolution_percent) resolution_percent = int(args.resolution_percent)
stamp_note = args.stamp_note stamp_note = args.stamp_note
transp_par = float(args.transp_par) transp_par = float(args.transp_par)
datafile = str(args.datafile)
detectors = [int(args.its),int(args.tpc),int(args.trd),int(args.emcal)] # Array that stores which detectors to build detectors = [int(args.its),int(args.tpc),int(args.trd),int(args.emcal)] # Array that stores which detectors to build
blendersave = int(args.blendersave) # 1 (save Blender file) or 0 (don't)
#configure output #configure output
outputPath = "/tmp/blender/" outputPath = "/tmp/blender/"
...@@ -65,7 +68,7 @@ fileIdentifier = "PhysicalTrajectories_" ...@@ -65,7 +68,7 @@ fileIdentifier = "PhysicalTrajectories_"
renderCamera= args.render_camera renderCamera= args.render_camera
renderAnimation = True # True renderAnimation = True # True
saveBlenderFile = False # False saveBlenderFile = blendersave # False
""" """
# Create and configure animation driver # Create and configure animation driver
...@@ -75,7 +78,7 @@ driver.configure(renderCamera, duration, fps, simulated_t, outputPath, fileIdent ...@@ -75,7 +78,7 @@ driver.configure(renderCamera, duration, fps, simulated_t, outputPath, fileIdent
""" """
# Create and configure animation driver # Create and configure animation driver
driver = dataDriver("AlirootFileGenerator",n_event,args.datafile) # Simple dataDriver driver = dataDriver("AlirootFileGenerator",n_event,datafile) # Simple dataDriver
driver.configure(renderCamera, duration, fps, simulated_t, outputPath, fileIdentifier, resolution_percent) driver.configure(renderCamera, duration, fps, simulated_t, outputPath, fileIdentifier, resolution_percent)
### Build scene ### Build scene
...@@ -90,7 +93,7 @@ animate_tracks(blender_tracks,particles,driver) ...@@ -90,7 +93,7 @@ animate_tracks(blender_tracks,particles,driver)
bpy.context.scene.frame_current = 24 bpy.context.scene.frame_current = 24
## Save blender file ## Save blender file
if saveBlenderFile: bpy.ops.wm.save_as_mainfile(filepath=outputPath+fileIdentifier+".blend") if saveBlenderFile: bpy.ops.wm.save_as_mainfile(filepath=outputPath+fileIdentifier+"AlirootFileGenerator_"+datafile+"_Event_"+n_event+"_"+renderCamera+".blend")
# Render animation # Render animation
if renderAnimation: driver.render() if renderAnimation: driver.render()
......
...@@ -223,8 +223,8 @@ def addALICE_Geometry(bright_colors=True, transp_par=1.0, detectors=[1,1,1,1]): ...@@ -223,8 +223,8 @@ def addALICE_Geometry(bright_colors=True, transp_par=1.0, detectors=[1,1,1,1]):
def addLamps(): def addLamps():
bpy.ops.object.lamp_add(type='POINT', location=(0,0,15)) bpy.ops.object.lamp_add(type='POINT', location=(4,1,6))
bpy.ops.object.lamp_add(type='POINT', location=(0,0,-15)) bpy.ops.object.lamp_add(type='POINT', location=(-4,-1,-6))
...@@ -258,11 +258,11 @@ def createSceneParticles(particles, createTracks = False): ...@@ -258,11 +258,11 @@ def createSceneParticles(particles, createTracks = False):
clWhite = (255, 255, 255) clWhite = (255, 255, 255)
particle_colors = {"Electron":clRed, "Pion":clGreen, "Muon":clBlue, "Proton":clMagenta, "Kaon": clYellow, "Unknown": clWhite} particle_colors = {"Electron":clRed, "Pion":clGreen, "Muon":clBlue, "Proton":clMagenta, "Kaon": clYellow, "Unknown": clWhite}
#Create Materials # Create Materials
for type in particle_types: for type in particle_types:
bpy.data.materials.new(name=type) bpy.data.materials.new(name=type)
#bpy.context.object.active_material = (1, 0, 0) #bpy.context.object.active_material = (1, 0, 0)
bpy.data.materials[type].emit = 0.1 bpy.data.materials[type].emit = 0.05
bpy.data.materials[type].diffuse_color = particle_colors[type] bpy.data.materials[type].diffuse_color = particle_colors[type]
bpy.data.materials[type].use_shadows = False bpy.data.materials[type].use_shadows = False
bpy.data.materials[type].use_cast_shadows = False bpy.data.materials[type].use_cast_shadows = False
......
...@@ -34,7 +34,7 @@ if [[ ${PIPESTATUS[0]} -ne 4 ]]; then ...@@ -34,7 +34,7 @@ if [[ ${PIPESTATUS[0]} -ne 4 ]]; then
fi fi
OPTIONS=c:hdau:m:n:t:r: OPTIONS=c:hdau:m:n:t:r:
LONGOPTS=camera:,resolution:,fps:,transparency:,duration:,maxparticles:,minparticles:,numberofevents:,minavgpz:,help,download,sample,url:,its,tpc,trd,emcal LONGOPTS=camera:,resolution:,fps:,transparency:,duration:,maxparticles:,minparticles:,numberofevents:,minavgpz:,minavgpt:,help,download,sample,url:,its,tpc,trd,emcal,blendersave
# -regarding ! and PIPESTATUS see above # -regarding ! and PIPESTATUS see above
# -temporarily store output to be able to check for errors # -temporarily store output to be able to check for errors
...@@ -61,6 +61,7 @@ MAX_PARTICLES=1000 ...@@ -61,6 +61,7 @@ MAX_PARTICLES=1000
MIN_PARTICLES=0 MIN_PARTICLES=0
N_OF_EVENTS=10 N_OF_EVENTS=10
MIN_AVG_PZ=0 MIN_AVG_PZ=0
MIN_AVG_PT=0
HELP=false HELP=false
DOWNLOAD=false DOWNLOAD=false
SAMPLE=false SAMPLE=false
...@@ -69,6 +70,7 @@ ITS=1 # 1 means "build this detector", while 0 means "don't" ...@@ -69,6 +70,7 @@ ITS=1 # 1 means "build this detector", while 0 means "don't"
TPC=1 TPC=1
TRD=1 TRD=1
EMCAL=1 EMCAL=1
BLENDERSAVE=0
# now enjoy the options in order and nicely split until we see -- # now enjoy the options in order and nicely split until we see --
while true; do while true; do
case "$1" in case "$1" in
...@@ -105,6 +107,10 @@ while true; do ...@@ -105,6 +107,10 @@ while true; do
MIN_AVG_PZ="$2" MIN_AVG_PZ="$2"
shift 2 shift 2
;; ;;
--minavgpt)
MIN_AVG_PT="$2"
shift 2
;;
-t|--duration) -t|--duration)
DURATION="$2" DURATION="$2"
shift 2 shift 2
...@@ -141,6 +147,10 @@ while true; do ...@@ -141,6 +147,10 @@ while true; do
EMCAL=0 EMCAL=0
shift shift
;; ;;
--blendersave)
BLENDERSAVE=1
shift
;;
--) --)
shift shift
break break
...@@ -181,6 +191,10 @@ Usage: ...@@ -181,6 +191,10 @@ Usage:
Get only events for which its absolute value of average momentum in Get only events for which its absolute value of average momentum in
the z direction is greater than or equal to VALUE. Useful for animating the z direction is greater than or equal to VALUE. Useful for animating
events with 'boosts' of particles to the same side. events with 'boosts' of particles to the same side.
--minavgpt VALUE
Get only events for which its average transversal momentum is
greater than or equal to VALUE. Useful for animating events with
'boosts' of particles on the xy plane.
-t | --duration VALUE -t | --duration VALUE
Set the animation duration in seconds. Set the animation duration in seconds.
-r | --resolution VALUE -r | --resolution VALUE
...@@ -205,6 +219,8 @@ Usage: ...@@ -205,6 +219,8 @@ Usage:
Removes TRD detector from animation Removes TRD detector from animation
--emcal --emcal
Removes EMCal detector from animation Removes EMCal detector from animation
--blendersave
Saves Blender file along with animation clip
Example: Example:
-------- --------
...@@ -234,6 +250,7 @@ else ...@@ -234,6 +250,7 @@ else
echo "Min particles: ${MIN_PARTICLES}" echo "Min particles: ${MIN_PARTICLES}"
echo "Number of events: ${N_OF_EVENTS}" echo "Number of events: ${N_OF_EVENTS}"
echo "Min Average Z Momentum: ${MIN_AVG_PZ}" echo "Min Average Z Momentum: ${MIN_AVG_PZ}"
echo "Min Average Transversal Momentum: ${MIN_AVG_PT}"
echo "Camera: $CAMERA" echo "Camera: $CAMERA"
echo "-----------------------------------" echo "-----------------------------------"
echo "------------ Detectors ------------" echo "------------ Detectors ------------"
...@@ -298,7 +315,7 @@ if [ "$SAMPLE" = "true" ]; then ...@@ -298,7 +315,7 @@ if [ "$SAMPLE" = "true" ]; then
pushd ${BLENDER_SCRIPT_DIR} pushd ${BLENDER_SCRIPT_DIR}
for type in $CAMERA; do for type in $CAMERA; do
echo "Preparing sample animation with $type in Blender" echo "Preparing sample animation with $type in Blender"
blender -noaudio --background -P animate_particles.py -- -radius=0.05 -duration=${DURATION} -camera=${type} -datafile="d-esd-detail.dat" -simulated_t=0.03 -fps=${FPS} -resolution=${RESOLUTION} -transparency=${TRANSPARENCY} -stamp_note="opendata.cern.ch_record_1102_alice_2010_LHC10h_000139038_ESD_0001_2" -its=${ITS} -tpc=${TPC} -trd=${TRD} -emcal=${EMCAL} blender -noaudio --background -P animate_particles.py -- -radius=0.05 -duration=${DURATION} -camera=${type} -datafile="d-esd-detail.dat" -simulated_t=0.03 -fps=${FPS} -resolution=${RESOLUTION} -transparency=${TRANSPARENCY} -stamp_note="opendata.cern.ch_record_1102_alice_2010_LHC10h_000139038_ESD_0001_2" -its=${ITS} -tpc=${TPC} -trd=${TRD} -emcal=${EMCAL} -blendersave=${BLENDERSAVE}
done done
popd popd
BLENDER_OUTPUT=. BLENDER_OUTPUT=.
...@@ -381,8 +398,13 @@ elif [ "$SAMPLE" = "false" ]; then ...@@ -381,8 +398,13 @@ elif [ "$SAMPLE" = "false" ]; then
AVERAGE_PZ=$(awk 'BEGIN {pzsum=0;n=0} {pzsum+=$8;n++} END {print sqrt(pzsum*pzsum/n/n)}' ${BLENDER_SCRIPT_DIR}/${LOCAL_FILE_WITH_DATA}) AVERAGE_PZ=$(awk 'BEGIN {pzsum=0;n=0} {pzsum+=$8;n++} END {print sqrt(pzsum*pzsum/n/n)}' ${BLENDER_SCRIPT_DIR}/${LOCAL_FILE_WITH_DATA})
echo "File $LOCAL_FILE_WITH_DATA has $NUMBER_OF_PARTICLES particles and average Z momentum $AVERAGE_PZ" AVERAGE_PT=$(awk 'BEGIN {ptsum=0;n=0} {ptsum+=$9;n++} END {print ptsum/n}' ${BLENDER_SCRIPT_DIR}/${LOCAL_FILE_WITH_DATA})
echo "File $LOCAL_FILE_WITH_DATA has $NUMBER_OF_PARTICLES particles."
echo "Average Z momentum: $AVERAGE_PZ"
echo "Average transversal momentum $AVERAGE_PT"
if (( $(echo "$AVERAGE_PT >= $MIN_AVG_PT" |bc -l) )); then
if (( $(echo "$AVERAGE_PZ >= $MIN_AVG_PZ" |bc -l) )); then if (( $(echo "$AVERAGE_PZ >= $MIN_AVG_PZ" |bc -l) )); then
if [[ $NUMBER_OF_PARTICLES -le $MAX_PARTICLES && $NUMBER_OF_PARTICLES -ge $MIN_PARTICLES && $EVENT_COUNTER -lt $N_OF_EVENTS ]]; then if [[ $NUMBER_OF_PARTICLES -le $MAX_PARTICLES && $NUMBER_OF_PARTICLES -ge $MIN_PARTICLES && $EVENT_COUNTER -lt $N_OF_EVENTS ]]; then
...@@ -396,7 +418,7 @@ elif [ "$SAMPLE" = "false" ]; then ...@@ -396,7 +418,7 @@ elif [ "$SAMPLE" = "false" ]; then
for type in $CAMERA; do for type in $CAMERA; do
echo "Processing ${EVENT_UNIQUE_ID} with $type in Blender" echo "Processing ${EVENT_UNIQUE_ID} with $type in Blender"
blender -noaudio --background -P animate_particles.py -- -radius=0.05 -duration=${DURATION} -camera=${type} -datafile="${LOCAL_FILE_WITH_DATA}" -n_event=${EVENT_ID} -simulated_t=0.03 -fps=${FPS} -resolution=${RESOLUTION} -transparency=${TRANSPARENCY} -stamp_note="${EVENT_UNIQUE_ID}" -its=${ITS} -tpc=${TPC} -trd=${TRD} -emcal=${EMCAL} blender -noaudio --background -P animate_particles.py -- -radius=0.05 -duration=${DURATION} -camera=${type} -datafile="${LOCAL_FILE_WITH_DATA}" -n_event=${EVENT_ID} -simulated_t=0.03 -fps=${FPS} -resolution=${RESOLUTION} -transparency=${TRANSPARENCY} -stamp_note="${EVENT_UNIQUE_ID}" -its=${ITS} -tpc=${TPC} -trd=${TRD} -emcal=${EMCAL} -blendersave=${BLENDERSAVE}
# Move generated file to final location # Move generated file to final location
mv /tmp/blender/* ${BLENDER_OUTPUT} mv /tmp/blender/* ${BLENDER_OUTPUT}
echo "${type} for event ${EVENT_UNIQUE_ID} done." echo "${type} for event ${EVENT_UNIQUE_ID} done."
...@@ -427,6 +449,14 @@ elif [ "$SAMPLE" = "false" ]; then ...@@ -427,6 +449,14 @@ elif [ "$SAMPLE" = "false" ]; then
else else
echo "Average Z Momentum too low (minimum accepted is $MIN_AVG_PZ). Continue." echo "Average Z Momentum too low (minimum accepted is $MIN_AVG_PZ). Continue."
# Remove non-processed files
pushd ${BLENDER_SCRIPT_DIR}
rm $LOCAL_FILE_WITH_DATA
popd
fi
else
echo "Average Transversal Momentum too low (minimum accepted is $MIN_AVG_PT). Continue."
# Remove non-processed files # Remove non-processed files
pushd ${BLENDER_SCRIPT_DIR} pushd ${BLENDER_SCRIPT_DIR}
rm $LOCAL_FILE_WITH_DATA rm $LOCAL_FILE_WITH_DATA
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment