Main Page | Packages | Class Hierarchy | Class List | Directories | File List | Class Members | Related Pages

PDF Class Reference

List of all members.

Detailed Description

Container for PDF information contains the pdf name and lhapdf number also contains method for converting pdf number to string and vice-versa

Author:
James Monk

Definition at line 18 of file PDF.java.


Public Member Functions

 PDF (Integer member)
 PDF (String name)
PDF setName (String name)
PDF setMember (Integer member)
Integer getMember ()
String getName ()
boolean isProton ()
boolean isPhoton ()
boolean isPion ()
PDF setIsPhoton ()
PDF setIsProton ()
PDF setIsPion ()
String toString ()
boolean equals (Object pdf)

Static Public Member Functions

Vector< PDFgetKnownPDFs ()

Private Member Functions

void deduceType ()

Static Private Member Functions

void init ()

Private Attributes

String name_
Integer member_
boolean proton_ = false
boolean photon_ = false
boolean pion_ = false
boolean dirtyType_ = true

Static Private Attributes

HashMap< Integer, String > numberToName_
HashMap< String, Integer > nameToNumber_
boolean initialise_ = true
Vector< PDFknownPDFs_

Constructor & Destructor Documentation

PDF Integer  member  ) 
 

Instantiates a PDF with the given PDF member number

Parameters:
integer the LHAPDF number of the PDF

Definition at line 39 of file PDF.java.

00039                               {
00040 
00041     if(initialise_) init();
00042     member_ = member;
00043     setMember(member);
00044     return;
00045     }

PDF String  name  ) 
 

Instantiates a PDF with the given name

Parameters:
String the name of the PDF

Definition at line 52 of file PDF.java.

00052                            {
00053     
00054     if(initialise_) init();
00055     name_ = name;
00056     setName(name);
00057     return;
00058     }


Member Function Documentation

void deduceType  )  [private]
 

Definition at line 203 of file PDF.java.

00203                              {
00204 
00205     String sMember = member_.toString();
00206     int len = sMember.length();
00207     char initial = sMember.charAt(0);
00208 
00209     //System.out.println("sMember = "+sMember);
00210     //System.out.println("len = "+len);
00211     //System.out.println("initial = "+initial);
00212     //boolean test = initial=='3';
00213     //System.out.println("initial=='3' = "+test);
00214 
00215     if(len==5){
00216         setIsProton();
00217     }else if(len==3 &&
00218          initial=='3'){
00219         setIsPhoton();
00220     }else if(len==3){
00221         setIsPion();
00222     }else{
00223         //do something 
00224     }
00225     return;
00226     }

boolean equals Object  pdf  ) 
 

Overload the Object.equals() method. Uses the PDF number to compare two PDFs.

Definition at line 197 of file PDF.java.

Referenced by Run.isConsistentWith(), and ResultSearchPattern.matches().

00197                                      {
00198     if(pdf==null) return false;
00199     if(!this.getClass().equals(pdf.getClass()))return false;
00200     return getMember().equals(((PDF)pdf).getMember());
00201     }

Vector<PDF> getKnownPDFs  )  [static]
 

Definition at line 60 of file PDF.java.

00060                                             {
00061     if(initialise_) init();
00062     return knownPDFs_;
00063     }

Integer getMember  ) 
 

Gives the LHAPDF member number of the PDF

Definition at line 93 of file PDF.java.

00093                               {
00094     return member_;
00095     }

String getName  ) 
 

Gives the name of the PDF

Definition at line 101 of file PDF.java.

Referenced by HTMLModelWriter.display().

00101                            {
00102     return name_;
00103     }

void init  )  [static, private]
 

Definition at line 228 of file PDF.java.

00228                               {
00229 
00230     initialise_ = false;
00231 
00232     nameToNumber_ = new HashMap<String, Integer>();
00233     numberToName_ = new HashMap<Integer, String>();
00234     knownPDFs_ = new Vector<PDF>();
00235 
00236     nameToNumber_.put("GRV-G HO DIS NLO", 352);
00237     nameToNumber_.put("SaS-G 1D (ver.2) LO", 395);
00238     nameToNumber_.put("SaS-G 2D (ver.2) LO", 397);
00239     nameToNumber_.put("WHIT-G 2 LO", 382);
00240 
00241     nameToNumber_.put("CTEQ6m", 10050);
00242     nameToNumber_.put("MRST2004nnlo", 20470);
00243     nameToNumber_.put("ZEUS2005", 60300);
00244 
00245     for(Map.Entry entry: nameToNumber_.entrySet()){
00246 
00247         Integer val = (Integer) entry.getValue();
00248 
00249         numberToName_.put
00250         (val, (String)entry.getKey());
00251 
00252         knownPDFs_.add(new PDF(val));
00253     }
00254 
00255     }

boolean isPhoton  ) 
 

Returns true if this PDF is for a photon, false otherwise. If this has not been explicitly set then it is deduced from the PDF number.

Definition at line 125 of file PDF.java.

Referenced by ServletUtils.makePattern(), and Run.setPDF().

00125                              {
00126     if(dirtyType_){
00127         deduceType();
00128     }
00129     return photon_;
00130     }

boolean isPion  ) 
 

Returns true if this PDF is for a pion, false otherwise. If this has not been explicitly set then it is deduced from the PDF number.

Definition at line 138 of file PDF.java.

Referenced by Run.setPDF().

00138                            {
00139     if(dirtyType_){
00140         deduceType();
00141     }
00142     return pion_;
00143     }

boolean isProton  ) 
 

Returns true if this PDF is for a proton, false otherwise. If this has not been explicitly set then it is deduced from the PDF number.

Definition at line 111 of file PDF.java.

Referenced by ServletUtils.makePattern(), and Run.setPDF().

00111                              {
00112     if(dirtyType_){
00113         deduceType();
00114     }
00115 
00116     return proton_;
00117     }

PDF setIsPhoton  ) 
 

Sets this PDF to be a photon PDF

Definition at line 149 of file PDF.java.

Referenced by JetWebLogReader.fillRun().

00149                             {
00150     //System.out.println("setting pdf to be photon");
00151     dirtyType_ = false;
00152     proton_ = false;
00153     photon_ = true;
00154     pion_   = false;
00155 
00156     return this;
00157     }

PDF setIsPion  ) 
 

Sets this PDF to be a pion PDF

Definition at line 176 of file PDF.java.

00176                           {
00177     dirtyType_ = false;
00178     proton_ = false;
00179     photon_ = false;
00180     pion_   = true;
00181     return this;
00182     }

PDF setIsProton  ) 
 

Sets this PDF to be Proton PDF

Definition at line 163 of file PDF.java.

Referenced by JetWebLogReader.fillRun().

00163                             {
00164     //System.out.println("setting pdf to be a proton");
00165     dirtyType_ = false;
00166     proton_ = true;
00167     photon_ = false;
00168     pion_ = false;
00169     return this;
00170     }

PDF setMember Integer  member  ) 
 

Set the PDF member number

Parameters:
Integer the LHAPDF number of the integer

Definition at line 82 of file PDF.java.

00082                                         {
00083     member_ = member;
00084     dirtyType_ = true;
00085     name_ = numberToName_.get(member);
00086     return this;
00087     }

PDF setName String  name  ) 
 

Set the name of the PDF

Parameters:
String the name of the PDF

Definition at line 70 of file PDF.java.

00070                                    {
00071     name_ = name;
00072     dirtyType_ = true;
00073     member_ = nameToNumber_.get(name);
00074     return this;
00075     }

String toString  ) 
 

Returns the PDF name.

Definition at line 188 of file PDF.java.

Referenced by ResultSearchPattern.getParms().

00188                             {
00189     return(getMember().toString());
00190     }


Member Data Documentation

boolean dirtyType_ = true [private]
 

Definition at line 25 of file PDF.java.

boolean initialise_ = true [static, private]
 

Definition at line 30 of file PDF.java.

Vector<PDF> knownPDFs_ [static, private]
 

Definition at line 32 of file PDF.java.

Integer member_ [private]
 

Definition at line 21 of file PDF.java.

String name_ [private]
 

Definition at line 20 of file PDF.java.

HashMap<String, Integer> nameToNumber_ [static, private]
 

Definition at line 28 of file PDF.java.

HashMap<Integer, String> numberToName_ [static, private]
 

Definition at line 27 of file PDF.java.

boolean photon_ = false [private]
 

Definition at line 23 of file PDF.java.

boolean pion_ = false [private]
 

Definition at line 24 of file PDF.java.

boolean proton_ = false [private]
 

Definition at line 22 of file PDF.java.


The documentation for this class was generated from the following file:

Generated Wed Jan 17 09:14:27 GMT 2007