Commit 360bf38e authored by Breno Rilho Lemos's avatar Breno Rilho Lemos 💬

Fix setting for animating events according to Minimum Average Pz option

parent 1392b0e6
......@@ -236,7 +236,7 @@ void AliAnalysisTaskMyTask::Terminate(Option_t *)
{
// terminate
// called at the END of the analysis (when all events are processed)
cout << endl << "Lowest Pz Mean (<Pz>) = " << lowAvgPz << " at Event " << lowAvgPzEvent;
cout << endl << "Highest Pz Mean (<Pz>) = " << highAvgPz << " at Event " << highAvgPzEvent << endl;
cout << endl << endl << "Lowest Pz Mean (<Pz>) = " << lowAvgPz << " at Event " << lowAvgPzEvent;
cout << endl << "Highest Pz Mean (<Pz>) = " << highAvgPz << " at Event " << highAvgPzEvent << endl << endl;
}
//_____________________________________________________________________________
......@@ -382,47 +382,49 @@ elif [ "$SAMPLE" = "false" ]; then
echo "File $LOCAL_FILE_WITH_DATA has $NUMBER_OF_PARTICLES particles and average Z momentum $AVERAGE_PZ"
if [[ $NUMBER_OF_PARTICLES -le $MAX_PARTICLES && $NUMBER_OF_PARTICLES -ge $MIN_PARTICLES && $EVENT_COUNTER -lt $N_OF_EVENTS && $AVERAGE_PZ -ge $MIN_AVG_PZ ]]; 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
# Increment event counter
EVENT_COUNTER=$EVENT_COUNTER+1
# Increment event counter
EVENT_COUNTER=$EVENT_COUNTER+1
echo "Processing ${EVENT_UNIQUE_ID} ($NUMBER_OF_PARTICLES tracks) in Blender"
echo "Processing ${EVENT_UNIQUE_ID} ($NUMBER_OF_PARTICLES tracks) in Blender"
pushd ${BLENDER_SCRIPT_DIR}
pushd ${BLENDER_SCRIPT_DIR}
for type in $CAMERA; do
echo "Processing ${EVENT_UNIQUE_ID} with $type in Blender"
for type in $CAMERA; do
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} -transperency=${TRANSPERENCY} -stamp_note="${EVENT_UNIQUE_ID}" -its=${ITS} -tpc=${TPC} -trd=${TRD} -emcal=${EMCAL}
# Move generated file to final location
mv /tmp/blender/* ${BLENDER_OUTPUT}
echo "${type} for event ${EVENT_UNIQUE_ID} done."
done
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} -transperency=${TRANSPERENCY} -stamp_note="${EVENT_UNIQUE_ID}" -its=${ITS} -tpc=${TPC} -trd=${TRD} -emcal=${EMCAL}
# Move generated file to final location
mv /tmp/blender/* ${BLENDER_OUTPUT}
echo "${type} for event ${EVENT_UNIQUE_ID} done."
done
# Move processed file to final location
mv $LOCAL_FILE_WITH_DATA ${BLENDER_OUTPUT}/$LOCAL_FILE_WITH_DATA
# Move processed file to final location
mv $LOCAL_FILE_WITH_DATA ${BLENDER_OUTPUT}/$LOCAL_FILE_WITH_DATA
popd
echo "EVENT ${EVENT_UNIQUE_ID} DONE with FILE $LOCAL_FILE_WITH_DATA."
else
popd
echo "EVENT ${EVENT_UNIQUE_ID} DONE with FILE $LOCAL_FILE_WITH_DATA."
else
if [[ $NUMBER_OF_PARTICLES -lt $MIN_PARTICLES ]]; then
echo "Too little particles (minimum accepted is $MIN_PARTICLES). Continue."
elif [[ $NUMBER_OF_PARTICLES -gt $MAX_PARTICLES ]]; then
echo "Too many particles (maximum accepted is $MAX_PARTICLES). Continue."
elif [[ $EVENT_COUNTER -ge $N_OF_EVENTS ]]; then
echo "Numbers of events set to be animated has already been reached. Continue."
elif [[ $AVERAGE_PZ -lt $MIN_AVG_PZ ]]; then
echo "Average Z Momentum too low (minimum accepted is $MIN_AVG_PZ). Continue."
fi
if [[ $NUMBER_OF_PARTICLES -lt $MIN_PARTICLES ]]; then
echo "Too little particles (minimum accepted is $MIN_PARTICLES). Continue."
elif [[ $NUMBER_OF_PARTICLES -gt $MAX_PARTICLES ]]; then
echo "Too many particles (maximum accepted is $MAX_PARTICLES). Continue."
elif [[ $EVENT_COUNTER -ge $N_OF_EVENTS ]]; then
echo "Numbers of events set to be animated has already been reached. Continue."
fi
# Remove non-processed files
pushd ${BLENDER_SCRIPT_DIR}
rm $LOCAL_FILE_WITH_DATA
popd
# Remove non-processed files
pushd ${BLENDER_SCRIPT_DIR}
rm $LOCAL_FILE_WITH_DATA
popd
continue
continue
fi
else
echo "Average Z Momentum too low (minimum accepted is $MIN_AVG_PZ). Continue."
fi
done
popd
......
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