Print

Print


Hi,

I have made some progress on modeling the SVT alignments in HPS Java and auto-loading the correct alignment settings (e.g. for SVT opening angle) on a run-by-run basis.

This work is being done on the following branches....

lcsim LCSIM-245 branch
svn://svn.freehep.org/lcdet/projects/lcsim/branches/LCSIM-245

HPS Java HPS-JAVA-499 branch
svn://svn.freehep.org/hps/java/branches/HPSJAVA-499

All of Pelle's detailed Java classes and tests for modeling the detector were moved from LCSim to HPS Java on these branches so that the alignment constants could be directly accessible to the in-memory detector model.  A side effect of this is that those classes are no longer directly accessible from lcsim, so the command line utility for creating the LCDD files will need to be run from the detector-model module in HPS Java rather than its "old" location in lcsim under detector-framework.  The syntax of this should be exactly the same as before (e.g. running the bin jar from target for that module).

There are 6 different sets of alignment parameters I have loaded into the database, one for each of the opening angle settings that were used at JLAB, without (for now) any other alignment corrections being applied.  So the '13100' parameter is set to the top angle and '23100' is set to the bottom angle.  All the other parameters are zero until we replace them with output from running the Millepede software chain.

These are the currently loaded, non-zero values for those alignment constants....

mysql> select parameter, value from svt_alignments where value != 0;
+---------------+-----------+---------+
| collection_id | parameter | value   |
+---------------+-----------+---------+
|          1010 |     13100 |  0.0031 |
|          1010 |     23100 | -0.0033 |
|          1011 |     13100 |  0.0077 |
|          1011 |     23100 | -0.0086 |
|          1013 |     13100 |  0.0046 |
|          1013 |     23100 |  -0.005 |
|          1014 |     13100 |  0.0107 |
|          1014 |     23100 | -0.0116 |
|          1015 |     13100 |  0.0216 |
|          1015 |     23100 | -0.0217 |
+---------------+-----------+---------+

There's also a 'nominal' setting not shown here (a.k.a. 0.5 mm) with the top & bottom angles set to '0.0'.

I loaded the following conditions records with some sample run ranges into the conditions database for testing purposes, based on data from the run spreadsheet....

mysql> select run_start, run_end, collection_id, notes from conditions where table_name like 'svt_alignments';
+-----------+---------+---------------+---------------------------------------------------------+
| run_start | run_end | collection_id | notes                                                   
+-----------+---------+---------------+---------------------------------------------------------+
|         0 |       0 |          1012 | nominal alignment settings                              
|      5259 |    5376 |          1010 | 1.5 mm SVT opening angle for runs 5259 to 5376          
|      5037 |    5063 |          1011 | 3 mm SVT opening angle for runs 5037 to 5063            
|      5066 |    5070 |          1013 | 2 mm SVT angle for runs 5066 to 5070                    
|      5222 |    5229 |          1015 | SVT open for runs 5222 to 5229                          
|      4847 |    5036 |          1014 | 4mm opening angle for runs 4847 to 5036 (needs confirm) 
|      5632 |    5706 |          1012 | 0.5 mm opening angle for runs 5632 to 5706              
+-----------+---------+---------------+---------------------------------------------------------+

Monte Carlo using run '0' will default to the nominal settings, and we'll need to discuss if this is reasonable or not.

As you can see, this is not completely covering the run ranges we will eventually want in the database but it is useful for getting started with testing the major configurations we have used.

There is a test in the HPS Java branch which will load the constants for a single run from each of these ranges and make sure they are correct.

It can be run using....

cd detector-model; mvn test -Dtest=SvtAlignmentTest

The output which shows that the angles are being loaded correctly is as follows....

Running org.hps.detector.SvtAlignmentTest              
Fri May 15 12:24:06 PDT 2015 org.hps.conditions.database.DatabaseConditionsManager setLogLevel
CONFIG: setting log level to WARNING                                                          

loading run 0 SVT alignments for detector HPS-EngRun2015-Nominal-v1 ...
Fri May 15 12:24:08 PDT 2015 org.lcsim.geometry.compact.converter.HPSTrackerBuilder <init>
INFO: alignment conditions will be read from database                                     
got collection 1012 of size 222                                                           
param 13100 = 0.0                                                                         
param 23100 = 0.0                                                                         

loading run 4847 SVT alignments for detector HPS-EngRun2015-Nominal-v1 ...
got collection 1014 of size 222
param 13100 = 0.0107
param 23100 = -0.0116

loading run 5037 SVT alignments for detector HPS-EngRun2015-Nominal-v1 ...
Fri May 15 12:24:15 PDT 2015 org.lcsim.geometry.compact.converter.HPSTrackerBuilder <init>
INFO: alignment conditions will be read from database
got collection 1011 of size 222
param 13100 = 0.0077
param 23100 = -0.0086

loading run 5066 SVT alignments for detector HPS-EngRun2015-Nominal-v1 ...
Fri May 15 12:24:22 PDT 2015 org.lcsim.geometry.compact.converter.HPSTrackerBuilder <init>
INFO: alignment conditions will be read from database
got collection 1013 of size 222
param 13100 = 0.0046
param 23100 = -0.005

loading run 5259 SVT alignments for detector HPS-EngRun2015-Nominal-v1 ...
Fri May 15 12:24:29 PDT 2015 org.lcsim.geometry.compact.converter.HPSTrackerBuilder <init>
INFO: alignment conditions will be read from database
got collection 1010 of size 222
param 13100 = 0.0031
param 23100 = -0.0033

loading run 5222 SVT alignments for detector HPS-EngRun2015-Nominal-v1 ...
Fri May 15 12:24:36 PDT 2015 org.lcsim.geometry.compact.converter.HPSTrackerBuilder <init>
INFO: alignment conditions will be read from database
got collection 1015 of size 222
param 13100 = 0.0216
param 23100 = -0.0217

loading run 5632 SVT alignments for detector HPS-EngRun2015-Nominal-v1 ...
Fri May 15 12:24:43 PDT 2015 org.lcsim.geometry.compact.converter.HPSTrackerBuilder <init>
INFO: alignment conditions will be read from database
got collection 1012 of size 222
param 13100 = 0.0
param 23100 = 0.0

So you can see that the correct angles are being loaded into the detector based on the run number now.  I have actually not checked that the parameters are actually being correctly processed by the detector model, but it at least doesn't crash!  Pelle and I will look at the sensor positions in the loaded model to make sure they appear reasonable after these opening angles are applied.

If there are no alignment constants found for a particular run number, the system will attempt to read them from the detector's compact.xml file.  When the database constants are read for a given run, whatever mille parameters are listed in the compact.xml will be overridden, so for instance if you specified the 'HPS-EngRun2015-2mm-v1' detector but were processing a run that had the nominal alignment settings, the 2mm opening angle would be overridden to be 0.5mm.  Just something to keep in mind when processing data.

After some additional testing and a few minor improvements, I believe we should merge this into the trunk sometime relatively soon (next few weeks?).  Before this happens, I will also attempt to get all the run number ranges into the database that we are interested in processing (e.g. some of the earlier runs or junk runs might just be ignored).  It depends on if we would want to run a reconstruction pass or two before this merge in occurs, though I don't really see this being so disruptive as everything should "just work."  (famous last words!)  

Let me know what the consensus is there and I'll time the merge accordingly.

Thanks.

--Jeremy

########################################################################
Use REPLY-ALL to reply to list

To unsubscribe from the HPS-SOFTWARE list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=HPS-SOFTWARE&A=1