Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cumulative updates to HipPy scripting, TwoBodyDecay, Alignment/OfflineValidation and MuonAnalysis/MuscleFit macros #17559

Merged
merged 22 commits into from
Mar 2, 2017
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions Alignment/HIPAlignmentAlgorithm/BuildFile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<use name="FWCore/ParameterSet"/>
<use name="TrackingTools/PatternTools"/>
<use name="TrackingTools/TrackFitters"/>
<use name="TrackingTools/TrajectoryState"/>
<use name="DataFormats/Alignment"/>
<use name="rootcore"/>
<use name="Alignment/CommonAlignment"/>
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

76 changes: 76 additions & 0 deletions Alignment/HIPAlignmentAlgorithm/data/breakup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
#!/bin/bash

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@usarica the data directory might not be the optimal place to put a shell script, although I understand that it is supposed to deal with files in this directory.
I would like to let @davidlange6 or @smuzaffar comment on this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I completely agree, but the HipPy instructions right now point to using data/ for storing alignment objects. I can change the instructions and also put breakup.sh somewhere else, maybe test/?


infile=$1
iovfile=$2
nbreaks=-1
if [[ $3 != "" ]];then
let nbreaks=$3
fi

iovlist=()
while IFS='' read -r line || [[ -n "$line" ]]; do
iovlist+=($line)
done < $iovfile

let niovs=${#iovlist[@]}
let lastiov=$niovs-1
for (( i=0; i<${niovs}; i++ ));
do
let ni=$i+1

core=${infile%%.dat*}
newfile=$core".dat_"${iovlist[i]}
rm -f $newfile

str=""
let nadded=1

for f in $(cat $infile)
do

if [[ $f != "#"* ]];then
nobegin=${f#*/000/}
noend=${nobegin%%/00000*}
let run=${noend/\//}
addfile=${f%*,}
if [ $i -eq $lastiov ];then
if [ $run -ge ${iovlist[i]} ]; then

appendstr=""
if [ $nadded -eq $nbreaks ];then
appendstr="\n"
let nadded=0
else
appendstr=","
fi
addfile=$addfile$appendstr

str=$str$addfile
let nadded=nadded+1
fi
elif [ $run -ge ${iovlist[i]} ] && [ $run -lt ${iovlist[$ni]} ]; then

appendstr=""
if [ $nadded -eq $nbreaks ];then
appendstr="\n"
let nadded=0
else
appendstr=","
fi
addfile=$addfile$appendstr

str=$str$addfile
let nadded=nadded+1
fi
fi

done

str2=${str%,}
if [[ $str2 != "" ]];then
echo -e $str2 >> $newfile
else
$newfile" is empty. Please skip!"
fi

done
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class HIPAlignmentAlgorithm : public AlignmentAlgorithmBase
void startNewLoop(void);

/// Run the algorithm
void run(const edm::EventSetup& setup, const EventInfo &eventInfo);
void run(const edm::EventSetup& setup, const EventInfo& eventInfo);

private:

Expand Down
1 change: 0 additions & 1 deletion Alignment/HIPAlignmentAlgorithm/iov_2016RunB.dat

This file was deleted.